# 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 .batch_query_default_cost_center_request_body import BatchQueryDefaultCostCenterRequestBody


class BatchQueryDefaultCostCenterRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.user_id_type: Optional[str] = None
        self.request_body: Optional[BatchQueryDefaultCostCenterRequestBody] = None

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


class BatchQueryDefaultCostCenterRequestBuilder(object):

    def __init__(self) -> None:
        batch_query_default_cost_center_request = BatchQueryDefaultCostCenterRequest()
        batch_query_default_cost_center_request.http_method = HttpMethod.POST
        batch_query_default_cost_center_request.uri = "/open-apis/corehr/v2/default_cost_centers/batch_query"
        batch_query_default_cost_center_request.token_types = {AccessTokenType.TENANT}
        self._batch_query_default_cost_center_request: BatchQueryDefaultCostCenterRequest = batch_query_default_cost_center_request

    def user_id_type(self, user_id_type: str) -> "BatchQueryDefaultCostCenterRequestBuilder":
        self._batch_query_default_cost_center_request.user_id_type = user_id_type
        self._batch_query_default_cost_center_request.add_query("user_id_type", user_id_type)
        return self

    def request_body(self,
                     request_body: BatchQueryDefaultCostCenterRequestBody) -> "BatchQueryDefaultCostCenterRequestBuilder":
        self._batch_query_default_cost_center_request.request_body = request_body
        self._batch_query_default_cost_center_request.body = request_body
        return self

    def build(self) -> BatchQueryDefaultCostCenterRequest:
        return self._batch_query_default_cost_center_request
