# 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 TrackUsageRequest(
    schemas.DictSchema
):
    """
    This class is auto generated by Konfig (https://konfigthis.com)
    """


    class MetaOapg:
        required = {
            "key",
        }
        
        class properties:
            key = schemas.StrSchema
            conversationId = schemas.StrSchema
        
            @staticmethod
            def openAiResponse() -> typing.Type['OpenAiResponse']:
                return OpenAiResponse
        
            @staticmethod
            def usage() -> typing.Type['UsageDetail']:
                return UsageDetail
            __annotations__ = {
                "key": key,
                "conversationId": conversationId,
                "openAiResponse": openAiResponse,
                "usage": usage,
            }
    
    key: MetaOapg.properties.key
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["conversationId"]) -> MetaOapg.properties.conversationId: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["openAiResponse"]) -> 'OpenAiResponse': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["usage"]) -> 'UsageDetail': ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "conversationId", "openAiResponse", "usage", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["conversationId"]) -> typing.Union[MetaOapg.properties.conversationId, schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["openAiResponse"]) -> typing.Union['OpenAiResponse', schemas.Unset]: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["usage"]) -> typing.Union['UsageDetail', 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["key", "conversationId", "openAiResponse", "usage", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        key: typing.Union[MetaOapg.properties.key, str, ],
        conversationId: typing.Union[MetaOapg.properties.conversationId, str, schemas.Unset] = schemas.unset,
        openAiResponse: typing.Union['OpenAiResponse', schemas.Unset] = schemas.unset,
        usage: typing.Union['UsageDetail', 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],
    ) -> 'TrackUsageRequest':
        return super().__new__(
            cls,
            *args,
            key=key,
            conversationId=conversationId,
            openAiResponse=openAiResponse,
            usage=usage,
            _configuration=_configuration,
            **kwargs,
        )

from spryngtime_analytics_sdk.model.open_ai_response import OpenAiResponse
from spryngtime_analytics_sdk.model.usage_detail import UsageDetail
