# coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import builtins
import copy
import warnings
import sys
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
if sys.version_info >= (3, 11):
    from typing import NotRequired, TypedDict, TypeAlias
else:
    from typing_extensions import NotRequired, TypedDict, TypeAlias
from .. import _utilities
from . import outputs
from ._inputs import *

__all__ = ['GroupArgs', 'Group']

@pulumi.input_type
class GroupArgs:
    def __init__(__self__, *,
                 group_name: pulumi.Input[builtins.str],
                 join_type: pulumi.Input[builtins.str],
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]] = None):
        """
        The set of arguments for constructing a Group resource.
        :param pulumi.Input[builtins.str] group_name: 用户组名称。
        :param pulumi.Input[builtins.str] join_type: 用户组类型。
        :param pulumi.Input[builtins.str] description: 描述。
        :param pulumi.Input[builtins.str] display_name: 显示名。
        """
        pulumi.set(__self__, "group_name", group_name)
        pulumi.set(__self__, "join_type", join_type)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if members is not None:
            pulumi.set(__self__, "members", members)

    @property
    @pulumi.getter(name="groupName")
    def group_name(self) -> pulumi.Input[builtins.str]:
        """
        用户组名称。
        """
        return pulumi.get(self, "group_name")

    @group_name.setter
    def group_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "group_name", value)

    @property
    @pulumi.getter(name="joinType")
    def join_type(self) -> pulumi.Input[builtins.str]:
        """
        用户组类型。
        """
        return pulumi.get(self, "join_type")

    @join_type.setter
    def join_type(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "join_type", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        显示名。
        """
        return pulumi.get(self, "display_name")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "display_name", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]]:
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]]):
        pulumi.set(self, "members", value)


@pulumi.input_type
class _GroupState:
    def __init__(__self__, *,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 group_id: Optional[pulumi.Input[builtins.str]] = None,
                 group_name: Optional[pulumi.Input[builtins.str]] = None,
                 join_type: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]] = None,
                 source: Optional[pulumi.Input[builtins.str]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Group resources.
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 描述。
        :param pulumi.Input[builtins.str] display_name: 显示名。
        :param pulumi.Input[builtins.str] group_id: 用户组id。
        :param pulumi.Input[builtins.str] group_name: 用户组名称。
        :param pulumi.Input[builtins.str] join_type: 用户组类型。
        :param pulumi.Input[builtins.str] source: 用户组来源。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        """
        if created_time is not None:
            pulumi.set(__self__, "created_time", created_time)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if group_id is not None:
            pulumi.set(__self__, "group_id", group_id)
        if group_name is not None:
            pulumi.set(__self__, "group_name", group_name)
        if join_type is not None:
            pulumi.set(__self__, "join_type", join_type)
        if members is not None:
            pulumi.set(__self__, "members", members)
        if source is not None:
            pulumi.set(__self__, "source", source)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @created_time.setter
    def created_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "created_time", value)

    @property
    @pulumi.getter
    def description(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        描述。
        """
        return pulumi.get(self, "description")

    @description.setter
    def description(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "description", value)

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        显示名。
        """
        return pulumi.get(self, "display_name")

    @display_name.setter
    def display_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "display_name", value)

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组id。
        """
        return pulumi.get(self, "group_id")

    @group_id.setter
    def group_id(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "group_id", value)

    @property
    @pulumi.getter(name="groupName")
    def group_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组名称。
        """
        return pulumi.get(self, "group_name")

    @group_name.setter
    def group_name(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "group_name", value)

    @property
    @pulumi.getter(name="joinType")
    def join_type(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组类型。
        """
        return pulumi.get(self, "join_type")

    @join_type.setter
    def join_type(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "join_type", value)

    @property
    @pulumi.getter
    def members(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]]:
        return pulumi.get(self, "members")

    @members.setter
    def members(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['GroupMemberArgs']]]]):
        pulumi.set(self, "members", value)

    @property
    @pulumi.getter
    def source(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        用户组来源。
        """
        return pulumi.get(self, "source")

    @source.setter
    def source(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "source", value)

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

    @updated_time.setter
    def updated_time(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "updated_time", value)


@pulumi.type_token("bytepluscc:cloudidentity/group:Group")
class Group(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 group_name: Optional[pulumi.Input[builtins.str]] = None,
                 join_type: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GroupMemberArgs', 'GroupMemberArgsDict']]]]] = None,
                 __props__=None):
        """
        当您需要批量为云身份中心用户进行SSO授权时，您可以先通过用户组进行批量的用户管理。

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/group:Group example "group_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] description: 描述。
        :param pulumi.Input[builtins.str] display_name: 显示名。
        :param pulumi.Input[builtins.str] group_name: 用户组名称。
        :param pulumi.Input[builtins.str] join_type: 用户组类型。
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: GroupArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        当您需要批量为云身份中心用户进行SSO授权时，您可以先通过用户组进行批量的用户管理。

        ## Import

        ```sh
        $ pulumi import bytepluscc:cloudidentity/group:Group example "group_id"
        ```

        :param str resource_name: The name of the resource.
        :param GroupArgs args: The arguments to use to populate this resource's properties.
        :param pulumi.ResourceOptions opts: Options for the resource.
        """
        ...
    def __init__(__self__, resource_name: str, *args, **kwargs):
        resource_args, opts = _utilities.get_resource_args_opts(GroupArgs, pulumi.ResourceOptions, *args, **kwargs)
        if resource_args is not None:
            __self__._internal_init(resource_name, opts, **resource_args.__dict__)
        else:
            __self__._internal_init(resource_name, *args, **kwargs)

    def _internal_init(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 group_name: Optional[pulumi.Input[builtins.str]] = None,
                 join_type: Optional[pulumi.Input[builtins.str]] = None,
                 members: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GroupMemberArgs', 'GroupMemberArgsDict']]]]] = None,
                 __props__=None):
        opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
        if not isinstance(opts, pulumi.ResourceOptions):
            raise TypeError('Expected resource options to be a ResourceOptions instance')
        if opts.id is None:
            if __props__ is not None:
                raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
            __props__ = GroupArgs.__new__(GroupArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["display_name"] = display_name
            if group_name is None and not opts.urn:
                raise TypeError("Missing required property 'group_name'")
            __props__.__dict__["group_name"] = group_name
            if join_type is None and not opts.urn:
                raise TypeError("Missing required property 'join_type'")
            __props__.__dict__["join_type"] = join_type
            __props__.__dict__["members"] = members
            __props__.__dict__["created_time"] = None
            __props__.__dict__["group_id"] = None
            __props__.__dict__["source"] = None
            __props__.__dict__["updated_time"] = None
        super(Group, __self__).__init__(
            'bytepluscc:cloudidentity/group:Group',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            display_name: Optional[pulumi.Input[builtins.str]] = None,
            group_id: Optional[pulumi.Input[builtins.str]] = None,
            group_name: Optional[pulumi.Input[builtins.str]] = None,
            join_type: Optional[pulumi.Input[builtins.str]] = None,
            members: Optional[pulumi.Input[Sequence[pulumi.Input[Union['GroupMemberArgs', 'GroupMemberArgsDict']]]]] = None,
            source: Optional[pulumi.Input[builtins.str]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None) -> 'Group':
        """
        Get an existing Group resource's state with the given name, id, and optional extra
        properties used to qualify the lookup.

        :param str resource_name: The unique name of the resulting resource.
        :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[builtins.str] created_time: 创建时间。
        :param pulumi.Input[builtins.str] description: 描述。
        :param pulumi.Input[builtins.str] display_name: 显示名。
        :param pulumi.Input[builtins.str] group_id: 用户组id。
        :param pulumi.Input[builtins.str] group_name: 用户组名称。
        :param pulumi.Input[builtins.str] join_type: 用户组类型。
        :param pulumi.Input[builtins.str] source: 用户组来源。
        :param pulumi.Input[builtins.str] updated_time: 更新时间。
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _GroupState.__new__(_GroupState)

        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["group_id"] = group_id
        __props__.__dict__["group_name"] = group_name
        __props__.__dict__["join_type"] = join_type
        __props__.__dict__["members"] = members
        __props__.__dict__["source"] = source
        __props__.__dict__["updated_time"] = updated_time
        return Group(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="createdTime")
    def created_time(self) -> pulumi.Output[builtins.str]:
        """
        创建时间。
        """
        return pulumi.get(self, "created_time")

    @property
    @pulumi.getter
    def description(self) -> pulumi.Output[builtins.str]:
        """
        描述。
        """
        return pulumi.get(self, "description")

    @property
    @pulumi.getter(name="displayName")
    def display_name(self) -> pulumi.Output[builtins.str]:
        """
        显示名。
        """
        return pulumi.get(self, "display_name")

    @property
    @pulumi.getter(name="groupId")
    def group_id(self) -> pulumi.Output[builtins.str]:
        """
        用户组id。
        """
        return pulumi.get(self, "group_id")

    @property
    @pulumi.getter(name="groupName")
    def group_name(self) -> pulumi.Output[builtins.str]:
        """
        用户组名称。
        """
        return pulumi.get(self, "group_name")

    @property
    @pulumi.getter(name="joinType")
    def join_type(self) -> pulumi.Output[builtins.str]:
        """
        用户组类型。
        """
        return pulumi.get(self, "join_type")

    @property
    @pulumi.getter
    def members(self) -> pulumi.Output[Sequence['outputs.GroupMember']]:
        return pulumi.get(self, "members")

    @property
    @pulumi.getter
    def source(self) -> pulumi.Output[builtins.str]:
        """
        用户组来源。
        """
        return pulumi.get(self, "source")

    @property
    @pulumi.getter(name="updatedTime")
    def updated_time(self) -> pulumi.Output[builtins.str]:
        """
        更新时间。
        """
        return pulumi.get(self, "updated_time")

