// *** 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.AlertPolicyAlertStrategyNotificationChannelStrategyArgs;
import com.pulumi.gcp.monitoring.inputs.AlertPolicyAlertStrategyNotificationRateLimitArgs;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AlertPolicyAlertStrategyArgs Empty = new AlertPolicyAlertStrategyArgs();

    /**
     * If an alert policy that was active has no data for this long, any open incidents will close.
     * 
     */
    @Import(name="autoClose")
    private @Nullable Output<String> autoClose;

    /**
     * @return If an alert policy that was active has no data for this long, any open incidents will close.
     * 
     */
    public Optional<Output<String>> autoClose() {
        return Optional.ofNullable(this.autoClose);
    }

    /**
     * Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     * 
     */
    @Import(name="notificationChannelStrategies")
    private @Nullable Output<List<AlertPolicyAlertStrategyNotificationChannelStrategyArgs>> notificationChannelStrategies;

    /**
     * @return Control over how the notification channels in `notification_channels`
     * are notified when this alert fires, on a per-channel basis.
     * Structure is documented below.
     * 
     */
    public Optional<Output<List<AlertPolicyAlertStrategyNotificationChannelStrategyArgs>>> notificationChannelStrategies() {
        return Optional.ofNullable(this.notificationChannelStrategies);
    }

    /**
     * Required for alert policies with a LogMatch condition.
     * This limit is not implemented for alert policies that are not log-based.
     * Structure is documented below.
     * 
     */
    @Import(name="notificationRateLimit")
    private @Nullable Output<AlertPolicyAlertStrategyNotificationRateLimitArgs> notificationRateLimit;

    /**
     * @return Required for alert policies with a LogMatch condition.
     * This limit is not implemented for alert policies that are not log-based.
     * Structure is documented below.
     * 
     */
    public Optional<Output<AlertPolicyAlertStrategyNotificationRateLimitArgs>> notificationRateLimit() {
        return Optional.ofNullable(this.notificationRateLimit);
    }

    private AlertPolicyAlertStrategyArgs() {}

    private AlertPolicyAlertStrategyArgs(AlertPolicyAlertStrategyArgs $) {
        this.autoClose = $.autoClose;
        this.notificationChannelStrategies = $.notificationChannelStrategies;
        this.notificationRateLimit = $.notificationRateLimit;
    }

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

    public static final class Builder {
        private AlertPolicyAlertStrategyArgs $;

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

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

        /**
         * @param autoClose If an alert policy that was active has no data for this long, any open incidents will close.
         * 
         * @return builder
         * 
         */
        public Builder autoClose(@Nullable Output<String> autoClose) {
            $.autoClose = autoClose;
            return this;
        }

        /**
         * @param autoClose If an alert policy that was active has no data for this long, any open incidents will close.
         * 
         * @return builder
         * 
         */
        public Builder autoClose(String autoClose) {
            return autoClose(Output.of(autoClose));
        }

        /**
         * @param notificationChannelStrategies Control over how the notification channels in `notification_channels`
         * are notified when this alert fires, on a per-channel basis.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder notificationChannelStrategies(@Nullable Output<List<AlertPolicyAlertStrategyNotificationChannelStrategyArgs>> notificationChannelStrategies) {
            $.notificationChannelStrategies = notificationChannelStrategies;
            return this;
        }

        /**
         * @param notificationChannelStrategies Control over how the notification channels in `notification_channels`
         * are notified when this alert fires, on a per-channel basis.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder notificationChannelStrategies(List<AlertPolicyAlertStrategyNotificationChannelStrategyArgs> notificationChannelStrategies) {
            return notificationChannelStrategies(Output.of(notificationChannelStrategies));
        }

        /**
         * @param notificationChannelStrategies Control over how the notification channels in `notification_channels`
         * are notified when this alert fires, on a per-channel basis.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder notificationChannelStrategies(AlertPolicyAlertStrategyNotificationChannelStrategyArgs... notificationChannelStrategies) {
            return notificationChannelStrategies(List.of(notificationChannelStrategies));
        }

        /**
         * @param notificationRateLimit Required for alert policies with a LogMatch condition.
         * This limit is not implemented for alert policies that are not log-based.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder notificationRateLimit(@Nullable Output<AlertPolicyAlertStrategyNotificationRateLimitArgs> notificationRateLimit) {
            $.notificationRateLimit = notificationRateLimit;
            return this;
        }

        /**
         * @param notificationRateLimit Required for alert policies with a LogMatch condition.
         * This limit is not implemented for alert policies that are not log-based.
         * Structure is documented below.
         * 
         * @return builder
         * 
         */
        public Builder notificationRateLimit(AlertPolicyAlertStrategyNotificationRateLimitArgs notificationRateLimit) {
            return notificationRateLimit(Output.of(notificationRateLimit));
        }

        public AlertPolicyAlertStrategyArgs build() {
            return $;
        }
    }

}
