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

io.github.cdklabs.cdkmonitoringconstructs.SnsAlarmActionStrategyProps Maven / Gradle / Ivy

There is a newer version: 9.1.0
Show newest version
package io.github.cdklabs.cdkmonitoringconstructs;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T17:32:52.140Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.SnsAlarmActionStrategyProps")
@software.amazon.jsii.Jsii.Proxy(SnsAlarmActionStrategyProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SnsAlarmActionStrategyProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Target topic used when the alarm is triggered.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull software.amazon.awscdk.services.sns.ITopic getOnAlarmTopic();

    /**
     * (experimental) Optional target topic for when the alarm goes into the INSUFFICIENT_DATA state.
     * 

* Default: - no notification sent */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sns.ITopic getOnInsufficientDataTopic() { return null; } /** * (experimental) Optional target topic for when the alarm goes into the OK state. *

* Default: - no notification sent */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.sns.ITopic getOnOkTopic() { return null; } /** * @return a {@link Builder} of {@link SnsAlarmActionStrategyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link SnsAlarmActionStrategyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { software.amazon.awscdk.services.sns.ITopic onAlarmTopic; software.amazon.awscdk.services.sns.ITopic onInsufficientDataTopic; software.amazon.awscdk.services.sns.ITopic onOkTopic; /** * Sets the value of {@link SnsAlarmActionStrategyProps#getOnAlarmTopic} * @param onAlarmTopic Target topic used when the alarm is triggered. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder onAlarmTopic(software.amazon.awscdk.services.sns.ITopic onAlarmTopic) { this.onAlarmTopic = onAlarmTopic; return this; } /** * Sets the value of {@link SnsAlarmActionStrategyProps#getOnInsufficientDataTopic} * @param onInsufficientDataTopic Optional target topic for when the alarm goes into the INSUFFICIENT_DATA state. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder onInsufficientDataTopic(software.amazon.awscdk.services.sns.ITopic onInsufficientDataTopic) { this.onInsufficientDataTopic = onInsufficientDataTopic; return this; } /** * Sets the value of {@link SnsAlarmActionStrategyProps#getOnOkTopic} * @param onOkTopic Optional target topic for when the alarm goes into the OK state. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder onOkTopic(software.amazon.awscdk.services.sns.ITopic onOkTopic) { this.onOkTopic = onOkTopic; return this; } /** * Builds the configured instance. * @return a new instance of {@link SnsAlarmActionStrategyProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public SnsAlarmActionStrategyProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link SnsAlarmActionStrategyProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SnsAlarmActionStrategyProps { private final software.amazon.awscdk.services.sns.ITopic onAlarmTopic; private final software.amazon.awscdk.services.sns.ITopic onInsufficientDataTopic; private final software.amazon.awscdk.services.sns.ITopic onOkTopic; /** * 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.onAlarmTopic = software.amazon.jsii.Kernel.get(this, "onAlarmTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class)); this.onInsufficientDataTopic = software.amazon.jsii.Kernel.get(this, "onInsufficientDataTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.class)); this.onOkTopic = software.amazon.jsii.Kernel.get(this, "onOkTopic", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.sns.ITopic.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.onAlarmTopic = java.util.Objects.requireNonNull(builder.onAlarmTopic, "onAlarmTopic is required"); this.onInsufficientDataTopic = builder.onInsufficientDataTopic; this.onOkTopic = builder.onOkTopic; } @Override public final software.amazon.awscdk.services.sns.ITopic getOnAlarmTopic() { return this.onAlarmTopic; } @Override public final software.amazon.awscdk.services.sns.ITopic getOnInsufficientDataTopic() { return this.onInsufficientDataTopic; } @Override public final software.amazon.awscdk.services.sns.ITopic getOnOkTopic() { return this.onOkTopic; } @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("onAlarmTopic", om.valueToTree(this.getOnAlarmTopic())); if (this.getOnInsufficientDataTopic() != null) { data.set("onInsufficientDataTopic", om.valueToTree(this.getOnInsufficientDataTopic())); } if (this.getOnOkTopic() != null) { data.set("onOkTopic", om.valueToTree(this.getOnOkTopic())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-monitoring-constructs.SnsAlarmActionStrategyProps")); 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; SnsAlarmActionStrategyProps.Jsii$Proxy that = (SnsAlarmActionStrategyProps.Jsii$Proxy) o; if (!onAlarmTopic.equals(that.onAlarmTopic)) return false; if (this.onInsufficientDataTopic != null ? !this.onInsufficientDataTopic.equals(that.onInsufficientDataTopic) : that.onInsufficientDataTopic != null) return false; return this.onOkTopic != null ? this.onOkTopic.equals(that.onOkTopic) : that.onOkTopic == null; } @Override public final int hashCode() { int result = this.onAlarmTopic.hashCode(); result = 31 * result + (this.onInsufficientDataTopic != null ? this.onInsufficientDataTopic.hashCode() : 0); result = 31 * result + (this.onOkTopic != null ? this.onOkTopic.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy