# 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 ApprovalCreateViewers(object):
    _types = {
        "viewer_type": str,
        "viewer_user_id": str,
        "viewer_department_id": str,
    }

    def __init__(self, d=None):
        self.viewer_type: Optional[str] = None
        self.viewer_user_id: Optional[str] = None
        self.viewer_department_id: Optional[str] = None
        init(self, d, self._types)

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


class ApprovalCreateViewersBuilder(object):
    def __init__(self) -> None:
        self._approval_create_viewers = ApprovalCreateViewers()

    def viewer_type(self, viewer_type: str) -> "ApprovalCreateViewersBuilder":
        self._approval_create_viewers.viewer_type = viewer_type
        return self

    def viewer_user_id(self, viewer_user_id: str) -> "ApprovalCreateViewersBuilder":
        self._approval_create_viewers.viewer_user_id = viewer_user_id
        return self

    def viewer_department_id(self, viewer_department_id: str) -> "ApprovalCreateViewersBuilder":
        self._approval_create_viewers.viewer_department_id = viewer_department_id
        return self

    def build(self) -> "ApprovalCreateViewers":
        return self._approval_create_viewers
