commonMain.aws.sdk.kotlin.services.bedrockruntime.model.ApplyGuardrailRequest.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 SDK for 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
public class ApplyGuardrailRequest private constructor(builder: Builder) {
/**
* The content details used in the request to apply the guardrail.
*/
public val content: List? = builder.content
/**
* The guardrail identifier used in the request to apply the guardrail.
*/
public val guardrailIdentifier: kotlin.String? = builder.guardrailIdentifier
/**
* The guardrail version used in the request to apply the guardrail.
*/
public val guardrailVersion: kotlin.String? = builder.guardrailVersion
/**
* The source of data used in the request to apply the guardrail.
*/
public val source: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailContentSource? = builder.source
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockruntime.model.ApplyGuardrailRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ApplyGuardrailRequest(")
append("content=$content,")
append("guardrailIdentifier=$guardrailIdentifier,")
append("guardrailVersion=$guardrailVersion,")
append("source=$source")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = content?.hashCode() ?: 0
result = 31 * result + (guardrailIdentifier?.hashCode() ?: 0)
result = 31 * result + (guardrailVersion?.hashCode() ?: 0)
result = 31 * result + (source?.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 ApplyGuardrailRequest
if (content != other.content) return false
if (guardrailIdentifier != other.guardrailIdentifier) return false
if (guardrailVersion != other.guardrailVersion) return false
if (source != other.source) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockruntime.model.ApplyGuardrailRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The content details used in the request to apply the guardrail.
*/
public var content: List? = null
/**
* The guardrail identifier used in the request to apply the guardrail.
*/
public var guardrailIdentifier: kotlin.String? = null
/**
* The guardrail version used in the request to apply the guardrail.
*/
public var guardrailVersion: kotlin.String? = null
/**
* The source of data used in the request to apply the guardrail.
*/
public var source: aws.sdk.kotlin.services.bedrockruntime.model.GuardrailContentSource? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockruntime.model.ApplyGuardrailRequest) : this() {
this.content = x.content
this.guardrailIdentifier = x.guardrailIdentifier
this.guardrailVersion = x.guardrailVersion
this.source = x.source
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockruntime.model.ApplyGuardrailRequest = ApplyGuardrailRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}