a
    !f                     @   sP   d dl mZ d dlZd dlmZmZmZ d dlZ	G dd dej
je	jjjZdS )    )absolute_importN)AnyNoReturnOptionalc                       sX   e Zd ZdZedddZedddZed fdd	Z	e
e d
 fddZ  ZS )Futurea#  Encapsulation of the asynchronous execution of an action.

    This object is returned from asychronous Pub/Sub calls, and is the
    interface to determine the status of those calls.

    This object should not be created directly, but is returned by other
    methods in this library.
    )returnc                 C   s
   |    S )zGReturn ``True`` if the associated Pub/Sub action has not yet completed.)doneself r   _/var/www/html/python-backend/venv/lib/python3.9/site-packages/google/cloud/pubsub_v1/futures.pyrunning!   s    zFuture.runningc                 C   s   t dd S )Nz9Only used by executors from `concurrent.futures` package.)NotImplementedErrorr	   r   r   r   set_running_or_notify_cancel%   s    z#Future.set_running_or_notify_cancelresultc                    s   t  j|dS )zSet the return value of work associated with the future.

        Do not use this method, it should only be used internally by the library and its
        unit tests.
        r   )super
set_result)r
   r   	__class__r   r   r   *   s    zFuture.set_result	exceptionc                    s   t  j|dS )zSet the result of the future as being the given exception.

        Do not use this method, it should only be used internally by the library and its
        unit tests.
        r   )r   set_exception)r
   r   r   r   r   r   2   s    zFuture.set_exception)__name__
__module____qualname____doc__boolr   r   r   r   r   r   BaseExceptionr   __classcell__r   r   r   r   r      s
   	r   )
__future__r   concurrent.futures
concurrenttypingr   r   r   Zgoogle.api_core.futureZgooglefuturesr   Zapi_corefuturer   r   r   r   <module>   s   