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


    class MetaOapg:
        required = {
            "finish_reason",
            "index",
            "message",
        }
        
        class properties:
            index = schemas.IntSchema
        
            @staticmethod
            def message() -> typing.Type['Message']:
                return Message
            finish_reason = schemas.StrSchema
            logprobs = schemas.StrSchema
            __annotations__ = {
                "index": index,
                "message": message,
                "finish_reason": finish_reason,
                "logprobs": logprobs,
            }
    
    finish_reason: MetaOapg.properties.finish_reason
    index: MetaOapg.properties.index
    message: 'Message'
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["index"]) -> MetaOapg.properties.index: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["message"]) -> 'Message': ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["finish_reason"]) -> MetaOapg.properties.finish_reason: ...
    
    @typing.overload
    def __getitem__(self, name: typing_extensions.Literal["logprobs"]) -> MetaOapg.properties.logprobs: ...
    
    @typing.overload
    def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ...
    
    def __getitem__(self, name: typing.Union[typing_extensions.Literal["index", "message", "finish_reason", "logprobs", ], str]):
        # dict_instance[name] accessor
        return super().__getitem__(name)
    
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["index"]) -> MetaOapg.properties.index: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> 'Message': ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["finish_reason"]) -> MetaOapg.properties.finish_reason: ...
    
    @typing.overload
    def get_item_oapg(self, name: typing_extensions.Literal["logprobs"]) -> typing.Union[MetaOapg.properties.logprobs, 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["index", "message", "finish_reason", "logprobs", ], str]):
        return super().get_item_oapg(name)
    

    def __new__(
        cls,
        *args: typing.Union[dict, frozendict.frozendict, ],
        finish_reason: typing.Union[MetaOapg.properties.finish_reason, str, ],
        index: typing.Union[MetaOapg.properties.index, decimal.Decimal, int, ],
        message: 'Message',
        logprobs: typing.Union[MetaOapg.properties.logprobs, 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],
    ) -> 'Choice':
        return super().__new__(
            cls,
            *args,
            finish_reason=finish_reason,
            index=index,
            message=message,
            logprobs=logprobs,
            _configuration=_configuration,
            **kwargs,
        )

from spryngtime_analytics_sdk.model.message import Message
