// *** 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.gcp.monitoring.inputs;

import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import com.pulumi.gcp.monitoring.inputs.AlertPolicyConditionConditionAbsentAggregationArgs;
import com.pulumi.gcp.monitoring.inputs.AlertPolicyConditionConditionAbsentTriggerArgs;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


public final class AlertPolicyConditionConditionAbsentArgs extends com.pulumi.resources.ResourceArgs {

    public static final AlertPolicyConditionConditionAbsentArgs Empty = new AlertPolicyConditionConditionAbsentArgs();

    /**
     * Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     * 
     */
    @Import(name="aggregations")
    private @Nullable Output<List<AlertPolicyConditionConditionAbsentAggregationArgs>> aggregations;

    /**
     * @return Specifies the alignment of data points in
     * individual time series as well as how to
     * combine the retrieved time series together
     * (such as when aggregating multiple streams
     * on each resource to a single stream for each
     * resource or when aggregating streams across
     * all members of a group of resources).
     * Multiple aggregations are applied in the
     * order specified.
     * Structure is documented below.
     * 
     */
    public Optional<Output<List<AlertPolicyConditionConditionAbsentAggregationArgs>>> aggregations() {
        return Optional.ofNullable(this.aggregations);
    }

    /**
     * The amount of time that a time series must
     * fail to report new data to be considered
     * failing. Currently, only values that are a
     * multiple of a minute--e.g. 60s, 120s, or 300s
     * --are supported.
     * 
     */
    @Import(name="duration", required=true)
    private Output<String> duration;

    /**
     * @return The amount of time that a time series must
     * fail to report new data to be considered
     * failing. Currently, only values that are a
     * multiple of a minute--e.g. 60s, 120s, or 300s
     * --are supported.
     * 
     */
    public Output<String> duration() {
        return this.duration;
    }

    /**
     * A filter that identifies which time series
     * should be compared with the threshold.The
     * filter is similar to the one that is
     * specified in the
     * MetricService.ListTimeSeries request (that
     * call is useful to verify the time series
     * that will be retrieved / processed) and must
     * specify the metric type and optionally may
     * contain restrictions on resource type,
     * resource labels, and metric labels. This
     * field may not exceed 2048 Unicode characters
     * in length.
     * 
     */
    @Import(name="filter")
    private @Nullable Output<String> filter;

    /**
     * @return A filter that identifies which time series
     * should be compared with the threshold.The
     * filter is similar to the one that is
     * specified in the
     * MetricService.ListTimeSeries request (that
     * call is useful to verify the time series
     * that will be retrieved / processed) and must
     * specify the metric type and optionally may
     * contain restrictions on resource type,
     * resource labels, and metric labels. This
     * field may not exceed 2048 Unicode characters
     * in length.
     * 
     */
    public Optional<Output<String>> filter() {
        return Optional.ofNullable(this.filter);
    }

    /**
     * The number/percent of time series for which
     * the comparison must hold in order for the
     * condition to trigger. If unspecified, then
     * the condition will trigger if the comparison
     * is true for any of the time series that have
     * been identified by filter and aggregations.
     * Structure is documented below.
     * 
     */
    @Import(name="trigger")
    private @Nullable Output<AlertPolicyConditionConditionAbsentTriggerArgs> trigger;

    /**
     * @return The number/percent of time series for which
     * the comparison must hold in order for the
     * condition to trigger. If unspecified, then
     * the condition will trigger if the comparison
     * is true for any of the time series that have
     * been identified by filter and aggregations.
     * Structure is documented below.
     * 
     */
    public Optional<Output<AlertPolicyConditionConditionAbsentTriggerArgs>> trigger() {
        return Optional.ofNullable(this.trigger);
    }

    private AlertPolicyConditionConditionAbsentArgs() {}

    private AlertPolicyConditionConditionAbsentArgs(AlertPolicyConditionConditionAbsentArgs $) {
        this.aggregations = $.aggregations;
        this.duration = $.duration;
        this.filter = $.filter;
        this.trigger = $.trigger;
    }

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

    public static final class Builder {
        private AlertPolicyConditionConditionAbsentArgs $;

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

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

        /**
         * @param aggregations Specifies the alignment of data points in
         * individual time series as well as how to
         * combine the retrieved time series together
         * (such as when aggregating multiple streams
         * on each resource to a single stream for each
         * resource or when aggregating streams across
         * all members of a group of resources).
         * Multiple aggregations are applied in the
         * order specified.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder aggregations(@Nullable Output<List<AlertPolicyConditionConditionAbsentAggregationArgs>> aggregations) {
            $.aggregations = aggregations;
            return this;
        }

        /**
         * @param aggregations Specifies the alignment of data points in
         * individual time series as well as how to
         * combine the retrieved time series together
         * (such as when aggregating multiple streams
         * on each resource to a single stream for each
         * resource or when aggregating streams across
         * all members of a group of resources).
         * Multiple aggregations are applied in the
         * order specified.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder aggregations(List<AlertPolicyConditionConditionAbsentAggregationArgs> aggregations) {
            return aggregations(Output.of(aggregations));
        }

        /**
         * @param aggregations Specifies the alignment of data points in
         * individual time series as well as how to
         * combine the retrieved time series together
         * (such as when aggregating multiple streams
         * on each resource to a single stream for each
         * resource or when aggregating streams across
         * all members of a group of resources).
         * Multiple aggregations are applied in the
         * order specified.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder aggregations(AlertPolicyConditionConditionAbsentAggregationArgs... aggregations) {
            return aggregations(List.of(aggregations));
        }

        /**
         * @param duration The amount of time that a time series must
         * fail to report new data to be considered
         * failing. Currently, only values that are a
         * multiple of a minute--e.g. 60s, 120s, or 300s
         * --are supported.
         * 
         * @return builder
         * 
         */
        public Builder duration(Output<String> duration) {
            $.duration = duration;
            return this;
        }

        /**
         * @param duration The amount of time that a time series must
         * fail to report new data to be considered
         * failing. Currently, only values that are a
         * multiple of a minute--e.g. 60s, 120s, or 300s
         * --are supported.
         * 
         * @return builder
         * 
         */
        public Builder duration(String duration) {
            return duration(Output.of(duration));
        }

        /**
         * @param filter A filter that identifies which time series
         * should be compared with the threshold.The
         * filter is similar to the one that is
         * specified in the
         * MetricService.ListTimeSeries request (that
         * call is useful to verify the time series
         * that will be retrieved / processed) and must
         * specify the metric type and optionally may
         * contain restrictions on resource type,
         * resource labels, and metric labels. This
         * field may not exceed 2048 Unicode characters
         * in length.
         * 
         * @return builder
         * 
         */
        public Builder filter(@Nullable Output<String> filter) {
            $.filter = filter;
            return this;
        }

        /**
         * @param filter A filter that identifies which time series
         * should be compared with the threshold.The
         * filter is similar to the one that is
         * specified in the
         * MetricService.ListTimeSeries request (that
         * call is useful to verify the time series
         * that will be retrieved / processed) and must
         * specify the metric type and optionally may
         * contain restrictions on resource type,
         * resource labels, and metric labels. This
         * field may not exceed 2048 Unicode characters
         * in length.
         * 
         * @return builder
         * 
         */
        public Builder filter(String filter) {
            return filter(Output.of(filter));
        }

        /**
         * @param trigger The number/percent of time series for which
         * the comparison must hold in order for the
         * condition to trigger. If unspecified, then
         * the condition will trigger if the comparison
         * is true for any of the time series that have
         * been identified by filter and aggregations.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder trigger(@Nullable Output<AlertPolicyConditionConditionAbsentTriggerArgs> trigger) {
            $.trigger = trigger;
            return this;
        }

        /**
         * @param trigger The number/percent of time series for which
         * the comparison must hold in order for the
         * condition to trigger. If unspecified, then
         * the condition will trigger if the comparison
         * is true for any of the time series that have
         * been identified by filter and aggregations.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder trigger(AlertPolicyConditionConditionAbsentTriggerArgs trigger) {
            return trigger(Output.of(trigger));
        }

        public AlertPolicyConditionConditionAbsentArgs build() {
            $.duration = Objects.requireNonNull($.duration, "expected parameter 'duration' to be non-null");
            return $;
        }
    }

}
