# 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 .revoke_job_change_request_body import RevokeJobChangeRequestBody


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

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


class RevokeJobChangeRequestBuilder(object):

    def __init__(self) -> None:
        revoke_job_change_request = RevokeJobChangeRequest()
        revoke_job_change_request.http_method = HttpMethod.POST
        revoke_job_change_request.uri = "/open-apis/corehr/v2/job_changes/:job_change_id/revoke"
        revoke_job_change_request.token_types = {AccessTokenType.TENANT}
        self._revoke_job_change_request: RevokeJobChangeRequest = revoke_job_change_request

    def user_id_type(self, user_id_type: str) -> "RevokeJobChangeRequestBuilder":
        self._revoke_job_change_request.user_id_type = user_id_type
        self._revoke_job_change_request.add_query("user_id_type", user_id_type)
        return self

    def job_change_id(self, job_change_id: str) -> "RevokeJobChangeRequestBuilder":
        self._revoke_job_change_request.job_change_id = job_change_id
        self._revoke_job_change_request.paths["job_change_id"] = str(job_change_id)
        return self

    def request_body(self, request_body: RevokeJobChangeRequestBody) -> "RevokeJobChangeRequestBuilder":
        self._revoke_job_change_request.request_body = request_body
        self._revoke_job_change_request.body = request_body
        return self

    def build(self) -> RevokeJobChangeRequest:
        return self._revoke_job_change_request
