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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.network.FirewallPolicyArgs;
import com.pulumi.azure.network.inputs.FirewallPolicyState;
import com.pulumi.azure.network.outputs.FirewallPolicyDns;
import com.pulumi.azure.network.outputs.FirewallPolicyExplicitProxy;
import com.pulumi.azure.network.outputs.FirewallPolicyIdentity;
import com.pulumi.azure.network.outputs.FirewallPolicyInsights;
import com.pulumi.azure.network.outputs.FirewallPolicyIntrusionDetection;
import com.pulumi.azure.network.outputs.FirewallPolicyThreatIntelligenceAllowlist;
import com.pulumi.azure.network.outputs.FirewallPolicyTlsCertificate;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.Boolean;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Firewall Policy.
 * 
 * ## Example Usage
 * ```java
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.network.FirewallPolicy;
 * import com.pulumi.azure.network.FirewallPolicyArgs;
 * import java.util.List;
 * import java.util.ArrayList;
 * import java.util.Map;
 * import java.io.File;
 * import java.nio.file.Files;
 * import java.nio.file.Paths;
 * 
 * public class App {
 *     public static void main(String[] args) {
 *         Pulumi.run(App::stack);
 *     }
 * 
 *     public static void stack(Context ctx) {
 *         var exampleResourceGroup = new ResourceGroup(&#34;exampleResourceGroup&#34;, ResourceGroupArgs.builder()        
 *             .location(&#34;West Europe&#34;)
 *             .build());
 * 
 *         var exampleFirewallPolicy = new FirewallPolicy(&#34;exampleFirewallPolicy&#34;, FirewallPolicyArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Firewall Policies can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:network/firewallPolicy:FirewallPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.Network/firewallPolicies/policy1
 * ```
 * 
 */
@ResourceType(type="azure:network/firewallPolicy:FirewallPolicy")
public class FirewallPolicy extends com.pulumi.resources.CustomResource {
    /**
     * Whether enable auto learn private ip range.
     * 
     */
    @Export(name="autoLearnPrivateRangesEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> autoLearnPrivateRangesEnabled;

    /**
     * @return Whether enable auto learn private ip range.
     * 
     */
    public Output<Optional<Boolean>> autoLearnPrivateRangesEnabled() {
        return Codegen.optional(this.autoLearnPrivateRangesEnabled);
    }
    /**
     * The ID of the base Firewall Policy.
     * 
     */
    @Export(name="basePolicyId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> basePolicyId;

    /**
     * @return The ID of the base Firewall Policy.
     * 
     */
    public Output<Optional<String>> basePolicyId() {
        return Codegen.optional(this.basePolicyId);
    }
    /**
     * A list of reference to child Firewall Policies of this Firewall Policy.
     * 
     */
    @Export(name="childPolicies", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> childPolicies;

    /**
     * @return A list of reference to child Firewall Policies of this Firewall Policy.
     * 
     */
    public Output<List<String>> childPolicies() {
        return this.childPolicies;
    }
    /**
     * A `dns` block as defined below.
     * 
     */
    @Export(name="dns", refs={FirewallPolicyDns.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyDns> dns;

    /**
     * @return A `dns` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyDns>> dns() {
        return Codegen.optional(this.dns);
    }
    /**
     * A `explicit_proxy` block as defined below.
     * 
     */
    @Export(name="explicitProxy", refs={FirewallPolicyExplicitProxy.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyExplicitProxy> explicitProxy;

    /**
     * @return A `explicit_proxy` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyExplicitProxy>> explicitProxy() {
        return Codegen.optional(this.explicitProxy);
    }
    /**
     * A list of references to Azure Firewalls that this Firewall Policy is associated with.
     * 
     */
    @Export(name="firewalls", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> firewalls;

    /**
     * @return A list of references to Azure Firewalls that this Firewall Policy is associated with.
     * 
     */
    public Output<List<String>> firewalls() {
        return this.firewalls;
    }
    /**
     * An `identity` block as defined below.
     * 
     */
    @Export(name="identity", refs={FirewallPolicyIdentity.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyIdentity> identity;

    /**
     * @return An `identity` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyIdentity>> identity() {
        return Codegen.optional(this.identity);
    }
    /**
     * An `insights` block as defined below.
     * 
     */
    @Export(name="insights", refs={FirewallPolicyInsights.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyInsights> insights;

    /**
     * @return An `insights` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyInsights>> insights() {
        return Codegen.optional(this.insights);
    }
    /**
     * A `intrusion_detection` block as defined below.
     * 
     */
    @Export(name="intrusionDetection", refs={FirewallPolicyIntrusionDetection.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyIntrusionDetection> intrusionDetection;

    /**
     * @return A `intrusion_detection` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyIntrusionDetection>> intrusionDetection() {
        return Codegen.optional(this.intrusionDetection);
    }
    /**
     * The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created.
     * 
     */
    @Export(name="location", refs={String.class}, tree="[0]")
    private Output<String> location;

    /**
     * @return The Azure Region where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created.
     * 
     */
    public Output<String> location() {
        return this.location;
    }
    /**
     * The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this Firewall Policy. Changing this forces a new Firewall Policy to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * A list of private IP ranges to which traffic will not be SNAT.
     * 
     */
    @Export(name="privateIpRanges", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> privateIpRanges;

    /**
     * @return A list of private IP ranges to which traffic will not be SNAT.
     * 
     */
    public Output<Optional<List<String>>> privateIpRanges() {
        return Codegen.optional(this.privateIpRanges);
    }
    /**
     * The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created.
     * 
     */
    @Export(name="resourceGroupName", refs={String.class}, tree="[0]")
    private Output<String> resourceGroupName;

    /**
     * @return The name of the Resource Group where the Firewall Policy should exist. Changing this forces a new Firewall Policy to be created.
     * 
     */
    public Output<String> resourceGroupName() {
        return this.resourceGroupName;
    }
    /**
     * A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy.
     * 
     */
    @Export(name="ruleCollectionGroups", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> ruleCollectionGroups;

    /**
     * @return A list of references to Firewall Policy Rule Collection Groups that belongs to this Firewall Policy.
     * 
     */
    public Output<List<String>> ruleCollectionGroups() {
        return this.ruleCollectionGroups;
    }
    /**
     * The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Changing this forces a new Firewall Policy to be created.
     * 
     */
    @Export(name="sku", refs={String.class}, tree="[0]")
    private Output<String> sku;

    /**
     * @return The SKU Tier of the Firewall Policy. Possible values are `Standard`, `Premium` and `Basic`. Changing this forces a new Firewall Policy to be created.
     * 
     */
    public Output<String> sku() {
        return this.sku;
    }
    /**
     * Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`.
     * 
     */
    @Export(name="sqlRedirectAllowed", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> sqlRedirectAllowed;

    /**
     * @return Whether SQL Redirect traffic filtering is allowed. Enabling this flag requires no rule using ports between `11000`-`11999`.
     * 
     */
    public Output<Optional<Boolean>> sqlRedirectAllowed() {
        return Codegen.optional(this.sqlRedirectAllowed);
    }
    /**
     * A mapping of tags which should be assigned to the Firewall Policy.
     * 
     */
    @Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
    private Output</* @Nullable */ Map<String,String>> tags;

    /**
     * @return A mapping of tags which should be assigned to the Firewall Policy.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }
    /**
     * A `threat_intelligence_allowlist` block as defined below.
     * 
     */
    @Export(name="threatIntelligenceAllowlist", refs={FirewallPolicyThreatIntelligenceAllowlist.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyThreatIntelligenceAllowlist> threatIntelligenceAllowlist;

    /**
     * @return A `threat_intelligence_allowlist` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyThreatIntelligenceAllowlist>> threatIntelligenceAllowlist() {
        return Codegen.optional(this.threatIntelligenceAllowlist);
    }
    /**
     * The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`.
     * 
     */
    @Export(name="threatIntelligenceMode", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> threatIntelligenceMode;

    /**
     * @return The operation mode for Threat Intelligence. Possible values are `Alert`, `Deny` and `Off`. Defaults to `Alert`.
     * 
     */
    public Output<Optional<String>> threatIntelligenceMode() {
        return Codegen.optional(this.threatIntelligenceMode);
    }
    /**
     * A `tls_certificate` block as defined below.
     * 
     */
    @Export(name="tlsCertificate", refs={FirewallPolicyTlsCertificate.class}, tree="[0]")
    private Output</* @Nullable */ FirewallPolicyTlsCertificate> tlsCertificate;

    /**
     * @return A `tls_certificate` block as defined below.
     * 
     */
    public Output<Optional<FirewallPolicyTlsCertificate>> tlsCertificate() {
        return Codegen.optional(this.tlsCertificate);
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public FirewallPolicy(String name) {
        this(name, FirewallPolicyArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public FirewallPolicy(String name, FirewallPolicyArgs args) {
        this(name, args, null);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     * @param options A bag of options that control this resource's behavior.
     */
    public FirewallPolicy(String name, FirewallPolicyArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewallPolicy:FirewallPolicy", name, args == null ? FirewallPolicyArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private FirewallPolicy(String name, Output<String> id, @Nullable FirewallPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewallPolicy:FirewallPolicy", name, state, makeResourceOptions(options, id));
    }

    private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output<String> id) {
        var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder()
            .version(Utilities.getVersion())
            .build();
        return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id);
    }

    /**
     * Get an existing Host resource's state with the given name, ID, and optional extra
     * properties used to qualify the lookup.
     *
     * @param name The _unique_ name of the resulting resource.
     * @param id The _unique_ provider ID of the resource to lookup.
     * @param state
     * @param options Optional settings to control the behavior of the CustomResource.
     */
    public static FirewallPolicy get(String name, Output<String> id, @Nullable FirewallPolicyState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new FirewallPolicy(name, id, state, options);
    }
}
