All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.connectcases.model



public class UpdateFieldRequest private constructor(builder: Builder) {
    /**
     * The description of a field.
     */
    public val description: kotlin.String? = builder.description
    /**
     * The unique identifier of the Cases domain.
     */
    public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
    /**
     * The unique identifier of a field.
     */
    public val fieldId: kotlin.String = requireNotNull(builder.fieldId) { "A non-null value must be provided for fieldId" }
    /**
     * The name of the field.
     */
    public val name: kotlin.String? = builder.name

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("UpdateFieldRequest(")
        append("description=$description,")
        append("domainId=$domainId,")
        append("fieldId=$fieldId,")
        append("name=$name")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = description?.hashCode() ?: 0
        result = 31 * result + (domainId.hashCode())
        result = 31 * result + (fieldId.hashCode())
        result = 31 * result + (name?.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 UpdateFieldRequest

        if (description != other.description) return false
        if (domainId != other.domainId) return false
        if (fieldId != other.fieldId) return false
        if (name != other.name) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The description of a field.
         */
        public var description: kotlin.String? = null
        /**
         * The unique identifier of the Cases domain.
         */
        public var domainId: kotlin.String? = null
        /**
         * The unique identifier of a field.
         */
        public var fieldId: kotlin.String? = null
        /**
         * The name of the field.
         */
        public var name: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest) : this() {
            this.description = x.description
            this.domainId = x.domainId
            this.fieldId = x.fieldId
            this.name = x.name
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.connectcases.model.UpdateFieldRequest = UpdateFieldRequest(this)

        internal fun correctErrors(): Builder {
            if (domainId == null) domainId = ""
            if (fieldId == null) fieldId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy