from datetime import date, datetime  # noqa: F401
from typing import Dict, List  # noqa: F401

from timestep.api.openai.v1 import util
from timestep.api.openai.v1.models.base_model import Model


class CreateCompletionResponseChoicesInnerLogprobs(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, text_offset=None, token_logprobs=None, tokens=None, top_logprobs=None):  # noqa: E501
        """CreateCompletionResponseChoicesInnerLogprobs - a model defined in OpenAPI

        :param text_offset: The text_offset of this CreateCompletionResponseChoicesInnerLogprobs.  # noqa: E501
        :type text_offset: List[int]
        :param token_logprobs: The token_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.  # noqa: E501
        :type token_logprobs: List[float]
        :param tokens: The tokens of this CreateCompletionResponseChoicesInnerLogprobs.  # noqa: E501
        :type tokens: List[str]
        :param top_logprobs: The top_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.  # noqa: E501
        :type top_logprobs: List[Dict[str, float]]
        """
        self.openapi_types = {
            'text_offset': List[int],
            'token_logprobs': List[float],
            'tokens': List[str],
            'top_logprobs': List[Dict[str, float]]
        }

        self.attribute_map = {
            'text_offset': 'text_offset',
            'token_logprobs': 'token_logprobs',
            'tokens': 'tokens',
            'top_logprobs': 'top_logprobs'
        }

        self._text_offset = text_offset
        self._token_logprobs = token_logprobs
        self._tokens = tokens
        self._top_logprobs = top_logprobs

    @classmethod
    def from_dict(cls, dikt) -> 'CreateCompletionResponseChoicesInnerLogprobs':
        """Returns the dict as a model

        :param dikt: A dict.
        :type: dict
        :return: The CreateCompletionResponse_choices_inner_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.  # noqa: E501
        :rtype: CreateCompletionResponseChoicesInnerLogprobs
        """
        return util.deserialize_model(dikt, cls)

    @property
    def text_offset(self) -> List[int]:
        """Gets the text_offset of this CreateCompletionResponseChoicesInnerLogprobs.


        :return: The text_offset of this CreateCompletionResponseChoicesInnerLogprobs.
        :rtype: List[int]
        """
        return self._text_offset

    @text_offset.setter
    def text_offset(self, text_offset: List[int]):
        """Sets the text_offset of this CreateCompletionResponseChoicesInnerLogprobs.


        :param text_offset: The text_offset of this CreateCompletionResponseChoicesInnerLogprobs.
        :type text_offset: List[int]
        """

        self._text_offset = text_offset

    @property
    def token_logprobs(self) -> List[float]:
        """Gets the token_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.


        :return: The token_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.
        :rtype: List[float]
        """
        return self._token_logprobs

    @token_logprobs.setter
    def token_logprobs(self, token_logprobs: List[float]):
        """Sets the token_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.


        :param token_logprobs: The token_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.
        :type token_logprobs: List[float]
        """

        self._token_logprobs = token_logprobs

    @property
    def tokens(self) -> List[str]:
        """Gets the tokens of this CreateCompletionResponseChoicesInnerLogprobs.


        :return: The tokens of this CreateCompletionResponseChoicesInnerLogprobs.
        :rtype: List[str]
        """
        return self._tokens

    @tokens.setter
    def tokens(self, tokens: List[str]):
        """Sets the tokens of this CreateCompletionResponseChoicesInnerLogprobs.


        :param tokens: The tokens of this CreateCompletionResponseChoicesInnerLogprobs.
        :type tokens: List[str]
        """

        self._tokens = tokens

    @property
    def top_logprobs(self) -> List[Dict[str, float]]:
        """Gets the top_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.


        :return: The top_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.
        :rtype: List[Dict[str, float]]
        """
        return self._top_logprobs

    @top_logprobs.setter
    def top_logprobs(self, top_logprobs: List[Dict[str, float]]):
        """Sets the top_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.


        :param top_logprobs: The top_logprobs of this CreateCompletionResponseChoicesInnerLogprobs.
        :type top_logprobs: List[Dict[str, float]]
        """

        self._top_logprobs = top_logprobs
