commonMain.aws.sdk.kotlin.services.bedrockagent.model.UpdateAgentRequest.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 UpdateAgentRequest private constructor(builder: Builder) {
/**
* The unique identifier of the agent.
*/
public val agentId: kotlin.String? = builder.agentId
/**
* Specifies a new name for the agent.
*/
public val agentName: kotlin.String? = builder.agentName
/**
* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
*/
public val agentResourceRoleArn: kotlin.String? = builder.agentResourceRoleArn
/**
* The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
*/
public val customerEncryptionKeyArn: kotlin.String? = builder.customerEncryptionKeyArn
/**
* Specifies a new description of the agent.
*/
public val description: kotlin.String? = builder.description
/**
* Specifies a new foundation model to be used for orchestration by the agent.
*/
public val foundationModel: kotlin.String? = builder.foundationModel
/**
* The unique Guardrail configuration assigned to the agent when it is updated.
*/
public val guardrailConfiguration: aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration? = builder.guardrailConfiguration
/**
* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
*
* A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
*/
public val idleSessionTtlInSeconds: kotlin.Int? = builder.idleSessionTtlInSeconds
/**
* Specifies new instructions that tell the agent what it should do and how it should interact with users.
*/
public val instruction: kotlin.String? = builder.instruction
/**
* Specifies the new memory configuration for the agent.
*/
public val memoryConfiguration: aws.sdk.kotlin.services.bedrockagent.model.MemoryConfiguration? = builder.memoryConfiguration
/**
* Contains configurations to override prompts in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html).
*/
public val promptOverrideConfiguration: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration? = builder.promptOverrideConfiguration
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.UpdateAgentRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("UpdateAgentRequest(")
append("agentId=$agentId,")
append("agentName=$agentName,")
append("agentResourceRoleArn=$agentResourceRoleArn,")
append("customerEncryptionKeyArn=$customerEncryptionKeyArn,")
append("description=$description,")
append("foundationModel=$foundationModel,")
append("guardrailConfiguration=$guardrailConfiguration,")
append("idleSessionTtlInSeconds=$idleSessionTtlInSeconds,")
append("instruction=*** Sensitive Data Redacted ***,")
append("memoryConfiguration=$memoryConfiguration,")
append("promptOverrideConfiguration=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = agentId?.hashCode() ?: 0
result = 31 * result + (agentName?.hashCode() ?: 0)
result = 31 * result + (agentResourceRoleArn?.hashCode() ?: 0)
result = 31 * result + (customerEncryptionKeyArn?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (foundationModel?.hashCode() ?: 0)
result = 31 * result + (guardrailConfiguration?.hashCode() ?: 0)
result = 31 * result + (idleSessionTtlInSeconds ?: 0)
result = 31 * result + (instruction?.hashCode() ?: 0)
result = 31 * result + (memoryConfiguration?.hashCode() ?: 0)
result = 31 * result + (promptOverrideConfiguration?.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 UpdateAgentRequest
if (agentId != other.agentId) return false
if (agentName != other.agentName) return false
if (agentResourceRoleArn != other.agentResourceRoleArn) return false
if (customerEncryptionKeyArn != other.customerEncryptionKeyArn) return false
if (description != other.description) return false
if (foundationModel != other.foundationModel) return false
if (guardrailConfiguration != other.guardrailConfiguration) return false
if (idleSessionTtlInSeconds != other.idleSessionTtlInSeconds) return false
if (instruction != other.instruction) return false
if (memoryConfiguration != other.memoryConfiguration) return false
if (promptOverrideConfiguration != other.promptOverrideConfiguration) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.UpdateAgentRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The unique identifier of the agent.
*/
public var agentId: kotlin.String? = null
/**
* Specifies a new name for the agent.
*/
public var agentName: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the agent.
*/
public var agentResourceRoleArn: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the KMS key with which to encrypt the agent.
*/
public var customerEncryptionKeyArn: kotlin.String? = null
/**
* Specifies a new description of the agent.
*/
public var description: kotlin.String? = null
/**
* Specifies a new foundation model to be used for orchestration by the agent.
*/
public var foundationModel: kotlin.String? = null
/**
* The unique Guardrail configuration assigned to the agent when it is updated.
*/
public var guardrailConfiguration: aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration? = null
/**
* The number of seconds for which Amazon Bedrock keeps information about a user's conversation with the agent.
*
* A user interaction remains active for the amount of time specified. If no conversation occurs during this time, the session expires and Amazon Bedrock deletes any data provided before the timeout.
*/
public var idleSessionTtlInSeconds: kotlin.Int? = null
/**
* Specifies new instructions that tell the agent what it should do and how it should interact with users.
*/
public var instruction: kotlin.String? = null
/**
* Specifies the new memory configuration for the agent.
*/
public var memoryConfiguration: aws.sdk.kotlin.services.bedrockagent.model.MemoryConfiguration? = null
/**
* Contains configurations to override prompts in different parts of an agent sequence. For more information, see [Advanced prompts](https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html).
*/
public var promptOverrideConfiguration: aws.sdk.kotlin.services.bedrockagent.model.PromptOverrideConfiguration? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.UpdateAgentRequest) : this() {
this.agentId = x.agentId
this.agentName = x.agentName
this.agentResourceRoleArn = x.agentResourceRoleArn
this.customerEncryptionKeyArn = x.customerEncryptionKeyArn
this.description = x.description
this.foundationModel = x.foundationModel
this.guardrailConfiguration = x.guardrailConfiguration
this.idleSessionTtlInSeconds = x.idleSessionTtlInSeconds
this.instruction = x.instruction
this.memoryConfiguration = x.memoryConfiguration
this.promptOverrideConfiguration = x.promptOverrideConfiguration
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.UpdateAgentRequest = UpdateAgentRequest(this)
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration] inside the given [block]
*/
public fun guardrailConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration.Builder.() -> kotlin.Unit) {
this.guardrailConfiguration = aws.sdk.kotlin.services.bedrockagent.model.GuardrailConfiguration.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.bedrockagent.model.MemoryConfiguration] inside the given [block]
*/
public fun memoryConfiguration(block: aws.sdk.kotlin.services.bedrockagent.model.MemoryConfiguration.Builder.() -> kotlin.Unit) {
this.memoryConfiguration = aws.sdk.kotlin.services.bedrockagent.model.MemoryConfiguration.invoke(block)
}
/**
* 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
}
}
}