
commonMain.aws.sdk.kotlin.services.comprehendmedical.model.RxNormAttribute.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehendmedical.model
/**
* The extracted attributes that relate to this entity. The attributes recognized by InferRxNorm are `DOSAGE`, `DURATION`, `FORM`, `FREQUENCY`, `RATE`, `ROUTE_OR_MODE`.
*/
public class RxNormAttribute private constructor(builder: Builder) {
/**
* The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.
*/
public val beginOffset: kotlin.Int? = builder.beginOffset
/**
* The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.
*/
public val endOffset: kotlin.Int? = builder.endOffset
/**
* The numeric identifier for this attribute. 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 that the attribute is accurately linked to an entity.
*/
public val relationshipScore: kotlin.Float? = builder.relationshipScore
/**
* The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.
*/
public val score: kotlin.Float? = builder.score
/**
* The segment of input text which corresponds to the detected attribute.
*/
public val text: kotlin.String? = builder.text
/**
* Contextual information for the attribute. InferRxNorm recognizes the trait `NEGATION` for attributes, i.e. that the patient is not taking a specific dose or form of a medication.
*/
public val traits: List? = builder.traits
/**
* The type of attribute. The types of attributes recognized by InferRxNorm are `BRAND_NAME` and `GENERIC_NAME`.
*/
public val type: aws.sdk.kotlin.services.comprehendmedical.model.RxNormAttributeType? = builder.type
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehendmedical.model.RxNormAttribute = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RxNormAttribute(")
append("beginOffset=$beginOffset,")
append("endOffset=$endOffset,")
append("id=$id,")
append("relationshipScore=$relationshipScore,")
append("score=$score,")
append("text=$text,")
append("traits=$traits,")
append("type=$type")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = beginOffset ?: 0
result = 31 * result + (endOffset ?: 0)
result = 31 * result + (id ?: 0)
result = 31 * result + (relationshipScore?.hashCode() ?: 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 RxNormAttribute
if (beginOffset != other.beginOffset) return false
if (endOffset != other.endOffset) return false
if (id != other.id) return false
if (relationshipScore != other.relationshipScore) 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.RxNormAttribute = Builder(this).apply(block).build()
public class Builder {
/**
* The 0-based character offset in the input text that shows where the attribute begins. The offset returns the UTF-8 code point in the string.
*/
public var beginOffset: kotlin.Int? = null
/**
* The 0-based character offset in the input text that shows where the attribute ends. The offset returns the UTF-8 code point in the string.
*/
public var endOffset: kotlin.Int? = null
/**
* The numeric identifier for this attribute. 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 that the attribute is accurately linked to an entity.
*/
public var relationshipScore: kotlin.Float? = null
/**
* The level of confidence that Amazon Comprehend Medical has that the segment of text is correctly recognized as an attribute.
*/
public var score: kotlin.Float? = null
/**
* The segment of input text which corresponds to the detected attribute.
*/
public var text: kotlin.String? = null
/**
* Contextual information for the attribute. InferRxNorm recognizes the trait `NEGATION` for attributes, i.e. that the patient is not taking a specific dose or form of a medication.
*/
public var traits: List? = null
/**
* The type of attribute. The types of attributes recognized by InferRxNorm are `BRAND_NAME` and `GENERIC_NAME`.
*/
public var type: aws.sdk.kotlin.services.comprehendmedical.model.RxNormAttributeType? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehendmedical.model.RxNormAttribute) : this() {
this.beginOffset = x.beginOffset
this.endOffset = x.endOffset
this.id = x.id
this.relationshipScore = x.relationshipScore
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.RxNormAttribute = RxNormAttribute(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy