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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.GetProtectConfigurationCountryRuleSetResponse.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 GetProtectConfigurationCountryRuleSetResponse private constructor(builder: Builder) {
    /**
     * A map of ProtectConfigurationCountryRuleSetInformation objects that contain the details for the requested NumberCapability. The Key is the two-letter ISO country code. For a list of supported ISO country codes, see [Supported countries and regions (SMS channel)](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) in the AWS End User Messaging SMS User Guide.
     */
    public val countryRuleSet: Map = requireNotNull(builder.countryRuleSet) { "A non-null value must be provided for countryRuleSet" }
    /**
     * The capability type associated with the returned ProtectConfigurationCountryRuleSetInformation objects.
     */
    public val numberCapability: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.NumberCapability = requireNotNull(builder.numberCapability) { "A non-null value must be provided for numberCapability" }
    /**
     * 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.GetProtectConfigurationCountryRuleSetResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("GetProtectConfigurationCountryRuleSetResponse(")
        append("countryRuleSet=$countryRuleSet,")
        append("numberCapability=$numberCapability,")
        append("protectConfigurationArn=$protectConfigurationArn,")
        append("protectConfigurationId=$protectConfigurationId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = countryRuleSet.hashCode()
        result = 31 * result + (numberCapability.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 GetProtectConfigurationCountryRuleSetResponse

        if (countryRuleSet != other.countryRuleSet) return false
        if (numberCapability != other.numberCapability) 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.GetProtectConfigurationCountryRuleSetResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A map of ProtectConfigurationCountryRuleSetInformation objects that contain the details for the requested NumberCapability. The Key is the two-letter ISO country code. For a list of supported ISO country codes, see [Supported countries and regions (SMS channel)](https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-sms-by-country.html) in the AWS End User Messaging SMS User Guide.
         */
        public var countryRuleSet: Map? = null
        /**
         * The capability type associated with the returned ProtectConfigurationCountryRuleSetInformation objects.
         */
        public var numberCapability: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.NumberCapability? = 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.GetProtectConfigurationCountryRuleSetResponse) : this() {
            this.countryRuleSet = x.countryRuleSet
            this.numberCapability = x.numberCapability
            this.protectConfigurationArn = x.protectConfigurationArn
            this.protectConfigurationId = x.protectConfigurationId
        }

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

        internal fun correctErrors(): Builder {
            if (countryRuleSet == null) countryRuleSet = emptyMap()
            if (numberCapability == null) numberCapability = NumberCapability.SdkUnknown("no value provided")
            if (protectConfigurationArn == null) protectConfigurationArn = ""
            if (protectConfigurationId == null) protectConfigurationId = ""
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy