# 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 .cancel_onboard_application_request_body import CancelOnboardApplicationRequestBody


class CancelOnboardApplicationRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.application_id: Optional[str] = None
        self.request_body: Optional[CancelOnboardApplicationRequestBody] = None

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


class CancelOnboardApplicationRequestBuilder(object):

    def __init__(self) -> None:
        cancel_onboard_application_request = CancelOnboardApplicationRequest()
        cancel_onboard_application_request.http_method = HttpMethod.POST
        cancel_onboard_application_request.uri = "/open-apis/hire/v1/applications/:application_id/cancel_onboard"
        cancel_onboard_application_request.token_types = {AccessTokenType.TENANT}
        self._cancel_onboard_application_request: CancelOnboardApplicationRequest = cancel_onboard_application_request

    def application_id(self, application_id: str) -> "CancelOnboardApplicationRequestBuilder":
        self._cancel_onboard_application_request.application_id = application_id
        self._cancel_onboard_application_request.paths["application_id"] = str(application_id)
        return self

    def request_body(self,
                     request_body: CancelOnboardApplicationRequestBody) -> "CancelOnboardApplicationRequestBuilder":
        self._cancel_onboard_application_request.request_body = request_body
        self._cancel_onboard_application_request.body = request_body
        return self

    def build(self) -> CancelOnboardApplicationRequest:
        return self._cancel_onboard_application_request
