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

    Do not edit the class manually.
    """

    def __init__(self, include_usage=None):  # noqa: E501
        """ChatCompletionStreamOptions - a model defined in OpenAPI

        :param include_usage: The include_usage of this ChatCompletionStreamOptions.  # noqa: E501
        :type include_usage: bool
        """
        self.openapi_types = {
            'include_usage': bool
        }

        self.attribute_map = {
            'include_usage': 'include_usage'
        }

        self._include_usage = include_usage

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

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

    @property
    def include_usage(self) -> bool:
        """Gets the include_usage of this ChatCompletionStreamOptions.

        If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.   # noqa: E501

        :return: The include_usage of this ChatCompletionStreamOptions.
        :rtype: bool
        """
        return self._include_usage

    @include_usage.setter
    def include_usage(self, include_usage: bool):
        """Sets the include_usage of this ChatCompletionStreamOptions.

        If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.   # noqa: E501

        :param include_usage: The include_usage of this ChatCompletionStreamOptions.
        :type include_usage: bool
        """

        self._include_usage = include_usage
