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

software.amazon.awssdk.services.elastictranscoder.model.JobOutput 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: 2.29.17
Show newest version
/*
 * Copyright 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 software.amazon.awssdk.services.elastictranscoder.model;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import software.amazon.awssdk.annotations.Generated;
import software.amazon.awssdk.core.SdkField;
import software.amazon.awssdk.core.SdkPojo;
import software.amazon.awssdk.core.protocol.MarshallLocation;
import software.amazon.awssdk.core.protocol.MarshallingType;
import software.amazon.awssdk.core.traits.ListTrait;
import software.amazon.awssdk.core.traits.LocationTrait;
import software.amazon.awssdk.core.util.DefaultSdkAutoConstructList;
import software.amazon.awssdk.core.util.SdkAutoConstructList;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;

/**
 * 
 * 

* Outputs recommended instead. *

*
*

* If you specified one output for a job, information about that output. If you specified multiple outputs for a job, * the Output object lists information about the first output. This duplicates the information that is * listed for the first output in the Outputs object. *

*/ @Generated("software.amazon.awssdk:codegen") public final class JobOutput implements SdkPojo, Serializable, ToCopyableBuilder { private static final SdkField ID_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Id") .getter(getter(JobOutput::id)).setter(setter(Builder::id)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Id").build()).build(); private static final SdkField KEY_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Key") .getter(getter(JobOutput::key)).setter(setter(Builder::key)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Key").build()).build(); private static final SdkField THUMBNAIL_PATTERN_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("ThumbnailPattern").getter(getter(JobOutput::thumbnailPattern)).setter(setter(Builder::thumbnailPattern)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ThumbnailPattern").build()).build(); private static final SdkField THUMBNAIL_ENCRYPTION_FIELD = SdkField . builder(MarshallingType.SDK_POJO).memberName("ThumbnailEncryption") .getter(getter(JobOutput::thumbnailEncryption)).setter(setter(Builder::thumbnailEncryption)) .constructor(Encryption::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("ThumbnailEncryption").build()) .build(); private static final SdkField ROTATE_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Rotate") .getter(getter(JobOutput::rotate)).setter(setter(Builder::rotate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Rotate").build()).build(); private static final SdkField PRESET_ID_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("PresetId").getter(getter(JobOutput::presetId)).setter(setter(Builder::presetId)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("PresetId").build()).build(); private static final SdkField SEGMENT_DURATION_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("SegmentDuration").getter(getter(JobOutput::segmentDuration)).setter(setter(Builder::segmentDuration)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("SegmentDuration").build()).build(); private static final SdkField STATUS_FIELD = SdkField. builder(MarshallingType.STRING).memberName("Status") .getter(getter(JobOutput::status)).setter(setter(Builder::status)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Status").build()).build(); private static final SdkField STATUS_DETAIL_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("StatusDetail").getter(getter(JobOutput::statusDetail)).setter(setter(Builder::statusDetail)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("StatusDetail").build()).build(); private static final SdkField DURATION_FIELD = SdkField. builder(MarshallingType.LONG).memberName("Duration") .getter(getter(JobOutput::duration)).setter(setter(Builder::duration)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Duration").build()).build(); private static final SdkField WIDTH_FIELD = SdkField. builder(MarshallingType.INTEGER).memberName("Width") .getter(getter(JobOutput::width)).setter(setter(Builder::width)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Width").build()).build(); private static final SdkField HEIGHT_FIELD = SdkField. builder(MarshallingType.INTEGER) .memberName("Height").getter(getter(JobOutput::height)).setter(setter(Builder::height)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Height").build()).build(); private static final SdkField FRAME_RATE_FIELD = SdkField. builder(MarshallingType.STRING) .memberName("FrameRate").getter(getter(JobOutput::frameRate)).setter(setter(Builder::frameRate)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FrameRate").build()).build(); private static final SdkField FILE_SIZE_FIELD = SdkField. builder(MarshallingType.LONG).memberName("FileSize") .getter(getter(JobOutput::fileSize)).setter(setter(Builder::fileSize)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("FileSize").build()).build(); private static final SdkField DURATION_MILLIS_FIELD = SdkField. builder(MarshallingType.LONG) .memberName("DurationMillis").getter(getter(JobOutput::durationMillis)).setter(setter(Builder::durationMillis)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("DurationMillis").build()).build(); private static final SdkField> WATERMARKS_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Watermarks") .getter(getter(JobOutput::watermarks)) .setter(setter(Builder::watermarks)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Watermarks").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(JobWatermark::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField ALBUM_ART_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("AlbumArt").getter(getter(JobOutput::albumArt)).setter(setter(Builder::albumArt)) .constructor(JobAlbumArt::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AlbumArt").build()).build(); private static final SdkField> COMPOSITION_FIELD = SdkField .> builder(MarshallingType.LIST) .memberName("Composition") .getter(getter(JobOutput::composition)) .setter(setter(Builder::composition)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Composition").build(), ListTrait .builder() .memberLocationName(null) .memberFieldInfo( SdkField. builder(MarshallingType.SDK_POJO) .constructor(Clip::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD) .locationName("member").build()).build()).build()).build(); private static final SdkField CAPTIONS_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Captions").getter(getter(JobOutput::captions)).setter(setter(Builder::captions)) .constructor(Captions::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Captions").build()).build(); private static final SdkField ENCRYPTION_FIELD = SdkField. builder(MarshallingType.SDK_POJO) .memberName("Encryption").getter(getter(JobOutput::encryption)).setter(setter(Builder::encryption)) .constructor(Encryption::builder) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("Encryption").build()).build(); private static final SdkField APPLIED_COLOR_SPACE_CONVERSION_FIELD = SdkField . builder(MarshallingType.STRING) .memberName("AppliedColorSpaceConversion") .getter(getter(JobOutput::appliedColorSpaceConversion)) .setter(setter(Builder::appliedColorSpaceConversion)) .traits(LocationTrait.builder().location(MarshallLocation.PAYLOAD).locationName("AppliedColorSpaceConversion") .build()).build(); private static final List> SDK_FIELDS = Collections.unmodifiableList(Arrays.asList(ID_FIELD, KEY_FIELD, THUMBNAIL_PATTERN_FIELD, THUMBNAIL_ENCRYPTION_FIELD, ROTATE_FIELD, PRESET_ID_FIELD, SEGMENT_DURATION_FIELD, STATUS_FIELD, STATUS_DETAIL_FIELD, DURATION_FIELD, WIDTH_FIELD, HEIGHT_FIELD, FRAME_RATE_FIELD, FILE_SIZE_FIELD, DURATION_MILLIS_FIELD, WATERMARKS_FIELD, ALBUM_ART_FIELD, COMPOSITION_FIELD, CAPTIONS_FIELD, ENCRYPTION_FIELD, APPLIED_COLOR_SPACE_CONVERSION_FIELD)); private static final long serialVersionUID = 1L; private final String id; private final String key; private final String thumbnailPattern; private final Encryption thumbnailEncryption; private final String rotate; private final String presetId; private final String segmentDuration; private final String status; private final String statusDetail; private final Long duration; private final Integer width; private final Integer height; private final String frameRate; private final Long fileSize; private final Long durationMillis; private final List watermarks; private final JobAlbumArt albumArt; private final List composition; private final Captions captions; private final Encryption encryption; private final String appliedColorSpaceConversion; private JobOutput(BuilderImpl builder) { this.id = builder.id; this.key = builder.key; this.thumbnailPattern = builder.thumbnailPattern; this.thumbnailEncryption = builder.thumbnailEncryption; this.rotate = builder.rotate; this.presetId = builder.presetId; this.segmentDuration = builder.segmentDuration; this.status = builder.status; this.statusDetail = builder.statusDetail; this.duration = builder.duration; this.width = builder.width; this.height = builder.height; this.frameRate = builder.frameRate; this.fileSize = builder.fileSize; this.durationMillis = builder.durationMillis; this.watermarks = builder.watermarks; this.albumArt = builder.albumArt; this.composition = builder.composition; this.captions = builder.captions; this.encryption = builder.encryption; this.appliedColorSpaceConversion = builder.appliedColorSpaceConversion; } /** *

* A sequential counter, starting with 1, that identifies an output among the outputs from the current job. In the * Output syntax, this value is always 1. *

* * @return A sequential counter, starting with 1, that identifies an output among the outputs from the current job. * In the Output syntax, this value is always 1. */ public final String id() { return id; } /** *

* The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket specified by * the OutputBucket object in the pipeline that is specified by the pipeline ID. *

* * @return The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket * specified by the OutputBucket object in the pipeline that is specified by the pipeline ID. */ public final String key() { return key; } /** *

* Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want Elastic * Transcoder to name the files. *

*

* If you don't want Elastic Transcoder to create thumbnails, specify "". *

*

* If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include in the * file name for each thumbnail. You can specify the following values in any sequence: *

*
    *
  • *

    * {count} (Required): If you want to create thumbnails, you must include {count} * in the ThumbnailPattern object. Wherever you specify {count}, Elastic Transcoder adds a * five-digit sequence number (beginning with 00001) to thumbnail file names. The number indicates where a * given thumbnail appears in the sequence of thumbnails for a transcoded file. *

    * *

    * If you specify a literal value and/or {resolution} but you omit {count}, Elastic * Transcoder returns a validation error and does not create the job. *

    *
  • *
  • *

    * Literal values (Optional): You can specify literal values anywhere in the ThumbnailPattern * object. For example, you can include them as a file name prefix or as a delimiter between * {resolution} and {count}. *

    *
  • *
  • *

    * {resolution} (Optional): If you want Elastic Transcoder to include the resolution in the * file name, include {resolution} in the ThumbnailPattern object. *

    *
  • *
*

* When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) that * appears in the preset that you specified in the PresetID value of CreateJobOutput. * Elastic Transcoder also appends the applicable file name extension. *

* * @return Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want Elastic * Transcoder to name the files.

*

* If you don't want Elastic Transcoder to create thumbnails, specify "". *

*

* If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include * in the file name for each thumbnail. You can specify the following values in any sequence: *

*
    *
  • *

    * {count} (Required): If you want to create thumbnails, you must include * {count} in the ThumbnailPattern object. Wherever you specify * {count}, Elastic Transcoder adds a five-digit sequence number (beginning with 00001) * to thumbnail file names. The number indicates where a given thumbnail appears in the sequence of * thumbnails for a transcoded file. *

    * *

    * If you specify a literal value and/or {resolution} but you omit {count}, * Elastic Transcoder returns a validation error and does not create the job. *

    *
  • *
  • *

    * Literal values (Optional): You can specify literal values anywhere in the * ThumbnailPattern object. For example, you can include them as a file name prefix or as a * delimiter between {resolution} and {count}. *

    *
  • *
  • *

    * {resolution} (Optional): If you want Elastic Transcoder to include the resolution in * the file name, include {resolution} in the ThumbnailPattern object. *

    *
  • *
*

* When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) * that appears in the preset that you specified in the PresetID value of * CreateJobOutput. Elastic Transcoder also appends the applicable file name extension. */ public final String thumbnailPattern() { return thumbnailPattern; } /** *

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

* * @return The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail. */ public final Encryption thumbnailEncryption() { return thumbnailEncryption; } /** *

* The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the input. * Enter one of the following values: *

*

* auto, 0, 90, 180, 270 *

*

* The value auto generally works only if the file that you're transcoding contains rotation metadata. *

* * @return The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the * input. Enter one of the following values:

*

* auto, 0, 90, 180, 270 *

*

* The value auto generally works only if the file that you're transcoding contains rotation * metadata. */ public final String rotate() { return rotate; } /** *

* The value of the Id object for the preset that you want to use for this job. The preset determines * the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. To use a preset that you * created, specify the preset ID that Elastic Transcoder returned in the response when you created the preset. You * can also use the Elastic Transcoder system presets, which you can get with ListPresets. *

* * @return The value of the Id object for the preset that you want to use for this job. The preset * determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. To use * a preset that you created, specify the preset ID that Elastic Transcoder returned in the response when * you created the preset. You can also use the Elastic Transcoder system presets, which you can get with * ListPresets. */ public final String presetId() { return presetId; } /** * *

* (Outputs in Fragmented MP4 or MPEG-TS format only. *

*
*

* If you specify a preset in PresetId for which the value of Container is * fmp4 (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target * maximum duration of each segment in seconds. For HLSv3 format playlists, each media segment is * stored in a separate .ts file. For HLSv4, MPEG-DASH, and * Smooth playlists, all media segments for an output are stored in a single file. Each segment is * approximately the length of the SegmentDuration, though individual segments might be shorter or * longer. *

*

* The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by * SegmentDuration, the duration of the last segment is the remainder of total length/SegmentDuration. *

*

* Elastic Transcoder creates an output-specific playlist for each output HLS output that you specify * in OutputKeys. To add an output to the master playlist for this job, include it in the OutputKeys of * the associated playlist. *

* * @return

* (Outputs in Fragmented MP4 or MPEG-TS format only. *

* *

* If you specify a preset in PresetId for which the value of Container is * fmp4 (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the * target maximum duration of each segment in seconds. For HLSv3 format playlists, each media * segment is stored in a separate .ts file. For HLSv4, MPEG-DASH, * and Smooth playlists, all media segments for an output are stored in a single file. Each * segment is approximately the length of the SegmentDuration, though individual segments might * be shorter or longer. *

*

* The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by * SegmentDuration, the duration of the last segment is the remainder of total * length/SegmentDuration. *

*

* Elastic Transcoder creates an output-specific playlist for each output HLS output that you * specify in OutputKeys. To add an output to the master playlist for this job, include it in the * OutputKeys of the associated playlist. */ public final String segmentDuration() { return segmentDuration; } /** *

* The status of one output in a job. If you specified only one output for the job, Outputs:Status is * always the same as Job:Status. If you specified more than one output: *

*
    *
  • *

    * Job:Status and Outputs:Status for all of the outputs is Submitted until Elastic * Transcoder starts to process the first output. *

    *
  • *
  • *

    * When Elastic Transcoder starts to process the first output, Outputs:Status for that output and * Job:Status both change to Progressing. For each output, the value of Outputs:Status * remains Submitted until Elastic Transcoder starts to process the output. *

    *
  • *
  • *

    * Job:Status remains Progressing until all of the outputs reach a terminal status, either Complete or Error. *

    *
  • *
  • *

    * When all of the outputs reach a terminal status, Job:Status changes to Complete only if * Outputs:Status for all of the outputs is Complete. If Outputs:Status for * one or more outputs is Error, the terminal status for Job:Status is also * Error. *

    *
  • *
*

* The value of Status is one of the following: Submitted, Progressing, * Complete, Canceled, or Error. *

* * @return The status of one output in a job. If you specified only one output for the job, * Outputs:Status is always the same as Job:Status. If you specified more than one * output:

*
    *
  • *

    * Job:Status and Outputs:Status for all of the outputs is Submitted until Elastic * Transcoder starts to process the first output. *

    *
  • *
  • *

    * When Elastic Transcoder starts to process the first output, Outputs:Status for that output * and Job:Status both change to Progressing. For each output, the value of * Outputs:Status remains Submitted until Elastic Transcoder starts to process the output. *

    *
  • *
  • *

    * Job:Status remains Progressing until all of the outputs reach a terminal status, either Complete or * Error. *

    *
  • *
  • *

    * When all of the outputs reach a terminal status, Job:Status changes to Complete only if * Outputs:Status for all of the outputs is Complete. If * Outputs:Status for one or more outputs is Error, the terminal status for * Job:Status is also Error. *

    *
  • *
*

* The value of Status is one of the following: Submitted, * Progressing, Complete, Canceled, or Error. */ public final String status() { return status; } /** *

* Information that further explains Status. *

* * @return Information that further explains Status. */ public final String statusDetail() { return statusDetail; } /** *

* Duration of the output file, in seconds. *

* * @return Duration of the output file, in seconds. */ public final Long duration() { return duration; } /** *

* Specifies the width of the output file in pixels. *

* * @return Specifies the width of the output file in pixels. */ public final Integer width() { return width; } /** *

* Height of the output file, in pixels. *

* * @return Height of the output file, in pixels. */ public final Integer height() { return height; } /** *

* Frame rate of the output file, in frames per second. *

* * @return Frame rate of the output file, in frames per second. */ public final String frameRate() { return frameRate; } /** *

* File size of the output file, in bytes. *

* * @return File size of the output file, in bytes. */ public final Long fileSize() { return fileSize; } /** *

* Duration of the output file, in milliseconds. *

* * @return Duration of the output file, in milliseconds. */ public final Long durationMillis() { return durationMillis; } /** * For responses, this returns true if the service returned a value for the Watermarks property. This DOES NOT check * that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). This is * useful because the SDK will never return a null collection or map, but you may need to differentiate between the * service returning nothing (or null) and the service returning an empty collection or map. For requests, this * returns true if a value for the property was specified in the request builder, and false if a value was not * specified. */ public final boolean hasWatermarks() { return watermarks != null && !(watermarks instanceof SdkAutoConstructList); } /** *

* Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You can * specify up to four watermarks for each output. Settings for each watermark must be defined in the preset that you * specify in Preset for the current output. *

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the first * watermark in the list is added to the output video first, the second watermark in the list is added next, and so * on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same * location, the second watermark that you add covers the first one, the third one covers the second, and the fourth * one covers the third. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasWatermarks} method. *

* * @return Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. * You can specify up to four watermarks for each output. Settings for each watermark must be defined in the * preset that you specify in Preset for the current output.

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the * first watermark in the list is added to the output video first, the second watermark in the list is added * next, and so on. As a result, if the settings in a preset cause Elastic Transcoder to place all * watermarks in the same location, the second watermark that you add covers the first one, the third one * covers the second, and the fourth one covers the third. */ public final List watermarks() { return watermarks; } /** *

* The album art to be associated with the output file, if any. *

* * @return The album art to be associated with the output file, if any. */ public final JobAlbumArt albumArt() { return albumArt; } /** * For responses, this returns true if the service returned a value for the Composition property. This DOES NOT * check that the value is non-empty (for which, you should check the {@code isEmpty()} method on the property). * This is useful because the SDK will never return a null collection or map, but you may need to differentiate * between the service returning nothing (or null) and the service returning an empty collection or map. For * requests, this returns true if a value for the property was specified in the request builder, and false if a * value was not specified. * * @deprecated */ @Deprecated public final boolean hasComposition() { return composition != null && !(composition instanceof SdkAutoConstructList); } /** *

* You can create an output file that contains an excerpt from the input file. This excerpt, called a clip, can come * from the beginning, middle, or end of the file. The Composition object contains settings for the clips that make * up an output file. For the current release, you can only specify settings for a single clip per output file. The * Composition object cannot be null. *

*

* Attempts to modify the collection returned by this method will result in an UnsupportedOperationException. *

*

* This method will never return null. If you would like to know whether the service returned this field (so that * you can differentiate between null and empty), you can use the {@link #hasComposition} method. *

* * @return You can create an output file that contains an excerpt from the input file. This excerpt, called a clip, * can come from the beginning, middle, or end of the file. The Composition object contains settings for the * clips that make up an output file. For the current release, you can only specify settings for a single * clip per output file. The Composition object cannot be null. * @deprecated */ @Deprecated public final List composition() { return composition; } /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, * smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve text * formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* * @return You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions:

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic * Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per * file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. * Sidecar captions require a player that is capable of understanding the relationship between the video * file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a * maximum of 20 sidecar captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, * scc, smpt, srt, ttml (first div element only), and * webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, * and webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a * valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not * preserve text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through * existing captions unchanged, set the MergePolicy to MergeRetain, and pass in a * null CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia * pages. */ public final Captions captions() { return captions; } /** *

* The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you choose to * use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic Transcoder writes an * unencrypted file to your Amazon S3 bucket. *

* * @return The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you * choose to use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic * Transcoder writes an unencrypted file to your Amazon S3 bucket. */ public final Encryption encryption() { return encryption; } /** *

* If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode the output file, * the AppliedColorSpaceConversion parameter shows the conversion used. If no * ColorSpaceConversionMode was defined in the preset, this parameter is not be included in the job * response. *

* * @return If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode the output * file, the AppliedColorSpaceConversion parameter shows the conversion used. If no * ColorSpaceConversionMode was defined in the preset, this parameter is not be included in the * job response. */ public final String appliedColorSpaceConversion() { return appliedColorSpaceConversion; } @Override public Builder toBuilder() { return new BuilderImpl(this); } public static Builder builder() { return new BuilderImpl(); } public static Class serializableBuilderClass() { return BuilderImpl.class; } @Override public final int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(id()); hashCode = 31 * hashCode + Objects.hashCode(key()); hashCode = 31 * hashCode + Objects.hashCode(thumbnailPattern()); hashCode = 31 * hashCode + Objects.hashCode(thumbnailEncryption()); hashCode = 31 * hashCode + Objects.hashCode(rotate()); hashCode = 31 * hashCode + Objects.hashCode(presetId()); hashCode = 31 * hashCode + Objects.hashCode(segmentDuration()); hashCode = 31 * hashCode + Objects.hashCode(status()); hashCode = 31 * hashCode + Objects.hashCode(statusDetail()); hashCode = 31 * hashCode + Objects.hashCode(duration()); hashCode = 31 * hashCode + Objects.hashCode(width()); hashCode = 31 * hashCode + Objects.hashCode(height()); hashCode = 31 * hashCode + Objects.hashCode(frameRate()); hashCode = 31 * hashCode + Objects.hashCode(fileSize()); hashCode = 31 * hashCode + Objects.hashCode(durationMillis()); hashCode = 31 * hashCode + Objects.hashCode(hasWatermarks() ? watermarks() : null); hashCode = 31 * hashCode + Objects.hashCode(albumArt()); hashCode = 31 * hashCode + Objects.hashCode(hasComposition() ? composition() : null); hashCode = 31 * hashCode + Objects.hashCode(captions()); hashCode = 31 * hashCode + Objects.hashCode(encryption()); hashCode = 31 * hashCode + Objects.hashCode(appliedColorSpaceConversion()); return hashCode; } @Override public final boolean equals(Object obj) { return equalsBySdkFields(obj); } @Override public final boolean equalsBySdkFields(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof JobOutput)) { return false; } JobOutput other = (JobOutput) obj; return Objects.equals(id(), other.id()) && Objects.equals(key(), other.key()) && Objects.equals(thumbnailPattern(), other.thumbnailPattern()) && Objects.equals(thumbnailEncryption(), other.thumbnailEncryption()) && Objects.equals(rotate(), other.rotate()) && Objects.equals(presetId(), other.presetId()) && Objects.equals(segmentDuration(), other.segmentDuration()) && Objects.equals(status(), other.status()) && Objects.equals(statusDetail(), other.statusDetail()) && Objects.equals(duration(), other.duration()) && Objects.equals(width(), other.width()) && Objects.equals(height(), other.height()) && Objects.equals(frameRate(), other.frameRate()) && Objects.equals(fileSize(), other.fileSize()) && Objects.equals(durationMillis(), other.durationMillis()) && hasWatermarks() == other.hasWatermarks() && Objects.equals(watermarks(), other.watermarks()) && Objects.equals(albumArt(), other.albumArt()) && hasComposition() == other.hasComposition() && Objects.equals(composition(), other.composition()) && Objects.equals(captions(), other.captions()) && Objects.equals(encryption(), other.encryption()) && Objects.equals(appliedColorSpaceConversion(), other.appliedColorSpaceConversion()); } /** * 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. */ @Override public final String toString() { return ToString.builder("JobOutput").add("Id", id()).add("Key", key()).add("ThumbnailPattern", thumbnailPattern()) .add("ThumbnailEncryption", thumbnailEncryption()).add("Rotate", rotate()).add("PresetId", presetId()) .add("SegmentDuration", segmentDuration()).add("Status", status()).add("StatusDetail", statusDetail()) .add("Duration", duration()).add("Width", width()).add("Height", height()).add("FrameRate", frameRate()) .add("FileSize", fileSize()).add("DurationMillis", durationMillis()) .add("Watermarks", hasWatermarks() ? watermarks() : null).add("AlbumArt", albumArt()) .add("Composition", hasComposition() ? composition() : null).add("Captions", captions()) .add("Encryption", encryption()).add("AppliedColorSpaceConversion", appliedColorSpaceConversion()).build(); } public final Optional getValueForField(String fieldName, Class clazz) { switch (fieldName) { case "Id": return Optional.ofNullable(clazz.cast(id())); case "Key": return Optional.ofNullable(clazz.cast(key())); case "ThumbnailPattern": return Optional.ofNullable(clazz.cast(thumbnailPattern())); case "ThumbnailEncryption": return Optional.ofNullable(clazz.cast(thumbnailEncryption())); case "Rotate": return Optional.ofNullable(clazz.cast(rotate())); case "PresetId": return Optional.ofNullable(clazz.cast(presetId())); case "SegmentDuration": return Optional.ofNullable(clazz.cast(segmentDuration())); case "Status": return Optional.ofNullable(clazz.cast(status())); case "StatusDetail": return Optional.ofNullable(clazz.cast(statusDetail())); case "Duration": return Optional.ofNullable(clazz.cast(duration())); case "Width": return Optional.ofNullable(clazz.cast(width())); case "Height": return Optional.ofNullable(clazz.cast(height())); case "FrameRate": return Optional.ofNullable(clazz.cast(frameRate())); case "FileSize": return Optional.ofNullable(clazz.cast(fileSize())); case "DurationMillis": return Optional.ofNullable(clazz.cast(durationMillis())); case "Watermarks": return Optional.ofNullable(clazz.cast(watermarks())); case "AlbumArt": return Optional.ofNullable(clazz.cast(albumArt())); case "Composition": return Optional.ofNullable(clazz.cast(composition())); case "Captions": return Optional.ofNullable(clazz.cast(captions())); case "Encryption": return Optional.ofNullable(clazz.cast(encryption())); case "AppliedColorSpaceConversion": return Optional.ofNullable(clazz.cast(appliedColorSpaceConversion())); default: return Optional.empty(); } } @Override public final List> sdkFields() { return SDK_FIELDS; } private static Function getter(Function g) { return obj -> g.apply((JobOutput) obj); } private static BiConsumer setter(BiConsumer s) { return (obj, val) -> s.accept((Builder) obj, val); } public interface Builder extends SdkPojo, CopyableBuilder { /** *

* A sequential counter, starting with 1, that identifies an output among the outputs from the current job. In * the Output syntax, this value is always 1. *

* * @param id * A sequential counter, starting with 1, that identifies an output among the outputs from the current * job. In the Output syntax, this value is always 1. * @return Returns a reference to this object so that method calls can be chained together. */ Builder id(String id); /** *

* The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket * specified by the OutputBucket object in the pipeline that is specified by the pipeline ID. *

* * @param key * The name to assign to the transcoded file. Elastic Transcoder saves the file in the Amazon S3 bucket * specified by the OutputBucket object in the pipeline that is specified by the pipeline * ID. * @return Returns a reference to this object so that method calls can be chained together. */ Builder key(String key); /** *

* Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want Elastic * Transcoder to name the files. *

*

* If you don't want Elastic Transcoder to create thumbnails, specify "". *

*

* If you do want Elastic Transcoder to create thumbnails, specify the information that you want to include in * the file name for each thumbnail. You can specify the following values in any sequence: *

*
    *
  • *

    * {count} (Required): If you want to create thumbnails, you must include * {count} in the ThumbnailPattern object. Wherever you specify {count}, * Elastic Transcoder adds a five-digit sequence number (beginning with 00001) to thumbnail file names. * The number indicates where a given thumbnail appears in the sequence of thumbnails for a transcoded file. *

    * *

    * If you specify a literal value and/or {resolution} but you omit {count}, Elastic * Transcoder returns a validation error and does not create the job. *

    *
  • *
  • *

    * Literal values (Optional): You can specify literal values anywhere in the * ThumbnailPattern object. For example, you can include them as a file name prefix or as a * delimiter between {resolution} and {count}. *

    *
  • *
  • *

    * {resolution} (Optional): If you want Elastic Transcoder to include the resolution in the * file name, include {resolution} in the ThumbnailPattern object. *

    *
  • *
*

* When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or .png) that * appears in the preset that you specified in the PresetID value of CreateJobOutput. * Elastic Transcoder also appends the applicable file name extension. *

* * @param thumbnailPattern * Whether you want Elastic Transcoder to create thumbnails for your videos and, if so, how you want * Elastic Transcoder to name the files.

*

* If you don't want Elastic Transcoder to create thumbnails, specify "". *

*

* If you do want Elastic Transcoder to create thumbnails, specify the information that you want to * include in the file name for each thumbnail. You can specify the following values in any sequence: *

*
    *
  • *

    * {count} (Required): If you want to create thumbnails, you must include * {count} in the ThumbnailPattern object. Wherever you specify * {count}, Elastic Transcoder adds a five-digit sequence number (beginning with * 00001) to thumbnail file names. The number indicates where a given thumbnail appears in the * sequence of thumbnails for a transcoded file. *

    * *

    * If you specify a literal value and/or {resolution} but you omit {count}, * Elastic Transcoder returns a validation error and does not create the job. *

    *
  • *
  • *

    * Literal values (Optional): You can specify literal values anywhere in the * ThumbnailPattern object. For example, you can include them as a file name prefix or as a * delimiter between {resolution} and {count}. *

    *
  • *
  • *

    * {resolution} (Optional): If you want Elastic Transcoder to include the resolution * in the file name, include {resolution} in the ThumbnailPattern object. *

    *
  • *
*

* When creating thumbnails, Elastic Transcoder automatically saves the files in the format (.jpg or * .png) that appears in the preset that you specified in the PresetID value of * CreateJobOutput. Elastic Transcoder also appends the applicable file name extension. * @return Returns a reference to this object so that method calls can be chained together. */ Builder thumbnailPattern(String thumbnailPattern); /** *

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

* * @param thumbnailEncryption * The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail. * @return Returns a reference to this object so that method calls can be chained together. */ Builder thumbnailEncryption(Encryption thumbnailEncryption); /** *

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

* This is a convenience method that creates an instance of the {@link Encryption.Builder} avoiding the need to * create one manually via {@link Encryption#builder()}. * *

* When the {@link Consumer} completes, {@link Encryption.Builder#build()} is called immediately and its result * is passed to {@link #thumbnailEncryption(Encryption)}. * * @param thumbnailEncryption * a consumer that will call methods on {@link Encryption.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #thumbnailEncryption(Encryption) */ default Builder thumbnailEncryption(Consumer thumbnailEncryption) { return thumbnailEncryption(Encryption.builder().applyMutation(thumbnailEncryption).build()); } /** *

* The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to the * input. Enter one of the following values: *

*

* auto, 0, 90, 180, 270 *

*

* The value auto generally works only if the file that you're transcoding contains rotation * metadata. *

* * @param rotate * The number of degrees clockwise by which you want Elastic Transcoder to rotate the output relative to * the input. Enter one of the following values:

*

* auto, 0, 90, 180, 270 *

*

* The value auto generally works only if the file that you're transcoding contains rotation * metadata. * @return Returns a reference to this object so that method calls can be chained together. */ Builder rotate(String rotate); /** *

* The value of the Id object for the preset that you want to use for this job. The preset * determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. To use a * preset that you created, specify the preset ID that Elastic Transcoder returned in the response when you * created the preset. You can also use the Elastic Transcoder system presets, which you can get with * ListPresets. *

* * @param presetId * The value of the Id object for the preset that you want to use for this job. The preset * determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding. To * use a preset that you created, specify the preset ID that Elastic Transcoder returned in the response * when you created the preset. You can also use the Elastic Transcoder system presets, which you can get * with ListPresets. * @return Returns a reference to this object so that method calls can be chained together. */ Builder presetId(String presetId); /** * *

* (Outputs in Fragmented MP4 or MPEG-TS format only. *

*
*

* If you specify a preset in PresetId for which the value of Container is * fmp4 (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the target * maximum duration of each segment in seconds. For HLSv3 format playlists, each media segment is * stored in a separate .ts file. For HLSv4, MPEG-DASH, and * Smooth playlists, all media segments for an output are stored in a single file. Each segment is * approximately the length of the SegmentDuration, though individual segments might be shorter or * longer. *

*

* The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by * SegmentDuration, the duration of the last segment is the remainder of total * length/SegmentDuration. *

*

* Elastic Transcoder creates an output-specific playlist for each output HLS output that you * specify in OutputKeys. To add an output to the master playlist for this job, include it in the * OutputKeys of the associated playlist. *

* * @param segmentDuration *

* (Outputs in Fragmented MP4 or MPEG-TS format only. *

* *

* If you specify a preset in PresetId for which the value of Container is * fmp4 (Fragmented MP4) or ts (MPEG-TS), SegmentDuration is the * target maximum duration of each segment in seconds. For HLSv3 format playlists, each * media segment is stored in a separate .ts file. For HLSv4, * MPEG-DASH, and Smooth playlists, all media segments for an output are stored * in a single file. Each segment is approximately the length of the SegmentDuration, though * individual segments might be shorter or longer. *

*

* The range of valid values is 1 to 60 seconds. If the duration of the video is not evenly divisible by * SegmentDuration, the duration of the last segment is the remainder of total * length/SegmentDuration. *

*

* Elastic Transcoder creates an output-specific playlist for each output HLS output that * you specify in OutputKeys. To add an output to the master playlist for this job, include it in the * OutputKeys of the associated playlist. * @return Returns a reference to this object so that method calls can be chained together. */ Builder segmentDuration(String segmentDuration); /** *

* The status of one output in a job. If you specified only one output for the job, Outputs:Status * is always the same as Job:Status. If you specified more than one output: *

*
    *
  • *

    * Job:Status and Outputs:Status for all of the outputs is Submitted until Elastic * Transcoder starts to process the first output. *

    *
  • *
  • *

    * When Elastic Transcoder starts to process the first output, Outputs:Status for that output and * Job:Status both change to Progressing. For each output, the value of Outputs:Status * remains Submitted until Elastic Transcoder starts to process the output. *

    *
  • *
  • *

    * Job:Status remains Progressing until all of the outputs reach a terminal status, either Complete or Error. *

    *
  • *
  • *

    * When all of the outputs reach a terminal status, Job:Status changes to Complete only if * Outputs:Status for all of the outputs is Complete. If Outputs:Status * for one or more outputs is Error, the terminal status for Job:Status is also * Error. *

    *
  • *
*

* The value of Status is one of the following: Submitted, Progressing, * Complete, Canceled, or Error. *

* * @param status * The status of one output in a job. If you specified only one output for the job, * Outputs:Status is always the same as Job:Status. If you specified more than * one output:

*
    *
  • *

    * Job:Status and Outputs:Status for all of the outputs is Submitted until * Elastic Transcoder starts to process the first output. *

    *
  • *
  • *

    * When Elastic Transcoder starts to process the first output, Outputs:Status for that * output and Job:Status both change to Progressing. For each output, the value of * Outputs:Status remains Submitted until Elastic Transcoder starts to process the output. *

    *
  • *
  • *

    * Job:Status remains Progressing until all of the outputs reach a terminal status, either Complete or * Error. *

    *
  • *
  • *

    * When all of the outputs reach a terminal status, Job:Status changes to Complete only if * Outputs:Status for all of the outputs is Complete. If * Outputs:Status for one or more outputs is Error, the terminal status for * Job:Status is also Error. *

    *
  • *
*

* The value of Status is one of the following: Submitted, * Progressing, Complete, Canceled, or Error. * @return Returns a reference to this object so that method calls can be chained together. */ Builder status(String status); /** *

* Information that further explains Status. *

* * @param statusDetail * Information that further explains Status. * @return Returns a reference to this object so that method calls can be chained together. */ Builder statusDetail(String statusDetail); /** *

* Duration of the output file, in seconds. *

* * @param duration * Duration of the output file, in seconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder duration(Long duration); /** *

* Specifies the width of the output file in pixels. *

* * @param width * Specifies the width of the output file in pixels. * @return Returns a reference to this object so that method calls can be chained together. */ Builder width(Integer width); /** *

* Height of the output file, in pixels. *

* * @param height * Height of the output file, in pixels. * @return Returns a reference to this object so that method calls can be chained together. */ Builder height(Integer height); /** *

* Frame rate of the output file, in frames per second. *

* * @param frameRate * Frame rate of the output file, in frames per second. * @return Returns a reference to this object so that method calls can be chained together. */ Builder frameRate(String frameRate); /** *

* File size of the output file, in bytes. *

* * @param fileSize * File size of the output file, in bytes. * @return Returns a reference to this object so that method calls can be chained together. */ Builder fileSize(Long fileSize); /** *

* Duration of the output file, in milliseconds. *

* * @param durationMillis * Duration of the output file, in milliseconds. * @return Returns a reference to this object so that method calls can be chained together. */ Builder durationMillis(Long durationMillis); /** *

* Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You * can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset * that you specify in Preset for the current output. *

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the first * watermark in the list is added to the output video first, the second watermark in the list is added next, and * so on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same * location, the second watermark that you add covers the first one, the third one covers the second, and the * fourth one covers the third. *

* * @param watermarks * Information about the watermarks that you want Elastic Transcoder to add to the video during * transcoding. You can specify up to four watermarks for each output. Settings for each watermark must * be defined in the preset that you specify in Preset for the current output.

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the * first watermark in the list is added to the output video first, the second watermark in the list is * added next, and so on. As a result, if the settings in a preset cause Elastic Transcoder to place all * watermarks in the same location, the second watermark that you add covers the first one, the third one * covers the second, and the fourth one covers the third. * @return Returns a reference to this object so that method calls can be chained together. */ Builder watermarks(Collection watermarks); /** *

* Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You * can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset * that you specify in Preset for the current output. *

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the first * watermark in the list is added to the output video first, the second watermark in the list is added next, and * so on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same * location, the second watermark that you add covers the first one, the third one covers the second, and the * fourth one covers the third. *

* * @param watermarks * Information about the watermarks that you want Elastic Transcoder to add to the video during * transcoding. You can specify up to four watermarks for each output. Settings for each watermark must * be defined in the preset that you specify in Preset for the current output.

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the * first watermark in the list is added to the output video first, the second watermark in the list is * added next, and so on. As a result, if the settings in a preset cause Elastic Transcoder to place all * watermarks in the same location, the second watermark that you add covers the first one, the third one * covers the second, and the fourth one covers the third. * @return Returns a reference to this object so that method calls can be chained together. */ Builder watermarks(JobWatermark... watermarks); /** *

* Information about the watermarks that you want Elastic Transcoder to add to the video during transcoding. You * can specify up to four watermarks for each output. Settings for each watermark must be defined in the preset * that you specify in Preset for the current output. *

*

* Watermarks are added to the output video in the sequence in which you list them in the job output—the first * watermark in the list is added to the output video first, the second watermark in the list is added next, and * so on. As a result, if the settings in a preset cause Elastic Transcoder to place all watermarks in the same * location, the second watermark that you add covers the first one, the third one covers the second, and the * fourth one covers the third. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.elastictranscoder.model.JobWatermark.Builder} avoiding the need to * create one manually via * {@link software.amazon.awssdk.services.elastictranscoder.model.JobWatermark#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.elastictranscoder.model.JobWatermark.Builder#build()} is called * immediately and its result is passed to {@link #watermarks(List)}. * * @param watermarks * a consumer that will call methods on * {@link software.amazon.awssdk.services.elastictranscoder.model.JobWatermark.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #watermarks(java.util.Collection) */ Builder watermarks(Consumer... watermarks); /** *

* The album art to be associated with the output file, if any. *

* * @param albumArt * The album art to be associated with the output file, if any. * @return Returns a reference to this object so that method calls can be chained together. */ Builder albumArt(JobAlbumArt albumArt); /** *

* The album art to be associated with the output file, if any. *

* This is a convenience method that creates an instance of the {@link JobAlbumArt.Builder} avoiding the need to * create one manually via {@link JobAlbumArt#builder()}. * *

* When the {@link Consumer} completes, {@link JobAlbumArt.Builder#build()} is called immediately and its result * is passed to {@link #albumArt(JobAlbumArt)}. * * @param albumArt * a consumer that will call methods on {@link JobAlbumArt.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #albumArt(JobAlbumArt) */ default Builder albumArt(Consumer albumArt) { return albumArt(JobAlbumArt.builder().applyMutation(albumArt).build()); } /** *

* You can create an output file that contains an excerpt from the input file. This excerpt, called a clip, can * come from the beginning, middle, or end of the file. The Composition object contains settings for the clips * that make up an output file. For the current release, you can only specify settings for a single clip per * output file. The Composition object cannot be null. *

* * @param composition * You can create an output file that contains an excerpt from the input file. This excerpt, called a * clip, can come from the beginning, middle, or end of the file. The Composition object contains * settings for the clips that make up an output file. For the current release, you can only specify * settings for a single clip per output file. The Composition object cannot be null. * @return Returns a reference to this object so that method calls can be chained together. * @deprecated */ @Deprecated Builder composition(Collection composition); /** *

* You can create an output file that contains an excerpt from the input file. This excerpt, called a clip, can * come from the beginning, middle, or end of the file. The Composition object contains settings for the clips * that make up an output file. For the current release, you can only specify settings for a single clip per * output file. The Composition object cannot be null. *

* * @param composition * You can create an output file that contains an excerpt from the input file. This excerpt, called a * clip, can come from the beginning, middle, or end of the file. The Composition object contains * settings for the clips that make up an output file. For the current release, you can only specify * settings for a single clip per output file. The Composition object cannot be null. * @return Returns a reference to this object so that method calls can be chained together. * @deprecated */ @Deprecated Builder composition(Clip... composition); /** *

* You can create an output file that contains an excerpt from the input file. This excerpt, called a clip, can * come from the beginning, middle, or end of the file. The Composition object contains settings for the clips * that make up an output file. For the current release, you can only specify settings for a single clip per * output file. The Composition object cannot be null. *

* This is a convenience method that creates an instance of the * {@link software.amazon.awssdk.services.elastictranscoder.model.Clip.Builder} avoiding the need to create one * manually via {@link software.amazon.awssdk.services.elastictranscoder.model.Clip#builder()}. * *

* When the {@link Consumer} completes, * {@link software.amazon.awssdk.services.elastictranscoder.model.Clip.Builder#build()} is called immediately * and its result is passed to {@link #composition(List)}. * * @param composition * a consumer that will call methods on * {@link software.amazon.awssdk.services.elastictranscoder.model.Clip.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #composition(java.util.Collection) * @deprecated */ @Deprecated Builder composition(Consumer... composition); /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve * text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* * @param captions * You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. * All captions must be in UTF-8. Elastic Transcoder supports two types of captions:

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic * Transcoder supports only one embedded caption per language, to a maximum of 300 embedded captions per * file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. * Sidecar captions require a player that is capable of understanding the relationship between the video * file and the sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a * maximum of 20 sidecar captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, * scc, smpt, srt, ttml (first div element only), and * webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, * and webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a * valid input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not * preserve text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through * existing captions unchanged, set the MergePolicy to MergeRetain, and pass in * a null CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia * pages. * @return Returns a reference to this object so that method calls can be chained together. */ Builder captions(Captions captions); /** *

* You can configure Elastic Transcoder to transcode captions, or subtitles, from one format to another. All * captions must be in UTF-8. Elastic Transcoder supports two types of captions: *

*
    *
  • *

    * Embedded: Embedded captions are included in the same file as the audio and video. Elastic Transcoder * supports only one embedded caption per language, to a maximum of 300 embedded captions per file. *

    *

    * Valid input values include: CEA-608 (EIA-608, first non-empty channel only), * CEA-708 (EIA-708, first non-empty channel only), and mov-text *

    *

    * Valid outputs include: mov-text *

    *

    * Elastic Transcoder supports a maximum of one embedded format per output. *

    *
  • *
  • *

    * Sidecar: Sidecar captions are kept in a separate metadata file from the audio and video data. Sidecar * captions require a player that is capable of understanding the relationship between the video file and the * sidecar file. Elastic Transcoder supports only one sidecar caption per language, to a maximum of 20 sidecar * captions per file. *

    *

    * Valid input values include: dfxp (first div element only), ebu-tt, scc, smpt, srt, ttml (first div element only), and webvtt *

    *

    * Valid outputs include: dfxp (first div element only), scc, srt, and * webvtt. *

    *
  • *
*

* If you want ttml or smpte-tt compatible captions, specify dfxp as your output format. *

*

* Elastic Transcoder does not support OCR (Optical Character Recognition), does not accept pictures as a valid * input for captions, and is not available for audio-only transcoding. Elastic Transcoder does not preserve * text formatting (for example, italics) during the transcoding process. *

*

* To remove captions or leave the captions empty, set Captions to null. To pass through existing * captions unchanged, set the MergePolicy to MergeRetain, and pass in a null * CaptionSources array. *

*

* For more information on embedded files, see the Subtitles Wikipedia page. *

*

* For more information on sidecar files, see the Extensible Metadata Platform and Sidecar file Wikipedia pages. *

* This is a convenience method that creates an instance of the {@link Captions.Builder} avoiding the need to * create one manually via {@link Captions#builder()}. * *

* When the {@link Consumer} completes, {@link Captions.Builder#build()} is called immediately and its result is * passed to {@link #captions(Captions)}. * * @param captions * a consumer that will call methods on {@link Captions.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #captions(Captions) */ default Builder captions(Consumer captions) { return captions(Captions.builder().applyMutation(captions).build()); } /** *

* The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you * choose to use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic * Transcoder writes an unencrypted file to your Amazon S3 bucket. *

* * @param encryption * The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If * you choose to use encryption, you must specify a mode to use. If you choose not to use encryption, * Elastic Transcoder writes an unencrypted file to your Amazon S3 bucket. * @return Returns a reference to this object so that method calls can be chained together. */ Builder encryption(Encryption encryption); /** *

* The encryption settings, if any, that you want Elastic Transcoder to apply to your output files. If you * choose to use encryption, you must specify a mode to use. If you choose not to use encryption, Elastic * Transcoder writes an unencrypted file to your Amazon S3 bucket. *

* This is a convenience method that creates an instance of the {@link Encryption.Builder} avoiding the need to * create one manually via {@link Encryption#builder()}. * *

* When the {@link Consumer} completes, {@link Encryption.Builder#build()} is called immediately and its result * is passed to {@link #encryption(Encryption)}. * * @param encryption * a consumer that will call methods on {@link Encryption.Builder} * @return Returns a reference to this object so that method calls can be chained together. * @see #encryption(Encryption) */ default Builder encryption(Consumer encryption) { return encryption(Encryption.builder().applyMutation(encryption).build()); } /** *

* If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode the output * file, the AppliedColorSpaceConversion parameter shows the conversion used. If no * ColorSpaceConversionMode was defined in the preset, this parameter is not be included in the job * response. *

* * @param appliedColorSpaceConversion * If Elastic Transcoder used a preset with a ColorSpaceConversionMode to transcode the * output file, the AppliedColorSpaceConversion parameter shows the conversion used. If no * ColorSpaceConversionMode was defined in the preset, this parameter is not be included in * the job response. * @return Returns a reference to this object so that method calls can be chained together. */ Builder appliedColorSpaceConversion(String appliedColorSpaceConversion); } static final class BuilderImpl implements Builder { private String id; private String key; private String thumbnailPattern; private Encryption thumbnailEncryption; private String rotate; private String presetId; private String segmentDuration; private String status; private String statusDetail; private Long duration; private Integer width; private Integer height; private String frameRate; private Long fileSize; private Long durationMillis; private List watermarks = DefaultSdkAutoConstructList.getInstance(); private JobAlbumArt albumArt; private List composition = DefaultSdkAutoConstructList.getInstance(); private Captions captions; private Encryption encryption; private String appliedColorSpaceConversion; private BuilderImpl() { } private BuilderImpl(JobOutput model) { id(model.id); key(model.key); thumbnailPattern(model.thumbnailPattern); thumbnailEncryption(model.thumbnailEncryption); rotate(model.rotate); presetId(model.presetId); segmentDuration(model.segmentDuration); status(model.status); statusDetail(model.statusDetail); duration(model.duration); width(model.width); height(model.height); frameRate(model.frameRate); fileSize(model.fileSize); durationMillis(model.durationMillis); watermarks(model.watermarks); albumArt(model.albumArt); composition(model.composition); captions(model.captions); encryption(model.encryption); appliedColorSpaceConversion(model.appliedColorSpaceConversion); } public final String getId() { return id; } public final void setId(String id) { this.id = id; } @Override public final Builder id(String id) { this.id = id; return this; } public final String getKey() { return key; } public final void setKey(String key) { this.key = key; } @Override public final Builder key(String key) { this.key = key; return this; } public final String getThumbnailPattern() { return thumbnailPattern; } public final void setThumbnailPattern(String thumbnailPattern) { this.thumbnailPattern = thumbnailPattern; } @Override public final Builder thumbnailPattern(String thumbnailPattern) { this.thumbnailPattern = thumbnailPattern; return this; } public final Encryption.Builder getThumbnailEncryption() { return thumbnailEncryption != null ? thumbnailEncryption.toBuilder() : null; } public final void setThumbnailEncryption(Encryption.BuilderImpl thumbnailEncryption) { this.thumbnailEncryption = thumbnailEncryption != null ? thumbnailEncryption.build() : null; } @Override public final Builder thumbnailEncryption(Encryption thumbnailEncryption) { this.thumbnailEncryption = thumbnailEncryption; return this; } public final String getRotate() { return rotate; } public final void setRotate(String rotate) { this.rotate = rotate; } @Override public final Builder rotate(String rotate) { this.rotate = rotate; return this; } public final String getPresetId() { return presetId; } public final void setPresetId(String presetId) { this.presetId = presetId; } @Override public final Builder presetId(String presetId) { this.presetId = presetId; return this; } public final String getSegmentDuration() { return segmentDuration; } public final void setSegmentDuration(String segmentDuration) { this.segmentDuration = segmentDuration; } @Override public final Builder segmentDuration(String segmentDuration) { this.segmentDuration = segmentDuration; return this; } public final String getStatus() { return status; } public final void setStatus(String status) { this.status = status; } @Override public final Builder status(String status) { this.status = status; return this; } public final String getStatusDetail() { return statusDetail; } public final void setStatusDetail(String statusDetail) { this.statusDetail = statusDetail; } @Override public final Builder statusDetail(String statusDetail) { this.statusDetail = statusDetail; return this; } public final Long getDuration() { return duration; } public final void setDuration(Long duration) { this.duration = duration; } @Override public final Builder duration(Long duration) { this.duration = duration; return this; } public final Integer getWidth() { return width; } public final void setWidth(Integer width) { this.width = width; } @Override public final Builder width(Integer width) { this.width = width; return this; } public final Integer getHeight() { return height; } public final void setHeight(Integer height) { this.height = height; } @Override public final Builder height(Integer height) { this.height = height; return this; } public final String getFrameRate() { return frameRate; } public final void setFrameRate(String frameRate) { this.frameRate = frameRate; } @Override public final Builder frameRate(String frameRate) { this.frameRate = frameRate; return this; } public final Long getFileSize() { return fileSize; } public final void setFileSize(Long fileSize) { this.fileSize = fileSize; } @Override public final Builder fileSize(Long fileSize) { this.fileSize = fileSize; return this; } public final Long getDurationMillis() { return durationMillis; } public final void setDurationMillis(Long durationMillis) { this.durationMillis = durationMillis; } @Override public final Builder durationMillis(Long durationMillis) { this.durationMillis = durationMillis; return this; } public final List getWatermarks() { List result = JobWatermarksCopier.copyToBuilder(this.watermarks); if (result instanceof SdkAutoConstructList) { return null; } return result; } public final void setWatermarks(Collection watermarks) { this.watermarks = JobWatermarksCopier.copyFromBuilder(watermarks); } @Override public final Builder watermarks(Collection watermarks) { this.watermarks = JobWatermarksCopier.copy(watermarks); return this; } @Override @SafeVarargs public final Builder watermarks(JobWatermark... watermarks) { watermarks(Arrays.asList(watermarks)); return this; } @Override @SafeVarargs public final Builder watermarks(Consumer... watermarks) { watermarks(Stream.of(watermarks).map(c -> JobWatermark.builder().applyMutation(c).build()) .collect(Collectors.toList())); return this; } public final JobAlbumArt.Builder getAlbumArt() { return albumArt != null ? albumArt.toBuilder() : null; } public final void setAlbumArt(JobAlbumArt.BuilderImpl albumArt) { this.albumArt = albumArt != null ? albumArt.build() : null; } @Override public final Builder albumArt(JobAlbumArt albumArt) { this.albumArt = albumArt; return this; } @Deprecated public final List getComposition() { List result = CompositionCopier.copyToBuilder(this.composition); if (result instanceof SdkAutoConstructList) { return null; } return result; } @Deprecated public final void setComposition(Collection composition) { this.composition = CompositionCopier.copyFromBuilder(composition); } @Override @Deprecated public final Builder composition(Collection composition) { this.composition = CompositionCopier.copy(composition); return this; } @Override @SafeVarargs @Deprecated public final Builder composition(Clip... composition) { composition(Arrays.asList(composition)); return this; } @Override @SafeVarargs @Deprecated public final Builder composition(Consumer... composition) { composition(Stream.of(composition).map(c -> Clip.builder().applyMutation(c).build()).collect(Collectors.toList())); return this; } public final Captions.Builder getCaptions() { return captions != null ? captions.toBuilder() : null; } public final void setCaptions(Captions.BuilderImpl captions) { this.captions = captions != null ? captions.build() : null; } @Override public final Builder captions(Captions captions) { this.captions = captions; return this; } public final Encryption.Builder getEncryption() { return encryption != null ? encryption.toBuilder() : null; } public final void setEncryption(Encryption.BuilderImpl encryption) { this.encryption = encryption != null ? encryption.build() : null; } @Override public final Builder encryption(Encryption encryption) { this.encryption = encryption; return this; } public final String getAppliedColorSpaceConversion() { return appliedColorSpaceConversion; } public final void setAppliedColorSpaceConversion(String appliedColorSpaceConversion) { this.appliedColorSpaceConversion = appliedColorSpaceConversion; } @Override public final Builder appliedColorSpaceConversion(String appliedColorSpaceConversion) { this.appliedColorSpaceConversion = appliedColorSpaceConversion; return this; } @Override public JobOutput build() { return new JobOutput(this); } @Override public List> sdkFields() { return SDK_FIELDS; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy