# 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


class ListUserMailboxFolderRequest(BaseRequest):
    def __init__(self) -> None:
        super().__init__()
        self.folder_type: Optional[int] = None
        self.user_mailbox_id: Optional[str] = None

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


class ListUserMailboxFolderRequestBuilder(object):

    def __init__(self) -> None:
        list_user_mailbox_folder_request = ListUserMailboxFolderRequest()
        list_user_mailbox_folder_request.http_method = HttpMethod.GET
        list_user_mailbox_folder_request.uri = "/open-apis/mail/v1/user_mailboxes/:user_mailbox_id/folders"
        list_user_mailbox_folder_request.token_types = {AccessTokenType.TENANT, AccessTokenType.USER}
        self._list_user_mailbox_folder_request: ListUserMailboxFolderRequest = list_user_mailbox_folder_request

    def folder_type(self, folder_type: int) -> "ListUserMailboxFolderRequestBuilder":
        self._list_user_mailbox_folder_request.folder_type = folder_type
        self._list_user_mailbox_folder_request.add_query("folder_type", folder_type)
        return self

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

    def build(self) -> ListUserMailboxFolderRequest:
        return self._list_user_mailbox_folder_request
