commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pinpointsmsvoicev2-jvm Show documentation
Show all versions of pinpointsmsvoicev2-jvm Show documentation
The AWS SDK for Kotlin client for Pinpoint SMS Voice V2
// 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.
*
* If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
*/
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.
*
* If you are using a shared AWS End User Messaging SMS and Voice resource then you must use the full Amazon Resource Name(ARN).
*/
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
}
}
}