fdZddlmZddlmZmZmZmZmZm Z erddl m Z ddl m Z mZddlmZddlmZmZGdd ZGd d eZy ) z%Represent a response from the server.) annotations) TYPE_CHECKINGAnyMappingOptionalSequenceUnion) timedelta)_OpMsg_OpReply) Connection)_Address _DocumentOutceZdZdZ d dZed dZed dZed dZeddZ eddZ eddZ y )Response_data_address _request_id _duration _from_command_docscX||_||_||_||_||_||_y)a\Represent a response from the server. :param data: A network response message. :param address: (host, port) of the source server. :param request_id: The request id of this operation. :param duration: The duration of the operation. :param from_command: if the response is the result of a db command. Nr)selfdataaddress request_idduration from_commanddocss Y/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/pymongo/response.py__init__zResponse.__init__s0"  %!) c|jS)z!Server response's raw BSON bytes.)rrs r!rz Response.data7zzr#c|jS)z"(host, port) of the source server.)rr%s r!rzResponse.address<s}}r#c|jS)z!The request id of this operation.)rr%s r!rzResponse.request_idAsr#c|jS)zThe duration of the operation.)rr%s r!rzResponse.durationFs~~r#c|jS)z.If the response is a result from a db command.)rr%s r!rzResponse.from_commandKs!!!r#c|jS)zThe decoded document(s).)rr%s r!r z Response.docsPr&r#N) rUnion[_OpMsg, _OpReply]rrrintrOptional[timedelta]rboolr Sequence[Mapping[str, Any]])returnr,)r1r)r1r-)r1r.r1r/)r1r0) __name__ __module__ __qualname__ __slots__r"propertyrrrrrr r#r!rrs[I%  &   *0  ""r#rcheZdZdZ dfd ZeddZeddZxZS)PinnedResponse)_conn _more_to_comec Jt |||||||||_||_y)a<Represent a response to an exhaust cursor's initial query. :param data: A network response message. :param address: (host, port) of the source server. :param conn: The Connection used for the initial query. :param request_id: The request id of this operation. :param duration: The duration of the operation. :param from_command: If the response is the result of a db command. :param docs: List of documents. :param more_to_come: Bool indicating whether cursor is ready to be exhausted. N)superr"r;r<) rrrconnrrrr more_to_come __class__s r!r"zPinnedResponse.__init__Ys+. w HlDQ )r#c|jS)zThe Connection 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?zPinnedResponse.conntszzr#c|jS)zIf true, server is ready to send batches on the socket until the result set is exhausted or there is an error. )r<r%s r!r@zPinnedResponse.more_to_come~s !!!r#)rr,rrr?r rr-rr.rr/r zlist[_DocumentOut]r@r/)r1r r2) r3r4r5r6r"r7r?r@ __classcell__)rAs@r!r:r:Vs*I*%** *  * & **!**6""r#r:N)__doc__ __future__rtypingrrrrrr datetimer pymongo.messager r pymongo.poolr pymongo.typingsrrrr:r8r#r!rLs9,"II"0'677t-"X-"r#