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

commonMain.aws.sdk.kotlin.services.elastictranscoder.model.CreateJobOutput.kt Maven / Gradle / Ivy

There is a newer version: 1.3.37
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.elastictranscoder.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The `CreateJobOutput` structure.
 */
public class CreateJobOutput private constructor(builder: Builder) {
    /**
     * Information about the album art that you want Elastic Transcoder to add to the file during transcoding. You can specify up to twenty album artworks for each output. Settings for each artwork must be defined in the job for the current output.
     */
    public val albumArt: aws.sdk.kotlin.services.elastictranscoder.model.JobAlbumArt? = builder.albumArt
    /**
     * 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 val captions: aws.sdk.kotlin.services.elastictranscoder.model.Captions? = builder.captions
    /**
     * 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("No longer recommended for use. See AWS API documentation for more details.")
    public val composition: List? = builder.composition
    /**
     * You can specify encryption settings for any output files that you want to use for a transcoding job. This includes the output file and any watermarks, thumbnails, album art, or captions that you want to use. You must specify encryption settings for each file individually.
     */
    public val encryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = builder.encryption
    /**
     * 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. If a file with the specified name already exists in the output bucket, the job fails.
     */
    public val key: kotlin.String? = builder.key
    /**
     * The `Id` of the preset to use for this job. The preset determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding.
     */
    public val presetId: kotlin.String? = builder.presetId
    /**
     * 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 val rotate: kotlin.String? = builder.rotate
    /**
     * (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` 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 val segmentDuration: kotlin.String? = builder.segmentDuration
    /**
     * The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail.
     */
    public val thumbnailEncryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = builder.thumbnailEncryption
    /**
     * 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 val thumbnailPattern: kotlin.String? = builder.thumbnailPattern
    /**
     * 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 for the current output.
     */
    public val watermarks: List? = builder.watermarks

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.elastictranscoder.model.CreateJobOutput = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateJobOutput(")
        append("albumArt=$albumArt,")
        append("captions=$captions,")
        append("composition=$composition,")
        append("encryption=$encryption,")
        append("key=$key,")
        append("presetId=$presetId,")
        append("rotate=$rotate,")
        append("segmentDuration=$segmentDuration,")
        append("thumbnailEncryption=$thumbnailEncryption,")
        append("thumbnailPattern=$thumbnailPattern,")
        append("watermarks=$watermarks")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = albumArt?.hashCode() ?: 0
        result = 31 * result + (captions?.hashCode() ?: 0)
        result = 31 * result + (composition?.hashCode() ?: 0)
        result = 31 * result + (encryption?.hashCode() ?: 0)
        result = 31 * result + (key?.hashCode() ?: 0)
        result = 31 * result + (presetId?.hashCode() ?: 0)
        result = 31 * result + (rotate?.hashCode() ?: 0)
        result = 31 * result + (segmentDuration?.hashCode() ?: 0)
        result = 31 * result + (thumbnailEncryption?.hashCode() ?: 0)
        result = 31 * result + (thumbnailPattern?.hashCode() ?: 0)
        result = 31 * result + (watermarks?.hashCode() ?: 0)
        return result
    }

    override fun equals(other: kotlin.Any?): kotlin.Boolean {
        if (this === other) return true
        if (other == null || this::class != other::class) return false

        other as CreateJobOutput

        if (albumArt != other.albumArt) return false
        if (captions != other.captions) return false
        if (composition != other.composition) return false
        if (encryption != other.encryption) return false
        if (key != other.key) return false
        if (presetId != other.presetId) return false
        if (rotate != other.rotate) return false
        if (segmentDuration != other.segmentDuration) return false
        if (thumbnailEncryption != other.thumbnailEncryption) return false
        if (thumbnailPattern != other.thumbnailPattern) return false
        if (watermarks != other.watermarks) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.elastictranscoder.model.CreateJobOutput = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * Information about the album art that you want Elastic Transcoder to add to the file during transcoding. You can specify up to twenty album artworks for each output. Settings for each artwork must be defined in the job for the current output.
         */
        public var albumArt: aws.sdk.kotlin.services.elastictranscoder.model.JobAlbumArt? = null
        /**
         * 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 var captions: aws.sdk.kotlin.services.elastictranscoder.model.Captions? = null
        /**
         * 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("No longer recommended for use. See AWS API documentation for more details.")
        public var composition: List? = null
        /**
         * You can specify encryption settings for any output files that you want to use for a transcoding job. This includes the output file and any watermarks, thumbnails, album art, or captions that you want to use. You must specify encryption settings for each file individually.
         */
        public var encryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = null
        /**
         * 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. If a file with the specified name already exists in the output bucket, the job fails.
         */
        public var key: kotlin.String? = null
        /**
         * The `Id` of the preset to use for this job. The preset determines the audio, video, and thumbnail settings that Elastic Transcoder uses for transcoding.
         */
        public var presetId: kotlin.String? = null
        /**
         * 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 var rotate: kotlin.String? = null
        /**
         * (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` 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 var segmentDuration: kotlin.String? = null
        /**
         * The encryption settings, if any, that you want Elastic Transcoder to apply to your thumbnail.
         */
        public var thumbnailEncryption: aws.sdk.kotlin.services.elastictranscoder.model.Encryption? = null
        /**
         * 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 var thumbnailPattern: kotlin.String? = null
        /**
         * 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 for the current output.
         */
        public var watermarks: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.elastictranscoder.model.CreateJobOutput) : this() {
            this.albumArt = x.albumArt
            this.captions = x.captions
            this.composition = x.composition
            this.encryption = x.encryption
            this.key = x.key
            this.presetId = x.presetId
            this.rotate = x.rotate
            this.segmentDuration = x.segmentDuration
            this.thumbnailEncryption = x.thumbnailEncryption
            this.thumbnailPattern = x.thumbnailPattern
            this.watermarks = x.watermarks
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.elastictranscoder.model.CreateJobOutput = CreateJobOutput(this)

        /**
         * construct an [aws.sdk.kotlin.services.elastictranscoder.model.JobAlbumArt] inside the given [block]
         */
        public fun albumArt(block: aws.sdk.kotlin.services.elastictranscoder.model.JobAlbumArt.Builder.() -> kotlin.Unit) {
            this.albumArt = aws.sdk.kotlin.services.elastictranscoder.model.JobAlbumArt.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.elastictranscoder.model.Captions] inside the given [block]
         */
        public fun captions(block: aws.sdk.kotlin.services.elastictranscoder.model.Captions.Builder.() -> kotlin.Unit) {
            this.captions = aws.sdk.kotlin.services.elastictranscoder.model.Captions.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.elastictranscoder.model.Encryption] inside the given [block]
         */
        public fun encryption(block: aws.sdk.kotlin.services.elastictranscoder.model.Encryption.Builder.() -> kotlin.Unit) {
            this.encryption = aws.sdk.kotlin.services.elastictranscoder.model.Encryption.invoke(block)
        }

        /**
         * construct an [aws.sdk.kotlin.services.elastictranscoder.model.Encryption] inside the given [block]
         */
        public fun thumbnailEncryption(block: aws.sdk.kotlin.services.elastictranscoder.model.Encryption.Builder.() -> kotlin.Unit) {
            this.thumbnailEncryption = aws.sdk.kotlin.services.elastictranscoder.model.Encryption.invoke(block)
        }

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy