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

io.github.cdklabs.tweetqueue.TweetQueueProps Maven / Gradle / Ivy

There is a newer version: 2.0.659
Show newest version
package io.github.cdklabs.tweetqueue;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-14T00:23:34.702Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.tweetqueue.$Module.class, fqn = "cdk-tweet-queue.TweetQueueProps")
@software.amazon.jsii.Jsii.Proxy(TweetQueueProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface TweetQueueProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * The twitter query string to stream.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getQuery();

    /**
     * The SecretsManager secret that contains Twitter authentication credentials from https://apps.twitter.com/ with the following attributes (exact names):   - consumer_key   - consumer_secret   - access_token_key   - access_token_secret.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getSecretArn();

    /**
     * Polling interval in minutes.
     * 

* Set to 0 to disable polling. *

* Default: 1min */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getIntervalMin() { return null; } /** * Number of seconds for messages to wait in the queue for processing. *

* After this time, messages will be removed from the queue. *

* Default: 60 seconds */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getRetentionPeriodSec() { return null; } /** * Number of seconds for messages to be invisible while they are processed. *

* Based on the amount of time it would require to process a single message. *

* Default: 60 seconds */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getVisibilityTimeoutSec() { return null; } /** * @return a {@link Builder} of {@link TweetQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link TweetQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String query; java.lang.String secretArn; java.lang.Number intervalMin; java.lang.Number retentionPeriodSec; java.lang.Number visibilityTimeoutSec; /** * Sets the value of {@link TweetQueueProps#getQuery} * @param query The twitter query string to stream. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder query(java.lang.String query) { this.query = query; return this; } /** * Sets the value of {@link TweetQueueProps#getSecretArn} * @param secretArn The SecretsManager secret that contains Twitter authentication credentials from https://apps.twitter.com/ with the following attributes (exact names): - consumer_key - consumer_secret - access_token_key - access_token_secret. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder secretArn(java.lang.String secretArn) { this.secretArn = secretArn; return this; } /** * Sets the value of {@link TweetQueueProps#getIntervalMin} * @param intervalMin Polling interval in minutes. * Set to 0 to disable polling. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder intervalMin(java.lang.Number intervalMin) { this.intervalMin = intervalMin; return this; } /** * Sets the value of {@link TweetQueueProps#getRetentionPeriodSec} * @param retentionPeriodSec Number of seconds for messages to wait in the queue for processing. * After this time, messages will be removed from the queue. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder retentionPeriodSec(java.lang.Number retentionPeriodSec) { this.retentionPeriodSec = retentionPeriodSec; return this; } /** * Sets the value of {@link TweetQueueProps#getVisibilityTimeoutSec} * @param visibilityTimeoutSec Number of seconds for messages to be invisible while they are processed. * Based on the amount of time it would require to process a single message. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder visibilityTimeoutSec(java.lang.Number visibilityTimeoutSec) { this.visibilityTimeoutSec = visibilityTimeoutSec; return this; } /** * Builds the configured instance. * @return a new instance of {@link TweetQueueProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public TweetQueueProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link TweetQueueProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements TweetQueueProps { private final java.lang.String query; private final java.lang.String secretArn; private final java.lang.Number intervalMin; private final java.lang.Number retentionPeriodSec; private final java.lang.Number visibilityTimeoutSec; /** * 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.query = software.amazon.jsii.Kernel.get(this, "query", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.secretArn = software.amazon.jsii.Kernel.get(this, "secretArn", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.intervalMin = software.amazon.jsii.Kernel.get(this, "intervalMin", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.retentionPeriodSec = software.amazon.jsii.Kernel.get(this, "retentionPeriodSec", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.visibilityTimeoutSec = software.amazon.jsii.Kernel.get(this, "visibilityTimeoutSec", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.query = java.util.Objects.requireNonNull(builder.query, "query is required"); this.secretArn = java.util.Objects.requireNonNull(builder.secretArn, "secretArn is required"); this.intervalMin = builder.intervalMin; this.retentionPeriodSec = builder.retentionPeriodSec; this.visibilityTimeoutSec = builder.visibilityTimeoutSec; } @Override public final java.lang.String getQuery() { return this.query; } @Override public final java.lang.String getSecretArn() { return this.secretArn; } @Override public final java.lang.Number getIntervalMin() { return this.intervalMin; } @Override public final java.lang.Number getRetentionPeriodSec() { return this.retentionPeriodSec; } @Override public final java.lang.Number getVisibilityTimeoutSec() { return this.visibilityTimeoutSec; } @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(); data.set("query", om.valueToTree(this.getQuery())); data.set("secretArn", om.valueToTree(this.getSecretArn())); if (this.getIntervalMin() != null) { data.set("intervalMin", om.valueToTree(this.getIntervalMin())); } if (this.getRetentionPeriodSec() != null) { data.set("retentionPeriodSec", om.valueToTree(this.getRetentionPeriodSec())); } if (this.getVisibilityTimeoutSec() != null) { data.set("visibilityTimeoutSec", om.valueToTree(this.getVisibilityTimeoutSec())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-tweet-queue.TweetQueueProps")); 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; TweetQueueProps.Jsii$Proxy that = (TweetQueueProps.Jsii$Proxy) o; if (!query.equals(that.query)) return false; if (!secretArn.equals(that.secretArn)) return false; if (this.intervalMin != null ? !this.intervalMin.equals(that.intervalMin) : that.intervalMin != null) return false; if (this.retentionPeriodSec != null ? !this.retentionPeriodSec.equals(that.retentionPeriodSec) : that.retentionPeriodSec != null) return false; return this.visibilityTimeoutSec != null ? this.visibilityTimeoutSec.equals(that.visibilityTimeoutSec) : that.visibilityTimeoutSec == null; } @Override public final int hashCode() { int result = this.query.hashCode(); result = 31 * result + (this.secretArn.hashCode()); result = 31 * result + (this.intervalMin != null ? this.intervalMin.hashCode() : 0); result = 31 * result + (this.retentionPeriodSec != null ? this.retentionPeriodSec.hashCode() : 0); result = 31 * result + (this.visibilityTimeoutSec != null ? this.visibilityTimeoutSec.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy