io.github.cdklabs.generative_ai_cdk_constructs.bedrock.AgentActionGroupProps Maven / Gradle / Ivy
Show all versions of generative-ai-cdk-constructs Show documentation
package io.github.cdklabs.generative_ai_cdk_constructs.bedrock;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-10-01T15:41:28.669Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.bedrock.AgentActionGroupProps")
@software.amazon.jsii.Jsii.Proxy(AgentActionGroupProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface AgentActionGroupProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) The name of the action group.
*
* Default: - a name is generated by CloudFormation.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getActionGroupName();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor getActionGroupExecutor() {
return null;
}
/**
* (experimental) Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getActionGroupState() {
return null;
}
/**
* (experimental) Contains details about the S3 object containing the OpenAPI schema for the action group.
*
* For more information, see
* Action group OpenAPI schemas.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema getApiSchema() {
return null;
}
/**
* (experimental) A description of the action group.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getDescription() {
return null;
}
/**
* (experimental) Defines functions that each define parameters that the agent needs to invoke from the user.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty getFunctionSchema() {
return null;
}
/**
* (experimental) If you specify this value as AMAZON.UserInput, the agent will prompt additional information from the user when it doesn't have enough information to respond to an utterance. Leave this field blank if you don't want the agent to prompt additional information.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getParentActionGroupSignature() {
return null;
}
/**
* (experimental) Specifies whether the agent should skip the resource in use check on delete.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getSkipResourceInUseCheckOnDelete() {
return null;
}
/**
* @return a {@link Builder} of {@link AgentActionGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link AgentActionGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String actionGroupName;
io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor actionGroupExecutor;
java.lang.String actionGroupState;
io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema apiSchema;
java.lang.String description;
software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty functionSchema;
java.lang.String parentActionGroupSignature;
java.lang.Boolean skipResourceInUseCheckOnDelete;
/**
* Sets the value of {@link AgentActionGroupProps#getActionGroupName}
* @param actionGroupName The name of the action group. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder actionGroupName(java.lang.String actionGroupName) {
this.actionGroupName = actionGroupName;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getActionGroupExecutor}
* @param actionGroupExecutor the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder actionGroupExecutor(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor actionGroupExecutor) {
this.actionGroupExecutor = actionGroupExecutor;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getActionGroupState}
* @param actionGroupState Specifies whether the action group is available for the agent to invoke or not when sending an InvokeAgent request.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder actionGroupState(java.lang.String actionGroupState) {
this.actionGroupState = actionGroupState;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getApiSchema}
* @param apiSchema Contains details about the S3 object containing the OpenAPI schema for the action group.
* For more information, see
* Action group OpenAPI schemas.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder apiSchema(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema apiSchema) {
this.apiSchema = apiSchema;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getDescription}
* @param description A description of the action group.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder description(java.lang.String description) {
this.description = description;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getFunctionSchema}
* @param functionSchema Defines functions that each define parameters that the agent needs to invoke from the user.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder functionSchema(software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty functionSchema) {
this.functionSchema = functionSchema;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getParentActionGroupSignature}
* @param parentActionGroupSignature If you specify this value as AMAZON.UserInput, the agent will prompt additional information from the user when it doesn't have enough information to respond to an utterance. Leave this field blank if you don't want the agent to prompt additional information.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder parentActionGroupSignature(java.lang.String parentActionGroupSignature) {
this.parentActionGroupSignature = parentActionGroupSignature;
return this;
}
/**
* Sets the value of {@link AgentActionGroupProps#getSkipResourceInUseCheckOnDelete}
* @param skipResourceInUseCheckOnDelete Specifies whether the agent should skip the resource in use check on delete.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder skipResourceInUseCheckOnDelete(java.lang.Boolean skipResourceInUseCheckOnDelete) {
this.skipResourceInUseCheckOnDelete = skipResourceInUseCheckOnDelete;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link AgentActionGroupProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public AgentActionGroupProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link AgentActionGroupProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements AgentActionGroupProps {
private final java.lang.String actionGroupName;
private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor actionGroupExecutor;
private final java.lang.String actionGroupState;
private final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema apiSchema;
private final java.lang.String description;
private final software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty functionSchema;
private final java.lang.String parentActionGroupSignature;
private final java.lang.Boolean skipResourceInUseCheckOnDelete;
/**
* Constructor that initializes the object based on values retrieved from the JsiiObject.
* @param objRef Reference to the JSII managed object.
*/
protected Jsii$Proxy(final software.amazon.jsii.JsiiObjectRef objRef) {
super(objRef);
this.actionGroupName = software.amazon.jsii.Kernel.get(this, "actionGroupName", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.actionGroupExecutor = software.amazon.jsii.Kernel.get(this, "actionGroupExecutor", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor.class));
this.actionGroupState = software.amazon.jsii.Kernel.get(this, "actionGroupState", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.apiSchema = software.amazon.jsii.Kernel.get(this, "apiSchema", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema.class));
this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.functionSchema = software.amazon.jsii.Kernel.get(this, "functionSchema", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty.class));
this.parentActionGroupSignature = software.amazon.jsii.Kernel.get(this, "parentActionGroupSignature", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.skipResourceInUseCheckOnDelete = software.amazon.jsii.Kernel.get(this, "skipResourceInUseCheckOnDelete", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
protected Jsii$Proxy(final Builder builder) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.actionGroupName = java.util.Objects.requireNonNull(builder.actionGroupName, "actionGroupName is required");
this.actionGroupExecutor = builder.actionGroupExecutor;
this.actionGroupState = builder.actionGroupState;
this.apiSchema = builder.apiSchema;
this.description = builder.description;
this.functionSchema = builder.functionSchema;
this.parentActionGroupSignature = builder.parentActionGroupSignature;
this.skipResourceInUseCheckOnDelete = builder.skipResourceInUseCheckOnDelete;
}
@Override
public final java.lang.String getActionGroupName() {
return this.actionGroupName;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ActionGroupExecutor getActionGroupExecutor() {
return this.actionGroupExecutor;
}
@Override
public final java.lang.String getActionGroupState() {
return this.actionGroupState;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.bedrock.ApiSchema getApiSchema() {
return this.apiSchema;
}
@Override
public final java.lang.String getDescription() {
return this.description;
}
@Override
public final software.amazon.awscdk.services.bedrock.CfnAgent.FunctionSchemaProperty getFunctionSchema() {
return this.functionSchema;
}
@Override
public final java.lang.String getParentActionGroupSignature() {
return this.parentActionGroupSignature;
}
@Override
public final java.lang.Boolean getSkipResourceInUseCheckOnDelete() {
return this.skipResourceInUseCheckOnDelete;
}
@Override
@software.amazon.jsii.Internal
public com.fasterxml.jackson.databind.JsonNode $jsii$toJson() {
final com.fasterxml.jackson.databind.ObjectMapper om = software.amazon.jsii.JsiiObjectMapper.INSTANCE;
final com.fasterxml.jackson.databind.node.ObjectNode data = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
data.set("actionGroupName", om.valueToTree(this.getActionGroupName()));
if (this.getActionGroupExecutor() != null) {
data.set("actionGroupExecutor", om.valueToTree(this.getActionGroupExecutor()));
}
if (this.getActionGroupState() != null) {
data.set("actionGroupState", om.valueToTree(this.getActionGroupState()));
}
if (this.getApiSchema() != null) {
data.set("apiSchema", om.valueToTree(this.getApiSchema()));
}
if (this.getDescription() != null) {
data.set("description", om.valueToTree(this.getDescription()));
}
if (this.getFunctionSchema() != null) {
data.set("functionSchema", om.valueToTree(this.getFunctionSchema()));
}
if (this.getParentActionGroupSignature() != null) {
data.set("parentActionGroupSignature", om.valueToTree(this.getParentActionGroupSignature()));
}
if (this.getSkipResourceInUseCheckOnDelete() != null) {
data.set("skipResourceInUseCheckOnDelete", om.valueToTree(this.getSkipResourceInUseCheckOnDelete()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("@cdklabs/generative-ai-cdk-constructs.bedrock.AgentActionGroupProps"));
struct.set("data", data);
final com.fasterxml.jackson.databind.node.ObjectNode obj = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
obj.set("$jsii.struct", struct);
return obj;
}
@Override
public final boolean equals(final Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AgentActionGroupProps.Jsii$Proxy that = (AgentActionGroupProps.Jsii$Proxy) o;
if (!actionGroupName.equals(that.actionGroupName)) return false;
if (this.actionGroupExecutor != null ? !this.actionGroupExecutor.equals(that.actionGroupExecutor) : that.actionGroupExecutor != null) return false;
if (this.actionGroupState != null ? !this.actionGroupState.equals(that.actionGroupState) : that.actionGroupState != null) return false;
if (this.apiSchema != null ? !this.apiSchema.equals(that.apiSchema) : that.apiSchema != null) return false;
if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false;
if (this.functionSchema != null ? !this.functionSchema.equals(that.functionSchema) : that.functionSchema != null) return false;
if (this.parentActionGroupSignature != null ? !this.parentActionGroupSignature.equals(that.parentActionGroupSignature) : that.parentActionGroupSignature != null) return false;
return this.skipResourceInUseCheckOnDelete != null ? this.skipResourceInUseCheckOnDelete.equals(that.skipResourceInUseCheckOnDelete) : that.skipResourceInUseCheckOnDelete == null;
}
@Override
public final int hashCode() {
int result = this.actionGroupName.hashCode();
result = 31 * result + (this.actionGroupExecutor != null ? this.actionGroupExecutor.hashCode() : 0);
result = 31 * result + (this.actionGroupState != null ? this.actionGroupState.hashCode() : 0);
result = 31 * result + (this.apiSchema != null ? this.apiSchema.hashCode() : 0);
result = 31 * result + (this.description != null ? this.description.hashCode() : 0);
result = 31 * result + (this.functionSchema != null ? this.functionSchema.hashCode() : 0);
result = 31 * result + (this.parentActionGroupSignature != null ? this.parentActionGroupSignature.hashCode() : 0);
result = 31 * result + (this.skipResourceInUseCheckOnDelete != null ? this.skipResourceInUseCheckOnDelete.hashCode() : 0);
return result;
}
}
}