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

software.amazon.awsconstructs.services.lambdasqslambda.LambdaToSqsToLambdaProps Maven / Gradle / Ivy

package software.amazon.awsconstructs.services.lambdasqslambda;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.16.0 (build 99a3413)", date = "2020-12-15T16:07:13.176Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.lambdasqslambda.$Module.class, fqn = "@aws-solutions-constructs/aws-lambda-sqs-lambda.LambdaToSqsToLambdaProps")
@software.amazon.jsii.Jsii.Proxy(LambdaToSqsToLambdaProps.Jsii$Proxy.class)
public interface LambdaToSqsToLambdaProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Optional user-provided properties to override the default properties for the consumer Lambda function.
     * 

* Ignored if * an existingConsumerLambdaObj is provided. *

* Default: - Default properties are used. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.FunctionProps getConsumerLambdaFunctionProps() { return null; } /** * Optional user-provided props to override the default props for the dead letter queue. *

* Only used if the * deployDeadLetterQueue property is set to true. *

* Default: - Default props are used. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sqs.QueueProps getDeadLetterQueueProps() { return null; } /** * Whether to create a secondary queue to be used as a dead letter queue. *

* Defaults to true. *

* Default: - true. */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getDeployDeadLetterQueue() { return null; } /** * An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. *

* If an existing function is provided, the consumerLambdaFunctionProps property will be ignored. *

* Default: - None. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Function getExistingConsumerLambdaObj() { return null; } /** * An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. *

* If an existing function is provided, the producerLambdaFunctionProps property will be ignored. *

* Default: - None. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.Function getExistingProducerLambdaObj() { return null; } /** * An optional, existing SQS queue to be used instead of the default queue. *

* If an existing queue is provided, the * queueProps property will be ignored. *

* Default: - None. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sqs.Queue getExistingQueueObj() { return null; } /** * The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. *

* Defaults to 15. *

* Default: - 15. */ default @org.jetbrains.annotations.Nullable java.lang.Number getMaxReceiveCount() { return null; } /** * Optional user-provided properties to override the default properties for the producer Lambda function. *

* Ignored if * an existingProducerLambdaObj is provided. *

* Default: - Default properties are used. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.lambda.FunctionProps getProducerLambdaFunctionProps() { return null; } /** * Optional user-provided properties to override the default properties for the SQS queue. *

* Ignored if an * existingQueueObj is provided. *

* Default: - Default props are used. */ default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sqs.QueueProps getQueueProps() { return null; } /** * @return a {@link Builder} of {@link LambdaToSqsToLambdaProps} */ static Builder builder() { return new Builder(); } /** * A builder for {@link LambdaToSqsToLambdaProps} */ public static final class Builder implements software.amazon.jsii.Builder { private software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps; private software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps; private java.lang.Boolean deployDeadLetterQueue; private software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj; private software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj; private software.amazon.awscdk.services.sqs.Queue existingQueueObj; private java.lang.Number maxReceiveCount; private software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps; private software.amazon.awscdk.services.sqs.QueueProps queueProps; /** * Sets the value of {@link LambdaToSqsToLambdaProps#getConsumerLambdaFunctionProps} * @param consumerLambdaFunctionProps Optional user-provided properties to override the default properties for the consumer Lambda function. * Ignored if * an existingConsumerLambdaObj is provided. * @return {@code this} */ public Builder consumerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps) { this.consumerLambdaFunctionProps = consumerLambdaFunctionProps; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getDeadLetterQueueProps} * @param deadLetterQueueProps Optional user-provided props to override the default props for the dead letter queue. * Only used if the * deployDeadLetterQueue property is set to true. * @return {@code this} */ public Builder deadLetterQueueProps(software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps) { this.deadLetterQueueProps = deadLetterQueueProps; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getDeployDeadLetterQueue} * @param deployDeadLetterQueue Whether to create a secondary queue to be used as a dead letter queue. * Defaults to true. * @return {@code this} */ public Builder deployDeadLetterQueue(java.lang.Boolean deployDeadLetterQueue) { this.deployDeadLetterQueue = deployDeadLetterQueue; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getExistingConsumerLambdaObj} * @param existingConsumerLambdaObj An optional, existing Lambda function to be used instead of the default function for receiving/consuming messages from the queue. * If an existing function is provided, the consumerLambdaFunctionProps property will be ignored. * @return {@code this} */ public Builder existingConsumerLambdaObj(software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj) { this.existingConsumerLambdaObj = existingConsumerLambdaObj; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getExistingProducerLambdaObj} * @param existingProducerLambdaObj An optional, existing Lambda function to be used instead of the default function for sending messages to the queue. * If an existing function is provided, the producerLambdaFunctionProps property will be ignored. * @return {@code this} */ public Builder existingProducerLambdaObj(software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj) { this.existingProducerLambdaObj = existingProducerLambdaObj; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getExistingQueueObj} * @param existingQueueObj An optional, existing SQS queue to be used instead of the default queue. * If an existing queue is provided, the * queueProps property will be ignored. * @return {@code this} */ public Builder existingQueueObj(software.amazon.awscdk.services.sqs.Queue existingQueueObj) { this.existingQueueObj = existingQueueObj; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getMaxReceiveCount} * @param maxReceiveCount The number of times a message can be unsuccessfully dequeued before being moved to the dead letter queue. * Defaults to 15. * @return {@code this} */ public Builder maxReceiveCount(java.lang.Number maxReceiveCount) { this.maxReceiveCount = maxReceiveCount; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getProducerLambdaFunctionProps} * @param producerLambdaFunctionProps Optional user-provided properties to override the default properties for the producer Lambda function. * Ignored if * an existingProducerLambdaObj is provided. * @return {@code this} */ public Builder producerLambdaFunctionProps(software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps) { this.producerLambdaFunctionProps = producerLambdaFunctionProps; return this; } /** * Sets the value of {@link LambdaToSqsToLambdaProps#getQueueProps} * @param queueProps Optional user-provided properties to override the default properties for the SQS queue. * Ignored if an * existingQueueObj is provided. * @return {@code this} */ public Builder queueProps(software.amazon.awscdk.services.sqs.QueueProps queueProps) { this.queueProps = queueProps; return this; } /** * Builds the configured instance. * @return a new instance of {@link LambdaToSqsToLambdaProps} * @throws NullPointerException if any required attribute was not provided */ @Override public LambdaToSqsToLambdaProps build() { return new Jsii$Proxy(consumerLambdaFunctionProps, deadLetterQueueProps, deployDeadLetterQueue, existingConsumerLambdaObj, existingProducerLambdaObj, existingQueueObj, maxReceiveCount, producerLambdaFunctionProps, queueProps); } } /** * An implementation for {@link LambdaToSqsToLambdaProps} */ @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements LambdaToSqsToLambdaProps { private final software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps; private final software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps; private final java.lang.Boolean deployDeadLetterQueue; private final software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj; private final software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj; private final software.amazon.awscdk.services.sqs.Queue existingQueueObj; private final java.lang.Number maxReceiveCount; private final software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps; private final software.amazon.awscdk.services.sqs.QueueProps queueProps; /** * 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.consumerLambdaFunctionProps = software.amazon.jsii.Kernel.get(this, "consumerLambdaFunctionProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.FunctionProps.class)); this.deadLetterQueueProps = software.amazon.jsii.Kernel.get(this, "deadLetterQueueProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sqs.QueueProps.class)); this.deployDeadLetterQueue = software.amazon.jsii.Kernel.get(this, "deployDeadLetterQueue", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.existingConsumerLambdaObj = software.amazon.jsii.Kernel.get(this, "existingConsumerLambdaObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class)); this.existingProducerLambdaObj = software.amazon.jsii.Kernel.get(this, "existingProducerLambdaObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.Function.class)); this.existingQueueObj = software.amazon.jsii.Kernel.get(this, "existingQueueObj", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sqs.Queue.class)); this.maxReceiveCount = software.amazon.jsii.Kernel.get(this, "maxReceiveCount", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.producerLambdaFunctionProps = software.amazon.jsii.Kernel.get(this, "producerLambdaFunctionProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.lambda.FunctionProps.class)); this.queueProps = software.amazon.jsii.Kernel.get(this, "queueProps", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sqs.QueueProps.class)); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ protected Jsii$Proxy(final software.amazon.awscdk.services.lambda.FunctionProps consumerLambdaFunctionProps, final software.amazon.awscdk.services.sqs.QueueProps deadLetterQueueProps, final java.lang.Boolean deployDeadLetterQueue, final software.amazon.awscdk.services.lambda.Function existingConsumerLambdaObj, final software.amazon.awscdk.services.lambda.Function existingProducerLambdaObj, final software.amazon.awscdk.services.sqs.Queue existingQueueObj, final java.lang.Number maxReceiveCount, final software.amazon.awscdk.services.lambda.FunctionProps producerLambdaFunctionProps, final software.amazon.awscdk.services.sqs.QueueProps queueProps) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.consumerLambdaFunctionProps = consumerLambdaFunctionProps; this.deadLetterQueueProps = deadLetterQueueProps; this.deployDeadLetterQueue = deployDeadLetterQueue; this.existingConsumerLambdaObj = existingConsumerLambdaObj; this.existingProducerLambdaObj = existingProducerLambdaObj; this.existingQueueObj = existingQueueObj; this.maxReceiveCount = maxReceiveCount; this.producerLambdaFunctionProps = producerLambdaFunctionProps; this.queueProps = queueProps; } @Override public final software.amazon.awscdk.services.lambda.FunctionProps getConsumerLambdaFunctionProps() { return this.consumerLambdaFunctionProps; } @Override public final software.amazon.awscdk.services.sqs.QueueProps getDeadLetterQueueProps() { return this.deadLetterQueueProps; } @Override public final java.lang.Boolean getDeployDeadLetterQueue() { return this.deployDeadLetterQueue; } @Override public final software.amazon.awscdk.services.lambda.Function getExistingConsumerLambdaObj() { return this.existingConsumerLambdaObj; } @Override public final software.amazon.awscdk.services.lambda.Function getExistingProducerLambdaObj() { return this.existingProducerLambdaObj; } @Override public final software.amazon.awscdk.services.sqs.Queue getExistingQueueObj() { return this.existingQueueObj; } @Override public final java.lang.Number getMaxReceiveCount() { return this.maxReceiveCount; } @Override public final software.amazon.awscdk.services.lambda.FunctionProps getProducerLambdaFunctionProps() { return this.producerLambdaFunctionProps; } @Override public final software.amazon.awscdk.services.sqs.QueueProps getQueueProps() { return this.queueProps; } @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.getConsumerLambdaFunctionProps() != null) { data.set("consumerLambdaFunctionProps", om.valueToTree(this.getConsumerLambdaFunctionProps())); } if (this.getDeadLetterQueueProps() != null) { data.set("deadLetterQueueProps", om.valueToTree(this.getDeadLetterQueueProps())); } if (this.getDeployDeadLetterQueue() != null) { data.set("deployDeadLetterQueue", om.valueToTree(this.getDeployDeadLetterQueue())); } if (this.getExistingConsumerLambdaObj() != null) { data.set("existingConsumerLambdaObj", om.valueToTree(this.getExistingConsumerLambdaObj())); } if (this.getExistingProducerLambdaObj() != null) { data.set("existingProducerLambdaObj", om.valueToTree(this.getExistingProducerLambdaObj())); } if (this.getExistingQueueObj() != null) { data.set("existingQueueObj", om.valueToTree(this.getExistingQueueObj())); } if (this.getMaxReceiveCount() != null) { data.set("maxReceiveCount", om.valueToTree(this.getMaxReceiveCount())); } if (this.getProducerLambdaFunctionProps() != null) { data.set("producerLambdaFunctionProps", om.valueToTree(this.getProducerLambdaFunctionProps())); } if (this.getQueueProps() != null) { data.set("queueProps", om.valueToTree(this.getQueueProps())); } 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-sqs-lambda.LambdaToSqsToLambdaProps")); 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; LambdaToSqsToLambdaProps.Jsii$Proxy that = (LambdaToSqsToLambdaProps.Jsii$Proxy) o; if (this.consumerLambdaFunctionProps != null ? !this.consumerLambdaFunctionProps.equals(that.consumerLambdaFunctionProps) : that.consumerLambdaFunctionProps != null) return false; if (this.deadLetterQueueProps != null ? !this.deadLetterQueueProps.equals(that.deadLetterQueueProps) : that.deadLetterQueueProps != null) return false; if (this.deployDeadLetterQueue != null ? !this.deployDeadLetterQueue.equals(that.deployDeadLetterQueue) : that.deployDeadLetterQueue != null) return false; if (this.existingConsumerLambdaObj != null ? !this.existingConsumerLambdaObj.equals(that.existingConsumerLambdaObj) : that.existingConsumerLambdaObj != null) return false; if (this.existingProducerLambdaObj != null ? !this.existingProducerLambdaObj.equals(that.existingProducerLambdaObj) : that.existingProducerLambdaObj != null) return false; if (this.existingQueueObj != null ? !this.existingQueueObj.equals(that.existingQueueObj) : that.existingQueueObj != null) return false; if (this.maxReceiveCount != null ? !this.maxReceiveCount.equals(that.maxReceiveCount) : that.maxReceiveCount != null) return false; if (this.producerLambdaFunctionProps != null ? !this.producerLambdaFunctionProps.equals(that.producerLambdaFunctionProps) : that.producerLambdaFunctionProps != null) return false; return this.queueProps != null ? this.queueProps.equals(that.queueProps) : that.queueProps == null; } @Override public final int hashCode() { int result = this.consumerLambdaFunctionProps != null ? this.consumerLambdaFunctionProps.hashCode() : 0; result = 31 * result + (this.deadLetterQueueProps != null ? this.deadLetterQueueProps.hashCode() : 0); result = 31 * result + (this.deployDeadLetterQueue != null ? this.deployDeadLetterQueue.hashCode() : 0); result = 31 * result + (this.existingConsumerLambdaObj != null ? this.existingConsumerLambdaObj.hashCode() : 0); result = 31 * result + (this.existingProducerLambdaObj != null ? this.existingProducerLambdaObj.hashCode() : 0); result = 31 * result + (this.existingQueueObj != null ? this.existingQueueObj.hashCode() : 0); result = 31 * result + (this.maxReceiveCount != null ? this.maxReceiveCount.hashCode() : 0); result = 31 * result + (this.producerLambdaFunctionProps != null ? this.producerLambdaFunctionProps.hashCode() : 0); result = 31 * result + (this.queueProps != null ? this.queueProps.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy