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 CreateEmbeddingResponseUsage(Model):
    """NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).

    Do not edit the class manually.
    """

    def __init__(self, prompt_tokens=None, total_tokens=None):  # noqa: E501
        """CreateEmbeddingResponseUsage - a model defined in OpenAPI

        :param prompt_tokens: The prompt_tokens of this CreateEmbeddingResponseUsage.  # noqa: E501
        :type prompt_tokens: int
        :param total_tokens: The total_tokens of this CreateEmbeddingResponseUsage.  # noqa: E501
        :type total_tokens: int
        """
        self.openapi_types = {
            'prompt_tokens': int,
            'total_tokens': int
        }

        self.attribute_map = {
            'prompt_tokens': 'prompt_tokens',
            'total_tokens': 'total_tokens'
        }

        self._prompt_tokens = prompt_tokens
        self._total_tokens = total_tokens

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

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

    @property
    def prompt_tokens(self) -> int:
        """Gets the prompt_tokens of this CreateEmbeddingResponseUsage.

        The number of tokens used by the prompt.  # noqa: E501

        :return: The prompt_tokens of this CreateEmbeddingResponseUsage.
        :rtype: int
        """
        return self._prompt_tokens

    @prompt_tokens.setter
    def prompt_tokens(self, prompt_tokens: int):
        """Sets the prompt_tokens of this CreateEmbeddingResponseUsage.

        The number of tokens used by the prompt.  # noqa: E501

        :param prompt_tokens: The prompt_tokens of this CreateEmbeddingResponseUsage.
        :type prompt_tokens: int
        """
        if prompt_tokens is None:
            raise ValueError("Invalid value for `prompt_tokens`, must not be `None`")  # noqa: E501

        self._prompt_tokens = prompt_tokens

    @property
    def total_tokens(self) -> int:
        """Gets the total_tokens of this CreateEmbeddingResponseUsage.

        The total number of tokens used by the request.  # noqa: E501

        :return: The total_tokens of this CreateEmbeddingResponseUsage.
        :rtype: int
        """
        return self._total_tokens

    @total_tokens.setter
    def total_tokens(self, total_tokens: int):
        """Sets the total_tokens of this CreateEmbeddingResponseUsage.

        The total number of tokens used by the request.  # noqa: E501

        :param total_tokens: The total_tokens of this CreateEmbeddingResponseUsage.
        :type total_tokens: int
        """
        if total_tokens is None:
            raise ValueError("Invalid value for `total_tokens`, must not be `None`")  # noqa: E501

        self._total_tokens = total_tokens
