
                             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	lmZ d
diZ G d dej                        Zy)z@Command to delete Airflow DAGs for a Cloud Composer environment.    )absolute_import)division)unicode_literals)base)flags)resource_args)storage_util)
console_ioEXAMPLESz          To delete the dags in the path ``path/to/dags'', for the
          environment named ``environment-1'' in the location ``us-east1'', run:

            $ {command} path/to/dags --environment=environment-1 --location=us-east1
        c                   *    e Zd ZdZeZed        Zd Zy)DeletezNDelete DAG files from an Cloud Composer environment's Cloud Storage bucket.
  c                 `    t        j                  | dd       t        j                  | d       y )Nzwhose DAGs to deleteF)
positionaldags)r   AddEnvironmentResourceArgr   AddDeleteTargetPositional)parsers    8lib/surface/composer/environments/storage/dags/delete.pyArgszDelete.Args-   s(    ++&5:	##FF3    c                 p   |j                   j                  j                         }|j                  rdj	                  |j                        nd}t        j                  dj	                  ||j                               d       t        j                  ||j                  xs dd| j                               S )	Nz[{}] in  zURecursively deleting all contents from {}the 'dags/' subdirectory of environment [{}]T)cancel_on_no*r   )release_track)CONCEPTSenvironmentParsetargetformatr
   PromptContinueRelativeNamer	   r   ReleaseTrack)selfargsenv_ref	subtargets       r   Runz
Delete.Run3   s    mm''--/G26++
!!$++.2I	++16)292F2F2H,J	
 #V4;L;L;NP Pr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r(    r   r   r   r   '   s&      -4 4
	Pr   r   N)r,   
__future__r   r   r   googlecloudsdk.callioper   #googlecloudsdk.command_lib.composerr   r   r	   googlecloudsdk.core.consoler
   r-   Commandr   r0   r   r   <module>r6      sF    G &  ' ( 5 = < 2 	PT\\ Pr   