# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.model import BaseRequest
from lark_oapi.core.enum import HttpMethod, AccessTokenType


class GetApprovalGroupsRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.user_id_type: Optional[str] = None
        self.process_id: Optional[str] = None

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


class GetApprovalGroupsRequestBuilder(object):

    def __init__(self) -> None:
        get_approval_groups_request = GetApprovalGroupsRequest()
        get_approval_groups_request.http_method = HttpMethod.GET
        get_approval_groups_request.uri = "/open-apis/corehr/v2/approval_groups/:process_id"
        get_approval_groups_request.token_types = {AccessTokenType.TENANT}
        self._get_approval_groups_request: GetApprovalGroupsRequest = get_approval_groups_request

    def user_id_type(self, user_id_type: str) -> "GetApprovalGroupsRequestBuilder":
        self._get_approval_groups_request.user_id_type = user_id_type
        self._get_approval_groups_request.add_query("user_id_type", user_id_type)
        return self

    def process_id(self, process_id: str) -> "GetApprovalGroupsRequestBuilder":
        self._get_approval_groups_request.process_id = process_id
        self._get_approval_groups_request.paths["process_id"] = str(process_id)
        return self

    def build(self) -> GetApprovalGroupsRequest:
        return self._get_approval_groups_request
