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

commonMain.aws.sdk.kotlin.services.comprehendmedical.model.UnmappedAttribute.kt Maven / Gradle / Ivy

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

package aws.sdk.kotlin.services.comprehendmedical.model



/**
 * An attribute that was extracted, but Amazon Comprehend Medical was unable to relate to an entity.
 */
public class UnmappedAttribute private constructor(builder: Builder) {
    /**
     * The specific attribute that has been extracted but not mapped to an entity.
     */
    public val attribute: aws.sdk.kotlin.services.comprehendmedical.model.Attribute? = builder.attribute
    /**
     * The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".
     */
    public val type: aws.sdk.kotlin.services.comprehendmedical.model.EntityType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("UnmappedAttribute(")
        append("attribute=$attribute,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attribute?.hashCode() ?: 0
        result = 31 * result + (type?.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 UnmappedAttribute

        if (attribute != other.attribute) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The specific attribute that has been extracted but not mapped to an entity.
         */
        public var attribute: aws.sdk.kotlin.services.comprehendmedical.model.Attribute? = null
        /**
         * The type of the unmapped attribute, could be one of the following values: "MEDICATION", "MEDICAL_CONDITION", "ANATOMY", "TEST_AND_TREATMENT_PROCEDURE" or "PROTECTED_HEALTH_INFORMATION".
         */
        public var type: aws.sdk.kotlin.services.comprehendmedical.model.EntityType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehendmedical.model.UnmappedAttribute) : this() {
            this.attribute = x.attribute
            this.type = x.type
        }

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

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

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy