U
    "FZhy  ã                   @   s°   d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ G dd„ dej	e 
dd	d
ddddddddg
¡ƒZdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ ZdS )z-Utilities for RPC Framework's Face interface.é    N)Úcardinality)Ústyle)Ústream)Úfacec                   @   s   e Zd ZdS )Ú_MethodImplementationN)Ú__name__Ú
__module__Ú__qualname__© r
   r
   úo/home/aprabhat/apps/x.techxrdev.in/venv/lib/python3.8/site-packages/grpc/framework/interfaces/face/utilities.pyr      s   r   r   r   Úunary_unary_inlineÚunary_stream_inlineÚstream_unary_inlineÚstream_stream_inlineÚunary_unary_eventÚunary_stream_eventÚstream_unary_eventÚstream_stream_eventc                 C   s"   t tjjtjj| dddddddƒ
S )a]  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-unary RPC method as a callable value
        that takes a request value and an face.ServicerContext object and
        returns a response value.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   ÚCardinalityÚUNARY_UNARYr   ÚServiceÚINLINE©Zbehaviorr
   r
   r   r   .   s    öc                 C   s"   t tjjtjjd| ddddddƒ
S )al  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-stream RPC method as a callable
        value that takes a request value and an face.ServicerContext object and
        returns an iterator of response values.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚUNARY_STREAMr   r   r   r   r
   r
   r   r   G   s    öc                 C   s"   t tjjtjjdd| dddddƒ
S )al  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-unary RPC method as a callable
        value that takes an iterator of request values and an
        face.ServicerContext object and returns a response value.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚSTREAM_UNARYr   r   r   r   r
   r
   r   r   `   s    öc                 C   s"   t tjjtjjddd| ddddƒ
S )a{  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-stream RPC method as a callable
        value that takes an iterator of request values and an
        face.ServicerContext object and returns an iterator of response values.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   ÚSTREAM_STREAMr   r   r   r   r
   r
   r   r   y   s    öc                 C   s"   t tjjtjjdddd| dddƒ
S )a~  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-unary RPC method as a callable
        value that takes a request value, a response callback to which to pass
        the response value of the RPC, and an face.ServicerContext.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   ÚEVENTr   r
   r
   r   r   ’   s    öc                 C   s"   t tjjtjjddddd| ddƒ
S )a~  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a unary-stream RPC method as a callable
        value that takes a request value, a stream.Consumer to which to pass the
        response values of the RPC, and an face.ServicerContext.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   r   r   r
   r
   r   r   «   s    öc                 C   s"   t tjjtjjdddddd| dƒ
S )aË  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-unary RPC method as a callable
        value that takes a response callback to which to pass the response value
        of the RPC and an face.ServicerContext and returns a stream.Consumer to
        which the request values of the RPC should be passed.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   r   r   r
   r
   r   r   Ä   s    öc                 C   s"   t tjjtjjddddddd| ƒ
S )aË  Creates an face.MethodImplementation for the given behavior.

    Args:
      behavior: The implementation of a stream-stream RPC method as a callable
        value that takes a stream.Consumer to which to pass the response values
        of the RPC and an face.ServicerContext and returns a stream.Consumer to
        which the request values of the RPC should be passed.

    Returns:
      An face.MethodImplementation derived from the given behavior.
    N)r   r   r   r   r   r   r   r   r
   r
   r   r   Þ   s    ö)Ú__doc__ÚcollectionsZgrpc.framework.commonr   r   Zgrpc.framework.foundationr   Zgrpc.framework.interfaces.facer   ZMethodImplementationÚ
namedtupler   r   r   r   r   r   r   r   r   r
   r
   r
   r   Ú<module>   s<   
öþþ