# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class OpeningTimePeriodExternal(object):
    _types = {
        "start_hhmm": int,
        "end_hhmm": int,
    }

    def __init__(self, d=None):
        self.start_hhmm: Optional[int] = None
        self.end_hhmm: Optional[int] = None
        init(self, d, self._types)

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


class OpeningTimePeriodExternalBuilder(object):
    def __init__(self) -> None:
        self._opening_time_period_external = OpeningTimePeriodExternal()

    def start_hhmm(self, start_hhmm: int) -> "OpeningTimePeriodExternalBuilder":
        self._opening_time_period_external.start_hhmm = start_hhmm
        return self

    def end_hhmm(self, end_hhmm: int) -> "OpeningTimePeriodExternalBuilder":
        self._opening_time_period_external.end_hhmm = end_hhmm
        return self

    def build(self) -> "OpeningTimePeriodExternal":
        return self._opening_time_period_external
