
    -
                     t    S r SSKJr  SSKJr  SSKJr  SSKJr  SSK	Jr  S r
 " S S\R                  5      rg	)
z!Command for deleting subnetworks.    )base_classes)utils)base)flagsc                      SSSS.$ )Nz Delete Google Cloud subnetworks.z          *{command}* deletes one or more Google Cloud subnetworks.
          Subnetworks can only be deleted when no other resources,
          such as VM instances, refer to them.".
      z        To delete the subnetwork subnet-1 in the us-central1,
        run:

        $ {command} subnet-1 --region=us-central1
      )briefDESCRIPTIONEXAMPLES r       .lib/surface/compute/networks/subnets/delete.py_DetailedHelpr      s     -


 r   c                   @    \ rS rSrSrSr\" 5       r\S 5       r	S r
Srg)Delete-   zDelete Compute Engine subnetworks.

*{command}* deletes one or more Compute Engine
subnetworks. Subnetworks can only be deleted when no other resources
(e.g., virtual machine instances) refer to them.
Nc                     [         R                  " SS9[        l        [        R                  R	                  U SS9  U R
                  R                  [         R                  5        g )NT)pluraldelete)operation_type)r   SubnetworkArgumentr   
SUBNET_ARGAddArgumentdisplay_infoAddCacheUpdaterSubnetworksCompleter)parsers    r   ArgsDelete.Args8   sH    00=F
!!&!B
''(B(BCr   c                    [         R                  " U R                  5       5      nUR                  n[        R
                  R                  UUR                  [        R                  " U5      S9n[        R                  " US5        / nU HS  nUR                  UR                  R                  SUR                  R                   " S0 UR#                  5       D645        MU     UR%                  U5      $ )N)scope_listerregionr   r   )r   ComputeApiHolderReleaseTrackclientr   r   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListerr   PromptForDeletionappendapitools_clientsubnetworksmessagesComputeSubnetworksDeleteRequestAsDictMakeRequests)selfargsholderr$   subnet_refsrequests
subnet_refs          r   Run
Delete.Run>   s    **4+<+<+>?F]]F##55"88@ 6 BK
 
K2H!
oov--998FF 2'..023 4 "
 x((r   r   )__name__
__module____qualname____firstlineno____doc__r   r   detailed_helpstaticmethodr   r7   __static_attributes__r   r   r   r   r   -   s.     */-D D
)r   r   N)r=   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer   r'   3googlecloudsdk.command_lib.compute.networks.subnetsr   DeleteCommandr   r   r   r   <module>rF      s2    ( 8 0 ( E E(")T ")r   