# 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 .tripartite_agreement_info import TripartiteAgreementInfo


class UpdateTripartiteAgreementRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.tripartite_agreement_id: Optional[str] = None
        self.request_body: Optional[TripartiteAgreementInfo] = None

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


class UpdateTripartiteAgreementRequestBuilder(object):

    def __init__(self) -> None:
        update_tripartite_agreement_request = UpdateTripartiteAgreementRequest()
        update_tripartite_agreement_request.http_method = HttpMethod.PUT
        update_tripartite_agreement_request.uri = "/open-apis/hire/v1/tripartite_agreements/:tripartite_agreement_id"
        update_tripartite_agreement_request.token_types = {AccessTokenType.TENANT}
        self._update_tripartite_agreement_request: UpdateTripartiteAgreementRequest = update_tripartite_agreement_request

    def tripartite_agreement_id(self, tripartite_agreement_id: str) -> "UpdateTripartiteAgreementRequestBuilder":
        self._update_tripartite_agreement_request.tripartite_agreement_id = tripartite_agreement_id
        self._update_tripartite_agreement_request.paths["tripartite_agreement_id"] = str(tripartite_agreement_id)
        return self

    def request_body(self, request_body: TripartiteAgreementInfo) -> "UpdateTripartiteAgreementRequestBuilder":
        self._update_tripartite_agreement_request.request_body = request_body
        self._update_tripartite_agreement_request.body = request_body
        return self

    def build(self) -> UpdateTripartiteAgreementRequest:
        return self._update_tripartite_agreement_request
