# 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 UserMostUsedMachineTypesOverview(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_tasks",
            "preempted_machines",
            "num_of_machines_used",
            "spot_machines",
            "errors",
        }

        class properties:
            machine_type = schemas.StrSchema
            num_of_machines_used = schemas.IntSchema
            num_tasks = schemas.IntSchema
            spot_machines = schemas.IntSchema
            preempted_machines = schemas.IntSchema

            class errors(schemas.DictSchema):

                class MetaOapg:
                    additional_properties = schemas.IntSchema

                def __getitem__(
                        self, name: typing.Union[
                            str,
                        ]) -> MetaOapg.additional_properties:
                    # dict_instance[name] accessor
                    return super().__getitem__(name)

                def get_item_oapg(
                        self, name: typing.Union[
                            str,
                        ]) -> MetaOapg.additional_properties:
                    return super().get_item_oapg(name)

                def __new__(
                    cls,
                    *_args: typing.Union[
                        dict,
                        frozendict.frozendict,
                    ],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                    **kwargs: typing.Union[
                        MetaOapg.additional_properties,
                        decimal.Decimal,
                        int,
                    ],
                ) -> 'errors':
                    return super().__new__(
                        cls,
                        *_args,
                        _configuration=_configuration,
                        **kwargs,
                    )

            __annotations__ = {
                "machine_type": machine_type,
                "num_of_machines_used": num_of_machines_used,
                "num_tasks": num_tasks,
                "spot_machines": spot_machines,
                "preempted_machines": preempted_machines,
                "errors": errors,
            }

    machine_type: MetaOapg.properties.machine_type
    num_tasks: MetaOapg.properties.num_tasks
    preempted_machines: MetaOapg.properties.preempted_machines
    num_of_machines_used: MetaOapg.properties.num_of_machines_used
    spot_machines: MetaOapg.properties.spot_machines
    errors: MetaOapg.properties.errors

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

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

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "machine_type",
        "num_of_machines_used",
        "num_tasks",
        "spot_machines",
        "preempted_machines",
        "errors",
    ], 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_of_machines_used"]
    ) -> MetaOapg.properties.num_of_machines_used:
        ...

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

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

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

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

    @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_of_machines_used",
        "num_tasks",
        "spot_machines",
        "preempted_machines",
        "errors",
    ], 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_tasks: typing.Union[
            MetaOapg.properties.num_tasks,
            decimal.Decimal,
            int,
        ],
        preempted_machines: typing.Union[
            MetaOapg.properties.preempted_machines,
            decimal.Decimal,
            int,
        ],
        num_of_machines_used: typing.Union[
            MetaOapg.properties.num_of_machines_used,
            decimal.Decimal,
            int,
        ],
        spot_machines: typing.Union[
            MetaOapg.properties.spot_machines,
            decimal.Decimal,
            int,
        ],
        errors: typing.Union[
            MetaOapg.properties.errors,
            dict,
            frozendict.frozendict,
        ],
        _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],
    ) -> 'UserMostUsedMachineTypesOverview':
        return super().__new__(
            cls,
            *_args,
            machine_type=machine_type,
            num_tasks=num_tasks,
            preempted_machines=preempted_machines,
            num_of_machines_used=num_of_machines_used,
            spot_machines=spot_machines,
            errors=errors,
            _configuration=_configuration,
            **kwargs,
        )
