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

io.github.cdklabs.cdkmonitoringconstructs.UserProvidedNames 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.93.0 (build 1706ca5)", date = "2024-01-08T00:34:46.835Z")
@software.amazon.jsii.Jsii(module = io.github.cdklabs.cdkmonitoringconstructs.$Module.class, fqn = "cdk-monitoring-constructs.UserProvidedNames")
@software.amazon.jsii.Jsii.Proxy(UserProvidedNames.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental)
public interface UserProvidedNames extends software.amazon.jsii.JsiiSerializable {

    /**
     * (experimental) Plain name, used in naming alarms.
     * 

* This unique among other resources, and respect the AWS CDK restriction posed on alarm names. * The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. *

* Default: - derives name from the construct itself */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getAlarmFriendlyName() { return null; } /** * (experimental) Human-readable name is a freeform string, used as a caption or description. *

* There are no limitations on what it can be. *

* Default: - use alarmFriendlyName */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getHumanReadableName() { return null; } /** * (experimental) If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. *

* The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. *

* @see AlarmNamingStrategy for more details on alarm name prefixes */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) default @org.jetbrains.annotations.Nullable java.lang.String getLocalAlarmNamePrefixOverride() { return null; } /** * @return a {@link Builder} of {@link UserProvidedNames} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) static Builder builder() { return new Builder(); } /** * A builder for {@link UserProvidedNames} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public static final class Builder implements software.amazon.jsii.Builder { java.lang.String alarmFriendlyName; java.lang.String humanReadableName; java.lang.String localAlarmNamePrefixOverride; /** * Sets the value of {@link UserProvidedNames#getAlarmFriendlyName} * @param alarmFriendlyName Plain name, used in naming alarms. * This unique among other resources, and respect the AWS CDK restriction posed on alarm names. * The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder alarmFriendlyName(java.lang.String alarmFriendlyName) { this.alarmFriendlyName = alarmFriendlyName; return this; } /** * Sets the value of {@link UserProvidedNames#getHumanReadableName} * @param humanReadableName Human-readable name is a freeform string, used as a caption or description. * There are no limitations on what it can be. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder humanReadableName(java.lang.String humanReadableName) { this.humanReadableName = humanReadableName; return this; } /** * Sets the value of {@link UserProvidedNames#getLocalAlarmNamePrefixOverride} * @param localAlarmNamePrefixOverride If this is defined, the local alarm name prefix used in naming alarms for the construct will be set to this value. * The length must be 1 - 255 characters and although the validation rules are undocumented, we recommend using ASCII and hyphens. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) public Builder localAlarmNamePrefixOverride(java.lang.String localAlarmNamePrefixOverride) { this.localAlarmNamePrefixOverride = localAlarmNamePrefixOverride; return this; } /** * Builds the configured instance. * @return a new instance of {@link UserProvidedNames} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @Override public UserProvidedNames build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link UserProvidedNames} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Experimental) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements UserProvidedNames { private final java.lang.String alarmFriendlyName; private final java.lang.String humanReadableName; private final java.lang.String localAlarmNamePrefixOverride; /** * 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.alarmFriendlyName = software.amazon.jsii.Kernel.get(this, "alarmFriendlyName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.humanReadableName = software.amazon.jsii.Kernel.get(this, "humanReadableName", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.localAlarmNamePrefixOverride = software.amazon.jsii.Kernel.get(this, "localAlarmNamePrefixOverride", software.amazon.jsii.NativeType.forClass(java.lang.String.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.alarmFriendlyName = builder.alarmFriendlyName; this.humanReadableName = builder.humanReadableName; this.localAlarmNamePrefixOverride = builder.localAlarmNamePrefixOverride; } @Override public final java.lang.String getAlarmFriendlyName() { return this.alarmFriendlyName; } @Override public final java.lang.String getHumanReadableName() { return this.humanReadableName; } @Override public final java.lang.String getLocalAlarmNamePrefixOverride() { return this.localAlarmNamePrefixOverride; } @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(); if (this.getAlarmFriendlyName() != null) { data.set("alarmFriendlyName", om.valueToTree(this.getAlarmFriendlyName())); } if (this.getHumanReadableName() != null) { data.set("humanReadableName", om.valueToTree(this.getHumanReadableName())); } if (this.getLocalAlarmNamePrefixOverride() != null) { data.set("localAlarmNamePrefixOverride", om.valueToTree(this.getLocalAlarmNamePrefixOverride())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk-monitoring-constructs.UserProvidedNames")); 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; UserProvidedNames.Jsii$Proxy that = (UserProvidedNames.Jsii$Proxy) o; if (this.alarmFriendlyName != null ? !this.alarmFriendlyName.equals(that.alarmFriendlyName) : that.alarmFriendlyName != null) return false; if (this.humanReadableName != null ? !this.humanReadableName.equals(that.humanReadableName) : that.humanReadableName != null) return false; return this.localAlarmNamePrefixOverride != null ? this.localAlarmNamePrefixOverride.equals(that.localAlarmNamePrefixOverride) : that.localAlarmNamePrefixOverride == null; } @Override public final int hashCode() { int result = this.alarmFriendlyName != null ? this.alarmFriendlyName.hashCode() : 0; result = 31 * result + (this.humanReadableName != null ? this.humanReadableName.hashCode() : 0); result = 31 * result + (this.localAlarmNamePrefixOverride != null ? this.localAlarmNamePrefixOverride.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy