# 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 MachineType(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 = {
            "machine_type",
            "num_cpus",
            "price",
            "ram_gb",
        }

        class properties:
            machine_type = schemas.StrSchema
            num_cpus = schemas.IntSchema
            ram_gb = schemas.IntSchema
            price = schemas.NumberSchema

            class provider_id(
                    schemas.ComposedSchema,):

                class MetaOapg:

                    @classmethod
                    @functools.lru_cache()
                    def all_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 [
                            Providers,
                        ]

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

            class threads_per_core(
                    schemas.ComposedSchema,):

                class MetaOapg:
                    any_of_0 = schemas.IntSchema
                    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],
                ) -> 'threads_per_core':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            class spot(
                    schemas.ComposedSchema,):

                class MetaOapg:
                    any_of_0 = schemas.BoolSchema
                    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],
                ) -> 'spot':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

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

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

            __annotations__ = {
                "machine_type": machine_type,
                "num_cpus": num_cpus,
                "ram_gb": ram_gb,
                "price": price,
                "provider_id": provider_id,
                "threads_per_core": threads_per_core,
                "spot": spot,
                "region": region,
                "zone": zone,
            }

    machine_type: MetaOapg.properties.machine_type
    num_cpus: MetaOapg.properties.num_cpus
    price: MetaOapg.properties.price
    ram_gb: MetaOapg.properties.ram_gb

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

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

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

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

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

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

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "machine_type",
        "num_cpus",
        "ram_gb",
        "price",
        "provider_id",
        "threads_per_core",
        "spot",
        "region",
        "zone",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

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

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

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

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

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

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

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

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

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["zone"]
    ) -> typing.Union[MetaOapg.properties.zone, 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[
        "machine_type",
        "num_cpus",
        "ram_gb",
        "price",
        "provider_id",
        "threads_per_core",
        "spot",
        "region",
        "zone",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        machine_type: typing.Union[
            MetaOapg.properties.machine_type,
            str,
        ],
        num_cpus: typing.Union[
            MetaOapg.properties.num_cpus,
            decimal.Decimal,
            int,
        ],
        price: typing.Union[
            MetaOapg.properties.price,
            decimal.Decimal,
            int,
            float,
        ],
        ram_gb: typing.Union[
            MetaOapg.properties.ram_gb,
            decimal.Decimal,
            int,
        ],
        provider_id: typing.Union[MetaOapg.properties.provider_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,
        threads_per_core: typing.Union[MetaOapg.properties.threads_per_core,
                                       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,
        spot: typing.Union[MetaOapg.properties.spot, 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,
        region: typing.Union[MetaOapg.properties.region, 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,
        zone: typing.Union[MetaOapg.properties.zone, 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],
    ) -> 'MachineType':
        return super().__new__(
            cls,
            *_args,
            machine_type=machine_type,
            num_cpus=num_cpus,
            price=price,
            ram_gb=ram_gb,
            provider_id=provider_id,
            threads_per_core=threads_per_core,
            spot=spot,
            region=region,
            zone=zone,
            _configuration=_configuration,
            **kwargs,
        )


from inductiva.client.model.providers import Providers
