
    (phA                    t	   S r SSKrSSKrSSKrSSK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  \R                  " \5      R#                  \R$                  " 5       5         SSKJr   " S
 S\5      r " S S\5      r " S S\R2                  5      r\R6                   " S S\R8                  5      5       r\R6                   " S S\R8                  5      5       r " S S\R2                  5      r " S S\5      r  " S S\R2                  5      r! " S S\!\RD                  S9r# " S S\R2                  5      r$ " S S \R2                  5      r% " S! S"\R2                  5      r& " S# S$\R2                  5      r' " S% S&\R2                  5      r( " S' S(\)5      r* " S) S*\)5      r+ " S+ S,\R2                  5      r, " S- S.\R2                  5      r- " S/ S0\R2                  5      r. " S1 S2\)5      r/ " S3 S4\)5      r0 " S5 S6\R2                  5      r1 " S7 S8\R2                  5      r2 " S9 S:\R2                  5      r3 " S; S<\R2                  5      r4 " S= S>\R2                  5      r5 " S? S@\!\RD                  S9r6 " SA SB\R2                  5      r7 " SC SD\R2                  5      r8 " SE SF\R2                  5      r9 " SG SH\9\RD                  S9r: " SI SJ\R2                  5      r; " SK SL\R2                  5      r< StSM jr= StSN jr> StSO jr? StSP jr@SQ rA SuSR jrBSvSS jrCSvST jrDSU rESV rFSW rG  SwSX jrHSY rISZ rJ SvS[ jrK SxS\ jrL\R6                   " S] S^\R8                  5      5       rM\MR                  4S_ jrO\MR                  4S` jrPSvSa jrQSb rRSc rSSd rTStSe jrUStSf jrVSg rW      SySh jrX\R                  Si 5       rZ\R6                   " Sj Sk\R                  5      5       r\Slr] SSK^r^\R                  R                  Sm\^05         SSKara\R                  R                  Sn\a05         SSKbrb\R                  R                  So\b05        \R                  Sp:  a+  \Sq:X  a$  SSrKJdrd  \R                  R                  Ss\d05        ggg! \ a    S	r GN&f = f! \ a     Nf = f! \ a     Nf = f! \ a     Nkf = f)zzgRPC's Python API.    N)_compression)cygrpc)protos)protos_and_services)services)__version__dev0c                       \ rS rSrSrSrg)FutureTimeoutError'   z3Indicates that a method call on a Future timed out. N__name__
__module____qualname____firstlineno____doc____static_attributes__r       @/var/www/html/venv/lib/python3.13/site-packages/grpc/__init__.pyr   r   '   s    =r   r   c                       \ rS rSrSrSrg)FutureCancelledError+   zAIndicates that the computation underlying a Future was cancelled.r   Nr   r   r   r   r   r   +   s    Kr   r   c                   D   \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  SS j5       r\R                  SS	 j5       r\R                  SS
 j5       r\R                  S 5       rSrg)Future/   zA representation of a computation in another control flow.

Computations represented by a Future may be yet to be begun,
may be ongoing, or may have already completed.
c                     [        5       e)a  Attempts to cancel the computation.

This method does not block.

Returns:
    bool:
    Returns True if the computation was canceled.

    Returns False under all other circumstances, for example:

    1. computation has begun and could not be canceled.
    2. computation has finished
    3. computation is scheduled for execution and it is impossible
        to determine its state without blocking.
NotImplementedErrorselfs    r   cancelFuture.cancel6       " "##r   c                     [        5       e)aL  Describes whether the computation was cancelled.

This method does not block.

Returns:
    bool:
    Returns True if the computation was cancelled before its result became
    available.

    Returns False under all other circumstances, for example:

    1. computation was not cancelled.
    2. computation's result is available.
r   r    s    r   	cancelledFuture.cancelledI         "##r   c                     [        5       e)zDescribes whether the computation is taking place.

This method does not block.

Returns:
    Returns True if the computation is scheduled for execution or
    currently executing.

    Returns False if the computation already executed or was cancelled.
r   r    s    r   runningFuture.running[        "##r   c                     [        5       e)aF  Describes whether the computation has taken place.

This method does not block.

Returns:
    bool:
    Returns True if the computation already executed or was cancelled.
    Returns False if the computation is scheduled for execution or
    currently executing.
    This is exactly opposite of the running() method's result.
r   r    s    r   doneFuture.donei        "##r   Nc                     [        5       e)aq  Returns the result of the computation or raises its exception.

This method may return immediately or may block.

Args:
  timeout: The length of time in seconds to wait for the computation to
    finish or be cancelled. If None, the call will block until the
    computations's termination.

Returns:
  The return value of the computation.

Raises:
  FutureTimeoutError: If a timeout value is passed and the computation
    does not terminate within the allotted time.
  FutureCancelledError: If the computation was cancelled.
  Exception: If the computation raised an exception, this call will
    raise the same exception.
r   r!   timeouts     r   resultFuture.resultx       * "##r   c                     [        5       e)aD  Return the exception raised by the computation.

This method may return immediately or may block.

Args:
  timeout: The length of time in seconds to wait for the computation to
    terminate or be cancelled. If None, the call will block until the
    computations's termination.

Returns:
    The exception raised by the computation, or None if the computation
    did not raise an exception.

Raises:
  FutureTimeoutError: If a timeout value is passed and the computation
    does not terminate within the allotted time.
  FutureCancelledError: If the computation was cancelled.
r   r2   s     r   	exceptionFuture.exception       ( "##r   c                     [        5       e)ae  Access the traceback of the exception raised by the computation.

This method may return immediately or may block.

Args:
  timeout: The length of time in seconds to wait for the computation
    to terminate or be cancelled. If None, the call will block until
    the computation's termination.

Returns:
    The traceback of the exception raised by the computation, or None
    if the computation did not raise an exception.

Raises:
  FutureTimeoutError: If a timeout value is passed and the computation
    does not terminate within the allotted time.
  FutureCancelledError: If the computation was cancelled.
r   r2   s     r   	tracebackFuture.traceback   r:   r   c                     [        5       e)a  Adds a function to be called at completion of the computation.

The callback will be passed this Future object describing the outcome
of the computation.  Callbacks will be invoked after the future is
terminated, whether successfully or not.

If the computation has already completed, the callback will be called
immediately.

Exceptions raised in the callback will be logged at ERROR level, but
will not terminate any threads of execution.

Args:
  fn: A callable taking this Future object as its single parameter.
r   )r!   fns     r   add_done_callbackFuture.add_done_callback   r$   r   r   N)r   r   r   r   r   abcabstractmethodr"   r&   r*   r.   r4   r8   r<   r@   r   r   r   r   r   r   /   s     	$ $$ 	$ $" 	$ $ 	$ $ 	$ $, 	$ $* 	$ $* 	$ $r   r   c                      \ rS rSrSr\R                  R                  S4r\R                  R                  S4r
\R                  R                  S4r\R                  R                  S4r\R                  R                  S4rSrg	)
ChannelConnectivity   aW  Mirrors grpc_connectivity_state in the gRPC Core.

Attributes:
  IDLE: The channel is idle.
  CONNECTING: The channel is connecting.
  READY: The channel is ready to conduct RPCs.
  TRANSIENT_FAILURE: The channel has seen a failure from which it expects
    to recover.
  SHUTDOWN: The channel has seen a failure from which it cannot recover.
idle
connectingreadyztransient failureshutdownr   N)r   r   r   r   r   _cygrpcConnectivityStaterH   IDLErI   
CONNECTINGrJ   READYtransient_failureTRANSIENT_FAILURErK   SHUTDOWNr   r   r   r   rF   rF      s}    	 %%**F3D++66EJ&&,,g6E!!33 ))22J?Hr   rF   c                   H   \ rS rSrSr\R                  R                  S4r\R                  R                  S4r
\R                  R                  S4r\R                  R                  S4r\R                  R                  S4r\R                  R"                  S4r\R                  R&                  S	4r\R                  R*                  S
4r\R                  R.                  S4r\R                  R2                  S4r\R                  R6                  S4r\R                  R:                  S4r\R                  R>                  S4r \R                  RB                  S4r"\R                  RF                  S4r$\R                  RJ                  S4r&\R                  RN                  S4r(Sr)g)
StatusCode   ap  Mirrors grpc_status_code in the gRPC Core.

Attributes:
  OK: Not an error; returned on success
  CANCELLED: The operation was cancelled (typically by the caller).
  UNKNOWN: Unknown error.
  INVALID_ARGUMENT: Client specified an invalid argument.
  DEADLINE_EXCEEDED: Deadline expired before operation could complete.
  NOT_FOUND: Some requested entity (e.g., file or directory) was not found.
  ALREADY_EXISTS: Some entity that we attempted to create (e.g., file or directory)
    already exists.
  PERMISSION_DENIED: The caller does not have permission to execute the specified
    operation.
  UNAUTHENTICATED: The request does not have valid authentication credentials for the
    operation.
  RESOURCE_EXHAUSTED: Some resource has been exhausted, perhaps a per-user quota, or
    perhaps the entire file system is out of space.
  FAILED_PRECONDITION: Operation was rejected because the system is not in a state
    required for the operation's execution.
  ABORTED: The operation was aborted, typically due to a concurrency issue
    like sequencer check failures, transaction aborts, etc.
  UNIMPLEMENTED: Operation is not implemented or not supported/enabled in this service.
  INTERNAL: Internal errors.  Means some invariants expected by underlying
    system has been broken.
  UNAVAILABLE: The service is currently unavailable.
  DATA_LOSS: Unrecoverable data loss or corruption.
okr&   unknownzinvalid argumentzdeadline exceededz	not foundzalready existszpermission deniedzresource exhaustedzfailed preconditionabortedzout of rangeunimplementedinternalunavailablez	data lossunauthenticatedr   N)*r   r   r   r   r   rL   rU   rW   OKr&   	CANCELLEDrX   UNKNOWNinvalid_argumentINVALID_ARGUMENTdeadline_exceededDEADLINE_EXCEEDED	not_found	NOT_FOUNDalready_existsALREADY_EXISTSpermission_deniedPERMISSION_DENIEDresource_exhaustedRESOURCE_EXHAUSTEDfailed_preconditionFAILED_PRECONDITIONrY   ABORTEDout_of_rangeOUT_OF_RANGErZ   UNIMPLEMENTEDr[   INTERNALr\   UNAVAILABLE	data_loss	DATA_LOSSr]   UNAUTHENTICATEDr   r   r   r   rU   rU      s   8 



	&B##--{;I!!))95G**;;=OP,, ##--{;I((779IJN,,
 	--
 	.. !!))95G&&33^DL''55GM""++Z8H%%11=AK##--{;I))99;LMOr   rU   c                       \ rS rSrSrSrg)Statusi)  a  Describes the status of an RPC.

This is an EXPERIMENTAL API.

Attributes:
  code: A StatusCode object to be sent to the client.
  details: A UTF-8-encodable string to be sent to the client upon
    termination of the RPC.
  trailing_metadata: The trailing :term:`metadata` in the RPC.
r   Nr   r   r   r   ry   ry   )  s    	r   ry   c                       \ rS rSrSrSrg)RpcErrori9  zERaised by the gRPC library to indicate non-OK-status RPC termination.r   Nr   r   r   r   r{   r{   9  s    Or   r{   c                       \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
Srg)	
RpcContexti@  z,Provides RPC-related information and action.c                     [        5       e)zsDescribes whether the RPC is active or has terminated.

Returns:
  bool:
  True if RPC is active, False otherwise.
r   r    s    r   	is_activeRpcContext.is_activeC       "##r   c                     [        5       e)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.
r   r    s    r   time_remainingRpcContext.time_remainingM       "##r   c                     [        5       e)zRCancels the RPC.

Idempotent and has no effect if the RPC has already terminated.
r   r    s    r   r"   RpcContext.cancelX       "##r   c                     [        5       e)aE  Registers a callback to be called on RPC termination.

Args:
  callback: A no-parameter callable to be called on RPC termination.

Returns:
  True if the callback was added and will be called later; False if
    the callback was not added and will not be called (because the RPC
    already terminated or some other reason).
r   r!   callbacks     r   add_callbackRpcContext.add_callback`  r,   r   r   N)r   r   r   r   r   rC   rD   r   r   r"   r   r   r   r   r   r}   r}   @  sk    6$ $ 	$ $ 	$ $ 	$ $r   r}   c                       \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
Srg)	Callir  z*Invocation-side utility object for an RPC.c                     [        5       e)zAccesses the initial metadata sent by the server.

This method blocks until the value is available.

Returns:
  The initial :term:`metadata`.
r   r    s    r   initial_metadataCall.initial_metadatau  r   r   c                     [        5       e)zAccesses the trailing metadata sent by the server.

This method blocks until the value is available.

Returns:
  The trailing :term:`metadata`.
r   r    s    r   trailing_metadataCall.trailing_metadata  r   r   c                     [        5       e)zAccesses the status code sent by the server.

This method blocks until the value is available.

Returns:
  The StatusCode value for the RPC.
r   r    s    r   code	Call.code  r   r   c                     [        5       e)zAccesses the details sent by the server.

This method blocks until the value is available.

Returns:
  The details string of the RPC.
r   r    s    r   detailsCall.details  r   r   r   N)r   r   r   r   r   rC   rD   r   r   r   r   r   r   r   r   r   r   r  sk    4$ $ 	$ $ 	$ $ 	$ $r   r   )	metaclassc                       \ rS rSrSrSrg)ClientCallDetailsi  a  Describes an RPC to be invoked.

Attributes:
  method: The method name of 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.
  wait_for_ready: An optional flag to enable :term:`wait_for_ready` mechanism.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.
r   Nr   r   r   r   r   r     s    r   r   c                   <    \ rS rSrSr\R                  S 5       rSrg)UnaryUnaryClientInterceptori  z-Affords intercepting unary-unary invocations.c                     [        5       e)a  Intercepts a unary-unary invocation asynchronously.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_future = continuation(client_call_details, request)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and a Future. In the event of RPC
    completion, the return Call-Future's result value will be
    the response message of the RPC. Should the event terminate
    with non-OK status, the returned Call-Future's exception value
    will be an RpcError.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request: The request value for the RPC.

Returns:
    An object that is both a Call for the RPC and a Future.
    In the event of RPC completion, the return Call-Future's
    result value will be the response message of the RPC.
    Should the event terminate with non-OK status, the returned
    Call-Future's exception value will be an RpcError.
r   r!   continuationclient_call_detailsrequests       r   intercept_unary_unary1UnaryUnaryClientInterceptor.intercept_unary_unary  s    8 "##r   r   N)	r   r   r   r   r   rC   rD   r   r   r   r   r   r   r     s    7$ $r   r   c                   <    \ rS rSrSr\R                  S 5       rSrg)UnaryStreamClientInterceptori  z.Affords intercepting unary-stream invocations.c                     [        5       e)a[  Intercepts a unary-stream invocation.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_iterator = continuation(client_call_details, request)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and an iterator for response values.
    Drawing response values from the returned Call-iterator may
    raise RpcError indicating termination of the RPC with non-OK
    status.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request: The request value for the RPC.

Returns:
    An object that is both a Call for the RPC and an iterator of
    response values. Drawing response values from the returned
    Call-iterator may raise RpcError indicating termination of
    the RPC with non-OK status. This object *should* also fulfill the
    Future interface, though it may not.
r   r   s       r   intercept_unary_stream3UnaryStreamClientInterceptor.intercept_unary_stream      : "##r   r   N)	r   r   r   r   r   rC   rD   r   r   r   r   r   r   r         8$ $r   r   c                   <    \ rS rSrSr\R                  S 5       rSrg)StreamUnaryClientInterceptori  z.Affords intercepting stream-unary invocations.c                     [        5       e)a  Intercepts a stream-unary invocation asynchronously.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_future = continuation(client_call_details, request_iterator)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and a Future. In the event of RPC completion,
    the return Call-Future's result value will be the response message
    of the RPC. Should the event terminate with non-OK status, the
    returned Call-Future's exception value will be an RpcError.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request_iterator: An iterator that yields request values for the RPC.

Returns:
  An object that is both a Call for the RPC and a Future.
  In the event of RPC completion, the return Call-Future's
  result value will be the response message of the RPC.
  Should the event terminate with non-OK status, the returned
  Call-Future's exception value will be an RpcError.
r   r!   r   r   request_iterators       r   intercept_stream_unary3StreamUnaryClientInterceptor.intercept_stream_unary  r   r   r   N)	r   r   r   r   r   rC   rD   r   r   r   r   r   r   r     r   r   r   c                   <    \ rS rSrSr\R                  S 5       rSrg)StreamStreamClientInterceptori  z/Affords intercepting stream-stream invocations.c                     [        5       e)ay  Intercepts a stream-stream invocation.

Args:
  continuation: A function that proceeds with the invocation by
    executing the next interceptor in chain or invoking the
    actual RPC on the underlying Channel. It is the interceptor's
    responsibility to call it if it decides to move the RPC forward.
    The interceptor can use
    `response_iterator = continuation(client_call_details, request_iterator)`
    to continue with the RPC. `continuation` returns an object that is
    both a Call for the RPC and an iterator for response values.
    Drawing response values from the returned Call-iterator may
    raise RpcError indicating termination of the RPC with non-OK
    status.
  client_call_details: A ClientCallDetails object describing the
    outgoing RPC.
  request_iterator: An iterator that yields request values for the RPC.

Returns:
  An object that is both a Call for the RPC and an iterator of
  response values. Drawing response values from the returned
  Call-iterator may raise RpcError indicating termination of
  the RPC with non-OK status. This object *should* also fulfill the
  Future interface, though it may not.
r   r   s       r   intercept_stream_stream5StreamStreamClientInterceptor.intercept_stream_stream  r   r   r   N)	r   r   r   r   r   rC   rD   r   r   r   r   r   r   r     s    9$ $r   r   c                       \ rS rSrSrS rSrg)ChannelCredentialsiB  aP  An encapsulation of the data required to create a secure Channel.

This class has no supported interface - it exists to define the type of its
instances and its instances exist to be passed to other functions. For
example, ssl_channel_credentials returns an instance of this class and
secure_channel requires an instance of this class.
c                     Xl         g rB   _credentialsr!   credentialss     r   __init__ChannelCredentials.__init__K      'r   r   Nr   r   r   r   r   r   r   r   r   r   r   r   B  s    (r   r   c                       \ rS rSrSrS rSrg)CallCredentialsiO  a  An encapsulation of the data required to assert an identity over a call.

A CallCredentials has to be used with secure Channel, otherwise the
metadata will not be transmitted to the server.

A CallCredentials may be composed with ChannelCredentials to always assert
identity for every call over that Channel.

This class has no supported interface - it exists to define the type of its
instances and its instances exist to be passed to other functions.
c                     Xl         g rB   r   r   s     r   r   CallCredentials.__init__\  r   r   r   Nr   r   r   r   r   r   O  s    
(r   r   c                       \ rS rSrSrSrg)AuthMetadataContexti`  zProvides information to call credentials metadata plugins.

Attributes:
  service_url: A string URL of the service being called into.
  method_name: A string of the fully qualified method name being called.
r   Nr   r   r   r   r   r   `      r   r   c                       \ rS rSrSrS rSrg)AuthMetadataPluginCallbackii  z.Callback object received by a metadata plugin.c                     [        5       e)zPasses to the gRPC runtime authentication metadata for an RPC.

Args:
  metadata: The :term:`metadata` used to construct the CallCredentials.
  error: An Exception to indicate error or None to indicate success.
r   )r!   metadataerrors      r   __call__#AuthMetadataPluginCallback.__call__l       "##r   r   Nr   r   r   r   r   r   r   r   r   r   r   r   i  s
    8$r   r   c                       \ rS rSrSrS rSrg)AuthMetadataPluginiv  z*A specification for custom authentication.c                     [        5       e)ab  Implements authentication by passing metadata to a callback.

This method will be invoked asynchronously in a separate thread.

Args:
  context: An AuthMetadataContext providing information on the RPC that
    the plugin is being called to authenticate.
  callback: An AuthMetadataPluginCallback to be invoked either
    synchronously or asynchronously.
r   )r!   contextr   s      r   r   AuthMetadataPlugin.__call__y       "##r   r   Nr   r   r   r   r   r   v  s
    4$r   r   c                       \ rS rSrSrS rSrg)ServerCredentialsi  zAn encapsulation of the data required to open a secure port on a Server.

This class has no supported interface - it exists to define the type of its
instances and its instances exist to be passed to other functions.
c                     Xl         g rB   r   r   s     r   r   ServerCredentials.__init__  r   r   r   Nr   r   r   r   r   r     s    (r   r   c                       \ rS rSrSrS rSrg)ServerCertificateConfigurationi  a.  A certificate configuration for use with an SSL-enabled Server.

Instances of this class can be returned in the certificate configuration
fetching callback.

This class has no supported interface -- it exists to define the
type of its instances and its instances exist to be passed to
other functions.
c                     Xl         g rB   _certificate_configuration)r!   certificate_configurations     r   r   'ServerCertificateConfiguration.__init__  s    *C'r   r   Nr   r   r   r   r   r     s    Dr   r   c                       \ rS rSrSr\R                       SS j5       r\R                       SS j5       r\R                       SS j5       r	Sr
g)	UnaryUnaryMultiCallablei  z4Affords invoking a unary-unary RPC from client-side.Nc                     [        5       e)a  Synchronously 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:
  The response value for the RPC.

Raises:
  RpcError: Indicating 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.
r   r!   r   r3   r   r   wait_for_readycompressions          r   r    UnaryUnaryMultiCallable.__call__      @ "##r   c                     [        5       e)a  Synchronously invokes the underlying RPC.

Args:
  request: The request value for the RPC.
  timeout: An optional durating 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:
  The response value for the RPC and a Call value for the RPC.

Raises:
  RpcError: Indicating 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.
r   r   s          r   	with_call!UnaryUnaryMultiCallable.with_call  r   r   c                     [        5       e)a2  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:
    An object that is both a Call for the RPC and a Future.
    In the event of RPC completion, the return Call-Future's result
    value will be the response message of the RPC.
    Should the event terminate with non-OK status,
    the returned Call-Future's exception value will be an RpcError.
r   r   s          r   futureUnaryUnaryMultiCallable.future      > "##r   r   NNNNNr   r   r   r   r   rC   rD   r   r   r   r   r   r   r   r   r     s    > $ $B 	 $ $B 	 $ $r   r   c                   J    \ rS rSrSr\R                       SS j5       rSrg)UnaryStreamMultiCallablei  z5Affords invoking a unary-stream RPC from client-side.Nc                     [        5       e)a  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. If None, the timeout is considered infinite.
  metadata: An 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:
    An object that is a Call for the RPC, an iterator of response
    values, and a Future for the RPC. Drawing response values from the
    returned Call-iterator may raise RpcError indicating termination of
    the RPC with non-OK status.
r   r   s          r   r   !UnaryStreamMultiCallable.__call__      < "##r   r   r   	r   r   r   r   r   rC   rD   r   r   r   r   r   r   r     s.    ? $ $r   r   c                       \ rS rSrSr\R                       SS j5       r\R                       SS j5       r\R                       SS j5       r	Sr
g)	StreamUnaryMultiCallablei1  z5Affords invoking a stream-unary RPC from client-side.Nc                     [        5       e)a6  Synchronously invokes the underlying RPC.

Args:
  request_iterator: An iterator that yields request values for
    the RPC.
  timeout: An optional duration of time in seconds to allow for
    the RPC. If None, the timeout is considered infinite.
  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:
  The response value for the RPC.

Raises:
  RpcError: Indicating that the RPC terminated with non-OK status. The
    raised RpcError will also implement grpc.Call, affording methods
    such as metadata, code, and details.
r   r!   r   r3   r   r   r   r   s          r   r   !StreamUnaryMultiCallable.__call__4      B "##r   c                     [        5       e)ad  Synchronously invokes the underlying RPC on the client.

Args:
  request_iterator: An iterator that yields request values for
    the RPC.
  timeout: An optional duration of time in seconds to allow for
    the RPC. If None, the timeout is considered infinite.
  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:
  The response value for the RPC and a Call object for the RPC.

Raises:
  RpcError: Indicating 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.
r   r  s          r   r   "StreamUnaryMultiCallable.with_callW  r  r   c                     [        5       e)a  Asynchronously invokes the underlying RPC on the client.

Args:
  request_iterator: An iterator that yields request values for the RPC.
  timeout: An optional duration of time in seconds to allow for
    the RPC. If None, the timeout is considered infinite.
  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:
    An object that is both a Call for the RPC and a Future.
    In the event of RPC completion, the return Call-Future's result value
    will be the response message of the RPC. Should the event terminate
    with non-OK status, the returned Call-Future's exception value will
    be an RpcError.
r   r  s          r   r   StreamUnaryMultiCallable.futurez  r   r   r   r   r   r   r   r   r   r   1  s    ?  $  $D 	  $  $D 	 $ $r   r   c                   J    \ rS rSrSr\R                       SS j5       rSrg)StreamStreamMultiCallablei  z4Affords invoking a stream-stream RPC on client-side.Nc                     [        5       e)aL  Invokes the underlying RPC on the client.

Args:
  request_iterator: An iterator that yields request values for the RPC.
  timeout: An optional duration of time in seconds to allow for
    the RPC. If not specified, the timeout is considered infinite.
  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:
    An object that is a Call for the RPC, an iterator of response
    values, and a Future for the RPC. Drawing response values from the
    returned Call-iterator may raise RpcError indicating termination of
    the RPC with non-OK status.
r   r  s          r   r   "StreamStreamMultiCallable.__call__  r   r   r   r   r   r   r   r   r	  r	    s.    > $ $r   r	  c                   L   \ rS rSrSr\R                  SS j5       r\R                  S 5       r\R                     SS j5       r	\R                     SS j5       r
\R                     SS j5       r\R                     SS	 j5       r\R                  S
 5       rS rS rSrg)Channeli  zAffords RPC invocation via generic methods on client-side.

Channel objects implement the Context Manager type, although they need not
support being entered and exited multiple times.
c                     [        5       e)a  Subscribe to this Channel's connectivity state machine.

A Channel may be in any of the states described by ChannelConnectivity.
This method allows application to monitor the state transitions.
The typical use case is to debug or gain better visibility into gRPC
runtime's state.

Args:
  callback: A callable to be invoked with ChannelConnectivity argument.
    ChannelConnectivity describes current state of the channel.
    The callable will be invoked immediately upon subscription
    and again for every change to ChannelConnectivity until it
    is unsubscribed or this Channel object goes out of scope.
  try_to_connect: A boolean indicating whether or not this Channel
    should attempt to connect immediately. If set to False, gRPC
    runtime decides when to connect.
r   )r!   r   try_to_connects      r   	subscribeChannel.subscribe  s    & "##r   c                     [        5       e)zUnsubscribes a subscribed callback from this Channel's connectivity.

Args:
  callback: A callable previously registered with this Channel from
  having been passed to its "subscribe" method.
r   r   s     r   unsubscribeChannel.unsubscribe  r   r   Nc                     [        5       e)aH  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. A bool representing whether the method
    is registered.

Returns:
  A UnaryUnaryMultiCallable value for the named unary-unary method.
r   r!   methodrequest_serializerresponse_deserializer_registered_methods        r   unary_unaryChannel.unary_unary      . "##r   c                     [        5       e)aK  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. A bool representing whether the method
    is registered.

Returns:
  A UnaryStreamMultiCallable value for the name unary-stream method.
r   r  s        r   unary_streamChannel.unary_stream  r  r   c                     [        5       e)aL  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. A bool representing whether the method
    is registered.

Returns:
  A StreamUnaryMultiCallable value for the named stream-unary method.
r   r  s        r   stream_unaryChannel.stream_unary  r  r   c                     [        5       e)aP  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. A bool representing whether the method
    is registered.

Returns:
  A StreamStreamMultiCallable value for the named stream-stream method.
r   r  s        r   stream_streamChannel.stream_stream4  r  r   c                     [        5       e)zCloses this Channel and releases all resources held by it.

Closing the Channel will immediately terminate all RPCs active with the
Channel and it is not valid to invoke new RPCs with the Channel.

This method is idempotent.
r   r    s    r   closeChannel.closeM  r   r   c                     [        5       e)z9Enters the runtime context related to the channel object.r   r    s    r   	__enter__Channel.__enter__X      !##r   c                     [        5       e)z8Exits the runtime context related to the channel object.r   )r!   exc_typeexc_valexc_tbs       r   __exit__Channel.__exit__\  r-  r   r   F)NNF)r   r   r   r   r   rC   rD   r  r  r  r  r"  r%  r(  r+  r2  r   r   r   r   r  r    s     	$ $( 	$ $ 	  " $ $0 	  " $ $0 	  " $ $0 	  " $ $0 	$ $$$r   r  c                      \ rS rSrSr\R                  S 5       r\R                  S 5       r\R                  S 5       r	\R                  S 5       r
\R                  S 5       rS r\R                  S	 5       r\R                  S
 5       rS r\R                  S 5       r\R                  S 5       r\R                  S 5       r\R                  S 5       rS rS rS rSrg)ServicerContextid  z2A context object passed to method implementations.c                     [        5       e)zWAccesses the metadata sent by the client.

Returns:
  The invocation :term:`metadata`.
r   r    s    r   invocation_metadata#ServicerContext.invocation_metadatag  r   r   c                     [        5       e)zIdentifies the peer that invoked the RPC being serviced.

Returns:
  A string identifying the peer that invoked the RPC being serviced.
  The string format is determined by gRPC runtime.
r   r    s    r   peerServicerContext.peerp  r   r   c                     [        5       e)a  Gets one or more peer identity(s).

Equivalent to
servicer_context.auth_context().get(servicer_context.peer_identity_key())

Returns:
  An iterable of the identities, or None if the call is not
  authenticated. Each identity is returned as a raw bytes type.
r   r    s    r   peer_identitiesServicerContext.peer_identitiesz  r   r   c                     [        5       e)a  The auth property used to identify the peer.

For example, "x509_common_name" or "x509_subject_alternative_name" are
used to identify an SSL peer.

Returns:
  The auth property (string) that indicates the
  peer identity, or None if the call is not authenticated.
r   r    s    r   peer_identity_key!ServicerContext.peer_identity_key  r   r   c                     [        5       e)zqGets the auth context for the call.

Returns:
  A map of strings to an iterable of bytes for each auth property.
r   r    s    r   auth_contextServicerContext.auth_context  r   r   c                     [        5       e)zSet the compression algorithm to be used for the entire call.

Args:
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip.
r   )r!   r   s     r   set_compressionServicerContext.set_compression  r   r   c                     [        5       e)zSends the initial metadata value to the client.

This method need not be called by implementations if they have no
metadata to add to what the gRPC runtime will transmit.

Args:
  initial_metadata: The initial :term:`metadata`.
r   )r!   r   s     r   send_initial_metadata%ServicerContext.send_initial_metadata       "##r   c                     [        5       e)a  Sets the trailing metadata for the RPC.

Sets the trailing metadata to be sent upon completion of the RPC.

If this method is invoked multiple times throughout the lifetime of an
RPC, the value supplied in the final invocation will be the value sent
over the wire.

This method need not be called by implementations if they have no
metadata to add to what the gRPC runtime will transmit.

Args:
  trailing_metadata: The trailing :term:`metadata`.
r   )r!   r   s     r   set_trailing_metadata%ServicerContext.set_trailing_metadata  r(   r   c                     [        5       e)zAccess value to be used as trailing metadata upon RPC completion.

This is an EXPERIMENTAL API.

Returns:
  The trailing :term:`metadata` for the RPC.
r   r    s    r   r   !ServicerContext.trailing_metadata  r   r   c                     [        5       e)a  Raises an exception to terminate the RPC with a non-OK status.

The code and details passed as arguments will supersede any existing
ones.

Args:
  code: A StatusCode object to be sent to the client.
    It must not be StatusCode.OK.
  details: A UTF-8-encodable string to be sent to the client upon
    termination of the RPC.

Raises:
  Exception: An exception is always raised to signal the abortion the
    RPC to the gRPC runtime.
r   )r!   r   r   s      r   abortServicerContext.abort  r$   r   c                     [        5       e)a  Raises an exception to terminate the RPC with a non-OK status.

The status passed as argument will supersede any existing status code,
status message and trailing metadata.

This is an EXPERIMENTAL API.

Args:
  status: A grpc.Status object. The status code in it must not be
    StatusCode.OK.

Raises:
  Exception: An exception is always raised to signal the abortion the
    RPC to the gRPC runtime.
r   )r!   statuss     r   abort_with_status!ServicerContext.abort_with_status  r$   r   c                     [        5       e)zSets the value to be used as status code upon RPC completion.

This method need not be called by method implementations if they wish
the gRPC runtime to determine the status code of the RPC.

Args:
  code: A StatusCode object to be sent to the client.
r   )r!   r   s     r   set_codeServicerContext.set_code  rL  r   c                     [        5       e)a  Sets the value to be used as detail string upon RPC completion.

This method need not be called by method implementations if they have
no details to transmit.

Args:
  details: A UTF-8-encodable string to be sent to the client upon
    termination of the RPC.
r   )r!   r   s     r   set_detailsServicerContext.set_details   r   r   c                     [        5       e)zAccesses the value to be used as status code upon RPC completion.

This is an EXPERIMENTAL API.

Returns:
  The StatusCode value for the RPC.
r   r    s    r   r   ServicerContext.code  r   r   c                     [        5       e)zAccesses the value to be used as detail string upon RPC completion.

This is an EXPERIMENTAL API.

Returns:
  The details string of the RPC.
r   r    s    r   r   ServicerContext.details  r   r   c                     [        5       e)zDisables compression for the next response message.

This method will override any compression configuration set during
server creation or set on the call.
r   r    s    r    disable_next_message_compression0ServicerContext.disable_next_message_compression!  r   r   r   N)r   r   r   r   r   rC   rD   r8  r;  r>  rA  rD  rG  rJ  rN  r   rS  rW  rZ  r]  r   r   rd  r   r   r   r   r6  r6  d  s:   <$ $ 	$ $ 	
$ 
$ 	
$ 
$ 	$ $$ 		$ 	$ 	$ $"$ 	$ $$ 	$ $$ 		$ 	$ 	
$ 
$$$$r   r6  c                       \ rS rSrSrSrg)RpcMethodHandleri-  a  An implementation of a single RPC method.

Attributes:
  request_streaming: Whether the RPC supports exactly one request message
    or any arbitrary number of request messages.
  response_streaming: Whether the RPC supports exactly one response message
    or any arbitrary number of response messages.
  request_deserializer: A callable :term:`deserializer` that accepts a byte string and
    returns an object suitable to be passed to this object's business
    logic, or None to indicate that this object's business logic should be
    passed the raw request bytes.
  response_serializer: A callable :term:`serializer` that accepts an object produced
    by this object's business logic and returns a byte string, or None to
    indicate that the byte strings produced by this object's business logic
    should be transmitted on the wire as they are.
  unary_unary: This object's application-specific business logic as a
    callable value that takes a request value and a ServicerContext object
    and returns a response value. Only non-None if both request_streaming
    and response_streaming are False.
  unary_stream: This object's application-specific business logic as a
    callable value that takes a request value and a ServicerContext object
    and returns an iterator of response values. Only non-None if
    request_streaming is False and response_streaming is True.
  stream_unary: This object's application-specific business logic as a
    callable value that takes an iterator of request values and a
    ServicerContext object and returns a response value. Only non-None if
    request_streaming is True and response_streaming is False.
  stream_stream: This object's application-specific business logic as a
    callable value that takes an iterator of request values and a
    ServicerContext object and returns an iterator of response values.
    Only non-None if request_streaming and response_streaming are both
    True.
r   Nr   r   r   r   rg  rg  -  s     r   rg  c                       \ rS rSrSrSrg)HandlerCallDetailsiQ  zDescribes an RPC that has just arrived for service.

Attributes:
  method: The method name of the RPC.
  invocation_metadata: The :term:`metadata` sent by the client.
r   Nr   r   r   r   ri  ri  Q  r   r   ri  c                   <    \ rS rSrSr\R                  S 5       rSrg)GenericRpcHandleriZ  z2An implementation of arbitrarily many RPC methods.c                     [        5       e)zReturns the handler for servicing the RPC.

Args:
  handler_call_details: A HandlerCallDetails describing the RPC.

Returns:
  An RpcMethodHandler with which the RPC may be serviced if the
  implementation chooses to service this RPC, or None otherwise.
r   )r!   handler_call_detailss     r   serviceGenericRpcHandler.service]  r   r   r   N)	r   r   r   r   r   rC   rD   rn  r   r   r   r   rk  rk  Z  s    <
$ 
$r   rk  c                   <    \ rS rSrSr\R                  S 5       rSrg)ServiceRpcHandlerik  aL  An implementation of RPC methods belonging to a service.

A service handles RPC methods with structured names of the form
'/Service.Name/Service.Method', where 'Service.Name' is the value
returned by service_name(), and 'Service.Method' is the method
name.  A service can have multiple method names, but only a single
service name.
c                     [        5       e)z;Returns this service's name.

Returns:
  The service name.
r   r    s    r   service_nameServiceRpcHandler.service_nameu  r   r   r   N)	r   r   r   r   r   rC   rD   rs  r   r   r   r   rq  rq  k  s!     	$ $r   rq  c                   <    \ rS rSrSr\R                  S 5       rSrg)ServerInterceptori  z7Affords intercepting incoming RPCs on the service-side.c                     [        5       e)a  Intercepts incoming RPCs before handing them over to a handler.

State can be passed from an interceptor to downstream interceptors
via contextvars. The first interceptor is called from an empty
contextvars.Context, and the same Context is used for downstream
interceptors and for the final handler call. Note that there are no
guarantees that interceptors and handlers will be called from the
same thread.

Args:
  continuation: A function that takes a HandlerCallDetails and
    proceeds to invoke the next interceptor in the chain, if any,
    or the RPC handler lookup logic, with the call details passed
    as an argument, and returns an RpcMethodHandler instance if
    the RPC is considered serviced, or None otherwise.
  handler_call_details: A HandlerCallDetails describing the RPC.

Returns:
  An RpcMethodHandler with which the RPC may be serviced if the
  interceptor chooses to service this RPC, or None otherwise.
r   )r!   r   rm  s      r   intercept_service#ServerInterceptor.intercept_service  r  r   r   N)	r   r   r   r   r   rC   rD   rx  r   r   r   r   rv  rv    s    A$ $r   rv  c                       \ rS rSrSr\R                  S 5       rS r\R                  S 5       r	\R                  S 5       r
\R                  S 5       r\R                  S 5       rSS
 jrSrg	)Serveri  zServices RPCs.c                     [        5       e)zRegisters GenericRpcHandlers with this Server.

This method is only safe to call before the server is started.

Args:
  generic_rpc_handlers: An iterable of GenericRpcHandlers that will be
  used to service RPCs.
r   )r!   generic_rpc_handlerss     r   add_generic_rpc_handlersServer.add_generic_rpc_handlers  rL  r   c                     g)a]  Registers GenericRpcHandlers with this Server.

This method is only safe to call before the server is started.

If the same method have both generic and registered handler,
registered handler will take precedence.

Args:
  service_name: The service name.
  method_handlers: A dictionary that maps method names to corresponding
    RpcMethodHandler.
Nr   )r!   rs  method_handlerss      r   add_registered_method_handlers%Server.add_registered_method_handlers  s    r   c                     [        5       e)aB  Opens an insecure port for accepting RPCs.

This method may only be called before starting the server.

Args:
  address: The address for which to open a port. If the port is 0,
    or not specified in the address, then gRPC runtime will choose a port.

Returns:
  An integer port on which server will accept RPC requests.
r   )r!   addresss     r   add_insecure_portServer.add_insecure_port  r0   r   c                     [        5       e)au  Opens a secure port for accepting RPCs.

This method may only be called before starting the server.

Args:
  address: The address for which to open a port.
    if the port is 0, or not specified in the address, then gRPC
    runtime will choose a port.
  server_credentials: A ServerCredentials object.

Returns:
  An integer port on which server will accept RPC requests.
r   )r!   r  server_credentialss      r   add_secure_portServer.add_secure_port  s     "##r   c                     [        5       e)zWStarts this Server.

This method may only be called once. (i.e. it is not idempotent).
r   r    s    r   startServer.start  r   r   c                     [        5       e)a.  Stops this Server.

This method immediately stop service of 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 aborted immediately and this method
blocks until the last RPC handler terminates.

This method is idempotent and may be called at any time.
Passing a smaller grace value in a subsequent call will have
the effect of stopping the Server sooner (passing None will
have the effect of stopping the server immediately). Passing
a larger grace value in a subsequent call *will not* have the
effect of stopping the server later (i.e. the most restrictive
grace value is used).

Args:
  grace: A duration of time in seconds or None.

Returns:
  A threading.Event that will be set when this Server has completely
  stopped, i.e. when running RPCs either complete or are aborted and
  all handlers have terminated.
r   )r!   graces     r   stopServer.stop  r   r   Nc                     [        5       e)aT  Block current thread until the server stops.

This is an EXPERIMENTAL API.

The wait will not consume computational resources during blocking, and
it will block until one of the two following conditions are met:

1) The server is stopped or terminated;
2) A timeout occurs if timeout is not `None`.

The timeout argument works in the same way as `threading.Event.wait()`.
https://docs.python.org/3/library/threading.html#threading.Event.wait

Args:
  timeout: A floating point number specifying a timeout for the
    operation in seconds.

Returns:
  A bool indicates if the operation times out.
r   r2   s     r   wait_for_terminationServer.wait_for_termination  r6   r   r   rB   )r   r   r   r   r   rC   rD   r~  r  r  r  r  r  r  r   r   r   r   r{  r{    s    	$ 	$ 	$ $ 	$ $  	$ $ 	$ $<$r   r{  c           
      >    SSK Jn  UR                  SSUUU SSS5      $ )a  Creates an RpcMethodHandler for a unary-unary RPC method.

Args:
  behavior: The implementation of an RPC that accepts one request
    and returns one response.
  request_deserializer: An optional :term:`deserializer` for request deserialization.
  response_serializer: An optional :term:`serializer` for response serialization.

Returns:
  An RpcMethodHandler object that is typically used by grpc.Server.
r   
_utilitiesFNgrpcr  rg  behaviorrequest_deserializerresponse_serializerr  s       r   unary_unary_rpc_method_handlerr  !  s2      &&	 	r   c           
      >    SSK Jn  UR                  SSUUSU SS5      $ )a  Creates an RpcMethodHandler for a unary-stream RPC method.

Args:
  behavior: The implementation of an RPC that accepts one request
    and returns an iterator of response values.
  request_deserializer: An optional :term:`deserializer` for request deserialization.
  response_serializer: An optional :term:`serializer` for response serialization.

Returns:
  An RpcMethodHandler object that is typically used by grpc.Server.
r   r  FTNr  r  s       r   unary_stream_rpc_method_handlerr  =  s2      &&	 	r   c           
      >    SSK Jn  UR                  SSUUSSU S5      $ )a  Creates an RpcMethodHandler for a stream-unary RPC method.

Args:
  behavior: The implementation of an RPC that accepts an iterator of
    request values and returns a single response value.
  request_deserializer: An optional :term:`deserializer` for request deserialization.
  response_serializer: An optional :term:`serializer` for response serialization.

Returns:
  An RpcMethodHandler object that is typically used by grpc.Server.
r   r  TFNr  r  s       r   stream_unary_rpc_method_handlerr  Y  s2      &&	 	r   c           
      >    SSK Jn  UR                  SSUUSSSU 5      $ )a  Creates an RpcMethodHandler for a stream-stream RPC method.

Args:
  behavior: The implementation of an RPC that accepts an iterator of
    request values and returns an iterator of response values.
  request_deserializer: An optional :term:`deserializer` for request deserialization.
  response_serializer: An optional :term:`serializer` for response serialization.

Returns:
  An RpcMethodHandler object that is typically used by grpc.Server.
r   r  TNr  r  s       r    stream_stream_rpc_method_handlerr  u  s2      &&	 	r   c                 0    SSK Jn  UR                  X5      $ )a}  Creates a GenericRpcHandler from RpcMethodHandlers.

Args:
  service: The name of the service that is implemented by the
    method_handlers.
  method_handlers: A dictionary that maps method names to corresponding
    RpcMethodHandler.

Returns:
  A GenericRpcHandler. This is typically added to the grpc.Server object
  with add_generic_rpc_handlers() before starting the server.
r   r  )r  r  DictionaryGenericHandler)rn  r  r  s      r   method_handlers_generic_handlerr    s      ..wHHr   c                 B    [        [        R                  " XU5      5      $ )a  Creates a ChannelCredentials for use with an SSL-enabled Channel.

Args:
  root_certificates: The PEM-encoded root certificates as a byte string,
    or None to retrieve them from a default location chosen by gRPC
    runtime.
  private_key: The PEM-encoded private key as a byte string, or None if no
    private key should be used.
  certificate_chain: The PEM-encoded certificate chain as a byte string
    to use or None if no certificate chain should be used.

Returns:
  A ChannelCredentials for use with an SSL-enabled Channel.
)r   rL   SSLChannelCredentials)root_certificatesprivate_keycertificate_chains      r   ssl_channel_credentialsr    s%    " %%,=	
 r   c                 r    U c
  [        5       OU n [        [        R                  " U R                  5      5      $ )a'  Creates a ChannelCredentials for use with xDS. This is an EXPERIMENTAL
  API.

Args:
  fallback_credentials: Credentials to use in case it is not possible to
    establish a secure connection via xDS. If no fallback_credentials
    argument is supplied, a default SSLChannelCredentials is used.
)r  r   rL   XDSChannelCredentialsr   fallback_credentialss    r   xds_channel_credentialsr    s>      ' 	 !! 
 %%&:&G&GH r   c                 0    SSK Jn  UR                  X5      $ )zConstruct CallCredentials from an AuthMetadataPlugin.

Args:
  metadata_plugin: An AuthMetadataPlugin to use for authentication.
  name: An optional name for the plugin.

Returns:
  A CallCredentials.
r   _plugin_wrapping)r  r   metadata_plugin_call_credentials)metadata_pluginnamer  s      r   metadata_call_credentialsr    s     &<< r   c                 \    SSK Jn  SSK Jn  UR                  UR	                  U 5      S5      $ )zConstruct CallCredentials from an access token.

Args:
  access_token: A string to place directly in the http request
    authorization header, for example
    "authorization: Bearer <access_token>".

Returns:
  A CallCredentials.
r   )_authr  N)r  r  r  r  AccessTokenAuthMetadataPlugin)access_tokenr  r  s      r   access_token_call_credentialsr    s-     %<<++L94 r   c                  `    [        [        R                  " [        S U  5       5      5      5      $ )zCompose multiple CallCredentials to make a new CallCredentials.

Args:
  *call_credentials: At least two CallCredentials objects.

Returns:
  A CallCredentials object composed of the given CallCredentials objects.
c              3   :   #    U  H  nUR                   v   M     g 7frB   r   .0single_call_credentialss     r   	<genexpr>-composite_call_credentials.<locals>.<genexpr>        /?+ (44/?   )r   rL   CompositeCallCredentialstuplecall_credentialss    r   composite_call_credentialsr    s4     (( /? 	
 r   c                 v    [        [        R                  " [        S U 5       5      U R                  5      5      $ )a&  Compose a ChannelCredentials and one or more CallCredentials objects.

Args:
  channel_credentials: A ChannelCredentials object.
  *call_credentials: One or more CallCredentials objects.

Returns:
  A ChannelCredentials composed of the given ChannelCredentials and
    CallCredentials objects.
c              3   :   #    U  H  nUR                   v   M     g 7frB   r   r  s     r   r  0composite_channel_credentials.<locals>.<genexpr>  r  r  )r   rL   CompositeChannelCredentialsr  r   )channel_credentialsr  s     r   composite_channel_credentialsr    s?     ++ /?   ,,	
 r   c                     U (       d  [        S5      eU(       a  Uc  [        S5      e[        [        R                  " UU  VVs/ s H  u  p4[        R                  " X45      PM     snnU5      5      $ s  snnf )a  Creates a ServerCredentials for use with an SSL-enabled Server.

Args:
  private_key_certificate_chain_pairs: A list of pairs of the form
    [PEM-encoded private key, PEM-encoded certificate chain].
  root_certificates: An optional byte string of PEM-encoded client root
    certificates that the server will use to verify client authentication.
    If omitted, require_client_auth must also be False.
  require_client_auth: A boolean indicating whether or not to require
    clients to be authenticated. May only be True if root_certificates
    is not None.

Returns:
  A ServerCredentials for use with an SSL-enabled Server. Typically, this
  object is an argument to add_secure_port() method during server setup.
<At least one private key-certificate chain pair is required!zCIllegal to require client auth without providing root certificates!)
ValueErrorr   rL   server_credentials_sslSslPemKeyCertPair)#private_key_certificate_chain_pairsr  require_client_authkeypems        r   ssl_server_credentialsr    s    * /J
 	
 
!2!:
 	

 !**! %H$G --c7$G $	
 		
s   "A2c                 T    [        [        R                  " U R                  5      5      $ )zCreates a ServerCredentials for use with xDS. This is an EXPERIMENTAL
  API.

Args:
  fallback_credentials: Credentials to use in case it is not possible to
    establish a secure connection via xDS. No default value is provided.
)r   rL   xds_server_credentialsr   r  s    r   r  r  F  s&     &&';'H'HI r   c                  >    [        [        R                  " 5       5      $ )a  Creates a credentials object directing the server to use no credentials.
  This is an EXPERIMENTAL API.

This object cannot be used directly in a call to `add_secure_port`.
Instead, it should be used to construct other credentials objects, e.g.
with xds_server_credentials.
)r   rL   insecure_server_credentialsr   r   r   r  r  S  s     W@@BCCr   c                     U (       aI  [        [        R                  " UU  VVs/ s H  u  p#[        R                  " X#5      PM     snn5      5      $ [	        S5      es  snnf )a  Creates a ServerCertificateConfiguration for use with a Server.

Args:
  private_key_certificate_chain_pairs: A collection of pairs of
    the form [PEM-encoded private key, PEM-encoded certificate
    chain].
  root_certificates: An optional byte string of PEM-encoded client root
    certificates that the server will use to verify client authentication.

Returns:
  A ServerCertificateConfiguration that can be returned in the certificate
    configuration fetching callback.
r  )r   rL   server_certificate_config_sslr  r  )r  r  r  r  s       r   $ssl_server_certificate_configurationr  ^  sg      +-11! %H$G --c7$G
 	
 J
 	
s   "Ac                 D    [        [        R                  " U UU5      5      $ )a  Creates a ServerCredentials for use with an SSL-enabled Server.

Args:
  initial_certificate_configuration (ServerCertificateConfiguration): The
    certificate configuration with which the server will be initialized.
  certificate_configuration_fetcher (callable): A callable that takes no
    arguments and should return a ServerCertificateConfiguration to
    replace the server's current certificate, or None for no change
    (i.e., the server will continue its current certificate
    config). The library will call this callback on *every* new
    client connection before starting the TLS handshake with the
    client, thus allowing the user application to optionally
    return a new ServerCertificateConfiguration that the server will then
    use for the handshake.
  require_client_authentication: A boolean indicating whether or not to
    require clients to be authenticated.

Returns:
  A ServerCredentials.
)r   rL   *server_credentials_ssl_dynamic_cert_config)!initial_certificate_configuration!certificate_configuration_fetcherrequire_client_authentications      r   dynamic_ssl_server_credentialsr  ~  s(    2 ::--)	
 r   c                   p    \ rS rSrSr\R                  R                  r\R                  R                  r
Srg)LocalConnectionTypei  zTypes of local connection for local credential creation.

Attributes:
  UDS: Unix domain socket connections
  LOCAL_TCP: Local TCP connections.
r   N)r   r   r   r   r   rL   r  udsUDS	local_tcp	LOCAL_TCPr   r   r   r   r  r    s+     
%
%
)
)C++55Ir   r  c                 T    [        [        R                  " U R                  5      5      $ )a  Creates a local ChannelCredentials used for local connections.

This is an EXPERIMENTAL API.

Local credentials are used by local TCP endpoints (e.g. localhost:10000)
also UDS connections.

The connections created by local channel credentials are not
encrypted, but will be checked if they are local or not.
The UDS connections are considered secure by providing peer authentication
and data confidentiality while TCP connections are considered insecure.

It is allowed to transmit call credentials over connections created by
local channel credentials.

Local channel credentials are useful for 1) eliminating insecure_channel usage;
2) enable unit testing for call credentials without setting up secrets.

Args:
  local_connect_type: Local connection type (either
    grpc.LocalConnectionType.UDS or grpc.LocalConnectionType.LOCAL_TCP)

Returns:
  A ChannelCredentials for use with a local Channel
)r   rL   channel_credentials_localvaluelocal_connect_types    r   local_channel_credentialsr    s&    4 ))*<*B*BC r   c                 T    [        [        R                  " U R                  5      5      $ )a~  Creates a local ServerCredentials used for local connections.

This is an EXPERIMENTAL API.

Local credentials are used by local TCP endpoints (e.g. localhost:10000)
also UDS connections.

The connections created by local server credentials are not
encrypted, but will be checked if they are local or not.
The UDS connections are considered secure by providing peer authentication
and data confidentiality while TCP connections are considered insecure.

It is allowed to transmit call credentials over connections created by local
server credentials.

Local server credentials are useful for 1) eliminating insecure_channel usage;
2) enable unit testing for call credentials without setting up secrets.

Args:
  local_connect_type: Local connection type (either
    grpc.LocalConnectionType.UDS or grpc.LocalConnectionType.LOCAL_TCP)

Returns:
  A ServerCredentials for use with a local Server
)r   rL   server_credentials_localr  r  s    r   local_server_credentialsr    s&    4 (();)A)AB r   c                 R    [        [        R                  " U =(       d    / 5      5      $ )a  Creates a ChannelCredentials for use with an ALTS-enabled Channel.

This is an EXPERIMENTAL API.
ALTS credentials API can only be used in GCP environment as it relies on
handshaker service being available. For more info about ALTS see
https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security

Args:
  service_accounts: A list of server identities accepted by the client.
    If target service accounts are provided and none of them matches the
    peer identity of the server, handshake will fail. The arg can be empty
    if the client does not have any information about trusted server
    identity.
Returns:
  A ChannelCredentials for use with an ALTS-enabled Channel
)r   rL   channel_credentials_alts)service_accountss    r   alts_channel_credentialsr    s%    " (()9)?R@ r   c                  >    [        [        R                  " 5       5      $ )a  Creates a ServerCredentials for use with an ALTS-enabled connection.

This is an EXPERIMENTAL API.
ALTS credentials API can only be used in GCP environment as it relies on
handshaker service being available. For more info about ALTS see
https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security

Returns:
  A ServerCredentials for use with an ALTS-enabled Server
)r   rL   server_credentials_altsr   r   r   alts_server_credentialsr     s     W<<>??r   c                 T    [        [        R                  " U R                  5      5      $ )a$  Creates a compute engine channel credential.

This credential can only be used in a GCP environment as it relies on
a handshaker service. For more info about ALTS, see
https://cloud.google.com/security/encryption-in-transit/application-layer-transport-security

This channel credential is expected to be used as part of a composite
credential in conjunction with a call credentials that authenticates the
VM's default service account. If used with any other sort of call
credential, the connection may suddenly and unexpectedly begin failing RPCs.
)r   rL   "channel_credentials_compute_enginer   r  s    r   "compute_engine_channel_credentialsr    s(     22))	
 r   c                 0    SSK Jn  UR                  U 5      $ )a@  Creates a Future that tracks when a Channel is ready.

Cancelling the Future does not affect the channel's state machine.
It merely decouples the Future from channel state machine.

Args:
  channel: A Channel object.

Returns:
  A Future object that matures when the channel connectivity is
  ChannelConnectivity.READY.
r   r  )r  r  channel_ready_future)channelr  s     r   r  r  "  s      **733r   c                 J    SSK Jn  UR                  Xc  SSU5      $ USU5      $ )a|  Creates an insecure Channel to a server.

The returned Channel is thread-safe.

Args:
  target: The server address
  options: An optional list of key-value pairs (:term:`channel_arguments`
    in gRPC Core runtime) to configure the channel.
  compression: An optional value indicating the compression method to be
    used over the lifetime of the channel.

Returns:
  A Channel.
r   _channelNr   )r  r	  r  )targetoptionsr   r	  s       r   insecure_channelr  4  s6     oD+ +2D+ r   c                     SSK Jn  SSKJn  UR                  UL a  [        S5      eUR                  U Uc  SOUUR                  U5      $ )a  Creates a secure Channel to a server.

The returned Channel is thread-safe.

Args:
  target: The server address.
  credentials: A ChannelCredentials instance.
  options: An optional list of key-value pairs (:term:`channel_arguments`
    in gRPC Core runtime) to configure the channel.
  compression: An optional value indicating the compression method to be
    used over the lifetime of the channel.

Returns:
  A Channel.
r   r  )_insecure_channel_credentialszYsecure_channel cannot be called with insecure credentials. Call insecure_channel instead.r   )r  r	  grpc.experimentalr  r   r  r  )r
  r   r  r   r	  r  s         r   secure_channelr  J  sX      ?#@@0
 	
 o7  	 r   c                 4    SSK Jn  UR                  " U /UQ76 $ )ak  Intercepts a channel through a set of interceptors.

Args:
  channel: A Channel.
  interceptors: Zero or more objects of type
    UnaryUnaryClientInterceptor,
    UnaryStreamClientInterceptor,
    StreamUnaryClientInterceptor, or
    StreamStreamClientInterceptor.
    Interceptors are given control in the order they are listed.

Returns:
  A Channel that intercepts each invocation via the provided interceptors.

Raises:
  TypeError: If interceptor does not derive from any of
    UnaryUnaryClientInterceptor,
    UnaryStreamClientInterceptor,
    StreamUnaryClientInterceptor, or
    StreamStreamClientInterceptor.
r   )_interceptor)r  r  intercept_channel)r  interceptorsr  s      r   r  r  j  s    , "))'ALAAr   c           	      Z    SSK Jn  UR                  U Uc  SOUUc  SOUUc  SOUUUU5      $ )a  Creates a Server with which RPCs can be serviced.

Args:
  thread_pool: A futures.ThreadPoolExecutor to be used by the Server
    to execute RPC handlers.
  handlers: An optional list of GenericRpcHandlers used for executing RPCs.
    More handlers may be added by calling add_generic_rpc_handlers any time
    before the server is started.
  interceptors: An optional list of ServerInterceptor objects that observe
    and optionally manipulate the incoming RPCs before handing them over to
    handlers. The interceptors are given control in the order they are
    specified. This is an EXPERIMENTAL API.
  options: An optional list of key-value pairs (:term:`channel_arguments` in gRPC runtime)
    to configure the channel.
  maximum_concurrent_rpcs: The maximum number of concurrent RPCs this server
    will service before returning RESOURCE_EXHAUSTED status, or None to
    indicate no limit.
  compression: An element of grpc.compression, e.g.
    grpc.compression.Gzip. This compression algorithm will be used for the
    lifetime of the server unless overridden.
  xds: If set to true, retrieves server configuration via xDS. This is an
    EXPERIMENTAL option.

Returns:
  A Server object.
r   _serverr   )r  r  create_server)thread_poolhandlersr  r  maximum_concurrent_rpcsr   xdsr  s           r   serverr    sD    F   H"o7 r   c              #   d   #    SSK Jn  UR                  XU5      nUv   UR                  5         g 7f)Nr   r  )r  r  _Context_finalize_state)	rpc_eventstater  r  r   s        r   _create_servicer_contextr#    s,     y1EFG
Ms   .0c                   `    \ rS rSrSr\R                  r\R                  r\R                  rSr	g)Compressioni  zIndicates the compression method to be used for an RPC.

Attributes:
 NoCompression: Do not use compression algorithm.
 Deflate: Use "Deflate" compression algorithm.
 Gzip: Use "Gzip" compression algorithm.
r   N)
r   r   r   r   r   r   NoCompressionDeflateGzipr   r   r   r   r%  r%    s*     !..M""GDr   r%  )@r   r   r   rF   rU   ry   r{   r}   r   r   r   r   r   r   r%  r   r   r   r  r   r   r   r	  r   r   r   r   r  r6  rg  ri  rk  rq  r{  rv  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r  r   r   r   r  r  r  z
grpc.toolszgrpc.healthzgrpc.reflection)      r  )aiozgrpc.aio)NN)NNNrB   )NFr4  )NNNNNF)er   rC   
contextlibenumloggingsysr  r   grpc._cythonr   rL   grpc._runtime_protosr   r   r   	getLoggerr   
addHandlerNullHandlergrpc._grpcio_metadatar   ImportError	Exceptionr   r   ABCr   uniqueEnumrF   rU   ry   r{   r}   ABCMetar   r   r   r   r   r   objectr   r   r   r   r   r   r   r   r   r   r	  r  r6  rg  ri  rk  rq  rv  r{  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r   r  r  r  r  r  r  contextmanagerr#  IntEnumr%  __all__
grpc_toolsmodulesupdategrpc_healthgrpc_reflectionversion_infor+  r   r   r   <module>rF     s    
    
  * ' 4 )   (  & &w':':'< =1> >L9 L]$SWW ]$F @$)) @ @, 9N 9N 9N~
SWW 
 Py P,$ ,$d-$: -$f $#'' $D $377  $F $377  $F $CGG  $L
( 
((f ("#'' 
$ 
$$ $"( (DV D$f$cgg f$R!$sww !$Hh$sww h$V!$ !$N[$cgg [$BC$jCKK C$R!sww !H $ $"$)S[[ $.$ $@y$SWW y$@ >B: >B: >B: >B8I& AE0&"&&0 (
V
D <@
F #(D 	6$)) 	6 	6 2E1N1N > 1D0M0M >,@&4$,@B:  -`   $,,   AL	KKj12	KK{34	KK)?;<
 v(f"4KK
C() #5QH  KpG  		  		  		sH   &R &!R !R" *!R. RRRR"R+*R+.R76R7