# 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 .query_payment_detail_request_body import QueryPaymentDetailRequestBody


class QueryPaymentDetailRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.request_body: Optional[QueryPaymentDetailRequestBody] = None

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


class QueryPaymentDetailRequestBuilder(object):

    def __init__(self) -> None:
        query_payment_detail_request = QueryPaymentDetailRequest()
        query_payment_detail_request.http_method = HttpMethod.POST
        query_payment_detail_request.uri = "/open-apis/payroll/v1/payment_detail/query"
        query_payment_detail_request.token_types = {AccessTokenType.USER, AccessTokenType.TENANT}
        self._query_payment_detail_request: QueryPaymentDetailRequest = query_payment_detail_request

    def request_body(self, request_body: QueryPaymentDetailRequestBody) -> "QueryPaymentDetailRequestBuilder":
        self._query_payment_detail_request.request_body = request_body
        self._query_payment_detail_request.body = request_body
        return self

    def build(self) -> QueryPaymentDetailRequest:
        return self._query_payment_detail_request
