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

commonMain.aws.sdk.kotlin.services.mediaconvert.model.InputTemplate.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mediaconvert.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * Specified video input in a template.
 */
public class InputTemplate private constructor(builder: Builder) {
    /**
     * Use to remove noise, blocking, blurriness, or ringing from your input as a pre-filter step before encoding. The Advanced input filter removes more types of compression artifacts and is an improvement when compared to basic Deblock and Denoise filters. To remove video compression artifacts from your input and improve the video quality: Choose Enabled. Additionally, this filter can help increase the video quality of your output relative to its bitrate, since noisy inputs are more complex and require more bits to encode. To help restore loss of detail after applying the filter, you can optionally add texture or sharpening as an additional step. Jobs that use this feature incur pro-tier pricing. To not apply advanced input filtering: Choose Disabled. Note that you can still apply basic filtering with Deblock and Denoise.
     */
    public val advancedInputFilter: aws.sdk.kotlin.services.mediaconvert.model.AdvancedInputFilter? = builder.advancedInputFilter
    /**
     * Optional settings for Advanced input filter when you set Advanced input filter to Enabled.
     */
    public val advancedInputFilterSettings: aws.sdk.kotlin.services.mediaconvert.model.AdvancedInputFilterSettings? = builder.advancedInputFilterSettings
    /**
     * Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab. Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
     */
    public val audioSelectorGroups: Map? = builder.audioSelectorGroups
    /**
     * Use Audio selectors to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
     */
    public val audioSelectors: Map? = builder.audioSelectors
    /**
     * Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 100 captions selectors per input.
     */
    public val captionSelectors: Map? = builder.captionSelectors
    /**
     * Use Cropping selection to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection.
     */
    public val crop: aws.sdk.kotlin.services.mediaconvert.model.Rectangle? = builder.crop
    /**
     * Enable Deblock to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
     */
    public val deblockFilter: aws.sdk.kotlin.services.mediaconvert.model.InputDeblockFilter? = builder.deblockFilter
    /**
     * Enable Denoise to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
     */
    public val denoiseFilter: aws.sdk.kotlin.services.mediaconvert.model.InputDenoiseFilter? = builder.denoiseFilter
    /**
     * Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
     */
    public val dolbyVisionMetadataXml: kotlin.String? = builder.dolbyVisionMetadataXml
    /**
     * Specify whether to apply input filtering to improve the video quality of your input. To apply filtering depending on your input type and quality: Choose Auto. To apply no filtering: Choose Disable. To apply filtering regardless of your input type and quality: Choose Force. When you do, you must also specify a value for Filter strength.
     */
    public val filterEnable: aws.sdk.kotlin.services.mediaconvert.model.InputFilterEnable? = builder.filterEnable
    /**
     * Specify the strength of the input filter. To apply an automatic amount of filtering based the compression artifacts measured in your input: We recommend that you leave Filter strength blank and set Filter enable to Auto. To manually apply filtering: Enter a value from 1 to 5, where 1 is the least amount of filtering and 5 is the most. The value that you enter applies to the strength of the Deblock or Denoise filters, or to the strength of the Advanced input filter.
     */
    public val filterStrength: kotlin.Int? = builder.filterStrength
    /**
     * Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
     */
    public val imageInserter: aws.sdk.kotlin.services.mediaconvert.model.ImageInserter? = builder.imageInserter
    /**
     * Contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
     */
    public val inputClippings: List? = builder.inputClippings
    /**
     * When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto. Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
     */
    public val inputScanType: aws.sdk.kotlin.services.mediaconvert.model.InputScanType? = builder.inputScanType
    /**
     * Use Selection placement to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement. If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD to Respond. If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior.
     */
    public val position: aws.sdk.kotlin.services.mediaconvert.model.Rectangle? = builder.position
    /**
     * Use Program to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
     */
    public val programNumber: kotlin.Int? = builder.programNumber
    /**
     * Set PSI control for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
     */
    public val psiControl: aws.sdk.kotlin.services.mediaconvert.model.InputPsiControl? = builder.psiControl
    /**
     * Use this Timecode source setting, located under the input settings, to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded to use the timecodes in your input video. Choose Start at zero to start the first frame at zero. Choose Specified start to start the first frame at the timecode that you specify in the setting Start timecode. If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
     */
    public val timecodeSource: aws.sdk.kotlin.services.mediaconvert.model.InputTimecodeSource? = builder.timecodeSource
    /**
     * Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings, to Specified start. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
     */
    public val timecodeStart: kotlin.String? = builder.timecodeStart
    /**
     * Contains an array of video overlays.
     */
    public val videoOverlays: List? = builder.videoOverlays
    /**
     * Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
     */
    public val videoSelector: aws.sdk.kotlin.services.mediaconvert.model.VideoSelector? = builder.videoSelector

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

    override fun toString(): kotlin.String = buildString {
        append("InputTemplate(")
        append("advancedInputFilter=$advancedInputFilter,")
        append("advancedInputFilterSettings=$advancedInputFilterSettings,")
        append("audioSelectorGroups=$audioSelectorGroups,")
        append("audioSelectors=$audioSelectors,")
        append("captionSelectors=$captionSelectors,")
        append("crop=$crop,")
        append("deblockFilter=$deblockFilter,")
        append("denoiseFilter=$denoiseFilter,")
        append("dolbyVisionMetadataXml=$dolbyVisionMetadataXml,")
        append("filterEnable=$filterEnable,")
        append("filterStrength=$filterStrength,")
        append("imageInserter=$imageInserter,")
        append("inputClippings=$inputClippings,")
        append("inputScanType=$inputScanType,")
        append("position=$position,")
        append("programNumber=$programNumber,")
        append("psiControl=$psiControl,")
        append("timecodeSource=$timecodeSource,")
        append("timecodeStart=$timecodeStart,")
        append("videoOverlays=$videoOverlays,")
        append("videoSelector=$videoSelector")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = advancedInputFilter?.hashCode() ?: 0
        result = 31 * result + (advancedInputFilterSettings?.hashCode() ?: 0)
        result = 31 * result + (audioSelectorGroups?.hashCode() ?: 0)
        result = 31 * result + (audioSelectors?.hashCode() ?: 0)
        result = 31 * result + (captionSelectors?.hashCode() ?: 0)
        result = 31 * result + (crop?.hashCode() ?: 0)
        result = 31 * result + (deblockFilter?.hashCode() ?: 0)
        result = 31 * result + (denoiseFilter?.hashCode() ?: 0)
        result = 31 * result + (dolbyVisionMetadataXml?.hashCode() ?: 0)
        result = 31 * result + (filterEnable?.hashCode() ?: 0)
        result = 31 * result + (filterStrength ?: 0)
        result = 31 * result + (imageInserter?.hashCode() ?: 0)
        result = 31 * result + (inputClippings?.hashCode() ?: 0)
        result = 31 * result + (inputScanType?.hashCode() ?: 0)
        result = 31 * result + (position?.hashCode() ?: 0)
        result = 31 * result + (programNumber ?: 0)
        result = 31 * result + (psiControl?.hashCode() ?: 0)
        result = 31 * result + (timecodeSource?.hashCode() ?: 0)
        result = 31 * result + (timecodeStart?.hashCode() ?: 0)
        result = 31 * result + (videoOverlays?.hashCode() ?: 0)
        result = 31 * result + (videoSelector?.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 InputTemplate

        if (advancedInputFilter != other.advancedInputFilter) return false
        if (advancedInputFilterSettings != other.advancedInputFilterSettings) return false
        if (audioSelectorGroups != other.audioSelectorGroups) return false
        if (audioSelectors != other.audioSelectors) return false
        if (captionSelectors != other.captionSelectors) return false
        if (crop != other.crop) return false
        if (deblockFilter != other.deblockFilter) return false
        if (denoiseFilter != other.denoiseFilter) return false
        if (dolbyVisionMetadataXml != other.dolbyVisionMetadataXml) return false
        if (filterEnable != other.filterEnable) return false
        if (filterStrength != other.filterStrength) return false
        if (imageInserter != other.imageInserter) return false
        if (inputClippings != other.inputClippings) return false
        if (inputScanType != other.inputScanType) return false
        if (position != other.position) return false
        if (programNumber != other.programNumber) return false
        if (psiControl != other.psiControl) return false
        if (timecodeSource != other.timecodeSource) return false
        if (timecodeStart != other.timecodeStart) return false
        if (videoOverlays != other.videoOverlays) return false
        if (videoSelector != other.videoSelector) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Use to remove noise, blocking, blurriness, or ringing from your input as a pre-filter step before encoding. The Advanced input filter removes more types of compression artifacts and is an improvement when compared to basic Deblock and Denoise filters. To remove video compression artifacts from your input and improve the video quality: Choose Enabled. Additionally, this filter can help increase the video quality of your output relative to its bitrate, since noisy inputs are more complex and require more bits to encode. To help restore loss of detail after applying the filter, you can optionally add texture or sharpening as an additional step. Jobs that use this feature incur pro-tier pricing. To not apply advanced input filtering: Choose Disabled. Note that you can still apply basic filtering with Deblock and Denoise.
         */
        public var advancedInputFilter: aws.sdk.kotlin.services.mediaconvert.model.AdvancedInputFilter? = null
        /**
         * Optional settings for Advanced input filter when you set Advanced input filter to Enabled.
         */
        public var advancedInputFilterSettings: aws.sdk.kotlin.services.mediaconvert.model.AdvancedInputFilterSettings? = null
        /**
         * Use audio selector groups to combine multiple sidecar audio inputs so that you can assign them to a single output audio tab. Note that, if you're working with embedded audio, it's simpler to assign multiple input tracks into a single audio selector rather than use an audio selector group.
         */
        public var audioSelectorGroups: Map? = null
        /**
         * Use Audio selectors to specify a track or set of tracks from the input that you will use in your outputs. You can use multiple Audio selectors per input.
         */
        public var audioSelectors: Map? = null
        /**
         * Use captions selectors to specify the captions data from your input that you use in your outputs. You can use up to 100 captions selectors per input.
         */
        public var captionSelectors: Map? = null
        /**
         * Use Cropping selection to specify the video area that the service will include in the output video frame. If you specify a value here, it will override any value that you specify in the output setting Cropping selection.
         */
        public var crop: aws.sdk.kotlin.services.mediaconvert.model.Rectangle? = null
        /**
         * Enable Deblock to produce smoother motion in the output. Default is disabled. Only manually controllable for MPEG2 and uncompressed video inputs.
         */
        public var deblockFilter: aws.sdk.kotlin.services.mediaconvert.model.InputDeblockFilter? = null
        /**
         * Enable Denoise to filter noise from the input. Default is disabled. Only applicable to MPEG2, H.264, H.265, and uncompressed video inputs.
         */
        public var denoiseFilter: aws.sdk.kotlin.services.mediaconvert.model.InputDenoiseFilter? = null
        /**
         * Use this setting only when your video source has Dolby Vision studio mastering metadata that is carried in a separate XML file. Specify the Amazon S3 location for the metadata XML file. MediaConvert uses this file to provide global and frame-level metadata for Dolby Vision preprocessing. When you specify a file here and your input also has interleaved global and frame level metadata, MediaConvert ignores the interleaved metadata and uses only the the metadata from this external XML file. Note that your IAM service role must grant MediaConvert read permissions to this file. For more information, see https://docs.aws.amazon.com/mediaconvert/latest/ug/iam-role.html.
         */
        public var dolbyVisionMetadataXml: kotlin.String? = null
        /**
         * Specify whether to apply input filtering to improve the video quality of your input. To apply filtering depending on your input type and quality: Choose Auto. To apply no filtering: Choose Disable. To apply filtering regardless of your input type and quality: Choose Force. When you do, you must also specify a value for Filter strength.
         */
        public var filterEnable: aws.sdk.kotlin.services.mediaconvert.model.InputFilterEnable? = null
        /**
         * Specify the strength of the input filter. To apply an automatic amount of filtering based the compression artifacts measured in your input: We recommend that you leave Filter strength blank and set Filter enable to Auto. To manually apply filtering: Enter a value from 1 to 5, where 1 is the least amount of filtering and 5 is the most. The value that you enter applies to the strength of the Deblock or Denoise filters, or to the strength of the Advanced input filter.
         */
        public var filterStrength: kotlin.Int? = null
        /**
         * Enable the image inserter feature to include a graphic overlay on your video. Enable or disable this feature for each input individually. This setting is disabled by default.
         */
        public var imageInserter: aws.sdk.kotlin.services.mediaconvert.model.ImageInserter? = null
        /**
         * Contains sets of start and end times that together specify a portion of the input to be used in the outputs. If you provide only a start time, the clip will be the entire input from that point to the end. If you provide only an end time, it will be the entire input up to that point. When you specify more than one input clip, the transcoding service creates the job outputs by stringing the clips together in the order you specify them.
         */
        public var inputClippings: List? = null
        /**
         * When you have a progressive segmented frame (PsF) input, use this setting to flag the input as PsF. MediaConvert doesn't automatically detect PsF. Therefore, flagging your input as PsF results in better preservation of video quality when you do deinterlacing and frame rate conversion. If you don't specify, the default value is Auto. Auto is the correct setting for all inputs that are not PsF. Don't set this value to PsF when your input is interlaced. Doing so creates horizontal interlacing artifacts.
         */
        public var inputScanType: aws.sdk.kotlin.services.mediaconvert.model.InputScanType? = null
        /**
         * Use Selection placement to define the video area in your output frame. The area outside of the rectangle that you specify here is black. If you specify a value here, it will override any value that you specify in the output setting Selection placement. If you specify a value here, this will override any AFD values in your input, even if you set Respond to AFD to Respond. If you specify a value here, this will ignore anything that you specify for the setting Scaling Behavior.
         */
        public var position: aws.sdk.kotlin.services.mediaconvert.model.Rectangle? = null
        /**
         * Use Program to select a specific program from within a multi-program transport stream. Note that Quad 4K is not currently supported. Default is the first program within the transport stream. If the program you specify doesn't exist, the transcoding service will use this default.
         */
        public var programNumber: kotlin.Int? = null
        /**
         * Set PSI control for transport stream inputs to specify which data the demux process to scans. * Ignore PSI - Scan all PIDs for audio and video. * Use PSI - Scan only PSI data.
         */
        public var psiControl: aws.sdk.kotlin.services.mediaconvert.model.InputPsiControl? = null
        /**
         * Use this Timecode source setting, located under the input settings, to specify how the service counts input video frames. This input frame count affects only the behavior of features that apply to a single input at a time, such as input clipping and synchronizing some captions formats. Choose Embedded to use the timecodes in your input video. Choose Start at zero to start the first frame at zero. Choose Specified start to start the first frame at the timecode that you specify in the setting Start timecode. If you don't specify a value for Timecode source, the service will use Embedded by default. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
         */
        public var timecodeSource: aws.sdk.kotlin.services.mediaconvert.model.InputTimecodeSource? = null
        /**
         * Specify the timecode that you want the service to use for this input's initial frame. To use this setting, you must set the Timecode source setting, located under the input settings, to Specified start. For more information about timecodes, see https://docs.aws.amazon.com/console/mediaconvert/timecode.
         */
        public var timecodeStart: kotlin.String? = null
        /**
         * Contains an array of video overlays.
         */
        public var videoOverlays: List? = null
        /**
         * Input video selectors contain the video settings for the input. Each of your inputs can have up to one video selector.
         */
        public var videoSelector: aws.sdk.kotlin.services.mediaconvert.model.VideoSelector? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.InputTemplate) : this() {
            this.advancedInputFilter = x.advancedInputFilter
            this.advancedInputFilterSettings = x.advancedInputFilterSettings
            this.audioSelectorGroups = x.audioSelectorGroups
            this.audioSelectors = x.audioSelectors
            this.captionSelectors = x.captionSelectors
            this.crop = x.crop
            this.deblockFilter = x.deblockFilter
            this.denoiseFilter = x.denoiseFilter
            this.dolbyVisionMetadataXml = x.dolbyVisionMetadataXml
            this.filterEnable = x.filterEnable
            this.filterStrength = x.filterStrength
            this.imageInserter = x.imageInserter
            this.inputClippings = x.inputClippings
            this.inputScanType = x.inputScanType
            this.position = x.position
            this.programNumber = x.programNumber
            this.psiControl = x.psiControl
            this.timecodeSource = x.timecodeSource
            this.timecodeStart = x.timecodeStart
            this.videoOverlays = x.videoOverlays
            this.videoSelector = x.videoSelector
        }

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

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

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy