![JAR search and dependency download from the Maven repository](/logo.png)
io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroupWithAnnotations Maven / Gradle / Ivy
package io.github.cdklabs.cdkmonitoringconstructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.93.0 (build 1706ca5)", date = "2024-01-08T00:34:46.571Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.CustomMetricGroupWithAnnotations")
@software.amazon.jsii.Jsii.Proxy(CustomMetricGroupWithAnnotations.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface CustomMetricGroupWithAnnotations extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getAnnotations();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup getMetricGroup();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getRightAnnotations();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getTitleAddons();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.Number getHeight() {
return null;
}
/**
* @return a {@link Builder} of {@link CustomMetricGroupWithAnnotations}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link CustomMetricGroupWithAnnotations}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.util.List annotations;
io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup metricGroup;
java.util.List rightAnnotations;
java.util.List titleAddons;
java.lang.Number height;
/**
* Sets the value of {@link CustomMetricGroupWithAnnotations#getAnnotations}
* @param annotations the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder annotations(java.util.List extends software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation> annotations) {
this.annotations = (java.util.List)annotations;
return this;
}
/**
* Sets the value of {@link CustomMetricGroupWithAnnotations#getMetricGroup}
* @param metricGroup the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder metricGroup(io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup metricGroup) {
this.metricGroup = metricGroup;
return this;
}
/**
* Sets the value of {@link CustomMetricGroupWithAnnotations#getRightAnnotations}
* @param rightAnnotations the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder rightAnnotations(java.util.List extends software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation> rightAnnotations) {
this.rightAnnotations = (java.util.List)rightAnnotations;
return this;
}
/**
* Sets the value of {@link CustomMetricGroupWithAnnotations#getTitleAddons}
* @param titleAddons the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder titleAddons(java.util.List titleAddons) {
this.titleAddons = titleAddons;
return this;
}
/**
* Sets the value of {@link CustomMetricGroupWithAnnotations#getHeight}
* @param height the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder height(java.lang.Number height) {
this.height = height;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link CustomMetricGroupWithAnnotations}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public CustomMetricGroupWithAnnotations build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link CustomMetricGroupWithAnnotations}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements CustomMetricGroupWithAnnotations {
private final java.util.List annotations;
private final io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup metricGroup;
private final java.util.List rightAnnotations;
private final java.util.List titleAddons;
private final java.lang.Number height;
/**
* 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.annotations = software.amazon.jsii.Kernel.get(this, "annotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class)));
this.metricGroup = software.amazon.jsii.Kernel.get(this, "metricGroup", software.amazon.jsii.NativeType.forClass(io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup.class));
this.rightAnnotations = software.amazon.jsii.Kernel.get(this, "rightAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class)));
this.titleAddons = software.amazon.jsii.Kernel.get(this, "titleAddons", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class)));
this.height = software.amazon.jsii.Kernel.get(this, "height", software.amazon.jsii.NativeType.forClass(java.lang.Number.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.annotations = (java.util.List)java.util.Objects.requireNonNull(builder.annotations, "annotations is required");
this.metricGroup = java.util.Objects.requireNonNull(builder.metricGroup, "metricGroup is required");
this.rightAnnotations = (java.util.List)java.util.Objects.requireNonNull(builder.rightAnnotations, "rightAnnotations is required");
this.titleAddons = java.util.Objects.requireNonNull(builder.titleAddons, "titleAddons is required");
this.height = builder.height;
}
@Override
public final java.util.List getAnnotations() {
return this.annotations;
}
@Override
public final io.github.cdklabs.cdkmonitoringconstructs.CustomMetricGroup getMetricGroup() {
return this.metricGroup;
}
@Override
public final java.util.List getRightAnnotations() {
return this.rightAnnotations;
}
@Override
public final java.util.List getTitleAddons() {
return this.titleAddons;
}
@Override
public final java.lang.Number getHeight() {
return this.height;
}
@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("annotations", om.valueToTree(this.getAnnotations()));
data.set("metricGroup", om.valueToTree(this.getMetricGroup()));
data.set("rightAnnotations", om.valueToTree(this.getRightAnnotations()));
data.set("titleAddons", om.valueToTree(this.getTitleAddons()));
if (this.getHeight() != null) {
data.set("height", om.valueToTree(this.getHeight()));
}
final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode();
struct.set("fqn", om.valueToTree("cdk-monitoring-constructs.CustomMetricGroupWithAnnotations"));
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;
CustomMetricGroupWithAnnotations.Jsii$Proxy that = (CustomMetricGroupWithAnnotations.Jsii$Proxy) o;
if (!annotations.equals(that.annotations)) return false;
if (!metricGroup.equals(that.metricGroup)) return false;
if (!rightAnnotations.equals(that.rightAnnotations)) return false;
if (!titleAddons.equals(that.titleAddons)) return false;
return this.height != null ? this.height.equals(that.height) : that.height == null;
}
@Override
public final int hashCode() {
int result = this.annotations.hashCode();
result = 31 * result + (this.metricGroup.hashCode());
result = 31 * result + (this.rightAnnotations.hashCode());
result = 31 * result + (this.titleAddons.hashCode());
result = 31 * result + (this.height != null ? this.height.hashCode() : 0);
return result;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy