All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.github.cdklabs.cdkmonitoringconstructs.SingleAxisGraphWidgetProps Maven / Gradle / Ivy
package io.github.cdklabs.cdkmonitoringconstructs;
/**
*/
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-09-24T17:32:52.139Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.SingleAxisGraphWidgetProps")
@software.amazon.jsii.Jsii.Proxy(SingleAxisGraphWidgetProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface SingleAxisGraphWidgetProps extends software.amazon.jsii.JsiiSerializable {
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.Number getHeight();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull software.amazon.awscdk.services.cloudwatch.YAxisProps getLeftAxis();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.util.List getLeftMetrics();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@org.jetbrains.annotations.NotNull java.lang.Number getWidth();
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.util.List getLeftAnnotations() {
return null;
}
/**
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
default @org.jetbrains.annotations.Nullable java.lang.String getTitle() {
return null;
}
/**
*/
@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 SingleAxisGraphWidgetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
static Builder builder() {
return new Builder();
}
/**
* A builder for {@link SingleAxisGraphWidgetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public static final class Builder implements software.amazon.jsii.Builder {
java.lang.Number height;
software.amazon.awscdk.services.cloudwatch.YAxisProps leftAxis;
java.util.List leftMetrics;
java.lang.Number width;
java.util.List leftAnnotations;
java.lang.String title;
java.util.List verticalAnnotations;
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getHeight}
* @param height the value to be set. This parameter is required.
* @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;
}
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getLeftAxis}
* @param leftAxis the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder leftAxis(software.amazon.awscdk.services.cloudwatch.YAxisProps leftAxis) {
this.leftAxis = leftAxis;
return this;
}
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getLeftMetrics}
* @param leftMetrics 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 leftMetrics(java.util.List extends software.amazon.awscdk.services.cloudwatch.IMetric> leftMetrics) {
this.leftMetrics = (java.util.List)leftMetrics;
return this;
}
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getWidth}
* @param width the value to be set. This parameter is required.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public Builder width(java.lang.Number width) {
this.width = width;
return this;
}
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getLeftAnnotations}
* @param leftAnnotations the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder leftAnnotations(java.util.List extends software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation> leftAnnotations) {
this.leftAnnotations = (java.util.List)leftAnnotations;
return this;
}
/**
* Sets the value of {@link SingleAxisGraphWidgetProps#getTitle}
* @param title the value to be set.
* @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 SingleAxisGraphWidgetProps#getVerticalAnnotations}
* @param verticalAnnotations the value to be set.
* @return {@code this}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@SuppressWarnings("unchecked")
public Builder verticalAnnotations(java.util.List extends software.amazon.awscdk.services.cloudwatch.VerticalAnnotation> verticalAnnotations) {
this.verticalAnnotations = (java.util.List)verticalAnnotations;
return this;
}
/**
* Builds the configured instance.
* @return a new instance of {@link SingleAxisGraphWidgetProps}
* @throws NullPointerException if any required attribute was not provided
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@Override
public SingleAxisGraphWidgetProps build() {
return new Jsii$Proxy(this);
}
}
/**
* An implementation for {@link SingleAxisGraphWidgetProps}
*/
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
@software.amazon.jsii.Internal
final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements SingleAxisGraphWidgetProps {
private final java.lang.Number height;
private final software.amazon.awscdk.services.cloudwatch.YAxisProps leftAxis;
private final java.util.List leftMetrics;
private final java.lang.Number width;
private final java.util.List leftAnnotations;
private final java.lang.String title;
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.height = software.amazon.jsii.Kernel.get(this, "height", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.leftAxis = software.amazon.jsii.Kernel.get(this, "leftAxis", software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.YAxisProps.class));
this.leftMetrics = software.amazon.jsii.Kernel.get(this, "leftMetrics", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.IMetric.class)));
this.width = software.amazon.jsii.Kernel.get(this, "width", software.amazon.jsii.NativeType.forClass(java.lang.Number.class));
this.leftAnnotations = software.amazon.jsii.Kernel.get(this, "leftAnnotations", software.amazon.jsii.NativeType.listOf(software.amazon.jsii.NativeType.forClass(software.amazon.awscdk.services.cloudwatch.HorizontalAnnotation.class)));
this.title = software.amazon.jsii.Kernel.get(this, "title", software.amazon.jsii.NativeType.forClass(java.lang.String.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.height = java.util.Objects.requireNonNull(builder.height, "height is required");
this.leftAxis = java.util.Objects.requireNonNull(builder.leftAxis, "leftAxis is required");
this.leftMetrics = (java.util.List)java.util.Objects.requireNonNull(builder.leftMetrics, "leftMetrics is required");
this.width = java.util.Objects.requireNonNull(builder.width, "width is required");
this.leftAnnotations = (java.util.List)builder.leftAnnotations;
this.title = builder.title;
this.verticalAnnotations = (java.util.List)builder.verticalAnnotations;
}
@Override
public final java.lang.Number getHeight() {
return this.height;
}
@Override
public final software.amazon.awscdk.services.cloudwatch.YAxisProps getLeftAxis() {
return this.leftAxis;
}
@Override
public final java.util.List getLeftMetrics() {
return this.leftMetrics;
}
@Override
public final java.lang.Number getWidth() {
return this.width;
}
@Override
public final java.util.List getLeftAnnotations() {
return this.leftAnnotations;
}
@Override
public final java.lang.String getTitle() {
return this.title;
}
@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("height", om.valueToTree(this.getHeight()));
data.set("leftAxis", om.valueToTree(this.getLeftAxis()));
data.set("leftMetrics", om.valueToTree(this.getLeftMetrics()));
data.set("width", om.valueToTree(this.getWidth()));
if (this.getLeftAnnotations() != null) {
data.set("leftAnnotations", om.valueToTree(this.getLeftAnnotations()));
}
if (this.getTitle() != null) {
data.set("title", om.valueToTree(this.getTitle()));
}
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.SingleAxisGraphWidgetProps"));
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;
SingleAxisGraphWidgetProps.Jsii$Proxy that = (SingleAxisGraphWidgetProps.Jsii$Proxy) o;
if (!height.equals(that.height)) return false;
if (!leftAxis.equals(that.leftAxis)) return false;
if (!leftMetrics.equals(that.leftMetrics)) return false;
if (!width.equals(that.width)) return false;
if (this.leftAnnotations != null ? !this.leftAnnotations.equals(that.leftAnnotations) : that.leftAnnotations != null) return false;
if (this.title != null ? !this.title.equals(that.title) : that.title != null) return false;
return this.verticalAnnotations != null ? this.verticalAnnotations.equals(that.verticalAnnotations) : that.verticalAnnotations == null;
}
@Override
public final int hashCode() {
int result = this.height.hashCode();
result = 31 * result + (this.leftAxis.hashCode());
result = 31 * result + (this.leftMetrics.hashCode());
result = 31 * result + (this.width.hashCode());
result = 31 * result + (this.leftAnnotations != null ? this.leftAnnotations.hashCode() : 0);
result = 31 * result + (this.title != null ? this.title.hashCode() : 0);
result = 31 * result + (this.verticalAnnotations != null ? this.verticalAnnotations.hashCode() : 0);
return result;
}
}
}