
    
                     
   S r SSKJr  SSKJr  SSKJ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  \
R$                  \
R&                  " \
R(                  R*                  5       " S S\
R,                  5      5       5       rg)z Export session template command.    )absolute_import)division)unicode_literalsN)dataproc)base)flags)util)filesc                   .    \ rS rSrSr\S 5       rS rSrg)Export   a  Export a session template.

Exporting a session template is similar to describing one, except that export
omits output only fields, such as the template id and resource name. This
is to allow piping the output of export directly into import, which requires
that output only fields are omitted.

## EXAMPLES

The following command saves the contents of session template
`example-session-template` to a file so that it can be imported later:

  $ {command} example-session-template --destination=saved-template.yaml
c                     [         R                  " 5       n[        R                  " USUR                  5        [
        R                  " U5        g )Nexport)dpDataprocr   AddSessionTemplateResourceArgapi_versionexport_utilAddExportFlags)clsparserr   s      0lib/surface/dataproc/session_templates/export.pyArgsExport.Args0   s3    {{}H	''(:N:NOv&    c                 ^   [         R                  " 5       nUR                  nUR                  R                  R                  5       nUR                  UR                  5       S9nUR                  R                  R                  U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(                  " XgS9  S S S 5        g [&        R(                  " U[*        R,                  S9  g ! , (       d  f       g = f)N)name)messagestream)r   r   messagesCONCEPTSsession_templateParse3DataprocProjectsLocationsSessionTemplatesGetRequestRelativeNameclient#projects_locations_sessionTemplatesGetr   
createTimecreator
updateTimeuuiddestinationr
   
FileWriterr   r   sysstdout)selfargsr   r    template_refrequesttemplater   s           r   Run
Export.Run6   s    {{}H  H==11779LJJ&&( K *GBBFFwOH HMHHHHMD,,-8; .- #**=	 .-s   D
D, N)	__name__
__module____qualname____firstlineno____doc__classmethodr   r6   __static_attributes__r8   r   r   r   r      s      ' '
>r   r   )r=   
__future__r   r   r   r/   googlecloudsdk.api_lib.dataprocr   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.dataprocr   !googlecloudsdk.command_lib.exportr	   r   googlecloudsdk.core.utilr
   DefaultUniverseOnlyReleaseTracksReleaseTrackBETACommandr   r8   r   r   <module>rK      si    ' &  ' 
 : ( 5 A * D%%**+->T\\ -> , ->r   