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

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

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

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



public class GetTemplateResponse private constructor(builder: Builder) {
    /**
     * A brief description of the template.
     */
    public val description: kotlin.String? = builder.description
    /**
     * Configuration of layouts associated to the template.
     */
    public val layoutConfiguration: aws.sdk.kotlin.services.connectcases.model.LayoutConfiguration? = builder.layoutConfiguration
    /**
     * The name of the template.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for 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 = requireNotNull(builder.status) { "A non-null value must be provided for status" }
    /**
     * A map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
     */
    public val tags: Map? = builder.tags
    /**
     * The Amazon Resource Name (ARN) of the template.
     */
    public val templateArn: kotlin.String = requireNotNull(builder.templateArn) { "A non-null value must be provided for templateArn" }
    /**
     * A unique identifier of a 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.GetTemplateResponse = Builder().apply(block).build()
    }

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

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

        if (description != other.description) 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 (tags != other.tags) return false
        if (templateArn != other.templateArn) return false
        if (templateId != other.templateId) return false

        return true
    }

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

    public class Builder {
        /**
         * A brief description of the template.
         */
        public var description: 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.
         */
        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 map of of key-value pairs that represent tags on a resource. Tags are used to organize, track, or control access for this resource.
         */
        public var tags: Map? = null
        /**
         * The Amazon Resource Name (ARN) of the template.
         */
        public var templateArn: kotlin.String? = null
        /**
         * A unique identifier of a template.
         */
        public var templateId: kotlin.String? = null

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

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.connectcases.model.GetTemplateResponse = GetTemplateResponse(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 (name == null) name = ""
            if (status == null) status = TemplateStatus.SdkUnknown("no value provided")
            if (templateArn == null) templateArn = ""
            if (templateId == null) templateId = ""
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy