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

com.pulumi.gcp.iam.kotlin.FoldersPolicyBindingArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.iam.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.iam.FoldersPolicyBindingArgs.builder
import com.pulumi.gcp.iam.kotlin.inputs.FoldersPolicyBindingConditionArgs
import com.pulumi.gcp.iam.kotlin.inputs.FoldersPolicyBindingConditionArgsBuilder
import com.pulumi.gcp.iam.kotlin.inputs.FoldersPolicyBindingTargetArgs
import com.pulumi.gcp.iam.kotlin.inputs.FoldersPolicyBindingTargetArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A policy binding to a folder
 * To get more information about FoldersPolicyBinding, see:
 * * [API documentation](https://cloud.google.com/iam/docs/reference/rest/v3/folders.locations.policyBindings)
 * * How-to Guides
 *     * [Apply a policy binding](https://cloud.google.com/iam/docs/principal-access-boundary-policies-create#create_binding)
 * ## Example Usage
 * ### Iam Folders Policy Binding
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * import * as time from "@pulumi/time";
 * const pabPolicy = new gcp.iam.PrincipalAccessBoundaryPolicy("pab_policy", {
 *     organization: "123456789",
 *     location: "global",
 *     displayName: "test folder binding",
 *     principalAccessBoundaryPolicyId: "my-pab-policy",
 * });
 * const folder = new gcp.organizations.Folder("folder", {
 *     displayName: "test folder",
 *     parent: "organizations/123456789",
 *     deletionProtection: false,
 * });
 * const wait120s = new time.index.Sleep("wait_120s", {createDuration: "120s"}, {
 *     dependsOn: [folder],
 * });
 * const my_folder_binding = new gcp.iam.FoldersPolicyBinding("my-folder-binding", {
 *     folder: folder.folderId,
 *     location: "global",
 *     displayName: "test folder binding",
 *     policyKind: "PRINCIPAL_ACCESS_BOUNDARY",
 *     policyBindingId: "test-folder-binding",
 *     policy: pulumi.interpolate`organizations/123456789/locations/global/principalAccessBoundaryPolicies/${pabPolicy.principalAccessBoundaryPolicyId}`,
 *     target: {
 *         principalSet: pulumi.interpolate`//cloudresourcemanager.googleapis.com/folders/${folder.folderId}`,
 *     },
 * }, {
 *     dependsOn: [wait120s],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * import pulumi_time as time
 * pab_policy = gcp.iam.PrincipalAccessBoundaryPolicy("pab_policy",
 *     organization="123456789",
 *     location="global",
 *     display_name="test folder binding",
 *     principal_access_boundary_policy_id="my-pab-policy")
 * folder = gcp.organizations.Folder("folder",
 *     display_name="test folder",
 *     parent="organizations/123456789",
 *     deletion_protection=False)
 * wait120s = time.index.Sleep("wait_120s", create_duration=120s,
 * opts = pulumi.ResourceOptions(depends_on=[folder]))
 * my_folder_binding = gcp.iam.FoldersPolicyBinding("my-folder-binding",
 *     folder=folder.folder_id,
 *     location="global",
 *     display_name="test folder binding",
 *     policy_kind="PRINCIPAL_ACCESS_BOUNDARY",
 *     policy_binding_id="test-folder-binding",
 *     policy=pab_policy.principal_access_boundary_policy_id.apply(lambda principal_access_boundary_policy_id: f"organizations/123456789/locations/global/principalAccessBoundaryPolicies/{principal_access_boundary_policy_id}"),
 *     target={
 *         "principal_set": folder.folder_id.apply(lambda folder_id: f"//cloudresourcemanager.googleapis.com/folders/{folder_id}"),
 *     },
 *     opts = pulumi.ResourceOptions(depends_on=[wait120s]))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * using Time = Pulumi.Time;
 * return await Deployment.RunAsync(() =>
 * {
 *     var pabPolicy = new Gcp.Iam.PrincipalAccessBoundaryPolicy("pab_policy", new()
 *     {
 *         Organization = "123456789",
 *         Location = "global",
 *         DisplayName = "test folder binding",
 *         PrincipalAccessBoundaryPolicyId = "my-pab-policy",
 *     });
 *     var folder = new Gcp.Organizations.Folder("folder", new()
 *     {
 *         DisplayName = "test folder",
 *         Parent = "organizations/123456789",
 *         DeletionProtection = false,
 *     });
 *     var wait120s = new Time.Index.Sleep("wait_120s", new()
 *     {
 *         CreateDuration = "120s",
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             folder,
 *         },
 *     });
 *     var my_folder_binding = new Gcp.Iam.FoldersPolicyBinding("my-folder-binding", new()
 *     {
 *         Folder = folder.FolderId,
 *         Location = "global",
 *         DisplayName = "test folder binding",
 *         PolicyKind = "PRINCIPAL_ACCESS_BOUNDARY",
 *         PolicyBindingId = "test-folder-binding",
 *         Policy = pabPolicy.PrincipalAccessBoundaryPolicyId.Apply(principalAccessBoundaryPolicyId => $"organizations/123456789/locations/global/principalAccessBoundaryPolicies/{principalAccessBoundaryPolicyId}"),
 *         Target = new Gcp.Iam.Inputs.FoldersPolicyBindingTargetArgs
 *         {
 *             PrincipalSet = folder.FolderId.Apply(folderId => $"//cloudresourcemanager.googleapis.com/folders/{folderId}"),
 *         },
 *     }, new CustomResourceOptions
 *     {
 *         DependsOn =
 *         {
 *             wait120s,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"fmt"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/iam"
 * 	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/organizations"
 * 	"github.com/pulumi/pulumi-time/sdk/go/time"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		pabPolicy, err := iam.NewPrincipalAccessBoundaryPolicy(ctx, "pab_policy", &iam.PrincipalAccessBoundaryPolicyArgs{
 * 			Organization:                    pulumi.String("123456789"),
 * 			Location:                        pulumi.String("global"),
 * 			DisplayName:                     pulumi.String("test folder binding"),
 * 			PrincipalAccessBoundaryPolicyId: pulumi.String("my-pab-policy"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		folder, err := organizations.NewFolder(ctx, "folder", &organizations.FolderArgs{
 * 			DisplayName:        pulumi.String("test folder"),
 * 			Parent:             pulumi.String("organizations/123456789"),
 * 			DeletionProtection: pulumi.Bool(false),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		wait120s, err := time.NewSleep(ctx, "wait_120s", &time.SleepArgs{
 * 			CreateDuration: "120s",
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			folder,
 * 		}))
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = iam.NewFoldersPolicyBinding(ctx, "my-folder-binding", &iam.FoldersPolicyBindingArgs{
 * 			Folder:          folder.FolderId,
 * 			Location:        pulumi.String("global"),
 * 			DisplayName:     pulumi.String("test folder binding"),
 * 			PolicyKind:      pulumi.String("PRINCIPAL_ACCESS_BOUNDARY"),
 * 			PolicyBindingId: pulumi.String("test-folder-binding"),
 * 			Policy: pabPolicy.PrincipalAccessBoundaryPolicyId.ApplyT(func(principalAccessBoundaryPolicyId string) (string, error) {
 * 				return fmt.Sprintf("organizations/123456789/locations/global/principalAccessBoundaryPolicies/%v", principalAccessBoundaryPolicyId), nil
 * 			}).(pulumi.StringOutput),
 * 			Target: &iam.FoldersPolicyBindingTargetArgs{
 * 				PrincipalSet: folder.FolderId.ApplyT(func(folderId string) (string, error) {
 * 					return fmt.Sprintf("//cloudresourcemanager.googleapis.com/folders/%v", folderId), nil
 * 				}).(pulumi.StringOutput),
 * 			},
 * 		}, pulumi.DependsOn([]pulumi.Resource{
 * 			wait120s,
 * 		}))
 * 		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.gcp.iam.PrincipalAccessBoundaryPolicy;
 * import com.pulumi.gcp.iam.PrincipalAccessBoundaryPolicyArgs;
 * import com.pulumi.gcp.organizations.Folder;
 * import com.pulumi.gcp.organizations.FolderArgs;
 * import com.pulumi.time.sleep;
 * import com.pulumi.time.SleepArgs;
 * import com.pulumi.gcp.iam.FoldersPolicyBinding;
 * import com.pulumi.gcp.iam.FoldersPolicyBindingArgs;
 * import com.pulumi.gcp.iam.inputs.FoldersPolicyBindingTargetArgs;
 * import com.pulumi.resources.CustomResourceOptions;
 * 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 pabPolicy = new PrincipalAccessBoundaryPolicy("pabPolicy", PrincipalAccessBoundaryPolicyArgs.builder()
 *             .organization("123456789")
 *             .location("global")
 *             .displayName("test folder binding")
 *             .principalAccessBoundaryPolicyId("my-pab-policy")
 *             .build());
 *         var folder = new Folder("folder", FolderArgs.builder()
 *             .displayName("test folder")
 *             .parent("organizations/123456789")
 *             .deletionProtection(false)
 *             .build());
 *         var wait120s = new Sleep("wait120s", SleepArgs.builder()
 *             .createDuration("120s")
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(folder)
 *                 .build());
 *         var my_folder_binding = new FoldersPolicyBinding("my-folder-binding", FoldersPolicyBindingArgs.builder()
 *             .folder(folder.folderId())
 *             .location("global")
 *             .displayName("test folder binding")
 *             .policyKind("PRINCIPAL_ACCESS_BOUNDARY")
 *             .policyBindingId("test-folder-binding")
 *             .policy(pabPolicy.principalAccessBoundaryPolicyId().applyValue(principalAccessBoundaryPolicyId -> String.format("organizations/123456789/locations/global/principalAccessBoundaryPolicies/%s", principalAccessBoundaryPolicyId)))
 *             .target(FoldersPolicyBindingTargetArgs.builder()
 *                 .principalSet(folder.folderId().applyValue(folderId -> String.format("//cloudresourcemanager.googleapis.com/folders/%s", folderId)))
 *                 .build())
 *             .build(), CustomResourceOptions.builder()
 *                 .dependsOn(wait120s)
 *                 .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   pabPolicy:
 *     type: gcp:iam:PrincipalAccessBoundaryPolicy
 *     name: pab_policy
 *     properties:
 *       organization: '123456789'
 *       location: global
 *       displayName: test folder binding
 *       principalAccessBoundaryPolicyId: my-pab-policy
 *   folder:
 *     type: gcp:organizations:Folder
 *     properties:
 *       displayName: test folder
 *       parent: organizations/123456789
 *       deletionProtection: false
 *   wait120s:
 *     type: time:sleep
 *     name: wait_120s
 *     properties:
 *       createDuration: 120s
 *     options:
 *       dependsOn:
 *         - ${folder}
 *   my-folder-binding:
 *     type: gcp:iam:FoldersPolicyBinding
 *     properties:
 *       folder: ${folder.folderId}
 *       location: global
 *       displayName: test folder binding
 *       policyKind: PRINCIPAL_ACCESS_BOUNDARY
 *       policyBindingId: test-folder-binding
 *       policy: organizations/123456789/locations/global/principalAccessBoundaryPolicies/${pabPolicy.principalAccessBoundaryPolicyId}
 *       target:
 *         principalSet: //cloudresourcemanager.googleapis.com/folders/${folder.folderId}
 *     options:
 *       dependsOn:
 *         - ${wait120s}
 * ```
 * 
 * ## Import
 * FoldersPolicyBinding can be imported using any of these accepted formats:
 * * `folders/{{folder}}/locations/{{location}}/policyBindings/{{policy_binding_id}}`
 * * `{{folder}}/{{location}}/{{policy_binding_id}}`
 * When using the `pulumi import` command, FoldersPolicyBinding can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:iam/foldersPolicyBinding:FoldersPolicyBinding default folders/{{folder}}/locations/{{location}}/policyBindings/{{policy_binding_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:iam/foldersPolicyBinding:FoldersPolicyBinding default {{folder}}/{{location}}/{{policy_binding_id}}
 * ```
 * @property annotations Optional. User defined annotations. See https://google.aip.dev/148#annotations for more details such as format and size
 * limitations **Note**: This field is non-authoritative, and will only manage the annotations present in your
 * configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
 * @property condition Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The
 * syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary
 * size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() <
 * 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\"
 * expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description:
 * \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type
 * != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string
 * with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and
 * functions that may be referenced within an expression are determined by the service that evaluates it. See the service
 * documentation for additional information.
 * @property displayName Optional. The description of the policy binding. Must be less than or equal to 63 characters.
 * @property folder The parent folder for the PolicyBinding.
 * @property location The location of the PolicyBinding.
 * @property policy Required. Immutable. The resource name of the policy to be bound. The binding parent and policy must belong to the same Organization (or Project).
 * @property policyBindingId The Policy Binding ID.
 * @property policyKind Immutable. The kind of the policy to attach in this binding. This field must be one of the following: - Left empty (will
 * be automatically set to the policy kind) - The input policy kind Possible values: POLICY_KIND_UNSPECIFIED
 * PRINCIPAL_ACCESS_BOUNDARY ACCESS
 * @property target Target is the full resource name of the resource to which the policy will be bound. Immutable once set.
 * Structure is documented below.
 */
public data class FoldersPolicyBindingArgs(
    public val annotations: Output>? = null,
    public val condition: Output? = null,
    public val displayName: Output? = null,
    public val folder: Output? = null,
    public val location: Output? = null,
    public val policy: Output? = null,
    public val policyBindingId: Output? = null,
    public val policyKind: Output? = null,
    public val target: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.iam.FoldersPolicyBindingArgs =
        com.pulumi.gcp.iam.FoldersPolicyBindingArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .condition(condition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .folder(folder?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .policy(policy?.applyValue({ args0 -> args0 }))
            .policyBindingId(policyBindingId?.applyValue({ args0 -> args0 }))
            .policyKind(policyKind?.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [FoldersPolicyBindingArgs].
 */
@PulumiTagMarker
public class FoldersPolicyBindingArgsBuilder internal constructor() {
    private var annotations: Output>? = null

    private var condition: Output? = null

    private var displayName: Output? = null

    private var folder: Output? = null

    private var location: Output? = null

    private var policy: Output? = null

    private var policyBindingId: Output? = null

    private var policyKind: Output? = null

    private var target: Output? = null

    /**
     * @param value Optional. User defined annotations. See https://google.aip.dev/148#annotations for more details such as format and size
     * limitations **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
     */
    @JvmName("mrujlhqjadenwjpk")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The
     * syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary
     * size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() <
     * 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\"
     * expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description:
     * \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type
     * != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string
     * with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and
     * functions that may be referenced within an expression are determined by the service that evaluates it. See the service
     * documentation for additional information.
     */
    @JvmName("ckpccduvfjmrvgqc")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

    /**
     * @param value Optional. The description of the policy binding. Must be less than or equal to 63 characters.
     */
    @JvmName("bqpghwjwgimhbfuf")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value The parent folder for the PolicyBinding.
     */
    @JvmName("yenuawbmowiuggxw")
    public suspend fun folder(`value`: Output) {
        this.folder = value
    }

    /**
     * @param value The location of the PolicyBinding.
     */
    @JvmName("pdjoswbhoultdsto")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Required. Immutable. The resource name of the policy to be bound. The binding parent and policy must belong to the same Organization (or Project).
     */
    @JvmName("mvehbnolmrbusdjv")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value The Policy Binding ID.
     */
    @JvmName("pdgsecwwovjtiofc")
    public suspend fun policyBindingId(`value`: Output) {
        this.policyBindingId = value
    }

    /**
     * @param value Immutable. The kind of the policy to attach in this binding. This field must be one of the following: - Left empty (will
     * be automatically set to the policy kind) - The input policy kind Possible values: POLICY_KIND_UNSPECIFIED
     * PRINCIPAL_ACCESS_BOUNDARY ACCESS
     */
    @JvmName("quedroodvqatdhqs")
    public suspend fun policyKind(`value`: Output) {
        this.policyKind = value
    }

    /**
     * @param value Target is the full resource name of the resource to which the policy will be bound. Immutable once set.
     * Structure is documented below.
     */
    @JvmName("knnqiriwddoyycvj")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value Optional. User defined annotations. See https://google.aip.dev/148#annotations for more details such as format and size
     * limitations **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
     */
    @JvmName("olqxowsattciealx")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values Optional. User defined annotations. See https://google.aip.dev/148#annotations for more details such as format and size
     * limitations **Note**: This field is non-authoritative, and will only manage the annotations present in your
     * configuration. Please refer to the field 'effective_annotations' for all of the annotations present on the resource.
     */
    @JvmName("aygqhmnodlbnmoos")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The
     * syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary
     * size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() <
     * 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\"
     * expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description:
     * \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type
     * != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string
     * with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and
     * functions that may be referenced within an expression are determined by the service that evaluates it. See the service
     * documentation for additional information.
     */
    @JvmName("bbyahxawwtjscxlh")
    public suspend fun condition(`value`: FoldersPolicyBindingConditionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.condition = mapped
    }

    /**
     * @param argument Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The
     * syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary
     * size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() <
     * 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\"
     * expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description:
     * \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type
     * != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string
     * with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and
     * functions that may be referenced within an expression are determined by the service that evaluates it. See the service
     * documentation for additional information.
     */
    @JvmName("geoaxrimhegjcomr")
    public suspend fun condition(argument: suspend FoldersPolicyBindingConditionArgsBuilder.() -> Unit) {
        val toBeMapped = FoldersPolicyBindingConditionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.condition = mapped
    }

    /**
     * @param value Optional. The description of the policy binding. Must be less than or equal to 63 characters.
     */
    @JvmName("slnicprkkonbanos")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

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

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

    /**
     * @param value Required. Immutable. The resource name of the policy to be bound. The binding parent and policy must belong to the same Organization (or Project).
     */
    @JvmName("tvhcyvwfwnylqawx")
    public suspend fun policy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param value The Policy Binding ID.
     */
    @JvmName("wdupbiknmfolplqo")
    public suspend fun policyBindingId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyBindingId = mapped
    }

    /**
     * @param value Immutable. The kind of the policy to attach in this binding. This field must be one of the following: - Left empty (will
     * be automatically set to the policy kind) - The input policy kind Possible values: POLICY_KIND_UNSPECIFIED
     * PRINCIPAL_ACCESS_BOUNDARY ACCESS
     */
    @JvmName("mhklccglgmgipsnf")
    public suspend fun policyKind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policyKind = mapped
    }

    /**
     * @param value Target is the full resource name of the resource to which the policy will be bound. Immutable once set.
     * Structure is documented below.
     */
    @JvmName("lhdaotmvcvkylwli")
    public suspend fun target(`value`: FoldersPolicyBindingTargetArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    /**
     * @param argument Target is the full resource name of the resource to which the policy will be bound. Immutable once set.
     * Structure is documented below.
     */
    @JvmName("cevxoixntssfriqp")
    public suspend fun target(argument: suspend FoldersPolicyBindingTargetArgsBuilder.() -> Unit) {
        val toBeMapped = FoldersPolicyBindingTargetArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.target = mapped
    }

    internal fun build(): FoldersPolicyBindingArgs = FoldersPolicyBindingArgs(
        annotations = annotations,
        condition = condition,
        displayName = displayName,
        folder = folder,
        location = location,
        policy = policy,
        policyBindingId = policyBindingId,
        policyKind = policyKind,
        target = target,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy