
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr   " S S	\	R                  5      r " S
 S\R                  5      rg)zOperation Poller.    )absolute_import)division)unicode_literals)
datafusion)waiter)
exceptionsc                   2   ^  \ rS rSrSrU 4S jrS rSrU =r$ )OperationPoller   z6Class for polling Data Fusion long running Operations.c                 ~   > [         [        U ]  [        R                  " 5       R
                  R                  S 5        g )Nc                     U $ )N )xs    >lib/googlecloudsdk/command_lib/data_fusion/operation_poller.py<lambda>*OperationPoller.__init__.<locals>.<lambda>   s        )superr
   __init__df
Datafusionclientprojects_locations_operations)self	__class__s    r   r   OperationPoller.__init__   s*    	/4)
<<kKr   c                     UR                   (       a<  UR                  (       a*  [        UR                  UR                  R                  5      egg)NTF)doneerrorOperationErrornamemessage)r   	operations     r   IsDoneOperationPoller.IsDone!   s1    ~~	Y^^Y__-D-DEEr   r   )	__name__
__module____qualname____firstlineno____doc__r   r$   __static_attributes____classcell__r   s   @r   r
   r
      s    >K r   r
   c                   ,   ^  \ rS rSrSrU 4S jrSrU =r$ )r    )   zHClass for errors raised when a polled operation completes with an error.c                 J   > [         [        U ]  SR                  X5      5        g )NzOperation [{}] failed: {})r   r    r   format)r   operation_namedescriptionr   s      r   r   OperationError.__init__,   s#    	.$()D)K)K*% &r   r   )r&   r'   r(   r)   r*   r   r+   r,   r-   s   @r   r    r    )   s    P& &r   r    N)r*   
__future__r   r   r   "googlecloudsdk.api_lib.data_fusionr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer   core_exceptionsCloudOperationPollerNoResourcesr
   Errorr    r   r   r   <module>r<      s@     &  ' ? . =f<< &_** &r   