# 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

__all__ = [
    'GetUnitResult',
    'AwaitableGetUnitResult',
    'get_unit',
    'get_unit_output',
]

@pulumi.output_type
class GetUnitResult:
    """
    A collection of values returned by getUnit.
    """
    def __init__(__self__, created_time=None, delete_uk=None, deleted_time=None, depth=None, description=None, id=None, name=None, org_id=None, org_type=None, org_unit_id=None, owner=None, parent_id=None, updated_time=None):
        if created_time and not isinstance(created_time, str):
            raise TypeError("Expected argument 'created_time' to be a str")
        pulumi.set(__self__, "created_time", created_time)
        if delete_uk and not isinstance(delete_uk, str):
            raise TypeError("Expected argument 'delete_uk' to be a str")
        pulumi.set(__self__, "delete_uk", delete_uk)
        if deleted_time and not isinstance(deleted_time, str):
            raise TypeError("Expected argument 'deleted_time' to be a str")
        pulumi.set(__self__, "deleted_time", deleted_time)
        if depth and not isinstance(depth, int):
            raise TypeError("Expected argument 'depth' to be a int")
        pulumi.set(__self__, "depth", depth)
        if description and not isinstance(description, str):
            raise TypeError("Expected argument 'description' to be a str")
        pulumi.set(__self__, "description", description)
        if id and not isinstance(id, str):
            raise TypeError("Expected argument 'id' to be a str")
        pulumi.set(__self__, "id", id)
        if name and not isinstance(name, str):
            raise TypeError("Expected argument 'name' to be a str")
        pulumi.set(__self__, "name", name)
        if org_id and not isinstance(org_id, str):
            raise TypeError("Expected argument 'org_id' to be a str")
        pulumi.set(__self__, "org_id", org_id)
        if org_type and not isinstance(org_type, int):
            raise TypeError("Expected argument 'org_type' to be a int")
        pulumi.set(__self__, "org_type", org_type)
        if org_unit_id and not isinstance(org_unit_id, str):
            raise TypeError("Expected argument 'org_unit_id' to be a str")
        pulumi.set(__self__, "org_unit_id", org_unit_id)
        if owner and not isinstance(owner, str):
            raise TypeError("Expected argument 'owner' to be a str")
        pulumi.set(__self__, "owner", owner)
        if parent_id and not isinstance(parent_id, str):
            raise TypeError("Expected argument 'parent_id' to be a str")
        pulumi.set(__self__, "parent_id", parent_id)
        if updated_time and not isinstance(updated_time, str):
            raise TypeError("Expected argument 'updated_time' to be a str")
        pulumi.set(__self__, "updated_time", updated_time)

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

    @property
    @pulumi.getter(name="deleteUk")
    def delete_uk(self) -> builtins.str:
        """
        删除标识。
        """
        return pulumi.get(self, "delete_uk")

    @property
    @pulumi.getter(name="deletedTime")
    def deleted_time(self) -> builtins.str:
        """
        删除时间。
        """
        return pulumi.get(self, "deleted_time")

    @property
    @pulumi.getter
    def depth(self) -> builtins.int:
        """
        深度。
        """
        return pulumi.get(self, "depth")

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

    @property
    @pulumi.getter
    def id(self) -> builtins.str:
        """
        Uniquely identifies the resource.
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> builtins.str:
        """
        组织单元名称。
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="orgId")
    def org_id(self) -> builtins.str:
        """
        组织ID。
        """
        return pulumi.get(self, "org_id")

    @property
    @pulumi.getter(name="orgType")
    def org_type(self) -> builtins.int:
        """
        组织类型。企业组织： 1
        """
        return pulumi.get(self, "org_type")

    @property
    @pulumi.getter(name="orgUnitId")
    def org_unit_id(self) -> builtins.str:
        """
        组织单元ID。
        """
        return pulumi.get(self, "org_unit_id")

    @property
    @pulumi.getter
    def owner(self) -> builtins.str:
        """
        管理员ID。
        """
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter(name="parentId")
    def parent_id(self) -> builtins.str:
        """
        父单元Id。
        """
        return pulumi.get(self, "parent_id")

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


class AwaitableGetUnitResult(GetUnitResult):
    # pylint: disable=using-constant-test
    def __await__(self):
        if False:
            yield self
        return GetUnitResult(
            created_time=self.created_time,
            delete_uk=self.delete_uk,
            deleted_time=self.deleted_time,
            depth=self.depth,
            description=self.description,
            id=self.id,
            name=self.name,
            org_id=self.org_id,
            org_type=self.org_type,
            org_unit_id=self.org_unit_id,
            owner=self.owner,
            parent_id=self.parent_id,
            updated_time=self.updated_time)


def get_unit(id: Optional[builtins.str] = None,
             opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUnitResult:
    """
    Data Source schema for Byteplus::Organization::Unit


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke('bytepluscc:organization/getUnit:getUnit', __args__, opts=opts, typ=GetUnitResult).value

    return AwaitableGetUnitResult(
        created_time=pulumi.get(__ret__, 'created_time'),
        delete_uk=pulumi.get(__ret__, 'delete_uk'),
        deleted_time=pulumi.get(__ret__, 'deleted_time'),
        depth=pulumi.get(__ret__, 'depth'),
        description=pulumi.get(__ret__, 'description'),
        id=pulumi.get(__ret__, 'id'),
        name=pulumi.get(__ret__, 'name'),
        org_id=pulumi.get(__ret__, 'org_id'),
        org_type=pulumi.get(__ret__, 'org_type'),
        org_unit_id=pulumi.get(__ret__, 'org_unit_id'),
        owner=pulumi.get(__ret__, 'owner'),
        parent_id=pulumi.get(__ret__, 'parent_id'),
        updated_time=pulumi.get(__ret__, 'updated_time'))
def get_unit_output(id: Optional[pulumi.Input[builtins.str]] = None,
                    opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetUnitResult]:
    """
    Data Source schema for Byteplus::Organization::Unit


    :param builtins.str id: Uniquely identifies the resource.
    """
    __args__ = dict()
    __args__['id'] = id
    opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
    __ret__ = pulumi.runtime.invoke_output('bytepluscc:organization/getUnit:getUnit', __args__, opts=opts, typ=GetUnitResult)
    return __ret__.apply(lambda __response__: GetUnitResult(
        created_time=pulumi.get(__response__, 'created_time'),
        delete_uk=pulumi.get(__response__, 'delete_uk'),
        deleted_time=pulumi.get(__response__, 'deleted_time'),
        depth=pulumi.get(__response__, 'depth'),
        description=pulumi.get(__response__, 'description'),
        id=pulumi.get(__response__, 'id'),
        name=pulumi.get(__response__, 'name'),
        org_id=pulumi.get(__response__, 'org_id'),
        org_type=pulumi.get(__response__, 'org_type'),
        org_unit_id=pulumi.get(__response__, 'org_unit_id'),
        owner=pulumi.get(__response__, 'owner'),
        parent_id=pulumi.get(__response__, 'parent_id'),
        updated_time=pulumi.get(__response__, 'updated_time')))
