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

commonMain.aws.sdk.kotlin.services.ivs.model.ImportPlaybackKeyPairRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.ivs.model

import aws.smithy.kotlin.runtime.SdkDsl

public class ImportPlaybackKeyPairRequest private constructor(builder: Builder) {
    /**
     * Playback-key-pair name. The value does not need to be unique.
     */
    public val name: kotlin.String? = builder.name
    /**
     * The public portion of a customer-generated key pair.
     */
    public val publicKeyMaterial: kotlin.String = requireNotNull(builder.publicKeyMaterial) { "A non-null value must be provided for publicKeyMaterial" }
    /**
     * Any tags provided with the request are added to the playback key pair tags. See [Tagging Amazon Web Services Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for more information, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.
     */
    public val tags: Map? = builder.tags

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

    override fun toString(): kotlin.String = buildString {
        append("ImportPlaybackKeyPairRequest(")
        append("name=$name,")
        append("publicKeyMaterial=$publicKeyMaterial,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = name?.hashCode() ?: 0
        result = 31 * result + (publicKeyMaterial.hashCode())
        result = 31 * result + (tags?.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 ImportPlaybackKeyPairRequest

        if (name != other.name) return false
        if (publicKeyMaterial != other.publicKeyMaterial) return false
        if (tags != other.tags) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * Playback-key-pair name. The value does not need to be unique.
         */
        public var name: kotlin.String? = null
        /**
         * The public portion of a customer-generated key pair.
         */
        public var publicKeyMaterial: kotlin.String? = null
        /**
         * Any tags provided with the request are added to the playback key pair tags. See [Tagging Amazon Web Services Resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) for more information, including restrictions that apply to tags and "Tag naming limits and requirements"; Amazon IVS has no service-specific constraints beyond what is documented there.
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.ivs.model.ImportPlaybackKeyPairRequest) : this() {
            this.name = x.name
            this.publicKeyMaterial = x.publicKeyMaterial
            this.tags = x.tags
        }

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

        internal fun correctErrors(): Builder {
            if (publicKeyMaterial == null) publicKeyMaterial = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy