commonMain.aws.sdk.kotlin.services.bedrockagent.model.CreateAgentActionGroupRequest.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
public class CreateAgentActionGroupRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
*/
public val actionGroupExecutor: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupExecutor? = builder.actionGroupExecutor
/**
* The name to give the action group.
*/
public val actionGroupName: kotlin.String? = builder.actionGroupName
/**
* Specifies whether the action group is available for the agent to invoke or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request.
*/
public val actionGroupState: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupState? = builder.actionGroupState
/**
* The unique identifier of the agent for which to create the action group.
*/
public val agentId: kotlin.String? = builder.agentId
/**
* The version of the agent for which to create the action group.
*/
public val agentVersion: kotlin.String? = builder.agentVersion
/**
* Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html).
*/
public val apiSchema: aws.sdk.kotlin.services.bedrockagent.model.ApiSchema? = builder.apiSchema
/**
* 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
/**
* A description of the action group.
*/
public val description: kotlin.String? = builder.description
/**
* To allow your agent to request the user for additional information when trying to complete a task, set this field to `AMAZON.UserInput`. You must leave the `description`, `apiSchema`, and `actionGroupExecutor` fields blank for this action group.
*
* During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an [Observation](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html) reprompting the user for more information.
*/
public val parentActionGroupSignature: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSignature? = builder.parentActionGroupSignature
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.bedrockagent.model.CreateAgentActionGroupRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateAgentActionGroupRequest(")
append("actionGroupExecutor=$actionGroupExecutor,")
append("actionGroupName=$actionGroupName,")
append("actionGroupState=$actionGroupState,")
append("agentId=$agentId,")
append("agentVersion=$agentVersion,")
append("apiSchema=$apiSchema,")
append("clientToken=$clientToken,")
append("description=$description,")
append("parentActionGroupSignature=$parentActionGroupSignature")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = actionGroupExecutor?.hashCode() ?: 0
result = 31 * result + (actionGroupName?.hashCode() ?: 0)
result = 31 * result + (actionGroupState?.hashCode() ?: 0)
result = 31 * result + (agentId?.hashCode() ?: 0)
result = 31 * result + (agentVersion?.hashCode() ?: 0)
result = 31 * result + (apiSchema?.hashCode() ?: 0)
result = 31 * result + (clientToken?.hashCode() ?: 0)
result = 31 * result + (description?.hashCode() ?: 0)
result = 31 * result + (parentActionGroupSignature?.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 CreateAgentActionGroupRequest
if (actionGroupExecutor != other.actionGroupExecutor) return false
if (actionGroupName != other.actionGroupName) return false
if (actionGroupState != other.actionGroupState) return false
if (agentId != other.agentId) return false
if (agentVersion != other.agentVersion) return false
if (apiSchema != other.apiSchema) return false
if (clientToken != other.clientToken) return false
if (description != other.description) return false
if (parentActionGroupSignature != other.parentActionGroupSignature) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.bedrockagent.model.CreateAgentActionGroupRequest = Builder(this).apply(block).build()
public class Builder {
/**
* The Amazon Resource Name (ARN) of the Lambda function containing the business logic that is carried out upon invoking the action.
*/
public var actionGroupExecutor: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupExecutor? = null
/**
* The name to give the action group.
*/
public var actionGroupName: kotlin.String? = null
/**
* Specifies whether the action group is available for the agent to invoke or not when sending an [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) request.
*/
public var actionGroupState: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupState? = null
/**
* The unique identifier of the agent for which to create the action group.
*/
public var agentId: kotlin.String? = null
/**
* The version of the agent for which to create the action group.
*/
public var agentVersion: kotlin.String? = null
/**
* Contains either details about the S3 object containing the OpenAPI schema for the action group or the JSON or YAML-formatted payload defining the schema. For more information, see [Action group OpenAPI schemas](https://docs.aws.amazon.com/bedrock/latest/userguide/agents-api-schema.html).
*/
public var apiSchema: aws.sdk.kotlin.services.bedrockagent.model.ApiSchema? = null
/**
* 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
/**
* A description of the action group.
*/
public var description: kotlin.String? = null
/**
* To allow your agent to request the user for additional information when trying to complete a task, set this field to `AMAZON.UserInput`. You must leave the `description`, `apiSchema`, and `actionGroupExecutor` fields blank for this action group.
*
* During orchestration, if your agent determines that it needs to invoke an API in an action group, but doesn't have enough information to complete the API request, it will invoke this action group instead and return an [Observation](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html) reprompting the user for more information.
*/
public var parentActionGroupSignature: aws.sdk.kotlin.services.bedrockagent.model.ActionGroupSignature? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.bedrockagent.model.CreateAgentActionGroupRequest) : this() {
this.actionGroupExecutor = x.actionGroupExecutor
this.actionGroupName = x.actionGroupName
this.actionGroupState = x.actionGroupState
this.agentId = x.agentId
this.agentVersion = x.agentVersion
this.apiSchema = x.apiSchema
this.clientToken = x.clientToken
this.description = x.description
this.parentActionGroupSignature = x.parentActionGroupSignature
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.bedrockagent.model.CreateAgentActionGroupRequest = CreateAgentActionGroupRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}