
    h;                     4    d Z  G d de      Z G d de      Zy)z%Represent a response from the server.c                   v    e Zd ZdZd Zed        Zed        Zed        Zed        Z	ed        Z
ed        Zy	)
Response_data_address_request_id	_duration_from_command_docsc                 X    || _         || _        || _        || _        || _        || _        y)al  Represent a response from the server.

        :Parameters:
          - `data`: A network response message.
          - `address`: (host, port) of the source server.
          - `request_id`: The request id of this operation.
          - `duration`: The duration of the operation.
          - `from_command`: if the response is the result of a db command.
        Nr   )selfdataaddress
request_iddurationfrom_commanddocss          S/var/www/html/ranktracker/api/venv/lib/python3.12/site-packages/pymongo/response.py__init__zResponse.__init__   s0     
%!)
    c                     | j                   S )z!Server response's raw BSON bytes.)r   r   s    r   r   zResponse.data(        zzr   c                     | j                   S )z"(host, port) of the source server.)r   r   s    r   r   zResponse.address-   s     }}r   c                     | j                   S )z!The request id of this operation.)r   r   s    r   r   zResponse.request_id2   s     r   c                     | j                   S )zThe duration of the operation.)r   r   s    r   r   zResponse.duration7   s     ~~r   c                     | j                   S )z.If the response is a result from a db command.)r	   r   s    r   r   zResponse.from_command<   s     !!!r   c                     | j                   S )zThe decoded document(s).)r
   r   s    r   r   zResponse.docsA   r   r   N)__name__
__module____qualname__	__slots__r   propertyr   r   r   r   r   r    r   r   r   r      s    +I$           " "  r   r   c                   B     e Zd ZdZ fdZed        Zed        Z xZS )ExhaustResponse)_socket_info_poolc	                 R    t         t        |   ||||||       || _        || _        y)a  Represent a response to an exhaust cursor's initial query.

        :Parameters:
          - `data`:  A network response message.
          - `address`: (host, port) of the source server.
          - `socket_info`: The SocketInfo used for the initial query.
          - `pool`: The Pool from which the SocketInfo came.
          - `request_id`: The request id of this operation.
          - `duration`: The duration of the operation.
          - `from_command`: If the response is the result of a db command.
        N)superr%   r   r&   r'   )
r   r   r   socket_infopoolr   r   r   r   	__class__s
            r   r   zExhaustResponse.__init__I   s6     	ot-d.5.8.6.:D		B
 (
r   c                     | j                   S )zThe SocketInfo used for the initial query.

        The server will send batches on this socket, without waiting for
        getMores from the client, until the result set is exhausted or there
        is an error.
        )r&   r   s    r   r*   zExhaustResponse.socket_info^   s        r   c                     | j                   S )z(The Pool from which the SocketInfo came.)r'   r   s    r   r+   zExhaustResponse.poolh   r   r   )	r   r   r    r!   r   r"   r*   r+   __classcell__)r,   s   @r   r%   r%   F   s5    )I* ! !  r   r%   N)__doc__objectr   r%   r#   r   r   <module>r2      s#    ,2v 2h%h %r   