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

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

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

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



public class UpdateTemplateRequest private constructor(builder: Builder) {
    /**
     * A brief description of the template.
     */
    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" }
    /**
     * Configuration of layouts associated to the template.
     */
    public val layoutConfiguration: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration? = builder.layoutConfiguration
    /**
     * The name of the template. It must be unique per domain.
     */
    public val name: kotlin.String? = builder.name
    /**
     * A list of fields that must contain a value for a case to be successfully created with this template.
     */
    public val requiredFields: List? = builder.requiredFields
    /**
     * The status of the template.
     */
    public val status: aws.sdk.kotlin.services.connectcases.model.TemplateStatus? = builder.status
    /**
     * A unique identifier for the template.
     */
    public val templateId: kotlin.String = requireNotNull(builder.templateId) { "A non-null value must be provided for templateId" }

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

    override fun toString(): kotlin.String = buildString {
        append("UpdateTemplateRequest(")
        append("description=$description,")
        append("domainId=$domainId,")
        append("layoutConfiguration=$layoutConfiguration,")
        append("name=$name,")
        append("requiredFields=$requiredFields,")
        append("status=$status,")
        append("templateId=$templateId")
        append(")")
    }

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

        if (description != other.description) return false
        if (domainId != other.domainId) return false
        if (layoutConfiguration != other.layoutConfiguration) return false
        if (name != other.name) return false
        if (requiredFields != other.requiredFields) return false
        if (status != other.status) return false
        if (templateId != other.templateId) return false

        return true
    }

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

    public class Builder {
        /**
         * A brief description of the template.
         */
        public var description: kotlin.String? = null
        /**
         * The unique identifier of the Cases domain.
         */
        public var domainId: kotlin.String? = null
        /**
         * Configuration of layouts associated to the template.
         */
        public var layoutConfiguration: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration? = null
        /**
         * The name of the template. It must be unique per domain.
         */
        public var name: kotlin.String? = null
        /**
         * A list of fields that must contain a value for a case to be successfully created with this template.
         */
        public var requiredFields: List? = null
        /**
         * The status of the template.
         */
        public var status: aws.sdk.kotlin.services.connectcases.model.TemplateStatus? = null
        /**
         * A unique identifier for the template.
         */
        public var templateId: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connectcases.model.UpdateTemplateRequest) : this() {
            this.description = x.description
            this.domainId = x.domainId
            this.layoutConfiguration = x.layoutConfiguration
            this.name = x.name
            this.requiredFields = x.requiredFields
            this.status = x.status
            this.templateId = x.templateId
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration] inside the given [block]
         */
        public fun layoutConfiguration(block: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration.Builder.() -> kotlin.Unit) {
            this.layoutConfiguration = aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy