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

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

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

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

    /**
     * (experimental) list of metrics in the group (can be defined in different ways, see the type documentation).
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.util.List getMetrics();

    /**
     * (experimental) title of the whole group.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
    @org.jetbrains.annotations.NotNull java.lang.String getTitle();

    /**
     * (experimental) Flag indicating this metric group should be included in the summary as well.
     * 

* Default: - addToSummaryDashboard from CustomMonitoringProps, defaulting to false */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getAddToSummaryDashboard() { return null; } /** * (experimental) optional axis. *

* Default: undefined */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.YAxisProps getGraphWidgetAxis() { return null; } /** * (experimental) graph widget legend. *

* Default: BOTTOM */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.LegendPosition getGraphWidgetLegend() { return null; } /** * (experimental) optional right axis. *

* Default: undefined */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable software.amazon.awscdk.services.cloudwatch.YAxisProps getGraphWidgetRightAxis() { return null; } /** * @see {GraphWidgetProps.setPeriodToTimeRange} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Boolean getGraphWidgetSetPeriodToTimeRange() { return null; } /** * (experimental) type of the widget. *

* Default: line */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType getGraphWidgetType() { return null; } /** * (experimental) Width of graph widget. *

* Note that widgets will overflow into new rows if the summed width * exceeds 24. *

* Default: - Automatically calculcated width, generally as wide as possible considering all metrics' widgets. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.Number getGraphWidgetWidth() { return null; } /** * (experimental) Optional custom horizontal annotations which will be displayed over the metrics on the left axis (if there are any alarms, any existing annotations will be merged together). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getHorizontalAnnotations() { return null; } /** * (experimental) Optional custom horizontal annotations which will be displayed over the metrics on the right axis (if there are any alarms, any existing annotations will be merged together). */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getHorizontalRightAnnotations() { return null; } /** * @see addToSummaryDashboard * @deprecated use addToSummaryDashboard. addToSummaryDashboard will take precedence over important. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated default @org.jetbrains.annotations.Nullable java.lang.Boolean getImportant() { return null; } /** * (experimental) Optional custom vertical annotations which will be displayed over the metrics. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.util.List getVerticalAnnotations() { return null; } /** * @return a {@link Builder} of {@link CustomMetricGroup} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link CustomMetricGroup} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.util.List metrics; java.lang.String title; java.lang.Boolean addToSummaryDashboard; software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetAxis; software.amazon.awscdk.services.cloudwatch.LegendPosition graphWidgetLegend; software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetRightAxis; java.lang.Boolean graphWidgetSetPeriodToTimeRange; io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType graphWidgetType; java.lang.Number graphWidgetWidth; java.util.List horizontalAnnotations; java.util.List horizontalRightAnnotations; java.lang.Boolean important; java.util.List verticalAnnotations; /** * Sets the value of {@link CustomMetricGroup#getMetrics} * @param metrics list of metrics in the group (can be defined in different ways, see the type documentation). This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder metrics(java.util.List metrics) { this.metrics = (java.util.List)metrics; return this; } /** * Sets the value of {@link CustomMetricGroup#getTitle} * @param title title of the whole group. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder title(java.lang.String title) { this.title = title; return this; } /** * Sets the value of {@link CustomMetricGroup#getAddToSummaryDashboard} * @param addToSummaryDashboard Flag indicating this metric group should be included in the summary as well. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder addToSummaryDashboard(java.lang.Boolean addToSummaryDashboard) { this.addToSummaryDashboard = addToSummaryDashboard; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetAxis} * @param graphWidgetAxis optional axis. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetAxis(software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetAxis) { this.graphWidgetAxis = graphWidgetAxis; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetLegend} * @param graphWidgetLegend graph widget legend. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetLegend(software.amazon.awscdk.services.cloudwatch.LegendPosition graphWidgetLegend) { this.graphWidgetLegend = graphWidgetLegend; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetRightAxis} * @param graphWidgetRightAxis optional right axis. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetRightAxis(software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetRightAxis) { this.graphWidgetRightAxis = graphWidgetRightAxis; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetSetPeriodToTimeRange} * @param graphWidgetSetPeriodToTimeRange the value to be set. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetSetPeriodToTimeRange(java.lang.Boolean graphWidgetSetPeriodToTimeRange) { this.graphWidgetSetPeriodToTimeRange = graphWidgetSetPeriodToTimeRange; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetType} * @param graphWidgetType type of the widget. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetType(io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType graphWidgetType) { this.graphWidgetType = graphWidgetType; return this; } /** * Sets the value of {@link CustomMetricGroup#getGraphWidgetWidth} * @param graphWidgetWidth Width of graph widget. * Note that widgets will overflow into new rows if the summed width * exceeds 24. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder graphWidgetWidth(java.lang.Number graphWidgetWidth) { this.graphWidgetWidth = graphWidgetWidth; return this; } /** * Sets the value of {@link CustomMetricGroup#getHorizontalAnnotations} * @param horizontalAnnotations Optional custom horizontal annotations which will be displayed over the metrics on the left axis (if there are any alarms, any existing annotations will be merged together). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder horizontalAnnotations(java.util.List horizontalAnnotations) { this.horizontalAnnotations = (java.util.List)horizontalAnnotations; return this; } /** * Sets the value of {@link CustomMetricGroup#getHorizontalRightAnnotations} * @param horizontalRightAnnotations Optional custom horizontal annotations which will be displayed over the metrics on the right axis (if there are any alarms, any existing annotations will be merged together). * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder horizontalRightAnnotations(java.util.List horizontalRightAnnotations) { this.horizontalRightAnnotations = (java.util.List)horizontalRightAnnotations; return this; } /** * Sets the value of {@link CustomMetricGroup#getImportant} * @param important the value to be set. * @return {@code this} * @deprecated use addToSummaryDashboard. addToSummaryDashboard will take precedence over important. */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Deprecated) @Deprecated public Builder important(java.lang.Boolean important) { this.important = important; return this; } /** * Sets the value of {@link CustomMetricGroup#getVerticalAnnotations} * @param verticalAnnotations Optional custom vertical annotations which will be displayed over the metrics. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @SuppressWarnings("unchecked") public Builder verticalAnnotations(java.util.List verticalAnnotations) { this.verticalAnnotations = (java.util.List)verticalAnnotations; return this; } /** * Builds the configured instance. * @return a new instance of {@link CustomMetricGroup} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public CustomMetricGroup build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link CustomMetricGroup} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CustomMetricGroup { private final java.util.List metrics; private final java.lang.String title; private final java.lang.Boolean addToSummaryDashboard; private final software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetAxis; private final software.amazon.awscdk.services.cloudwatch.LegendPosition graphWidgetLegend; private final software.amazon.awscdk.services.cloudwatch.YAxisProps graphWidgetRightAxis; private final java.lang.Boolean graphWidgetSetPeriodToTimeRange; private final io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType graphWidgetType; private final java.lang.Number graphWidgetWidth; private final java.util.List horizontalAnnotations; private final java.util.List horizontalRightAnnotations; private final java.lang.Boolean important; private final java.util.List verticalAnnotations; /** * 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.metrics = software.amazon.jsii.Kernel.get(this, "metrics", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.Object.class))); this.title = software.amazon.jsii.Kernel.get(this, "title", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.addToSummaryDashboard = software.amazon.jsii.Kernel.get(this, "addToSummaryDashboard", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.graphWidgetAxis = software.amazon.jsii.Kernel.get(this, "graphWidgetAxis", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.YAxisProps.class)); this.graphWidgetLegend = software.amazon.jsii.Kernel.get(this, "graphWidgetLegend", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.LegendPosition.class)); this.graphWidgetRightAxis = software.amazon.jsii.Kernel.get(this, "graphWidgetRightAxis", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.YAxisProps.class)); this.graphWidgetSetPeriodToTimeRange = software.amazon.jsii.Kernel.get(this, "graphWidgetSetPeriodToTimeRange", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.graphWidgetType = software.amazon.jsii.Kernel.get(this, "graphWidgetType", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType.class)); this.graphWidgetWidth = software.amazon.jsii.Kernel.get(this, "graphWidgetWidth", software.amazon.jsii.NativeType.forClass(java.lang.Number.class)); this.horizontalAnnotations = software.amazon.jsii.Kernel.get(this, "horizontalAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class))); this.horizontalRightAnnotations = software.amazon.jsii.Kernel.get(this, "horizontalRightAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class))); this.important = software.amazon.jsii.Kernel.get(this, "important", software.amazon.jsii.NativeType.forClass(java.lang.Boolean.class)); this.verticalAnnotations = software.amazon.jsii.Kernel.get(this, "verticalAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.VerticalAnnotation.class))); } /** * Constructor that initializes the object based on literal property values passed by the {@link Builder}. */ @SuppressWarnings("unchecked") protected Jsii$Proxy(final Builder builder) { super(software.amazon.jsii.JsiiObject.InitializationMode.JSII); this.metrics = (java.util.List)java.util.Objects.requireNonNull(builder.metrics, "metrics is required"); this.title = java.util.Objects.requireNonNull(builder.title, "title is required"); this.addToSummaryDashboard = builder.addToSummaryDashboard; this.graphWidgetAxis = builder.graphWidgetAxis; this.graphWidgetLegend = builder.graphWidgetLegend; this.graphWidgetRightAxis = builder.graphWidgetRightAxis; this.graphWidgetSetPeriodToTimeRange = builder.graphWidgetSetPeriodToTimeRange; this.graphWidgetType = builder.graphWidgetType; this.graphWidgetWidth = builder.graphWidgetWidth; this.horizontalAnnotations = (java.util.List)builder.horizontalAnnotations; this.horizontalRightAnnotations = (java.util.List)builder.horizontalRightAnnotations; this.important = builder.important; this.verticalAnnotations = (java.util.List)builder.verticalAnnotations; } @Override public final java.util.List getMetrics() { return this.metrics; } @Override public final java.lang.String getTitle() { return this.title; } @Override public final java.lang.Boolean getAddToSummaryDashboard() { return this.addToSummaryDashboard; } @Override public final software.amazon.awscdk.services.cloudwatch.YAxisProps getGraphWidgetAxis() { return this.graphWidgetAxis; } @Override public final software.amazon.awscdk.services.cloudwatch.LegendPosition getGraphWidgetLegend() { return this.graphWidgetLegend; } @Override public final software.amazon.awscdk.services.cloudwatch.YAxisProps getGraphWidgetRightAxis() { return this.graphWidgetRightAxis; } @Override public final java.lang.Boolean getGraphWidgetSetPeriodToTimeRange() { return this.graphWidgetSetPeriodToTimeRange; } @Override public final io.github.cdklabs.cdkmonitoringconstructs.GraphWidgetType getGraphWidgetType() { return this.graphWidgetType; } @Override public final java.lang.Number getGraphWidgetWidth() { return this.graphWidgetWidth; } @Override public final java.util.List getHorizontalAnnotations() { return this.horizontalAnnotations; } @Override public final java.util.List getHorizontalRightAnnotations() { return this.horizontalRightAnnotations; } @Override public final java.lang.Boolean getImportant() { return this.important; } @Override public final java.util.List getVerticalAnnotations() { return this.verticalAnnotations; } @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("metrics", om.valueToTree(this.getMetrics())); data.set("title", om.valueToTree(this.getTitle())); if (this.getAddToSummaryDashboard() != null) { data.set("addToSummaryDashboard", om.valueToTree(this.getAddToSummaryDashboard())); } if (this.getGraphWidgetAxis() != null) { data.set("graphWidgetAxis", om.valueToTree(this.getGraphWidgetAxis())); } if (this.getGraphWidgetLegend() != null) { data.set("graphWidgetLegend", om.valueToTree(this.getGraphWidgetLegend())); } if (this.getGraphWidgetRightAxis() != null) { data.set("graphWidgetRightAxis", om.valueToTree(this.getGraphWidgetRightAxis())); } if (this.getGraphWidgetSetPeriodToTimeRange() != null) { data.set("graphWidgetSetPeriodToTimeRange", om.valueToTree(this.getGraphWidgetSetPeriodToTimeRange())); } if (this.getGraphWidgetType() != null) { data.set("graphWidgetType", om.valueToTree(this.getGraphWidgetType())); } if (this.getGraphWidgetWidth() != null) { data.set("graphWidgetWidth", om.valueToTree(this.getGraphWidgetWidth())); } if (this.getHorizontalAnnotations() != null) { data.set("horizontalAnnotations", om.valueToTree(this.getHorizontalAnnotations())); } if (this.getHorizontalRightAnnotations() != null) { data.set("horizontalRightAnnotations", om.valueToTree(this.getHorizontalRightAnnotations())); } if (this.getImportant() != null) { data.set("important", om.valueToTree(this.getImportant())); } if (this.getVerticalAnnotations() != null) { data.set("verticalAnnotations", om.valueToTree(this.getVerticalAnnotations())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-monitoring-constructs.CustomMetricGroup")); 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; CustomMetricGroup.Jsii$Proxy that = (CustomMetricGroup.Jsii$Proxy) o; if (!metrics.equals(that.metrics)) return false; if (!title.equals(that.title)) return false; if (this.addToSummaryDashboard != null ? !this.addToSummaryDashboard.equals(that.addToSummaryDashboard) : that.addToSummaryDashboard != null) return false; if (this.graphWidgetAxis != null ? !this.graphWidgetAxis.equals(that.graphWidgetAxis) : that.graphWidgetAxis != null) return false; if (this.graphWidgetLegend != null ? !this.graphWidgetLegend.equals(that.graphWidgetLegend) : that.graphWidgetLegend != null) return false; if (this.graphWidgetRightAxis != null ? !this.graphWidgetRightAxis.equals(that.graphWidgetRightAxis) : that.graphWidgetRightAxis != null) return false; if (this.graphWidgetSetPeriodToTimeRange != null ? !this.graphWidgetSetPeriodToTimeRange.equals(that.graphWidgetSetPeriodToTimeRange) : that.graphWidgetSetPeriodToTimeRange != null) return false; if (this.graphWidgetType != null ? !this.graphWidgetType.equals(that.graphWidgetType) : that.graphWidgetType != null) return false; if (this.graphWidgetWidth != null ? !this.graphWidgetWidth.equals(that.graphWidgetWidth) : that.graphWidgetWidth != null) return false; if (this.horizontalAnnotations != null ? !this.horizontalAnnotations.equals(that.horizontalAnnotations) : that.horizontalAnnotations != null) return false; if (this.horizontalRightAnnotations != null ? !this.horizontalRightAnnotations.equals(that.horizontalRightAnnotations) : that.horizontalRightAnnotations != null) return false; if (this.important != null ? !this.important.equals(that.important) : that.important != null) return false; return this.verticalAnnotations != null ? this.verticalAnnotations.equals(that.verticalAnnotations) : that.verticalAnnotations == null; } @Override public final int hashCode() { int result = this.metrics.hashCode(); result = 31 * result + (this.title.hashCode()); result = 31 * result + (this.addToSummaryDashboard != null ? this.addToSummaryDashboard.hashCode() : 0); result = 31 * result + (this.graphWidgetAxis != null ? this.graphWidgetAxis.hashCode() : 0); result = 31 * result + (this.graphWidgetLegend != null ? this.graphWidgetLegend.hashCode() : 0); result = 31 * result + (this.graphWidgetRightAxis != null ? this.graphWidgetRightAxis.hashCode() : 0); result = 31 * result + (this.graphWidgetSetPeriodToTimeRange != null ? this.graphWidgetSetPeriodToTimeRange.hashCode() : 0); result = 31 * result + (this.graphWidgetType != null ? this.graphWidgetType.hashCode() : 0); result = 31 * result + (this.graphWidgetWidth != null ? this.graphWidgetWidth.hashCode() : 0); result = 31 * result + (this.horizontalAnnotations != null ? this.horizontalAnnotations.hashCode() : 0); result = 31 * result + (this.horizontalRightAnnotations != null ? this.horizontalRightAnnotations.hashCode() : 0); result = 31 * result + (this.important != null ? this.important.hashCode() : 0); result = 31 * result + (this.verticalAnnotations != null ? this.verticalAnnotations.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy