
                             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)lifesciences_client)waiter)
exceptionsc                   2   ^  \ rS rSrSrU 4S jrS rSrU =r$ )OperationPoller   z>Class for polling Cloud Life Sciences long running Operations.c                 ~   > [         [        U ]  [        R                  " 5       R
                  R                  S 5        g )Nc                     U $ )N )xs    ?lib/googlecloudsdk/command_lib/lifesciences/operation_poller.py<lambda>*OperationPoller.__init__.<locals>.<lambda>   s    ab    )superr
   __init__r   LifeSciencesClientclientprojects_locations_operations)self	__class__s    r   r   OperationPoller.__init__   s.    	/4)..077UUWbd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    Fd 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.lifesciencesr   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer   core_exceptionsCloudOperationPollerNoResourcesr
   Errorr   r   r   r   <module>r;      s@     &  ' C . =f<< &_** &r   