# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class UserOkrObjectiveProgressRate(object):
    _types = {
        "percent": int,
        "status": str,
    }

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

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


class UserOkrObjectiveProgressRateBuilder(object):
    def __init__(self) -> None:
        self._user_okr_objective_progress_rate = UserOkrObjectiveProgressRate()

    def percent(self, percent: int) -> "UserOkrObjectiveProgressRateBuilder":
        self._user_okr_objective_progress_rate.percent = percent
        return self

    def status(self, status: str) -> "UserOkrObjectiveProgressRateBuilder":
        self._user_okr_objective_progress_rate.status = status
        return self

    def build(self) -> "UserOkrObjectiveProgressRate":
        return self._user_okr_objective_progress_rate
