commonMain.aws.sdk.kotlin.services.bedrock.model.CreateGuardrailVersionRequest.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
public class CreateGuardrailVersionRequest private constructor(builder: Builder) {
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) in the *Amazon S3 User Guide*.
*/
public val clientRequestToken: kotlin.String? = builder.clientRequestToken
/**
* A description of the guardrail version.
*/
public val description: kotlin.String? = builder.description
/**
* The unique identifier of the guardrail.
*/
public val guardrailIdentifier: kotlin.String? = builder.guardrailIdentifier
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrock.model.CreateGuardrailVersionRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateGuardrailVersionRequest(")
append("clientRequestToken=$clientRequestToken,")
append("description=*** Sensitive Data Redacted ***,")
append("guardrailIdentifier=$guardrailIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = clientRequestToken?.hashCode() ?: 0
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (guardrailIdentifier?.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 CreateGuardrailVersionRequest
if (clientRequestToken != other.clientRequestToken) return false
if (description != other.description) return false
if (guardrailIdentifier != other.guardrailIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrock.model.CreateGuardrailVersionRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* A unique, case-sensitive identifier to ensure that the API request completes no more than once. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see [Ensuring idempotency](https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html) in the *Amazon S3 User Guide*.
*/
public var clientRequestToken: kotlin.String? = null
/**
* A description of the guardrail version.
*/
public var description: kotlin.String? = null
/**
* The unique identifier of the guardrail.
*/
public var guardrailIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrock.model.CreateGuardrailVersionRequest) : this() {
this.clientRequestToken = x.clientRequestToken
this.description = x.description
this.guardrailIdentifier = x.guardrailIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrock.model.CreateGuardrailVersionRequest = CreateGuardrailVersionRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy