All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.paloalto.kotlin.LocalRulestackRuleArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.paloalto.kotlin

import com.pulumi.azure.paloalto.LocalRulestackRuleArgs.builder
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleCategoryArgs
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleCategoryArgsBuilder
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleDestinationArgs
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleDestinationArgsBuilder
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleSourceArgs
import com.pulumi.azure.paloalto.kotlin.inputs.LocalRulestackRuleSourceArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Manages a Palo Alto Local Rulestack Rule.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "rg-example",
 *     location: "West Europe",
 * });
 * const exampleLocalRulestack = new azure.paloalto.LocalRulestack("example", {
 *     name: "lrs-example",
 *     resourceGroupName: example.name,
 *     location: example.location,
 * });
 * const exampleLocalRulestackRule = new azure.paloalto.LocalRulestackRule("example", {
 *     name: "example-rule",
 *     rulestackId: exampleLocalRulestack.id,
 *     priority: 1000,
 *     action: "Allow",
 *     protocol: "application-default",
 *     applications: ["any"],
 *     source: {
 *         cidrs: ["10.0.0.0/8"],
 *     },
 *     destination: {
 *         cidrs: ["192.168.16.0/24"],
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="rg-example",
 *     location="West Europe")
 * example_local_rulestack = azure.paloalto.LocalRulestack("example",
 *     name="lrs-example",
 *     resource_group_name=example.name,
 *     location=example.location)
 * example_local_rulestack_rule = azure.paloalto.LocalRulestackRule("example",
 *     name="example-rule",
 *     rulestack_id=example_local_rulestack.id,
 *     priority=1000,
 *     action="Allow",
 *     protocol="application-default",
 *     applications=["any"],
 *     source={
 *         "cidrs": ["10.0.0.0/8"],
 *     },
 *     destination={
 *         "cidrs": ["192.168.16.0/24"],
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "rg-example",
 *         Location = "West Europe",
 *     });
 *     var exampleLocalRulestack = new Azure.PaloAlto.LocalRulestack("example", new()
 *     {
 *         Name = "lrs-example",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *     });
 *     var exampleLocalRulestackRule = new Azure.PaloAlto.LocalRulestackRule("example", new()
 *     {
 *         Name = "example-rule",
 *         RulestackId = exampleLocalRulestack.Id,
 *         Priority = 1000,
 *         Action = "Allow",
 *         Protocol = "application-default",
 *         Applications = new[]
 *         {
 *             "any",
 *         },
 *         Source = new Azure.PaloAlto.Inputs.LocalRulestackRuleSourceArgs
 *         {
 *             Cidrs = new[]
 *             {
 *                 "10.0.0.0/8",
 *             },
 *         },
 *         Destination = new Azure.PaloAlto.Inputs.LocalRulestackRuleDestinationArgs
 *         {
 *             Cidrs = new[]
 *             {
 *                 "192.168.16.0/24",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/paloalto"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("rg-example"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleLocalRulestack, err := paloalto.NewLocalRulestack(ctx, "example", &paloalto.LocalRulestackArgs{
 * 			Name:              pulumi.String("lrs-example"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = paloalto.NewLocalRulestackRule(ctx, "example", &paloalto.LocalRulestackRuleArgs{
 * 			Name:        pulumi.String("example-rule"),
 * 			RulestackId: exampleLocalRulestack.ID(),
 * 			Priority:    pulumi.Int(1000),
 * 			Action:      pulumi.String("Allow"),
 * 			Protocol:    pulumi.String("application-default"),
 * 			Applications: pulumi.StringArray{
 * 				pulumi.String("any"),
 * 			},
 * 			Source: &paloalto.LocalRulestackRuleSourceArgs{
 * 				Cidrs: pulumi.StringArray{
 * 					pulumi.String("10.0.0.0/8"),
 * 				},
 * 			},
 * 			Destination: &paloalto.LocalRulestackRuleDestinationArgs{
 * 				Cidrs: pulumi.StringArray{
 * 					pulumi.String("192.168.16.0/24"),
 * 				},
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("rg-example")
 *             .location("West Europe")
 *             .build());
 *         var exampleLocalRulestack = new LocalRulestack("exampleLocalRulestack", LocalRulestackArgs.builder()
 *             .name("lrs-example")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .build());
 *         var exampleLocalRulestackRule = new LocalRulestackRule("exampleLocalRulestackRule", LocalRulestackRuleArgs.builder()
 *             .name("example-rule")
 *             .rulestackId(exampleLocalRulestack.id())
 *             .priority(1000)
 *             .action("Allow")
 *             .protocol("application-default")
 *             .applications("any")
 *             .source(LocalRulestackRuleSourceArgs.builder()
 *                 .cidrs("10.0.0.0/8")
 *                 .build())
 *             .destination(LocalRulestackRuleDestinationArgs.builder()
 *                 .cidrs("192.168.16.0/24")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: rg-example
 *       location: West Europe
 *   exampleLocalRulestack:
 *     type: azure:paloalto:LocalRulestack
 *     name: example
 *     properties:
 *       name: lrs-example
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *   exampleLocalRulestackRule:
 *     type: azure:paloalto:LocalRulestackRule
 *     name: example
 *     properties:
 *       name: example-rule
 *       rulestackId: ${exampleLocalRulestack.id}
 *       priority: 1000
 *       action: Allow
 *       protocol: application-default
 *       applications:
 *         - any
 *       source:
 *         cidrs:
 *           - 10.0.0.0/8
 *       destination:
 *         cidrs:
 *           - 192.168.16.0/24
 * ```
 * 
 * ## 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
 * ```
 * @property action The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
 * @property applications Specifies a list of Applications.
 * @property auditComment The comment for Audit purposes.
 * @property category A `category` block as defined below.
 * @property decryptionRuleType The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
 * @property description The description for the rule.
 * @property destination One or more `destination` blocks as defined below.
 * @property enabled Should this Rule be enabled? Defaults to `true`.
 * @property inspectionCertificateId The ID of the certificate for inbound inspection. Only valid when `decryption_rule_type` is set to `SSLInboundInspection`.
 * @property loggingEnabled Should Logging be enabled? Defaults to `false`.
 * @property name The name which should be used for this Palo Alto Local Rulestack Rule.
 * @property negateDestination Should the inverse of the Destination configuration be used. Defaults to `false`.
 * @property negateSource Should the inverse of the Source configuration be used. Defaults to `false`.
 * @property priority The Priority of this rule. Rules are executed in numerical order. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
 * > **NOTE:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
 * @property protocol 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`.
 * > **NOTE** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocol_ports` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
 * @property protocolPorts Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
 * @property rulestackId 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.
 * @property source One or more `source` blocks as defined below.
 * @property tags A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
 */
public data class LocalRulestackRuleArgs(
    public val action: Output? = null,
    public val applications: Output>? = null,
    public val auditComment: Output? = null,
    public val category: Output? = null,
    public val decryptionRuleType: Output? = null,
    public val description: Output? = null,
    public val destination: Output? = null,
    public val enabled: Output? = null,
    public val inspectionCertificateId: Output? = null,
    public val loggingEnabled: Output? = null,
    public val name: Output? = null,
    public val negateDestination: Output? = null,
    public val negateSource: Output? = null,
    public val priority: Output? = null,
    public val protocol: Output? = null,
    public val protocolPorts: Output>? = null,
    public val rulestackId: Output? = null,
    public val source: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.paloalto.LocalRulestackRuleArgs =
        com.pulumi.azure.paloalto.LocalRulestackRuleArgs.builder()
            .action(action?.applyValue({ args0 -> args0 }))
            .applications(applications?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .auditComment(auditComment?.applyValue({ args0 -> args0 }))
            .category(category?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .decryptionRuleType(decryptionRuleType?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .destination(destination?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enabled(enabled?.applyValue({ args0 -> args0 }))
            .inspectionCertificateId(inspectionCertificateId?.applyValue({ args0 -> args0 }))
            .loggingEnabled(loggingEnabled?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .negateDestination(negateDestination?.applyValue({ args0 -> args0 }))
            .negateSource(negateSource?.applyValue({ args0 -> args0 }))
            .priority(priority?.applyValue({ args0 -> args0 }))
            .protocol(protocol?.applyValue({ args0 -> args0 }))
            .protocolPorts(protocolPorts?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .rulestackId(rulestackId?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [LocalRulestackRuleArgs].
 */
@PulumiTagMarker
public class LocalRulestackRuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var applications: Output>? = null

    private var auditComment: Output? = null

    private var category: Output? = null

    private var decryptionRuleType: Output? = null

    private var description: Output? = null

    private var destination: Output? = null

    private var enabled: Output? = null

    private var inspectionCertificateId: Output? = null

    private var loggingEnabled: Output? = null

    private var name: Output? = null

    private var negateDestination: Output? = null

    private var negateSource: Output? = null

    private var priority: Output? = null

    private var protocol: Output? = null

    private var protocolPorts: Output>? = null

    private var rulestackId: Output? = null

    private var source: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
     */
    @JvmName("innddbvgygrvuuhq")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value Specifies a list of Applications.
     */
    @JvmName("kjamtbtkxjtfcvnj")
    public suspend fun applications(`value`: Output>) {
        this.applications = value
    }

    @JvmName("hfjalqeqtenwwicb")
    public suspend fun applications(vararg values: Output) {
        this.applications = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of Applications.
     */
    @JvmName("iewseogxyxcrekyv")
    public suspend fun applications(values: List>) {
        this.applications = Output.all(values)
    }

    /**
     * @param value The comment for Audit purposes.
     */
    @JvmName("ffryespxgwvlfdvq")
    public suspend fun auditComment(`value`: Output) {
        this.auditComment = value
    }

    /**
     * @param value A `category` block as defined below.
     */
    @JvmName("kloagebepxpvjsty")
    public suspend fun category(`value`: Output) {
        this.category = value
    }

    /**
     * @param value The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
     */
    @JvmName("wuekosgfldjbenxg")
    public suspend fun decryptionRuleType(`value`: Output) {
        this.decryptionRuleType = value
    }

    /**
     * @param value The description for the rule.
     */
    @JvmName("xxwaptinyikpvsxt")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value One or more `destination` blocks as defined below.
     */
    @JvmName("dymognimbkiekwhy")
    public suspend fun destination(`value`: Output) {
        this.destination = value
    }

    /**
     * @param value Should this Rule be enabled? Defaults to `true`.
     */
    @JvmName("kbdtcucvljedyfys")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The ID of the certificate for inbound inspection. Only valid when `decryption_rule_type` is set to `SSLInboundInspection`.
     */
    @JvmName("vsonwkcclmjvoqct")
    public suspend fun inspectionCertificateId(`value`: Output) {
        this.inspectionCertificateId = value
    }

    /**
     * @param value Should Logging be enabled? Defaults to `false`.
     */
    @JvmName("unjodcdustxplshq")
    public suspend fun loggingEnabled(`value`: Output) {
        this.loggingEnabled = value
    }

    /**
     * @param value The name which should be used for this Palo Alto Local Rulestack Rule.
     */
    @JvmName("litgdhgnvkmtasbc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Should the inverse of the Destination configuration be used. Defaults to `false`.
     */
    @JvmName("kwvgrwpnivohdeus")
    public suspend fun negateDestination(`value`: Output) {
        this.negateDestination = value
    }

    /**
     * @param value Should the inverse of the Source configuration be used. Defaults to `false`.
     */
    @JvmName("nfxjuxwgslvunmdn")
    public suspend fun negateSource(`value`: Output) {
        this.negateSource = value
    }

    /**
     * @param value The Priority of this rule. Rules are executed in numerical order. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * > **NOTE:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
     */
    @JvmName("qmsnfuwbudacwvts")
    public suspend fun priority(`value`: Output) {
        this.priority = value
    }

    /**
     * @param value 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`.
     * > **NOTE** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocol_ports` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
     */
    @JvmName("qasqavlpnjoybter")
    public suspend fun protocol(`value`: Output) {
        this.protocol = value
    }

    /**
     * @param value Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
     */
    @JvmName("mfbwwosichgdvavu")
    public suspend fun protocolPorts(`value`: Output>) {
        this.protocolPorts = value
    }

    @JvmName("upsfdlfquoqmyknt")
    public suspend fun protocolPorts(vararg values: Output) {
        this.protocolPorts = Output.all(values.asList())
    }

    /**
     * @param values Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
     */
    @JvmName("hiyldifghlfwvmdl")
    public suspend fun protocolPorts(values: List>) {
        this.protocolPorts = Output.all(values)
    }

    /**
     * @param value 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.
     */
    @JvmName("vmnuqdyimnctomty")
    public suspend fun rulestackId(`value`: Output) {
        this.rulestackId = value
    }

    /**
     * @param value One or more `source` blocks as defined below.
     */
    @JvmName("ckipoqnawvxlfdys")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
     */
    @JvmName("vptidlktlwfnptiu")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The action to take on the rule being triggered. Possible values are `Allow`, `DenyResetBoth`, `DenyResetServer` and `DenySilent`.
     */
    @JvmName("omhkiqgjtawhsvkh")
    public suspend fun action(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param value Specifies a list of Applications.
     */
    @JvmName("ehnlucvfgswbfnfd")
    public suspend fun applications(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.applications = mapped
    }

    /**
     * @param values Specifies a list of Applications.
     */
    @JvmName("xfjmsllsquvhcntt")
    public suspend fun applications(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.applications = mapped
    }

    /**
     * @param value The comment for Audit purposes.
     */
    @JvmName("hohaeoqftygfggmb")
    public suspend fun auditComment(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.auditComment = mapped
    }

    /**
     * @param value A `category` block as defined below.
     */
    @JvmName("wdmicnmyvrelyceb")
    public suspend fun category(`value`: LocalRulestackRuleCategoryArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.category = mapped
    }

    /**
     * @param argument A `category` block as defined below.
     */
    @JvmName("saoiddotfwdhnbsk")
    public suspend fun category(argument: suspend LocalRulestackRuleCategoryArgsBuilder.() -> Unit) {
        val toBeMapped = LocalRulestackRuleCategoryArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.category = mapped
    }

    /**
     * @param value The type of Decryption to perform on the rule. Possible values include `SSLInboundInspection`, `SSLOutboundInspection`, and `None`. Defaults to `None`.
     */
    @JvmName("punormtqoekkhbrj")
    public suspend fun decryptionRuleType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.decryptionRuleType = mapped
    }

    /**
     * @param value The description for the rule.
     */
    @JvmName("sbjxbcwkbtbxfwsp")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value One or more `destination` blocks as defined below.
     */
    @JvmName("mfwbjvgptrgwijgf")
    public suspend fun destination(`value`: LocalRulestackRuleDestinationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destination = mapped
    }

    /**
     * @param argument One or more `destination` blocks as defined below.
     */
    @JvmName("itvldoycjfhksfmg")
    public suspend fun destination(argument: suspend LocalRulestackRuleDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = LocalRulestackRuleDestinationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.destination = mapped
    }

    /**
     * @param value Should this Rule be enabled? Defaults to `true`.
     */
    @JvmName("bgfiahlrgsjtompb")
    public suspend fun enabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The ID of the certificate for inbound inspection. Only valid when `decryption_rule_type` is set to `SSLInboundInspection`.
     */
    @JvmName("ikxwqwbeaqvsskhm")
    public suspend fun inspectionCertificateId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inspectionCertificateId = mapped
    }

    /**
     * @param value Should Logging be enabled? Defaults to `false`.
     */
    @JvmName("kniobojiigunyrpj")
    public suspend fun loggingEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loggingEnabled = mapped
    }

    /**
     * @param value The name which should be used for this Palo Alto Local Rulestack Rule.
     */
    @JvmName("jbyexneervujeuvt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Should the inverse of the Destination configuration be used. Defaults to `false`.
     */
    @JvmName("ijnlbflxmegndxaj")
    public suspend fun negateDestination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.negateDestination = mapped
    }

    /**
     * @param value Should the inverse of the Source configuration be used. Defaults to `false`.
     */
    @JvmName("cswcbywqabnkgorj")
    public suspend fun negateSource(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.negateSource = mapped
    }

    /**
     * @param value The Priority of this rule. Rules are executed in numerical order. Changing this forces a new Palo Alto Local Rulestack Rule to be created.
     * > **NOTE:** This is the primary identifier of a rule, as such it is not possible to change the Priority of a rule once created.
     */
    @JvmName("xemedlcuywouhqga")
    public suspend fun priority(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.priority = mapped
    }

    /**
     * @param value 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`.
     * > **NOTE** In 4.0 or later versions, the default of `protocol` will no longer be set by provider, exactly one of `protocol` and `protocol_ports` must be specified. You need to explicitly specify `protocol="application-default"` to keep the the current default of the `protocol`.
     */
    @JvmName("pahahvwlrdxvfkws")
    public suspend fun protocol(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
     */
    @JvmName("dphrjpcgkoingvks")
    public suspend fun protocolPorts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocolPorts = mapped
    }

    /**
     * @param values Specifies a list of Protocol:Port entries. E.g. `[ "TCP:80", "UDP:5431" ]`. Conflicts with `protocol`.
     */
    @JvmName("ungnckxiieblnoac")
    public suspend fun protocolPorts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocolPorts = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("dpcqjsinnxdnndux")
    public suspend fun rulestackId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rulestackId = mapped
    }

    /**
     * @param value One or more `source` blocks as defined below.
     */
    @JvmName("fcuhyowyotbtsopp")
    public suspend fun source(`value`: LocalRulestackRuleSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param argument One or more `source` blocks as defined below.
     */
    @JvmName("ugjcdihtcuyuuygj")
    public suspend fun source(argument: suspend LocalRulestackRuleSourceArgsBuilder.() -> Unit) {
        val toBeMapped = LocalRulestackRuleSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.source = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
     */
    @JvmName("bynbrjayoupltkxm")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Palo Alto Local Rulestack Rule.
     */
    @JvmName("chwbsghllvndfhet")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): LocalRulestackRuleArgs = LocalRulestackRuleArgs(
        action = action,
        applications = applications,
        auditComment = auditComment,
        category = category,
        decryptionRuleType = decryptionRuleType,
        description = description,
        destination = destination,
        enabled = enabled,
        inspectionCertificateId = inspectionCertificateId,
        loggingEnabled = loggingEnabled,
        name = name,
        negateDestination = negateDestination,
        negateSource = negateSource,
        priority = priority,
        protocol = protocol,
        protocolPorts = protocolPorts,
        rulestackId = rulestackId,
        source = source,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy