io.github.cdklabs.generative_ai_cdk_constructs.TextToSqlProps Maven / Gradle / Ivy
Show all versions of generative-ai-cdk-constructs Show documentation
package io.github.cdklabs.generative_ai_cdk_constructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T18:35:37.360Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.TextToSqlProps")
@software.amazon.jsii.Jsii.Proxy(TextToSqlProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface TextToSqlProps extends software.amazon.jsii.JsiiSerializable {
/**
* (experimental) Database secret.
*
* DB credentials to connect to Database.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getDatabaseSecretARN();
/**
* (experimental) Database name.
*
* This is the target database against which the query will be generated.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull io.github.cdklabs.generative_ai_cdk_constructs.DbName getDbName();
/**
* (experimental) The source of metatdata.
*
* This metadata is required to reduce the natual language ambiguity
* in order to generate the correct sql query. A knowledge layer is used to map the natural language
* to the database schema.
* Two metatdata source are supported:
* 1: config_file - A local json file containing the knowledge layer key value pair.
* 2: Knowledge base - Semantic search is used to fetch the knowledge layer from AWS knowledge base
*
* Default: - config_file
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.String getMetadataSource();
/**
* (experimental) Optional.
*
* User provided props to override the default props for the S3 Bucket.
*
* Default: - Default props are used
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.BucketProps getConfigAssetsBucketProps() {
return null;
}
/**
* (experimental) Optional.
*
* Allows to provide custom lambda code for all pre steps required before generating the query.
* If not provided, default code will be used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryConfigurerLambdaProps() {
return null;
}
/**
* (experimental) Optional.
*
* Allows to provide custom lambda code for executing the query.
* If not provided, default code will be used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryExecutorLambdaProps() {
return null;
}
/**
* (experimental) Optional.
*
* Allows to provide custom lambda code for generating the query.
* If not provided, default code will be used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryGeneratorLambdaProps() {
return null;
}
/**
* (experimental) Optional.
*
* db port number.
*
* Default: -1534
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getDbPort() {
return null;
}
/**
* (experimental) Optional user provided event bus props.
*
* Default: - Default props are used.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.EventBusProps getEventBusProps() {
return null;
}
/**
* (experimental) Optional.
*
* Existing s3 Bucket to store the config files.
*
* Default: - None
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.IBucket getExistingconfigAssetsBucketObj() {
return null;
}
/**
* (experimental) Optional.
*
* Security group for the db instance which this construct will use.
* If no exisiting security group is provided it will create one from the vpc.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SecurityGroup getExistingDBSecurityGroup() {
return null;
}
/**
* (experimental) Optional.
*
* Existing instance of event bus, providing both this and eventBusProps
will cause an error.
*
* Default: - None.
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.IEventBus getExistingEventBusInterface() {
return null;
}
/**
* (experimental) Optional.
*
* Security group for the lambda function which this construct will use.
* If no exisiting security group is provided it will create one from the vpc.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.SecurityGroup getExistingLambdaSecurityGroup() {
return null;
}
/**
* (experimental) Optional.
*
* An existing subnet group can be used to deploy the construct.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.rds.SubnetGroup getExistingSubnetGroup() {
return null;
}
/**
* (experimental) Optional.
*
* An existing VPC can be used to deploy the construct.
* Providing both this and vpcProps is an error.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getExistingVpc() {
return null;
}
/**
* (experimental) Enable observability.
*
* Warning: associated cost with the services
* used. Best practice to enable by default.
*
* Default: - true
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Boolean getObservability() {
return null;
}
/**
* (experimental) Value will be appended to resources name.
*
* Default: - _dev
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getStage() {
return null;
}
/**
* (experimental) Optional.
*
* The construct creates a custom VPC based on vpcProps.
* Providing both this and existingVpc is an error.
*
* Default: - none
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.VpcProps getVpcProps() {
return null;
}
/**
* @return a {@link Builder} of {@link TextToSqlProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link TextToSqlProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.String databaseSecretArn;
io.github.cdklabs.generative_ai_cdk_constructs.DbName dbName;
java.lang.String metadataSource;
software.amazon.awscdk.services.s3.BucketProps configAssetsBucketProps;
io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryConfigurerLambdaProps;
io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryExecutorLambdaProps;
io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryGeneratorLambdaProps;
java.lang.Number dbPort;
software.amazon.awscdk.services.events.EventBusProps eventBusProps;
software.amazon.awscdk.services.s3.IBucket existingconfigAssetsBucketObj;
software.amazon.awscdk.services.ec2.SecurityGroup existingDbSecurityGroup;
software.amazon.awscdk.services.events.IEventBus existingEventBusInterface;
software.amazon.awscdk.services.ec2.SecurityGroup existingLambdaSecurityGroup;
software.amazon.awscdk.services.rds.SubnetGroup existingSubnetGroup;
software.amazon.awscdk.services.ec2.IVpc existingVpc;
java.lang.Boolean observability;
java.lang.String stage;
software.amazon.awscdk.services.ec2.VpcProps vpcProps;
/**
* Sets the value of {@link TextToSqlProps#getDatabaseSecretArn}
* @param databaseSecretArn Database secret. This parameter is required.
* DB credentials to connect to Database.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder databaseSecretArn(java.lang.String databaseSecretArn) {
this.databaseSecretArn = databaseSecretArn;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getDbName}
* @param dbName Database name. This parameter is required.
* This is the target database against which the query will be generated.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dbName(io.github.cdklabs.generative_ai_cdk_constructs.DbName dbName) {
this.dbName = dbName;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getMetadataSource}
* @param metadataSource The source of metatdata. This parameter is required.
* This metadata is required to reduce the natual language ambiguity
* in order to generate the correct sql query. A knowledge layer is used to map the natural language
* to the database schema.
* Two metatdata source are supported:
* 1: config_file - A local json file containing the knowledge layer key value pair.
* 2: Knowledge base - Semantic search is used to fetch the knowledge layer from AWS knowledge base
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder metadataSource(java.lang.String metadataSource) {
this.metadataSource = metadataSource;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getConfigAssetsBucketProps}
* @param configAssetsBucketProps Optional.
* User provided props to override the default props for the S3 Bucket.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder configAssetsBucketProps(software.amazon.awscdk.services.s3.BucketProps configAssetsBucketProps) {
this.configAssetsBucketProps = configAssetsBucketProps;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getCustomQueryConfigurerLambdaProps}
* @param customQueryConfigurerLambdaProps Optional.
* Allows to provide custom lambda code for all pre steps required before generating the query.
* If not provided, default code will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder customQueryConfigurerLambdaProps(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryConfigurerLambdaProps) {
this.customQueryConfigurerLambdaProps = customQueryConfigurerLambdaProps;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getCustomQueryExecutorLambdaProps}
* @param customQueryExecutorLambdaProps Optional.
* Allows to provide custom lambda code for executing the query.
* If not provided, default code will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder customQueryExecutorLambdaProps(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryExecutorLambdaProps) {
this.customQueryExecutorLambdaProps = customQueryExecutorLambdaProps;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getCustomQueryGeneratorLambdaProps}
* @param customQueryGeneratorLambdaProps Optional.
* Allows to provide custom lambda code for generating the query.
* If not provided, default code will be used.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder customQueryGeneratorLambdaProps(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryGeneratorLambdaProps) {
this.customQueryGeneratorLambdaProps = customQueryGeneratorLambdaProps;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getDbPort}
* @param dbPort Optional.
* db port number.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder dbPort(java.lang.Number dbPort) {
this.dbPort = dbPort;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getEventBusProps}
* @param eventBusProps Optional user provided event bus props.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder eventBusProps(software.amazon.awscdk.services.events.EventBusProps eventBusProps) {
this.eventBusProps = eventBusProps;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingconfigAssetsBucketObj}
* @param existingconfigAssetsBucketObj Optional.
* Existing s3 Bucket to store the config files.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingconfigAssetsBucketObj(software.amazon.awscdk.services.s3.IBucket existingconfigAssetsBucketObj) {
this.existingconfigAssetsBucketObj = existingconfigAssetsBucketObj;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingDbSecurityGroup}
* @param existingDbSecurityGroup Optional.
* Security group for the db instance which this construct will use.
* If no exisiting security group is provided it will create one from the vpc.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingDbSecurityGroup(software.amazon.awscdk.services.ec2.SecurityGroup existingDbSecurityGroup) {
this.existingDbSecurityGroup = existingDbSecurityGroup;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingEventBusInterface}
* @param existingEventBusInterface Optional.
* Existing instance of event bus, providing both this and eventBusProps
will cause an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingEventBusInterface(software.amazon.awscdk.services.events.IEventBus existingEventBusInterface) {
this.existingEventBusInterface = existingEventBusInterface;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingLambdaSecurityGroup}
* @param existingLambdaSecurityGroup Optional.
* Security group for the lambda function which this construct will use.
* If no exisiting security group is provided it will create one from the vpc.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingLambdaSecurityGroup(software.amazon.awscdk.services.ec2.SecurityGroup existingLambdaSecurityGroup) {
this.existingLambdaSecurityGroup = existingLambdaSecurityGroup;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingSubnetGroup}
* @param existingSubnetGroup Optional.
* An existing subnet group can be used to deploy the construct.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingSubnetGroup(software.amazon.awscdk.services.rds.SubnetGroup existingSubnetGroup) {
this.existingSubnetGroup = existingSubnetGroup;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getExistingVpc}
* @param existingVpc Optional.
* An existing VPC can be used to deploy the construct.
* Providing both this and vpcProps is an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) {
this.existingVpc = existingVpc;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getObservability}
* @param observability Enable observability.
* Warning: associated cost with the services
* used. Best practice to enable by default.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder observability(java.lang.Boolean observability) {
this.observability = observability;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getStage}
* @param stage Value will be appended to resources name.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder stage(java.lang.String stage) {
this.stage = stage;
return this;
}
/**
* Sets the value of {@link TextToSqlProps#getVpcProps}
* @param vpcProps Optional.
* The construct creates a custom VPC based on vpcProps.
* Providing both this and existingVpc is an error.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder vpcProps(software.amazon.awscdk.services.ec2.VpcProps vpcProps) {
this.vpcProps = vpcProps;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link TextToSqlProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public TextToSqlProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link TextToSqlProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TextToSqlProps {
private final java.lang.String databaseSecretArn;
private final io.github.cdklabs.generative_ai_cdk_constructs.DbName dbName;
private final java.lang.String metadataSource;
private final software.amazon.awscdk.services.s3.BucketProps configAssetsBucketProps;
private final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryConfigurerLambdaProps;
private final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryExecutorLambdaProps;
private final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customQueryGeneratorLambdaProps;
private final java.lang.Number dbPort;
private final software.amazon.awscdk.services.events.EventBusProps eventBusProps;
private final software.amazon.awscdk.services.s3.IBucket existingconfigAssetsBucketObj;
private final software.amazon.awscdk.services.ec2.SecurityGroup existingDbSecurityGroup;
private final software.amazon.awscdk.services.events.IEventBus existingEventBusInterface;
private final software.amazon.awscdk.services.ec2.SecurityGroup existingLambdaSecurityGroup;
private final software.amazon.awscdk.services.rds.SubnetGroup existingSubnetGroup;
private final software.amazon.awscdk.services.ec2.IVpc existingVpc;
private final java.lang.Boolean observability;
private final java.lang.String stage;
private final software.amazon.awscdk.services.ec2.VpcProps vpcProps;
/**
* 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.databaseSecretArn = software.amazon.jsii.Kernel.get(this, "databaseSecretARN", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.dbName = software.amazon.jsii.Kernel.get(this, "dbName", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.DbName.class));
this.metadataSource = software.amazon.jsii.Kernel.get(this, "metadataSource", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.configAssetsBucketProps = software.amazon.jsii.Kernel.get(this, "configAssetsBucketProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.BucketProps.class));
this.customQueryConfigurerLambdaProps = software.amazon.jsii.Kernel.get(this, "customQueryConfigurerLambdaProps", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps.class));
this.customQueryExecutorLambdaProps = software.amazon.jsii.Kernel.get(this, "customQueryExecutorLambdaProps", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps.class));
this.customQueryGeneratorLambdaProps = software.amazon.jsii.Kernel.get(this, "customQueryGeneratorLambdaProps", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps.class));
this.dbPort = software.amazon.jsii.Kernel.get(this, "dbPort", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.eventBusProps = software.amazon.jsii.Kernel.get(this, "eventBusProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.EventBusProps.class));
this.existingconfigAssetsBucketObj = software.amazon.jsii.Kernel.get(this, "existingconfigAssetsBucketObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class));
this.existingDbSecurityGroup = software.amazon.jsii.Kernel.get(this, "existingDBSecurityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SecurityGroup.class));
this.existingEventBusInterface = software.amazon.jsii.Kernel.get(this, "existingEventBusInterface", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.IEventBus.class));
this.existingLambdaSecurityGroup = software.amazon.jsii.Kernel.get(this, "existingLambdaSecurityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.SecurityGroup.class));
this.existingSubnetGroup = software.amazon.jsii.Kernel.get(this, "existingSubnetGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.rds.SubnetGroup.class));
this.existingVpc = software.amazon.jsii.Kernel.get(this, "existingVpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class));
this.observability = software.amazon.jsii.Kernel.get(this, "observability", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class));
this.stage = software.amazon.jsii.Kernel.get(this, "stage", software.amazon.jsii.NativeType.forClass(java.lang.String.class));
this.vpcProps = software.amazon.jsii.Kernel.get(this, "vpcProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.VpcProps.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.databaseSecretArn = java.util.Objects.requireNonNull(builder.databaseSecretArn, "databaseSecretArn is required");
this.dbName = java.util.Objects.requireNonNull(builder.dbName, "dbName is required");
this.metadataSource = java.util.Objects.requireNonNull(builder.metadataSource, "metadataSource is required");
this.configAssetsBucketProps = builder.configAssetsBucketProps;
this.customQueryConfigurerLambdaProps = builder.customQueryConfigurerLambdaProps;
this.customQueryExecutorLambdaProps = builder.customQueryExecutorLambdaProps;
this.customQueryGeneratorLambdaProps = builder.customQueryGeneratorLambdaProps;
this.dbPort = builder.dbPort;
this.eventBusProps = builder.eventBusProps;
this.existingconfigAssetsBucketObj = builder.existingconfigAssetsBucketObj;
this.existingDbSecurityGroup = builder.existingDbSecurityGroup;
this.existingEventBusInterface = builder.existingEventBusInterface;
this.existingLambdaSecurityGroup = builder.existingLambdaSecurityGroup;
this.existingSubnetGroup = builder.existingSubnetGroup;
this.existingVpc = builder.existingVpc;
this.observability = builder.observability;
this.stage = builder.stage;
this.vpcProps = builder.vpcProps;
}
@Override
public final java.lang.String getDatabaseSecretARN() {
return this.databaseSecretArn;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.DbName getDbName() {
return this.dbName;
}
@Override
public final java.lang.String getMetadataSource() {
return this.metadataSource;
}
@Override
public final software.amazon.awscdk.services.s3.BucketProps getConfigAssetsBucketProps() {
return this.configAssetsBucketProps;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryConfigurerLambdaProps() {
return this.customQueryConfigurerLambdaProps;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryExecutorLambdaProps() {
return this.customQueryExecutorLambdaProps;
}
@Override
public final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomQueryGeneratorLambdaProps() {
return this.customQueryGeneratorLambdaProps;
}
@Override
public final java.lang.Number getDbPort() {
return this.dbPort;
}
@Override
public final software.amazon.awscdk.services.events.EventBusProps getEventBusProps() {
return this.eventBusProps;
}
@Override
public final software.amazon.awscdk.services.s3.IBucket getExistingconfigAssetsBucketObj() {
return this.existingconfigAssetsBucketObj;
}
@Override
public final software.amazon.awscdk.services.ec2.SecurityGroup getExistingDBSecurityGroup() {
return this.existingDbSecurityGroup;
}
@Override
public final software.amazon.awscdk.services.events.IEventBus getExistingEventBusInterface() {
return this.existingEventBusInterface;
}
@Override
public final software.amazon.awscdk.services.ec2.SecurityGroup getExistingLambdaSecurityGroup() {
return this.existingLambdaSecurityGroup;
}
@Override
public final software.amazon.awscdk.services.rds.SubnetGroup getExistingSubnetGroup() {
return this.existingSubnetGroup;
}
@Override
public final software.amazon.awscdk.services.ec2.IVpc getExistingVpc() {
return this.existingVpc;
}
@Override
public final java.lang.Boolean getObservability() {
return this.observability;
}
@Override
public final java.lang.String getStage() {
return this.stage;
}
@Override
public final software.amazon.awscdk.services.ec2.VpcProps getVpcProps() {
return this.vpcProps;
}
@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("databaseSecretARN", om.valueToTree(this.getDatabaseSecretARN()));
data.set("dbName", om.valueToTree(this.getDbName()));
data.set("metadataSource", om.valueToTree(this.getMetadataSource()));
if (this.getConfigAssetsBucketProps() != null) {
data.set("configAssetsBucketProps", om.valueToTree(this.getConfigAssetsBucketProps()));
}
if (this.getCustomQueryConfigurerLambdaProps() != null) {
data.set("customQueryConfigurerLambdaProps", om.valueToTree(this.getCustomQueryConfigurerLambdaProps()));
}
if (this.getCustomQueryExecutorLambdaProps() != null) {
data.set("customQueryExecutorLambdaProps", om.valueToTree(this.getCustomQueryExecutorLambdaProps()));
}
if (this.getCustomQueryGeneratorLambdaProps() != null) {
data.set("customQueryGeneratorLambdaProps", om.valueToTree(this.getCustomQueryGeneratorLambdaProps()));
}
if (this.getDbPort() != null) {
data.set("dbPort", om.valueToTree(this.getDbPort()));
}
if (this.getEventBusProps() != null) {
data.set("eventBusProps", om.valueToTree(this.getEventBusProps()));
}
if (this.getExistingconfigAssetsBucketObj() != null) {
data.set("existingconfigAssetsBucketObj", om.valueToTree(this.getExistingconfigAssetsBucketObj()));
}
if (this.getExistingDBSecurityGroup() != null) {
data.set("existingDBSecurityGroup", om.valueToTree(this.getExistingDBSecurityGroup()));
}
if (this.getExistingEventBusInterface() != null) {
data.set("existingEventBusInterface", om.valueToTree(this.getExistingEventBusInterface()));
}
if (this.getExistingLambdaSecurityGroup() != null) {
data.set("existingLambdaSecurityGroup", om.valueToTree(this.getExistingLambdaSecurityGroup()));
}
if (this.getExistingSubnetGroup() != null) {
data.set("existingSubnetGroup", om.valueToTree(this.getExistingSubnetGroup()));
}
if (this.getExistingVpc() != null) {
data.set("existingVpc", om.valueToTree(this.getExistingVpc()));
}
if (this.getObservability() != null) {
data.set("observability", om.valueToTree(this.getObservability()));
}
if (this.getStage() != null) {
data.set("stage", om.valueToTree(this.getStage()));
}
if (this.getVpcProps() != null) {
data.set("vpcProps", om.valueToTree(this.getVpcProps()));
}
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.TextToSqlProps"));
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;
TextToSqlProps.Jsii$Proxy that = (TextToSqlProps.Jsii$Proxy) o;
if (!databaseSecretArn.equals(that.databaseSecretArn)) return false;
if (!dbName.equals(that.dbName)) return false;
if (!metadataSource.equals(that.metadataSource)) return false;
if (this.configAssetsBucketProps != null ? !this.configAssetsBucketProps.equals(that.configAssetsBucketProps) : that.configAssetsBucketProps != null) return false;
if (this.customQueryConfigurerLambdaProps != null ? !this.customQueryConfigurerLambdaProps.equals(that.customQueryConfigurerLambdaProps) : that.customQueryConfigurerLambdaProps != null) return false;
if (this.customQueryExecutorLambdaProps != null ? !this.customQueryExecutorLambdaProps.equals(that.customQueryExecutorLambdaProps) : that.customQueryExecutorLambdaProps != null) return false;
if (this.customQueryGeneratorLambdaProps != null ? !this.customQueryGeneratorLambdaProps.equals(that.customQueryGeneratorLambdaProps) : that.customQueryGeneratorLambdaProps != null) return false;
if (this.dbPort != null ? !this.dbPort.equals(that.dbPort) : that.dbPort != null) return false;
if (this.eventBusProps != null ? !this.eventBusProps.equals(that.eventBusProps) : that.eventBusProps != null) return false;
if (this.existingconfigAssetsBucketObj != null ? !this.existingconfigAssetsBucketObj.equals(that.existingconfigAssetsBucketObj) : that.existingconfigAssetsBucketObj != null) return false;
if (this.existingDbSecurityGroup != null ? !this.existingDbSecurityGroup.equals(that.existingDbSecurityGroup) : that.existingDbSecurityGroup != null) return false;
if (this.existingEventBusInterface != null ? !this.existingEventBusInterface.equals(that.existingEventBusInterface) : that.existingEventBusInterface != null) return false;
if (this.existingLambdaSecurityGroup != null ? !this.existingLambdaSecurityGroup.equals(that.existingLambdaSecurityGroup) : that.existingLambdaSecurityGroup != null) return false;
if (this.existingSubnetGroup != null ? !this.existingSubnetGroup.equals(that.existingSubnetGroup) : that.existingSubnetGroup != null) return false;
if (this.existingVpc != null ? !this.existingVpc.equals(that.existingVpc) : that.existingVpc != null) return false;
if (this.observability != null ? !this.observability.equals(that.observability) : that.observability != null) return false;
if (this.stage != null ? !this.stage.equals(that.stage) : that.stage != null) return false;
return this.vpcProps != null ? this.vpcProps.equals(that.vpcProps) : that.vpcProps == null;
}
@Override
public final int hashCode() {
int result = this.databaseSecretArn.hashCode();
result = 31 * result + (this.dbName.hashCode());
result = 31 * result + (this.metadataSource.hashCode());
result = 31 * result + (this.configAssetsBucketProps != null ? this.configAssetsBucketProps.hashCode() : 0);
result = 31 * result + (this.customQueryConfigurerLambdaProps != null ? this.customQueryConfigurerLambdaProps.hashCode() : 0);
result = 31 * result + (this.customQueryExecutorLambdaProps != null ? this.customQueryExecutorLambdaProps.hashCode() : 0);
result = 31 * result + (this.customQueryGeneratorLambdaProps != null ? this.customQueryGeneratorLambdaProps.hashCode() : 0);
result = 31 * result + (this.dbPort != null ? this.dbPort.hashCode() : 0);
result = 31 * result + (this.eventBusProps != null ? this.eventBusProps.hashCode() : 0);
result = 31 * result + (this.existingconfigAssetsBucketObj != null ? this.existingconfigAssetsBucketObj.hashCode() : 0);
result = 31 * result + (this.existingDbSecurityGroup != null ? this.existingDbSecurityGroup.hashCode() : 0);
result = 31 * result + (this.existingEventBusInterface != null ? this.existingEventBusInterface.hashCode() : 0);
result = 31 * result + (this.existingLambdaSecurityGroup != null ? this.existingLambdaSecurityGroup.hashCode() : 0);
result = 31 * result + (this.existingSubnetGroup != null ? this.existingSubnetGroup.hashCode() : 0);
result = 31 * result + (this.existingVpc != null ? this.existingVpc.hashCode() : 0);
result = 31 * result + (this.observability != null ? this.observability.hashCode() : 0);
result = 31 * result + (this.stage != null ? this.stage.hashCode() : 0);
result = 31 * result + (this.vpcProps != null ? this.vpcProps.hashCode() : 0);
return result;
}
}
}