Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   * 
   *  http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.elastictranscoder.model;
 

Watermarks can be in .png or .jpg format. If you want to display a watermark that is not rectangular, use the .png format, which supports transparency.

 
 public class JobWatermark implements SerializableCloneable {

    
The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.

Constraints:
Length: 1 - 40

 
     private String presetWatermarkId;

    
The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Constraints:
Length: 1 - 255
Pattern: (^.{1,}.jpg$)|(^.{1,}.jpeg$)|(^.{1,}.png$)

 
     private String inputKey;

    
The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
 
     private Encryption encryption;

    
The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.

Constraints:
Length: 1 - 40

Returns:
The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.
 
     public String getPresetWatermarkId() {
         return ;
     }
    
    
The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.

Constraints:
Length: 1 - 40

Parameters:
presetWatermarkId The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.
 
     public void setPresetWatermarkId(String presetWatermarkId) {
         this. = presetWatermarkId;
     }
    
    
The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 40

Parameters:
presetWatermarkId The ID of the watermark settings that Elastic Transcoder uses to add watermarks to the video during transcoding. The settings are in the preset specified by Preset for the current output. In that preset, the value of Watermarks Id tells Elastic Transcoder which settings to use.
Returns:
A reference to this updated object so that method calls can be chained together.
    public JobWatermark withPresetWatermarkId(String presetWatermarkId) {
        this. = presetWatermarkId;
        return this;
    }

    
The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Constraints:
Length: 1 - 255
Pattern: (^.{1,}.jpg$)|(^.{1,}.jpeg$)|(^.{1,}.png$)

Returns:
The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

    public String getInputKey() {
        return ;
    }
    
    
The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Constraints:
Length: 1 - 255
Pattern: (^.{1,}.jpg$)|(^.{1,}.jpeg$)|(^.{1,}.png$)

Parameters:
inputKey The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

    public void setInputKey(String inputKey) {
        this. = inputKey;
    }
    
    
The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255
Pattern: (^.{1,}.jpg$)|(^.{1,}.jpeg$)|(^.{1,}.png$)

Parameters:
inputKey The name of the .png or .jpg file that you want to use for the watermark. To determine which Amazon S3 bucket contains the specified file, Elastic Transcoder checks the pipeline specified by Pipeline; the Input Bucket object in that pipeline identifies the bucket.

If the file name includes a prefix, for example, logos/128x64.png, include the prefix in the key. If the file isn't in the specified bucket, Elastic Transcoder returns an error.

Returns:
A reference to this updated object so that method calls can be chained together.
    public JobWatermark withInputKey(String inputKey) {
        this. = inputKey;
        return this;
    }

    
The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.

Returns:
The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
    public Encryption getEncryption() {
        return ;
    }
    
    
The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.

Parameters:
encryption The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
    public void setEncryption(Encryption encryption) {
        this. = encryption;
    }
    
    
The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.

Returns a reference to this object so that method calls can be chained together.

Parameters:
encryption The encryption settings, if any, that you want Elastic Transcoder to apply to your watermarks.
Returns:
A reference to this updated object so that method calls can be chained together.
    public JobWatermark withEncryption(Encryption encryption) {
        this. = encryption;
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getPresetWatermarkId() != nullsb.append("PresetWatermarkId: " + getPresetWatermarkId() + ",");
        if (getInputKey() != nullsb.append("InputKey: " + getInputKey() + ",");
        if (getEncryption() != nullsb.append("Encryption: " + getEncryption() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getPresetWatermarkId() == null) ? 0 : getPresetWatermarkId().hashCode()); 
        hashCode = prime * hashCode + ((getInputKey() == null) ? 0 : getInputKey().hashCode()); 
        hashCode = prime * hashCode + ((getEncryption() == null) ? 0 : getEncryption().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof JobWatermark == falsereturn false;
        JobWatermark other = (JobWatermark)obj;
        
        if (other.getPresetWatermarkId() == null ^ this.getPresetWatermarkId() == nullreturn false;
        if (other.getPresetWatermarkId() != null && other.getPresetWatermarkId().equals(this.getPresetWatermarkId()) == falsereturn false
        if (other.getInputKey() == null ^ this.getInputKey() == nullreturn false;
        if (other.getInputKey() != null && other.getInputKey().equals(this.getInputKey()) == falsereturn false
        if (other.getEncryption() == null ^ this.getEncryption() == nullreturn false;
        if (other.getEncryption() != null && other.getEncryption().equals(this.getEncryption()) == falsereturn false
        return true;
    }
    
    @Override
    public JobWatermark clone() {
        try {
            return (JobWatermarksuper.clone();
        
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException(
                    "Got a CloneNotSupportedException from Object.clone() "
                    + "even though we're Cloneable!",
                    e);
        }
        
    }
}
    
New to GrepCode? Check out our FAQ X