
                         V   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 ej                   ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d
 dej(                                      Zy)z#Command for deleting interconnects.    )absolute_import)division)unicode_literals)base_classes)utils)client)base)flagsc                   0    e Zd ZdZdZed        Zd Zd Zy)DeletezDelete Compute Engine interconnects.

  *{command}* deletes Compute Engine interconnects. Interconnects
   can only be deleted when no other resources (e.g.,
   InterconnectAttachments) refer to them.
  Nc                     t        j                  d      | _        | j                  j                  |d       |j                  j                  t         j                         y )NT)pluraldelete)operation_type)r
   InterconnectArgumentINTERCONNECT_ARGAddArgumentdisplay_infoAddCacheUpdaterInterconnectsCompleter)clsparsers     +lib/surface/compute/interconnects/delete.pyArgszDelete.Args+   sH     55TBC$$VH$E
''(D(DE    c                      y)Nzcompute.interconnects )selfs    r   
CollectionzDelete.Collection1   s    "r   c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  |       g }|D ]D  }t        j                  ||j                        }|j                  |j                  d             F |j                  j                  |      S )N)compute_clientT)only_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   PromptForDeletionr   Interconnectextendr   MakeRequests)r   argsholderrefsrequestsrefinterconnects          r   Runz
Delete.Run4   s    **4+<+<+>?F  2249I9IJD	D!H((V]]Klool)))EF  ==%%h//r   )	__name__
__module____qualname____doc__r   classmethodr   r   r1   r   r   r   r   r      s-    
 F F
#
0r   r   N)r5   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper	   0googlecloudsdk.command_lib.compute.interconnectsr
   UniverseCompatibleReleaseTracksr$   ALPHABETAGADeleteCommandr   r   r   r   <module>rB      s     * &  ' 7 0 ? ( B T..33T5F5F5I5I0T 0 0r   