
    S
                        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K	Jr  SSK	Jr  SS	KJr  S
\R"                  " S5      S.r\R&                  " \R(                  R*                  \R(                  R,                  \R(                  R.                  5      \R0                   " S S\R2                  5      5       5       rg)z3Exports a Gcloud Deploy delivery pipeline resource.    N)delivery_pipeline)
exceptions)base)export_util)manifest_util)resource_args)utilz{description}z
      To return the .yaml definition of the delivery pipeline 'test-pipeline', in region 'us-central1', run:

        $ {command} test-pipeline --region=us-central1

      )DESCRIPTIONEXAMPLESc                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Export+   zReturns the .yaml definition of the specified delivery pipeline.

The exported yaml definition can be applied by 'deploy apply' command.
c                 Z    [         R                  " U SS9  [        R                  " U 5        g )NT)
positional)r   AddDeliveryPipelineResourceArgcore_export_utilAddExportFlags)parsers    /lib/surface/deploy/delivery_pipelines/export.pyArgsExport.Args5   s     00DI##F+    c                 :   UR                   R                  R                  5       n[        R                  " 5       R	                  UR                  5       5      n[        R                  " X2[        R                  R                  5      n[        R                  " XA5        g)zEntry point of the export command.

Args:
  args: argparse.Namespace, An object that contains the values for the
    arguments specified in the .Args() method.
N)CONCEPTSr   ParseDeliveryPipelinesClientGetRelativeNamer   ProtoToManifestResourceKindDELIVERY_PIPELINEr   r   )selfargspipeline_refpipelinemanifests        r   Run
Export.Run:   su     ==2288:L 88:>>!!#H ,, : : L LNH x&r    N)__name__
__module____qualname____firstlineno____doc___DETAILED_HELPdetailed_helpstaticmethodr   gcloud_exception CatchHTTPErrorRaiseHTTPExceptiondeploy_exceptionsHTTP_ERROR_FORMATr'   __static_attributes__r)   r   r   r   r   +   sH     !-, , 44))''r   r   )r.   textwrap"googlecloudsdk.api_lib.clouddeployr   googlecloudsdk.api_lib.utilr   r2   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr4   r   r   r   !googlecloudsdk.command_lib.exportr	   r   dedentr/   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyExportCommandr   r)   r   r   <module>rE      s    :  @ F ( M 9 ; ; F 	 
 		 D%%++T->->-C-C%%((*'T ' *'r   