commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdatePhoneNumberRequest.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 UpdatePhoneNumberRequest private constructor(builder: Builder) {
/**
* By default this is set to false. When set to true the phone number can't be deleted.
*/
public val deletionProtectionEnabled: kotlin.Boolean? = builder.deletionProtectionEnabled
/**
* The OptOutList to add the phone number to. Valid values for this field can be either the OutOutListName or OutOutListArn.
*/
public val optOutListName: kotlin.String? = builder.optOutListName
/**
* The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.
*/
public val phoneNumberId: kotlin.String? = builder.phoneNumberId
/**
* By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.
*/
public val selfManagedOptOutsEnabled: kotlin.Boolean? = builder.selfManagedOptOutsEnabled
/**
* The Amazon Resource Name (ARN) of the two way channel.
*/
public val twoWayChannelArn: kotlin.String? = builder.twoWayChannelArn
/**
* An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
*/
public val twoWayChannelRole: kotlin.String? = builder.twoWayChannelRole
/**
* By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
*/
public val twoWayEnabled: kotlin.Boolean? = builder.twoWayEnabled
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdatePhoneNumberRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePhoneNumberRequest(")
append("deletionProtectionEnabled=$deletionProtectionEnabled,")
append("optOutListName=$optOutListName,")
append("phoneNumberId=$phoneNumberId,")
append("selfManagedOptOutsEnabled=$selfManagedOptOutsEnabled,")
append("twoWayChannelArn=$twoWayChannelArn,")
append("twoWayChannelRole=$twoWayChannelRole,")
append("twoWayEnabled=$twoWayEnabled")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deletionProtectionEnabled?.hashCode() ?: 0
result = 31 * result + (optOutListName?.hashCode() ?: 0)
result = 31 * result + (phoneNumberId?.hashCode() ?: 0)
result = 31 * result + (selfManagedOptOutsEnabled?.hashCode() ?: 0)
result = 31 * result + (twoWayChannelArn?.hashCode() ?: 0)
result = 31 * result + (twoWayChannelRole?.hashCode() ?: 0)
result = 31 * result + (twoWayEnabled?.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 UpdatePhoneNumberRequest
if (deletionProtectionEnabled != other.deletionProtectionEnabled) return false
if (optOutListName != other.optOutListName) return false
if (phoneNumberId != other.phoneNumberId) return false
if (selfManagedOptOutsEnabled != other.selfManagedOptOutsEnabled) return false
if (twoWayChannelArn != other.twoWayChannelArn) return false
if (twoWayChannelRole != other.twoWayChannelRole) return false
if (twoWayEnabled != other.twoWayEnabled) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdatePhoneNumberRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* By default this is set to false. When set to true the phone number can't be deleted.
*/
public var deletionProtectionEnabled: kotlin.Boolean? = null
/**
* The OptOutList to add the phone number to. Valid values for this field can be either the OutOutListName or OutOutListArn.
*/
public var optOutListName: kotlin.String? = null
/**
* The unique identifier of the phone number. Valid values for this field can be either the PhoneNumberId or PhoneNumberArn.
*/
public var phoneNumberId: kotlin.String? = null
/**
* By default this is set to false. When an end recipient sends a message that begins with HELP or STOP to one of your dedicated numbers, AWS End User Messaging SMS and Voice automatically replies with a customizable message and adds the end recipient to the OptOutList. When set to true you're responsible for responding to HELP and STOP requests. You're also responsible for tracking and honoring opt-out requests.
*/
public var selfManagedOptOutsEnabled: kotlin.Boolean? = null
/**
* The Amazon Resource Name (ARN) of the two way channel.
*/
public var twoWayChannelArn: kotlin.String? = null
/**
* An optional IAM Role Arn for a service to assume, to be able to post inbound SMS messages.
*/
public var twoWayChannelRole: kotlin.String? = null
/**
* By default this is set to false. When set to true you can receive incoming text messages from your end recipients.
*/
public var twoWayEnabled: kotlin.Boolean? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdatePhoneNumberRequest) : this() {
this.deletionProtectionEnabled = x.deletionProtectionEnabled
this.optOutListName = x.optOutListName
this.phoneNumberId = x.phoneNumberId
this.selfManagedOptOutsEnabled = x.selfManagedOptOutsEnabled
this.twoWayChannelArn = x.twoWayChannelArn
this.twoWayChannelRole = x.twoWayChannelRole
this.twoWayEnabled = x.twoWayEnabled
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.UpdatePhoneNumberRequest = UpdatePhoneNumberRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}