
    	                     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)zApplies a yaml configuration containing Delivery Pipeline(s), Target(s), Custom Target Type(s), and Automation(s) declarative definitions.    )deploy)
exceptions)base)flags)resource_args)yamlz{description}z{       To apply a Cloud Deploy YAML file `deploy.yaml`:

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

    )DESCRIPTIONEXAMPLESc                 \    [         R                  " U 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.
N)r   AddConfigFiler   AddLocationResourceArgparsers    lib/surface/deploy/apply.py_CommonArgsr   '   s      f&&v.    c                   p    \ rS rSrSr\r\S 5       r\	R                  " \R                  5      S 5       rSrg)Apply2   zApplies a yaml configuration containing Delivery Pipeline(s), Target(s), Custom Target Type(s), Deploy Policy(ies), and Automation(s) declarative definitions.c                     [        U 5        g )N)r   r   s    r   Args
Apply.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%5        g)z9This is what gets called when the user runs this command.locationsIdN)listr   load_all_pathfiler   DeployClientCONCEPTSregionParseAsDictCreateResources)selfargsloaded_yamldeploy_client
region_refr    s         r   Run	Apply.Run?   sd    
 t))$))45K'')M%%++-J /F!!+6r    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   2   sG    
 g -  44))77r   r   N)r0   "googlecloudsdk.api_lib.clouddeployr   googlecloudsdk.api_lib.utilr   r4   googlecloudsdk.callioper   !googlecloudsdk.command_lib.deployr6   r   r   googlecloudsdk.corer   r1   r   ReleaseTracksReleaseTrackALPHABETAGADefaultUniverseOnlyUpdateCommandr   r+   r   r   <module>rE      s    Q 6 F ( M 3 ; $ 			
/ T..33T5F5F5I5I 7D 7 7r   