# 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 Job(
    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",
            "createdBy",
            "organization",
            "model",
            "_id",
            "type",
            "version",
            "status",
            "updatedAt",
        }
        
        class properties:
            _id = schemas.StrSchema
            createdBy = schemas.StrSchema
            version = schemas.StrSchema
        
            @staticmethod
            def type() -> typing.Type['JobTypeEnum']:
                return JobTypeEnum
        
            @staticmethod
            def status() -> typing.Type['JobStatus']:
                return JobStatus
            createdAt = schemas.DateTimeSchema
            updatedAt = schemas.DateTimeSchema
            
            
            class model(
                schemas.StrBase,
                schemas.NoneBase,
                schemas.Schema,
                schemas.NoneStrMixin
            ):
            
            
                def __new__(
                    cls,
                    *args: typing.Union[None, str, ],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'model':
                    return super().__new__(
                        cls,
                        *args,
                        _configuration=_configuration,
                    )
            organization = schemas.StrSchema
        
            @staticmethod
            def params() -> typing.Type['JobParams']:
                return JobParams
            __annotations__ = {
                "_id": _id,
                "createdBy": createdBy,
                "version": version,
                "type": type,
                "status": status,
                "createdAt": createdAt,
                "updatedAt": updatedAt,
                "model": model,
                "organization": organization,
                "params": params,
            }
        additional_properties = schemas.NotAnyTypeSchema
    
    createdAt: MetaOapg.properties.createdAt
    createdBy: MetaOapg.properties.createdBy
    organization: MetaOapg.properties.organization
    model: MetaOapg.properties.model
    _id: MetaOapg.properties._id
    type: 'JobTypeEnum'
    version: MetaOapg.properties.version
    status: 'JobStatus'
    updatedAt: MetaOapg.properties.updatedAt
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["createdAt"]) -> MetaOapg.properties.createdAt: ...
    
    @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["model"]) -> MetaOapg.properties.model: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["_id"]) -> MetaOapg.properties._id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["type"]) -> 'JobTypeEnum': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["version"]) -> MetaOapg.properties.version: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["status"]) -> 'JobStatus': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["updatedAt"]) -> MetaOapg.properties.updatedAt: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["params"]) -> 'JobParams': ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["createdAt"], typing_extensions.Literal["createdBy"], typing_extensions.Literal["organization"], typing_extensions.Literal["model"], typing_extensions.Literal["_id"], typing_extensions.Literal["type"], typing_extensions.Literal["version"], typing_extensions.Literal["status"], typing_extensions.Literal["updatedAt"], typing_extensions.Literal["params"], ]):
        # 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["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["model"]) -> MetaOapg.properties.model: ...
    
    @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["type"]) -> 'JobTypeEnum': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["version"]) -> MetaOapg.properties.version: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> 'JobStatus': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["updatedAt"]) -> MetaOapg.properties.updatedAt: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["params"]) -> typing.Union['JobParams', schemas.Unset]: ...
    
    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["createdAt"], typing_extensions.Literal["createdBy"], typing_extensions.Literal["organization"], typing_extensions.Literal["model"], typing_extensions.Literal["_id"], typing_extensions.Literal["type"], typing_extensions.Literal["version"], typing_extensions.Literal["status"], typing_extensions.Literal["updatedAt"], typing_extensions.Literal["params"], ]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        createdAt: typing.Union[MetaOapg.properties.createdAt, str, datetime, ],
        createdBy: typing.Union[MetaOapg.properties.createdBy, str, ],
        organization: typing.Union[MetaOapg.properties.organization, str, ],
        model: typing.Union[MetaOapg.properties.model, None, str, ],
        _id: typing.Union[MetaOapg.properties._id, str, ],
        type: 'JobTypeEnum',
        version: typing.Union[MetaOapg.properties.version, str, ],
        status: 'JobStatus',
        updatedAt: typing.Union[MetaOapg.properties.updatedAt, str, datetime, ],
        params: typing.Union['JobParams', schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
    ) -> 'Job':
        return super().__new__(
            cls,
            *args,
            createdAt=createdAt,
            createdBy=createdBy,
            organization=organization,
            model=model,
            _id=_id,
            type=type,
            version=version,
            status=status,
            updatedAt=updatedAt,
            params=params,
            _configuration=_configuration,
        )

from tensorleap_openapi_client.model.job_params import JobParams
from tensorleap_openapi_client.model.job_status import JobStatus
from tensorleap_openapi_client.model.job_type_enum import JobTypeEnum
