software.amazon.awsconstructs.services.s3lambda.S3ToLambdaProps Maven / Gradle / Ivy
Show all versions of s3lambda Show documentation
package software.amazon.awsconstructs.services.s3lambda;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.12.0 (build 5ddc9f2)", date = "2020-09-01T18:21:18.639Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.s3lambda.$Module.class, fqn = "@aws-solutions-constructs/aws-s3-lambda.S3ToLambdaProps")
@software.amazon.jsii.Jsii.Proxy(S3ToLambdaProps.Jsii$Proxy.class)
public interface S3ToLambdaProps extends software.amazon.jsii.JsiiSerializable {
/**
* User provided props to override the default props for the S3 Bucket.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.BucketProps getBucketProps() {
return null;
}
/**
* Existing instance of S3 Bucket object, if this is set then the bucketProps is ignored.
*
* Default: - None
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.s3.Bucket getExistingBucketObj() {
return null;
}
/**
* Existing instance of Lambda Function object, if this is set then the lambdaFunctionProps is ignored.
*
* Default: - None
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Function getExistingLambdaObj() {
return null;
}
/**
* User provided props to override the default props for the Lambda function.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.FunctionProps getLambdaFunctionProps() {
return null;
}
/**
* Optional user provided props to override the default props.
*
* Default: - Default props are used
*/
default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps getS3EventSourceProps() {
return null;
}
/**
* @return a {@link Builder} of {@link S3ToLambdaProps}
*/
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link S3ToLambdaProps}
*/
public static final class Builder implements software.amazon.jsii.Builder {
private software.amazon.awscdk.services.s3.BucketProps bucketProps;
private software.amazon.awscdk.services.s3.Bucket existingBucketObj;
private software.amazon.awscdk.services.lambda.Function existingLambdaObj;
private software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps;
private software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps s3EventSourceProps;
/**
* Sets the value of {@link S3ToLambdaProps#getBucketProps}
* @param bucketProps User provided props to override the default props for the S3 Bucket.
* @return {@code this}
*/
public Builder bucketProps(software.amazon.awscdk.services.s3.BucketProps bucketProps) {
this.bucketProps = bucketProps;
return this;
}
/**
* Sets the value of {@link S3ToLambdaProps#getExistingBucketObj}
* @param existingBucketObj Existing instance of S3 Bucket object, if this is set then the bucketProps is ignored.
* @return {@code this}
*/
public Builder existingBucketObj(software.amazon.awscdk.services.s3.Bucket existingBucketObj) {
this.existingBucketObj = existingBucketObj;
return this;
}
/**
* Sets the value of {@link S3ToLambdaProps#getExistingLambdaObj}
* @param existingLambdaObj Existing instance of Lambda Function object, if this is set then the lambdaFunctionProps is ignored.
* @return {@code this}
*/
public Builder existingLambdaObj(software.amazon.awscdk.services.lambda.Function existingLambdaObj) {
this.existingLambdaObj = existingLambdaObj;
return this;
}
/**
* Sets the value of {@link S3ToLambdaProps#getLambdaFunctionProps}
* @param lambdaFunctionProps 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 S3ToLambdaProps#getS3EventSourceProps}
* @param s3EventSourceProps Optional user provided props to override the default props.
* @return {@code this}
*/
public Builder s3EventSourceProps(software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps s3EventSourceProps) {
this.s3EventSourceProps = s3EventSourceProps;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link S3ToLambdaProps}
* @throws NullPointerException if any required attribute was not provided
*/
@Override
public S3ToLambdaProps build() {
return new Jsii$Proxy(bucketProps, existingBucketObj, existingLambdaObj, lambdaFunctionProps, s3EventSourceProps);
}
}
/**
* An implementation for {@link S3ToLambdaProps}
*/
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements S3ToLambdaProps {
private final software.amazon.awscdk.services.s3.BucketProps bucketProps;
private final software.amazon.awscdk.services.s3.Bucket existingBucketObj;
private final software.amazon.awscdk.services.lambda.Function existingLambdaObj;
private final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps;
private final software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps s3EventSourceProps;
/**
* 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.bucketProps = this.jsiiGet("bucketProps", software.amazon.awscdk.services.s3.BucketProps.class);
this.existingBucketObj = this.jsiiGet("existingBucketObj", software.amazon.awscdk.services.s3.Bucket.class);
this.existingLambdaObj = this.jsiiGet("existingLambdaObj", software.amazon.awscdk.services.lambda.Function.class);
this.lambdaFunctionProps = this.jsiiGet("lambdaFunctionProps", software.amazon.awscdk.services.lambda.FunctionProps.class);
this.s3EventSourceProps = this.jsiiGet("s3EventSourceProps", software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps.class);
}
/**
* Constructor that initializes the object based on literal property values passed by the {@link Builder}.
*/
private Jsii$Proxy(final software.amazon.awscdk.services.s3.BucketProps bucketProps, final software.amazon.awscdk.services.s3.Bucket existingBucketObj, final software.amazon.awscdk.services.lambda.Function existingLambdaObj, final software.amazon.awscdk.services.lambda.FunctionProps lambdaFunctionProps, final software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps s3EventSourceProps) {
super(software.amazon.jsii.JsiiObject.InitializationMode.JSII);
this.bucketProps = bucketProps;
this.existingBucketObj = existingBucketObj;
this.existingLambdaObj = existingLambdaObj;
this.lambdaFunctionProps = lambdaFunctionProps;
this.s3EventSourceProps = s3EventSourceProps;
}
@Override
public software.amazon.awscdk.services.s3.BucketProps getBucketProps() {
return this.bucketProps;
}
@Override
public software.amazon.awscdk.services.s3.Bucket getExistingBucketObj() {
return this.existingBucketObj;
}
@Override
public software.amazon.awscdk.services.lambda.Function getExistingLambdaObj() {
return this.existingLambdaObj;
}
@Override
public software.amazon.awscdk.services.lambda.FunctionProps getLambdaFunctionProps() {
return this.lambdaFunctionProps;
}
@Override
public software.amazon.awscdk.services.lambda.eventsources.S3EventSourceProps getS3EventSourceProps() {
return this.s3EventSourceProps;
}
@Override
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.getBucketProps() != null) {
data.set("bucketProps", om.valueToTree(this.getBucketProps()));
}
if (this.getExistingBucketObj() != null) {
data.set("existingBucketObj", om.valueToTree(this.getExistingBucketObj()));
}
if (this.getExistingLambdaObj() != null) {
data.set("existingLambdaObj", om.valueToTree(this.getExistingLambdaObj()));
}
if (this.getLambdaFunctionProps() != null) {
data.set("lambdaFunctionProps", om.valueToTree(this.getLambdaFunctionProps()));
}
if (this.getS3EventSourceProps() != null) {
data.set("s3EventSourceProps", om.valueToTree(this.getS3EventSourceProps()));
}
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-s3-lambda.S3ToLambdaProps"));
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 boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
S3ToLambdaProps.Jsii$Proxy that = (S3ToLambdaProps.Jsii$Proxy) o;
if (this.bucketProps != null ? !this.bucketProps.equals(that.bucketProps) : that.bucketProps != null) return false;
if (this.existingBucketObj != null ? !this.existingBucketObj.equals(that.existingBucketObj) : that.existingBucketObj != null) return false;
if (this.existingLambdaObj != null ? !this.existingLambdaObj.equals(that.existingLambdaObj) : that.existingLambdaObj != null) return false;
if (this.lambdaFunctionProps != null ? !this.lambdaFunctionProps.equals(that.lambdaFunctionProps) : that.lambdaFunctionProps != null) return false;
return this.s3EventSourceProps != null ? this.s3EventSourceProps.equals(that.s3EventSourceProps) : that.s3EventSourceProps == null;
}
@Override
public int hashCode() {
int result = this.bucketProps != null ? this.bucketProps.hashCode() : 0;
result = 31 * result + (this.existingBucketObj != null ? this.existingBucketObj.hashCode() : 0);
result = 31 * result + (this.existingLambdaObj != null ? this.existingLambdaObj.hashCode() : 0);
result = 31 * result + (this.lambdaFunctionProps != null ? this.lambdaFunctionProps.hashCode() : 0);
result = 31 * result + (this.s3EventSourceProps != null ? this.s3EventSourceProps.hashCode() : 0);
return result;
}
}
}