
    hjeh                        d dl mZ d dlZ ej        e          Zd dlmZmZm	Z	 ddl
mZ ddlmZ ddlmZ erdd	lmZmZ d
Z G d de	          Z G d dee                   ZdS )    )annotationsN)TYPE_CHECKINGAny	TypedDict   )ID   )ProtocolError)Message)DocJsonDocument)pull_doc_replyc                      e Zd ZU ded<   dS )PullDocr   docN)__name__
__module____qualname____annotations__     Flib/python3.11/site-packages/bokeh/protocol/messages/pull_doc_reply.pyr   r   /   s         LLLLLr   r   c                  6    e Zd ZdZdZedd
            ZddZdS )r   z Define the ``PULL-DOC-REPLY`` message for replying to Document pull
    requests from clients

    The ``content`` fragment of for this message is has the form:

    .. code-block:: python

        {
            'doc' : <Document JSON>
        }

    zPULL-DOC-REPLY
request_idr   documentr   metadatar   returnc                    |                      |          }t          |                                          } | |||          }|S )ac   Create an ``PULL-DOC-REPLY`` message

        Args:
            request_id (str) :
                The message ID for the message that issues the pull request

            document (Document) :
                The Document to reply with

        Any additional keyword arguments will be put into the message
        ``metadata`` fragment as-is.

        )r   )r   )create_headerr   to_json)clsr   r   r   headercontentmsgs          r   createzpull_doc_reply.createB   sN     ""j"99h..00111c&(G,,
r   r   Nonec                v    d| j         vrt          d          |                    | j         d                    d S )Nr   zNo doc in PULL-DOC-REPLY)r#   r
   replace_with_json)selfr   s     r   push_to_documentzpull_doc_reply.push_to_documentW   s?    $$ :;;;dl5122222r   N)r   r   r   r   r   r   r   r   )r   r   r   r&   )r   r   r   __doc__msgtypeclassmethodr%   r*   r   r   r   r   r   2   sW          G   [(3 3 3 3 3 3r   r   )
__future__r   logging	getLoggerr   logtypingr   r   r   
core.typesr   
exceptionsr
   messager   document.documentr   r   __all__r   r   r   r   r   <module>r8      s   # " " " " " g!! 1 0 0 0 0 0 0 0 0 0       & & & & & &       766666666    i   (3 (3 (3 (3 (3WW% (3 (3 (3 (3 (3r   