
                             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	KJr  \R                  " \R                  R                  5       " S
 S\R                   5      5       rg)zICommand for creating or replacing an application from YAML specification.    )absolute_import)division)print_function)unicode_literals)base)flags)run_apps_operations)
exceptionsc                   >    \ rS rSrSrSSS.r\S 5       rS rS r	S	r
g
)Deploy   z;Create or replace an application from a YAML specification.z"          {description}
          zf          To create an application from specification

              $ {command} stack.yaml

         )DESCRIPTIONEXAMPLESc                 \    [         R                  " U5        [         R                  " U5        g )N)r   
AddFileArgAddServiceAccountArg)clsparsers     lib/surface/stacks/deploy.pyArgsDeploy.Args,   s    	V	v&    c                     SU;  a  SU;  a  [         R                  " S5      eSU;   a  [         R                  " S5      eg )Nname	resourcesz!'name' or 'resources' is missing.z/tztabs found in manifest content.)r
   FieldMismatchErrorConfigurationError)selffile_contents     r   _ValidateAppConfigFileDeploy._ValidateAppConfigFile1   sB    \!k&E))*MNN|))*KLL r   c                     UR                   nU R                  U5        U R                  5       n[        R                  " X5       nUR                  5         UR                  U5      sSSS5        $ ! , (       d  f       g= f)z'Create or Update application from YAML.N)FILEr    ReleaseTrackr	   ConnectVerifyLocation	ApplyYaml)r   argsr   release_trackclients        r   Run
Deploy.Run7   s_     99L-%%'M		$	$T	9Vl+ 
:	9	9s   !A//
A= N)__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r    r+   __static_attributes__r-   r   r   r   r      s5    C	
- ' 'M
,r   r   N)r2   
__future__r   r   r   r   googlecloudsdk.callioper   +googlecloudsdk.command_lib.run.integrationsr   r	   "googlecloudsdk.command_lib.runappsr
   ReleaseTracksr$   ALPHACommandr   r-   r   r   <module>r=      sY    P &  % ' ( = K 9 D%%++,$,T\\ $, -$,r   