# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class Workhour(object):
    _types = {
        "day_of_week": int,
        "start_time": int,
        "end_time": int,
    }

    def __init__(self, d=None):
        self.day_of_week: Optional[int] = None
        self.start_time: Optional[int] = None
        self.end_time: Optional[int] = None
        init(self, d, self._types)

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


class WorkhourBuilder(object):
    def __init__(self) -> None:
        self._workhour = Workhour()

    def day_of_week(self, day_of_week: int) -> "WorkhourBuilder":
        self._workhour.day_of_week = day_of_week
        return self

    def start_time(self, start_time: int) -> "WorkhourBuilder":
        self._workhour.start_time = start_time
        return self

    def end_time(self, end_time: int) -> "WorkhourBuilder":
        self._workhour.end_time = end_time
        return self

    def build(self) -> "Workhour":
        return self._workhour
