# 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
from .open_query_department_change_list_by_ids_approval_groups_request_body import \
    OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBody


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

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


class OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBuilder(object):

    def __init__(self) -> None:
        open_query_department_change_list_by_ids_approval_groups_request = OpenQueryDepartmentChangeListByIdsApprovalGroupsRequest()
        open_query_department_change_list_by_ids_approval_groups_request.http_method = HttpMethod.POST
        open_query_department_change_list_by_ids_approval_groups_request.uri = "/open-apis/corehr/v2/approval_groups/open_query_department_change_list_by_ids"
        open_query_department_change_list_by_ids_approval_groups_request.token_types = {AccessTokenType.TENANT}
        self._open_query_department_change_list_by_ids_approval_groups_request: OpenQueryDepartmentChangeListByIdsApprovalGroupsRequest = open_query_department_change_list_by_ids_approval_groups_request

    def process_id(self, process_id: str) -> "OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBuilder":
        self._open_query_department_change_list_by_ids_approval_groups_request.process_id = process_id
        self._open_query_department_change_list_by_ids_approval_groups_request.add_query("process_id", process_id)
        return self

    def user_id_type(self, user_id_type: str) -> "OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBuilder":
        self._open_query_department_change_list_by_ids_approval_groups_request.user_id_type = user_id_type
        self._open_query_department_change_list_by_ids_approval_groups_request.add_query("user_id_type", user_id_type)
        return self

    def department_id_type(self,
                           department_id_type: str) -> "OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBuilder":
        self._open_query_department_change_list_by_ids_approval_groups_request.department_id_type = department_id_type
        self._open_query_department_change_list_by_ids_approval_groups_request.add_query("department_id_type",
                                                                                         department_id_type)
        return self

    def request_body(self,
                     request_body: OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBody) -> "OpenQueryDepartmentChangeListByIdsApprovalGroupsRequestBuilder":
        self._open_query_department_change_list_by_ids_approval_groups_request.request_body = request_body
        self._open_query_department_change_list_by_ids_approval_groups_request.body = request_body
        return self

    def build(self) -> OpenQueryDepartmentChangeListByIdsApprovalGroupsRequest:
        return self._open_query_department_change_list_by_ids_approval_groups_request
