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

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

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

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



public class DetectPhiResponse private constructor(builder: Builder) {
    /**
     * The collection of PHI 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 its detection.
     */
    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. The version number looks like X.X.X. You can use this information to track the model used for a particular batch of documents.
     */
    public val modelVersion: kotlin.String = requireNotNull(builder.modelVersion) { "A non-null value must be provided for modelVersion" }
    /**
     * If the result of the previous request to `DetectPHI` was truncated, include the `PaginationToken` to fetch the next page of PHI 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.DetectPhiResponse = Builder().apply(block).build()
    }

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

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

        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.DetectPhiResponse = Builder(this).apply(block).build()

    public class Builder {
        /**
         * The collection of PHI 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 its detection.
         */
        public var entities: List? = null
        /**
         * The version of the model used to analyze the documents. The version number looks like X.X.X. 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 `DetectPHI` was truncated, include the `PaginationToken` to fetch the next page of PHI entities.
         */
        public var paginationToken: kotlin.String? = null

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy