
commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailSensitiveInformationPolicyAssessment.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The assessment for aPersonally Identifiable Information (PII) policy.
*/
public class GuardrailSensitiveInformationPolicyAssessment private constructor(builder: Builder) {
/**
* The PII entities in the assessment.
*/
public val piiEntities: List = requireNotNull(builder.piiEntities) { "A non-null value must be provided for piiEntities" }
/**
* The regex queries in the assessment.
*/
public val regexes: List = requireNotNull(builder.regexes) { "A non-null value must be provided for regexes" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailSensitiveInformationPolicyAssessment = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GuardrailSensitiveInformationPolicyAssessment(")
append("piiEntities=$piiEntities,")
append("regexes=$regexes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = piiEntities.hashCode()
result = 31 * result + (regexes.hashCode())
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 GuardrailSensitiveInformationPolicyAssessment
if (piiEntities != other.piiEntities) return false
if (regexes != other.regexes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailSensitiveInformationPolicyAssessment = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The PII entities in the assessment.
*/
public var piiEntities: List? = null
/**
* The regex queries in the assessment.
*/
public var regexes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailSensitiveInformationPolicyAssessment) : this() {
this.piiEntities = x.piiEntities
this.regexes = x.regexes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailSensitiveInformationPolicyAssessment = GuardrailSensitiveInformationPolicyAssessment(this)
internal fun correctErrors(): Builder {
if (piiEntities == null) piiEntities = emptyList()
if (regexes == null) regexes = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy