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

commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberRequest.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 PutOptedOutNumberRequest private constructor(builder: Builder) {
    /**
     * The OptOutListName or OptOutListArn to add the phone number to.
     */
    public val optOutListName: kotlin.String? = builder.optOutListName
    /**
     * The phone number to add to the OptOutList in E.164 format.
     */
    public val optedOutNumber: kotlin.String? = builder.optedOutNumber

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

    override fun toString(): kotlin.String = buildString {
        append("PutOptedOutNumberRequest(")
        append("optOutListName=$optOutListName,")
        append("optedOutNumber=$optedOutNumber")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = optOutListName?.hashCode() ?: 0
        result = 31 * result + (optedOutNumber?.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 PutOptedOutNumberRequest

        if (optOutListName != other.optOutListName) return false
        if (optedOutNumber != other.optedOutNumber) return false

        return true
    }

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

    @SdkDsl
    public class Builder {
        /**
         * The OptOutListName or OptOutListArn to add the phone number to.
         */
        public var optOutListName: kotlin.String? = null
        /**
         * The phone number to add to the OptOutList in E.164 format.
         */
        public var optedOutNumber: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberRequest) : this() {
            this.optOutListName = x.optOutListName
            this.optedOutNumber = x.optedOutNumber
        }

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy