
                         d    d dl mZmZ d dlmZ d dlmZ d dlmZ  G d de      Z	 G d de	      Z
y	)
    )ABCabstractmethod)CallableFailedPrecondition)PubsubMessagec                   4    e Zd ZdZededeg df   fd       Zy)NackHandlerzd
    A NackHandler handles calls to the nack() method which is not expressible in Pub/Sub Lite.
    messageackNc                      y)a  Handle a negative acknowledgement. ack must eventually be called.

        This method will be called on an event loop and should not block.

        Args:
          message: The nacked message.
          ack: A callable to acknowledge the underlying message. This must eventually be called.

        Raises:
          GoogleAPICallError: To fail the client if raised inline.
        N selfr   r   s      Clib/third_party/google/cloud/pubsublite/cloudpubsub/nack_handler.pyon_nackzNackHandler.on_nack   s     	    )__name__
__module____qualname____doc__r   r   r   r   r   r   r   r
   r
      s2     } 8BH3E  r   r
   c                   &    e Zd Zdedeg df   fdZy)DefaultNackHandlerr   r   Nc                     t        d      )NzpYou may not nack messages by default when using a PubSub Lite client. See NackHandler for how to customize this.r   r   s      r   r   zDefaultNackHandler.on_nack,   s     
 	
r   )r   r   r   r   r   r   r   r   r   r   r   +   s    
} 
8BH3E 
r   r   N)abcr   r   typingr   google.api_core.exceptionsr   google.pubsub_v1r   r
   r   r   r   r   <module>r      s+    $  9 *# *
 
r   