# 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 .protect_search_agency_request_body import ProtectSearchAgencyRequestBody


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

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


class ProtectSearchAgencyRequestBuilder(object):

    def __init__(self) -> None:
        protect_search_agency_request = ProtectSearchAgencyRequest()
        protect_search_agency_request.http_method = HttpMethod.POST
        protect_search_agency_request.uri = "/open-apis/hire/v1/agencies/protection_period/search"
        protect_search_agency_request.token_types = {AccessTokenType.TENANT}
        self._protect_search_agency_request: ProtectSearchAgencyRequest = protect_search_agency_request

    def request_body(self, request_body: ProtectSearchAgencyRequestBody) -> "ProtectSearchAgencyRequestBuilder":
        self._protect_search_agency_request.request_body = request_body
        self._protect_search_agency_request.body = request_body
        return self

    def build(self) -> ProtectSearchAgencyRequest:
        return self._protect_search_agency_request
