# 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__ = ['OrganizationArgs', 'Organization']

@pulumi.input_type
class OrganizationArgs:
    def __init__(__self__, *,
                 organization: Optional[pulumi.Input['OrganizationOrganizationArgs']] = None,
                 owner: Optional[pulumi.Input['OrganizationOwnerArgs']] = None):
        """
        The set of arguments for constructing a Organization resource.
        :param pulumi.Input['OrganizationOrganizationArgs'] organization: 组织详情
        :param pulumi.Input['OrganizationOwnerArgs'] owner: 管理员详情
        """
        if organization is not None:
            pulumi.set(__self__, "organization", organization)
        if owner is not None:
            pulumi.set(__self__, "owner", owner)

    @property
    @pulumi.getter
    def organization(self) -> Optional[pulumi.Input['OrganizationOrganizationArgs']]:
        """
        组织详情
        """
        return pulumi.get(self, "organization")

    @organization.setter
    def organization(self, value: Optional[pulumi.Input['OrganizationOrganizationArgs']]):
        pulumi.set(self, "organization", value)

    @property
    @pulumi.getter
    def owner(self) -> Optional[pulumi.Input['OrganizationOwnerArgs']]:
        """
        管理员详情
        """
        return pulumi.get(self, "owner")

    @owner.setter
    def owner(self, value: Optional[pulumi.Input['OrganizationOwnerArgs']]):
        pulumi.set(self, "owner", value)


@pulumi.input_type
class _OrganizationState:
    def __init__(__self__, *,
                 organization: Optional[pulumi.Input['OrganizationOrganizationArgs']] = None,
                 organization_id: Optional[pulumi.Input[builtins.str]] = None,
                 owner: Optional[pulumi.Input['OrganizationOwnerArgs']] = None):
        """
        Input properties used for looking up and filtering Organization resources.
        :param pulumi.Input['OrganizationOrganizationArgs'] organization: 组织详情
        :param pulumi.Input[builtins.str] organization_id: 组织ID
        :param pulumi.Input['OrganizationOwnerArgs'] owner: 管理员详情
        """
        if organization is not None:
            pulumi.set(__self__, "organization", organization)
        if organization_id is not None:
            pulumi.set(__self__, "organization_id", organization_id)
        if owner is not None:
            pulumi.set(__self__, "owner", owner)

    @property
    @pulumi.getter
    def organization(self) -> Optional[pulumi.Input['OrganizationOrganizationArgs']]:
        """
        组织详情
        """
        return pulumi.get(self, "organization")

    @organization.setter
    def organization(self, value: Optional[pulumi.Input['OrganizationOrganizationArgs']]):
        pulumi.set(self, "organization", value)

    @property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        组织ID
        """
        return pulumi.get(self, "organization_id")

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

    @property
    @pulumi.getter
    def owner(self) -> Optional[pulumi.Input['OrganizationOwnerArgs']]:
        """
        管理员详情
        """
        return pulumi.get(self, "owner")

    @owner.setter
    def owner(self, value: Optional[pulumi.Input['OrganizationOwnerArgs']]):
        pulumi.set(self, "owner", value)


@pulumi.type_token("bytepluscc:organization/organization:Organization")
class Organization(pulumi.CustomResource):
    @overload
    def __init__(__self__,
                 resource_name: str,
                 opts: Optional[pulumi.ResourceOptions] = None,
                 organization: Optional[pulumi.Input[Union['OrganizationOrganizationArgs', 'OrganizationOrganizationArgsDict']]] = None,
                 owner: Optional[pulumi.Input[Union['OrganizationOwnerArgs', 'OrganizationOwnerArgsDict']]] = None,
                 __props__=None):
        """
        企业组织管理

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        organization_demo = bytepluscc.organization.Organization("organizationDemo")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:organization/organization:Organization example "organization_id"
        ```

        :param str resource_name: The name of the resource.
        :param pulumi.ResourceOptions opts: Options for the resource.
        :param pulumi.Input[Union['OrganizationOrganizationArgs', 'OrganizationOrganizationArgsDict']] organization: 组织详情
        :param pulumi.Input[Union['OrganizationOwnerArgs', 'OrganizationOwnerArgsDict']] owner: 管理员详情
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: Optional[OrganizationArgs] = None,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        企业组织管理

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        organization_demo = bytepluscc.organization.Organization("organizationDemo")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:organization/organization:Organization example "organization_id"
        ```

        :param str resource_name: The name of the resource.
        :param OrganizationArgs 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(OrganizationArgs, 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,
                 organization: Optional[pulumi.Input[Union['OrganizationOrganizationArgs', 'OrganizationOrganizationArgsDict']]] = None,
                 owner: Optional[pulumi.Input[Union['OrganizationOwnerArgs', 'OrganizationOwnerArgsDict']]] = 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__ = OrganizationArgs.__new__(OrganizationArgs)

            __props__.__dict__["organization"] = organization
            __props__.__dict__["owner"] = owner
            __props__.__dict__["organization_id"] = None
        super(Organization, __self__).__init__(
            'bytepluscc:organization/organization:Organization',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            organization: Optional[pulumi.Input[Union['OrganizationOrganizationArgs', 'OrganizationOrganizationArgsDict']]] = None,
            organization_id: Optional[pulumi.Input[builtins.str]] = None,
            owner: Optional[pulumi.Input[Union['OrganizationOwnerArgs', 'OrganizationOwnerArgsDict']]] = None) -> 'Organization':
        """
        Get an existing Organization 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[Union['OrganizationOrganizationArgs', 'OrganizationOrganizationArgsDict']] organization: 组织详情
        :param pulumi.Input[builtins.str] organization_id: 组织ID
        :param pulumi.Input[Union['OrganizationOwnerArgs', 'OrganizationOwnerArgsDict']] owner: 管理员详情
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _OrganizationState.__new__(_OrganizationState)

        __props__.__dict__["organization"] = organization
        __props__.__dict__["organization_id"] = organization_id
        __props__.__dict__["owner"] = owner
        return Organization(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter
    def organization(self) -> pulumi.Output['outputs.OrganizationOrganization']:
        """
        组织详情
        """
        return pulumi.get(self, "organization")

    @property
    @pulumi.getter(name="organizationId")
    def organization_id(self) -> pulumi.Output[builtins.str]:
        """
        组织ID
        """
        return pulumi.get(self, "organization_id")

    @property
    @pulumi.getter
    def owner(self) -> pulumi.Output['outputs.OrganizationOwner']:
        """
        管理员详情
        """
        return pulumi.get(self, "owner")

