
    -	                     8   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                   j"                  e	j                   j$                  e	j                   j&                         G d
 de	j(                               Zy)z)Command for deleting network attachments.    )absolute_import)division)unicode_literals)base_classes)utils)base)scope)flagsc                   2    e Zd ZdZddiZdZed        Zd Zy)Deletez=Delete one or more Google Compute Engine network attachments.EXAMPLESzv          To delete a network attachment, run:

              $ {command} NETWORK_ATTACHMENT_NAME --region=us-central1Nc                     t        j                  dd      | _        | j                  j                  |d       |j                  j                  t         j                         y )NT)requiredpluraldelete)operation_type)r
   NetworkAttachmentArgumentARGAddArgumentdisplay_infoAddCacheUpdaterNetworkAttachmentsCompleter)clsparsers     1lib/surface/compute/network_attachments/delete.pyArgszDelete.Args+   sG    --tDICGGGx8
''(I(IJ    c                    t        j                  | j                               }|j                  }| j                  j                  ||j                  t        j                  j                        }t        j                  |       g }|D ]R  }|j                  |j                  j                  d |j                  j                   di |j#                         f       T |j%                  |      S )N)default_scoper    )r   ComputeApiHolderReleaseTrackclientr   ResolveAsResource	resourcescompute_scope	ScopeEnumREGIONr   PromptForDeletionappendapitools_clientnetworkAttachmentsmessages&ComputeNetworkAttachmentsDeleteRequestAsDictMakeRequests)selfargsholderr#   network_attachment_refsrequestsnetwork_attachment_refs          r   Runz
Delete.Run1   s    **4+<+<+>?F]]F"hh88fm.E.E.L.L 9 N	34H"9oov--@@(MvMM >3::<>? @ #:
 x((r   )	__name__
__module____qualname____doc__detailed_helpr   classmethodr   r7   r    r   r   r   r      s:     F  J- 	#K K
)r   r   N)r;   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r&   6googlecloudsdk.command_lib.compute.network_attachmentsr
   ReleaseTracksr"   ALPHABETAGADeleteCommandr   r    r   r   <module>rH      s{    0 &  ' 7 0 ( E H T..33T5F5F5I5I )T  ) )r   