# coding: utf-8
"""
    InductivaWebAPI

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

    The version of the OpenAPI document: 0.1.0
    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 inductiva.client import schemas  # noqa: F401


class MachineInfo(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 = {
            "cpu_count_logical",
            "cpu_count_physical",
            "memory_bytes",
            "uuid",
        }

        class properties:
            uuid = schemas.StrSchema
            cpu_count_logical = schemas.IntSchema
            cpu_count_physical = schemas.IntSchema
            memory_bytes = schemas.IntSchema

            class host_name(
                    schemas.ComposedSchema,):

                class MetaOapg:
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema

                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                        str,
                        date,
                        datetime,
                        uuid.UUID,
                        int,
                        float,
                        decimal.Decimal,
                        bool,
                        None,
                        list,
                        tuple,
                        bytes,
                        io.FileIO,
                        io.BufferedReader,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                                           frozendict.frozendict, str, date,
                                           datetime, uuid.UUID, int, float,
                                           decimal.Decimal, None, list, tuple,
                                           bytes],
                ) -> 'host_name':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            class started_at(
                    schemas.DateTimeBase,
                    schemas.ComposedSchema,
            ):

                class MetaOapg:
                    format = 'date-time'
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema

                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                        str,
                        date,
                        datetime,
                        uuid.UUID,
                        int,
                        float,
                        decimal.Decimal,
                        bool,
                        None,
                        list,
                        tuple,
                        bytes,
                        io.FileIO,
                        io.BufferedReader,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                                           frozendict.frozendict, str, date,
                                           datetime, uuid.UUID, int, float,
                                           decimal.Decimal, None, list, tuple,
                                           bytes],
                ) -> 'started_at':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            class terminated_at(
                    schemas.DateTimeBase,
                    schemas.ComposedSchema,
            ):

                class MetaOapg:
                    format = 'date-time'
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema

                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                        str,
                        date,
                        datetime,
                        uuid.UUID,
                        int,
                        float,
                        decimal.Decimal,
                        bool,
                        None,
                        list,
                        tuple,
                        bytes,
                        io.FileIO,
                        io.BufferedReader,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                                           frozendict.frozendict, str, date,
                                           datetime, uuid.UUID, int, float,
                                           decimal.Decimal, None, list, tuple,
                                           bytes],
                ) -> 'terminated_at':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            class last_seen_at(
                    schemas.DateTimeBase,
                    schemas.ComposedSchema,
            ):

                class MetaOapg:
                    format = 'date-time'
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema

                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                        str,
                        date,
                        datetime,
                        uuid.UUID,
                        int,
                        float,
                        decimal.Decimal,
                        bool,
                        None,
                        list,
                        tuple,
                        bytes,
                        io.FileIO,
                        io.BufferedReader,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                                           frozendict.frozendict, str, date,
                                           datetime, uuid.UUID, int, float,
                                           decimal.Decimal, None, list, tuple,
                                           bytes],
                ) -> 'last_seen_at':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            class current_task_id(
                    schemas.ComposedSchema,):

                class MetaOapg:
                    any_of_0 = schemas.StrSchema
                    any_of_1 = schemas.NoneSchema

                    @classmethod
                    @functools.lru_cache()
                    def any_of(cls):
                        # we need this here to make our import statements work
                        # we must store _composed_schemas in here so the code is only run
                        # when we invoke this method. If we kept this at the class
                        # level we would get an error because the class level
                        # code would be run when this module is imported, and these composed
                        # classes don't exist yet because their module has not finished
                        # loading
                        return [
                            cls.any_of_0,
                            cls.any_of_1,
                        ]

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                        str,
                        date,
                        datetime,
                        uuid.UUID,
                        int,
                        float,
                        decimal.Decimal,
                        bool,
                        None,
                        list,
                        tuple,
                        bytes,
                        io.FileIO,
                        io.BufferedReader,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                                           frozendict.frozendict, str, date,
                                           datetime, uuid.UUID, int, float,
                                           decimal.Decimal, None, list, tuple,
                                           bytes],
                ) -> 'current_task_id':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            __annotations__ = {
                "uuid": uuid,
                "cpu_count_logical": cpu_count_logical,
                "cpu_count_physical": cpu_count_physical,
                "memory_bytes": memory_bytes,
                "host_name": host_name,
                "started_at": started_at,
                "terminated_at": terminated_at,
                "last_seen_at": last_seen_at,
                "current_task_id": current_task_id,
            }

    cpu_count_logical: MetaOapg.properties.cpu_count_logical
    cpu_count_physical: MetaOapg.properties.cpu_count_physical
    memory_bytes: MetaOapg.properties.memory_bytes
    uuid: MetaOapg.properties.uuid

    @typing.overload
    def __getitem__(
            self, name: typing_extensions.Literal["uuid"]
    ) -> MetaOapg.properties.uuid:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["cpu_count_logical"]
    ) -> MetaOapg.properties.cpu_count_logical:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["cpu_count_physical"]
    ) -> MetaOapg.properties.cpu_count_physical:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["memory_bytes"]
    ) -> MetaOapg.properties.memory_bytes:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["host_name"]
    ) -> MetaOapg.properties.host_name:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["started_at"]
    ) -> MetaOapg.properties.started_at:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["terminated_at"]
    ) -> MetaOapg.properties.terminated_at:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["last_seen_at"]
    ) -> MetaOapg.properties.last_seen_at:
        ...

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["current_task_id"]
    ) -> MetaOapg.properties.current_task_id:
        ...

    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema:
        ...

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "uuid",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory_bytes",
        "host_name",
        "started_at",
        "terminated_at",
        "last_seen_at",
        "current_task_id",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

    @typing.overload
    def get_item_oapg(
            self, name: typing_extensions.Literal["uuid"]
    ) -> MetaOapg.properties.uuid:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["cpu_count_logical"]
    ) -> MetaOapg.properties.cpu_count_logical:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["cpu_count_physical"]
    ) -> MetaOapg.properties.cpu_count_physical:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["memory_bytes"]
    ) -> MetaOapg.properties.memory_bytes:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["host_name"]
    ) -> typing.Union[MetaOapg.properties.host_name, schemas.Unset]:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["started_at"]
    ) -> typing.Union[MetaOapg.properties.started_at, schemas.Unset]:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["terminated_at"]
    ) -> typing.Union[MetaOapg.properties.terminated_at, schemas.Unset]:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["last_seen_at"]
    ) -> typing.Union[MetaOapg.properties.last_seen_at, schemas.Unset]:
        ...

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["current_task_id"]
    ) -> typing.Union[MetaOapg.properties.current_task_id, schemas.Unset]:
        ...

    @typing.overload
    def get_item_oapg(
            self, name: str
    ) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]:
        ...

    def get_item_oapg(self, name: typing.Union[typing_extensions.Literal[
        "uuid",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory_bytes",
        "host_name",
        "started_at",
        "terminated_at",
        "last_seen_at",
        "current_task_id",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        cpu_count_logical: typing.Union[
            MetaOapg.properties.cpu_count_logical,
            decimal.Decimal,
            int,
        ],
        cpu_count_physical: typing.Union[
            MetaOapg.properties.cpu_count_physical,
            decimal.Decimal,
            int,
        ],
        memory_bytes: typing.Union[
            MetaOapg.properties.memory_bytes,
            decimal.Decimal,
            int,
        ],
        uuid: typing.Union[
            MetaOapg.properties.uuid,
            str,
        ],
        host_name: typing.Union[MetaOapg.properties.host_name, dict,
                                frozendict.frozendict, str, date, datetime,
                                uuid.UUID, int, float, decimal.Decimal, bool,
                                None, list, tuple, bytes, io.FileIO,
                                io.BufferedReader,
                                schemas.Unset] = schemas.unset,
        started_at: typing.Union[MetaOapg.properties.started_at, dict,
                                 frozendict.frozendict, str, date, datetime,
                                 uuid.UUID, int, float, decimal.Decimal, bool,
                                 None, list, tuple, bytes, io.FileIO,
                                 io.BufferedReader,
                                 schemas.Unset] = schemas.unset,
        terminated_at: typing.Union[MetaOapg.properties.terminated_at, dict,
                                    frozendict.frozendict, str, date, datetime,
                                    uuid.UUID, int, float, decimal.Decimal,
                                    bool, None, list, tuple, bytes, io.FileIO,
                                    io.BufferedReader,
                                    schemas.Unset] = schemas.unset,
        last_seen_at: typing.Union[MetaOapg.properties.last_seen_at, dict,
                                   frozendict.frozendict, str, date, datetime,
                                   uuid.UUID, int, float, decimal.Decimal, bool,
                                   None, list, tuple, bytes, io.FileIO,
                                   io.BufferedReader,
                                   schemas.Unset] = schemas.unset,
        current_task_id: typing.Union[MetaOapg.properties.current_task_id, dict,
                                      frozendict.frozendict, str, date,
                                      datetime, uuid.UUID, int, float,
                                      decimal.Decimal, bool, None, list, tuple,
                                      bytes, io.FileIO, io.BufferedReader,
                                      schemas.Unset] = schemas.unset,
        _configuration: typing.Optional[schemas.Configuration] = None,
        **kwargs: typing.Union[schemas.AnyTypeSchema, dict,
                               frozendict.frozendict, str, date, datetime,
                               uuid.UUID, int, float, decimal.Decimal, None,
                               list, tuple, bytes],
    ) -> 'MachineInfo':
        return super().__new__(
            cls,
            *_args,
            cpu_count_logical=cpu_count_logical,
            cpu_count_physical=cpu_count_physical,
            memory_bytes=memory_bytes,
            uuid=uuid,
            host_name=host_name,
            started_at=started_at,
            terminated_at=terminated_at,
            last_seen_at=last_seen_at,
            current_task_id=current_task_id,
            _configuration=_configuration,
            **kwargs,
        )
