# 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 OrganizationCosts(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 = {
            "costs",
            "name",
            "id",
            "estimated_costs",
        }

        class properties:
            id = schemas.StrSchema
            name = schemas.StrSchema

            @staticmethod
            def costs() -> typing.Type['OrganizationCostComponents']:
                return OrganizationCostComponents

            class estimated_costs(schemas.ListSchema):

                class MetaOapg:

                    @staticmethod
                    def items() -> typing.Type['UserCostsDetails']:
                        return UserCostsDetails

                def __new__(
                    cls,
                    _arg: typing.Union[typing.Tuple['UserCostsDetails'],
                                       typing.List['UserCostsDetails']],
                    _configuration: typing.Optional[
                        schemas.Configuration] = None,
                ) -> 'estimated_costs':
                    return super().__new__(
                        cls,
                        _arg,
                        _configuration=_configuration,
                    )

                def __getitem__(self, i: int) -> 'UserCostsDetails':
                    return super().__getitem__(i)

            class currency(
                    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 [
                            CurrencyCode,
                        ]

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

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

            __annotations__ = {
                "id": id,
                "name": name,
                "costs": costs,
                "estimated_costs": estimated_costs,
                "currency": currency,
                "consolidation_last_update_ts": consolidation_last_update_ts,
            }

    costs: 'OrganizationCostComponents'
    name: MetaOapg.properties.name
    id: MetaOapg.properties.id
    estimated_costs: MetaOapg.properties.estimated_costs

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

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

    @typing.overload
    def __getitem__(
        self, name: typing_extensions.Literal["costs"]
    ) -> 'OrganizationCostComponents':
        ...

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

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

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

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

    def __getitem__(self, name: typing.Union[typing_extensions.Literal[
        "id",
        "name",
        "costs",
        "estimated_costs",
        "currency",
        "consolidation_last_update_ts",
    ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)

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

    @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["costs"]
    ) -> 'OrganizationCostComponents':
        ...

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

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

    @typing.overload
    def get_item_oapg(
        self, name: typing_extensions.Literal["consolidation_last_update_ts"]
    ) -> typing.Union[MetaOapg.properties.consolidation_last_update_ts,
                      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[
        "id",
        "name",
        "costs",
        "estimated_costs",
        "currency",
        "consolidation_last_update_ts",
    ], str]):
        return super().get_item_oapg(name)

    def __new__(
        cls,
        *_args: typing.Union[
            dict,
            frozendict.frozendict,
        ],
        costs: 'OrganizationCostComponents',
        name: typing.Union[
            MetaOapg.properties.name,
            str,
        ],
        id: typing.Union[
            MetaOapg.properties.id,
            str,
        ],
        estimated_costs: typing.Union[
            MetaOapg.properties.estimated_costs,
            list,
            tuple,
        ],
        currency: typing.Union[MetaOapg.properties.currency, 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,
        consolidation_last_update_ts: typing.Union[
            MetaOapg.properties.consolidation_last_update_ts, 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],
    ) -> 'OrganizationCosts':
        return super().__new__(
            cls,
            *_args,
            costs=costs,
            name=name,
            id=id,
            estimated_costs=estimated_costs,
            currency=currency,
            consolidation_last_update_ts=consolidation_last_update_ts,
            _configuration=_configuration,
            **kwargs,
        )


from inductiva.client.model.currency_code import CurrencyCode
from inductiva.client.model.organization_cost_components import OrganizationCostComponents
from inductiva.client.model.user_costs_details import UserCostsDetails
