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

software.amazon.awsconstructs.services.lambdaeventbridge.LambdaToEventbridgeProps Maven / Gradle / Ivy

Go to download

CDK constructs for defining an interaction between an AWS Lambda function and an Amazon EventBridge.

There is a newer version: 2.76.0
Show newest version
package software.amazon.awsconstructs.services.lambdaeventbridge;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.94.0 (build b380f01)", date = "2024-02-12T16:36:48.758Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdaeventbridge.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-eventbridge.LambdaToEventbridgeProps")
@software.amazon.jsii.Jsii.Proxy(LambdaToEventbridgeProps.Jsii$Proxy.class)
public interface LambdaToEventbridgeProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Whether to deploy a new VPC.
     * 

* Default: - false */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getDeployVpc() { return null; } /** * Optional Name for the Lambda function environment variable set to the name of the Event bus. *

* Default: - EVENTBUS_NAME */ default @org.jetbrains.annotations.Nullable java.lang.String getEventBusEnvironmentVariableName() { return null; } /** * A new custom EventBus is created with provided props. *

* Default: - None */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.EventBusProps getEventBusProps() { return null; } /** * Existing instance of a custom EventBus. *

* Default: - None */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.events.IEventBus getExistingEventBusInterface() { 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 @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.IVpc getExistingVpc() { return null; } /** * 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 @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.ec2.VpcProps getVpcProps() { return null; } /** * @return a {@link Builder} of {@link LambdaToEventbridgeProps} */ static Builder builder() { return new Builder(); } /** * A builder for {@link LambdaToEventbridgeProps} */ public static final class Builder implements software.amazon.jsii.Builder { java.lang.Boolean deployVpc; java.lang.String eventBusEnvironmentVariableName; software.amazon.awscdk.services.events.EventBusProps eventBusProps; software.amazon.awscdk.services.events.IEventBus existingEventBusInterface; 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 LambdaToEventbridgeProps#getDeployVpc} * @param deployVpc Whether to deploy a new VPC. * @return {@code this} */ public Builder deployVpc(java.lang.Boolean deployVpc) { this.deployVpc = deployVpc; return this; } /** * Sets the value of {@link LambdaToEventbridgeProps#getEventBusEnvironmentVariableName} * @param eventBusEnvironmentVariableName Optional Name for the Lambda function environment variable set to the name of the Event bus. * @return {@code this} */ public Builder eventBusEnvironmentVariableName(java.lang.String eventBusEnvironmentVariableName) { this.eventBusEnvironmentVariableName = eventBusEnvironmentVariableName; return this; } /** * Sets the value of {@link LambdaToEventbridgeProps#getEventBusProps} * @param eventBusProps A new custom EventBus is created with provided props. * @return {@code this} */ public Builder eventBusProps(software.amazon.awscdk.services.events.EventBusProps eventBusProps) { this.eventBusProps = eventBusProps; return this; } /** * Sets the value of {@link LambdaToEventbridgeProps#getExistingEventBusInterface} * @param existingEventBusInterface Existing instance of a custom EventBus. * @return {@code this} */ public Builder existingEventBusInterface(software.amazon.awscdk.services.events.IEventBus existingEventBusInterface) { this.existingEventBusInterface = existingEventBusInterface; return this; } /** * Sets the value of {@link LambdaToEventbridgeProps#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 LambdaToEventbridgeProps#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 LambdaToEventbridgeProps#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 LambdaToEventbridgeProps#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 LambdaToEventbridgeProps} * @throws NullPointerException if any required attribute was not provided */ @Override public LambdaToEventbridgeProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link LambdaToEventbridgeProps} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LambdaToEventbridgeProps { private final java.lang.Boolean deployVpc; private final java.lang.String eventBusEnvironmentVariableName; private final software.amazon.awscdk.services.events.EventBusProps eventBusProps; private final software.amazon.awscdk.services.events.IEventBus existingEventBusInterface; 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.deployVpc = software.amazon.jsii.Kernel.get(this, "deployVpc", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.eventBusEnvironmentVariableName = software.amazon.jsii.Kernel.get(this, "eventBusEnvironmentVariableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.eventBusProps = software.amazon.jsii.Kernel.get(this, "eventBusProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.EventBusProps.class)); this.existingEventBusInterface = software.amazon.jsii.Kernel.get(this, "existingEventBusInterface", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.events.IEventBus.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.deployVpc = builder.deployVpc; this.eventBusEnvironmentVariableName = builder.eventBusEnvironmentVariableName; this.eventBusProps = builder.eventBusProps; this.existingEventBusInterface = builder.existingEventBusInterface; this.existingLambdaObj = builder.existingLambdaObj; this.existingVpc = builder.existingVpc; this.lambdaFunctionProps = builder.lambdaFunctionProps; this.vpcProps = builder.vpcProps; } @Override public final java.lang.Boolean getDeployVpc() { return this.deployVpc; } @Override public final java.lang.String getEventBusEnvironmentVariableName() { return this.eventBusEnvironmentVariableName; } @Override public final software.amazon.awscdk.services.events.EventBusProps getEventBusProps() { return this.eventBusProps; } @Override public final software.amazon.awscdk.services.events.IEventBus getExistingEventBusInterface() { return this.existingEventBusInterface; } @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.getDeployVpc() != null) { data.set("deployVpc", om.valueToTree(this.getDeployVpc())); } if (this.getEventBusEnvironmentVariableName() != null) { data.set("eventBusEnvironmentVariableName", om.valueToTree(this.getEventBusEnvironmentVariableName())); } if (this.getEventBusProps() != null) { data.set("eventBusProps", om.valueToTree(this.getEventBusProps())); } if (this.getExistingEventBusInterface() != null) { data.set("existingEventBusInterface", om.valueToTree(this.getExistingEventBusInterface())); } 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-eventbridge.LambdaToEventbridgeProps")); 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; LambdaToEventbridgeProps.Jsii$Proxy that = (LambdaToEventbridgeProps.Jsii$Proxy) o; if (this.deployVpc != null ? !this.deployVpc.equals(that.deployVpc) : that.deployVpc != null) return false; if (this.eventBusEnvironmentVariableName != null ? !this.eventBusEnvironmentVariableName.equals(that.eventBusEnvironmentVariableName) : that.eventBusEnvironmentVariableName != null) return false; if (this.eventBusProps != null ? !this.eventBusProps.equals(that.eventBusProps) : that.eventBusProps != null) return false; if (this.existingEventBusInterface != null ? !this.existingEventBusInterface.equals(that.existingEventBusInterface) : that.existingEventBusInterface != 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.deployVpc != null ? this.deployVpc.hashCode() : 0; result = 31 * result + (this.eventBusEnvironmentVariableName != null ? this.eventBusEnvironmentVariableName.hashCode() : 0); result = 31 * result + (this.eventBusProps != null ? this.eventBusProps.hashCode() : 0); result = 31 * result + (this.existingEventBusInterface != null ? this.existingEventBusInterface.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