# coding: utf-8

"""
    Spryngtime Usage Analytics & Billing API

    Spryngtime Usage Analytics & Billing API

    The version of the OpenAPI document: 1.0.0
    Generated by: https://konfigthis.com
"""

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 spryngtime_analytics_sdk import schemas  # noqa: F401


class UsageDetail(
    schemas.DictSchema
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)
    """


    class MetaOapg:
        required = {
            "completion_tokens",
            "prompt_tokens",
            "total_tokens",
        }
        
        class properties:
            prompt_tokens = schemas.IntSchema
            completion_tokens = schemas.IntSchema
            total_tokens = schemas.IntSchema
            __annotations__ = {
                "prompt_tokens": prompt_tokens,
                "completion_tokens": completion_tokens,
                "total_tokens": total_tokens,
            }
    
    completion_tokens: MetaOapg.properties.completion_tokens
    prompt_tokens: MetaOapg.properties.prompt_tokens
    total_tokens: MetaOapg.properties.total_tokens
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["prompt_tokens"]) -> MetaOapg.properties.prompt_tokens: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["completion_tokens"]) -> MetaOapg.properties.completion_tokens: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["total_tokens"]) -> MetaOapg.properties.total_tokens: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["prompt_tokens", "completion_tokens", "total_tokens", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["prompt_tokens"]) -> MetaOapg.properties.prompt_tokens: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["completion_tokens"]) -> MetaOapg.properties.completion_tokens: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["total_tokens"]) -> MetaOapg.properties.total_tokens: ...
    
    @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["prompt_tokens", "completion_tokens", "total_tokens", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        completion_tokens: typing.Union[MetaOapg.properties.completion_tokens, decimal.Decimal, int, ],
        prompt_tokens: typing.Union[MetaOapg.properties.prompt_tokens, decimal.Decimal, int, ],
        total_tokens: typing.Union[MetaOapg.properties.total_tokens, decimal.Decimal, int, ],
        _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],
    ) -> 'UsageDetail':
        return super().__new__(
            cls,
            *args,
            completion_tokens=completion_tokens,
            prompt_tokens=prompt_tokens,
            total_tokens=total_tokens,
            _configuration=_configuration,
            **kwargs,
        )
