# 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 UserStatsDataDuration(object):
    _types = {
        "day": str,
        "half_day": str,
        "hour": str,
        "half_hour": str,
        "minute": str,
    }

    def __init__(self, d=None):
        self.day: Optional[str] = None
        self.half_day: Optional[str] = None
        self.hour: Optional[str] = None
        self.half_hour: Optional[str] = None
        self.minute: Optional[str] = None
        init(self, d, self._types)

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


class UserStatsDataDurationBuilder(object):
    def __init__(self) -> None:
        self._user_stats_data_duration = UserStatsDataDuration()

    def day(self, day: str) -> "UserStatsDataDurationBuilder":
        self._user_stats_data_duration.day = day
        return self

    def half_day(self, half_day: str) -> "UserStatsDataDurationBuilder":
        self._user_stats_data_duration.half_day = half_day
        return self

    def hour(self, hour: str) -> "UserStatsDataDurationBuilder":
        self._user_stats_data_duration.hour = hour
        return self

    def half_hour(self, half_hour: str) -> "UserStatsDataDurationBuilder":
        self._user_stats_data_duration.half_hour = half_hour
        return self

    def minute(self, minute: str) -> "UserStatsDataDurationBuilder":
        self._user_stats_data_duration.minute = minute
        return self

    def build(self) -> "UserStatsDataDuration":
        return self._user_stats_data_duration
