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


    class MetaOapg:
        required = {
            "created",
            "usage",
            "model",
            "id",
            "choices",
            "object",
        }
        
        class properties:
            id = schemas.StrSchema
            object = schemas.StrSchema
            created = schemas.IntSchema
            model = schemas.StrSchema
            
            
            class choices(
                schemas.ListSchema
            ):
            
            
                class MetaOapg:
                    
                    @staticmethod
                    def items() -> typing.Type['Choice']:
                        return Choice
            
                def __new__(
                    cls,
                    arg: typing.Union[typing.Tuple['Choice'], typing.List['Choice']],
                    _configuration: typing.Optional[schemas.Configuration] = None,
                ) -> 'choices':
                    return super().__new__(
                        cls,
                        arg,
                        _configuration=_configuration,
                    )
            
                def __getitem__(self, i: int) -> 'Choice':
                    return super().__getitem__(i)
        
            @staticmethod
            def usage() -> typing.Type['UsageDetail']:
                return UsageDetail
            system_fingerprint = schemas.StrSchema
            __annotations__ = {
                "id": id,
                "object": object,
                "created": created,
                "model": model,
                "choices": choices,
                "usage": usage,
                "system_fingerprint": system_fingerprint,
            }
    
    created: MetaOapg.properties.created
    usage: 'UsageDetail'
    model: MetaOapg.properties.model
    id: MetaOapg.properties.id
    choices: MetaOapg.properties.choices
    object: MetaOapg.properties.object
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["object"]) -> MetaOapg.properties.object: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["created"]) -> MetaOapg.properties.created: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["model"]) -> MetaOapg.properties.model: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["choices"]) -> MetaOapg.properties.choices: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["usage"]) -> 'UsageDetail': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["system_fingerprint"]) -> MetaOapg.properties.system_fingerprint: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["id", "object", "created", "model", "choices", "usage", "system_fingerprint", ], 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["object"]) -> MetaOapg.properties.object: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["created"]) -> MetaOapg.properties.created: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["model"]) -> MetaOapg.properties.model: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["choices"]) -> MetaOapg.properties.choices: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["usage"]) -> 'UsageDetail': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["system_fingerprint"]) -> typing.Union[MetaOapg.properties.system_fingerprint, 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", "object", "created", "model", "choices", "usage", "system_fingerprint", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        created: typing.Union[MetaOapg.properties.created, decimal.Decimal, int, ],
        usage: 'UsageDetail',
        model: typing.Union[MetaOapg.properties.model, str, ],
        id: typing.Union[MetaOapg.properties.id, str, ],
        choices: typing.Union[MetaOapg.properties.choices, list, tuple, ],
        object: typing.Union[MetaOapg.properties.object, str, ],
        system_fingerprint: typing.Union[MetaOapg.properties.system_fingerprint, 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],
    ) -> 'OpenAiResponse':
        return super().__new__(
            cls,
            *args,
            created=created,
            usage=usage,
            model=model,
            id=id,
            choices=choices,
            object=object,
            system_fingerprint=system_fingerprint,
            _configuration=_configuration,
            **kwargs,
        )

from spryngtime_analytics_sdk.model.choice import Choice
from spryngtime_analytics_sdk.model.usage_detail import UsageDetail
