o
    پi                     @   s   d Z ddlZddlZddlmZ dZejZdZ	zddl
mZ eeeZ	W n ey/   dZ	Y nw e	rMede d	d
 de d de  de d G dd deZG dd deZdd ZG dd deZdS )zEClient and server classes corresponding to protobuf-defined services.    N)
health_pb2z1.78.0F)first_version_is_lowerTz)The grpc package installed is at version ,zG but the generated code in grpc_health/v1/health_pb2_grpc.py depends onz	 grpcio>=.z, Please upgrade your grpc module to grpcio>=z6 or downgrade your generated code using grpcio-tools<=c                   @   s   e Zd ZdZdd ZdS )
HealthStub8Missing associated documentation comment in .proto file.c                 C   s<   |j dtjjtjjdd| _|jdtjjtjjdd| _dS )zIConstructor.

        Args:
            channel: A grpc.Channel.
        /grpc.health.v1.Health/CheckT)request_serializerresponse_deserializer_registered_method/grpc.health.v1.Health/WatchN)	unary_unary#grpc__health_dot_v1_dot_health__pb2HealthCheckRequestSerializeToStringHealthCheckResponse
FromStringCheckunary_streamWatch)selfchannel r   R/home/ubuntu/.local/lib/python3.10/site-packages/grpc_health/v1/health_pb2_grpc.py__init__   s   zHealthStub.__init__N)__name__
__module____qualname____doc__r   r   r   r   r   r      s    r   c                   @   s    e Zd ZdZdd Zdd ZdS )HealthServicerr   c                 C       | tjj |d td)z_If the requested service is unknown, the call will fail with status
        NOT_FOUND.
        Method not implemented!set_codegrpc
StatusCodeUNIMPLEMENTEDset_detailsNotImplementedErrorr   requestcontextr   r   r   r   4   s   
zHealthServicer.Checkc                 C   r    )a  Performs a watch for the serving status of the requested service.
        The server will immediately send back a message indicating the current
        serving status.  It will then subsequently send a new message whenever
        the service's serving status changes.

        If the requested service is unknown when the call is received, the
        server will send a message setting the serving status to
        SERVICE_UNKNOWN but will *not* terminate the call.  If at some
        future point, the serving status of the service becomes known, the
        server will send a new message with the service's serving status.

        If the call terminates with status UNIMPLEMENTED, then clients
        should assume this method is not supported and should not retry the
        call.  If the call terminates with any other status (including OK),
        clients should retry the call with appropriate exponential backoff.
        r!   r"   r)   r   r   r   r   <   s   
zHealthServicer.WatchN)r   r   r   r   r   r   r   r   r   r   r   1   s    r   c                 C   s^   t j| jtjjtjjdt j| j	tjjtjjdd}t 
d|}||f |d| d S )N)request_deserializerresponse_serializer)r   r   zgrpc.health.v1.Health)r$   unary_unary_rpc_method_handlerr   r   r   r   r   r   unary_stream_rpc_method_handlerr   method_handlers_generic_handleradd_generic_rpc_handlersadd_registered_method_handlers)servicerserverrpc_method_handlersgeneric_handlerr   r   r   add_HealthServicer_to_serverR   s    r7   c                   @   sL   e Zd ZdZe								d	ddZe								d	ddZdS )
Healthr   r   NFc
           
      C   0   t jj| |dtjjtjj||||||||	ddS )Nr   Tr   )r$   experimentalr   r   r   r   r   r   
r*   targetoptionschannel_credentialscall_credentialsinsecurecompressionwait_for_readytimeoutmetadatar   r   r   r   i       zHealth.Checkc
           
      C   r9   )Nr   Tr:   )r$   r;   r   r   r   r   r   r   r<   r   r   r   r      rF   zHealth.Watch)r   NNFNNNN)r   r   r   r   staticmethodr   r   r   r   r   r   r8   f   s,    r8   )r   r$   warningsgrpc_health.v1r   r   GRPC_GENERATED_VERSION__version__GRPC_VERSION_version_not_supportedgrpc._utilitiesr   ImportErrorRuntimeErrorobjectr   r   r7   r8   r   r   r   r   <module>   s:   


	!