/* * Copyright 2018-2023 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; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Presets are templates that contain most of the settings for transcoding media files from one format to another. * Elastic Transcoder includes some default presets for common formats, for example, several iPod and iPhone versions. * You can also create your own presets for formats that aren't included among the default presets. You specify which * preset you want to use when you create a job. *
*/ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Preset implements Serializable, Cloneable, StructuredPojo { /** ** Identifier for the new preset. You use this value to get settings for the preset or to delete it. *
*/ private String id; /** ** The Amazon Resource Name (ARN) for the preset. *
*/ private String arn; /** ** The name of the preset. *
*/ private String name; /** ** A description of the preset. *
*/ private String description; /** *
* The container type for the output file. Valid values include flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
, mxf
,
* oga
, ogg
, ts
, and webm
.
*
* A section of the response body that provides information about the audio preset values. *
*/ private AudioParameters audio; /** ** A section of the response body that provides information about the video preset values. *
*/ private VideoParameters video; /** ** A section of the response body that provides information about the thumbnail preset values, if any. *
*/ private Thumbnails thumbnails; /** *
* Whether the preset is a default preset provided by Elastic Transcoder (System
) or a preset that you
* have defined (Custom
).
*
* Identifier for the new preset. You use this value to get settings for the preset or to delete it. *
* * @param id * Identifier for the new preset. You use this value to get settings for the preset or to delete it. */ public void setId(String id) { this.id = id; } /** ** Identifier for the new preset. You use this value to get settings for the preset or to delete it. *
* * @return Identifier for the new preset. You use this value to get settings for the preset or to delete it. */ public String getId() { return this.id; } /** ** Identifier for the new preset. You use this value to get settings for the preset or to delete it. *
* * @param id * Identifier for the new preset. You use this value to get settings for the preset or to delete it. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withId(String id) { setId(id); return this; } /** ** The Amazon Resource Name (ARN) for the preset. *
* * @param arn * The Amazon Resource Name (ARN) for the preset. */ public void setArn(String arn) { this.arn = arn; } /** ** The Amazon Resource Name (ARN) for the preset. *
* * @return The Amazon Resource Name (ARN) for the preset. */ public String getArn() { return this.arn; } /** ** The Amazon Resource Name (ARN) for the preset. *
* * @param arn * The Amazon Resource Name (ARN) for the preset. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withArn(String arn) { setArn(arn); return this; } /** ** The name of the preset. *
* * @param name * The name of the preset. */ public void setName(String name) { this.name = name; } /** ** The name of the preset. *
* * @return The name of the preset. */ public String getName() { return this.name; } /** ** The name of the preset. *
* * @param name * The name of the preset. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withName(String name) { setName(name); return this; } /** ** A description of the preset. *
* * @param description * A description of the preset. */ public void setDescription(String description) { this.description = description; } /** ** A description of the preset. *
* * @return A description of the preset. */ public String getDescription() { return this.description; } /** ** A description of the preset. *
* * @param description * A description of the preset. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withDescription(String description) { setDescription(description); return this; } /** *
* The container type for the output file. Valid values include flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
, mxf
,
* oga
, ogg
, ts
, and webm
.
*
flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
,
* mxf
, oga
, ogg
, ts
, and webm
.
*/
public void setContainer(String container) {
this.container = container;
}
/**
*
* The container type for the output file. Valid values include flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
, mxf
,
* oga
, ogg
, ts
, and webm
.
*
flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
,
* mxf
, oga
, ogg
, ts
, and webm
.
*/
public String getContainer() {
return this.container;
}
/**
*
* The container type for the output file. Valid values include flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
, mxf
,
* oga
, ogg
, ts
, and webm
.
*
flac
, flv
,
* fmp4
, gif
, mp3
, mp4
, mpg
,
* mxf
, oga
, ogg
, ts
, and webm
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Preset withContainer(String container) {
setContainer(container);
return this;
}
/**
* * A section of the response body that provides information about the audio preset values. *
* * @param audio * A section of the response body that provides information about the audio preset values. */ public void setAudio(AudioParameters audio) { this.audio = audio; } /** ** A section of the response body that provides information about the audio preset values. *
* * @return A section of the response body that provides information about the audio preset values. */ public AudioParameters getAudio() { return this.audio; } /** ** A section of the response body that provides information about the audio preset values. *
* * @param audio * A section of the response body that provides information about the audio preset values. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withAudio(AudioParameters audio) { setAudio(audio); return this; } /** ** A section of the response body that provides information about the video preset values. *
* * @param video * A section of the response body that provides information about the video preset values. */ public void setVideo(VideoParameters video) { this.video = video; } /** ** A section of the response body that provides information about the video preset values. *
* * @return A section of the response body that provides information about the video preset values. */ public VideoParameters getVideo() { return this.video; } /** ** A section of the response body that provides information about the video preset values. *
* * @param video * A section of the response body that provides information about the video preset values. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withVideo(VideoParameters video) { setVideo(video); return this; } /** ** A section of the response body that provides information about the thumbnail preset values, if any. *
* * @param thumbnails * A section of the response body that provides information about the thumbnail preset values, if any. */ public void setThumbnails(Thumbnails thumbnails) { this.thumbnails = thumbnails; } /** ** A section of the response body that provides information about the thumbnail preset values, if any. *
* * @return A section of the response body that provides information about the thumbnail preset values, if any. */ public Thumbnails getThumbnails() { return this.thumbnails; } /** ** A section of the response body that provides information about the thumbnail preset values, if any. *
* * @param thumbnails * A section of the response body that provides information about the thumbnail preset values, if any. * @return Returns a reference to this object so that method calls can be chained together. */ public Preset withThumbnails(Thumbnails thumbnails) { setThumbnails(thumbnails); return this; } /** *
* Whether the preset is a default preset provided by Elastic Transcoder (System
) or a preset that you
* have defined (Custom
).
*
System
) or a preset
* that you have defined (Custom
).
*/
public void setType(String type) {
this.type = type;
}
/**
*
* Whether the preset is a default preset provided by Elastic Transcoder (System
) or a preset that you
* have defined (Custom
).
*
System
) or a preset
* that you have defined (Custom
).
*/
public String getType() {
return this.type;
}
/**
*
* Whether the preset is a default preset provided by Elastic Transcoder (System
) or a preset that you
* have defined (Custom
).
*
System
) or a preset
* that you have defined (Custom
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Preset withType(String type) {
setType(type);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getDescription() != null)
sb.append("Description: ").append(getDescription()).append(",");
if (getContainer() != null)
sb.append("Container: ").append(getContainer()).append(",");
if (getAudio() != null)
sb.append("Audio: ").append(getAudio()).append(",");
if (getVideo() != null)
sb.append("Video: ").append(getVideo()).append(",");
if (getThumbnails() != null)
sb.append("Thumbnails: ").append(getThumbnails()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Preset == false)
return false;
Preset other = (Preset) obj;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getContainer() == null ^ this.getContainer() == null)
return false;
if (other.getContainer() != null && other.getContainer().equals(this.getContainer()) == false)
return false;
if (other.getAudio() == null ^ this.getAudio() == null)
return false;
if (other.getAudio() != null && other.getAudio().equals(this.getAudio()) == false)
return false;
if (other.getVideo() == null ^ this.getVideo() == null)
return false;
if (other.getVideo() != null && other.getVideo().equals(this.getVideo()) == false)
return false;
if (other.getThumbnails() == null ^ this.getThumbnails() == null)
return false;
if (other.getThumbnails() != null && other.getThumbnails().equals(this.getThumbnails()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
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 + ((getAudio() == null) ? 0 : getAudio().hashCode());
hashCode = prime * hashCode + ((getVideo() == null) ? 0 : getVideo().hashCode());
hashCode = prime * hashCode + ((getThumbnails() == null) ? 0 : getThumbnails().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public Preset clone() {
try {
return (Preset) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.elastictranscoder.model.transform.PresetMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}