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

com.pulumi.azurenative.insights.inputs.ConditionArgs Maven / Gradle / Ivy

There is a newer version: 2.78.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.inputs;

import com.pulumi.azurenative.insights.enums.ConditionOperator;
import com.pulumi.azurenative.insights.enums.TimeAggregation;
import com.pulumi.azurenative.insights.inputs.ConditionFailingPeriodsArgs;
import com.pulumi.azurenative.insights.inputs.DimensionArgs;
import com.pulumi.core.Either;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Double;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


/**
 * A condition of the scheduled query rule.
 * 
 */
public final class ConditionArgs extends com.pulumi.resources.ResourceArgs {

    public static final ConditionArgs Empty = new ConditionArgs();

    /**
     * List of Dimensions conditions
     * 
     */
    @Import(name="dimensions")
    private @Nullable Output> dimensions;

    /**
     * @return List of Dimensions conditions
     * 
     */
    public Optional>> dimensions() {
        return Optional.ofNullable(this.dimensions);
    }

    /**
     * The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
     * 
     */
    @Import(name="failingPeriods")
    private @Nullable Output failingPeriods;

    /**
     * @return The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
     * 
     */
    public Optional> failingPeriods() {
        return Optional.ofNullable(this.failingPeriods);
    }

    /**
     * The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
     * 
     */
    @Import(name="metricMeasureColumn")
    private @Nullable Output metricMeasureColumn;

    /**
     * @return The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
     * 
     */
    public Optional> metricMeasureColumn() {
        return Optional.ofNullable(this.metricMeasureColumn);
    }

    /**
     * The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
     * 
     */
    @Import(name="metricName")
    private @Nullable Output metricName;

    /**
     * @return The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
     * 
     */
    public Optional> metricName() {
        return Optional.ofNullable(this.metricName);
    }

    /**
     * The criteria operator. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    @Import(name="operator")
    private @Nullable Output> operator;

    /**
     * @return The criteria operator. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    public Optional>> operator() {
        return Optional.ofNullable(this.operator);
    }

    /**
     * Log query alert
     * 
     */
    @Import(name="query")
    private @Nullable Output query;

    /**
     * @return Log query alert
     * 
     */
    public Optional> query() {
        return Optional.ofNullable(this.query);
    }

    /**
     * The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
     * 
     */
    @Import(name="resourceIdColumn")
    private @Nullable Output resourceIdColumn;

    /**
     * @return The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
     * 
     */
    public Optional> resourceIdColumn() {
        return Optional.ofNullable(this.resourceIdColumn);
    }

    /**
     * the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    @Import(name="threshold")
    private @Nullable Output threshold;

    /**
     * @return the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    public Optional> threshold() {
        return Optional.ofNullable(this.threshold);
    }

    /**
     * Aggregation type. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    @Import(name="timeAggregation")
    private @Nullable Output> timeAggregation;

    /**
     * @return Aggregation type. Relevant and required only for rules of the kind LogAlert.
     * 
     */
    public Optional>> timeAggregation() {
        return Optional.ofNullable(this.timeAggregation);
    }

    private ConditionArgs() {}

    private ConditionArgs(ConditionArgs $) {
        this.dimensions = $.dimensions;
        this.failingPeriods = $.failingPeriods;
        this.metricMeasureColumn = $.metricMeasureColumn;
        this.metricName = $.metricName;
        this.operator = $.operator;
        this.query = $.query;
        this.resourceIdColumn = $.resourceIdColumn;
        this.threshold = $.threshold;
        this.timeAggregation = $.timeAggregation;
    }

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

    public static final class Builder {
        private ConditionArgs $;

        public Builder() {
            $ = new ConditionArgs();
        }

        public Builder(ConditionArgs defaults) {
            $ = new ConditionArgs(Objects.requireNonNull(defaults));
        }

        /**
         * @param dimensions List of Dimensions conditions
         * 
         * @return builder
         * 
         */
        public Builder dimensions(@Nullable Output> dimensions) {
            $.dimensions = dimensions;
            return this;
        }

        /**
         * @param dimensions List of Dimensions conditions
         * 
         * @return builder
         * 
         */
        public Builder dimensions(List dimensions) {
            return dimensions(Output.of(dimensions));
        }

        /**
         * @param dimensions List of Dimensions conditions
         * 
         * @return builder
         * 
         */
        public Builder dimensions(DimensionArgs... dimensions) {
            return dimensions(List.of(dimensions));
        }

        /**
         * @param failingPeriods The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder failingPeriods(@Nullable Output failingPeriods) {
            $.failingPeriods = failingPeriods;
            return this;
        }

        /**
         * @param failingPeriods The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder failingPeriods(ConditionFailingPeriodsArgs failingPeriods) {
            return failingPeriods(Output.of(failingPeriods));
        }

        /**
         * @param metricMeasureColumn The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder metricMeasureColumn(@Nullable Output metricMeasureColumn) {
            $.metricMeasureColumn = metricMeasureColumn;
            return this;
        }

        /**
         * @param metricMeasureColumn The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder metricMeasureColumn(String metricMeasureColumn) {
            return metricMeasureColumn(Output.of(metricMeasureColumn));
        }

        /**
         * @param metricName The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
         * 
         * @return builder
         * 
         */
        public Builder metricName(@Nullable Output metricName) {
            $.metricName = metricName;
            return this;
        }

        /**
         * @param metricName The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
         * 
         * @return builder
         * 
         */
        public Builder metricName(String metricName) {
            return metricName(Output.of(metricName));
        }

        /**
         * @param operator The criteria operator. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder operator(@Nullable Output> operator) {
            $.operator = operator;
            return this;
        }

        /**
         * @param operator The criteria operator. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder operator(Either operator) {
            return operator(Output.of(operator));
        }

        /**
         * @param operator The criteria operator. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder operator(String operator) {
            return operator(Either.ofLeft(operator));
        }

        /**
         * @param operator The criteria operator. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder operator(ConditionOperator operator) {
            return operator(Either.ofRight(operator));
        }

        /**
         * @param query Log query alert
         * 
         * @return builder
         * 
         */
        public Builder query(@Nullable Output query) {
            $.query = query;
            return this;
        }

        /**
         * @param query Log query alert
         * 
         * @return builder
         * 
         */
        public Builder query(String query) {
            return query(Output.of(query));
        }

        /**
         * @param resourceIdColumn The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder resourceIdColumn(@Nullable Output resourceIdColumn) {
            $.resourceIdColumn = resourceIdColumn;
            return this;
        }

        /**
         * @param resourceIdColumn The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder resourceIdColumn(String resourceIdColumn) {
            return resourceIdColumn(Output.of(resourceIdColumn));
        }

        /**
         * @param threshold the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder threshold(@Nullable Output threshold) {
            $.threshold = threshold;
            return this;
        }

        /**
         * @param threshold the criteria threshold value that activates the alert. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder threshold(Double threshold) {
            return threshold(Output.of(threshold));
        }

        /**
         * @param timeAggregation Aggregation type. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(@Nullable Output> timeAggregation) {
            $.timeAggregation = timeAggregation;
            return this;
        }

        /**
         * @param timeAggregation Aggregation type. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(Either timeAggregation) {
            return timeAggregation(Output.of(timeAggregation));
        }

        /**
         * @param timeAggregation Aggregation type. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(String timeAggregation) {
            return timeAggregation(Either.ofLeft(timeAggregation));
        }

        /**
         * @param timeAggregation Aggregation type. Relevant and required only for rules of the kind LogAlert.
         * 
         * @return builder
         * 
         */
        public Builder timeAggregation(TimeAggregation timeAggregation) {
            return timeAggregation(Either.ofRight(timeAggregation));
        }

        public ConditionArgs build() {
            return $;
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy