
    =                     $   S r SSK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	0r\R                  " \R                   R"                  \R                   R$                  \R                   R&                  5       " S
 S\R(                  5      5       rg)z!Export workflow template command.    N)dataproc)base)flags)util)filesEXAMPLESz      To export version 1.0 of workflow template for 'my-workflow-template' in region
      'us-central1' to template.yaml, run:

        $ {command} my-workflow-template --region=us-central1 --destination=path/to/template.yaml --version=1.0
      c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Describe$   zExport a workflow template.

Exports a workflow template's configuration to a file.
This configuration can be imported at a later time.
c                     [         R                  " U R                  5       5      n[        R                  " USUR
                  5        [        R                  " U5        [        R                  " U5        g )Nexport)	dpDataprocReleaseTrackr   AddTemplateResourceArgapi_versionexport_utilAddExportFlagsAddVersionFlag)clsparserr   s      1lib/surface/dataproc/workflow_templates/export.pyArgsDescribe.Args/   sM    {{3++-.H	  83G3GHv&	     c                    [         R                  " U R                  5       5      nUR                  R                  R                  5       nUR                  X1R                  5      nS Ul        S Ul	        S Ul        S Ul
        S Ul        UR                  (       a>  [        R                  " UR                  5       n[        R                   " XES9  S S S 5        g [        R                   " U["        R$                  S9  g ! , (       d  f       g = f)N)messagestream)r   r   r   CONCEPTStemplateParseGetRegionsWorkflowTemplateversionidname
createTime
updateTimedestinationr   
FileWriterr   Exportsysstdout)selfargsr   template_refworkflow_templater   s         r   RunDescribe.Run6   s    {{4,,./H==))//1L !;;ll$
  ! $#' #'  D,,-#4D .- !23::F .-s   8C::
D N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpclassmethodr   r1   __static_attributes__r3   r   r   r
   r
   $   s&      -! !Gr   r
   )r8   r+   googlecloudsdk.api_lib.dataprocr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   !googlecloudsdk.command_lib.exportr   r   googlecloudsdk.core.utilr   r9   ReleaseTracksr   ALPHABETAGADescribeCommandr
   r3   r   r   <module>rG      s    (  : ( 5 A * 	
 D%%++T->->-C-C%%((*-Gt## -G*-Gr   