commonMain.aws.sdk.kotlin.services.comprehend.model.RedactionConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of comprehend-jvm Show documentation
Show all versions of comprehend-jvm Show documentation
The AWS SDK for Kotlin client for Comprehend
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.comprehend.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Provides configuration parameters for PII entity redaction.
*/
public class RedactionConfig private constructor(builder: Builder) {
/**
* A character that replaces each character in the redacted PII entity.
*/
public val maskCharacter: kotlin.String? = builder.maskCharacter
/**
* Specifies whether the PII entity is redacted with the mask character or the entity type.
*/
public val maskMode: aws.sdk.kotlin.services.comprehend.model.PiiEntitiesDetectionMaskMode? = builder.maskMode
/**
* An array of the types of PII entities that Amazon Comprehend detects in the input text for your request.
*/
public val piiEntityTypes: List? = builder.piiEntityTypes
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.comprehend.model.RedactionConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("RedactionConfig(")
append("maskCharacter=$maskCharacter,")
append("maskMode=$maskMode,")
append("piiEntityTypes=$piiEntityTypes")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maskCharacter?.hashCode() ?: 0
result = 31 * result + (maskMode?.hashCode() ?: 0)
result = 31 * result + (piiEntityTypes?.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 RedactionConfig
if (maskCharacter != other.maskCharacter) return false
if (maskMode != other.maskMode) return false
if (piiEntityTypes != other.piiEntityTypes) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.comprehend.model.RedactionConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A character that replaces each character in the redacted PII entity.
*/
public var maskCharacter: kotlin.String? = null
/**
* Specifies whether the PII entity is redacted with the mask character or the entity type.
*/
public var maskMode: aws.sdk.kotlin.services.comprehend.model.PiiEntitiesDetectionMaskMode? = null
/**
* An array of the types of PII entities that Amazon Comprehend detects in the input text for your request.
*/
public var piiEntityTypes: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.comprehend.model.RedactionConfig) : this() {
this.maskCharacter = x.maskCharacter
this.maskMode = x.maskMode
this.piiEntityTypes = x.piiEntityTypes
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.comprehend.model.RedactionConfig = RedactionConfig(this)
internal fun correctErrors(): Builder {
return this
}
}
}