commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutKeywordRequest.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 PutKeywordRequest private constructor(builder: Builder) {
/**
* The new keyword to add.
*/
public val keyword: kotlin.String? = builder.keyword
/**
* The action to perform for the new keyword when it is received.
* + AUTOMATIC_RESPONSE: A message is sent to the recipient.
* + OPT_OUT: Keeps the recipient from receiving future messages.
* + OPT_IN: The recipient wants to receive future messages.
*/
public val keywordAction: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KeywordAction? = builder.keywordAction
/**
* The message associated with the keyword.
*/
public val keywordMessage: kotlin.String? = builder.keywordMessage
/**
* The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.
*
* 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 originationIdentity: kotlin.String? = builder.originationIdentity
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutKeywordRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutKeywordRequest(")
append("keyword=$keyword,")
append("keywordAction=$keywordAction,")
append("keywordMessage=$keywordMessage,")
append("originationIdentity=$originationIdentity")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = keyword?.hashCode() ?: 0
result = 31 * result + (keywordAction?.hashCode() ?: 0)
result = 31 * result + (keywordMessage?.hashCode() ?: 0)
result = 31 * result + (originationIdentity?.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 PutKeywordRequest
if (keyword != other.keyword) return false
if (keywordAction != other.keywordAction) return false
if (keywordMessage != other.keywordMessage) return false
if (originationIdentity != other.originationIdentity) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutKeywordRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The new keyword to add.
*/
public var keyword: kotlin.String? = null
/**
* The action to perform for the new keyword when it is received.
* + AUTOMATIC_RESPONSE: A message is sent to the recipient.
* + OPT_OUT: Keeps the recipient from receiving future messages.
* + OPT_IN: The recipient wants to receive future messages.
*/
public var keywordAction: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.KeywordAction? = null
/**
* The message associated with the keyword.
*/
public var keywordMessage: kotlin.String? = null
/**
* The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.
*
* 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 originationIdentity: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutKeywordRequest) : this() {
this.keyword = x.keyword
this.keywordAction = x.keywordAction
this.keywordMessage = x.keywordMessage
this.originationIdentity = x.originationIdentity
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutKeywordRequest = PutKeywordRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}