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

import com.pulumi.azure.network.outputs.ApplicationGatewayWafConfigurationDisabledRuleGroup;
import com.pulumi.azure.network.outputs.ApplicationGatewayWafConfigurationExclusion;
import com.pulumi.core.annotations.CustomType;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.String;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.annotation.Nullable;

@CustomType
public final class ApplicationGatewayWafConfiguration {
    /**
     * @return one or more `disabled_rule_group` blocks as defined below.
     * 
     */
    private @Nullable List<ApplicationGatewayWafConfigurationDisabledRuleGroup> disabledRuleGroups;
    /**
     * @return Is the Web Application Firewall enabled?
     * 
     */
    private Boolean enabled;
    /**
     * @return one or more `exclusion` blocks as defined below.
     * 
     */
    private @Nullable List<ApplicationGatewayWafConfigurationExclusion> exclusions;
    /**
     * @return The File Upload Limit in MB. Accepted values are in the range `1`MB to `750`MB for the `WAF_v2` SKU, and `1`MB to `500`MB for all other SKUs. Defaults to `100`MB.
     * 
     */
    private @Nullable Integer fileUploadLimitMb;
    /**
     * @return The Web Application Firewall Mode. Possible values are `Detection` and `Prevention`.
     * 
     */
    private String firewallMode;
    /**
     * @return The Maximum Request Body Size in KB. Accepted values are in the range `1`KB to `128`KB. Defaults to `128`KB.
     * 
     */
    private @Nullable Integer maxRequestBodySizeKb;
    /**
     * @return Is Request Body Inspection enabled? Defaults to `true`.
     * 
     */
    private @Nullable Boolean requestBodyCheck;
    /**
     * @return The Type of the Rule Set used for this Web Application Firewall. Possible values are `OWASP` and `Microsoft_BotManagerRuleSet`.
     * 
     */
    private @Nullable String ruleSetType;
    /**
     * @return The Version of the Rule Set used for this Web Application Firewall. Possible values are `0.1`, `1.0`, `2.2.9`, `3.0`, `3.1` and `3.2`.
     * 
     */
    private String ruleSetVersion;

    private ApplicationGatewayWafConfiguration() {}
    /**
     * @return one or more `disabled_rule_group` blocks as defined below.
     * 
     */
    public List<ApplicationGatewayWafConfigurationDisabledRuleGroup> disabledRuleGroups() {
        return this.disabledRuleGroups == null ? List.of() : this.disabledRuleGroups;
    }
    /**
     * @return Is the Web Application Firewall enabled?
     * 
     */
    public Boolean enabled() {
        return this.enabled;
    }
    /**
     * @return one or more `exclusion` blocks as defined below.
     * 
     */
    public List<ApplicationGatewayWafConfigurationExclusion> exclusions() {
        return this.exclusions == null ? List.of() : this.exclusions;
    }
    /**
     * @return The File Upload Limit in MB. Accepted values are in the range `1`MB to `750`MB for the `WAF_v2` SKU, and `1`MB to `500`MB for all other SKUs. Defaults to `100`MB.
     * 
     */
    public Optional<Integer> fileUploadLimitMb() {
        return Optional.ofNullable(this.fileUploadLimitMb);
    }
    /**
     * @return The Web Application Firewall Mode. Possible values are `Detection` and `Prevention`.
     * 
     */
    public String firewallMode() {
        return this.firewallMode;
    }
    /**
     * @return The Maximum Request Body Size in KB. Accepted values are in the range `1`KB to `128`KB. Defaults to `128`KB.
     * 
     */
    public Optional<Integer> maxRequestBodySizeKb() {
        return Optional.ofNullable(this.maxRequestBodySizeKb);
    }
    /**
     * @return Is Request Body Inspection enabled? Defaults to `true`.
     * 
     */
    public Optional<Boolean> requestBodyCheck() {
        return Optional.ofNullable(this.requestBodyCheck);
    }
    /**
     * @return The Type of the Rule Set used for this Web Application Firewall. Possible values are `OWASP` and `Microsoft_BotManagerRuleSet`.
     * 
     */
    public Optional<String> ruleSetType() {
        return Optional.ofNullable(this.ruleSetType);
    }
    /**
     * @return The Version of the Rule Set used for this Web Application Firewall. Possible values are `0.1`, `1.0`, `2.2.9`, `3.0`, `3.1` and `3.2`.
     * 
     */
    public String ruleSetVersion() {
        return this.ruleSetVersion;
    }

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

    public static Builder builder(ApplicationGatewayWafConfiguration defaults) {
        return new Builder(defaults);
    }
    @CustomType.Builder
    public static final class Builder {
        private @Nullable List<ApplicationGatewayWafConfigurationDisabledRuleGroup> disabledRuleGroups;
        private Boolean enabled;
        private @Nullable List<ApplicationGatewayWafConfigurationExclusion> exclusions;
        private @Nullable Integer fileUploadLimitMb;
        private String firewallMode;
        private @Nullable Integer maxRequestBodySizeKb;
        private @Nullable Boolean requestBodyCheck;
        private @Nullable String ruleSetType;
        private String ruleSetVersion;
        public Builder() {}
        public Builder(ApplicationGatewayWafConfiguration defaults) {
    	      Objects.requireNonNull(defaults);
    	      this.disabledRuleGroups = defaults.disabledRuleGroups;
    	      this.enabled = defaults.enabled;
    	      this.exclusions = defaults.exclusions;
    	      this.fileUploadLimitMb = defaults.fileUploadLimitMb;
    	      this.firewallMode = defaults.firewallMode;
    	      this.maxRequestBodySizeKb = defaults.maxRequestBodySizeKb;
    	      this.requestBodyCheck = defaults.requestBodyCheck;
    	      this.ruleSetType = defaults.ruleSetType;
    	      this.ruleSetVersion = defaults.ruleSetVersion;
        }

        @CustomType.Setter
        public Builder disabledRuleGroups(@Nullable List<ApplicationGatewayWafConfigurationDisabledRuleGroup> disabledRuleGroups) {
            this.disabledRuleGroups = disabledRuleGroups;
            return this;
        }
        public Builder disabledRuleGroups(ApplicationGatewayWafConfigurationDisabledRuleGroup... disabledRuleGroups) {
            return disabledRuleGroups(List.of(disabledRuleGroups));
        }
        @CustomType.Setter
        public Builder enabled(Boolean enabled) {
            this.enabled = Objects.requireNonNull(enabled);
            return this;
        }
        @CustomType.Setter
        public Builder exclusions(@Nullable List<ApplicationGatewayWafConfigurationExclusion> exclusions) {
            this.exclusions = exclusions;
            return this;
        }
        public Builder exclusions(ApplicationGatewayWafConfigurationExclusion... exclusions) {
            return exclusions(List.of(exclusions));
        }
        @CustomType.Setter
        public Builder fileUploadLimitMb(@Nullable Integer fileUploadLimitMb) {
            this.fileUploadLimitMb = fileUploadLimitMb;
            return this;
        }
        @CustomType.Setter
        public Builder firewallMode(String firewallMode) {
            this.firewallMode = Objects.requireNonNull(firewallMode);
            return this;
        }
        @CustomType.Setter
        public Builder maxRequestBodySizeKb(@Nullable Integer maxRequestBodySizeKb) {
            this.maxRequestBodySizeKb = maxRequestBodySizeKb;
            return this;
        }
        @CustomType.Setter
        public Builder requestBodyCheck(@Nullable Boolean requestBodyCheck) {
            this.requestBodyCheck = requestBodyCheck;
            return this;
        }
        @CustomType.Setter
        public Builder ruleSetType(@Nullable String ruleSetType) {
            this.ruleSetType = ruleSetType;
            return this;
        }
        @CustomType.Setter
        public Builder ruleSetVersion(String ruleSetVersion) {
            this.ruleSetVersion = Objects.requireNonNull(ruleSetVersion);
            return this;
        }
        public ApplicationGatewayWafConfiguration build() {
            final var o = new ApplicationGatewayWafConfiguration();
            o.disabledRuleGroups = disabledRuleGroups;
            o.enabled = enabled;
            o.exclusions = exclusions;
            o.fileUploadLimitMb = fileUploadLimitMb;
            o.firewallMode = firewallMode;
            o.maxRequestBodySizeKb = maxRequestBodySizeKb;
            o.requestBodyCheck = requestBodyCheck;
            o.ruleSetType = ruleSetType;
            o.ruleSetVersion = ruleSetVersion;
            return o;
        }
    }
}
