commonMain.aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextCharactersCoverage.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockruntime-jvm Show documentation
Show all versions of bedrockruntime-jvm Show documentation
The AWS Kotlin client for Bedrock Runtime
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The guardrail coverage for the text characters.
*/
public class GuardrailTextCharactersCoverage private constructor(builder: Builder) {
/**
* The text characters that were guarded by the guardrail coverage.
*/
public val guarded: kotlin.Int? = builder.guarded
/**
* The total text characters by the guardrail coverage.
*/
public val total: kotlin.Int? = builder.total
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextCharactersCoverage = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GuardrailTextCharactersCoverage(")
append("guarded=$guarded,")
append("total=$total")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = guarded ?: 0
result = 31 * result + (total ?: 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 GuardrailTextCharactersCoverage
if (guarded != other.guarded) return false
if (total != other.total) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextCharactersCoverage = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The text characters that were guarded by the guardrail coverage.
*/
public var guarded: kotlin.Int? = null
/**
* The total text characters by the guardrail coverage.
*/
public var total: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextCharactersCoverage) : this() {
this.guarded = x.guarded
this.total = x.total
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.GuardrailTextCharactersCoverage = GuardrailTextCharactersCoverage(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy