commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAssociationMetadata.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
/**
* Metadata for the origination identity that is associated with the registration.
*/
public class RegistrationAssociationMetadata private constructor(builder: Builder) {
/**
* The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
*/
public val isoCountryCode: kotlin.String? = builder.isoCountryCode
/**
* The phone number associated with the registration in E.164 format.
*/
public val phoneNumber: kotlin.String? = builder.phoneNumber
/**
* The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.
*/
public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }
/**
* The unique identifier for the origination identity. For example this could be a **PhoneNumberId** or **SenderId**.
*/
public val resourceId: kotlin.String = requireNotNull(builder.resourceId) { "A non-null value must be provided for resourceId" }
/**
* The origination identity type.
*/
public val resourceType: kotlin.String = requireNotNull(builder.resourceType) { "A non-null value must be provided for resourceType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAssociationMetadata = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegistrationAssociationMetadata(")
append("isoCountryCode=$isoCountryCode,")
append("phoneNumber=$phoneNumber,")
append("resourceArn=$resourceArn,")
append("resourceId=$resourceId,")
append("resourceType=$resourceType")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = isoCountryCode?.hashCode() ?: 0
result = 31 * result + (phoneNumber?.hashCode() ?: 0)
result = 31 * result + (resourceArn.hashCode())
result = 31 * result + (resourceId.hashCode())
result = 31 * result + (resourceType.hashCode())
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 RegistrationAssociationMetadata
if (isoCountryCode != other.isoCountryCode) return false
if (phoneNumber != other.phoneNumber) return false
if (resourceArn != other.resourceArn) return false
if (resourceId != other.resourceId) return false
if (resourceType != other.resourceType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAssociationMetadata = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The two-character code, in ISO 3166-1 alpha-2 format, for the country or region.
*/
public var isoCountryCode: kotlin.String? = null
/**
* The phone number associated with the registration in E.164 format.
*/
public var phoneNumber: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the origination identity that is associated with the registration.
*/
public var resourceArn: kotlin.String? = null
/**
* The unique identifier for the origination identity. For example this could be a **PhoneNumberId** or **SenderId**.
*/
public var resourceId: kotlin.String? = null
/**
* The origination identity type.
*/
public var resourceType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAssociationMetadata) : this() {
this.isoCountryCode = x.isoCountryCode
this.phoneNumber = x.phoneNumber
this.resourceArn = x.resourceArn
this.resourceId = x.resourceId
this.resourceType = x.resourceType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationAssociationMetadata = RegistrationAssociationMetadata(this)
internal fun correctErrors(): Builder {
if (resourceArn == null) resourceArn = ""
if (resourceId == null) resourceId = ""
if (resourceType == null) resourceType = ""
return this
}
}
}