# 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 ExecuterCreate(schemas.DictSchema):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.

    Info for creating an executer.
    """

    class MetaOapg:
        required = {
            "memory",
            "cpu_info",
            "create_time",
            "cpu_count_logical",
            "cpu_count_physical",
            "executer_type",
            "host_info",
        }

        class properties:
            create_time = schemas.DateTimeSchema
            executer_type = schemas.StrSchema
            cpu_count_logical = schemas.IntSchema
            cpu_count_physical = schemas.IntSchema
            memory = schemas.IntSchema
            cpu_info = schemas.StrSchema

            class host_info(
                    schemas.ComposedSchema,):

                class MetaOapg:

                    @classmethod
                    @functools.lru_cache()
                    def one_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 [
                            GCloudHostInfo,
                            InductivaHostInfo,
                        ]

                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_info':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            resource_pool_id = schemas.StrSchema
            __annotations__ = {
                "create_time": create_time,
                "executer_type": executer_type,
                "cpu_count_logical": cpu_count_logical,
                "cpu_count_physical": cpu_count_physical,
                "memory": memory,
                "cpu_info": cpu_info,
                "host_info": host_info,
                "resource_pool_id": resource_pool_id,
            }

    memory: MetaOapg.properties.memory
    cpu_info: MetaOapg.properties.cpu_info
    create_time: MetaOapg.properties.create_time
    cpu_count_logical: MetaOapg.properties.cpu_count_logical
    cpu_count_physical: MetaOapg.properties.cpu_count_physical
    executer_type: MetaOapg.properties.executer_type
    host_info: MetaOapg.properties.host_info

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

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

    @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"]
    ) -> MetaOapg.properties.memory:
        ...

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "create_time",
        "executer_type",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory",
        "cpu_info",
        "host_info",
        "resource_pool_id",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

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

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

    @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"]
    ) -> MetaOapg.properties.memory:
        ...

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

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

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["resource_pool_id"]
    ) -> typing.Union[MetaOapg.properties.resource_pool_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[
        "create_time",
        "executer_type",
        "cpu_count_logical",
        "cpu_count_physical",
        "memory",
        "cpu_info",
        "host_info",
        "resource_pool_id",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        memory: typing.Union[
            MetaOapg.properties.memory,
            decimal.Decimal,
            int,
        ],
        cpu_info: typing.Union[
            MetaOapg.properties.cpu_info,
            str,
        ],
        create_time: typing.Union[
            MetaOapg.properties.create_time,
            str,
            datetime,
        ],
        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,
        ],
        executer_type: typing.Union[
            MetaOapg.properties.executer_type,
            str,
        ],
        host_info: typing.Union[
            MetaOapg.properties.host_info,
            dict,
            frozendict.frozendict,
            str,
            date,
            datetime,
            uuid.UUID,
            int,
            float,
            decimal.Decimal,
            bool,
            None,
            list,
            tuple,
            bytes,
            io.FileIO,
            io.BufferedReader,
        ],
        resource_pool_id: typing.Union[MetaOapg.properties.resource_pool_id,
                                       str, 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],
    ) -> 'ExecuterCreate':
        return super().__new__(
            cls,
            *_args,
            memory=memory,
            cpu_info=cpu_info,
            create_time=create_time,
            cpu_count_logical=cpu_count_logical,
            cpu_count_physical=cpu_count_physical,
            executer_type=executer_type,
            host_info=host_info,
            resource_pool_id=resource_pool_id,
            _configuration=_configuration,
            **kwargs,
        )


from inductiva.client.model.g_cloud_host_info import GCloudHostInfo
from inductiva.client.model.inductiva_host_info import InductivaHostInfo
