
    (phE6                     f   S r SSKrSSK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S
KJr  SSKJr   " S S\\\4   \R                  5      r " S S\\\4   \R                  5      r " S S\R                  5      r " S S\R                  5      r " S S\R                  5      rg)zDAbstract base classes for Channel objects and Multicallable objects.    N)GenericOptional   )
_base_call)DeserializingFunction)MetadataType)RequestIterableType)RequestType)ResponseType)SerializingFunctionc                       \ rS rSrSr\R                  SSSSSS.S\S\\	   S\\
   S\\R                     S	\\   S
\\R                     S\R                   \\4   4S jj5       rSrg)UnaryUnaryMultiCallable   z4Enables asynchronous invocation of a unary-call RPC.Ntimeoutmetadatacredentialswait_for_readycompressionrequestr   r   r   r   r   returnc                    g)a  Asynchronously invokes the underlying RPC.

Args:
  request: The request value for the RPC.
  timeout: An optional duration of time in seconds to allow
    for the RPC.
  metadata: Optional :term:`metadata` to be transmitted to the
    service-side of the RPC.
  credentials: An optional CallCredentials for the RPC. Only valid for
    secure Channel.
  wait_for_ready: An optional flag to enable :term:`wait_for_ready` mechanism.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.

Returns:
  A UnaryUnaryCall object.

Raises:
  RpcError: Indicates that the RPC terminated with non-OK status. The
    raised RpcError will also be a Call for the RPC affording the RPC's
    metadata, status code, and details.
N selfr   r   r   r   r   r   s          I/var/www/html/venv/lib/python3.13/site-packages/grpc/aio/_base_channel.py__call__ UnaryUnaryMultiCallable.__call__!           r   )__name__
__module____qualname____firstlineno____doc__abcabstractmethodr
   r   floatr   grpcCallCredentialsboolCompressionr   UnaryUnaryCallr   r   __static_attributes__r   r    r   r   r      s    >
 $(+/6:)-26 %	
 <( d223 ! d../ 
	"	";#<	= r    r   c                       \ rS rSrSr\R                  SSSSSS.S\S\\	   S\\
   S\\R                     S	\\   S
\\R                     S\R                   \\4   4S jj5       rSrg)UnaryStreamMultiCallableD   z:Enables asynchronous invocation of a server-streaming RPC.Nr   r   r   r   r   r   r   r   c                    g)a  Asynchronously invokes the underlying RPC.

Args:
  request: The request value for the RPC.
  timeout: An optional duration of time in seconds to allow
    for the RPC.
  metadata: Optional :term:`metadata` to be transmitted to the
    service-side of the RPC.
  credentials: An optional CallCredentials for the RPC. Only valid for
    secure Channel.
  wait_for_ready: An optional flag to enable :term:`wait_for_ready` mechanism.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.

Returns:
  A UnaryStreamCall object.

Raises:
  RpcError: Indicates that the RPC terminated with non-OK status. The
    raised RpcError will also be a Call for the RPC affording the RPC's
    metadata, status code, and details.
Nr   r   s          r   r   !UnaryStreamMultiCallable.__call__G   r   r    r   )r!   r"   r#   r$   r%   r&   r'   r
   r   r(   r   r)   r*   r+   r,   r   UnaryStreamCallr   r   r.   r   r    r   r0   r0   D   s    D
 $(+/6:)-26 %	
 <( d223 ! d../ 
	#	#K$=	> r    r0   c                       \ rS rSrSr\R                        SS\\   S\\	   S\\
   S\\R                     S\\   S	\\R                     S
\R                   4S jj5       rSrg)StreamUnaryMultiCallablej   z:Enables asynchronous invocation of a client-streaming RPC.Nrequest_iteratorr   r   r   r   r   r   c                     g)a  Asynchronously invokes the underlying RPC.

Args:
  request_iterator: An optional async iterable or iterable of request
    messages for the RPC.
  timeout: An optional duration of time in seconds to allow
    for the RPC.
  metadata: Optional :term:`metadata` to be transmitted to the
    service-side of the RPC.
  credentials: An optional CallCredentials for the RPC. Only valid for
    secure Channel.
  wait_for_ready: An optional flag to enable :term:`wait_for_ready` mechanism.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.

Returns:
  A StreamUnaryCall object.

Raises:
  RpcError: Indicates that the RPC terminated with non-OK status. The
    raised RpcError will also be a Call for the RPC affording the RPC's
    metadata, status code, and details.
Nr   r   r8   r   r   r   r   r   s          r   r   !StreamUnaryMultiCallable.__call__m   r   r    r   NNNNNN)r!   r"   r#   r$   r%   r&   r'   r   r	   r(   r   r)   r*   r+   r,   r   StreamUnaryCallr   r.   r   r    r   r6   r6   j   s    D ;?#'+/6:)-26"#67 % <(	
 d223 ! d../ 
	#	# r    r6   c                       \ rS rSrSr\R                        SS\\   S\\	   S\\
   S\\R                     S\\   S	\\R                     S
\R                   4S jj5       rSrg)StreamStreamMultiCallable   zAEnables asynchronous invocation of a bidirectional-streaming RPC.Nr8   r   r   r   r   r   r   c                     g)a  Asynchronously invokes the underlying RPC.

Args:
  request_iterator: An optional async iterable or iterable of request
    messages for the RPC.
  timeout: An optional duration of time in seconds to allow
    for the RPC.
  metadata: Optional :term:`metadata` to be transmitted to the
    service-side of the RPC.
  credentials: An optional CallCredentials for the RPC. Only valid for
    secure Channel.
  wait_for_ready: An optional flag to enable :term:`wait_for_ready` mechanism.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.

Returns:
  A StreamStreamCall object.

Raises:
  RpcError: Indicates that the RPC terminated with non-OK status. The
    raised RpcError will also be a Call for the RPC affording the RPC's
    metadata, status code, and details.
Nr   r:   s          r   r   "StreamStreamMultiCallable.__call__   r   r    r   r<   )r!   r"   r#   r$   r%   r&   r'   r   r	   r(   r   r)   r*   r+   r,   r   StreamStreamCallr   r.   r   r    r   r?   r?      s    K ;?#'+/6:)-26"#67 % <(	
 d223 ! d../ 
	$	$ r    r?   c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  SS\	\
   4S jj5       r\R                   SS\S	\R                  4S
 jj5       r\R                  S\R                  S	S4S j5       r\R                  SS j5       r\R                     SS\S\	\   S\	\   S\	\   S	\4
S jj5       r\R                     SS\S\	\   S\	\   S\	\   S	\4
S jj5       r\R                     SS\S\	\   S\	\   S\	\   S	\4
S jj5       r\R                     SS\S\	\   S\	\   S\	\   S	\4
S jj5       rSrg)Channel   zEnables asynchronous RPC invocation as a client.

Channel objects implement the Asynchronous Context Manager (aka. async
with) type, although they are not supported to be entered and exited
multiple times.
c                    #    g7f)z_Starts an asynchronous context manager.

Returns:
  Channel the channel that was instantiated.
Nr   r   s    r   
__aenter__Channel.__aenter__           c                    #    g7f)zhFinishes the asynchronous context manager by closing the channel.

Still active RPCs will be cancelled.
Nr   )r   exc_typeexc_valexc_tbs       r   	__aexit__Channel.__aexit__   rK   rL   Ngracec                    #    g7f)a  Closes this Channel and releases all resources held by it.

This method immediately stops the channel from executing new RPCs in
all cases.

If a grace period is specified, this method waits until all active
RPCs are finished or until the grace period is reached. RPCs that haven't
been terminated within the grace period are aborted.
If a grace period is not specified (by passing None for grace),
all existing RPCs are cancelled immediately.

This method is idempotent.
Nr   )r   rS   s     r   closeChannel.close   rK   rL   try_to_connectr   c                     g)an  Checks the connectivity state of a channel.

This is an EXPERIMENTAL API.

If the channel reaches a stable connectivity state, it is guaranteed
that the return value of this function will eventually converge to that
state.

Args:
  try_to_connect: a bool indicate whether the Channel should try to
    connect to peer or not.

Returns: A ChannelConnectivity object.
Nr   )r   rW   s     r   	get_stateChannel.get_state   r   r    last_observed_statec                    #    g7f)a  Waits for a change in connectivity state.

This is an EXPERIMENTAL API.

The function blocks until there is a change in the channel connectivity
state from the "last_observed_state". If the state is already
different, this function will return immediately.

There is an inherent race between the invocation of
"Channel.wait_for_state_change" and "Channel.get_state". The state can
change arbitrary many times during the race, so there is no way to
observe every state transition.

If there is a need to put a timeout for this function, please refer to
"asyncio.wait_for".

Args:
  last_observed_state: A grpc.ChannelConnectivity object representing
    the last known state.
Nr   )r   r[   s     r   wait_for_state_changeChannel.wait_for_state_change   rK   rL   c                    #    g7f)z;Creates a coroutine that blocks until the Channel is READY.Nr   rH   s    r   channel_readyChannel.channel_ready
  rK   rL   methodrequest_serializerresponse_deserializer_registered_methodc                     g)aR  Creates a UnaryUnaryMultiCallable for a unary-unary method.

Args:
  method: The name of the RPC method.
  request_serializer: Optional :term:`serializer` for serializing the request
    message. Request goes unserialized in case None is passed.
  response_deserializer: Optional :term:`deserializer` for deserializing the
    response message. Response goes undeserialized in case None
    is passed.
  _registered_method: Implementation Private. Optional: A bool representing
    whether the method is registered.

Returns:
  A UnaryUnaryMultiCallable value for the named unary-unary method.
Nr   r   rb   rc   rd   re   s        r   unary_unaryChannel.unary_unary  r   r    c                     g)aV  Creates a UnaryStreamMultiCallable for a unary-stream method.

Args:
  method: The name of the RPC method.
  request_serializer: Optional :term:`serializer` for serializing the request
    message. Request goes unserialized in case None is passed.
  response_deserializer: Optional :term:`deserializer` for deserializing the
    response message. Response goes undeserialized in case None
    is passed.
  _registered_method: Implementation Private. Optional: A bool representing
    whether the method is registered.

Returns:
  A UnaryStreamMultiCallable value for the named unary-stream method.
Nr   rg   s        r   unary_streamChannel.unary_stream&  r   r    c                     g)aV  Creates a StreamUnaryMultiCallable for a stream-unary method.

Args:
  method: The name of the RPC method.
  request_serializer: Optional :term:`serializer` for serializing the request
    message. Request goes unserialized in case None is passed.
  response_deserializer: Optional :term:`deserializer` for deserializing the
    response message. Response goes undeserialized in case None
    is passed.
  _registered_method: Implementation Private. Optional: A bool representing
    whether the method is registered.

Returns:
  A StreamUnaryMultiCallable value for the named stream-unary method.
Nr   rg   s        r   stream_unaryChannel.stream_unary>  r   r    c                     g)aZ  Creates a StreamStreamMultiCallable for a stream-stream method.

Args:
  method: The name of the RPC method.
  request_serializer: Optional :term:`serializer` for serializing the request
    message. Request goes unserialized in case None is passed.
  response_deserializer: Optional :term:`deserializer` for deserializing the
    response message. Response goes undeserialized in case None
    is passed.
  _registered_method: Implementation Private. Optional: A bool representing
    whether the method is registered.

Returns:
  A StreamStreamMultiCallable value for the named stream-stream method.
Nr   rg   s        r   stream_streamChannel.stream_streamV  r   r    r   )N)F)r   N)NNF)r!   r"   r#   r$   r%   r&   r'   rI   rQ   r   r(   rU   r+   r)   ChannelConnectivityrY   r]   r`   strr   r   r   rh   r0   rk   r6   rn   r?   rq   r.   r   r    r   rE   rE      sy    	  	  	%   	%*"		!	! $ 	!55 
 2 	J J 	 =AAE-2 %%89  ((=>	
 %TN 
! . 	 =AAE-2 %%89  ((=>	
 %TN 
" . 	 =AAE-2 %%89  ((=>	
 %TN 
" . 	 =AAE-2 %%89  ((=>	
 %TN 
# r    rE   )r%   r&   typingr   r   r)    r   _typingr   r   r	   r
   r   r   ABCr   r0   r6   r?   rE   r   r    r   <module>ry      s    K 
 $   * ! (   ! (#gk<&?@#'' #L#w{L'@A377 #L#sww #L# #Lvcgg vr    