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

com.github.eladb.watchful.WatchApiGatewayOptions Maven / Gradle / Ivy

There is a newer version: 0.5.231
Show newest version
package com.github.eladb.watchful;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.13.0 (build 385c325)", date = "2020-11-09T06:11:47.371Z")
@software.amazon.jsii.Jsii(module = com.github.eladb.watchful.$Module.class, fqn = "cdk-watchful.WatchApiGatewayOptions")
@software.amazon.jsii.Jsii.Proxy(WatchApiGatewayOptions.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface WatchApiGatewayOptions extends software.amazon.jsii.JsiiSerializable {

    /**
     * Include a dashboard graph for caching metrics.
     * 

* Default: false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Boolean getCacheGraph() { return null; } /** * Alarm when 5XX errors reach this threshold over 5 minutes. *

* Default: 1 any 5xx HTTP response will trigger the alarm */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.Number getServerErrorThreshold() { return null; } /** * A list of operations to monitor separately. *

* Default: - only API-level monitoring is added. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.List getWatchedOperations() { return null; } /** * @return a {@link Builder} of {@link WatchApiGatewayOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link WatchApiGatewayOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { private java.lang.Boolean cacheGraph; private java.lang.Number serverErrorThreshold; private java.util.List watchedOperations; /** * Sets the value of {@link WatchApiGatewayOptions#getCacheGraph} * @param cacheGraph Include a dashboard graph for caching metrics. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder cacheGraph(java.lang.Boolean cacheGraph) { this.cacheGraph = cacheGraph; return this; } /** * Sets the value of {@link WatchApiGatewayOptions#getServerErrorThreshold} * @param serverErrorThreshold Alarm when 5XX errors reach this threshold over 5 minutes. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder serverErrorThreshold(java.lang.Number serverErrorThreshold) { this.serverErrorThreshold = serverErrorThreshold; return this; } /** * Sets the value of {@link WatchApiGatewayOptions#getWatchedOperations} * @param watchedOperations A list of operations to monitor separately. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @SuppressWarnings("unchecked") public Builder watchedOperations(java.util.List watchedOperations) { this.watchedOperations = (java.util.List)watchedOperations; return this; } /** * Builds the configured instance. * @return a new instance of {@link WatchApiGatewayOptions} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public WatchApiGatewayOptions build() { return new Jsii$Proxy(cacheGraph, serverErrorThreshold, watchedOperations); } } /** * An implementation for {@link WatchApiGatewayOptions} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements WatchApiGatewayOptions { private final java.lang.Boolean cacheGraph; private final java.lang.Number serverErrorThreshold; private final java.util.List watchedOperations; /** * 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.cacheGraph = this.jsiiGet("cacheGraph", java.lang.Boolean.class); this.serverErrorThreshold = this.jsiiGet("serverErrorThreshold", java.lang.Number.class); this.watchedOperations = this.jsiiGet("watchedOperations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(com.github.eladb.watchful.WatchedOperation.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") private Jsii$Proxy(final java.lang.Boolean cacheGraph, final java.lang.Number serverErrorThreshold, final java.util.List watchedOperations) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.cacheGraph = cacheGraph; this.serverErrorThreshold = serverErrorThreshold; this.watchedOperations = (java.util.List)watchedOperations; } @Override public java.lang.Boolean getCacheGraph() { return this.cacheGraph; } @Override public java.lang.Number getServerErrorThreshold() { return this.serverErrorThreshold; } @Override public java.util.List getWatchedOperations() { return this.watchedOperations; } @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.getCacheGraph() != null) { data.set("cacheGraph", om.valueToTree(this.getCacheGraph())); } if (this.getServerErrorThreshold() != null) { data.set("serverErrorThreshold", om.valueToTree(this.getServerErrorThreshold())); } if (this.getWatchedOperations() != null) { data.set("watchedOperations", om.valueToTree(this.getWatchedOperations())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-watchful.WatchApiGatewayOptions")); 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; WatchApiGatewayOptions.Jsii$Proxy that = (WatchApiGatewayOptions.Jsii$Proxy) o; if (this.cacheGraph != null ? !this.cacheGraph.equals(that.cacheGraph) : that.cacheGraph != null) return false; if (this.serverErrorThreshold != null ? !this.serverErrorThreshold.equals(that.serverErrorThreshold) : that.serverErrorThreshold != null) return false; return this.watchedOperations != null ? this.watchedOperations.equals(that.watchedOperations) : that.watchedOperations == null; } @Override public int hashCode() { int result = this.cacheGraph != null ? this.cacheGraph.hashCode() : 0; result = 31 * result + (this.serverErrorThreshold != null ? this.serverErrorThreshold.hashCode() : 0); result = 31 * result + (this.watchedOperations != null ? this.watchedOperations.hashCode() : 0); return result; } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy