# 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


class QueryAgencyRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.name: Optional[str] = None
        self.user_id_type: Optional[str] = None

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


class QueryAgencyRequestBuilder(object):

    def __init__(self) -> None:
        query_agency_request = QueryAgencyRequest()
        query_agency_request.http_method = HttpMethod.GET
        query_agency_request.uri = "/open-apis/hire/v1/agencies/query"
        query_agency_request.token_types = {AccessTokenType.TENANT}
        self._query_agency_request: QueryAgencyRequest = query_agency_request

    def name(self, name: str) -> "QueryAgencyRequestBuilder":
        self._query_agency_request.name = name
        self._query_agency_request.add_query("name", name)
        return self

    def user_id_type(self, user_id_type: str) -> "QueryAgencyRequestBuilder":
        self._query_agency_request.user_id_type = user_id_type
        self._query_agency_request.add_query("user_id_type", user_id_type)
        return self

    def build(self) -> QueryAgencyRequest:
        return self._query_agency_request
