# 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 .restore_flow_instance_pre_hire_request_body import RestoreFlowInstancePreHireRequestBody


class RestoreFlowInstancePreHireRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.request_body: Optional[RestoreFlowInstancePreHireRequestBody] = None

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


class RestoreFlowInstancePreHireRequestBuilder(object):

    def __init__(self) -> None:
        restore_flow_instance_pre_hire_request = RestoreFlowInstancePreHireRequest()
        restore_flow_instance_pre_hire_request.http_method = HttpMethod.POST
        restore_flow_instance_pre_hire_request.uri = "/open-apis/corehr/v2/pre_hires/restore_flow_instance"
        restore_flow_instance_pre_hire_request.token_types = {AccessTokenType.TENANT}
        self._restore_flow_instance_pre_hire_request: RestoreFlowInstancePreHireRequest = restore_flow_instance_pre_hire_request

    def request_body(self,
                     request_body: RestoreFlowInstancePreHireRequestBody) -> "RestoreFlowInstancePreHireRequestBuilder":
        self._restore_flow_instance_pre_hire_request.request_body = request_body
        self._restore_flow_instance_pre_hire_request.body = request_body
        return self

    def build(self) -> RestoreFlowInstancePreHireRequest:
        return self._restore_flow_instance_pre_hire_request
