All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.bedrockagent.model.CreatePromptRequest.kt Maven / Gradle / Ivy

// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.bedrockagent.model

import aws.smithy.kotlin.runtime.SdkDsl

public class CreatePromptRequest private constructor(builder: Builder) {
    /**
     * A unique, case-sensitive identifier to ensure that the API request completes no more than one time. 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).
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * 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
    /**
     * Any tags that you want to attach to the prompt. For more information, see [Tagging resources in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html).
     */
    public val tags: Map? = builder.tags
    /**
     * 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.CreatePromptRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreatePromptRequest(")
        append("clientToken=$clientToken,")
        append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
        append("defaultVariant=$defaultVariant,")
        append("description=$description,")
        append("name=$name,")
        append("tags=$tags,")
        append("variants=*** Sensitive Data Redacted ***")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = clientToken?.hashCode() ?: 0
        result = 31 * 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 + (tags?.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 CreatePromptRequest

        if (clientToken != other.clientToken) return false
        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 (tags != other.tags) return false
        if (variants != other.variants) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.CreatePromptRequest = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * A unique, case-sensitive identifier to ensure that the API request completes no more than one time. 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).
         */
        public var clientToken: kotlin.String? = null
        /**
         * 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
        /**
         * Any tags that you want to attach to the prompt. For more information, see [Tagging resources in Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/tagging.html).
         */
        public var tags: Map? = 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.CreatePromptRequest) : this() {
            this.clientToken = x.clientToken
            this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
            this.defaultVariant = x.defaultVariant
            this.description = x.description
            this.name = x.name
            this.tags = x.tags
            this.variants = x.variants
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.CreatePromptRequest = CreatePromptRequest(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy