# coding=utf-8
# *** WARNING: this file was generated by pulumigen. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***

import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import _utilities
from . import outputs
from ._enums import *

__all__ = [
    'Owner',
    'Project',
    'ProjectCreateEnvironmentInput',
    'ProjectWithCursor',
]

@pulumi.output_type
class Owner(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "twoFactorAuthEnabled":
            suggest = "two_factor_auth_enabled"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in Owner. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        Owner.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        Owner.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 email: str,
                 id: str,
                 name: str,
                 type: 'OwnerType',
                 two_factor_auth_enabled: Optional[bool] = None):
        """
        :param bool two_factor_auth_enabled: Whether two-factor authentication is enabled for the owner. Only present for user owners.
        """
        pulumi.set(__self__, "email", email)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "type", type)
        if two_factor_auth_enabled is not None:
            pulumi.set(__self__, "two_factor_auth_enabled", two_factor_auth_enabled)

    @property
    @pulumi.getter
    def email(self) -> str:
        return pulumi.get(self, "email")

    @property
    @pulumi.getter
    def id(self) -> str:
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def type(self) -> 'OwnerType':
        return pulumi.get(self, "type")

    @property
    @pulumi.getter(name="twoFactorAuthEnabled")
    def two_factor_auth_enabled(self) -> Optional[bool]:
        """
        Whether two-factor authentication is enabled for the owner. Only present for user owners.
        """
        return pulumi.get(self, "two_factor_auth_enabled")


@pulumi.output_type
class Project(dict):
    """
    A project is a collection of environments
    """
    def __init__(__self__, *,
                 created_at: str,
                 environment_ids: Sequence[str],
                 id: str,
                 name: str,
                 owner: 'outputs.Owner',
                 updated_at: str):
        """
        A project is a collection of environments
        :param Sequence[str] environment_ids: The environments associated with the project
        :param str id: The ID of the project
        :param str name: The name of the project
        """
        pulumi.set(__self__, "created_at", created_at)
        pulumi.set(__self__, "environment_ids", environment_ids)
        pulumi.set(__self__, "id", id)
        pulumi.set(__self__, "name", name)
        pulumi.set(__self__, "owner", owner)
        pulumi.set(__self__, "updated_at", updated_at)

    @property
    @pulumi.getter(name="createdAt")
    def created_at(self) -> str:
        return pulumi.get(self, "created_at")

    @property
    @pulumi.getter(name="environmentIds")
    def environment_ids(self) -> Sequence[str]:
        """
        The environments associated with the project
        """
        return pulumi.get(self, "environment_ids")

    @property
    @pulumi.getter
    def id(self) -> str:
        """
        The ID of the project
        """
        return pulumi.get(self, "id")

    @property
    @pulumi.getter
    def name(self) -> str:
        """
        The name of the project
        """
        return pulumi.get(self, "name")

    @property
    @pulumi.getter
    def owner(self) -> 'outputs.Owner':
        return pulumi.get(self, "owner")

    @property
    @pulumi.getter(name="updatedAt")
    def updated_at(self) -> str:
        return pulumi.get(self, "updated_at")


@pulumi.output_type
class ProjectCreateEnvironmentInput(dict):
    @staticmethod
    def __key_warning(key: str):
        suggest = None
        if key == "protectedStatus":
            suggest = "protected_status"

        if suggest:
            pulumi.log.warn(f"Key '{key}' not found in ProjectCreateEnvironmentInput. Access the value via the '{suggest}' property getter instead.")

    def __getitem__(self, key: str) -> Any:
        ProjectCreateEnvironmentInput.__key_warning(key)
        return super().__getitem__(key)

    def get(self, key: str, default = None) -> Any:
        ProjectCreateEnvironmentInput.__key_warning(key)
        return super().get(key, default)

    def __init__(__self__, *,
                 name: str,
                 protected_status: Optional['ProjectCreateEnvironmentInputProtectedStatus'] = None):
        """
        :param 'ProjectCreateEnvironmentInputProtectedStatus' protected_status: Indicates whether an environment is `unprotected` or `protected`. Only admin users can perform destructive actions in `protected` environments.
        """
        pulumi.set(__self__, "name", name)
        if protected_status is not None:
            pulumi.set(__self__, "protected_status", protected_status)

    @property
    @pulumi.getter
    def name(self) -> str:
        return pulumi.get(self, "name")

    @property
    @pulumi.getter(name="protectedStatus")
    def protected_status(self) -> Optional['ProjectCreateEnvironmentInputProtectedStatus']:
        """
        Indicates whether an environment is `unprotected` or `protected`. Only admin users can perform destructive actions in `protected` environments.
        """
        return pulumi.get(self, "protected_status")


@pulumi.output_type
class ProjectWithCursor(dict):
    def __init__(__self__, *,
                 cursor: str,
                 project: 'outputs.Project'):
        """
        :param 'Project' project: A project is a collection of environments
        """
        pulumi.set(__self__, "cursor", cursor)
        pulumi.set(__self__, "project", project)

    @property
    @pulumi.getter
    def cursor(self) -> str:
        return pulumi.get(self, "cursor")

    @property
    @pulumi.getter
    def project(self) -> 'outputs.Project':
        """
        A project is a collection of environments
        """
        return pulumi.get(self, "project")


