
                         d   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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SKJr  \R&                  \R(                  " \R*                  R,                  \R*                  R.                  5       " S S\R0                  5      5       5       rSSS.\l        g)zCommand for deleting spokes.    )absolute_import)division)unicode_literals)networkconnectivity_api)networkconnectivity_util)waiter)base)flags)log)	resources)
console_ioc                   .    \ rS rSrSr\S 5       rS rSrg)Delete    z-Delete a spoke.

Delete the specified spoke.
c                     [         R                  " U S5        [         R                  " U SS9  [         R                  " U 5        g )Nz	to deleteF)hide_global_arg)r
   AddSpokeResourceArgAddRegionGroupAddAsyncFlag)parsers    1lib/surface/network_connectivity/spokes/delete.pyArgsDelete.Args(   s0    	fk2	7	v    c                    [         R                  " U R                  5       S9nUR                  R                  R                  5       n[        R                  " SR                  UR                  5       5      SS9  UR                  U5      n[        R                  R                  SR                  UR                  5       5      5        UR                  (       a%  [        R                  " UR                  5       SS9  U$ UR                   (       a:  [        R                  R                  SR                  UR"                  5      5        U$ [$        R&                  U R                  5          n[(        R*                  R-                  UR"                  S	US
9n[.        R0                  " UR2                  5      n[.        R4                  " XvSR                  UR"                  5      5      n[        R                  " UR                  5       SS9  U$ )N)release_trackz"You are about to delete spoke [{}]T)messagecancel_on_nozDelete request issued for: [{}]spoke)kindz Check operation [{}] for status.z1networkconnectivity.projects.locations.operations)
collectionapi_versionz&Waiting for operation [{}] to complete)r   SpokesClientReleaseTrackCONCEPTSr   Parser   PromptContinueformatNamer   r   statusPrintdoneDeletedResourceasync_namer   VERSION_MAPr   REGISTRYParseRelativeNamer   CloudOperationPollerNoResourcesoperation_serviceWaitFor)	selfargsclient	spoke_refop_refr"   op_resourcepollerress	            r   Run
Delete.Run.   s   $11'')+F##))+I5<<Y^^=MN ]]9%FJJ6==inn>NOP{{	)..*9m{{	jj9@@MNm*66t7H7H7JKK$$66F 7 !K 33  "F
..AHH#[[*+C 	(w7Jr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r>   __static_attributes__r@   r   r   r   r       s     
  
 r   r   z{   To delete a spoke named ``myspoke'' in the ``us-central1'' region, run:

    $ {command} myspoke --region=us-central1
  z   This command uses the networkconnectivity/v1 API. The full documentation
  for this API can be found at:
  https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest
  )EXAMPLESzAPI REFERENCEN)rE   
__future__r   r   r   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   /googlecloudsdk.command_lib.network_connectivityr
   googlecloudsdk.corer   r   googlecloudsdk.core.consoler   DefaultUniverseOnlyReleaseTracksr$   BETAGADeleteCommandr   detailed_helpr@   r   r   <module>rV      s     # &  ' O P . ( A # ) 2 D%%**D,=,=,@,@A,T , B ,b		 r   