# 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 .external_offer import ExternalOffer


class UpdateExternalOfferRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.external_offer_id: Optional[str] = None
        self.request_body: Optional[ExternalOffer] = None

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


class UpdateExternalOfferRequestBuilder(object):

    def __init__(self) -> None:
        update_external_offer_request = UpdateExternalOfferRequest()
        update_external_offer_request.http_method = HttpMethod.PUT
        update_external_offer_request.uri = "/open-apis/hire/v1/external_offers/:external_offer_id"
        update_external_offer_request.token_types = {AccessTokenType.TENANT}
        self._update_external_offer_request: UpdateExternalOfferRequest = update_external_offer_request

    def external_offer_id(self, external_offer_id: str) -> "UpdateExternalOfferRequestBuilder":
        self._update_external_offer_request.external_offer_id = external_offer_id
        self._update_external_offer_request.paths["external_offer_id"] = str(external_offer_id)
        return self

    def request_body(self, request_body: ExternalOffer) -> "UpdateExternalOfferRequestBuilder":
        self._update_external_offer_request.request_body = request_body
        self._update_external_offer_request.body = request_body
        return self

    def build(self) -> UpdateExternalOfferRequest:
        return self._update_external_offer_request
