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

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

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

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



public class UpdateCaseRequest private constructor(builder: Builder) {
    /**
     * A unique identifier of the case.
     */
    public val caseId: kotlin.String = requireNotNull(builder.caseId) { "A non-null value must be provided for caseId" }
    /**
     * The unique identifier of the Cases domain.
     */
    public val domainId: kotlin.String = requireNotNull(builder.domainId) { "A non-null value must be provided for domainId" }
    /**
     * An array of objects with `fieldId` (matching ListFields/DescribeField) and value union data, structured identical to `CreateCase`.
     */
    public val fields: List = requireNotNull(builder.fields) { "A non-null value must be provided for fields" }
    /**
     * Represents the identity of the person who performed the action.
     */
    public val performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = builder.performedBy

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateCaseRequest(")
        append("caseId=$caseId,")
        append("domainId=$domainId,")
        append("fields=$fields,")
        append("performedBy=$performedBy")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = caseId.hashCode()
        result = 31 * result + (domainId.hashCode())
        result = 31 * result + (fields.hashCode())
        result = 31 * result + (performedBy?.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 UpdateCaseRequest

        if (caseId != other.caseId) return false
        if (domainId != other.domainId) return false
        if (fields != other.fields) return false
        if (performedBy != other.performedBy) return false

        return true
    }

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

    public class Builder {
        /**
         * A unique identifier of the case.
         */
        public var caseId: kotlin.String? = null
        /**
         * The unique identifier of the Cases domain.
         */
        public var domainId: kotlin.String? = null
        /**
         * An array of objects with `fieldId` (matching ListFields/DescribeField) and value union data, structured identical to `CreateCase`.
         */
        public var fields: List? = null
        /**
         * Represents the identity of the person who performed the action.
         */
        public var performedBy: aws.sdk.kotlin.services.connectcases.model.UserUnion? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connectcases.model.UpdateCaseRequest) : this() {
            this.caseId = x.caseId
            this.domainId = x.domainId
            this.fields = x.fields
            this.performedBy = x.performedBy
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy