
commonMain.aws.sdk.kotlin.services.bedrock.model.GuardrailContentPolicy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrock.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Contains details about how to handle harmful content.
*
* This data type is used in the following API operations:
* + [GetGuardrail response body](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_GetGuardrail.html#API_GetGuardrail_ResponseSyntax)
*/
public class GuardrailContentPolicy private constructor(builder: Builder) {
/**
* Contains the type of the content filter and how strongly it should apply to prompts and model responses.
*/
public val filters: List? = builder.filters
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrock.model.GuardrailContentPolicy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GuardrailContentPolicy(")
append("filters=$filters")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = filters?.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 GuardrailContentPolicy
if (filters != other.filters) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrock.model.GuardrailContentPolicy = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Contains the type of the content filter and how strongly it should apply to prompts and model responses.
*/
public var filters: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrock.model.GuardrailContentPolicy) : this() {
this.filters = x.filters
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrock.model.GuardrailContentPolicy = GuardrailContentPolicy(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy