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

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

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

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

import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant

public class PutProtectConfigurationRuleSetNumberOverrideResponse private constructor(builder: Builder) {
    /**
     * The action for the rule to take.
     */
    public val action: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationRuleOverrideAction = requireNotNull(builder.action) { "A non-null value must be provided for action" }
    /**
     * The time when the rule was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
     */
    public val createdTimestamp: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdTimestamp) { "A non-null value must be provided for createdTimestamp" }
    /**
     * The destination phone number in E.164 format.
     */
    public val destinationPhoneNumber: kotlin.String = requireNotNull(builder.destinationPhoneNumber) { "A non-null value must be provided for destinationPhoneNumber" }
    /**
     * The time the rule will expire at.
     */
    public val expirationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.expirationTimestamp
    /**
     * The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
     */
    public val isoCountryCode: kotlin.String? = builder.isoCountryCode
    /**
     * 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.PutProtectConfigurationRuleSetNumberOverrideResponse = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("PutProtectConfigurationRuleSetNumberOverrideResponse(")
        append("action=$action,")
        append("createdTimestamp=$createdTimestamp,")
        append("destinationPhoneNumber=$destinationPhoneNumber,")
        append("expirationTimestamp=$expirationTimestamp,")
        append("isoCountryCode=$isoCountryCode,")
        append("protectConfigurationArn=$protectConfigurationArn,")
        append("protectConfigurationId=$protectConfigurationId")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = action.hashCode()
        result = 31 * result + (createdTimestamp.hashCode())
        result = 31 * result + (destinationPhoneNumber.hashCode())
        result = 31 * result + (expirationTimestamp?.hashCode() ?: 0)
        result = 31 * result + (isoCountryCode?.hashCode() ?: 0)
        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 PutProtectConfigurationRuleSetNumberOverrideResponse

        if (action != other.action) return false
        if (createdTimestamp != other.createdTimestamp) return false
        if (destinationPhoneNumber != other.destinationPhoneNumber) return false
        if (expirationTimestamp != other.expirationTimestamp) return false
        if (isoCountryCode != other.isoCountryCode) 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.PutProtectConfigurationRuleSetNumberOverrideResponse = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The action for the rule to take.
         */
        public var action: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.ProtectConfigurationRuleOverrideAction? = null
        /**
         * The time when the rule was created, in [UNIX epoch time](https://www.epochconverter.com/) format.
         */
        public var createdTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The destination phone number in E.164 format.
         */
        public var destinationPhoneNumber: kotlin.String? = null
        /**
         * The time the rule will expire at.
         */
        public var expirationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
        /**
         * The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
         */
        public var isoCountryCode: 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.PutProtectConfigurationRuleSetNumberOverrideResponse) : this() {
            this.action = x.action
            this.createdTimestamp = x.createdTimestamp
            this.destinationPhoneNumber = x.destinationPhoneNumber
            this.expirationTimestamp = x.expirationTimestamp
            this.isoCountryCode = x.isoCountryCode
            this.protectConfigurationArn = x.protectConfigurationArn
            this.protectConfigurationId = x.protectConfigurationId
        }

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

        internal fun correctErrors(): Builder {
            if (action == null) action = ProtectConfigurationRuleOverrideAction.SdkUnknown("no value provided")
            if (createdTimestamp == null) createdTimestamp = Instant.fromEpochSeconds(0)
            if (destinationPhoneNumber == null) destinationPhoneNumber = ""
            if (protectConfigurationArn == null) protectConfigurationArn = ""
            if (protectConfigurationId == null) protectConfigurationId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy