# 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 MachineGroupTimeStat(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 = {
            "name",
            "value",
        }

        class properties:
            name = schemas.StrSchema
            value = schemas.NumberSchema
            description = schemas.StrSchema
            unit = schemas.StrSchema
            __annotations__ = {
                "name": name,
                "value": value,
                "description": description,
                "unit": unit,
            }

    name: MetaOapg.properties.name
    value: MetaOapg.properties.value

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

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "name",
        "value",
        "description",
        "unit",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

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

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

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

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["unit"]
    ) -> typing.Union[MetaOapg.properties.unit, 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[
        "name",
        "value",
        "description",
        "unit",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        name: typing.Union[
            MetaOapg.properties.name,
            str,
        ],
        value: typing.Union[
            MetaOapg.properties.value,
            decimal.Decimal,
            int,
            float,
        ],
        description: typing.Union[MetaOapg.properties.description, str,
                                  schemas.Unset] = schemas.unset,
        unit: typing.Union[MetaOapg.properties.unit, 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],
    ) -> 'MachineGroupTimeStat':
        return super().__new__(
            cls,
            *_args,
            name=name,
            value=value,
            description=description,
            unit=unit,
            _configuration=_configuration,
            **kwargs,
        )
