# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class TimeRange(object):
    _types = {
        "start": int,
        "end": int,
    }

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

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


class TimeRangeBuilder(object):
    def __init__(self) -> None:
        self._time_range = TimeRange()

    def start(self, start: int) -> "TimeRangeBuilder":
        self._time_range.start = start
        return self

    def end(self, end: int) -> "TimeRangeBuilder":
        self._time_range.end = end
        return self

    def build(self) -> "TimeRange":
        return self._time_range
