
                            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  ej$                  d      Z G d de	j(                        Z ej,                  ej.                  j0                  ej.                  j2                  ej.                  j4                         G d dej6                               Zy)zCommand to delete VPN Gateways.    )absolute_import)division)unicode_literals)base_classes)utils)poller)vpn_gateways_utils)waiter)base)flagsT)pluralc                       e Zd Zd Zy)DeleteBatchPollerc                      y )N )selfoperation_batchs     *lib/surface/compute/vpn_gateways/delete.py	GetResultzDeleteBatchPoller.GetResult"   s         N)__name__
__module____qualname__r   r   r   r   r   r       s    r   r   c                   .    e Zd ZdZddiZed        Zd Zy)Deletea\  Delete Compute Engine Highly Available VPN Gateways.

  *{command}* is used to delete one or more Compute Engine Highly
  Available VPN Gateways. VPN Gateways can only be deleted when no VPN tunnels
  refer to them.

  Highly Available VPN Gateway provides a means to create a VPN solution with a
  higher availability SLA compared to Classic Target VPN Gateway.
  Highly Available VPN gateways are simply referred to as VPN gateways in the
  API documentation and gcloud commands.
  A VPN Gateway can reference one or more VPN tunnels that connect it to
  external VPN gateways or Cloud VPN Gateways.
  EXAMPLESzb          To delete a VPN gateway, run:

              $ {command} my-gateway --region=us-central1c                     t         j                  | d       | j                  j                  t        j
                         y )Ndelete)operation_type)_VPN_GATEWAY_ARGAddArgumentdisplay_infoAddCacheUpdaterr   VpnGatewaysCompleter)parsers    r   ArgszDelete.ArgsA   s/       A
''(B(BCr   c                 $   t        j                  | j                               }t        j                  |      }|j
                  j                  }t        j                  ||j                        }t        j                  |       |D cg c]  }|j                  |       }}dj                  t        |      dkD  rdnd      }t        |j
                  |j                         }	t#        j$                  |	t'        j(                  |      |      S c c}w )z+Issues the request to delete a VPN Gateway.zDeleting VPN {}   GatewaysGateway)r   ComputeApiHolderReleaseTrackr	   VpnGatewayHelperclientapitools_clientr    ResolveAsResource	resourcesr   PromptForDeletionr   formatlenr   vpnGatewaysr
   WaitForr   OperationBatch)
r   argsholderhelperr.   refsrefoperation_refswait_messageoperation_pollers
             r   Runz
Delete.RunF   s    **4+<+<+>?F008F]]**F--dF4D4DED	D!489DSfmmC(DN9$++N+a/iBL(8J8JK>>* //?O O	 :s   DN)r   r   r   __doc__detailed_helpstaticmethodr&   r@   r   r   r   r   r   (   s4     =- D DOr   r   N)rA   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   )googlecloudsdk.api_lib.compute.operationsr   +googlecloudsdk.api_lib.compute.vpn_gatewaysr	   googlecloudsdk.api_lib.utilr
   googlecloudsdk.callioper   /googlecloudsdk.command_lib.compute.vpn_gatewaysr   GetVpnGatewayArgumentr    BatchPollerr   ReleaseTracksr,   ALPHABETAGADeleteCommandr   r   r   r   <module>rR      s    & &  ' 7 0 < J . ( A.5..d; **  D%%++T->->-C-C%%((*)OT )O*)Or   