# coding: utf-8

"""
    node-server

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 0.0.237
    Generated by: https://openapi-generator.tech
"""

from datetime import date, datetime  # noqa: F401
import decimal  # noqa: F401
import functools  # noqa: F401
import io  # noqa: F401
import re  # noqa: F401
import typing  # noqa: F401
import typing_extensions  # noqa: F401
import uuid  # noqa: F401

import frozendict  # noqa: F401

from tensorleap_openapi_client import schemas  # noqa: F401


class Project(
    schemas.DictSchema
):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """


    class MetaOapg:
        required = {
            "createdAt",
            "access",
            "createdBy",
            "organization",
            "name",
            "lastAccessed",
            "_id",
            "status",
        }
        
        class properties:
            _id = schemas.StrSchema
            organization = schemas.StrSchema
            createdBy = schemas.StrSchema
            
            
            class createdAt(
                schemas.DateTimeBase,
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                class MetaOapg:
                    format = 'date-time'
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, str, datetime, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'createdAt':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            name = schemas.StrSchema
            lastAccessed = schemas.DateTimeSchema
        
            @staticmethod
            def status() -> typing.Type['ProjectStatus']:
                return ProjectStatus
        
            @staticmethod
            def access() -> typing.Type['ProjectAccess']:
                return ProjectAccess
            description = schemas.StrSchema
            __annotations__ = {
                "_id": _id,
                "organization": organization,
                "createdBy": createdBy,
                "createdAt": createdAt,
                "name": name,
                "lastAccessed": lastAccessed,
                "status": status,
                "access": access,
                "description": description,
            }
        additional_properties = schemas.NotAnyTypeSchema
    
    createdAt: MetaOapg.properties.createdAt
    access: 'ProjectAccess'
    createdBy: MetaOapg.properties.createdBy
    organization: MetaOapg.properties.organization
    name: MetaOapg.properties.name
    lastAccessed: MetaOapg.properties.lastAccessed
    _id: MetaOapg.properties._id
    status: 'ProjectStatus'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createdAt"]) -> MetaOapg.properties.createdAt: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["access"]) -> 'ProjectAccess': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createdBy"]) -> MetaOapg.properties.createdBy: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["lastAccessed"]) -> MetaOapg.properties.lastAccessed: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["_id"]) -> MetaOapg.properties._id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'ProjectStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["description"]) -> MetaOapg.properties.description: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["createdAt"], typing_extensions.Literal["access"], typing_extensions.Literal["createdBy"], typing_extensions.Literal["organization"], typing_extensions.Literal["name"], typing_extensions.Literal["lastAccessed"], typing_extensions.Literal["_id"], typing_extensions.Literal["status"], typing_extensions.Literal["description"], ]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createdAt"]) -> MetaOapg.properties.createdAt: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["access"]) -> 'ProjectAccess': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["createdBy"]) -> MetaOapg.properties.createdBy: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["organization"]) -> MetaOapg.properties.organization: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["lastAccessed"]) -> MetaOapg.properties.lastAccessed: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["_id"]) -> MetaOapg.properties._id: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'ProjectStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["description"]) -> typing.Union[MetaOapg.properties.description, schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["createdAt"], typing_extensions.Literal["access"], typing_extensions.Literal["createdBy"], typing_extensions.Literal["organization"], typing_extensions.Literal["name"], typing_extensions.Literal["lastAccessed"], typing_extensions.Literal["_id"], typing_extensions.Literal["status"], typing_extensions.Literal["description"], ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        createdAt: typing.Union[MetaOapg.properties.createdAt, None, str, datetime, ],
        access: 'ProjectAccess',
        createdBy: typing.Union[MetaOapg.properties.createdBy, str, ],
        organization: typing.Union[MetaOapg.properties.organization, str, ],
        name: typing.Union[MetaOapg.properties.name, str, ],
        lastAccessed: typing.Union[MetaOapg.properties.lastAccessed, str, datetime, ],
        _id: typing.Union[MetaOapg.properties._id, str, ],
        status: 'ProjectStatus',
        description: typing.Union[MetaOapg.properties.description, str, schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
    ) -> 'Project':
        return super().__new__(
            cls,
            *args,
            createdAt=createdAt,
            access=access,
            createdBy=createdBy,
            organization=organization,
            name=name,
            lastAccessed=lastAccessed,
            _id=_id,
            status=status,
            description=description,
            _configuration=_configuration,
        )

from tensorleap_openapi_client.model.project_access import ProjectAccess
from tensorleap_openapi_client.model.project_status import ProjectStatus
