# 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 .user import User
from .okr import Okr


class UserOkr(object):
    _types = {
        "reviewee_user_id": User,
        "okrs": List[Okr],
    }

    def __init__(self, d=None):
        self.reviewee_user_id: Optional[User] = None
        self.okrs: Optional[List[Okr]] = None
        init(self, d, self._types)

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


class UserOkrBuilder(object):
    def __init__(self) -> None:
        self._user_okr = UserOkr()

    def reviewee_user_id(self, reviewee_user_id: User) -> "UserOkrBuilder":
        self._user_okr.reviewee_user_id = reviewee_user_id
        return self

    def okrs(self, okrs: List[Okr]) -> "UserOkrBuilder":
        self._user_okr.okrs = okrs
        return self

    def build(self) -> "UserOkr":
        return self._user_okr
