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

com.pulumi.azurenative.insights.outputs.MetricCriteriaResponse Maven / Gradle / Ivy

There is a newer version: 2.82.0
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azurenative.insights.outputs;

import com.pulumi.azurenative.insights.outputs.MetricDimensionResponse;
import com.pulumi.core.annotations.CustomType;
import com.pulumi.exceptions.MissingRequiredPropertyException;
import java.lang.Boolean;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class MetricCriteriaResponse {
    /**
     * @return Specifies the type of threshold criteria
     * Expected value is 'StaticThresholdCriterion'.
     * 
     */
    private String criterionType;
    /**
     * @return List of dimension conditions.
     * 
     */
    private @Nullable List dimensions;
    /**
     * @return Name of the metric.
     * 
     */
    private String metricName;
    /**
     * @return Namespace of the metric.
     * 
     */
    private @Nullable String metricNamespace;
    /**
     * @return Name of the criteria.
     * 
     */
    private String name;
    /**
     * @return the criteria operator.
     * 
     */
    private String operator;
    /**
     * @return Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
     * 
     */
    private @Nullable Boolean skipMetricValidation;
    /**
     * @return the criteria threshold value that activates the alert.
     * 
     */
    private Double threshold;
    /**
     * @return the criteria time aggregation types.
     * 
     */
    private String timeAggregation;

    private MetricCriteriaResponse() {}
    /**
     * @return Specifies the type of threshold criteria
     * Expected value is 'StaticThresholdCriterion'.
     * 
     */
    public String criterionType() {
        return this.criterionType;
    }
    /**
     * @return List of dimension conditions.
     * 
     */
    public List dimensions() {
        return this.dimensions == null ? List.of() : this.dimensions;
    }
    /**
     * @return Name of the metric.
     * 
     */
    public String metricName() {
        return this.metricName;
    }
    /**
     * @return Namespace of the metric.
     * 
     */
    public Optional metricNamespace() {
        return Optional.ofNullable(this.metricNamespace);
    }
    /**
     * @return Name of the criteria.
     * 
     */
    public String name() {
        return this.name;
    }
    /**
     * @return the criteria operator.
     * 
     */
    public String operator() {
        return this.operator;
    }
    /**
     * @return Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped.
     * 
     */
    public Optional skipMetricValidation() {
        return Optional.ofNullable(this.skipMetricValidation);
    }
    /**
     * @return the criteria threshold value that activates the alert.
     * 
     */
    public Double threshold() {
        return this.threshold;
    }
    /**
     * @return the criteria time aggregation types.
     * 
     */
    public String timeAggregation() {
        return this.timeAggregation;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static Builder builder(MetricCriteriaResponse defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private String criterionType;
        private @Nullable List dimensions;
        private String metricName;
        private @Nullable String metricNamespace;
        private String name;
        private String operator;
        private @Nullable Boolean skipMetricValidation;
        private Double threshold;
        private String timeAggregation;
        public Builder() {}
        public Builder(MetricCriteriaResponse defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.criterionType = defaults.criterionType;
    	      this.dimensions = defaults.dimensions;
    	      this.metricName = defaults.metricName;
    	      this.metricNamespace = defaults.metricNamespace;
    	      this.name = defaults.name;
    	      this.operator = defaults.operator;
    	      this.skipMetricValidation = defaults.skipMetricValidation;
    	      this.threshold = defaults.threshold;
    	      this.timeAggregation = defaults.timeAggregation;
        }

        @CustomType.Setter
        public Builder criterionType(String criterionType) {
            if (criterionType == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "criterionType");
            }
            this.criterionType = criterionType;
            return this;
        }
        @CustomType.Setter
        public Builder dimensions(@Nullable List dimensions) {

            this.dimensions = dimensions;
            return this;
        }
        public Builder dimensions(MetricDimensionResponse... dimensions) {
            return dimensions(List.of(dimensions));
        }
        @CustomType.Setter
        public Builder metricName(String metricName) {
            if (metricName == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "metricName");
            }
            this.metricName = metricName;
            return this;
        }
        @CustomType.Setter
        public Builder metricNamespace(@Nullable String metricNamespace) {

            this.metricNamespace = metricNamespace;
            return this;
        }
        @CustomType.Setter
        public Builder name(String name) {
            if (name == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "name");
            }
            this.name = name;
            return this;
        }
        @CustomType.Setter
        public Builder operator(String operator) {
            if (operator == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "operator");
            }
            this.operator = operator;
            return this;
        }
        @CustomType.Setter
        public Builder skipMetricValidation(@Nullable Boolean skipMetricValidation) {

            this.skipMetricValidation = skipMetricValidation;
            return this;
        }
        @CustomType.Setter
        public Builder threshold(Double threshold) {
            if (threshold == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "threshold");
            }
            this.threshold = threshold;
            return this;
        }
        @CustomType.Setter
        public Builder timeAggregation(String timeAggregation) {
            if (timeAggregation == null) {
              throw new MissingRequiredPropertyException("MetricCriteriaResponse", "timeAggregation");
            }
            this.timeAggregation = timeAggregation;
            return this;
        }
        public MetricCriteriaResponse build() {
            final var _resultValue = new MetricCriteriaResponse();
            _resultValue.criterionType = criterionType;
            _resultValue.dimensions = dimensions;
            _resultValue.metricName = metricName;
            _resultValue.metricNamespace = metricNamespace;
            _resultValue.name = name;
            _resultValue.operator = operator;
            _resultValue.skipMetricValidation = skipMetricValidation;
            _resultValue.threshold = threshold;
            _resultValue.timeAggregation = timeAggregation;
            return _resultValue;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy