# 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 QueryRecentChangeLocationRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.page_size: Optional[int] = None
        self.page_token: Optional[str] = None
        self.start_date: Optional[str] = None
        self.end_date: Optional[str] = None

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


class QueryRecentChangeLocationRequestBuilder(object):

    def __init__(self) -> None:
        query_recent_change_location_request = QueryRecentChangeLocationRequest()
        query_recent_change_location_request.http_method = HttpMethod.GET
        query_recent_change_location_request.uri = "/open-apis/corehr/v2/locations/query_recent_change"
        query_recent_change_location_request.token_types = {AccessTokenType.TENANT}
        self._query_recent_change_location_request: QueryRecentChangeLocationRequest = query_recent_change_location_request

    def page_size(self, page_size: int) -> "QueryRecentChangeLocationRequestBuilder":
        self._query_recent_change_location_request.page_size = page_size
        self._query_recent_change_location_request.add_query("page_size", page_size)
        return self

    def page_token(self, page_token: str) -> "QueryRecentChangeLocationRequestBuilder":
        self._query_recent_change_location_request.page_token = page_token
        self._query_recent_change_location_request.add_query("page_token", page_token)
        return self

    def start_date(self, start_date: str) -> "QueryRecentChangeLocationRequestBuilder":
        self._query_recent_change_location_request.start_date = start_date
        self._query_recent_change_location_request.add_query("start_date", start_date)
        return self

    def end_date(self, end_date: str) -> "QueryRecentChangeLocationRequestBuilder":
        self._query_recent_change_location_request.end_date = end_date
        self._query_recent_change_location_request.add_query("end_date", end_date)
        return self

    def build(self) -> QueryRecentChangeLocationRequest:
        return self._query_recent_change_location_request
