# 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 .user_stats_fields_query_archive_rule_request_body import UserStatsFieldsQueryArchiveRuleRequestBody


class UserStatsFieldsQueryArchiveRuleRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.employee_type: Optional[str] = None
        self.request_body: Optional[UserStatsFieldsQueryArchiveRuleRequestBody] = None

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


class UserStatsFieldsQueryArchiveRuleRequestBuilder(object):

    def __init__(self) -> None:
        user_stats_fields_query_archive_rule_request = UserStatsFieldsQueryArchiveRuleRequest()
        user_stats_fields_query_archive_rule_request.http_method = HttpMethod.POST
        user_stats_fields_query_archive_rule_request.uri = "/open-apis/attendance/v1/archive_rule/user_stats_fields_query"
        user_stats_fields_query_archive_rule_request.token_types = {AccessTokenType.TENANT, AccessTokenType.USER}
        self._user_stats_fields_query_archive_rule_request: UserStatsFieldsQueryArchiveRuleRequest = user_stats_fields_query_archive_rule_request

    def employee_type(self, employee_type: str) -> "UserStatsFieldsQueryArchiveRuleRequestBuilder":
        self._user_stats_fields_query_archive_rule_request.employee_type = employee_type
        self._user_stats_fields_query_archive_rule_request.add_query("employee_type", employee_type)
        return self

    def request_body(self,
                     request_body: UserStatsFieldsQueryArchiveRuleRequestBody) -> "UserStatsFieldsQueryArchiveRuleRequestBuilder":
        self._user_stats_fields_query_archive_rule_request.request_body = request_body
        self._user_stats_fields_query_archive_rule_request.body = request_body
        return self

    def build(self) -> UserStatsFieldsQueryArchiveRuleRequest:
        return self._user_stats_fields_query_archive_rule_request
