commonMain.aws.sdk.kotlin.services.bedrockagent.model.UpdatePromptRequest.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
public class UpdatePromptRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
*/
public val customerEncryptionKeyArn: kotlin.String? = builder.customerEncryptionKeyArn
/**
* The name of the default variant for the prompt. This value must match the `name` field in the relevant [PromptVariant](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptVariant.html) object.
*/
public val defaultVariant: kotlin.String? = builder.defaultVariant
/**
* A description for the prompt.
*/
public val description: kotlin.String? = builder.description
/**
* A name for the prompt.
*/
public val name: kotlin.String? = builder.name
/**
* The unique identifier of the prompt.
*/
public val promptIdentifier: kotlin.String? = builder.promptIdentifier
/**
* A list of objects, each containing details about a variant of the prompt.
*/
public val variants: List? = builder.variants
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.UpdatePromptRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdatePromptRequest(")
append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
append("defaultVariant=$defaultVariant,")
append("description=$description,")
append("name=$name,")
append("promptIdentifier=$promptIdentifier,")
append("variants=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = customerEncryptionKeyArn?.hashCode() ?: 0
result = 31 * result + (defaultVariant?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (promptIdentifier?.hashCode() ?: 0)
result = 31 * result + (variants?.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 UpdatePromptRequest
if (customerEncryptionKeyArn != other.customerEncryptionKeyArn) return false
if (defaultVariant != other.defaultVariant) return false
if (description != other.description) return false
if (name != other.name) return false
if (promptIdentifier != other.promptIdentifier) return false
if (variants != other.variants) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.UpdatePromptRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.
*/
public var customerEncryptionKeyArn: kotlin.String? = null
/**
* The name of the default variant for the prompt. This value must match the `name` field in the relevant [PromptVariant](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptVariant.html) object.
*/
public var defaultVariant: kotlin.String? = null
/**
* A description for the prompt.
*/
public var description: kotlin.String? = null
/**
* A name for the prompt.
*/
public var name: kotlin.String? = null
/**
* The unique identifier of the prompt.
*/
public var promptIdentifier: kotlin.String? = null
/**
* A list of objects, each containing details about a variant of the prompt.
*/
public var variants: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.UpdatePromptRequest) : this() {
this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
this.defaultVariant = x.defaultVariant
this.description = x.description
this.name = x.name
this.promptIdentifier = x.promptIdentifier
this.variants = x.variants
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.UpdatePromptRequest = UpdatePromptRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}