// *** 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.azure.monitoring.outputs;

import com.pulumi.core.annotations.CustomType;
import java.lang.Integer;
import java.util.Objects;

@CustomType
public final class ScheduledQueryRulesAlertV2CriteriaFailingPeriods {
    /**
     * @return Specifies the number of violations to trigger an alert. Should be smaller or equal to `number_of_evaluation_periods`. Possible value is integer between 1 and 6.
     * 
     */
    private Integer minimumFailingPeriodsToTriggerAlert;
    /**
     * @return Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity `window_duration` and the selected number of aggregated points. Possible value is integer between 1 and 6.
     * 
     * &gt; **Note** The query look back which is `window_duration`*`number_of_evaluation_periods` cannot exceed 48 hours.
     * 
     * &gt; **Note** `number_of_evaluation_periods` must be `1` for queries that do not project timestamp column
     * 
     */
    private Integer numberOfEvaluationPeriods;

    private ScheduledQueryRulesAlertV2CriteriaFailingPeriods() {}
    /**
     * @return Specifies the number of violations to trigger an alert. Should be smaller or equal to `number_of_evaluation_periods`. Possible value is integer between 1 and 6.
     * 
     */
    public Integer minimumFailingPeriodsToTriggerAlert() {
        return this.minimumFailingPeriodsToTriggerAlert;
    }
    /**
     * @return Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity `window_duration` and the selected number of aggregated points. Possible value is integer between 1 and 6.
     * 
     * &gt; **Note** The query look back which is `window_duration`*`number_of_evaluation_periods` cannot exceed 48 hours.
     * 
     * &gt; **Note** `number_of_evaluation_periods` must be `1` for queries that do not project timestamp column
     * 
     */
    public Integer numberOfEvaluationPeriods() {
        return this.numberOfEvaluationPeriods;
    }

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

    public static Builder builder(ScheduledQueryRulesAlertV2CriteriaFailingPeriods defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private Integer minimumFailingPeriodsToTriggerAlert;
        private Integer numberOfEvaluationPeriods;
        public Builder() {}
        public Builder(ScheduledQueryRulesAlertV2CriteriaFailingPeriods defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.minimumFailingPeriodsToTriggerAlert = defaults.minimumFailingPeriodsToTriggerAlert;
    	      this.numberOfEvaluationPeriods = defaults.numberOfEvaluationPeriods;
        }

        @CustomType.Setter
        public Builder minimumFailingPeriodsToTriggerAlert(Integer minimumFailingPeriodsToTriggerAlert) {
            this.minimumFailingPeriodsToTriggerAlert = Objects.requireNonNull(minimumFailingPeriodsToTriggerAlert);
            return this;
        }
        @CustomType.Setter
        public Builder numberOfEvaluationPeriods(Integer numberOfEvaluationPeriods) {
            this.numberOfEvaluationPeriods = Objects.requireNonNull(numberOfEvaluationPeriods);
            return this;
        }
        public ScheduledQueryRulesAlertV2CriteriaFailingPeriods build() {
            final var o = new ScheduledQueryRulesAlertV2CriteriaFailingPeriods();
            o.minimumFailingPeriodsToTriggerAlert = minimumFailingPeriodsToTriggerAlert;
            o.numberOfEvaluationPeriods = numberOfEvaluationPeriods;
            return o;
        }
    }
}
