# 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_agency_request_body import ProtectAgencyRequestBody


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

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


class ProtectAgencyRequestBuilder(object):

    def __init__(self) -> None:
        protect_agency_request = ProtectAgencyRequest()
        protect_agency_request.http_method = HttpMethod.POST
        protect_agency_request.uri = "/open-apis/hire/v1/agencies/protect"
        protect_agency_request.token_types = {AccessTokenType.TENANT}
        self._protect_agency_request: ProtectAgencyRequest = protect_agency_request

    def user_id_type(self, user_id_type: str) -> "ProtectAgencyRequestBuilder":
        self._protect_agency_request.user_id_type = user_id_type
        self._protect_agency_request.add_query("user_id_type", user_id_type)
        return self

    def request_body(self, request_body: ProtectAgencyRequestBody) -> "ProtectAgencyRequestBuilder":
        self._protect_agency_request.request_body = request_body
        self._protect_agency_request.body = request_body
        return self

    def build(self) -> ProtectAgencyRequest:
        return self._protect_agency_request
