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

commonMain.aws.sdk.kotlin.services.mediapackage.model.EncryptionContractConfiguration.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.mediapackage.model



/**
 * Use encryptionContractConfiguration to configure one or more content encryption keys for your endpoints that use SPEKE 2.0. The encryption contract defines which content keys are used to encrypt the audio and video tracks in your stream. To configure the encryption contract, specify which audio and video encryption presets to use. Note the following considerations when using encryptionContractConfiguration: encryptionContractConfiguration can be used for DASH or CMAF endpoints that use SPEKE 2.0. SPEKE 2.0 relies on the CPIX 2.3 specification. You must disable key rotation for this endpoint by setting keyRotationIntervalSeconds to 0.
 */
class EncryptionContractConfiguration private constructor(builder: Builder) {
    /**
     * A collection of audio encryption presets.
     */
    val presetSpeke20Audio: aws.sdk.kotlin.services.mediapackage.model.PresetSpeke20Audio? = builder.presetSpeke20Audio
    /**
     * A collection of video encryption presets.
     */
    val presetSpeke20Video: aws.sdk.kotlin.services.mediapackage.model.PresetSpeke20Video? = builder.presetSpeke20Video

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

    override fun toString(): kotlin.String = buildString {
        append("EncryptionContractConfiguration(")
        append("presetSpeke20Audio=$presetSpeke20Audio,")
        append("presetSpeke20Video=$presetSpeke20Video)")
    }

    override fun hashCode(): kotlin.Int {
        var result = presetSpeke20Audio?.hashCode() ?: 0
        result = 31 * result + (presetSpeke20Video?.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 EncryptionContractConfiguration

        if (presetSpeke20Audio != other.presetSpeke20Audio) return false
        if (presetSpeke20Video != other.presetSpeke20Video) return false

        return true
    }

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

    class Builder {
        /**
         * A collection of audio encryption presets.
         */
        var presetSpeke20Audio: aws.sdk.kotlin.services.mediapackage.model.PresetSpeke20Audio? = null
        /**
         * A collection of video encryption presets.
         */
        var presetSpeke20Video: aws.sdk.kotlin.services.mediapackage.model.PresetSpeke20Video? = null

        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.mediapackage.model.EncryptionContractConfiguration) : this() {
            this.presetSpeke20Audio = x.presetSpeke20Audio
            this.presetSpeke20Video = x.presetSpeke20Video
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.mediapackage.model.EncryptionContractConfiguration = EncryptionContractConfiguration(this)
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy