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

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

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

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



/**
 * Create Agent Request
 */
public class CreateAgentRequest private constructor(builder: Builder) {
    /**
     * Name for a resource.
     */
    public val agentName: kotlin.String? = builder.agentName
    /**
     * ARN of a IAM role.
     */
    public val agentResourceRoleArn: kotlin.String? = builder.agentResourceRoleArn
    /**
     * Client specified token used for idempotency checks
     */
    public val clientToken: kotlin.String? = builder.clientToken
    /**
     * A KMS key ARN
     */
    public val customerEncryptionKeyArn: kotlin.String? = builder.customerEncryptionKeyArn
    /**
     * Description of the Resource.
     */
    public val description: kotlin.String? = builder.description
    /**
     * ARN or name of a Bedrock model.
     */
    public val foundationModel: kotlin.String? = builder.foundationModel
    /**
     * Max Session Time.
     */
    public val idleSessionTtlInSeconds: kotlin.Int? = builder.idleSessionTtlInSeconds
    /**
     * Instruction for the agent.
     */
    public val instruction: kotlin.String? = builder.instruction
    /**
     * Configuration for prompt override.
     */
    public val promptOverrideConfiguration: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration? = builder.promptOverrideConfiguration
    /**
     * A map of tag keys and values
     */
    public val tags: Map? = builder.tags

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.CreateAgentRequest = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("CreateAgentRequest(")
        append("agentName=$agentName,")
        append("agentResourceRoleArn=$agentResourceRoleArn,")
        append("clientToken=$clientToken,")
        append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
        append("description=$description,")
        append("foundationModel=$foundationModel,")
        append("idleSessionTtlInSeconds=$idleSessionTtlInSeconds,")
        append("instruction=*** Sensitive Data Redacted ***,")
        append("promptOverrideConfiguration=*** Sensitive Data Redacted ***,")
        append("tags=$tags")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = agentName?.hashCode() ?: 0
        result = 31 * result + (agentResourceRoleArn?.hashCode() ?: 0)
        result = 31 * result + (clientToken?.hashCode() ?: 0)
        result = 31 * result + (customerEncryptionKeyArn?.hashCode() ?: 0)
        result = 31 * result + (description?.hashCode() ?: 0)
        result = 31 * result + (foundationModel?.hashCode() ?: 0)
        result = 31 * result + (idleSessionTtlInSeconds ?: 0)
        result = 31 * result + (instruction?.hashCode() ?: 0)
        result = 31 * result + (promptOverrideConfiguration?.hashCode() ?: 0)
        result = 31 * result + (tags?.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 CreateAgentRequest

        if (agentName != other.agentName) return false
        if (agentResourceRoleArn != other.agentResourceRoleArn) return false
        if (clientToken != other.clientToken) return false
        if (customerEncryptionKeyArn != other.customerEncryptionKeyArn) return false
        if (description != other.description) return false
        if (foundationModel != other.foundationModel) return false
        if (idleSessionTtlInSeconds != other.idleSessionTtlInSeconds) return false
        if (instruction != other.instruction) return false
        if (promptOverrideConfiguration != other.promptOverrideConfiguration) return false
        if (tags != other.tags) return false

        return true
    }

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

    public class Builder {
        /**
         * Name for a resource.
         */
        public var agentName: kotlin.String? = null
        /**
         * ARN of a IAM role.
         */
        public var agentResourceRoleArn: kotlin.String? = null
        /**
         * Client specified token used for idempotency checks
         */
        public var clientToken: kotlin.String? = null
        /**
         * A KMS key ARN
         */
        public var customerEncryptionKeyArn: kotlin.String? = null
        /**
         * Description of the Resource.
         */
        public var description: kotlin.String? = null
        /**
         * ARN or name of a Bedrock model.
         */
        public var foundationModel: kotlin.String? = null
        /**
         * Max Session Time.
         */
        public var idleSessionTtlInSeconds: kotlin.Int? = null
        /**
         * Instruction for the agent.
         */
        public var instruction: kotlin.String? = null
        /**
         * Configuration for prompt override.
         */
        public var promptOverrideConfiguration: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration? = null
        /**
         * A map of tag keys and values
         */
        public var tags: Map? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.CreateAgentRequest) : this() {
            this.agentName = x.agentName
            this.agentResourceRoleArn = x.agentResourceRoleArn
            this.clientToken = x.clientToken
            this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
            this.description = x.description
            this.foundationModel = x.foundationModel
            this.idleSessionTtlInSeconds = x.idleSessionTtlInSeconds
            this.instruction = x.instruction
            this.promptOverrideConfiguration = x.promptOverrideConfiguration
            this.tags = x.tags
        }

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

        /**
         * construct an [aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration] inside the given [block]
         */
        public fun promptOverrideConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration.Builder.() -> kotlin.Unit) {
            this.promptOverrideConfiguration = aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration.invoke(block)
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy