# 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 .folder import Folder


class PatchUserMailboxFolderRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.user_mailbox_id: Optional[str] = None
        self.folder_id: Optional[int] = None
        self.request_body: Optional[Folder] = None

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


class PatchUserMailboxFolderRequestBuilder(object):

    def __init__(self) -> None:
        patch_user_mailbox_folder_request = PatchUserMailboxFolderRequest()
        patch_user_mailbox_folder_request.http_method = HttpMethod.PATCH
        patch_user_mailbox_folder_request.uri = "/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders/:folder_id"
        patch_user_mailbox_folder_request.token_types = {AccessTokenType.TENANT, AccessTokenType.USER}
        self._patch_user_mailbox_folder_request: PatchUserMailboxFolderRequest = patch_user_mailbox_folder_request

    def user_mailbox_id(self, user_mailbox_id: str) -> "PatchUserMailboxFolderRequestBuilder":
        self._patch_user_mailbox_folder_request.user_mailbox_id = user_mailbox_id
        self._patch_user_mailbox_folder_request.paths["user_mailbox_id"] = str(user_mailbox_id)
        return self

    def folder_id(self, folder_id: int) -> "PatchUserMailboxFolderRequestBuilder":
        self._patch_user_mailbox_folder_request.folder_id = folder_id
        self._patch_user_mailbox_folder_request.paths["folder_id"] = str(folder_id)
        return self

    def request_body(self, request_body: Folder) -> "PatchUserMailboxFolderRequestBuilder":
        self._patch_user_mailbox_folder_request.request_body = request_body
        self._patch_user_mailbox_folder_request.body = request_body
        return self

    def build(self) -> PatchUserMailboxFolderRequest:
        return self._patch_user_mailbox_folder_request
