
    p
                     Z   S 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	S
.rS r\R                   " \R"                  R$                  \R"                  R&                  \R"                  R(                  5      \R*                   " S S\R,                  5      5       5       rg)zDeletes(n >= 0) Delivery Pipeline(s), Target(s), Custom Target Type(s), Deploy Policy(ies), and Automation(s) with current project's Cloud Deploy service..    )deploy)
exceptions)base)flags)resource_args)yamlz{description}z     To delete the resources in a Cloud Deploy YAML file `deploy.yaml`:

       $ {command} --file=deploy.yaml --region=us-central1

  )DESCRIPTIONEXAMPLESc                     [         R                  " U 5        [         R                  " U S5        [        R                  " U 5        g)zRegister flags for this command.

Args:
  parser: An argparse.ArgumentParser-like object. It is mocked out in order to
    capture some information, but behaves like an ArgumentParser.
zYIf true, the delivery pipeline and its sub-resources (releases and rollouts) are deleted.N)r   AddConfigFileAddForcer   AddLocationResourceArgparsers    lib/surface/deploy/delete.py_CommonArgsr   '   s7     f.. ?@ &&v.    c                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Delete5   zjDeletes Delivery Pipeline(s), Target(s), Custom Target Type(s), and Automation(s) in a yaml configuration.c                     [        U 5        g )N)r   r   s    r   ArgsDelete.Args>   s
    r   c                 &   [        [        R                  " UR                  5      5      n[        R
                  " 5       nUR                  R                  R                  5       nUR                  5       S   nUR                  X%UR                  5        g)z9This is what gets called when the user runs this command.locationsIdN)listr   load_all_pathfiler   DeployClientCONCEPTSregionParseAsDictDeleteResourcesforce)selfargsloaded_yamldeploy_client
region_refr!   s         r   Run
Delete.RunB   sj    
 t))$))45K'')M%%++-J /F!!+tzzBr    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   5   sI    
 s -  44))CCr   r   N)r2   "googlecloudsdk.api_lib.clouddeployr   googlecloudsdk.api_lib.utilr   r6   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr8   r   r   googlecloudsdk.corer   r3   r   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyUpdateCommandr   r-   r   r   <module>rG      s    b 6 F ( M 3 ; $ 			
/ T..33T5F5F5I5I CT C Cr   