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

commonMain.aws.sdk.kotlin.services.mediapackagevod.model.EncryptionContractConfiguration.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.mediapackagevod.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 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.
 */
public class EncryptionContractConfiguration private constructor(builder: Builder) {
    /**
     * A collection of audio encryption presets.
     */
    public val presetSpeke20Audio: aws.sdk.kotlin.services.mediapackagevod.model.PresetSpeke20Audio? = builder.presetSpeke20Audio
    /**
     * A collection of video encryption presets.
     */
    public val presetSpeke20Video: aws.sdk.kotlin.services.mediapackagevod.model.PresetSpeke20Video? = builder.presetSpeke20Video

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

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

    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
    }

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy