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

com.pulumi.gcp.cloudidentity.kotlin.GroupMembershipArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.gcp.cloudidentity.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudidentity.GroupMembershipArgs.builder
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipMemberKeyArgs
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipMemberKeyArgsBuilder
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipPreferredMemberKeyArgs
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipPreferredMemberKeyArgsBuilder
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipRoleArgs
import com.pulumi.gcp.cloudidentity.kotlin.inputs.GroupMembershipRoleArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A Membership defines a relationship between a Group and an entity belonging to that Group, referred to as a "member".
 * To get more information about GroupMembership, see:
 * * [API documentation](https://cloud.google.com/identity/docs/reference/rest/v1/groups.memberships)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/identity/docs/how-to/memberships-google-groups)
 * > **Warning:** If you are using User ADCs (Application Default Credentials) with this resource,
 * you must specify a `billing_project` and set `user_project_override` to true
 * in the provider configuration. Otherwise the Cloud Identity API will return a 403 error.
 * Your account must have the `serviceusage.services.use` permission on the
 * `billing_project` you defined.
 * ## Example Usage
 * ### Cloud Identity Group Membership
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const group = new gcp.cloudidentity.Group("group", {
 *     displayName: "my-identity-group",
 *     parent: "customers/A01b123xz",
 *     groupKey: {
 *         id: "[email protected]",
 *     },
 *     labels: {
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     },
 * });
 * const child_group = new gcp.cloudidentity.Group("child-group", {
 *     displayName: "my-identity-group-child",
 *     parent: "customers/A01b123xz",
 *     groupKey: {
 *         id: "[email protected]",
 *     },
 *     labels: {
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     },
 * });
 * const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic", {
 *     group: group.id,
 *     preferredMemberKey: {
 *         id: child_group.groupKey.apply(groupKey => groupKey.id),
 *     },
 *     roles: [{
 *         name: "MEMBER",
 *     }],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * group = gcp.cloudidentity.Group("group",
 *     display_name="my-identity-group",
 *     parent="customers/A01b123xz",
 *     group_key={
 *         "id": "[email protected]",
 *     },
 *     labels={
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     })
 * child_group = gcp.cloudidentity.Group("child-group",
 *     display_name="my-identity-group-child",
 *     parent="customers/A01b123xz",
 *     group_key={
 *         "id": "[email protected]",
 *     },
 *     labels={
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     })
 * cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic",
 *     group=group.id,
 *     preferred_member_key={
 *         "id": child_group.group_key.id,
 *     },
 *     roles=[{
 *         "name": "MEMBER",
 *     }])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @group = new Gcp.CloudIdentity.Group("group", new()
 *     {
 *         DisplayName = "my-identity-group",
 *         Parent = "customers/A01b123xz",
 *         GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
 *         {
 *             Id = "[email protected]",
 *         },
 *         Labels =
 *         {
 *             { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
 *         },
 *     });
 *     var child_group = new Gcp.CloudIdentity.Group("child-group", new()
 *     {
 *         DisplayName = "my-identity-group-child",
 *         Parent = "customers/A01b123xz",
 *         GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
 *         {
 *             Id = "[email protected]",
 *         },
 *         Labels =
 *         {
 *             { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
 *         },
 *     });
 *     var cloudIdentityGroupMembershipBasic = new Gcp.CloudIdentity.GroupMembership("cloud_identity_group_membership_basic", new()
 *     {
 *         Group = @group.Id,
 *         PreferredMemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipPreferredMemberKeyArgs
 *         {
 *             Id = child_group.GroupKey.Apply(groupKey => groupKey.Id),
 *         },
 *         Roles = new[]
 *         {
 *             new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
 *             {
 *                 Name = "MEMBER",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudidentity"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		group, err := cloudidentity.NewGroup(ctx, "group", &cloudidentity.GroupArgs{
 * 			DisplayName: pulumi.String("my-identity-group"),
 * 			Parent:      pulumi.String("customers/A01b123xz"),
 * 			GroupKey: &cloudidentity.GroupGroupKeyArgs{
 * 				Id: pulumi.String("[email protected]"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudidentity.NewGroup(ctx, "child-group", &cloudidentity.GroupArgs{
 * 			DisplayName: pulumi.String("my-identity-group-child"),
 * 			Parent:      pulumi.String("customers/A01b123xz"),
 * 			GroupKey: &cloudidentity.GroupGroupKeyArgs{
 * 				Id: pulumi.String("[email protected]"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudidentity.NewGroupMembership(ctx, "cloud_identity_group_membership_basic", &cloudidentity.GroupMembershipArgs{
 * 			Group: group.ID(),
 * 			PreferredMemberKey: &cloudidentity.GroupMembershipPreferredMemberKeyArgs{
 * 				Id: child_group.GroupKey.ApplyT(func(groupKey cloudidentity.GroupGroupKey) (*string, error) {
 * 					return &groupKey.Id, nil
 * 				}).(pulumi.StringPtrOutput),
 * 			},
 * 			Roles: cloudidentity.GroupMembershipRoleArray{
 * 				&cloudidentity.GroupMembershipRoleArgs{
 * 					Name: pulumi.String("MEMBER"),
 * 				},
 * 			},
 * 		})
 * 		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.cloudidentity.Group;
 * import com.pulumi.gcp.cloudidentity.GroupArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupGroupKeyArgs;
 * import com.pulumi.gcp.cloudidentity.GroupMembership;
 * import com.pulumi.gcp.cloudidentity.GroupMembershipArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipPreferredMemberKeyArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipRoleArgs;
 * 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 group = new Group("group", GroupArgs.builder()
 *             .displayName("my-identity-group")
 *             .parent("customers/A01b123xz")
 *             .groupKey(GroupGroupKeyArgs.builder()
 *                 .id("[email protected]")
 *                 .build())
 *             .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
 *             .build());
 *         var child_group = new Group("child-group", GroupArgs.builder()
 *             .displayName("my-identity-group-child")
 *             .parent("customers/A01b123xz")
 *             .groupKey(GroupGroupKeyArgs.builder()
 *                 .id("[email protected]")
 *                 .build())
 *             .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
 *             .build());
 *         var cloudIdentityGroupMembershipBasic = new GroupMembership("cloudIdentityGroupMembershipBasic", GroupMembershipArgs.builder()
 *             .group(group.id())
 *             .preferredMemberKey(GroupMembershipPreferredMemberKeyArgs.builder()
 *                 .id(child_group.groupKey().applyValue(groupKey -> groupKey.id()))
 *                 .build())
 *             .roles(GroupMembershipRoleArgs.builder()
 *                 .name("MEMBER")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   group:
 *     type: gcp:cloudidentity:Group
 *     properties:
 *       displayName: my-identity-group
 *       parent: customers/A01b123xz
 *       groupKey:
 *         id: [email protected]
 *       labels:
 *         cloudidentity.googleapis.com/groups.discussion_forum:
 *   child-group:
 *     type: gcp:cloudidentity:Group
 *     properties:
 *       displayName: my-identity-group-child
 *       parent: customers/A01b123xz
 *       groupKey:
 *         id: [email protected]
 *       labels:
 *         cloudidentity.googleapis.com/groups.discussion_forum:
 *   cloudIdentityGroupMembershipBasic:
 *     type: gcp:cloudidentity:GroupMembership
 *     name: cloud_identity_group_membership_basic
 *     properties:
 *       group: ${group.id}
 *       preferredMemberKey:
 *         id: ${["child-group"].groupKey.id}
 *       roles:
 *         - name: MEMBER
 * ```
 * 
 * ### Cloud Identity Group Membership User
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as gcp from "@pulumi/gcp";
 * const group = new gcp.cloudidentity.Group("group", {
 *     displayName: "my-identity-group",
 *     parent: "customers/A01b123xz",
 *     groupKey: {
 *         id: "[email protected]",
 *     },
 *     labels: {
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     },
 * });
 * const cloudIdentityGroupMembershipBasic = new gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic", {
 *     group: group.id,
 *     preferredMemberKey: {
 *         id: "[email protected]",
 *     },
 *     roles: [
 *         {
 *             name: "MEMBER",
 *         },
 *         {
 *             name: "MANAGER",
 *         },
 *     ],
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_gcp as gcp
 * group = gcp.cloudidentity.Group("group",
 *     display_name="my-identity-group",
 *     parent="customers/A01b123xz",
 *     group_key={
 *         "id": "[email protected]",
 *     },
 *     labels={
 *         "cloudidentity.googleapis.com/groups.discussion_forum": "",
 *     })
 * cloud_identity_group_membership_basic = gcp.cloudidentity.GroupMembership("cloud_identity_group_membership_basic",
 *     group=group.id,
 *     preferred_member_key={
 *         "id": "[email protected]",
 *     },
 *     roles=[
 *         {
 *             "name": "MEMBER",
 *         },
 *         {
 *             "name": "MANAGER",
 *         },
 *     ])
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Gcp = Pulumi.Gcp;
 * return await Deployment.RunAsync(() =>
 * {
 *     var @group = new Gcp.CloudIdentity.Group("group", new()
 *     {
 *         DisplayName = "my-identity-group",
 *         Parent = "customers/A01b123xz",
 *         GroupKey = new Gcp.CloudIdentity.Inputs.GroupGroupKeyArgs
 *         {
 *             Id = "[email protected]",
 *         },
 *         Labels =
 *         {
 *             { "cloudidentity.googleapis.com/groups.discussion_forum", "" },
 *         },
 *     });
 *     var cloudIdentityGroupMembershipBasic = new Gcp.CloudIdentity.GroupMembership("cloud_identity_group_membership_basic", new()
 *     {
 *         Group = @group.Id,
 *         PreferredMemberKey = new Gcp.CloudIdentity.Inputs.GroupMembershipPreferredMemberKeyArgs
 *         {
 *             Id = "[email protected]",
 *         },
 *         Roles = new[]
 *         {
 *             new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
 *             {
 *                 Name = "MEMBER",
 *             },
 *             new Gcp.CloudIdentity.Inputs.GroupMembershipRoleArgs
 *             {
 *                 Name = "MANAGER",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/cloudidentity"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		group, err := cloudidentity.NewGroup(ctx, "group", &cloudidentity.GroupArgs{
 * 			DisplayName: pulumi.String("my-identity-group"),
 * 			Parent:      pulumi.String("customers/A01b123xz"),
 * 			GroupKey: &cloudidentity.GroupGroupKeyArgs{
 * 				Id: pulumi.String("[email protected]"),
 * 			},
 * 			Labels: pulumi.StringMap{
 * 				"cloudidentity.googleapis.com/groups.discussion_forum": pulumi.String(""),
 * 			},
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = cloudidentity.NewGroupMembership(ctx, "cloud_identity_group_membership_basic", &cloudidentity.GroupMembershipArgs{
 * 			Group: group.ID(),
 * 			PreferredMemberKey: &cloudidentity.GroupMembershipPreferredMemberKeyArgs{
 * 				Id: pulumi.String("[email protected]"),
 * 			},
 * 			Roles: cloudidentity.GroupMembershipRoleArray{
 * 				&cloudidentity.GroupMembershipRoleArgs{
 * 					Name: pulumi.String("MEMBER"),
 * 				},
 * 				&cloudidentity.GroupMembershipRoleArgs{
 * 					Name: pulumi.String("MANAGER"),
 * 				},
 * 			},
 * 		})
 * 		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.cloudidentity.Group;
 * import com.pulumi.gcp.cloudidentity.GroupArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupGroupKeyArgs;
 * import com.pulumi.gcp.cloudidentity.GroupMembership;
 * import com.pulumi.gcp.cloudidentity.GroupMembershipArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipPreferredMemberKeyArgs;
 * import com.pulumi.gcp.cloudidentity.inputs.GroupMembershipRoleArgs;
 * 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 group = new Group("group", GroupArgs.builder()
 *             .displayName("my-identity-group")
 *             .parent("customers/A01b123xz")
 *             .groupKey(GroupGroupKeyArgs.builder()
 *                 .id("[email protected]")
 *                 .build())
 *             .labels(Map.of("cloudidentity.googleapis.com/groups.discussion_forum", ""))
 *             .build());
 *         var cloudIdentityGroupMembershipBasic = new GroupMembership("cloudIdentityGroupMembershipBasic", GroupMembershipArgs.builder()
 *             .group(group.id())
 *             .preferredMemberKey(GroupMembershipPreferredMemberKeyArgs.builder()
 *                 .id("[email protected]")
 *                 .build())
 *             .roles(
 *                 GroupMembershipRoleArgs.builder()
 *                     .name("MEMBER")
 *                     .build(),
 *                 GroupMembershipRoleArgs.builder()
 *                     .name("MANAGER")
 *                     .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   group:
 *     type: gcp:cloudidentity:Group
 *     properties:
 *       displayName: my-identity-group
 *       parent: customers/A01b123xz
 *       groupKey:
 *         id: [email protected]
 *       labels:
 *         cloudidentity.googleapis.com/groups.discussion_forum:
 *   cloudIdentityGroupMembershipBasic:
 *     type: gcp:cloudidentity:GroupMembership
 *     name: cloud_identity_group_membership_basic
 *     properties:
 *       group: ${group.id}
 *       preferredMemberKey:
 *         id: [email protected]
 *       roles:
 *         - name: MEMBER
 *         - name: MANAGER
 * ```
 * 
 * ## Import
 * GroupMembership can be imported using any of these accepted formats:
 * * `{{name}}`
 * When using the `pulumi import` command, GroupMembership can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:cloudidentity/groupMembership:GroupMembership default {{name}}
 * ```
 * @property group The name of the Group to create this membership in.
 * @property memberKey EntityKey of the member.
 * @property preferredMemberKey EntityKey of the member.
 * @property roles The MembershipRoles that apply to the Membership.
 * Must not contain duplicate MembershipRoles with the same name.
 * Structure is documented below.
 */
public data class GroupMembershipArgs(
    public val group: Output? = null,
    public val memberKey: Output? = null,
    public val preferredMemberKey: Output? = null,
    public val roles: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudidentity.GroupMembershipArgs =
        com.pulumi.gcp.cloudidentity.GroupMembershipArgs.builder()
            .group(group?.applyValue({ args0 -> args0 }))
            .memberKey(memberKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .preferredMemberKey(
                preferredMemberKey?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .roles(
                roles?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [GroupMembershipArgs].
 */
@PulumiTagMarker
public class GroupMembershipArgsBuilder internal constructor() {
    private var group: Output? = null

    private var memberKey: Output? = null

    private var preferredMemberKey: Output? = null

    private var roles: Output>? = null

    /**
     * @param value The name of the Group to create this membership in.
     */
    @JvmName("huavkrbdkmdjasqb")
    public suspend fun group(`value`: Output) {
        this.group = value
    }

    /**
     * @param value EntityKey of the member.
     */
    @JvmName("hmvxxoxpytwutsfb")
    public suspend fun memberKey(`value`: Output) {
        this.memberKey = value
    }

    /**
     * @param value EntityKey of the member.
     */
    @JvmName("dumhmmflihnclyln")
    public suspend fun preferredMemberKey(`value`: Output) {
        this.preferredMemberKey = value
    }

    /**
     * @param value The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("xeoabyqnnojfjqsv")
    public suspend fun roles(`value`: Output>) {
        this.roles = value
    }

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

    /**
     * @param values The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("hklqmufeandungev")
    public suspend fun roles(values: List>) {
        this.roles = Output.all(values)
    }

    /**
     * @param value The name of the Group to create this membership in.
     */
    @JvmName("wardvpfqwbpwkfxe")
    public suspend fun group(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.group = mapped
    }

    /**
     * @param value EntityKey of the member.
     */
    @JvmName("ewqweinqebdjpktl")
    public suspend fun memberKey(`value`: GroupMembershipMemberKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memberKey = mapped
    }

    /**
     * @param argument EntityKey of the member.
     */
    @JvmName("eqxjkxhjbfxqbckv")
    public suspend fun memberKey(argument: suspend GroupMembershipMemberKeyArgsBuilder.() -> Unit) {
        val toBeMapped = GroupMembershipMemberKeyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.memberKey = mapped
    }

    /**
     * @param value EntityKey of the member.
     */
    @JvmName("tvlyqbedanpxxgpi")
    public suspend fun preferredMemberKey(`value`: GroupMembershipPreferredMemberKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.preferredMemberKey = mapped
    }

    /**
     * @param argument EntityKey of the member.
     */
    @JvmName("unxmgbqnbxpywepm")
    public suspend fun preferredMemberKey(argument: suspend GroupMembershipPreferredMemberKeyArgsBuilder.() -> Unit) {
        val toBeMapped = GroupMembershipPreferredMemberKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.preferredMemberKey = mapped
    }

    /**
     * @param value The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("uccpyoempupdjcao")
    public suspend fun roles(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    /**
     * @param argument The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("rejkyoufmtelkgmi")
    public suspend fun roles(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GroupMembershipRoleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.roles = mapped
    }

    /**
     * @param argument The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("ojeghjvcbbhbknen")
    public suspend fun roles(vararg argument: suspend GroupMembershipRoleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GroupMembershipRoleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.roles = mapped
    }

    /**
     * @param argument The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("eoriqlrehneewbgc")
    public suspend fun roles(argument: suspend GroupMembershipRoleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GroupMembershipRoleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.roles = mapped
    }

    /**
     * @param values The MembershipRoles that apply to the Membership.
     * Must not contain duplicate MembershipRoles with the same name.
     * Structure is documented below.
     */
    @JvmName("lfakjvsdfemlvhjr")
    public suspend fun roles(vararg values: GroupMembershipRoleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.roles = mapped
    }

    internal fun build(): GroupMembershipArgs = GroupMembershipArgs(
        group = group,
        memberKey = memberKey,
        preferredMemberKey = preferredMemberKey,
        roles = roles,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy