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

commonMain.aws.sdk.kotlin.services.mediaconvert.model.Mp2Settings.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

/**
 * Required when you set Codec to the value MP2.
 */
public class Mp2Settings private constructor(builder: Builder) {
    /**
     * Specify the average bitrate in bits per second.
     */
    public val bitrate: kotlin.Int? = builder.bitrate
    /**
     * Set Channels to specify the number of channels in this output audio track. Choosing Mono in will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
     */
    public val channels: kotlin.Int? = builder.channels
    /**
     * Sample rate in Hz.
     */
    public val sampleRate: kotlin.Int? = builder.sampleRate

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

    override fun toString(): kotlin.String = buildString {
        append("Mp2Settings(")
        append("bitrate=$bitrate,")
        append("channels=$channels,")
        append("sampleRate=$sampleRate")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = bitrate ?: 0
        result = 31 * result + (channels ?: 0)
        result = 31 * result + (sampleRate ?: 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 Mp2Settings

        if (bitrate != other.bitrate) return false
        if (channels != other.channels) return false
        if (sampleRate != other.sampleRate) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Specify the average bitrate in bits per second.
         */
        public var bitrate: kotlin.Int? = null
        /**
         * Set Channels to specify the number of channels in this output audio track. Choosing Mono in will give you 1 output channel; choosing Stereo will give you 2. In the API, valid values are 1 and 2.
         */
        public var channels: kotlin.Int? = null
        /**
         * Sample rate in Hz.
         */
        public var sampleRate: kotlin.Int? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.Mp2Settings) : this() {
            this.bitrate = x.bitrate
            this.channels = x.channels
            this.sampleRate = x.sampleRate
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy