
                             d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ	 ddl
mZ ddlmZ d	d
iZ ej                  ej                   j"                         G d dej$                               Zy)PApply a KRM configuration to a Google Cloud Platform resource filename or stdin.    )absolute_import)division)unicode_literals)base)flags)
kcc_client)progress_trackerEXAMPLESz
      To create or update the resource in file 'my-resource.yaml' in the current project run:
        $ {command} my-resource.yaml
    c                   *    e Zd ZdZeZed        Zd Zy)Applyr   c                     t        j                  |       t        j                  |       |j                  j	                  d       y )Nyaml)declarative_flagsAddResolveResourcesArgAddApplyPathArgdisplay_info	AddFormat)clsparsers     $lib/surface/resource_config/apply.pyArgsz
Apply.Args'   s2    ,,V4%%f-
!!&)    c                     |j                   }|j                  }t        j                         }d }t	        j
                  dj                  |      d      5  |j                  ||      }d d d        |S # 1 sw Y   |S xY w)NzApplying {}zApply Cancelled)messageaborted_message)PATHresolve_referencesr	   	KccClientr
   ProgressTrackerformatApplyConfig)selfargsresource_pathresolve_refsclientoutputs         r   Runz	Apply.Run-   su    IIM**L!!#FF		)	)$$]3)
+ !!->f
+ M	
+ Ms   A22A<N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpclassmethodr   r)    r   r   r   r   "   s!    X -* *
	r   r   N)r-   
__future__r   r   r   googlecloudsdk.callioper   +googlecloudsdk.command_lib.util.declarativer   r   3googlecloudsdk.command_lib.util.declarative.clientsr	   googlecloudsdk.core.consoler
   r.   ReleaseTracksReleaseTrackALPHADeclarativeCommandr   r1   r   r   <module>r;      sk    W &  ' ( R J 8 	 D%%++,D##  -r   