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

import com.pulumi.azure.Utilities;
import com.pulumi.azure.paloalto.LocalRulestackRuleArgs;
import com.pulumi.azure.paloalto.inputs.LocalRulestackRuleState;
import com.pulumi.azure.paloalto.outputs.LocalRulestackRuleCategory;
import com.pulumi.azure.paloalto.outputs.LocalRulestackRuleDestination;
import com.pulumi.azure.paloalto.outputs.LocalRulestackRuleSource;
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.Integer;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;

/**
 * Manages a Palo Alto Local Rulestack Rule.
 * 
 * ## 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.paloalto.LocalRulestack;
 * import com.pulumi.azure.paloalto.LocalRulestackArgs;
 * import com.pulumi.azure.paloalto.LocalRulestackRule;
 * import com.pulumi.azure.paloalto.LocalRulestackRuleArgs;
 * import com.pulumi.azure.paloalto.inputs.LocalRulestackRuleSourceArgs;
 * import com.pulumi.azure.paloalto.inputs.LocalRulestackRuleDestinationArgs;
 * 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 exampleLocalRulestack = new LocalRulestack(&#34;exampleLocalRulestack&#34;, LocalRulestackArgs.builder()        
 *             .resourceGroupName(exampleResourceGroup.name())
 *             .location(exampleResourceGroup.location())
 *             .build());
 * 
 *         var exampleLocalRulestackRule = new LocalRulestackRule(&#34;exampleLocalRulestackRule&#34;, LocalRulestackRuleArgs.builder()        
 *             .rulestackId(exampleLocalRulestack.id())
 *             .priority(1000)
 *             .action(&#34;Allow&#34;)
 *             .applications(&#34;any&#34;)
 *             .source(LocalRulestackRuleSourceArgs.builder()
 *                 .cidrs(&#34;10.0.0.0/8&#34;)
 *                 .build())
 *             .destination(LocalRulestackRuleDestinationArgs.builder()
 *                 .cidrs(&#34;192.168.16.0/24&#34;)
 *                 .build())
 *             .build());
 * 
 *     }
 * }
 * ```
 * 
 * ## Import
 * 
 * Palo Alto Local Rulestack Rules can be imported using the `resource id`, e.g.
 * 
 * ```sh
 *  $ pulumi import azure:paloalto/localRulestackRule:LocalRulestackRule example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/PaloAltoNetworks.Cloudngfw/localRulestacks/myLocalRulestack/localRules/myRule1
 * ```
 * 
 */
@ResourceType(type="azure:paloalto/localRulestackRule:LocalRulestackRule")
public class LocalRulestackRule extends com.pulumi.resources.CustomResource {
    /**
     * The action to take on the rule being triggered.
     * 
     */
    @Export(name="action", refs={String.class}, tree="[0]")
    private Output<String> action;

    /**
     * @return The action to take on the rule being triggered.
     * 
     */
    public Output<String> action() {
        return this.action;
    }
    /**
     * Specifies a list of Applications.
     * 
     */
    @Export(name="applications", refs={List.class,String.class}, tree="[0,1]")
    private Output<List<String>> applications;

    /**
     * @return Specifies a list of Applications.
     * 
     */
    public Output<List<String>> applications() {
        return this.applications;
    }
    /**
     * The comment for Audit purposes.
     * 
     */
    @Export(name="auditComment", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> auditComment;

    /**
     * @return The comment for Audit purposes.
     * 
     */
    public Output<Optional<String>> auditComment() {
        return Codegen.optional(this.auditComment);
    }
    /**
     * A `category` block as defined below.
     * 
     */
    @Export(name="category", refs={LocalRulestackRuleCategory.class}, tree="[0]")
    private Output</* @Nullable */ LocalRulestackRuleCategory> category;

    /**
     * @return A `category` block as defined below.
     * 
     */
    public Output<Optional<LocalRulestackRuleCategory>> category() {
        return Codegen.optional(this.category);
    }
    /**
     * The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None` Defaults to `None`.
     * 
     */
    @Export(name="decryptionRuleType", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> decryptionRuleType;

    /**
     * @return The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None` Defaults to `None`.
     * 
     */
    public Output<Optional<String>> decryptionRuleType() {
        return Codegen.optional(this.decryptionRuleType);
    }
    /**
     * The description for the rule.
     * 
     */
    @Export(name="description", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> description;

    /**
     * @return The description for the rule.
     * 
     */
    public Output<Optional<String>> description() {
        return Codegen.optional(this.description);
    }
    /**
     * One or more `destination` blocks as defined below.
     * 
     */
    @Export(name="destination", refs={LocalRulestackRuleDestination.class}, tree="[0]")
    private Output<LocalRulestackRuleDestination> destination;

    /**
     * @return One or more `destination` blocks as defined below.
     * 
     */
    public Output<LocalRulestackRuleDestination> destination() {
        return this.destination;
    }
    /**
     * Should this Rule be enabled? Defaults to `true`.
     * 
     */
    @Export(name="enabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> enabled;

    /**
     * @return Should this Rule be enabled? Defaults to `true`.
     * 
     */
    public Output<Optional<Boolean>> enabled() {
        return Codegen.optional(this.enabled);
    }
    /**
     * The ID of the certificate for inbound inspection. Only valid when `decryption_rule_type` is set to `SSLInboundInspection`.
     * 
     */
    @Export(name="inspectionCertificateId", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> inspectionCertificateId;

    /**
     * @return The ID of the certificate for inbound inspection. Only valid when `decryption_rule_type` is set to `SSLInboundInspection`.
     * 
     */
    public Output<Optional<String>> inspectionCertificateId() {
        return Codegen.optional(this.inspectionCertificateId);
    }
    /**
     * Should Logging be enabled? Defaults to `false`.
     * 
     */
    @Export(name="loggingEnabled", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> loggingEnabled;

    /**
     * @return Should Logging be enabled? Defaults to `false`.
     * 
     */
    public Output<Optional<Boolean>> loggingEnabled() {
        return Codegen.optional(this.loggingEnabled);
    }
    /**
     * The name which should be used for this Palo Alto Local Rulestack Rule.
     * 
     */
    @Export(name="name", refs={String.class}, tree="[0]")
    private Output<String> name;

    /**
     * @return The name which should be used for this Palo Alto Local Rulestack Rule.
     * 
     */
    public Output<String> name() {
        return this.name;
    }
    /**
     * Should the inverse of the Destination configuration be used. Defaults to `false`.
     * 
     */
    @Export(name="negateDestination", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> negateDestination;

    /**
     * @return Should the inverse of the Destination configuration be used. Defaults to `false`.
     * 
     */
    public Output<Optional<Boolean>> negateDestination() {
        return Codegen.optional(this.negateDestination);
    }
    /**
     * Should the inverse of the Source configuration be used. Defaults to `false`.
     * 
     */
    @Export(name="negateSource", refs={Boolean.class}, tree="[0]")
    private Output</* @Nullable */ Boolean> negateSource;

    /**
     * @return Should the inverse of the Source configuration be used. Defaults to `false`.
     * 
     */
    public Output<Optional<Boolean>> negateSource() {
        return Codegen.optional(this.negateSource);
    }
    /**
     * The Priority of this rule. Rules are executed in numerical order. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * 
     * &gt; **NOTE:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
     * 
     */
    @Export(name="priority", refs={Integer.class}, tree="[0]")
    private Output<Integer> priority;

    /**
     * @return The Priority of this rule. Rules are executed in numerical order. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * 
     * &gt; **NOTE:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
     * 
     */
    public Output<Integer> priority() {
        return this.priority;
    }
    /**
     * The Protocol and port to use in the form `[protocol]:[port_number]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocol_ports`. Defaults to `application-default`.
     * 
     */
    @Export(name="protocol", refs={String.class}, tree="[0]")
    private Output</* @Nullable */ String> protocol;

    /**
     * @return The Protocol and port to use in the form `[protocol]:[port_number]` e.g. `TCP:8080` or `UDP:53`. Conflicts with `protocol_ports`. Defaults to `application-default`.
     * 
     */
    public Output<Optional<String>> protocol() {
        return Codegen.optional(this.protocol);
    }
    /**
     * Specifies a list of Protocol:Port entries. E.g. `[ &#34;TCP:80&#34;, &#34;UDP:5431&#34; ]`. Conflicts with `protocol`.
     * 
     */
    @Export(name="protocolPorts", refs={List.class,String.class}, tree="[0,1]")
    private Output</* @Nullable */ List<String>> protocolPorts;

    /**
     * @return Specifies a list of Protocol:Port entries. E.g. `[ &#34;TCP:80&#34;, &#34;UDP:5431&#34; ]`. Conflicts with `protocol`.
     * 
     */
    public Output<Optional<List<String>>> protocolPorts() {
        return Codegen.optional(this.protocolPorts);
    }
    /**
     * The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * 
     */
    @Export(name="rulestackId", refs={String.class}, tree="[0]")
    private Output<String> rulestackId;

    /**
     * @return The ID of the Local Rulestack in which to create this Rule. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * 
     */
    public Output<String> rulestackId() {
        return this.rulestackId;
    }
    /**
     * One or more `source` blocks as defined below.
     * 
     */
    @Export(name="source", refs={LocalRulestackRuleSource.class}, tree="[0]")
    private Output<LocalRulestackRuleSource> source;

    /**
     * @return One or more `source` blocks as defined below.
     * 
     */
    public Output<LocalRulestackRuleSource> source() {
        return this.source;
    }
    /**
     * A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
     * 
     */
    @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 Palo Alto Local Rulestack Rule.
     * 
     */
    public Output<Optional<Map<String,String>>> tags() {
        return Codegen.optional(this.tags);
    }

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

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