commonMain.aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDefinition.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 information on the specified section definition.
*/
public class RegistrationSectionDefinition private constructor(builder: Builder) {
/**
* The path to the section of the registration.
*/
public val displayHints: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDisplayHints? = builder.displayHints
/**
* The path to the section of the registration.
*/
public val sectionPath: kotlin.String = requireNotNull(builder.sectionPath) { "A non-null value must be provided for sectionPath" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDefinition = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RegistrationSectionDefinition(")
append("displayHints=$displayHints,")
append("sectionPath=$sectionPath")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = displayHints?.hashCode() ?: 0
result = 31 * result + (sectionPath.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 RegistrationSectionDefinition
if (displayHints != other.displayHints) return false
if (sectionPath != other.sectionPath) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDefinition = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The path to the section of the registration.
*/
public var displayHints: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDisplayHints? = null
/**
* The path to the section of the registration.
*/
public var sectionPath: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDefinition) : this() {
this.displayHints = x.displayHints
this.sectionPath = x.sectionPath
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDefinition = RegistrationSectionDefinition(this)
/**
* construct an [aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDisplayHints] inside the given [block]
*/
public fun displayHints(block: aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDisplayHints.Builder.() -> kotlin.Unit) {
this.displayHints = aws.sdk.kotlin.services.pinpointsmsvoicev2.model.RegistrationSectionDisplayHints.invoke(block)
}
internal fun correctErrors(): Builder {
if (sectionPath == null) sectionPath = ""
return this
}
}
}