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

import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleExclusionArgs;
import com.pulumi.azure.cdn.inputs.FrontdoorFirewallPolicyManagedRuleOverrideArgs;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Import;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;


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

    public static final FrontdoorFirewallPolicyManagedRuleArgs Empty = new FrontdoorFirewallPolicyManagedRuleArgs();

    /**
     * The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
     * 
     */
    @Import(name="action", required=true)
    private Output<String> action;

    /**
     * @return The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
     * 
     */
    public Output<String> action() {
        return this.action;
    }

    /**
     * One or more `exclusion` blocks as defined below.
     * 
     */
    @Import(name="exclusions")
    private @Nullable Output<List<FrontdoorFirewallPolicyManagedRuleExclusionArgs>> exclusions;

    /**
     * @return One or more `exclusion` blocks as defined below.
     * 
     */
    public Optional<Output<List<FrontdoorFirewallPolicyManagedRuleExclusionArgs>>> exclusions() {
        return Optional.ofNullable(this.exclusions);
    }

    /**
     * One or more `override` blocks as defined below.
     * 
     */
    @Import(name="overrides")
    private @Nullable Output<List<FrontdoorFirewallPolicyManagedRuleOverrideArgs>> overrides;

    /**
     * @return One or more `override` blocks as defined below.
     * 
     */
    public Optional<Output<List<FrontdoorFirewallPolicyManagedRuleOverrideArgs>>> overrides() {
        return Optional.ofNullable(this.overrides);
    }

    /**
     * The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
     * 
     */
    @Import(name="type", required=true)
    private Output<String> type;

    /**
     * @return The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
     * 
     */
    public Output<String> type() {
        return this.type;
    }

    /**
     * The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
     * 
     */
    @Import(name="version", required=true)
    private Output<String> version;

    /**
     * @return The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
     * 
     */
    public Output<String> version() {
        return this.version;
    }

    private FrontdoorFirewallPolicyManagedRuleArgs() {}

    private FrontdoorFirewallPolicyManagedRuleArgs(FrontdoorFirewallPolicyManagedRuleArgs $) {
        this.action = $.action;
        this.exclusions = $.exclusions;
        this.overrides = $.overrides;
        this.type = $.type;
        this.version = $.version;
    }

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

    public static final class Builder {
        private FrontdoorFirewallPolicyManagedRuleArgs $;

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

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

        /**
         * @param action The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
         * 
         * @return builder
         * 
         */
        public Builder action(Output<String> action) {
            $.action = action;
            return this;
        }

        /**
         * @param action The action to perform for all DRS rules when the managed rule is matched or when the anomaly score is 5 or greater depending on which version of the DRS you are using. Possible values include `Allow`, `Log`, `Block`, and `Redirect`.
         * 
         * @return builder
         * 
         */
        public Builder action(String action) {
            return action(Output.of(action));
        }

        /**
         * @param exclusions One or more `exclusion` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder exclusions(@Nullable Output<List<FrontdoorFirewallPolicyManagedRuleExclusionArgs>> exclusions) {
            $.exclusions = exclusions;
            return this;
        }

        /**
         * @param exclusions One or more `exclusion` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder exclusions(List<FrontdoorFirewallPolicyManagedRuleExclusionArgs> exclusions) {
            return exclusions(Output.of(exclusions));
        }

        /**
         * @param exclusions One or more `exclusion` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder exclusions(FrontdoorFirewallPolicyManagedRuleExclusionArgs... exclusions) {
            return exclusions(List.of(exclusions));
        }

        /**
         * @param overrides One or more `override` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder overrides(@Nullable Output<List<FrontdoorFirewallPolicyManagedRuleOverrideArgs>> overrides) {
            $.overrides = overrides;
            return this;
        }

        /**
         * @param overrides One or more `override` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder overrides(List<FrontdoorFirewallPolicyManagedRuleOverrideArgs> overrides) {
            return overrides(Output.of(overrides));
        }

        /**
         * @param overrides One or more `override` blocks as defined below.
         * 
         * @return builder
         * 
         */
        public Builder overrides(FrontdoorFirewallPolicyManagedRuleOverrideArgs... overrides) {
            return overrides(List.of(overrides));
        }

        /**
         * @param type The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
         * 
         * @return builder
         * 
         */
        public Builder type(Output<String> type) {
            $.type = type;
            return this;
        }

        /**
         * @param type The name of the managed rule to use with this resource. Possible values include `DefaultRuleSet`, `Microsoft_DefaultRuleSet`, `BotProtection` or `Microsoft_BotManagerRuleSet`.
         * 
         * @return builder
         * 
         */
        public Builder type(String type) {
            return type(Output.of(type));
        }

        /**
         * @param version The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
         * 
         * @return builder
         * 
         */
        public Builder version(Output<String> version) {
            $.version = version;
            return this;
        }

        /**
         * @param version The version of the managed rule to use with this resource. Possible values depends on which DRS type you are using, for the `DefaultRuleSet` type the possible values include `1.0` or `preview-0.1`. For `Microsoft_DefaultRuleSet` the possible values include `1.1`, `2.0` or `2.1`. For `BotProtection` the value must be `preview-0.1` and for `Microsoft_BotManagerRuleSet` the value must be `1.0`.
         * 
         * @return builder
         * 
         */
        public Builder version(String version) {
            return version(Output.of(version));
        }

        public FrontdoorFirewallPolicyManagedRuleArgs build() {
            $.action = Objects.requireNonNull($.action, "expected parameter 'action' to be non-null");
            $.type = Objects.requireNonNull($.type, "expected parameter 'type' to be non-null");
            $.version = Objects.requireNonNull($.version, "expected parameter 'version' to be non-null");
            return $;
        }
    }

}
