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
from timestep.api.openai.v1.models.done_event import DoneEvent  # noqa: E501
from timestep.api.openai.v1.models.error_event import ErrorEvent  # noqa: E501
from timestep.api.openai.v1.models.message_stream_event import \
    MessageStreamEvent  # noqa: E501
from timestep.api.openai.v1.models.run_step_stream_event import \
    RunStepStreamEvent  # noqa: E501
from timestep.api.openai.v1.models.run_stream_event import \
    RunStreamEvent  # noqa: E501
from timestep.api.openai.v1.models.thread_stream_event import \
    ThreadStreamEvent  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, event=None, data=None):  # noqa: E501
        """AssistantStreamEvent - a model defined in OpenAPI

        :param event: The event of this AssistantStreamEvent.  # noqa: E501
        :type event: str
        :param data: The data of this AssistantStreamEvent.  # noqa: E501
        :type data: str
        """
        self.openapi_types = {
            'event': str,
            'data': str
        }

        self.attribute_map = {
            'event': 'event',
            'data': 'data'
        }

        self._event = event
        self._data = data

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

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

    @property
    def event(self) -> str:
        """Gets the event of this AssistantStreamEvent.


        :return: The event of this AssistantStreamEvent.
        :rtype: str
        """
        return self._event

    @event.setter
    def event(self, event: str):
        """Sets the event of this AssistantStreamEvent.


        :param event: The event of this AssistantStreamEvent.
        :type event: str
        """
        allowed_values = ["done"]  # noqa: E501
        if event not in allowed_values:
            raise ValueError(
                "Invalid value for `event` ({0}), must be one of {1}"
                .format(event, allowed_values)
            )

        self._event = event

    @property
    def data(self) -> str:
        """Gets the data of this AssistantStreamEvent.


        :return: The data of this AssistantStreamEvent.
        :rtype: str
        """
        return self._data

    @data.setter
    def data(self, data: str):
        """Sets the data of this AssistantStreamEvent.


        :param data: The data of this AssistantStreamEvent.
        :type data: str
        """
        allowed_values = ["[DONE]"]  # noqa: E501
        if data not in allowed_values:
            raise ValueError(
                "Invalid value for `data` ({0}), must be one of {1}"
                .format(data, allowed_values)
            )

        self._data = data
