
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ dd	lmZ  G d
 dej                        Zy)z)Command to wait for operation completion.    )absolute_import)division)unicode_literals)
datafusion)waiter)base)operation_poller)resource_argsc                   *    e Zd ZdZdZed        Zd Zy)WaitzWait for asynchronous operation to complete.

  ## EXAMPLES

  To wait for operation `my-operation` in project `my-project` and location
  `my-location`, run:

    $ {command} my-operation --project=my-project --location=my-location
  iO c                 0    t        j                  | d       y )NzThe operation to wait for.)r
   AddOperationResourceArg)parsers    *lib/surface/data_fusion/operations/wait.pyArgsz	Wait.Args)   s    ))&2NO    c                    t        j                         }|j                  j                  j	                         }|j
                  j                  |j                               }|j                  j                  j                  |      }t        j                  t        j                         |j                  dj!                  |j                        | j"                         y )N)namezWaiting for [{}] to complete.)wait_ceiling_ms)df
DatafusionCONCEPTS	operationParsemessages/DatafusionProjectsLocationsOperationsGetRequestRelativeNameclientprojects_locations_operationsGetr   WaitForr	   OperationPollerr   formatWAIT_CEILING_MS)selfargsr   operation_refreqr   s         r   RunzWait.Run-   s    JMM++113M



M
M'') N +C !!??CCCHI
NN((*'..y~~>,,	.r   N)__name__
__module____qualname____doc__r$   staticmethodr   r)    r   r   r   r      s'     #/P P.r   r   N)r-   
__future__r   r   r   "googlecloudsdk.api_lib.data_fusionr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   &googlecloudsdk.command_lib.data_fusionr	   r
   SilentCommandr   r/   r   r   <module>r6      s4    0 &  ' ? . ( C @.4 .r   