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

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.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final AlertRuleNrtIncidentGroupingArgs Empty = new AlertRuleNrtIncidentGroupingArgs();

    /**
     * A list of alert details to group by, only when the `entity_matching_method` is `Selected`. Possible values are `DisplayName` and `Severity`.
     * 
     */
    @Import(name="byAlertDetails")
    private @Nullable Output<List<String>> byAlertDetails;

    /**
     * @return A list of alert details to group by, only when the `entity_matching_method` is `Selected`. Possible values are `DisplayName` and `Severity`.
     * 
     */
    public Optional<Output<List<String>>> byAlertDetails() {
        return Optional.ofNullable(this.byAlertDetails);
    }

    /**
     * A list of custom details keys to group by, only when the `entity_matching_method` is `Selected`. Only keys defined in the `custom_details` may be used.
     * 
     */
    @Import(name="byCustomDetails")
    private @Nullable Output<List<String>> byCustomDetails;

    /**
     * @return A list of custom details keys to group by, only when the `entity_matching_method` is `Selected`. Only keys defined in the `custom_details` may be used.
     * 
     */
    public Optional<Output<List<String>>> byCustomDetails() {
        return Optional.ofNullable(this.byCustomDetails);
    }

    /**
     * A list of entity types to group by, only when the `entity_matching_method` is `Selected`. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`.
     * 
     */
    @Import(name="byEntities")
    private @Nullable Output<List<String>> byEntities;

    /**
     * @return A list of entity types to group by, only when the `entity_matching_method` is `Selected`. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`.
     * 
     */
    public Optional<Output<List<String>>> byEntities() {
        return Optional.ofNullable(this.byEntities);
    }

    /**
     * Enable grouping incidents created from alerts triggered by this Sentinel NRT Alert Rule. Defaults to `true`.
     * 
     */
    @Import(name="enabled")
    private @Nullable Output<Boolean> enabled;

    /**
     * @return Enable grouping incidents created from alerts triggered by this Sentinel NRT Alert Rule. Defaults to `true`.
     * 
     */
    public Optional<Output<Boolean>> enabled() {
        return Optional.ofNullable(this.enabled);
    }

    /**
     * The method used to group incidents. Possible values are `AnyAlert`, `Selected` and `AllEntities`. Defaults to `AnyAlert`.
     * 
     */
    @Import(name="entityMatchingMethod")
    private @Nullable Output<String> entityMatchingMethod;

    /**
     * @return The method used to group incidents. Possible values are `AnyAlert`, `Selected` and `AllEntities`. Defaults to `AnyAlert`.
     * 
     */
    public Optional<Output<String>> entityMatchingMethod() {
        return Optional.ofNullable(this.entityMatchingMethod);
    }

    /**
     * Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`.
     * 
     */
    @Import(name="lookbackDuration")
    private @Nullable Output<String> lookbackDuration;

    /**
     * @return Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`.
     * 
     */
    public Optional<Output<String>> lookbackDuration() {
        return Optional.ofNullable(this.lookbackDuration);
    }

    /**
     * Whether to re-open closed matching incidents? Defaults to `false`.
     * 
     */
    @Import(name="reopenClosedIncidents")
    private @Nullable Output<Boolean> reopenClosedIncidents;

    /**
     * @return Whether to re-open closed matching incidents? Defaults to `false`.
     * 
     */
    public Optional<Output<Boolean>> reopenClosedIncidents() {
        return Optional.ofNullable(this.reopenClosedIncidents);
    }

    private AlertRuleNrtIncidentGroupingArgs() {}

    private AlertRuleNrtIncidentGroupingArgs(AlertRuleNrtIncidentGroupingArgs $) {
        this.byAlertDetails = $.byAlertDetails;
        this.byCustomDetails = $.byCustomDetails;
        this.byEntities = $.byEntities;
        this.enabled = $.enabled;
        this.entityMatchingMethod = $.entityMatchingMethod;
        this.lookbackDuration = $.lookbackDuration;
        this.reopenClosedIncidents = $.reopenClosedIncidents;
    }

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

    public static final class Builder {
        private AlertRuleNrtIncidentGroupingArgs $;

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

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

        /**
         * @param byAlertDetails A list of alert details to group by, only when the `entity_matching_method` is `Selected`. Possible values are `DisplayName` and `Severity`.
         * 
         * @return builder
         * 
         */
        public Builder byAlertDetails(@Nullable Output<List<String>> byAlertDetails) {
            $.byAlertDetails = byAlertDetails;
            return this;
        }

        /**
         * @param byAlertDetails A list of alert details to group by, only when the `entity_matching_method` is `Selected`. Possible values are `DisplayName` and `Severity`.
         * 
         * @return builder
         * 
         */
        public Builder byAlertDetails(List<String> byAlertDetails) {
            return byAlertDetails(Output.of(byAlertDetails));
        }

        /**
         * @param byAlertDetails A list of alert details to group by, only when the `entity_matching_method` is `Selected`. Possible values are `DisplayName` and `Severity`.
         * 
         * @return builder
         * 
         */
        public Builder byAlertDetails(String... byAlertDetails) {
            return byAlertDetails(List.of(byAlertDetails));
        }

        /**
         * @param byCustomDetails A list of custom details keys to group by, only when the `entity_matching_method` is `Selected`. Only keys defined in the `custom_details` may be used.
         * 
         * @return builder
         * 
         */
        public Builder byCustomDetails(@Nullable Output<List<String>> byCustomDetails) {
            $.byCustomDetails = byCustomDetails;
            return this;
        }

        /**
         * @param byCustomDetails A list of custom details keys to group by, only when the `entity_matching_method` is `Selected`. Only keys defined in the `custom_details` may be used.
         * 
         * @return builder
         * 
         */
        public Builder byCustomDetails(List<String> byCustomDetails) {
            return byCustomDetails(Output.of(byCustomDetails));
        }

        /**
         * @param byCustomDetails A list of custom details keys to group by, only when the `entity_matching_method` is `Selected`. Only keys defined in the `custom_details` may be used.
         * 
         * @return builder
         * 
         */
        public Builder byCustomDetails(String... byCustomDetails) {
            return byCustomDetails(List.of(byCustomDetails));
        }

        /**
         * @param byEntities A list of entity types to group by, only when the `entity_matching_method` is `Selected`. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`.
         * 
         * @return builder
         * 
         */
        public Builder byEntities(@Nullable Output<List<String>> byEntities) {
            $.byEntities = byEntities;
            return this;
        }

        /**
         * @param byEntities A list of entity types to group by, only when the `entity_matching_method` is `Selected`. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`.
         * 
         * @return builder
         * 
         */
        public Builder byEntities(List<String> byEntities) {
            return byEntities(Output.of(byEntities));
        }

        /**
         * @param byEntities A list of entity types to group by, only when the `entity_matching_method` is `Selected`. Possible values are `Account`, `AzureResource`, `CloudApplication`, `DNS`, `File`, `FileHash`, `Host`, `IP`, `Mailbox`, `MailCluster`, `MailMessage`, `Malware`, `Process`, `RegistryKey`, `RegistryValue`, `SecurityGroup`, `SubmissionMail`, `URL`.
         * 
         * @return builder
         * 
         */
        public Builder byEntities(String... byEntities) {
            return byEntities(List.of(byEntities));
        }

        /**
         * @param enabled Enable grouping incidents created from alerts triggered by this Sentinel NRT Alert Rule. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(@Nullable Output<Boolean> enabled) {
            $.enabled = enabled;
            return this;
        }

        /**
         * @param enabled Enable grouping incidents created from alerts triggered by this Sentinel NRT Alert Rule. Defaults to `true`.
         * 
         * @return builder
         * 
         */
        public Builder enabled(Boolean enabled) {
            return enabled(Output.of(enabled));
        }

        /**
         * @param entityMatchingMethod The method used to group incidents. Possible values are `AnyAlert`, `Selected` and `AllEntities`. Defaults to `AnyAlert`.
         * 
         * @return builder
         * 
         */
        public Builder entityMatchingMethod(@Nullable Output<String> entityMatchingMethod) {
            $.entityMatchingMethod = entityMatchingMethod;
            return this;
        }

        /**
         * @param entityMatchingMethod The method used to group incidents. Possible values are `AnyAlert`, `Selected` and `AllEntities`. Defaults to `AnyAlert`.
         * 
         * @return builder
         * 
         */
        public Builder entityMatchingMethod(String entityMatchingMethod) {
            return entityMatchingMethod(Output.of(entityMatchingMethod));
        }

        /**
         * @param lookbackDuration Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`.
         * 
         * @return builder
         * 
         */
        public Builder lookbackDuration(@Nullable Output<String> lookbackDuration) {
            $.lookbackDuration = lookbackDuration;
            return this;
        }

        /**
         * @param lookbackDuration Limit the group to alerts created within the lookback duration (in ISO 8601 duration format). Defaults to `PT5M`.
         * 
         * @return builder
         * 
         */
        public Builder lookbackDuration(String lookbackDuration) {
            return lookbackDuration(Output.of(lookbackDuration));
        }

        /**
         * @param reopenClosedIncidents Whether to re-open closed matching incidents? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder reopenClosedIncidents(@Nullable Output<Boolean> reopenClosedIncidents) {
            $.reopenClosedIncidents = reopenClosedIncidents;
            return this;
        }

        /**
         * @param reopenClosedIncidents Whether to re-open closed matching incidents? Defaults to `false`.
         * 
         * @return builder
         * 
         */
        public Builder reopenClosedIncidents(Boolean reopenClosedIncidents) {
            return reopenClosedIncidents(Output.of(reopenClosedIncidents));
        }

        public AlertRuleNrtIncidentGroupingArgs build() {
            return $;
        }
    }

}
