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

software.amazon.awsconstructs.services.lambdaelasticachememcached.LambdaToElasticachememcachedProps Maven / Gradle / Ivy

Go to download

CDK constructs for defining an interaction between an AWS Lambda function and an Amazon Elasticache memcached cache.

The newest version!
package software.amazon.awsconstructs.services.lambdaelasticachememcached;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.106.0 (build e852934)", date = "2024-12-24T18:32:46.450Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdaelasticachememcached.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcachedProps")
@software.amazon.jsii.Jsii.Proxy(LambdaToElasticachememcachedProps.Jsii$Proxy.class)
public interface LambdaToElasticachememcachedProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Optional Name for the Lambda function environment variable set to the cache endpoint.
     * 

* Default: - CACHE_ENDPOINT */ default @org.jetbrains.annotations.Nullable java.lang.String getCacheEndpointEnvironmentVariableName() { return null; } /** * Optional user provided props to override the default props for the Elasticache cache. *

* Providing both this and existingCache will cause an error. If you provide this, * you must provide the associated VPC in existingVpc. *

* Default: - Default properties are used (core/lib/elasticacahe-defaults.ts) */ default @org.jetbrains.annotations.Nullable java.lang.Object getCacheProps() { return null; } /** * Existing instance of Elasticache Cluster object, providing both this and cacheProps will cause an error. *

* Default: - none */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.elasticache.CfnCacheCluster getExistingCache() { return null; } /** * Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. *

* Default: - None */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Function getExistingLambdaObj() { return null; } /** * An existing VPC for the construct to use (construct will NOT create a new VPC in this case). *

* Default: - none */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getExistingVpc() { return null; } /** * Optional user provided props to override the default props for the Lambda function. *

* Default: - Default properties are used. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.FunctionProps getLambdaFunctionProps() { return null; } /** * Properties to override default properties if deployVpc is true. *

* Default: - DefaultIsolatedVpcProps() in vpc-defaults.ts */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.VpcProps getVpcProps() { return null; } /** * @return a {@link Builder} of {@link LambdaToElasticachememcachedProps} */ static Builder builder() { return new Builder(); } /** * A builder for {@link LambdaToElasticachememcachedProps} */ public static final class Builder implements software.amazon.jsii.Builder { java.lang.String cacheEndpointEnvironmentVariableName; java.lang.Object cacheProps; software.amazon.awscdk.services.elasticache.CfnCacheCluster existingCache; software.amazon.awscdk.services.lambda.Function existingLambdaObj; software.amazon.awscdk.services.ec2.IVpc existingVpc; software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps; software.amazon.awscdk.services.ec2.VpcProps vpcProps; /** * Sets the value of {@link LambdaToElasticachememcachedProps#getCacheEndpointEnvironmentVariableName} * @param cacheEndpointEnvironmentVariableName Optional Name for the Lambda function environment variable set to the cache endpoint. * @return {@code this} */ public Builder cacheEndpointEnvironmentVariableName(java.lang.String cacheEndpointEnvironmentVariableName) { this.cacheEndpointEnvironmentVariableName = cacheEndpointEnvironmentVariableName; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getCacheProps} * @param cacheProps Optional user provided props to override the default props for the Elasticache cache. * Providing both this and existingCache will cause an error. If you provide this, * you must provide the associated VPC in existingVpc. * @return {@code this} */ public Builder cacheProps(java.lang.Object cacheProps) { this.cacheProps = cacheProps; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getExistingCache} * @param existingCache Existing instance of Elasticache Cluster object, providing both this and cacheProps will cause an error. * @return {@code this} */ public Builder existingCache(software.amazon.awscdk.services.elasticache.CfnCacheCluster existingCache) { this.existingCache = existingCache; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getExistingLambdaObj} * @param existingLambdaObj Existing instance of Lambda Function object, providing both this and lambdaFunctionProps will cause an error. * @return {@code this} */ public Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) { this.existingLambdaObj = existingLambdaObj; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getExistingVpc} * @param existingVpc An existing VPC for the construct to use (construct will NOT create a new VPC in this case). * @return {@code this} */ public Builder existingVpc(software.amazon.awscdk.services.ec2.IVpc existingVpc) { this.existingVpc = existingVpc; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getLambdaFunctionProps} * @param lambdaFunctionProps Optional user provided props to override the default props for the Lambda function. * @return {@code this} */ public Builder lambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps) { this.lambdaFunctionProps = lambdaFunctionProps; return this; } /** * Sets the value of {@link LambdaToElasticachememcachedProps#getVpcProps} * @param vpcProps Properties to override default properties if deployVpc is true. * @return {@code this} */ 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 LambdaToElasticachememcachedProps} * @throws NullPointerException if any required attribute was not provided */ @Override public LambdaToElasticachememcachedProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link LambdaToElasticachememcachedProps} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LambdaToElasticachememcachedProps { private final java.lang.String cacheEndpointEnvironmentVariableName; private final java.lang.Object cacheProps; private final software.amazon.awscdk.services.elasticache.CfnCacheCluster existingCache; private final software.amazon.awscdk.services.lambda.Function existingLambdaObj; private final software.amazon.awscdk.services.ec2.IVpc existingVpc; private final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps; 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.cacheEndpointEnvironmentVariableName = software.amazon.jsii.Kernel.get(this, "cacheEndpointEnvironmentVariableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.cacheProps = software.amazon.jsii.Kernel.get(this, "cacheProps", software.amazon.jsii.NativeType.forClass(java.lang.Object.class)); this.existingCache = software.amazon.jsii.Kernel.get(this, "existingCache", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.elasticache.CfnCacheCluster.class)); this.existingLambdaObj = software.amazon.jsii.Kernel.get(this, "existingLambdaObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class)); this.existingVpc = software.amazon.jsii.Kernel.get(this, "existingVpc", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.ec2.IVpc.class)); this.lambdaFunctionProps = software.amazon.jsii.Kernel.get(this, "lambdaFunctionProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.FunctionProps.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.cacheEndpointEnvironmentVariableName = builder.cacheEndpointEnvironmentVariableName; this.cacheProps = builder.cacheProps; this.existingCache = builder.existingCache; this.existingLambdaObj = builder.existingLambdaObj; this.existingVpc = builder.existingVpc; this.lambdaFunctionProps = builder.lambdaFunctionProps; this.vpcProps = builder.vpcProps; } @Override public final java.lang.String getCacheEndpointEnvironmentVariableName() { return this.cacheEndpointEnvironmentVariableName; } @Override public final java.lang.Object getCacheProps() { return this.cacheProps; } @Override public final software.amazon.awscdk.services.elasticache.CfnCacheCluster getExistingCache() { return this.existingCache; } @Override public final software.amazon.awscdk.services.lambda.Function getExistingLambdaObj() { return this.existingLambdaObj; } @Override public final software.amazon.awscdk.services.ec2.IVpc getExistingVpc() { return this.existingVpc; } @Override public final software.amazon.awscdk.services.lambda.FunctionProps getLambdaFunctionProps() { return this.lambdaFunctionProps; } @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(); if (this.getCacheEndpointEnvironmentVariableName() != null) { data.set("cacheEndpointEnvironmentVariableName", om.valueToTree(this.getCacheEndpointEnvironmentVariableName())); } if (this.getCacheProps() != null) { data.set("cacheProps", om.valueToTree(this.getCacheProps())); } if (this.getExistingCache() != null) { data.set("existingCache", om.valueToTree(this.getExistingCache())); } if (this.getExistingLambdaObj() != null) { data.set("existingLambdaObj", om.valueToTree(this.getExistingLambdaObj())); } if (this.getExistingVpc() != null) { data.set("existingVpc", om.valueToTree(this.getExistingVpc())); } if (this.getLambdaFunctionProps() != null) { data.set("lambdaFunctionProps", om.valueToTree(this.getLambdaFunctionProps())); } 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("@aws-solutions-constructs/aws-lambda-elasticachememcached.LambdaToElasticachememcachedProps")); 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; LambdaToElasticachememcachedProps.Jsii$Proxy that = (LambdaToElasticachememcachedProps.Jsii$Proxy) o; if (this.cacheEndpointEnvironmentVariableName != null ? !this.cacheEndpointEnvironmentVariableName.equals(that.cacheEndpointEnvironmentVariableName) : that.cacheEndpointEnvironmentVariableName != null) return false; if (this.cacheProps != null ? !this.cacheProps.equals(that.cacheProps) : that.cacheProps != null) return false; if (this.existingCache != null ? !this.existingCache.equals(that.existingCache) : that.existingCache != null) return false; if (this.existingLambdaObj != null ? !this.existingLambdaObj.equals(that.existingLambdaObj) : that.existingLambdaObj != null) return false; if (this.existingVpc != null ? !this.existingVpc.equals(that.existingVpc) : that.existingVpc != null) return false; if (this.lambdaFunctionProps != null ? !this.lambdaFunctionProps.equals(that.lambdaFunctionProps) : that.lambdaFunctionProps != null) return false; return this.vpcProps != null ? this.vpcProps.equals(that.vpcProps) : that.vpcProps == null; } @Override public final int hashCode() { int result = this.cacheEndpointEnvironmentVariableName != null ? this.cacheEndpointEnvironmentVariableName.hashCode() : 0; result = 31 * result + (this.cacheProps != null ? this.cacheProps.hashCode() : 0); result = 31 * result + (this.existingCache != null ? this.existingCache.hashCode() : 0); result = 31 * result + (this.existingLambdaObj != null ? this.existingLambdaObj.hashCode() : 0); result = 31 * result + (this.existingVpc != null ? this.existingVpc.hashCode() : 0); result = 31 * result + (this.lambdaFunctionProps != null ? this.lambdaFunctionProps.hashCode() : 0); result = 31 * result + (this.vpcProps != null ? this.vpcProps.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy