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

org.cdk8s.grafana.DataSourceProps Maven / Gradle / Ivy

package org.cdk8s.grafana;

/**
 */
@javax.annotation.Generated(value = "jsii-pacmak/1.103.1 (build bef2dea)", date = "2024-08-31T12:13:41.974Z")
@software.amazon.jsii.Jsii(module = org.cdk8s.grafana.$Module.class, fqn = "cdk8s-grafana.DataSourceProps")
@software.amazon.jsii.Jsii.Proxy(DataSourceProps.Jsii$Proxy.class)
@software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
public interface DataSourceProps extends software.amazon.jsii.JsiiSerializable {

    /**
     * Access type of the data source.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull org.cdk8s.grafana.AccessType getAccess();

    /**
     * Name of the data source.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getName();

    /**
     * Type of the data source.
     */
    @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable)
    @org.jetbrains.annotations.NotNull java.lang.String getType();

    /**
     * Description of the data source.
     * 

* Default: - no description */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getDescription() { return null; } /** * Labels to apply to the kubernetes resource. *

* When adding a data source to a Grafana instance using grafana.addDataSource, * labels provided to Grafana will be automatically applied. Otherwise, * labels must be added manually. *

* Default: - no labels */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.util.Map getLabels() { return null; } /** * Namespace to apply to the kubernetes resource. *

* When adding a data source to a Grafana instance using grafana.addDataSource, * the namespace will be automatically inherited. *

* Default: - undefined (will be assigned to the 'default' namespace) */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getNamespace() { return null; } /** * URL of the data source. *

* Most resources besides the 'testdata' data source * type require this field in order to retrieve data. *

* Default: - default url for data source type */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) default @org.jetbrains.annotations.Nullable java.lang.String getUrl() { return null; } /** * @return a {@link Builder} of {@link DataSourceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) static Builder builder() { return new Builder(); } /** * A builder for {@link DataSourceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public static final class Builder implements software.amazon.jsii.Builder { org.cdk8s.grafana.AccessType access; java.lang.String name; java.lang.String type; java.lang.String description; java.util.Map labels; java.lang.String namespace; java.lang.String url; /** * Sets the value of {@link DataSourceProps#getAccess} * @param access Access type of the data source. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder access(org.cdk8s.grafana.AccessType access) { this.access = access; return this; } /** * Sets the value of {@link DataSourceProps#getName} * @param name Name of the data source. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder name(java.lang.String name) { this.name = name; return this; } /** * Sets the value of {@link DataSourceProps#getType} * @param type Type of the data source. This parameter is required. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder type(java.lang.String type) { this.type = type; return this; } /** * Sets the value of {@link DataSourceProps#getDescription} * @param description Description of the data source. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder description(java.lang.String description) { this.description = description; return this; } /** * Sets the value of {@link DataSourceProps#getLabels} * @param labels Labels to apply to the kubernetes resource. * When adding a data source to a Grafana instance using grafana.addDataSource, * labels provided to Grafana will be automatically applied. Otherwise, * labels must be added manually. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder labels(java.util.Map labels) { this.labels = labels; return this; } /** * Sets the value of {@link DataSourceProps#getNamespace} * @param namespace Namespace to apply to the kubernetes resource. * When adding a data source to a Grafana instance using grafana.addDataSource, * the namespace will be automatically inherited. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder namespace(java.lang.String namespace) { this.namespace = namespace; return this; } /** * Sets the value of {@link DataSourceProps#getUrl} * @param url URL of the data source. * Most resources besides the 'testdata' data source * type require this field in order to retrieve data. * @return {@code this} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) public Builder url(java.lang.String url) { this.url = url; return this; } /** * Builds the configured instance. * @return a new instance of {@link DataSourceProps} * @throws NullPointerException if any required attribute was not provided */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @Override public DataSourceProps build() { return new Jsii$Proxy(this); } } /** * An implementation for {@link DataSourceProps} */ @software.amazon.jsii.Stability(software.amazon.jsii.Stability.Level.Stable) @software.amazon.jsii.Internal final class Jsii$Proxy extends software.amazon.jsii.JsiiObject implements DataSourceProps { private final org.cdk8s.grafana.AccessType access; private final java.lang.String name; private final java.lang.String type; private final java.lang.String description; private final java.util.Map labels; private final java.lang.String namespace; private final java.lang.String url; /** * 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.access = software.amazon.jsii.Kernel.get(this, "access", software.amazon.jsii.NativeType.forClass(org.cdk8s.grafana.AccessType.class)); this.name = software.amazon.jsii.Kernel.get(this, "name", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.type = software.amazon.jsii.Kernel.get(this, "type", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.description = software.amazon.jsii.Kernel.get(this, "description", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.labels = software.amazon.jsii.Kernel.get(this, "labels", software.amazon.jsii.NativeType.mapOf(software.amazon.jsii.NativeType.forClass(java.lang.String.class))); this.namespace = software.amazon.jsii.Kernel.get(this, "namespace", software.amazon.jsii.NativeType.forClass(java.lang.String.class)); this.url = software.amazon.jsii.Kernel.get(this, "url", 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.access = java.util.Objects.requireNonNull(builder.access, "access is required"); this.name = java.util.Objects.requireNonNull(builder.name, "name is required"); this.type = java.util.Objects.requireNonNull(builder.type, "type is required"); this.description = builder.description; this.labels = builder.labels; this.namespace = builder.namespace; this.url = builder.url; } @Override public final org.cdk8s.grafana.AccessType getAccess() { return this.access; } @Override public final java.lang.String getName() { return this.name; } @Override public final java.lang.String getType() { return this.type; } @Override public final java.lang.String getDescription() { return this.description; } @Override public final java.util.Map getLabels() { return this.labels; } @Override public final java.lang.String getNamespace() { return this.namespace; } @Override public final java.lang.String getUrl() { return this.url; } @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("access", om.valueToTree(this.getAccess())); data.set("name", om.valueToTree(this.getName())); data.set("type", om.valueToTree(this.getType())); if (this.getDescription() != null) { data.set("description", om.valueToTree(this.getDescription())); } if (this.getLabels() != null) { data.set("labels", om.valueToTree(this.getLabels())); } if (this.getNamespace() != null) { data.set("namespace", om.valueToTree(this.getNamespace())); } if (this.getUrl() != null) { data.set("url", om.valueToTree(this.getUrl())); } final com.fasterxml.jackson.databind.node.ObjectNode struct = com.fasterxml.jackson.databind.node.JsonNodeFactory.instance.objectNode(); struct.set("fqn", om.valueToTree("cdk8s-grafana.DataSourceProps")); 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; DataSourceProps.Jsii$Proxy that = (DataSourceProps.Jsii$Proxy) o; if (!access.equals(that.access)) return false; if (!name.equals(that.name)) return false; if (!type.equals(that.type)) return false; if (this.description != null ? !this.description.equals(that.description) : that.description != null) return false; if (this.labels != null ? !this.labels.equals(that.labels) : that.labels != null) return false; if (this.namespace != null ? !this.namespace.equals(that.namespace) : that.namespace != null) return false; return this.url != null ? this.url.equals(that.url) : that.url == null; } @Override public final int hashCode() { int result = this.access.hashCode(); result = 31 * result + (this.name.hashCode()); result = 31 * result + (this.type.hashCode()); result = 31 * result + (this.description != null ? this.description.hashCode() : 0); result = 31 * result + (this.labels != null ? this.labels.hashCode() : 0); result = 31 * result + (this.namespace != null ? this.namespace.hashCode() : 0); result = 31 * result + (this.url != null ? this.url.hashCode() : 0); return result; } } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy