
    (ph                     .   S r SSKJr  SSKJr  SSKJrJrJrJrJ	r	J
r
  SSKrSSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  Sr " S S\S9r " S S\\S9r " S S\\\4   \\S9r " S S\\\4   \\S9r " S S\\\4   \\S9r " S S\\\4   \\S9rg)zAbstract base classes for client-side Call objects.

Call objects represents the RPC itself, and offer methods to access / modify
its information. They also offer methods to manipulate the life-cycle of the
RPC, e.g. cancellation.
    )ABCMeta)abstractmethod)AnyAsyncIterator	GeneratorGenericOptionalUnionN   )Metadata)DoneCallbackType)EOFType)RequestType)ResponseType)
RpcContextCallUnaryUnaryCallUnaryStreamCallc                       \ rS rSrSr\S\4S j5       r\S\4S j5       r\S\	\
   4S j5       r\S\4S j5       r\S\SS	4S
 j5       rSrg	)r   $   z,Provides RPC-related information and action.returnc                     g)zReturn True if the RPC is cancelled.

The RPC is cancelled when the cancellation was requested with cancel().

Returns:
  A bool indicates whether the RPC is cancelled or not.
N selfs    F/var/www/html/venv/lib/python3.13/site-packages/grpc/aio/_base_call.py	cancelledRpcContext.cancelled'           c                     g)zReturn True if the RPC is done.

An RPC is done if the RPC is completed, cancelled or aborted.

Returns:
  A bool indicates if the RPC is done.
Nr   r   s    r   doneRpcContext.done1   r   r    c                     g)a  Describes the length of allowed time remaining for the RPC.

Returns:
  A nonnegative float indicating the length of allowed time in seconds
  remaining for the RPC to complete before it is considered to have
  timed out, or None if no deadline was specified for the RPC.
Nr   r   s    r   time_remainingRpcContext.time_remaining;   r   r    c                     g)zCancels the RPC.

Idempotent and has no effect if the RPC has already terminated.

Returns:
  A bool indicates if the cancellation is performed or not.
Nr   r   s    r   cancelRpcContext.cancelE   r   r    callbackNc                     g)zRegisters a callback to be called on RPC termination.

Args:
  callback: A callable object will be called with the call object as
  its only argument.
Nr   )r   r*   s     r   add_done_callbackRpcContext.add_done_callbackO   r   r    r   )__name__
__module____qualname____firstlineno____doc__r   boolr   r"   r	   floatr%   r(   r   r,   __static_attributes__r   r    r   r   r   $   s    64   d         *: t  r    r   )	metaclassc                       \ rS rSrSr\S\4S j5       r\S\4S j5       r\S\	R                  4S j5       r\S\4S j5       r\SS	 j5       rS
rg)r   Y   z5The abstract base class of an RPC on the client-side.r   c                    #    g7f)z\Accesses the initial metadata sent by the server.

Returns:
  The initial :term:`metadata`.
Nr   r   s    r   initial_metadataCall.initial_metadata\           c                    #    g7f)z^Accesses the trailing metadata sent by the server.

Returns:
  The trailing :term:`metadata`.
Nr   r   s    r   trailing_metadataCall.trailing_metadatad   r<   r=   c                    #    g7f)z[Accesses the status code sent by the server.

Returns:
  The StatusCode value for the RPC.
Nr   r   s    r   code	Call.codel   r<   r=   c                    #    g7f)zTAccesses the details sent by the server.

Returns:
  The details string of the RPC.
Nr   r   s    r   detailsCall.detailst   r<   r=   Nc                    #    g7f)a8  Waits until connected to peer and raises aio.AioRpcError if failed.

This is an EXPERIMENTAL method.

This method ensures the RPC has been successfully connected. Otherwise,
an AioRpcError will be raised to explain the reason of the connection
failure.

This method is recommended for building retry mechanisms.
Nr   r   s    r   wait_for_connectionCall.wait_for_connection|   r<   r=   r   r   N)r.   r/   r0   r1   r2   r   r   r:   r?   grpc
StatusCoderB   strrE   rH   r5   r   r    r   r   r   Y   s    ?      DOO   s   
 
r    r   c                   <    \ rS rSrSr\S\\S\4   4S j5       r	Sr
g)r      z@The abstract base class of a unary-unary RPC on the client-side.r   Nc                     g)zUAwait the response message to be ready.

Returns:
  The response message of the RPC.
Nr   r   s    r   	__await__UnaryUnaryCall.__await__   r   r    r   )r.   r/   r0   r1   r2   r   r   r   r   rQ   r5   r   r    r   r   r      s-     K9S$%<=  r    r   c                   T    \ rS rSr\S\\   4S j5       r\S\\	\4   4S j5       r
Srg)r      r   c                     gzReturns the async iterator representation that yields messages.

Under the hood, it is calling the "read" method.

Returns:
  An async iterator object that yields messages.
Nr   r   s    r   	__aiter__UnaryStreamCall.__aiter__   r   r    c                    #    g7fa  Reads one message from the stream.

Read operations must be serialized when called from multiple
coroutines.

Note that the iterator and read/write APIs may not be mixed on
a single RPC.

Returns:
  A response message, or an `grpc.aio.EOF` to indicate the end of the
  stream.
Nr   r   s    r   readUnaryStreamCall.read   r<   r=   r   N)r.   r/   r0   r1   r   r   r   rW   r
   r   r[   r5   r   r    r   r   r      sG     =6   E'<"78  r    r   c                   h    \ rS rSr\S\SS4S j5       r\S	S j5       r\S\\	S\
4   4S j5       rSrg)
StreamUnaryCall   requestr   Nc                    #    g7fzWrites one message to the stream.

Note that the iterator and read/write APIs may not be mixed on
a single RPC.

Raises:
  An RpcError exception if the write failed.
Nr   r   r`   s     r   writeStreamUnaryCall.write   r<   r=   c                    #    g7fzNotifies server that the client is done sending messages.

After done_writing is called, any additional invocation to the write
function will fail. This function is idempotent.
Nr   r   s    r   done_writingStreamUnaryCall.done_writing   r<   r=   c                     g)zXAwait the response message to be ready.

Returns:
  The response message of the stream.
Nr   r   s    r   rQ   StreamUnaryCall.__await__   r   r    r   rJ   )r.   r/   r0   r1   r   r   rd   rh   r   r   r   rQ   r5   r   r    r   r^   r^      s_     ; 4     9S$%<=  r    r^   c                       \ rS rSr\S\\   4S j5       r\S\\	\4   4S j5       r
\S\SS4S j5       r\S
S j5       rS	rg)StreamStreamCall   r   c                     grV   r   r   s    r   rW   StreamStreamCall.__aiter__   r   r    c                    #    g7frZ   r   r   s    r   r[   StreamStreamCall.read   r<   r=   r`   Nc                    #    g7frb   r   rc   s     r   rd   StreamStreamCall.write   r<   r=   c                    #    g7frg   r   r   s    r   rh   StreamStreamCall.done_writing   r<   r=   r   rJ   )r.   r/   r0   r1   r   r   r   rW   r
   r   r[   r   rd   rh   r5   r   r    r   rm   rm      s}     =6   E'<"78   ; 4    r    rm   )r2   abcr   r   typingr   r   r   r   r	   r
   rK   	_metadatar   _typingr   r   r   r   __all__r   r   r   r   r^   rm   r   r    r   <module>r|      s      J J   %    !
C27 2j.: .bK%&K%&:K%&>-K%&-r    