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

import com.pulumi.azure.monitoring.inputs.SmartDetectorAlertRuleActionGroupArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final SmartDetectorAlertRuleState Empty = new SmartDetectorAlertRuleState();

    /**
     * An `action_group` block as defined below.
     * 
     */
    @Import(name="actionGroup")
    private @Nullable Output<SmartDetectorAlertRuleActionGroupArgs> actionGroup;

    /**
     * @return An `action_group` block as defined below.
     * 
     */
    public Optional<Output<SmartDetectorAlertRuleActionGroupArgs>> actionGroup() {
        return Optional.ofNullable(this.actionGroup);
    }

    /**
     * Specifies a description for the Smart Detector Alert Rule.
     * 
     */
    @Import(name="description")
    private @Nullable Output<String> description;

    /**
     * @return Specifies a description for the Smart Detector Alert Rule.
     * 
     */
    public Optional<Output<String>> description() {
        return Optional.ofNullable(this.description);
    }

    /**
     * Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`.
     * 
     */
    @Import(name="detectorType")
    private @Nullable Output<String> detectorType;

    /**
     * @return Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`.
     * 
     */
    public Optional<Output<String>> detectorType() {
        return Optional.ofNullable(this.detectorType);
    }

    /**
     * Is the Smart Detector Alert Rule enabled? Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output<Boolean> enabled;

    /**
     * @return Is the Smart Detector Alert Rule enabled? Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
     * 
     */
    @Import(name="frequency")
    private @Nullable Output<String> frequency;

    /**
     * @return Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
     * 
     */
    public Optional<Output<String>> frequency() {
        return Optional.ofNullable(this.frequency);
    }

    /**
     * Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="name")
    private @Nullable Output<String> name;

    /**
     * @return Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> name() {
        return Optional.ofNullable(this.name);
    }

    /**
     * Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
     * 
     */
    @Import(name="resourceGroupName")
    private @Nullable Output<String> resourceGroupName;

    /**
     * @return Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
     * 
     */
    public Optional<Output<String>> resourceGroupName() {
        return Optional.ofNullable(this.resourceGroupName);
    }

    /**
     * Specifies the scopes of this Smart Detector Alert Rule.
     * 
     */
    @Import(name="scopeResourceIds")
    private @Nullable Output<List<String>> scopeResourceIds;

    /**
     * @return Specifies the scopes of this Smart Detector Alert Rule.
     * 
     */
    public Optional<Output<List<String>>> scopeResourceIds() {
        return Optional.ofNullable(this.scopeResourceIds);
    }

    /**
     * Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`.
     * 
     */
    @Import(name="severity")
    private @Nullable Output<String> severity;

    /**
     * @return Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`.
     * 
     */
    public Optional<Output<String>> severity() {
        return Optional.ofNullable(this.severity);
    }

    /**
     * A mapping of tags to assign to the resource.
     * 
     */
    @Import(name="tags")
    private @Nullable Output<Map<String,String>> tags;

    /**
     * @return A mapping of tags to assign to the resource.
     * 
     */
    public Optional<Output<Map<String,String>>> tags() {
        return Optional.ofNullable(this.tags);
    }

    /**
     * Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
     * 
     */
    @Import(name="throttlingDuration")
    private @Nullable Output<String> throttlingDuration;

    /**
     * @return Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
     * 
     */
    public Optional<Output<String>> throttlingDuration() {
        return Optional.ofNullable(this.throttlingDuration);
    }

    private SmartDetectorAlertRuleState() {}

    private SmartDetectorAlertRuleState(SmartDetectorAlertRuleState $) {
        this.actionGroup = $.actionGroup;
        this.description = $.description;
        this.detectorType = $.detectorType;
        this.enabled = $.enabled;
        this.frequency = $.frequency;
        this.name = $.name;
        this.resourceGroupName = $.resourceGroupName;
        this.scopeResourceIds = $.scopeResourceIds;
        this.severity = $.severity;
        this.tags = $.tags;
        this.throttlingDuration = $.throttlingDuration;
    }

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

    public static final class Builder {
        private SmartDetectorAlertRuleState $;

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

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

        /**
         * @param actionGroup An `action_group` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder actionGroup(@Nullable Output<SmartDetectorAlertRuleActionGroupArgs> actionGroup) {
            $.actionGroup = actionGroup;
            return this;
        }

        /**
         * @param actionGroup An `action_group` block as defined below.
         * 
         * @return builder
         * 
         */
        public Builder actionGroup(SmartDetectorAlertRuleActionGroupArgs actionGroup) {
            return actionGroup(Output.of(actionGroup));
        }

        /**
         * @param description Specifies a description for the Smart Detector Alert Rule.
         * 
         * @return builder
         * 
         */
        public Builder description(@Nullable Output<String> description) {
            $.description = description;
            return this;
        }

        /**
         * @param description Specifies a description for the Smart Detector Alert Rule.
         * 
         * @return builder
         * 
         */
        public Builder description(String description) {
            return description(Output.of(description));
        }

        /**
         * @param detectorType Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`.
         * 
         * @return builder
         * 
         */
        public Builder detectorType(@Nullable Output<String> detectorType) {
            $.detectorType = detectorType;
            return this;
        }

        /**
         * @param detectorType Specifies the Built-In Smart Detector type that this alert rule will use. Currently the only possible values are `FailureAnomaliesDetector`, `RequestPerformanceDegradationDetector`, `DependencyPerformanceDegradationDetector`, `ExceptionVolumeChangedDetector`, `TraceSeverityDetector`, `MemoryLeakDetector`.
         * 
         * @return builder
         * 
         */
        public Builder detectorType(String detectorType) {
            return detectorType(Output.of(detectorType));
        }

        /**
         * @param enabled Is the Smart Detector Alert Rule enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output<Boolean> enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Is the Smart Detector Alert Rule enabled? Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param frequency Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
         * 
         * @return builder
         * 
         */
        public Builder frequency(@Nullable Output<String> frequency) {
            $.frequency = frequency;
            return this;
        }

        /**
         * @param frequency Specifies the frequency of this Smart Detector Alert Rule in ISO8601 format.
         * 
         * @return builder
         * 
         */
        public Builder frequency(String frequency) {
            return frequency(Output.of(frequency));
        }

        /**
         * @param name Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(@Nullable Output<String> name) {
            $.name = name;
            return this;
        }

        /**
         * @param name Specifies the name of the Monitor Smart Detector Alert Rule. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder name(String name) {
            return name(Output.of(name));
        }

        /**
         * @param resourceGroupName Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(@Nullable Output<String> resourceGroupName) {
            $.resourceGroupName = resourceGroupName;
            return this;
        }

        /**
         * @param resourceGroupName Specifies the name of the resource group in which the Monitor Smart Detector Alert Rule should exist. Changing this forces a new resource to be created.
         * 
         * @return builder
         * 
         */
        public Builder resourceGroupName(String resourceGroupName) {
            return resourceGroupName(Output.of(resourceGroupName));
        }

        /**
         * @param scopeResourceIds Specifies the scopes of this Smart Detector Alert Rule.
         * 
         * @return builder
         * 
         */
        public Builder scopeResourceIds(@Nullable Output<List<String>> scopeResourceIds) {
            $.scopeResourceIds = scopeResourceIds;
            return this;
        }

        /**
         * @param scopeResourceIds Specifies the scopes of this Smart Detector Alert Rule.
         * 
         * @return builder
         * 
         */
        public Builder scopeResourceIds(List<String> scopeResourceIds) {
            return scopeResourceIds(Output.of(scopeResourceIds));
        }

        /**
         * @param scopeResourceIds Specifies the scopes of this Smart Detector Alert Rule.
         * 
         * @return builder
         * 
         */
        public Builder scopeResourceIds(String... scopeResourceIds) {
            return scopeResourceIds(List.of(scopeResourceIds));
        }

        /**
         * @param severity Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`.
         * 
         * @return builder
         * 
         */
        public Builder severity(@Nullable Output<String> severity) {
            $.severity = severity;
            return this;
        }

        /**
         * @param severity Specifies the severity of this Smart Detector Alert Rule. Possible values are `Sev0`, `Sev1`, `Sev2`, `Sev3` or `Sev4`.
         * 
         * @return builder
         * 
         */
        public Builder severity(String severity) {
            return severity(Output.of(severity));
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(@Nullable Output<Map<String,String>> tags) {
            $.tags = tags;
            return this;
        }

        /**
         * @param tags A mapping of tags to assign to the resource.
         * 
         * @return builder
         * 
         */
        public Builder tags(Map<String,String> tags) {
            return tags(Output.of(tags));
        }

        /**
         * @param throttlingDuration Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
         * 
         * @return builder
         * 
         */
        public Builder throttlingDuration(@Nullable Output<String> throttlingDuration) {
            $.throttlingDuration = throttlingDuration;
            return this;
        }

        /**
         * @param throttlingDuration Specifies the duration (in ISO8601 format) to wait before notifying on the alert rule again.
         * 
         * @return builder
         * 
         */
        public Builder throttlingDuration(String throttlingDuration) {
            return throttlingDuration(Output.of(throttlingDuration));
        }

        public SmartDetectorAlertRuleState build() {
            return $;
        }
    }

}
