
    (ph/              	          S 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  SSK	J
r
  SS	KJr  \R                  r\R                  r\R                  rSS
 jrS r\R$                  r\R&                  r\R(                  r " S S\5      rS rS r " S S\5      r\" SSSSSS5      r      SS jrSS jrSS jr\R<                  r\R>                  r " S S\5      r \ " SSSSSSS5      r!       SS jr"SS jr#g)z.Entry points into the Beta API of gRPC Python.    N)_auth)_client_adaptations)	_metadata)_server_adaptations)
interfaces)cardinality)facec                 8   ^  U 4S jn[         R                  " X!S9$ )Nc                 $   >^ U4S jnT" X5        g )Nc                 @   > T" [         R                  " U 5      U5        g N)r   unbeta)beta_metadataerrorcallbacks     L/var/www/html/venv/lib/python3.13/site-packages/grpc/beta/implementations.pywrapped_callbackCmetadata_call_credentials.<locals>.plugin.<locals>.wrapped_callback'   s    Y%%m4e<     )contextr   r   metadata_plugins    ` r   plugin)metadata_call_credentials.<locals>.plugin&   s    	= 	2r   )name)grpcmetadata_call_credentials)r   r   r   s   `  r   r   r   %   s    3 ))&<<r   c                 @    [        [        R                  " U 5      5      $ )zConstruct CallCredentials from GoogleCredentials.

Args:
  credentials: A GoogleCredentials object from the oauth2client library.

Returns:
  A CallCredentials object for use in a GRPCCallOptions object.
)r   r   GoogleCallCredentials)credentialss    r   google_call_credentialsr!   /   s     %U%@%@%MNNr   c                   .    \ rS rSrSrS rSS jrS rSrg)	Channel@   zA channel to a remote host through which RPCs may be conducted.

Only the "subscribe" and "unsubscribe" methods are supported for application
use. This class' instance constructor and all other attributes are
unsupported.
c                     Xl         g r   _channel)selfchannels     r   __init__Channel.__init__H   s    r   Nc                 6    U R                   R                  XS9  g)a  Subscribes to this Channel's connectivity.

Args:
  callback: A callable to be invoked and passed an
    interfaces.ChannelConnectivity identifying this Channel's connectivity.
    The callable will be invoked immediately upon subscription and again for
    every change to this Channel's connectivity thereafter until it is
    unsubscribed.
  try_to_connect: A boolean indicating whether or not this Channel should
    attempt to connect if it is not already connected and ready to conduct
    RPCs.
)try_to_connectN)r'   	subscribe)r(   r   r-   s      r   r.   Channel.subscribeK   s     	Hr   c                 :    U R                   R                  U5        g)zUnsubscribes a callback from this Channel's connectivity.

Args:
  callback: A callable previously registered with this Channel from having
    been passed to its "subscribe" method.
N)r'   unsubscribe)r(   r   s     r   r1   Channel.unsubscribeZ   s     	!!(+r   r&   r   )	__name__
__module____qualname____firstlineno____doc__r*   r.   r1   __static_attributes__r   r   r   r#   r#   @   s     I,r   r#   c                 V    [         R                  " Uc  U OSX4-  5      n[        U5      $ )a$  Creates an insecure Channel to a remote host.

Args:
  host: The name of the remote host to which to connect.
  port: The port of the remote host to which to connect.
    If None only the 'host' part will be used.

Returns:
  A Channel to the remote host through which RPCs may be conducted.
%s:%d)r   insecure_channelr#   )hostportr)   s      r   r;   r;   d   s1     ##'TL"8G 7r   c                 X    [         R                  " Uc  U OSX4-  U5      n[        U5      $ )aU  Creates a secure Channel to a remote host.

Args:
  host: The name of the remote host to which to connect.
  port: The port of the remote host to which to connect.
    If None only the 'host' part will be used.
  channel_credentials: A ChannelCredentials.

Returns:
  A secure Channel to the remote host through which RPCs may be conducted.
r:   )r   secure_channelr#   )r<   r=   channel_credentialsr)   s       r   r?   r?   u   s4     !!'TL"8:MG 7r   c                       \ rS rSrSrS rSrg)StubOptions   zA value encapsulating the various options for creation of a Stub.

This class and its instances have no supported interface - it exists to define
the type of its instances and its instances exist to be passed to other
functions.
c                 L    Xl         X l        X0l        X@l        XPl        X`l        g r   r<   request_serializersresponse_deserializersmetadata_transformerthread_poolthread_pool_size)r(   r<   rF   rG   rH   rI   rJ   s          r   r*   StubOptions.__init__   s'     	#6 &<#$8!& 0r   )r<   rH   rF   rG   rI   rJ   Nr3   r4   r5   r6   r7   r*   r8   r   r   r   rB   rB      s    1r   rB   c                 "    [        U UUUUU5      $ )a  Creates a StubOptions value to be passed at stub creation.

All parameters are optional and should always be passed by keyword.

Args:
  host: A host string to set on RPC calls.
  request_serializers: A dictionary from service name-method name pair to
    request serialization behavior.
  response_deserializers: A dictionary from service name-method name pair to
    response deserialization behavior.
  metadata_transformer: A callable that given a metadata object produces
    another metadata object to be used in the underlying communication on the
    wire.
  thread_pool: A thread pool to use in stubs.
  thread_pool_size: The size of thread pool to create for use in stubs;
    ignored if thread_pool has been passed.

Returns:
  A StubOptions value created from the passed parameters.
)rB   rE   s         r   stub_optionsrN      s#    8  r   c                     Uc  [         OUn[        R                  " U R                  UR                  UR
                  UR                  UR                  5      $ )zCreates a face.GenericStub on which RPCs can be made.

Args:
  channel: A Channel for use by the created stub.
  options: A StubOptions customizing the created stub.

Returns:
  A face.GenericStub on which RPCs can be made.
)_EMPTY_STUB_OPTIONSr   generic_stubr'   r<   rH   rF   rG   )r)   optionseffective_optionss      r   rQ   rQ      sQ     07+G++..--00 r   c           	          Uc  [         OUn[        R                  " U R                  UUUR                  UR
                  UR                  UR                  5      $ )a  Creates a face.DynamicStub with which RPCs can be invoked.

Args:
  channel: A Channel for the returned face.DynamicStub to use.
  service: The package-qualified full name of the service.
  cardinalities: A dictionary from RPC method name to cardinality.Cardinality
    value identifying the cardinality of the RPC method.
  options: An optional StubOptions value further customizing the functionality
    of the returned face.DynamicStub.

Returns:
  A face.DynamicStub with which RPCs can be invoked.
)rP   r   dynamic_stubr'   r<   rH   rF   rG   )r)   servicecardinalitiesrR   rS   s        r   rU   rU      sW     07+G++..--00 r   c                       \ rS rSrSrS rSrg)ServerOptions   zA value encapsulating the various options for creation of a Server.

This class and its instances have no supported interface - it exists to define
the type of its instances and its instances exist to be passed to other
functions.
c                 X    Xl         X l        X0l        X@l        XPl        X`l        Xpl        g r   multi_method_implementationrequest_deserializersresponse_serializersrI   rJ   default_timeoutmaximum_timeout)r(   r]   r^   r_   rI   rJ   r`   ra   s           r   r*   ServerOptions.__init__  s/     ,G(%:"$8!& 0..r   )r`   ra   r]   r^   r_   rI   rJ   NrL   r   r   r   rY   rY      s    /r   rY   c           	      $    [        U UUUUUU5      $ )aT  Creates a ServerOptions value to be passed at server creation.

All parameters are optional and should always be passed by keyword.

Args:
  multi_method_implementation: A face.MultiMethodImplementation to be called
    to service an RPC if the server has no specific method implementation for
    the name of the RPC for which service was requested.
  request_deserializers: A dictionary from service name-method name pair to
    request deserialization behavior.
  response_serializers: A dictionary from service name-method name pair to
    response serialization behavior.
  thread_pool: A thread pool to use in stubs.
  thread_pool_size: The size of thread pool to create for use in stubs;
    ignored if thread_pool has been passed.
  default_timeout: A duration in seconds to allow for RPC service when
    servicing RPCs that did not include a timeout value when invoked.
  maximum_timeout: A duration in seconds to allow for RPC service when
    servicing RPCs no matter what timeout value was passed when the RPC was
    invoked.

Returns:
  A StubOptions value created from the passed parameters.
)rY   r\   s          r   server_optionsrd     s'    B # r   c                     Uc  [         OUn[        R                  " U UR                  UR                  UR
                  UR                  UR                  5      $ )aa  Creates an interfaces.Server with which RPCs can be serviced.

Args:
  service_implementations: A dictionary from service name-method name pair to
    face.MethodImplementation.
  options: An optional ServerOptions value further customizing the
    functionality of the returned Server.

Returns:
  An interfaces.Server with which RPCs can be serviced.
)_EMPTY_SERVER_OPTIONSr   serverr]   r^   r_   rI   rJ   )service_implementationsrR   rS   s      r   rg   rg   E  sT     29-g%%55//..%%** r   r   )NNNNNN)NNNNNNN)$r7   	threadingr   r   	grpc.betar   r   r   r   grpc.framework.commonr   grpc.framework.interfaces.facer	   ChannelCredentialsssl_channel_credentialsCallCredentialsr   r!   access_token_call_credentialscomposite_call_credentialscomposite_channel_credentialsobjectr#   r;   r?   rB   rP   rN   rQ   rU   ServerCredentialsssl_server_credentialsrY   rf   rd   rg   r   r   r   <module>rv      s>   5    )  )   - / ,, 66 &&=	O !% B B !<<  $ B B !,f !,H"$1& 12 "$dD$E  
#L(4 ** 44 /F /6 &dD$dD$O  !%)Xr   