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;
 
 
Container for the parameters to the CreatePreset operation.

The CreatePreset operation creates a preset with settings that you specify.

IMPORTANT:Elastic Transcoder checks the CreatePreset settings to ensure that they meet Elastic Transcoder requirements and to determine whether they comply with H.264 standards. If your settings are not valid for Elastic Transcoder, Elastic Transcoder returns an HTTP 400 response (ValidationException) and does not create the preset. If the settings are valid for Elastic Transcoder but aren't strictly compliant with the H.264 standard, Elastic Transcoder creates the preset and returns a warning message in the response. This helps you determine whether your settings comply with the H.264 standard while giving you greater flexibility with respect to the video that Elastic Transcoder produces.

Elastic Transcoder uses the H.264 video-compression format. For more information, see the International Telecommunication Union publication Recommendation ITU-T H.264: Advanced video coding for generic audiovisual services .

 
 public class CreatePresetRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.

Constraints:
Length: 1 - 40

 
     private String name;

    
A description of the preset.

Constraints:
Length: 0 - 255

 
     private String description;

    
The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.

Constraints:
Pattern: (^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)

 
     private String container;

    
A section of the request body that specifies the video parameters.
 
     private VideoParameters video;

    
A section of the request body that specifies the audio parameters.
 
     private AudioParameters audio;

    
A section of the request body that specifies the thumbnail parameters, if any.
 
     private Thumbnails thumbnails;

    
The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.

Constraints:
Length: 1 - 40

Returns:
The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.
    public String getName() {
        return ;
    }
    
    
The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.

Constraints:
Length: 1 - 40

Parameters:
name The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.
    public void setName(String name) {
        this. = name;
    }
    
    
The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.

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

Constraints:
Length: 1 - 40

Parameters:
name The name of the preset. We recommend that the name be unique within the AWS account, but uniqueness is not enforced.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreatePresetRequest withName(String name) {
        this. = name;
        return this;
    }

    
A description of the preset.

Constraints:
Length: 0 - 255

Returns:
A description of the preset.
    public String getDescription() {
        return ;
    }
    
    
A description of the preset.

Constraints:
Length: 0 - 255

Parameters:
description A description of the preset.
    public void setDescription(String description) {
        this. = description;
    }
    
    
A description of the preset.

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

Constraints:
Length: 0 - 255

Parameters:
description A description of the preset.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreatePresetRequest withDescription(String description) {
        this. = description;
        return this;
    }

    
The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.

Constraints:
Pattern: (^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)

Returns:
The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.
    public String getContainer() {
        return ;
    }
    
    
The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.

Constraints:
Pattern: (^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)

Parameters:
container The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.
    public void setContainer(String container) {
        this. = container;
    }
    
    
The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.

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

Constraints:
Pattern: (^mp4$)|(^ts$)|(^webm$)|(^mp3$)|(^ogg$)|(^fmp4$)|(^mpg$)|(^flv$)|(^gif$)

Parameters:
container The container type for the output file. Valid values include flv, fmp4, gif, mp3, mp4, mpg, ogg, ts, and webm.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreatePresetRequest withContainer(String container) {
        this. = container;
        return this;
    }

    
A section of the request body that specifies the video parameters.

Returns:
A section of the request body that specifies the video parameters.
    public VideoParameters getVideo() {
        return ;
    }
    
    
A section of the request body that specifies the video parameters.

Parameters:
video A section of the request body that specifies the video parameters.
    public void setVideo(VideoParameters video) {
        this. = video;
    }
    
    
A section of the request body that specifies the video parameters.

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

Parameters:
video A section of the request body that specifies the video parameters.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = video;
        return this;
    }

    
A section of the request body that specifies the audio parameters.

Returns:
A section of the request body that specifies the audio parameters.
    public AudioParameters getAudio() {
        return ;
    }
    
    
A section of the request body that specifies the audio parameters.

Parameters:
audio A section of the request body that specifies the audio parameters.
    public void setAudio(AudioParameters audio) {
        this. = audio;
    }
    
    
A section of the request body that specifies the audio parameters.

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

Parameters:
audio A section of the request body that specifies the audio parameters.
Returns:
A reference to this updated object so that method calls can be chained together.
        this. = audio;
        return this;
    }

    
A section of the request body that specifies the thumbnail parameters, if any.

Returns:
A section of the request body that specifies the thumbnail parameters, if any.
    public Thumbnails getThumbnails() {
        return ;
    }
    
    
A section of the request body that specifies the thumbnail parameters, if any.

Parameters:
thumbnails A section of the request body that specifies the thumbnail parameters, if any.
    public void setThumbnails(Thumbnails thumbnails) {
        this. = thumbnails;
    }
    
    
A section of the request body that specifies the thumbnail parameters, if any.

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

Parameters:
thumbnails A section of the request body that specifies the thumbnail parameters, if any.
Returns:
A reference to this updated object so that method calls can be chained together.
    public CreatePresetRequest withThumbnails(Thumbnails thumbnails) {
        this. = thumbnails;
        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 (getName() != nullsb.append("Name: " + getName() + ",");
        if (getDescription() != nullsb.append("Description: " + getDescription() + ",");
        if (getContainer() != nullsb.append("Container: " + getContainer() + ",");
        if (getVideo() != nullsb.append("Video: " + getVideo() + ",");
        if (getAudio() != nullsb.append("Audio: " + getAudio() + ",");
        if (getThumbnails() != nullsb.append("Thumbnails: " + getThumbnails() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); 
        hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); 
        hashCode = prime * hashCode + ((getContainer() == null) ? 0 : getContainer().hashCode()); 
        hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode()); 
        hashCode = prime * hashCode + ((getAudio() == null) ? 0 : getAudio().hashCode()); 
        hashCode = prime * hashCode + ((getThumbnails() == null) ? 0 : getThumbnails().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof CreatePresetRequest == falsereturn false;
        CreatePresetRequest other = (CreatePresetRequest)obj;
        
        if (other.getName() == null ^ this.getName() == nullreturn false;
        if (other.getName() != null && other.getName().equals(this.getName()) == falsereturn false
        if (other.getDescription() == null ^ this.getDescription() == nullreturn false;
        if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == falsereturn false
        if (other.getContainer() == null ^ this.getContainer() == nullreturn false;
        if (other.getContainer() != null && other.getContainer().equals(this.getContainer()) == falsereturn false
        if (other.getVideo() == null ^ this.getVideo() == nullreturn false;
        if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == falsereturn false
        if (other.getAudio() == null ^ this.getAudio() == nullreturn false;
        if (other.getAudio() != null && other.getAudio().equals(this.getAudio()) == falsereturn false
        if (other.getThumbnails() == null ^ this.getThumbnails() == nullreturn false;
        if (other.getThumbnails() != null && other.getThumbnails().equals(this.getThumbnails()) == falsereturn false
        return true;
    }
    
    @Override
    public CreatePresetRequest clone() {
        
            return (CreatePresetRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X