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

software.amazon.awsconstructs.services.apigatewaysqs.ApiGatewayToSqsProps Maven / Gradle / Ivy

package software.amazon.awsconstructs.services.apigatewaysqs;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.7.0 (build 179a3a5)", date = "2020-06-25T20:27:08.625Z")
@software.amazon.jsii.Jsii(module = software.amazon.awsconstructs.services.apigatewaysqs.$Module.class, fqn = "@aws-solutions-constructs/aws-apigateway-sqs.ApiGatewayToSqsProps")
@software.amazon.jsii.Jsii.Proxy(ApiGatewayToSqsProps.Jsii$Proxy.class)
public interface ApiGatewayToSqsProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Whether to deploy an API Gateway Method for Create operations on the queue (i.e. sqs:SendMessage).
     * 

* Default: - false */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getAllowCreateOperation() { return null; } /** * Whether to deploy an API Gateway Method for Delete operations on the queue (i.e. sqs:DeleteMessage). *

* Default: - false */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getAllowDeleteOperation() { return null; } /** * Whether to deploy an API Gateway Method for Read operations on the queue (i.e. sqs:ReceiveMessage). *

* Default: - false */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getAllowReadOperation() { return null; } /** * Optional user-provided props to override the default props for the API Gateway. *

* Default: - Default properties are used. */ default @org.jetbrains.annotations.Nullable java.lang.Object getApiGatewayProps() { return null; } /** * API Gateway Request template for Create method, required if allowCreateOperation set to true. *

* Default: - None */ default @org.jetbrains.annotations.Nullable java.lang.String getCreateRequestTemplate() { return null; } /** * Whether to deploy a secondary queue to be used as a dead letter queue. *

* Default: - required field. */ default @org.jetbrains.annotations.Nullable java.lang.Boolean getDeployDeadLetterQueue() { return null; } /** * The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. *

* Default: - required only if deployDeadLetterQueue = true. */ default @org.jetbrains.annotations.Nullable java.lang.Number getMaxReceiveCount() { return null; } /** * Optional user-provided props to override the default props for the queue. *

* Default: - Default props are used */ default @org.jetbrains.annotations.Nullable java.lang.Object getQueueProps() { return null; } /** * @return a {@link Builder} of {@link ApiGatewayToSqsProps} */ static Builder builder() { return new Builder(); } /** * A builder for {@link ApiGatewayToSqsProps} */ public static final class Builder implements software.amazon.jsii.Builder { private java.lang.Boolean allowCreateOperation; private java.lang.Boolean allowDeleteOperation; private java.lang.Boolean allowReadOperation; private java.lang.Object apiGatewayProps; private java.lang.String createRequestTemplate; private java.lang.Boolean deployDeadLetterQueue; private java.lang.Number maxReceiveCount; private java.lang.Object queueProps; /** * Sets the value of {@link ApiGatewayToSqsProps#getAllowCreateOperation} * @param allowCreateOperation Whether to deploy an API Gateway Method for Create operations on the queue (i.e. sqs:SendMessage). * @return {@code this} */ public Builder allowCreateOperation(java.lang.Boolean allowCreateOperation) { this.allowCreateOperation = allowCreateOperation; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getAllowDeleteOperation} * @param allowDeleteOperation Whether to deploy an API Gateway Method for Delete operations on the queue (i.e. sqs:DeleteMessage). * @return {@code this} */ public Builder allowDeleteOperation(java.lang.Boolean allowDeleteOperation) { this.allowDeleteOperation = allowDeleteOperation; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getAllowReadOperation} * @param allowReadOperation Whether to deploy an API Gateway Method for Read operations on the queue (i.e. sqs:ReceiveMessage). * @return {@code this} */ public Builder allowReadOperation(java.lang.Boolean allowReadOperation) { this.allowReadOperation = allowReadOperation; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getApiGatewayProps} * @param apiGatewayProps Optional user-provided props to override the default props for the API Gateway. * @return {@code this} */ public Builder apiGatewayProps(java.lang.Object apiGatewayProps) { this.apiGatewayProps = apiGatewayProps; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getCreateRequestTemplate} * @param createRequestTemplate API Gateway Request template for Create method, required if allowCreateOperation set to true. * @return {@code this} */ public Builder createRequestTemplate(java.lang.String createRequestTemplate) { this.createRequestTemplate = createRequestTemplate; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getDeployDeadLetterQueue} * @param deployDeadLetterQueue Whether to deploy a secondary queue to be used as a dead letter queue. * @return {@code this} */ public Builder deployDeadLetterQueue(java.lang.Boolean deployDeadLetterQueue) { this.deployDeadLetterQueue = deployDeadLetterQueue; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getMaxReceiveCount} * @param maxReceiveCount The number of times a message can be unsuccessfully dequeued before being moved to the dead-letter queue. * @return {@code this} */ public Builder maxReceiveCount(java.lang.Number maxReceiveCount) { this.maxReceiveCount = maxReceiveCount; return this; } /** * Sets the value of {@link ApiGatewayToSqsProps#getQueueProps} * @param queueProps Optional user-provided props to override the default props for the queue. * @return {@code this} */ public Builder queueProps(java.lang.Object queueProps) { this.queueProps = queueProps; return this; } /** * Builds the configured instance. * @return a new instance of {@link ApiGatewayToSqsProps} * @throws NullPointerException if any required attribute was not provided */ @Override public ApiGatewayToSqsProps build() { return new Jsii$Proxy(allowCreateOperation, allowDeleteOperation, allowReadOperation, apiGatewayProps, createRequestTemplate, deployDeadLetterQueue, maxReceiveCount, queueProps); } } /** * An implementation for {@link ApiGatewayToSqsProps} */ final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements ApiGatewayToSqsProps { private final java.lang.Boolean allowCreateOperation; private final java.lang.Boolean allowDeleteOperation; private final java.lang.Boolean allowReadOperation; private final java.lang.Object apiGatewayProps; private final java.lang.String createRequestTemplate; private final java.lang.Boolean deployDeadLetterQueue; private final java.lang.Number maxReceiveCount; private final java.lang.Object 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.allowCreateOperation = this.jsiiGet("allowCreateOperation", java.lang.Boolean.class); this.allowDeleteOperation = this.jsiiGet("allowDeleteOperation", java.lang.Boolean.class); this.allowReadOperation = this.jsiiGet("allowReadOperation", java.lang.Boolean.class); this.apiGatewayProps = this.jsiiGet("apiGatewayProps", java.lang.Object.class); this.createRequestTemplate = this.jsiiGet("createRequestTemplate", java.lang.String.class); this.deployDeadLetterQueue = this.jsiiGet("deployDeadLetterQueue", java.lang.Boolean.class); this.maxReceiveCount = this.jsiiGet("maxReceiveCount", java.lang.Number.class); this.queueProps = this.jsiiGet("queueProps", java.lang.Object.class); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ private Jsii$Proxy(final java.lang.Boolean allowCreateOperation, final java.lang.Boolean allowDeleteOperation, final java.lang.Boolean allowReadOperation, final java.lang.Object apiGatewayProps, final java.lang.String createRequestTemplate, final java.lang.Boolean deployDeadLetterQueue, final java.lang.Number maxReceiveCount, final java.lang.Object queueProps) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.allowCreateOperation = allowCreateOperation; this.allowDeleteOperation = allowDeleteOperation; this.allowReadOperation = allowReadOperation; this.apiGatewayProps = apiGatewayProps; this.createRequestTemplate = createRequestTemplate; this.deployDeadLetterQueue = deployDeadLetterQueue; this.maxReceiveCount = maxReceiveCount; this.queueProps = queueProps; } @Override public java.lang.Boolean getAllowCreateOperation() { return this.allowCreateOperation; } @Override public java.lang.Boolean getAllowDeleteOperation() { return this.allowDeleteOperation; } @Override public java.lang.Boolean getAllowReadOperation() { return this.allowReadOperation; } @Override public java.lang.Object getApiGatewayProps() { return this.apiGatewayProps; } @Override public java.lang.String getCreateRequestTemplate() { return this.createRequestTemplate; } @Override public java.lang.Boolean getDeployDeadLetterQueue() { return this.deployDeadLetterQueue; } @Override public java.lang.Number getMaxReceiveCount() { return this.maxReceiveCount; } @Override public java.lang.Object getQueueProps() { return this.queueProps; } @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.getAllowCreateOperation() != null) { data.set("allowCreateOperation", om.valueToTree(this.getAllowCreateOperation())); } if (this.getAllowDeleteOperation() != null) { data.set("allowDeleteOperation", om.valueToTree(this.getAllowDeleteOperation())); } if (this.getAllowReadOperation() != null) { data.set("allowReadOperation", om.valueToTree(this.getAllowReadOperation())); } if (this.getApiGatewayProps() != null) { data.set("apiGatewayProps", om.valueToTree(this.getApiGatewayProps())); } if (this.getCreateRequestTemplate() != null) { data.set("createRequestTemplate", om.valueToTree(this.getCreateRequestTemplate())); } if (this.getDeployDeadLetterQueue() != null) { data.set("deployDeadLetterQueue", om.valueToTree(this.getDeployDeadLetterQueue())); } if (this.getMaxReceiveCount() != null) { data.set("maxReceiveCount", om.valueToTree(this.getMaxReceiveCount())); } 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-apigateway-sqs.ApiGatewayToSqsProps")); 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; ApiGatewayToSqsProps.Jsii$Proxy that = (ApiGatewayToSqsProps.Jsii$Proxy) o; if (this.allowCreateOperation != null ? !this.allowCreateOperation.equals(that.allowCreateOperation) : that.allowCreateOperation != null) return false; if (this.allowDeleteOperation != null ? !this.allowDeleteOperation.equals(that.allowDeleteOperation) : that.allowDeleteOperation != null) return false; if (this.allowReadOperation != null ? !this.allowReadOperation.equals(that.allowReadOperation) : that.allowReadOperation != null) return false; if (this.apiGatewayProps != null ? !this.apiGatewayProps.equals(that.apiGatewayProps) : that.apiGatewayProps != null) return false; if (this.createRequestTemplate != null ? !this.createRequestTemplate.equals(that.createRequestTemplate) : that.createRequestTemplate != null) return false; if (this.deployDeadLetterQueue != null ? !this.deployDeadLetterQueue.equals(that.deployDeadLetterQueue) : that.deployDeadLetterQueue != null) return false; if (this.maxReceiveCount != null ? !this.maxReceiveCount.equals(that.maxReceiveCount) : that.maxReceiveCount != null) return false; return this.queueProps != null ? this.queueProps.equals(that.queueProps) : that.queueProps == null; } @Override public int hashCode() { int result = this.allowCreateOperation != null ? this.allowCreateOperation.hashCode() : 0; result = 31 * result + (this.allowDeleteOperation != null ? this.allowDeleteOperation.hashCode() : 0); result = 31 * result + (this.allowReadOperation != null ? this.allowReadOperation.hashCode() : 0); result = 31 * result + (this.apiGatewayProps != null ? this.apiGatewayProps.hashCode() : 0); result = 31 * result + (this.createRequestTemplate != null ? this.createRequestTemplate.hashCode() : 0); result = 31 * result + (this.deployDeadLetterQueue != null ? this.deployDeadLetterQueue.hashCode() : 0); result = 31 * result + (this.maxReceiveCount != null ? this.maxReceiveCount.hashCode() : 0); result = 31 * result + (this.queueProps != null ? this.queueProps.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy