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

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

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

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



/**
 * Object for the summarized details of the field.
 */
public class FieldSummary private constructor(builder: Builder) {
    /**
     * The Amazon Resource Name (ARN) of the field.
     */
    public val fieldArn: kotlin.String = requireNotNull(builder.fieldArn) { "A non-null value must be provided for fieldArn" }
    /**
     * The unique identifier of a field.
     */
    public val fieldId: kotlin.String = requireNotNull(builder.fieldId) { "A non-null value must be provided for fieldId" }
    /**
     * Name of the field.
     */
    public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
    /**
     * The namespace of a field.
     */
    public val namespace: aws.sdk.kotlin.services.connectcases.model.FieldNamespace = requireNotNull(builder.namespace) { "A non-null value must be provided for namespace" }
    /**
     * The type of a field.
     */
    public val type: aws.sdk.kotlin.services.connectcases.model.FieldType = requireNotNull(builder.type) { "A non-null value must be provided for type" }

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

    override fun toString(): kotlin.String = buildString {
        append("FieldSummary(")
        append("fieldArn=$fieldArn,")
        append("fieldId=$fieldId,")
        append("name=$name,")
        append("namespace=$namespace,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = fieldArn.hashCode()
        result = 31 * result + (fieldId.hashCode())
        result = 31 * result + (name.hashCode())
        result = 31 * result + (namespace.hashCode())
        result = 31 * result + (type.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 FieldSummary

        if (fieldArn != other.fieldArn) return false
        if (fieldId != other.fieldId) return false
        if (name != other.name) return false
        if (namespace != other.namespace) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The Amazon Resource Name (ARN) of the field.
         */
        public var fieldArn: kotlin.String? = null
        /**
         * The unique identifier of a field.
         */
        public var fieldId: kotlin.String? = null
        /**
         * Name of the field.
         */
        public var name: kotlin.String? = null
        /**
         * The namespace of a field.
         */
        public var namespace: aws.sdk.kotlin.services.connectcases.model.FieldNamespace? = null
        /**
         * The type of a field.
         */
        public var type: aws.sdk.kotlin.services.connectcases.model.FieldType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.connectcases.model.FieldSummary) : this() {
            this.fieldArn = x.fieldArn
            this.fieldId = x.fieldId
            this.name = x.name
            this.namespace = x.namespace
            this.type = x.type
        }

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

        internal fun correctErrors(): Builder {
            if (fieldArn == null) fieldArn = ""
            if (fieldId == null) fieldId = ""
            if (name == null) name = ""
            if (namespace == null) namespace = FieldNamespace.SdkUnknown("no value provided")
            if (type == null) type = FieldType.SdkUnknown("no value provided")
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy