# 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 .orgdraft_orgrole_assignment import OrgdraftOrgroleAssignment
from .orgdraft_orgrole_assignment import OrgdraftOrgroleAssignment


class OrgroleInfo(object):
    _types = {
        "role_id": str,
        "origin_orgroles": List[OrgdraftOrgroleAssignment],
        "target_orgroles": List[OrgdraftOrgroleAssignment],
    }

    def __init__(self, d=None):
        self.role_id: Optional[str] = None
        self.origin_orgroles: Optional[List[OrgdraftOrgroleAssignment]] = None
        self.target_orgroles: Optional[List[OrgdraftOrgroleAssignment]] = None
        init(self, d, self._types)

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


class OrgroleInfoBuilder(object):
    def __init__(self) -> None:
        self._orgrole_info = OrgroleInfo()

    def role_id(self, role_id: str) -> "OrgroleInfoBuilder":
        self._orgrole_info.role_id = role_id
        return self

    def origin_orgroles(self, origin_orgroles: List[OrgdraftOrgroleAssignment]) -> "OrgroleInfoBuilder":
        self._orgrole_info.origin_orgroles = origin_orgroles
        return self

    def target_orgroles(self, target_orgroles: List[OrgdraftOrgroleAssignment]) -> "OrgroleInfoBuilder":
        self._orgrole_info.target_orgroles = target_orgroles
        return self

    def build(self) -> "OrgroleInfo":
        return self._orgrole_info
