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

io.github.cdklabs.generative_ai_cdk_constructs.ContentGenerationAppSyncLambdaProps Maven / Gradle / Ivy

Go to download

AWS Generative AI CDK Constructs is a library for well-architected generative AI patterns.

There is a newer version: 0.1.271
Show newest version
package io.github.cdklabs.generative_ai_cdk_constructs;

/**
 * (experimental) The properties for the ContentGenerationAppSyncLambdaProps class.
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-23T18:35:37.271Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.generative_ai_cdk_constructs.$Module.class, fqn = "@cdklabs/generative-ai-cdk-constructs.ContentGenerationAppSyncLambdaProps")
@software.amazon.jsii.Jsii.Proxy(ContentGenerationAppSyncLambdaProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface ContentGenerationAppSyncLambdaProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Cognito user pool used for authentication.
     * 

* Default: - None */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cognito.IUserPool getCognitoUserPool(); /** * (experimental) Optional. *

* Allows to provide custom lambda code * and settings instead of the existing */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomDockerLambdaProps() { return null; } /** * (experimental) Optional Existing instance of an EventBridge bus. *

* If not provided, the construct will create one. *

* Default: - None */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.IEventBus getExistingBusInterface() { return null; } /** * (experimental) Existing instance of S3 Bucket object, providing both this and generatedAssetsBucketProps 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.s3.IBucket getExistingGeneratedAssetsBucketObj() { return null; } /** * (experimental) Existing merged Appsync GraphQL api. *

* Default: - None */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.appsync.CfnGraphQLApi getExistingMergedApi() { return null; } /** * (experimental) Optional existing security group allowing access to opensearch. *

* Used by the lambda functions * built by this construct. If not provided, the construct will create one. *

* Default: - none */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.ISecurityGroup getExistingSecurityGroup() { return null; } /** * (experimental) Optional An existing VPC in which 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) Optional user provided props to override the default props for the S3 Bucket. *

* Providing both this and existingGeneratedAssetsBucketObj will cause an error. *

* 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 getGeneratedAssetsBucketProps() { return null; } /** * (experimental) Optional. *

* Allows a user to configure * Lambda provisioned concurrency for consistent performance */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getLambdaProvisionedConcurrency() { return null; } /** * (experimental) Enable observability. *

* Warning: associated cost with the services * used. Best practive 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 custom properties for a VPC the construct will create. *

* This VPC will * be used by the Lambda functions the construct creates. 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 ContentGenerationAppSyncLambdaProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link ContentGenerationAppSyncLambdaProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.cognito.IUserPool cognitoUserPool; io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customDockerLambdaProps; software.amazon.awscdk.services.events.IEventBus existingBusInterface; software.amazon.awscdk.services.s3.IBucket existingGeneratedAssetsBucketObj; software.amazon.awscdk.services.appsync.CfnGraphQLApi existingMergedApi; software.amazon.awscdk.services.ec2.ISecurityGroup existingSecurityGroup; software.amazon.awscdk.services.ec2.IVpc existingVpc; software.amazon.awscdk.services.s3.BucketProps generatedAssetsBucketProps; java.lang.Number lambdaProvisionedConcurrency; java.lang.Boolean observability; java.lang.String stage; software.amazon.awscdk.services.ec2.VpcProps vpcProps; /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getCognitoUserPool} * @param cognitoUserPool Cognito user pool used for authentication. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder cognitoUserPool(software.amazon.awscdk.services.cognito.IUserPool cognitoUserPool) { this.cognitoUserPool = cognitoUserPool; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getCustomDockerLambdaProps} * @param customDockerLambdaProps Optional. * Allows to provide custom lambda code * and settings instead of the existing * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder customDockerLambdaProps(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customDockerLambdaProps) { this.customDockerLambdaProps = customDockerLambdaProps; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getExistingBusInterface} * @param existingBusInterface Optional Existing instance of an EventBridge bus. * If not provided, the construct will create one. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder existingBusInterface(software.amazon.awscdk.services.events.IEventBus existingBusInterface) { this.existingBusInterface = existingBusInterface; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getExistingGeneratedAssetsBucketObj} * @param existingGeneratedAssetsBucketObj Existing instance of S3 Bucket object, providing both this and generatedAssetsBucketProps will cause an error. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder existingGeneratedAssetsBucketObj(software.amazon.awscdk.services.s3.IBucket existingGeneratedAssetsBucketObj) { this.existingGeneratedAssetsBucketObj = existingGeneratedAssetsBucketObj; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getExistingMergedApi} * @param existingMergedApi Existing merged Appsync GraphQL api. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder existingMergedApi(software.amazon.awscdk.services.appsync.CfnGraphQLApi existingMergedApi) { this.existingMergedApi = existingMergedApi; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getExistingSecurityGroup} * @param existingSecurityGroup Optional existing security group allowing access to opensearch. * Used by the lambda functions * built by this construct. If not provided, the construct will create one. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder existingSecurityGroup(software.amazon.awscdk.services.ec2.ISecurityGroup existingSecurityGroup) { this.existingSecurityGroup = existingSecurityGroup; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getExistingVpc} * @param existingVpc Optional An existing VPC in which 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 ContentGenerationAppSyncLambdaProps#getGeneratedAssetsBucketProps} * @param generatedAssetsBucketProps Optional user provided props to override the default props for the S3 Bucket. * Providing both this and existingGeneratedAssetsBucketObj will cause an error. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder generatedAssetsBucketProps(software.amazon.awscdk.services.s3.BucketProps generatedAssetsBucketProps) { this.generatedAssetsBucketProps = generatedAssetsBucketProps; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getLambdaProvisionedConcurrency} * @param lambdaProvisionedConcurrency Optional. * Allows a user to configure * Lambda provisioned concurrency for consistent performance * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder lambdaProvisionedConcurrency(java.lang.Number lambdaProvisionedConcurrency) { this.lambdaProvisionedConcurrency = lambdaProvisionedConcurrency; return this; } /** * Sets the value of {@link ContentGenerationAppSyncLambdaProps#getObservability} * @param observability Enable observability. * Warning: associated cost with the services * used. Best practive 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 ContentGenerationAppSyncLambdaProps#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 ContentGenerationAppSyncLambdaProps#getVpcProps} * @param vpcProps Optional custom properties for a VPC the construct will create. * This VPC will * be used by the Lambda functions the construct creates. 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 ContentGenerationAppSyncLambdaProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public ContentGenerationAppSyncLambdaProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link ContentGenerationAppSyncLambdaProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ContentGenerationAppSyncLambdaProps { private final software.amazon.awscdk.services.cognito.IUserPool cognitoUserPool; private final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps customDockerLambdaProps; private final software.amazon.awscdk.services.events.IEventBus existingBusInterface; private final software.amazon.awscdk.services.s3.IBucket existingGeneratedAssetsBucketObj; private final software.amazon.awscdk.services.appsync.CfnGraphQLApi existingMergedApi; private final software.amazon.awscdk.services.ec2.ISecurityGroup existingSecurityGroup; private final software.amazon.awscdk.services.ec2.IVpc existingVpc; private final software.amazon.awscdk.services.s3.BucketProps generatedAssetsBucketProps; private final java.lang.Number lambdaProvisionedConcurrency; 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.cognitoUserPool = software.amazon.jsii.Kernel.get(this, "cognitoUserPool", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cognito.IUserPool.class)); this.customDockerLambdaProps = software.amazon.jsii.Kernel.get(this, "customDockerLambdaProps", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps.class)); this.existingBusInterface = software.amazon.jsii.Kernel.get(this, "existingBusInterface", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.IEventBus.class)); this.existingGeneratedAssetsBucketObj = software.amazon.jsii.Kernel.get(this, "existingGeneratedAssetsBucketObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.IBucket.class)); this.existingMergedApi = software.amazon.jsii.Kernel.get(this, "existingMergedApi", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.appsync.CfnGraphQLApi.class)); this.existingSecurityGroup = software.amazon.jsii.Kernel.get(this, "existingSecurityGroup", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.ISecurityGroup.class)); this.existingVpc = software.amazon.jsii.Kernel.get(this, "existingVpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); this.generatedAssetsBucketProps = software.amazon.jsii.Kernel.get(this, "generatedAssetsBucketProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.s3.BucketProps.class)); this.lambdaProvisionedConcurrency = software.amazon.jsii.Kernel.get(this, "lambdaProvisionedConcurrency", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.cognitoUserPool = java.util.Objects.requireNonNull(builder.cognitoUserPool, "cognitoUserPool is required"); this.customDockerLambdaProps = builder.customDockerLambdaProps; this.existingBusInterface = builder.existingBusInterface; this.existingGeneratedAssetsBucketObj = builder.existingGeneratedAssetsBucketObj; this.existingMergedApi = builder.existingMergedApi; this.existingSecurityGroup = builder.existingSecurityGroup; this.existingVpc = builder.existingVpc; this.generatedAssetsBucketProps = builder.generatedAssetsBucketProps; this.lambdaProvisionedConcurrency = builder.lambdaProvisionedConcurrency; this.observability = builder.observability; this.stage = builder.stage; this.vpcProps = builder.vpcProps; } @Override public final software.amazon.awscdk.services.cognito.IUserPool getCognitoUserPool() { return this.cognitoUserPool; } @Override public final io.github.cdklabs.generative_ai_cdk_constructs.DockerLambdaCustomProps getCustomDockerLambdaProps() { return this.customDockerLambdaProps; } @Override public final software.amazon.awscdk.services.events.IEventBus getExistingBusInterface() { return this.existingBusInterface; } @Override public final software.amazon.awscdk.services.s3.IBucket getExistingGeneratedAssetsBucketObj() { return this.existingGeneratedAssetsBucketObj; } @Override public final software.amazon.awscdk.services.appsync.CfnGraphQLApi getExistingMergedApi() { return this.existingMergedApi; } @Override public final software.amazon.awscdk.services.ec2.ISecurityGroup getExistingSecurityGroup() { return this.existingSecurityGroup; } @Override public final software.amazon.awscdk.services.ec2.IVpc getExistingVpc() { return this.existingVpc; } @Override public final software.amazon.awscdk.services.s3.BucketProps getGeneratedAssetsBucketProps() { return this.generatedAssetsBucketProps; } @Override public final java.lang.Number getLambdaProvisionedConcurrency() { return this.lambdaProvisionedConcurrency; } @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("cognitoUserPool", om.valueToTree(this.getCognitoUserPool())); if (this.getCustomDockerLambdaProps() != null) { data.set("customDockerLambdaProps", om.valueToTree(this.getCustomDockerLambdaProps())); } if (this.getExistingBusInterface() != null) { data.set("existingBusInterface", om.valueToTree(this.getExistingBusInterface())); } if (this.getExistingGeneratedAssetsBucketObj() != null) { data.set("existingGeneratedAssetsBucketObj", om.valueToTree(this.getExistingGeneratedAssetsBucketObj())); } if (this.getExistingMergedApi() != null) { data.set("existingMergedApi", om.valueToTree(this.getExistingMergedApi())); } if (this.getExistingSecurityGroup() != null) { data.set("existingSecurityGroup", om.valueToTree(this.getExistingSecurityGroup())); } if (this.getExistingVpc() != null) { data.set("existingVpc", om.valueToTree(this.getExistingVpc())); } if (this.getGeneratedAssetsBucketProps() != null) { data.set("generatedAssetsBucketProps", om.valueToTree(this.getGeneratedAssetsBucketProps())); } if (this.getLambdaProvisionedConcurrency() != null) { data.set("lambdaProvisionedConcurrency", om.valueToTree(this.getLambdaProvisionedConcurrency())); } 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.ContentGenerationAppSyncLambdaProps")); 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; ContentGenerationAppSyncLambdaProps.Jsii$Proxy that = (ContentGenerationAppSyncLambdaProps.Jsii$Proxy) o; if (!cognitoUserPool.equals(that.cognitoUserPool)) return false; if (this.customDockerLambdaProps != null ? !this.customDockerLambdaProps.equals(that.customDockerLambdaProps) : that.customDockerLambdaProps != null) return false; if (this.existingBusInterface != null ? !this.existingBusInterface.equals(that.existingBusInterface) : that.existingBusInterface != null) return false; if (this.existingGeneratedAssetsBucketObj != null ? !this.existingGeneratedAssetsBucketObj.equals(that.existingGeneratedAssetsBucketObj) : that.existingGeneratedAssetsBucketObj != null) return false; if (this.existingMergedApi != null ? !this.existingMergedApi.equals(that.existingMergedApi) : that.existingMergedApi != null) return false; if (this.existingSecurityGroup != null ? !this.existingSecurityGroup.equals(that.existingSecurityGroup) : that.existingSecurityGroup != null) return false; if (this.existingVpc != null ? !this.existingVpc.equals(that.existingVpc) : that.existingVpc != null) return false; if (this.generatedAssetsBucketProps != null ? !this.generatedAssetsBucketProps.equals(that.generatedAssetsBucketProps) : that.generatedAssetsBucketProps != null) return false; if (this.lambdaProvisionedConcurrency != null ? !this.lambdaProvisionedConcurrency.equals(that.lambdaProvisionedConcurrency) : that.lambdaProvisionedConcurrency != 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.cognitoUserPool.hashCode(); result = 31 * result + (this.customDockerLambdaProps != null ? this.customDockerLambdaProps.hashCode() : 0); result = 31 * result + (this.existingBusInterface != null ? this.existingBusInterface.hashCode() : 0); result = 31 * result + (this.existingGeneratedAssetsBucketObj != null ? this.existingGeneratedAssetsBucketObj.hashCode() : 0); result = 31 * result + (this.existingMergedApi != null ? this.existingMergedApi.hashCode() : 0); result = 31 * result + (this.existingSecurityGroup != null ? this.existingSecurityGroup.hashCode() : 0); result = 31 * result + (this.existingVpc != null ? this.existingVpc.hashCode() : 0); result = 31 * result + (this.generatedAssetsBucketProps != null ? this.generatedAssetsBucketProps.hashCode() : 0); result = 31 * result + (this.lambdaProvisionedConcurrency != null ? this.lambdaProvisionedConcurrency.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; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy