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.create_transcription_response_json import \
    CreateTranscriptionResponseJson  # noqa: E501
from timestep.api.openai.v1.models.create_transcription_response_verbose_json import \
    CreateTranscriptionResponseVerboseJson  # noqa: E501
from timestep.api.openai.v1.models.transcription_segment import \
    TranscriptionSegment  # noqa: E501
from timestep.api.openai.v1.models.transcription_word import \
    TranscriptionWord  # noqa: E501


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

    Do not edit the class manually.
    """

    def __init__(self, text=None, language=None, duration=None, words=None, segments=None):  # noqa: E501
        """CreateTranscription200Response - a model defined in OpenAPI

        :param text: The text of this CreateTranscription200Response.  # noqa: E501
        :type text: str
        :param language: The language of this CreateTranscription200Response.  # noqa: E501
        :type language: str
        :param duration: The duration of this CreateTranscription200Response.  # noqa: E501
        :type duration: str
        :param words: The words of this CreateTranscription200Response.  # noqa: E501
        :type words: List[TranscriptionWord]
        :param segments: The segments of this CreateTranscription200Response.  # noqa: E501
        :type segments: List[TranscriptionSegment]
        """
        self.openapi_types = {
            'text': str,
            'language': str,
            'duration': str,
            'words': List[TranscriptionWord],
            'segments': List[TranscriptionSegment]
        }

        self.attribute_map = {
            'text': 'text',
            'language': 'language',
            'duration': 'duration',
            'words': 'words',
            'segments': 'segments'
        }

        self._text = text
        self._language = language
        self._duration = duration
        self._words = words
        self._segments = segments

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

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

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

        The transcribed text.  # noqa: E501

        :return: The text of this CreateTranscription200Response.
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text: str):
        """Sets the text of this CreateTranscription200Response.

        The transcribed text.  # noqa: E501

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

        self._text = text

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

        The language of the input audio.  # noqa: E501

        :return: The language of this CreateTranscription200Response.
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language: str):
        """Sets the language of this CreateTranscription200Response.

        The language of the input audio.  # noqa: E501

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

        self._language = language

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

        The duration of the input audio.  # noqa: E501

        :return: The duration of this CreateTranscription200Response.
        :rtype: str
        """
        return self._duration

    @duration.setter
    def duration(self, duration: str):
        """Sets the duration of this CreateTranscription200Response.

        The duration of the input audio.  # noqa: E501

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

        self._duration = duration

    @property
    def words(self) -> List[TranscriptionWord]:
        """Gets the words of this CreateTranscription200Response.

        Extracted words and their corresponding timestamps.  # noqa: E501

        :return: The words of this CreateTranscription200Response.
        :rtype: List[TranscriptionWord]
        """
        return self._words

    @words.setter
    def words(self, words: List[TranscriptionWord]):
        """Sets the words of this CreateTranscription200Response.

        Extracted words and their corresponding timestamps.  # noqa: E501

        :param words: The words of this CreateTranscription200Response.
        :type words: List[TranscriptionWord]
        """

        self._words = words

    @property
    def segments(self) -> List[TranscriptionSegment]:
        """Gets the segments of this CreateTranscription200Response.

        Segments of the transcribed text and their corresponding details.  # noqa: E501

        :return: The segments of this CreateTranscription200Response.
        :rtype: List[TranscriptionSegment]
        """
        return self._segments

    @segments.setter
    def segments(self, segments: List[TranscriptionSegment]):
        """Sets the segments of this CreateTranscription200Response.

        Segments of the transcribed text and their corresponding details.  # noqa: E501

        :param segments: The segments of this CreateTranscription200Response.
        :type segments: List[TranscriptionSegment]
        """

        self._segments = segments
