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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AssociateProtectConfigurationResponse.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.pinpointsmsvoicev2.model

import aws.smithy.kotlin.runtime.SdkDsl

public class AssociateProtectConfigurationResponse private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the configuration set.
     */
    public val configurationSetArn: kotlin.String = requireNotNull(builder.configurationSetArn) { "A non-null value must be provided for configurationSetArn" }
    /**
     * The name of the ConfigurationSet.
     */
    public val configurationSetName: kotlin.String = requireNotNull(builder.configurationSetName) { "A non-null value must be provided for configurationSetName" }
    /**
     * The Amazon Resource Name (ARN) of the protect configuration.
     */
    public val protectConfigurationArn: kotlin.String = requireNotNull(builder.protectConfigurationArn) { "A non-null value must be provided for protectConfigurationArn" }
    /**
     * The unique identifier for the protect configuration.
     */
    public val protectConfigurationId: kotlin.String = requireNotNull(builder.protectConfigurationId) { "A non-null value must be provided for protectConfigurationId" }

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

    override fun toString(): kotlin.String = buildString {
        append("AssociateProtectConfigurationResponse(")
        append("configurationSetArn=$configurationSetArn,")
        append("configurationSetName=$configurationSetName,")
        append("protectConfigurationArn=$protectConfigurationArn,")
        append("protectConfigurationId=$protectConfigurationId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = configurationSetArn.hashCode()
        result = 31 * result + (configurationSetName.hashCode())
        result = 31 * result + (protectConfigurationArn.hashCode())
        result = 31 * result + (protectConfigurationId.hashCode())
        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 AssociateProtectConfigurationResponse

        if (configurationSetArn != other.configurationSetArn) return false
        if (configurationSetName != other.configurationSetName) return false
        if (protectConfigurationArn != other.protectConfigurationArn) return false
        if (protectConfigurationId != other.protectConfigurationId) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the configuration set.
         */
        public var configurationSetArn: kotlin.String? = null
        /**
         * The name of the ConfigurationSet.
         */
        public var configurationSetName: kotlin.String? = null
        /**
         * The Amazon Resource Name (ARN) of the protect configuration.
         */
        public var protectConfigurationArn: kotlin.String? = null
        /**
         * The unique identifier for the protect configuration.
         */
        public var protectConfigurationId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.AssociateProtectConfigurationResponse) : this() {
            this.configurationSetArn = x.configurationSetArn
            this.configurationSetName = x.configurationSetName
            this.protectConfigurationArn = x.protectConfigurationArn
            this.protectConfigurationId = x.protectConfigurationId
        }

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

        internal fun correctErrors(): Builder {
            if (configurationSetArn == null) configurationSetArn = ""
            if (configurationSetName == null) configurationSetName = ""
            if (protectConfigurationArn == null) protectConfigurationArn = ""
            if (protectConfigurationId == null) protectConfigurationId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy