
                             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 e
j                   G d
 de
j                                Zy)zCommand to run transfer jobs.    )absolute_import)division)unicode_literals)operations_util)apis)base)	name_util)
propertiesc                   0    e Zd ZdZdddZed        Zd Zy)Runz$Run a Transfer Service transfer job.z1      Run a Transfer Service transfer job.
      z<      To run job 'foo', run:

        $ {command} foo
      )DESCRIPTIONEXAMPLESc                 R    | j                  dd       | j                  ddd       y )Nnamez$The name of the job you want to run.)helpz
--no-async
store_truezBlocks other tasks in your terminal until the transfer operation has completed. If not included, tasks will run asynchronously.)actionr   )add_argument)parsers     lib/surface/transfer/jobs/run.pyArgszRun.Args.   s6    
%KL
N	  P    c           	         t        j                  dd      }t        j                  dd      }t        j                  |j
                        }|j                  j                  |j                  ||j                  t        j                  j                  j                  j                                           }|j                  r t!        j"                  |j
                         |S )Ntransferv1)	projectId)jobNamerunTransferJobRequest)operation_name)r   GetClientInstanceGetMessagesModuler	   add_job_prefixr   transferJobsr   %StoragetransferTransferJobsRunRequestRunTransferJobRequestr
   VALUEScoreprojectGetno_asyncr   block_until_done)selfargsclientmessagesformatted_nameresults         r   r   zRun.Run8   s    ##J5F%%j$7H--dii8N  $$66""*"@"@$++0088<<> #A #@ 	7 	ABF }}&&fkkBMr   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r    r   r   r   r      s1    ,


- P Pr   r   N)r5   
__future__r   r   r   googlecloudsdk.api_lib.transferr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.transferr	   googlecloudsdk.corer
   UniverseCompatibleCommandr   r8   r   r   <module>rA      sG    $ &  ' ; , ( 9 * *$,, * *r   