commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldValueInformation.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
/**
* Provides the values of the specified field.
*/
public class RegistrationFieldValueInformation private constructor(builder: Builder) {
/**
* A description of why the registration was denied.
*/
public val deniedReason: kotlin.String? = builder.deniedReason
/**
* The path to the registration form field. You can use DescribeRegistrationFieldDefinitions for a list of **FieldPaths**.
*/
public val fieldPath: kotlin.String = requireNotNull(builder.fieldPath) { "A non-null value must be provided for fieldPath" }
/**
* The unique identifier for the registration attachment.
*/
public val registrationAttachmentId: kotlin.String? = builder.registrationAttachmentId
/**
* An array of values for the form field.
*/
public val selectChoices: List? = builder.selectChoices
/**
* The text data for a free form field.
*/
public val textValue: kotlin.String? = builder.textValue
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldValueInformation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegistrationFieldValueInformation(")
append("deniedReason=$deniedReason,")
append("fieldPath=$fieldPath,")
append("registrationAttachmentId=$registrationAttachmentId,")
append("selectChoices=$selectChoices,")
append("textValue=$textValue")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = deniedReason?.hashCode() ?: 0
result = 31 * result + (fieldPath.hashCode())
result = 31 * result + (registrationAttachmentId?.hashCode() ?: 0)
result = 31 * result + (selectChoices?.hashCode() ?: 0)
result = 31 * result + (textValue?.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 RegistrationFieldValueInformation
if (deniedReason != other.deniedReason) return false
if (fieldPath != other.fieldPath) return false
if (registrationAttachmentId != other.registrationAttachmentId) return false
if (selectChoices != other.selectChoices) return false
if (textValue != other.textValue) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldValueInformation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of why the registration was denied.
*/
public var deniedReason: kotlin.String? = null
/**
* The path to the registration form field. You can use DescribeRegistrationFieldDefinitions for a list of **FieldPaths**.
*/
public var fieldPath: kotlin.String? = null
/**
* The unique identifier for the registration attachment.
*/
public var registrationAttachmentId: kotlin.String? = null
/**
* An array of values for the form field.
*/
public var selectChoices: List? = null
/**
* The text data for a free form field.
*/
public var textValue: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldValueInformation) : this() {
this.deniedReason = x.deniedReason
this.fieldPath = x.fieldPath
this.registrationAttachmentId = x.registrationAttachmentId
this.selectChoices = x.selectChoices
this.textValue = x.textValue
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationFieldValueInformation = RegistrationFieldValueInformation(this)
internal fun correctErrors(): Builder {
if (fieldPath == null) fieldPath = ""
return this
}
}
}