
commonMain.aws.sdk.kotlin.services.connectcases.model.FieldOption.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.connectcases.model
/**
* Object for field Options information.
*/
public class FieldOption private constructor(builder: Builder) {
/**
* Describes whether the `FieldOption` is active (displayed) or inactive.
*/
public val active: kotlin.Boolean = requireNotNull(builder.active) { "A non-null value must be provided for active" }
/**
* `FieldOptionName` has max length 100 and disallows trailing spaces.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
/**
* `FieldOptionValue` has max length 100 and must be alphanumeric with hyphens and underscores.
*/
public val value: kotlin.String = requireNotNull(builder.value) { "A non-null value must be provided for value" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.FieldOption = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("FieldOption(")
append("active=$active,")
append("name=$name,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = active.hashCode()
result = 31 * result + (name.hashCode())
result = 31 * result + (value.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 FieldOption
if (active != other.active) return false
if (name != other.name) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.FieldOption = Builder(this).apply(block).build()
public class Builder {
/**
* Describes whether the `FieldOption` is active (displayed) or inactive.
*/
public var active: kotlin.Boolean? = null
/**
* `FieldOptionName` has max length 100 and disallows trailing spaces.
*/
public var name: kotlin.String? = null
/**
* `FieldOptionValue` has max length 100 and must be alphanumeric with hyphens and underscores.
*/
public var value: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.connectcases.model.FieldOption) : this() {
this.active = x.active
this.name = x.name
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.connectcases.model.FieldOption = FieldOption(this)
internal fun correctErrors(): Builder {
if (active == null) active = false
if (name == null) name = ""
if (value == null) value = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy