# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init
from .document_display_setting import DocumentDisplaySetting
from .update_cover_request import UpdateCoverRequest


class UpdateDocumentRequest(object):
    _types = {
        "update_display_setting": DocumentDisplaySetting,
        "update_cover": UpdateCoverRequest,
    }

    def __init__(self, d=None):
        self.update_display_setting: Optional[DocumentDisplaySetting] = None
        self.update_cover: Optional[UpdateCoverRequest] = None
        init(self, d, self._types)

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


class UpdateDocumentRequestBuilder(object):
    def __init__(self) -> None:
        self._update_document_request = UpdateDocumentRequest()

    def update_display_setting(self, update_display_setting: DocumentDisplaySetting) -> "UpdateDocumentRequestBuilder":
        self._update_document_request.update_display_setting = update_display_setting
        return self

    def update_cover(self, update_cover: UpdateCoverRequest) -> "UpdateDocumentRequestBuilder":
        self._update_document_request.update_cover = update_cover
        return self

    def build(self) -> "UpdateDocumentRequest":
        return self._update_document_request
