All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.elastictranscoder.model.Captions Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon Elastic Transcoder module holds the client classes that are used for communicating with Amazon Elastic Transcoder Service

There is a newer version: 1.9.35
Show newest version
/*
 * Copyright 2010-2016 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;

/**
 * 

* The captions to be created, if any. *

*/ public class Captions implements Serializable, Cloneable { /** *

* A policy that determines how Elastic Transcoder handles the existence of * multiple captions. *

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the sidecar captions and ignores the embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the embedded captions and ignores the sidecar captions for that language. * If CaptionSources is empty, Elastic Transcoder omits all * sidecar captions from the output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar captions * that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. *

*/ private String mergePolicy; /** *

* Source files for the input sidecar captions used during the transcoding * process. To omit all sidecar captions, leave CaptionSources * blank. *

*/ private com.amazonaws.internal.SdkInternalList captionSources; /** *

* The array of file formats for the output captions. If you leave this * value blank, Elastic Transcoder returns an error. *

*/ private com.amazonaws.internal.SdkInternalList captionFormats; /** *

* A policy that determines how Elastic Transcoder handles the existence of * multiple captions. *

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the sidecar captions and ignores the embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the embedded captions and ignores the sidecar captions for that language. * If CaptionSources is empty, Elastic Transcoder omits all * sidecar captions from the output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar captions * that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. *

* * @param mergePolicy * A policy that determines how Elastic Transcoder handles the * existence of multiple captions.

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the sidecar captions and ignores the * embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the embedded captions and ignores the * sidecar captions for that language. If CaptionSources * is empty, Elastic Transcoder omits all sidecar captions from the * output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar * captions that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. */ public void setMergePolicy(String mergePolicy) { this.mergePolicy = mergePolicy; } /** *

* A policy that determines how Elastic Transcoder handles the existence of * multiple captions. *

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the sidecar captions and ignores the embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the embedded captions and ignores the sidecar captions for that language. * If CaptionSources is empty, Elastic Transcoder omits all * sidecar captions from the output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar captions * that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. *

* * @return A policy that determines how Elastic Transcoder handles the * existence of multiple captions.

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the sidecar captions and ignores the * embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the embedded captions and ignores the * sidecar captions for that language. If * CaptionSources is empty, Elastic Transcoder omits * all sidecar captions from the output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar * captions that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. */ public String getMergePolicy() { return this.mergePolicy; } /** *

* A policy that determines how Elastic Transcoder handles the existence of * multiple captions. *

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the sidecar captions and ignores the embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded and * sidecar captions into outputs. If captions for a language are embedded in * the input file and also appear in a sidecar file, Elastic Transcoder uses * the embedded captions and ignores the sidecar captions for that language. * If CaptionSources is empty, Elastic Transcoder omits all * sidecar captions from the output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar captions * that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. *

* * @param mergePolicy * A policy that determines how Elastic Transcoder handles the * existence of multiple captions.

*
    *
  • *

    * MergeOverride: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the sidecar captions and ignores the * embedded captions for that language. *

    *
  • *
  • *

    * MergeRetain: Elastic Transcoder transcodes both embedded * and sidecar captions into outputs. If captions for a language are * embedded in the input file and also appear in a sidecar file, * Elastic Transcoder uses the embedded captions and ignores the * sidecar captions for that language. If CaptionSources * is empty, Elastic Transcoder omits all sidecar captions from the * output files. *

    *
  • *
  • *

    * Override: Elastic Transcoder transcodes only the sidecar * captions that you specify in CaptionSources. *

    *
  • *
*

* MergePolicy cannot be null. * @return Returns a reference to this object so that method calls can be * chained together. */ public Captions withMergePolicy(String mergePolicy) { setMergePolicy(mergePolicy); return this; } /** *

* Source files for the input sidecar captions used during the transcoding * process. To omit all sidecar captions, leave CaptionSources * blank. *

* * @return Source files for the input sidecar captions used during the * transcoding process. To omit all sidecar captions, leave * CaptionSources blank. */ public java.util.List getCaptionSources() { if (captionSources == null) { captionSources = new com.amazonaws.internal.SdkInternalList(); } return captionSources; } /** *

* Source files for the input sidecar captions used during the transcoding * process. To omit all sidecar captions, leave CaptionSources * blank. *

* * @param captionSources * Source files for the input sidecar captions used during the * transcoding process. To omit all sidecar captions, leave * CaptionSources blank. */ public void setCaptionSources( java.util.Collection captionSources) { if (captionSources == null) { this.captionSources = null; return; } this.captionSources = new com.amazonaws.internal.SdkInternalList( captionSources); } /** *

* Source files for the input sidecar captions used during the transcoding * process. To omit all sidecar captions, leave CaptionSources * blank. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setCaptionSources(java.util.Collection)} or * {@link #withCaptionSources(java.util.Collection)} if you want to override * the existing values. *

* * @param captionSources * Source files for the input sidecar captions used during the * transcoding process. To omit all sidecar captions, leave * CaptionSources blank. * @return Returns a reference to this object so that method calls can be * chained together. */ public Captions withCaptionSources(CaptionSource... captionSources) { if (this.captionSources == null) { setCaptionSources(new com.amazonaws.internal.SdkInternalList( captionSources.length)); } for (CaptionSource ele : captionSources) { this.captionSources.add(ele); } return this; } /** *

* Source files for the input sidecar captions used during the transcoding * process. To omit all sidecar captions, leave CaptionSources * blank. *

* * @param captionSources * Source files for the input sidecar captions used during the * transcoding process. To omit all sidecar captions, leave * CaptionSources blank. * @return Returns a reference to this object so that method calls can be * chained together. */ public Captions withCaptionSources( java.util.Collection captionSources) { setCaptionSources(captionSources); return this; } /** *

* The array of file formats for the output captions. If you leave this * value blank, Elastic Transcoder returns an error. *

* * @return The array of file formats for the output captions. If you leave * this value blank, Elastic Transcoder returns an error. */ public java.util.List getCaptionFormats() { if (captionFormats == null) { captionFormats = new com.amazonaws.internal.SdkInternalList(); } return captionFormats; } /** *

* The array of file formats for the output captions. If you leave this * value blank, Elastic Transcoder returns an error. *

* * @param captionFormats * The array of file formats for the output captions. If you leave * this value blank, Elastic Transcoder returns an error. */ public void setCaptionFormats( java.util.Collection captionFormats) { if (captionFormats == null) { this.captionFormats = null; return; } this.captionFormats = new com.amazonaws.internal.SdkInternalList( captionFormats); } /** *

* The array of file formats for the output captions. If you leave this * value blank, Elastic Transcoder returns an error. *

*

* NOTE: This method appends the values to the existing list (if * any). Use {@link #setCaptionFormats(java.util.Collection)} or * {@link #withCaptionFormats(java.util.Collection)} if you want to override * the existing values. *

* * @param captionFormats * The array of file formats for the output captions. If you leave * this value blank, Elastic Transcoder returns an error. * @return Returns a reference to this object so that method calls can be * chained together. */ public Captions withCaptionFormats(CaptionFormat... captionFormats) { if (this.captionFormats == null) { setCaptionFormats(new com.amazonaws.internal.SdkInternalList( captionFormats.length)); } for (CaptionFormat ele : captionFormats) { this.captionFormats.add(ele); } return this; } /** *

* The array of file formats for the output captions. If you leave this * value blank, Elastic Transcoder returns an error. *

* * @param captionFormats * The array of file formats for the output captions. If you leave * this value blank, Elastic Transcoder returns an error. * @return Returns a reference to this object so that method calls can be * chained together. */ public Captions withCaptionFormats( java.util.Collection captionFormats) { setCaptionFormats(captionFormats); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getMergePolicy() != null) sb.append("MergePolicy: " + getMergePolicy() + ","); if (getCaptionSources() != null) sb.append("CaptionSources: " + getCaptionSources() + ","); if (getCaptionFormats() != null) sb.append("CaptionFormats: " + getCaptionFormats()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Captions == false) return false; Captions other = (Captions) obj; if (other.getMergePolicy() == null ^ this.getMergePolicy() == null) return false; if (other.getMergePolicy() != null && other.getMergePolicy().equals(this.getMergePolicy()) == false) return false; if (other.getCaptionSources() == null ^ this.getCaptionSources() == null) return false; if (other.getCaptionSources() != null && other.getCaptionSources().equals(this.getCaptionSources()) == false) return false; if (other.getCaptionFormats() == null ^ this.getCaptionFormats() == null) return false; if (other.getCaptionFormats() != null && other.getCaptionFormats().equals(this.getCaptionFormats()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMergePolicy() == null) ? 0 : getMergePolicy().hashCode()); hashCode = prime * hashCode + ((getCaptionSources() == null) ? 0 : getCaptionSources() .hashCode()); hashCode = prime * hashCode + ((getCaptionFormats() == null) ? 0 : getCaptionFormats() .hashCode()); return hashCode; } @Override public Captions clone() { try { return (Captions) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy