commonMain.aws.sdk.kotlin.services.mediaconvert.model.OpusSettings.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mediaconvert-jvm Show documentation
Show all versions of mediaconvert-jvm Show documentation
The AWS SDK for Kotlin client for MediaConvert
// 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, under AudioDescriptions>CodecSettings, to the value OPUS.
*/
public class OpusSettings private constructor(builder: Builder) {
/**
* Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
*/
public val bitrate: kotlin.Int? = builder.bitrate
/**
* Specify the number of channels in this output audio track. Choosing Mono on gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
*/
public val channels: kotlin.Int? = builder.channels
/**
* Optional. Sample rate in Hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
*/
public val sampleRate: kotlin.Int? = builder.sampleRate
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.mediaconvert.model.OpusSettings = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("OpusSettings(")
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 OpusSettings
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.OpusSettings = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Optional. Specify the average bitrate in bits per second. Valid values are multiples of 8000, from 32000 through 192000. The default value is 96000, which we recommend for quality and bandwidth.
*/
public var bitrate: kotlin.Int? = null
/**
* Specify the number of channels in this output audio track. Choosing Mono on gives you 1 output channel; choosing Stereo gives you 2. In the API, valid values are 1 and 2.
*/
public var channels: kotlin.Int? = null
/**
* Optional. Sample rate in Hz. Valid values are 16000, 24000, and 48000. The default value is 48000.
*/
public var sampleRate: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.mediaconvert.model.OpusSettings) : this() {
this.bitrate = x.bitrate
this.channels = x.channels
this.sampleRate = x.sampleRate
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.mediaconvert.model.OpusSettings = OpusSettings(this)
internal fun correctErrors(): Builder {
return this
}
}
}