# 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__ = ['ProjectArgs', 'Project']

@pulumi.input_type
class ProjectArgs:
    def __init__(__self__, *,
                 project_name: pulumi.Input[builtins.str],
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 parent_project_name: Optional[pulumi.Input[builtins.str]] = None):
        """
        The set of arguments for constructing a Project resource.
        :param pulumi.Input[builtins.str] project_name: 项目名称
        :param pulumi.Input[builtins.str] description: 描述
        :param pulumi.Input[builtins.str] display_name: 展示名
        :param pulumi.Input[builtins.str] parent_project_name: 父项目名称
        """
        pulumi.set(__self__, "project_name", project_name)
        if description is not None:
            pulumi.set(__self__, "description", description)
        if display_name is not None:
            pulumi.set(__self__, "display_name", display_name)
        if parent_project_name is not None:
            pulumi.set(__self__, "parent_project_name", parent_project_name)

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> pulumi.Input[builtins.str]:
        """
        项目名称
        """
        return pulumi.get(self, "project_name")

    @project_name.setter
    def project_name(self, value: pulumi.Input[builtins.str]):
        pulumi.set(self, "project_name", 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="parentProjectName")
    def parent_project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        父项目名称
        """
        return pulumi.get(self, "parent_project_name")

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


@pulumi.input_type
class _ProjectState:
    def __init__(__self__, *,
                 account_id: Optional[pulumi.Input[builtins.int]] = None,
                 created_time: Optional[pulumi.Input[builtins.str]] = None,
                 description: Optional[pulumi.Input[builtins.str]] = None,
                 display_name: Optional[pulumi.Input[builtins.str]] = None,
                 has_permission: Optional[pulumi.Input[builtins.bool]] = None,
                 parent_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 path: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 status: Optional[pulumi.Input[builtins.str]] = None,
                 updated_time: Optional[pulumi.Input[builtins.str]] = None):
        """
        Input properties used for looking up and filtering Project resources.
        :param pulumi.Input[builtins.int] account_id: 账号ID
        :param pulumi.Input[builtins.str] created_time: 创建时间
        :param pulumi.Input[builtins.str] description: 描述
        :param pulumi.Input[builtins.str] display_name: 展示名
        :param pulumi.Input[builtins.bool] has_permission: 是否可见
        :param pulumi.Input[builtins.str] parent_project_name: 父项目名称
        :param pulumi.Input[builtins.str] path: 项目路径
        :param pulumi.Input[builtins.str] project_name: 项目名称
        :param pulumi.Input[builtins.str] status: 启用状态
        :param pulumi.Input[builtins.str] updated_time: 更新时间
        """
        if account_id is not None:
            pulumi.set(__self__, "account_id", account_id)
        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 has_permission is not None:
            pulumi.set(__self__, "has_permission", has_permission)
        if parent_project_name is not None:
            pulumi.set(__self__, "parent_project_name", parent_project_name)
        if path is not None:
            pulumi.set(__self__, "path", path)
        if project_name is not None:
            pulumi.set(__self__, "project_name", project_name)
        if status is not None:
            pulumi.set(__self__, "status", status)
        if updated_time is not None:
            pulumi.set(__self__, "updated_time", updated_time)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> Optional[pulumi.Input[builtins.int]]:
        """
        账号ID
        """
        return pulumi.get(self, "account_id")

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

    @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="hasPermission")
    def has_permission(self) -> Optional[pulumi.Input[builtins.bool]]:
        """
        是否可见
        """
        return pulumi.get(self, "has_permission")

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

    @property
    @pulumi.getter(name="parentProjectName")
    def parent_project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        父项目名称
        """
        return pulumi.get(self, "parent_project_name")

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

    @property
    @pulumi.getter
    def path(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        项目路径
        """
        return pulumi.get(self, "path")

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

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        项目名称
        """
        return pulumi.get(self, "project_name")

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

    @property
    @pulumi.getter
    def status(self) -> Optional[pulumi.Input[builtins.str]]:
        """
        启用状态
        """
        return pulumi.get(self, "status")

    @status.setter
    def status(self, value: Optional[pulumi.Input[builtins.str]]):
        pulumi.set(self, "status", 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:iam/project:Project")
class Project(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,
                 parent_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = None,
                 __props__=None):
        """
        资源项目（Project）是提供的一种资源分组管理的机制，帮助您达成逻辑层面的资源隔离，您能够通过资源项目进行项目制授权和分账等操作。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        i_am_project_demo = bytepluscc.iam.Project("IAMProjectDemo",
            description="IAMProjectDemo description",
            project_name="default",
            display_name="IAMProjectDemo",
            parent_project_name="default")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:iam/project:Project example "project_name"
        ```

        :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] parent_project_name: 父项目名称
        :param pulumi.Input[builtins.str] project_name: 项目名称
        """
        ...
    @overload
    def __init__(__self__,
                 resource_name: str,
                 args: ProjectArgs,
                 opts: Optional[pulumi.ResourceOptions] = None):
        """
        资源项目（Project）是提供的一种资源分组管理的机制，帮助您达成逻辑层面的资源隔离，您能够通过资源项目进行项目制授权和分账等操作。

        ## Example Usage

        ```python
        import pulumi
        import pulumi_bytepluscc as bytepluscc

        i_am_project_demo = bytepluscc.iam.Project("IAMProjectDemo",
            description="IAMProjectDemo description",
            project_name="default",
            display_name="IAMProjectDemo",
            parent_project_name="default")
        ```

        ## Import

        ```sh
        $ pulumi import bytepluscc:iam/project:Project example "project_name"
        ```

        :param str resource_name: The name of the resource.
        :param ProjectArgs 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(ProjectArgs, 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,
                 parent_project_name: Optional[pulumi.Input[builtins.str]] = None,
                 project_name: Optional[pulumi.Input[builtins.str]] = 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__ = ProjectArgs.__new__(ProjectArgs)

            __props__.__dict__["description"] = description
            __props__.__dict__["display_name"] = display_name
            __props__.__dict__["parent_project_name"] = parent_project_name
            if project_name is None and not opts.urn:
                raise TypeError("Missing required property 'project_name'")
            __props__.__dict__["project_name"] = project_name
            __props__.__dict__["account_id"] = None
            __props__.__dict__["created_time"] = None
            __props__.__dict__["has_permission"] = None
            __props__.__dict__["path"] = None
            __props__.__dict__["status"] = None
            __props__.__dict__["updated_time"] = None
        super(Project, __self__).__init__(
            'bytepluscc:iam/project:Project',
            resource_name,
            __props__,
            opts)

    @staticmethod
    def get(resource_name: str,
            id: pulumi.Input[str],
            opts: Optional[pulumi.ResourceOptions] = None,
            account_id: Optional[pulumi.Input[builtins.int]] = None,
            created_time: Optional[pulumi.Input[builtins.str]] = None,
            description: Optional[pulumi.Input[builtins.str]] = None,
            display_name: Optional[pulumi.Input[builtins.str]] = None,
            has_permission: Optional[pulumi.Input[builtins.bool]] = None,
            parent_project_name: Optional[pulumi.Input[builtins.str]] = None,
            path: Optional[pulumi.Input[builtins.str]] = None,
            project_name: Optional[pulumi.Input[builtins.str]] = None,
            status: Optional[pulumi.Input[builtins.str]] = None,
            updated_time: Optional[pulumi.Input[builtins.str]] = None) -> 'Project':
        """
        Get an existing Project 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.int] account_id: 账号ID
        :param pulumi.Input[builtins.str] created_time: 创建时间
        :param pulumi.Input[builtins.str] description: 描述
        :param pulumi.Input[builtins.str] display_name: 展示名
        :param pulumi.Input[builtins.bool] has_permission: 是否可见
        :param pulumi.Input[builtins.str] parent_project_name: 父项目名称
        :param pulumi.Input[builtins.str] path: 项目路径
        :param pulumi.Input[builtins.str] project_name: 项目名称
        :param pulumi.Input[builtins.str] status: 启用状态
        :param pulumi.Input[builtins.str] updated_time: 更新时间
        """
        opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))

        __props__ = _ProjectState.__new__(_ProjectState)

        __props__.__dict__["account_id"] = account_id
        __props__.__dict__["created_time"] = created_time
        __props__.__dict__["description"] = description
        __props__.__dict__["display_name"] = display_name
        __props__.__dict__["has_permission"] = has_permission
        __props__.__dict__["parent_project_name"] = parent_project_name
        __props__.__dict__["path"] = path
        __props__.__dict__["project_name"] = project_name
        __props__.__dict__["status"] = status
        __props__.__dict__["updated_time"] = updated_time
        return Project(resource_name, opts=opts, __props__=__props__)

    @property
    @pulumi.getter(name="accountId")
    def account_id(self) -> pulumi.Output[builtins.int]:
        """
        账号ID
        """
        return pulumi.get(self, "account_id")

    @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="hasPermission")
    def has_permission(self) -> pulumi.Output[builtins.bool]:
        """
        是否可见
        """
        return pulumi.get(self, "has_permission")

    @property
    @pulumi.getter(name="parentProjectName")
    def parent_project_name(self) -> pulumi.Output[builtins.str]:
        """
        父项目名称
        """
        return pulumi.get(self, "parent_project_name")

    @property
    @pulumi.getter
    def path(self) -> pulumi.Output[builtins.str]:
        """
        项目路径
        """
        return pulumi.get(self, "path")

    @property
    @pulumi.getter(name="projectName")
    def project_name(self) -> pulumi.Output[builtins.str]:
        """
        项目名称
        """
        return pulumi.get(self, "project_name")

    @property
    @pulumi.getter
    def status(self) -> pulumi.Output[builtins.str]:
        """
        启用状态
        """
        return pulumi.get(self, "status")

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

