# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .review_record import ReviewRecord


class ReviewStage(object):
    _types = {
        "stage_id": str,
        "stage_type": str,
        "review_stage_roles": List[str],
        "template_id": str,
        "records": List[ReviewRecord],
        "review_stage_role": str,
    }

    def __init__(self, d=None):
        self.stage_id: Optional[str] = None
        self.stage_type: Optional[str] = None
        self.review_stage_roles: Optional[List[str]] = None
        self.template_id: Optional[str] = None
        self.records: Optional[List[ReviewRecord]] = None
        self.review_stage_role: Optional[str] = None
        init(self, d, self._types)

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


class ReviewStageBuilder(object):
    def __init__(self) -> None:
        self._review_stage = ReviewStage()

    def stage_id(self, stage_id: str) -> "ReviewStageBuilder":
        self._review_stage.stage_id = stage_id
        return self

    def stage_type(self, stage_type: str) -> "ReviewStageBuilder":
        self._review_stage.stage_type = stage_type
        return self

    def review_stage_roles(self, review_stage_roles: List[str]) -> "ReviewStageBuilder":
        self._review_stage.review_stage_roles = review_stage_roles
        return self

    def template_id(self, template_id: str) -> "ReviewStageBuilder":
        self._review_stage.template_id = template_id
        return self

    def records(self, records: List[ReviewRecord]) -> "ReviewStageBuilder":
        self._review_stage.records = records
        return self

    def review_stage_role(self, review_stage_role: str) -> "ReviewStageBuilder":
        self._review_stage.review_stage_role = review_stage_role
        return self

    def build(self) -> "ReviewStage":
        return self._review_stage
