# 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 .cooperation_user_role import CooperationUserRole
from .cooperation_user_role import CooperationUserRole


class CooperationRole(object):
    _types = {
        "reviewer_role": CooperationUserRole,
        "reviewee_role": CooperationUserRole,
    }

    def __init__(self, d=None):
        self.reviewer_role: Optional[CooperationUserRole] = None
        self.reviewee_role: Optional[CooperationUserRole] = None
        init(self, d, self._types)

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


class CooperationRoleBuilder(object):
    def __init__(self) -> None:
        self._cooperation_role = CooperationRole()

    def reviewer_role(self, reviewer_role: CooperationUserRole) -> "CooperationRoleBuilder":
        self._cooperation_role.reviewer_role = reviewer_role
        return self

    def reviewee_role(self, reviewee_role: CooperationUserRole) -> "CooperationRoleBuilder":
        self._cooperation_role.reviewee_role = reviewee_role
        return self

    def build(self) -> "CooperationRole":
        return self._cooperation_role
