
    Ag:	              	          d Z ddlZddlmZ  G d dej                   ej
                  dd            Z G d dej                   ej
                  dd	            Z eej                  j                  j                  dddd      Zd
 Zd Zy)z;Utilities for use with the base interface of RPC Framework.    N)basec                       e Zd ZdZy)_Completionz,A trivial implementation of base.Completion.N__name__
__module____qualname____doc__     ]/var/www/openai/venv/lib/python3.12/site-packages/grpc/framework/interfaces/base/utilities.pyr   r      s     7r   r   terminal_metadatacodemessagec                       e Zd ZdZy)_Subscriptionz.A trivial implementation of base.Subscription.Nr   r   r   r   r   r   #   s     9r   r   )kindtermination_callback	allowanceoperatorprotocol_receiverc                     t        | ||      S )a@  Creates a base.Completion aggregating the given operation values.

    Args:
      terminal_metadata: A terminal metadata value for an operation.
      code: A code value for an operation.
      message: A message value for an operation.

    Returns:
      A base.Completion aggregating the given operation values.
    )r   r   s      r   
completionr   8   s     ($88r   c                 d    t        t        j                  j                  j                  dd| |      S )ah  Creates a "full" base.Subscription for the given base.Operator.

    Args:
      operator: A base.Operator to be used in an operation.
      protocol_receiver: A base.ProtocolReceiver to be used in an operation.

    Returns:
      A base.Subscription of kind base.Subscription.Kind.FULL wrapping the given
        base.Operator and base.ProtocolReceiver.
    N)r   r   SubscriptionKindFULL)r   r   s     r   full_subscriptionr   F   s/     ##T4;L r   )r
   collectionsgrpc.framework.interfaces.baser   
Completion
namedtupler   r   r   r   NONE_NONE_SUBSCRIPTIONr   r   r   r   r   <module>r&      s    B  /7OOK	
79K	
	9  #tT4 
9r   