# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class Speech(object):
    _types = {
        "speech": str,
        "speech_key": str,
    }

    def __init__(self, d=None):
        self.speech: Optional[str] = None
        self.speech_key: Optional[str] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "SpeechBuilder":
        return SpeechBuilder()


class SpeechBuilder(object):
    def __init__(self) -> None:
        self._speech = Speech()

    def speech(self, speech: str) -> "SpeechBuilder":
        self._speech.speech = speech
        return self

    def speech_key(self, speech_key: str) -> "SpeechBuilder":
        self._speech.speech_key = speech_key
        return self

    def build(self) -> "Speech":
        return self._speech
