
    $	                         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 dd
lmZ ddlmZ  G d de
j&                        Zy)z>Command to wait for Cloud Life Sciences operation to complete.    )absolute_import)division)unicode_literals)lifesciences_client)waiter)base)concepts)operation_poller)	yaml_data)concept_parsersc                   *    e Zd ZdZdZed        Zd Zy)WaitzWait for Cloud Life Sciences operation to complete.

  ## EXAMPLES
  To wait for the completion of the operation called `my-operation`, run:

    $ {command} my-operation
  iO c                     t         j                  j                  t        j                  j                  d      j                               }t        j                  j                  d|dd      j                  |        y )Nzlifesciences.operation	operationz.The Cloud Life Sciences operation to wait for.T)required)r	   ResourceSpecFromYamlr   ResourceYAMLDataFromPathGetDatar   ConceptParserForResourceAddToParser)parseroperation_specs     +lib/surface/lifesciences/operations/wait.pyArgsz	Wait.Args)   sd    **33""++,DE	N !!--^%U . "{6*    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)r   LifeSciencesClientCONCEPTSr   Parsemessages1LifesciencesProjectsLocationsOperationsGetRequestRelativeNameclientprojects_locations_operationsGetr   WaitForr
   OperationPollerr    formatWAIT_CEILING_MS)selfargsr(   operation_refreqr   s         r   RunzWait.Run2   s     335FMM++113M
//
K
K'') L +C ;;??DI
NN((*'..y~~>,,	.r   N)__name__
__module____qualname____doc__r.   staticmethodr   r3    r   r   r   r      s%     #/+ +.r   r   N)r7   
__future__r   r   r   #googlecloudsdk.api_lib.lifesciencesr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper    googlecloudsdk.calliope.conceptsr	   'googlecloudsdk.command_lib.lifesciencesr
   $googlecloudsdk.command_lib.util.apisr   (googlecloudsdk.command_lib.util.conceptsr   SilentCommandr   r9   r   r   <module>rC      s;    E &  ' C . ( 5 D : D!.4 !.r   