# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class OkrObjectiveProgressRate(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() -> "OkrObjectiveProgressRateBuilder":
        return OkrObjectiveProgressRateBuilder()


class OkrObjectiveProgressRateBuilder(object):
    def __init__(self) -> None:
        self._okr_objective_progress_rate = OkrObjectiveProgressRate()

    def percent(self, percent: int) -> "OkrObjectiveProgressRateBuilder":
        self._okr_objective_progress_rate.percent = percent
        return self

    def status(self, status: str) -> "OkrObjectiveProgressRateBuilder":
        self._okr_objective_progress_rate.status = status
        return self

    def build(self) -> "OkrObjectiveProgressRate":
        return self._okr_objective_progress_rate
