commonMain.aws.sdk.kotlin.services.bedrock.model.GuardrailTopicPolicyConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrock-jvm Show documentation
Show all versions of bedrock-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock
// 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 topics that the guardrail should identify and deny.
*/
public class GuardrailTopicPolicyConfig private constructor(builder: Builder) {
/**
* A list of policies related to topics that the guardrail should deny.
*/
public val topicsConfig: List = requireNotNull(builder.topicsConfig) { "A non-null value must be provided for topicsConfig" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrock.model.GuardrailTopicPolicyConfig = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GuardrailTopicPolicyConfig(")
append("topicsConfig=$topicsConfig")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = topicsConfig.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 GuardrailTopicPolicyConfig
if (topicsConfig != other.topicsConfig) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrock.model.GuardrailTopicPolicyConfig = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A list of policies related to topics that the guardrail should deny.
*/
public var topicsConfig: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrock.model.GuardrailTopicPolicyConfig) : this() {
this.topicsConfig = x.topicsConfig
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrock.model.GuardrailTopicPolicyConfig = GuardrailTopicPolicyConfig(this)
internal fun correctErrors(): Builder {
if (topicsConfig == null) topicsConfig = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy