# 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 CheckInTime(object):
    _types = {
        "time_type": str,
        "duration": int,
    }

    def __init__(self, d=None):
        self.time_type: Optional[str] = None
        self.duration: Optional[int] = None
        init(self, d, self._types)

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


class CheckInTimeBuilder(object):
    def __init__(self) -> None:
        self._check_in_time = CheckInTime()

    def time_type(self, time_type: str) -> "CheckInTimeBuilder":
        self._check_in_time.time_type = time_type
        return self

    def duration(self, duration: int) -> "CheckInTimeBuilder":
        self._check_in_time.duration = duration
        return self

    def build(self) -> "CheckInTime":
        return self._check_in_time
