# 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 ProgressRateNew(object):
    _types = {
        "percent": float,
        "status": int,
    }

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

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


class ProgressRateNewBuilder(object):
    def __init__(self) -> None:
        self._progress_rate_new = ProgressRateNew()

    def percent(self, percent: float) -> "ProgressRateNewBuilder":
        self._progress_rate_new.percent = percent
        return self

    def status(self, status: int) -> "ProgressRateNewBuilder":
        self._progress_rate_new.status = status
        return self

    def build(self) -> "ProgressRateNew":
        return self._progress_rate_new
