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

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

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

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



public class InferRxNormResponse private constructor(builder: Builder) {
    /**
     * The medication entities detected in the text linked to RxNorm concepts. If the action is successful, the service sends back an HTTP 200 response, as well as the entities detected.
     */
    public val entities: List = requireNotNull(builder.entities) { "A non-null value must be provided for entities" }
    /**
     * The version of the model used to analyze the documents, in the format *n*.*n*.*n* You can use this information to track the model used for a particular batch of documents.
     */
    public val modelVersion: kotlin.String? = builder.modelVersion
    /**
     * If the result of the previous request to `InferRxNorm` was truncated, include the `PaginationToken` to fetch the next page of medication entities.
     */
    public val paginationToken: kotlin.String? = builder.paginationToken

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

    override fun toString(): kotlin.String = buildString {
        append("InferRxNormResponse(")
        append("entities=$entities,")
        append("modelVersion=$modelVersion,")
        append("paginationToken=$paginationToken")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = entities.hashCode()
        result = 31 * result + (modelVersion?.hashCode() ?: 0)
        result = 31 * result + (paginationToken?.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 InferRxNormResponse

        if (entities != other.entities) return false
        if (modelVersion != other.modelVersion) return false
        if (paginationToken != other.paginationToken) return false

        return true
    }

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

    public class Builder {
        /**
         * The medication entities detected in the text linked to RxNorm concepts. If the action is successful, the service sends back an HTTP 200 response, as well as the entities detected.
         */
        public var entities: List? = null
        /**
         * The version of the model used to analyze the documents, in the format *n*.*n*.*n* You can use this information to track the model used for a particular batch of documents.
         */
        public var modelVersion: kotlin.String? = null
        /**
         * If the result of the previous request to `InferRxNorm` was truncated, include the `PaginationToken` to fetch the next page of medication entities.
         */
        public var paginationToken: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.comprehendmedical.model.InferRxNormResponse) : this() {
            this.entities = x.entities
            this.modelVersion = x.modelVersion
            this.paginationToken = x.paginationToken
        }

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

        internal fun correctErrors(): Builder {
            if (entities == null) entities = emptyList()
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy