commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription.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
/**
* A description of each select option.
*/
public class SelectOptionDescription private constructor(builder: Builder) {
/**
* A description of the option meaning.
*/
public val description: kotlin.String? = builder.description
/**
* The value of the option.
*/
public val option: kotlin.String = requireNotNull(builder.option) { "A non-null value must be provided for option" }
/**
* The title of the select option.
*/
public val title: kotlin.String? = builder.title
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SelectOptionDescription(")
append("description=$description,")
append("option=$option,")
append("title=$title")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = description?.hashCode() ?: 0
result = 31 * result + (option.hashCode())
result = 31 * result + (title?.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 SelectOptionDescription
if (description != other.description) return false
if (option != other.option) return false
if (title != other.title) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A description of the option meaning.
*/
public var description: kotlin.String? = null
/**
* The value of the option.
*/
public var option: kotlin.String? = null
/**
* The title of the select option.
*/
public var title: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription) : this() {
this.description = x.description
this.option = x.option
this.title = x.title
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.SelectOptionDescription = SelectOptionDescription(this)
internal fun correctErrors(): Builder {
if (option == null) option = ""
return this
}
}
}