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

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

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

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



/**
 * The collection of medical entities extracted from the input text and their associated information. For each entity, the response provides the entity text, the entity category, where the entity text begins and ends, and the level of confidence that Amazon Comprehend Medical has in the detection and analysis. Attributes and traits of the entity are also returned.
 */
public class Icd10CmEntity private constructor(builder: Builder) {
    /**
     * The detected attributes that relate to the entity. An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the nature of a medical condition.
     */
    public val attributes: List? = builder.attributes
    /**
     * The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.
     */
    public val beginOffset: kotlin.Int? = builder.beginOffset
    /**
     * The category of the entity. InferICD10CM detects entities in the `MEDICAL_CONDITION` category.
     */
    public val category: aws.sdk.kotlin.services.comprehendmedical.model.Icd10CmEntityCategory? = builder.category
    /**
     * The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.
     */
    public val endOffset: kotlin.Int? = builder.endOffset
    /**
     * The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match.
     */
    public val icd10CmConcepts: List? = builder.icd10CmConcepts
    /**
     * The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.
     */
    public val id: kotlin.Int? = builder.id
    /**
     * The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection.
     */
    public val score: kotlin.Float? = builder.score
    /**
     * The segment of input text that is matched to the detected entity.
     */
    public val text: kotlin.String? = builder.text
    /**
     * Provides Contextual information for the entity. The traits recognized by InferICD10CM are `DIAGNOSIS`, `SIGN`, `SYMPTOM`, and `NEGATION.`
     */
    public val traits: List? = builder.traits
    /**
     * Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type `DX_NAME` and `TIME_EXPRESSION`.
     */
    public val type: aws.sdk.kotlin.services.comprehendmedical.model.Icd10CmEntityType? = builder.type

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

    override fun toString(): kotlin.String = buildString {
        append("Icd10CmEntity(")
        append("attributes=$attributes,")
        append("beginOffset=$beginOffset,")
        append("category=$category,")
        append("endOffset=$endOffset,")
        append("icd10CmConcepts=$icd10CmConcepts,")
        append("id=$id,")
        append("score=$score,")
        append("text=$text,")
        append("traits=$traits,")
        append("type=$type")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = attributes?.hashCode() ?: 0
        result = 31 * result + (beginOffset ?: 0)
        result = 31 * result + (category?.hashCode() ?: 0)
        result = 31 * result + (endOffset ?: 0)
        result = 31 * result + (icd10CmConcepts?.hashCode() ?: 0)
        result = 31 * result + (id ?: 0)
        result = 31 * result + (score?.hashCode() ?: 0)
        result = 31 * result + (text?.hashCode() ?: 0)
        result = 31 * result + (traits?.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 Icd10CmEntity

        if (attributes != other.attributes) return false
        if (beginOffset != other.beginOffset) return false
        if (category != other.category) return false
        if (endOffset != other.endOffset) return false
        if (icd10CmConcepts != other.icd10CmConcepts) return false
        if (id != other.id) return false
        if (score != other.score) return false
        if (text != other.text) return false
        if (traits != other.traits) return false
        if (type != other.type) return false

        return true
    }

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

    public class Builder {
        /**
         * The detected attributes that relate to the entity. An extracted segment of the text that is an attribute of an entity, or otherwise related to an entity, such as the nature of a medical condition.
         */
        public var attributes: List? = null
        /**
         * The 0-based character offset in the input text that shows where the entity begins. The offset returns the UTF-8 code point in the string.
         */
        public var beginOffset: kotlin.Int? = null
        /**
         * The category of the entity. InferICD10CM detects entities in the `MEDICAL_CONDITION` category.
         */
        public var category: aws.sdk.kotlin.services.comprehendmedical.model.Icd10CmEntityCategory? = null
        /**
         * The 0-based character offset in the input text that shows where the entity ends. The offset returns the UTF-8 code point in the string.
         */
        public var endOffset: kotlin.Int? = null
        /**
         * The ICD-10-CM concepts that the entity could refer to, along with a score indicating the likelihood of the match.
         */
        public var icd10CmConcepts: List? = null
        /**
         * The numeric identifier for the entity. This is a monotonically increasing id unique within this response rather than a global unique identifier.
         */
        public var id: kotlin.Int? = null
        /**
         * The level of confidence that Amazon Comprehend Medical has in the accuracy of the detection.
         */
        public var score: kotlin.Float? = null
        /**
         * The segment of input text that is matched to the detected entity.
         */
        public var text: kotlin.String? = null
        /**
         * Provides Contextual information for the entity. The traits recognized by InferICD10CM are `DIAGNOSIS`, `SIGN`, `SYMPTOM`, and `NEGATION.`
         */
        public var traits: List? = null
        /**
         * Describes the specific type of entity with category of entities. InferICD10CM detects entities of the type `DX_NAME` and `TIME_EXPRESSION`.
         */
        public var type: aws.sdk.kotlin.services.comprehendmedical.model.Icd10CmEntityType? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehendmedical.model.Icd10CmEntity) : this() {
            this.attributes = x.attributes
            this.beginOffset = x.beginOffset
            this.category = x.category
            this.endOffset = x.endOffset
            this.icd10CmConcepts = x.icd10CmConcepts
            this.id = x.id
            this.score = x.score
            this.text = x.text
            this.traits = x.traits
            this.type = x.type
        }

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy