
    ^                     \   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lmZ dd
lmZ d Zd Z e	j&                  e	j(                  j*                  e	j(                  j,                  e	j(                  j.                         G d de	j0                               Zy)z*Command for deleting target HTTPS proxies.    )absolute_import)division)unicode_literals)base_classes)utils)base)flags)scope)target_https_proxies_utilsc                      ddddS )NDelete target HTTPS proxies.zB      *{command}* deletes one or more target HTTPS proxies.
      z      Delete a global target HTTPS proxy by running:

        $ {command} PROXY_NAME

      Delete a regional target HTTPS proxy by running:

        $ {command} PROXY_NAME --region=REGION_NAME
      )briefDESCRIPTIONEXAMPLES r       2lib/surface/compute/target_https_proxies/delete.py_DetailedHelpr      s     )


 r   c                 x   |j                   }|j                  | |j                  t        j                  j
                  t        j                  |            }t        j                  |       g }|D ]  }t        j                  |      rQ|j                  |j                  j                  d |j                  j                   di |j#                         f       i|j                  |j                  j$                  d |j                  j&                  di |j#                         f        |j)                  |      S )z9Issues requests necessary to delete Target HTTPS Proxies.)default_scopescope_listerDeleter   )clientResolveAsResource	resourcescompute_scope	ScopeEnumGLOBALcompute_flagsGetDefaultScopeListerr   PromptForDeletionr   IsRegionalTargetHttpsProxiesRefappendapitools_clientregionTargetHttpsProxiesmessages,ComputeRegionTargetHttpsProxiesDeleteRequestAsDicttargetHttpsProxies&ComputeTargetHttpsProxiesDeleteRequestMakeRequests)argsholdertarget_https_proxy_argr   target_https_proxy_refsrequeststarget_https_proxy_refs          r   _Runr2   3   s!   ==&2DD
!++22 66v>	 E @ 12( 7!AA oo!!::HG6??GG 2'..0234
 oov--@@(MvMM >3::<>? @ !8 
		X	&&r   c                   8    e Zd ZdZdZ e       Zed        Zd Z	y)r   r   Nc                     t        j                  d      | _        | j                  j                  |d       |j                  j                  t         j                         y )NT)pluraldelete)operation_type)r	   TargetHttpsProxyArgumentTARGET_HTTPS_PROXY_ARGAddArgumentdisplay_infoAddCacheUpdaterTargetHttpsProxiesCompleter)clsparsers     r   ArgszDelete.ArgsW   sH    !&!?!?t!LC**6(*K
''(I(IJr   c                 v    t        j                  | j                               }t        ||| j                        S )N)r   ComputeApiHolderReleaseTrackr2   r9   )selfr,   r-   s      r   Runz
Delete.Run]   s0    **4+<+<+>?Ffd99::r   )
__name__
__module____qualname____doc__r9   r   detailed_helpclassmethodr@   rE   r   r   r   r   r   O   s-     %/-K K
;r   r   N)rI   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r   r
   r   7googlecloudsdk.command_lib.compute.target_https_proxiesr   r   r2   ReleaseTracksrC   ALPHABETAGADeleteCommandr   r   r   r   <module>rV      s    1 &  ' 7 0 ( E E I ^*'8 D%%++T->->-C-C%%((*;T ;*;r   