commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberResponse.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
import aws.smithy.kotlin.runtime.time.Instant
public class PutOptedOutNumberResponse private constructor(builder: Builder) {
/**
* This is true if it was the end user who requested their phone number be removed.
*/
public val endUserOptedOut: kotlin.Boolean = builder.endUserOptedOut
/**
* The OptOutListArn that the phone number was removed from.
*/
public val optOutListArn: kotlin.String? = builder.optOutListArn
/**
* The OptOutListName that the phone number was removed from.
*/
public val optOutListName: kotlin.String? = builder.optOutListName
/**
* The phone number that was added to the OptOutList.
*/
public val optedOutNumber: kotlin.String? = builder.optedOutNumber
/**
* The time that the phone number was added to the OptOutList, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public val optedOutTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.optedOutTimestamp
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PutOptedOutNumberResponse(")
append("endUserOptedOut=$endUserOptedOut,")
append("optOutListArn=$optOutListArn,")
append("optOutListName=$optOutListName,")
append("optedOutNumber=$optedOutNumber,")
append("optedOutTimestamp=$optedOutTimestamp")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = endUserOptedOut.hashCode()
result = 31 * result + (optOutListArn?.hashCode() ?: 0)
result = 31 * result + (optOutListName?.hashCode() ?: 0)
result = 31 * result + (optedOutNumber?.hashCode() ?: 0)
result = 31 * result + (optedOutTimestamp?.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 PutOptedOutNumberResponse
if (endUserOptedOut != other.endUserOptedOut) return false
if (optOutListArn != other.optOutListArn) return false
if (optOutListName != other.optOutListName) return false
if (optedOutNumber != other.optedOutNumber) return false
if (optedOutTimestamp != other.optedOutTimestamp) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* This is true if it was the end user who requested their phone number be removed.
*/
public var endUserOptedOut: kotlin.Boolean = false
/**
* The OptOutListArn that the phone number was removed from.
*/
public var optOutListArn: kotlin.String? = null
/**
* The OptOutListName that the phone number was removed from.
*/
public var optOutListName: kotlin.String? = null
/**
* The phone number that was added to the OptOutList.
*/
public var optedOutNumber: kotlin.String? = null
/**
* The time that the phone number was added to the OptOutList, in [UNIX epoch time](https://www.epochconverter.com/) format.
*/
public var optedOutTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberResponse) : this() {
this.endUserOptedOut = x.endUserOptedOut
this.optOutListArn = x.optOutListArn
this.optOutListName = x.optOutListName
this.optedOutNumber = x.optedOutNumber
this.optedOutTimestamp = x.optedOutTimestamp
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.PutOptedOutNumberResponse = PutOptedOutNumberResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}