// *** 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.FirewallPolicyRuleCollectionGroupArgs;
import com.pulumi.azure.network.inputs.FirewallPolicyRuleCollectionGroupState;
import com.pulumi.azure.network.outputs.FirewallPolicyRuleCollectionGroupApplicationRuleCollection;
import com.pulumi.azure.network.outputs.FirewallPolicyRuleCollectionGroupNatRuleCollection;
import com.pulumi.azure.network.outputs.FirewallPolicyRuleCollectionGroupNetworkRuleCollection;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Firewall Policy Rule Collection Group.
 * 
 * ## 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 com.pulumi.azure.network.FirewallPolicyRuleCollectionGroup;
 * import com.pulumi.azure.network.FirewallPolicyRuleCollectionGroupArgs;
 * import com.pulumi.azure.network.inputs.FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs;
 * import com.pulumi.azure.network.inputs.FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs;
 * import com.pulumi.azure.network.inputs.FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs;
 * 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());
 * 
 *         var exampleFirewallPolicyRuleCollectionGroup = new FirewallPolicyRuleCollectionGroup(&#34;exampleFirewallPolicyRuleCollectionGroup&#34;, FirewallPolicyRuleCollectionGroupArgs.builder()        
 *             .firewallPolicyId(exampleFirewallPolicy.id())
 *             .priority(500)
 *             .applicationRuleCollections(FirewallPolicyRuleCollectionGroupApplicationRuleCollectionArgs.builder()
 *                 .name(&#34;app_rule_collection1&#34;)
 *                 .priority(500)
 *                 .action(&#34;Deny&#34;)
 *                 .rules(FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleArgs.builder()
 *                     .name(&#34;app_rule_collection1_rule1&#34;)
 *                     .protocols(                    
 *                         FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs.builder()
 *                             .type(&#34;Http&#34;)
 *                             .port(80)
 *                             .build(),
 *                         FirewallPolicyRuleCollectionGroupApplicationRuleCollectionRuleProtocolArgs.builder()
 *                             .type(&#34;Https&#34;)
 *                             .port(443)
 *                             .build())
 *                     .sourceAddresses(&#34;10.0.0.1&#34;)
 *                     .destinationFqdns(&#34;*.microsoft.com&#34;)
 *                     .build())
 *                 .build())
 *             .networkRuleCollections(FirewallPolicyRuleCollectionGroupNetworkRuleCollectionArgs.builder()
 *                 .name(&#34;network_rule_collection1&#34;)
 *                 .priority(400)
 *                 .action(&#34;Deny&#34;)
 *                 .rules(FirewallPolicyRuleCollectionGroupNetworkRuleCollectionRuleArgs.builder()
 *                     .name(&#34;network_rule_collection1_rule1&#34;)
 *                     .protocols(                    
 *                         &#34;TCP&#34;,
 *                         &#34;UDP&#34;)
 *                     .sourceAddresses(&#34;10.0.0.1&#34;)
 *                     .destinationAddresses(                    
 *                         &#34;192.168.1.1&#34;,
 *                         &#34;192.168.1.2&#34;)
 *                     .destinationPorts(                    
 *                         &#34;80&#34;,
 *                         &#34;1000-2000&#34;)
 *                     .build())
 *                 .build())
 *             .natRuleCollections(FirewallPolicyRuleCollectionGroupNatRuleCollectionArgs.builder()
 *                 .name(&#34;nat_rule_collection1&#34;)
 *                 .priority(300)
 *                 .action(&#34;Dnat&#34;)
 *                 .rules(FirewallPolicyRuleCollectionGroupNatRuleCollectionRuleArgs.builder()
 *                     .name(&#34;nat_rule_collection1_rule1&#34;)
 *                     .protocols(                    
 *                         &#34;TCP&#34;,
 *                         &#34;UDP&#34;)
 *                     .sourceAddresses(                    
 *                         &#34;10.0.0.1&#34;,
 *                         &#34;10.0.0.2&#34;)
 *                     .destinationAddress(&#34;192.168.1.1&#34;)
 *                     .destinationPorts(&#34;80&#34;)
 *                     .translatedAddress(&#34;192.168.0.1&#34;)
 *                     .translatedPort(&#34;8080&#34;)
 *                     .build())
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Firewall Policy Rule Collection Groups can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Network/firewallPolicies/policy1/ruleCollectionGroups/gruop1
 * ```
 * 
 */
@ResourceType(type="azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup")
public class FirewallPolicyRuleCollectionGroup extends com.pulumi.resources.CustomResource {
    /**
     * One or more `application_rule_collection` blocks as defined below.
     * 
     */
    @Export(name="applicationRuleCollections", refs={List.class,FirewallPolicyRuleCollectionGroupApplicationRuleCollection.class}, tree="[0,1]")
    private Output</* @Nullable */ List<FirewallPolicyRuleCollectionGroupApplicationRuleCollection>> applicationRuleCollections;

    /**
     * @return One or more `application_rule_collection` blocks as defined below.
     * 
     */
    public Output<Optional<List<FirewallPolicyRuleCollectionGroupApplicationRuleCollection>>> applicationRuleCollections() {
        return Codegen.optional(this.applicationRuleCollections);
    }
    /**
     * The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created.
     * 
     */
    @Export(name="firewallPolicyId", refs={String.class}, tree="[0]")
    private Output<String> firewallPolicyId;

    /**
     * @return The ID of the Firewall Policy where the Firewall Policy Rule Collection Group should exist. Changing this forces a new Firewall Policy Rule Collection Group to be created.
     * 
     */
    public Output<String> firewallPolicyId() {
        return this.firewallPolicyId;
    }
    /**
     * The name which should be used for this Firewall Policy Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group 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 Rule Collection Group. Changing this forces a new Firewall Policy Rule Collection Group to be created.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * One or more `nat_rule_collection` blocks as defined below.
     * 
     */
    @Export(name="natRuleCollections", refs={List.class,FirewallPolicyRuleCollectionGroupNatRuleCollection.class}, tree="[0,1]")
    private Output</* @Nullable */ List<FirewallPolicyRuleCollectionGroupNatRuleCollection>> natRuleCollections;

    /**
     * @return One or more `nat_rule_collection` blocks as defined below.
     * 
     */
    public Output<Optional<List<FirewallPolicyRuleCollectionGroupNatRuleCollection>>> natRuleCollections() {
        return Codegen.optional(this.natRuleCollections);
    }
    /**
     * One or more `network_rule_collection` blocks as defined below.
     * 
     */
    @Export(name="networkRuleCollections", refs={List.class,FirewallPolicyRuleCollectionGroupNetworkRuleCollection.class}, tree="[0,1]")
    private Output</* @Nullable */ List<FirewallPolicyRuleCollectionGroupNetworkRuleCollection>> networkRuleCollections;

    /**
     * @return One or more `network_rule_collection` blocks as defined below.
     * 
     */
    public Output<Optional<List<FirewallPolicyRuleCollectionGroupNetworkRuleCollection>>> networkRuleCollections() {
        return Codegen.optional(this.networkRuleCollections);
    }
    /**
     * The priority of the Firewall Policy Rule Collection Group. The range is 100-65000.
     * 
     */
    @Export(name="priority", refs={Integer.class}, tree="[0]")
    private Output<Integer> priority;

    /**
     * @return The priority of the Firewall Policy Rule Collection Group. The range is 100-65000.
     * 
     */
    public Output<Integer> priority() {
        return this.priority;
    }

    /**
     *
     * @param name The _unique_ name of the resulting resource.
     */
    public FirewallPolicyRuleCollectionGroup(String name) {
        this(name, FirewallPolicyRuleCollectionGroupArgs.Empty);
    }
    /**
     *
     * @param name The _unique_ name of the resulting resource.
     * @param args The arguments to use to populate this resource's properties.
     */
    public FirewallPolicyRuleCollectionGroup(String name, FirewallPolicyRuleCollectionGroupArgs 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 FirewallPolicyRuleCollectionGroup(String name, FirewallPolicyRuleCollectionGroupArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup", name, args == null ? FirewallPolicyRuleCollectionGroupArgs.Empty : args, makeResourceOptions(options, Codegen.empty()));
    }

    private FirewallPolicyRuleCollectionGroup(String name, Output<String> id, @Nullable FirewallPolicyRuleCollectionGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        super("azure:network/firewallPolicyRuleCollectionGroup:FirewallPolicyRuleCollectionGroup", 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 FirewallPolicyRuleCollectionGroup get(String name, Output<String> id, @Nullable FirewallPolicyRuleCollectionGroupState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
        return new FirewallPolicyRuleCollectionGroup(name, id, state, options);
    }
}
