# 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 .offer_custom_field import OfferCustomField


class UpdateOfferCustomFieldRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.offer_custom_field_id: Optional[str] = None
        self.request_body: Optional[OfferCustomField] = None

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


class UpdateOfferCustomFieldRequestBuilder(object):

    def __init__(self) -> None:
        update_offer_custom_field_request = UpdateOfferCustomFieldRequest()
        update_offer_custom_field_request.http_method = HttpMethod.PUT
        update_offer_custom_field_request.uri = "/open-apis/hire/v1/offer_custom_fields/:offer_custom_field_id"
        update_offer_custom_field_request.token_types = {AccessTokenType.TENANT}
        self._update_offer_custom_field_request: UpdateOfferCustomFieldRequest = update_offer_custom_field_request

    def offer_custom_field_id(self, offer_custom_field_id: str) -> "UpdateOfferCustomFieldRequestBuilder":
        self._update_offer_custom_field_request.offer_custom_field_id = offer_custom_field_id
        self._update_offer_custom_field_request.paths["offer_custom_field_id"] = str(offer_custom_field_id)
        return self

    def request_body(self, request_body: OfferCustomField) -> "UpdateOfferCustomFieldRequestBuilder":
        self._update_offer_custom_field_request.request_body = request_body
        self._update_offer_custom_field_request.body = request_body
        return self

    def build(self) -> UpdateOfferCustomFieldRequest:
        return self._update_offer_custom_field_request
