
    ~                     2    d dl mZ d dlmZ  G d de      Zy)    )ContextManager)FailedPreconditionc                   $    e Zd Zd Zd Zd Zd Zy)RequireStartedc                     d| _         y )NF)_startedselfs    Clib/third_party/google/cloud/pubsublite/internal/require_started.py__init__zRequireStarted.__init__   s	        c                 B    | j                   rt        d      d| _         | S )Nz__enter__ called twice.Tr   r   r	   s    r   	__enter__zRequireStarted.__enter__   s!    ==$%>??r   c                 2    | j                   st        d      y )Nz __enter__ has never been called.r   r	   s    r   require_startedzRequireStarted.require_started   s    }}$%GHH r   c                 $    | j                          y )N)r   )r
   exc_type	exc_value	tracebacks       r   __exit__zRequireStarted.__exit__"   s    r   N)__name__
__module____qualname__r   r   r   r    r   r   r   r      s    Ir   r   N)typingr   google.api_core.exceptionsr   r   r   r   r   <module>r      s    " 9^ r   