# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .phrase import Phrase


class HighlightEntityResponseBody(object):
    _types = {
        "phrases": List[Phrase],
    }

    def __init__(self, d=None):
        self.phrases: Optional[List[Phrase]] = None
        init(self, d, self._types)

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


class HighlightEntityResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._highlight_entity_response_body = HighlightEntityResponseBody()

    def phrases(self, phrases: List[Phrase]) -> "HighlightEntityResponseBodyBuilder":
        self._highlight_entity_response_body.phrases = phrases
        return self

    def build(self) -> "HighlightEntityResponseBody":
        return self._highlight_entity_response_body
