public Captions withCaptionFormats(CaptionFormat... captionFormats) {
        if (this.captionFormats == null) {
            setCaptionFormats(new com.amazonaws.internal.SdkInternalList<CaptionFormat>(captionFormats.length));
        }
        for (CaptionFormat ele : captionFormats) {
            this.captionFormats.add(ele);
        }
        return this;
    }
public Captions withCaptionFormats ( CaptionFormat ... captionFormats ) { if ( this . captionFormats == null ) { setCaptionFormats ( new com . amazonaws . internal . SdkInternalList < CaptionFormat > ( captionFormats . length ) ) ; } for ( CaptionFormat ele : captionFormats ) { this . captionFormats . add ( ele ) ; } return this ; }
<p>
The array of file formats for the output captions. If you leave this value blank, Elastic Transcoder returns an
error.
</p>
<p>
<b>NOTE:</b> 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.
</p>

@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.