
                             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
dZ ej                  ej                  j                          G d dej"                               Zy)z(Command to delete the specified channel.    )absolute_import)division)unicode_literals)channels)base)flags)
console_ioz{description}z         To delete the channel `my-channel` in location `us-central1`, run:

          $ {command} my-channel --location=us-central1
        )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)DeletezDelete an Eventarc channel.c                 r    t        j                  |dd       t        j                  j	                  |       y )NzChannel to delete.T)required)r   AddChannelResourceArgr   
ASYNC_FLAGAddToParser)clsparsers     'lib/surface/eventarc/channels/delete.pyArgszDelete.Args,   s'    	(<tLOO'    c                    t        j                         }|j                  j                  j	                         }|j                         j                         }t        j                  dj                  |j                         |      dd       |j                  |      }|j                  r|S |j                  |d|      S )zRun the delete command.zHThe following channel will be deleted.
[{name}] in location [{location}])namelocationT)messagethrow_if_unattendedcancel_on_noDeleting)r   ChannelClientV1CONCEPTSchannelParseParentNamer	   PromptContinueformatr   async_WaitFor)selfargsclientchannel_reflocation_name	operations         r   Runz
Delete.Run1   s    %%'F--''--/K&&(--/M5&%**,+  - ! k*I{{>>)Z==r   N)	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpclassmethodr   r/    r   r   r   r   &   s!    # -( (>r   r   N)r3   
__future__r   r   r   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.callioper   #googlecloudsdk.command_lib.eventarcr   googlecloudsdk.core.consoler	   r4   ReleaseTracksReleaseTrackGADeleteCommandr   r7   r   r   <module>rA      sj    / &  ' 4 ( 5 2 				 D%%(()>T > *>r   