commonMain.aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bedrockagent-jvm Show documentation
Show all versions of bedrockagent-jvm Show documentation
The AWS SDK for Kotlin client for Bedrock Agent
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockagent.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details about the guardrail associated with an agent.
*/
public class GuardrailConfiguration private constructor(builder: Builder) {
/**
* The unique identifier of the guardrail.
*/
public val guardrailIdentifier: kotlin.String? = builder.guardrailIdentifier
/**
* The version of the guardrail.
*/
public val guardrailVersion: kotlin.String? = builder.guardrailVersion
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GuardrailConfiguration(")
append("guardrailIdentifier=$guardrailIdentifier,")
append("guardrailVersion=$guardrailVersion")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = guardrailIdentifier?.hashCode() ?: 0
result = 31 * result + (guardrailVersion?.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 GuardrailConfiguration
if (guardrailIdentifier != other.guardrailIdentifier) return false
if (guardrailVersion != other.guardrailVersion) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the guardrail.
*/
public var guardrailIdentifier: kotlin.String? = null
/**
* The version of the guardrail.
*/
public var guardrailVersion: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration) : this() {
this.guardrailIdentifier = x.guardrailIdentifier
this.guardrailVersion = x.guardrailVersion
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration = GuardrailConfiguration(this)
internal fun correctErrors(): Builder {
return this
}
}
}