
                         R   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  \R                  \R                  \R                  " \R                   R"                  \R                   R$                  5       " S	 S
\R&                  5      5       5       5       rSSS.\l        g)z Command for deactivating spokes.    )networkconnectivity_api)networkconnectivity_util)waiter)base)flags)log)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)
Deactivate   a  Deactivate a spoke.

Deactivate the specified spoke. When you deactivate a spoke, it
can't connect to other spokes that are attached to the same hub.

Network Connectivity Center retains details about deactivated
spokes so that they can be reactivated later.
c                     [         R                  " U S5        [         R                  " U SS9  [         R                  " U 5        g )Nzto deactivateT)hide_global_arg)r   AddSpokeResourceArgAddRegionGroupAddAsyncFlag)parsers    5lib/surface/network_connectivity/spokes/deactivate.pyArgsDeactivate.Args)   s0    	fo6	6	v    c                 L   [         R                  " U R                  5       S9nUR                  R                  R                  5       nUR                  U5      n[        R                  R                  SR                  UR                  5       5      5        [        R                  R                  UR                  S[         R"                  U R                  5          S9n[$        R&                  " UR(                  UR*                  5      nUR,                  (       a  UR/                  U5      $ UR0                  (       a:  [        R                  R                  SR                  UR                  5      5        U$ [$        R2                  " XeSR                  UR                  5      5      nU$ )N)release_trackz#Deactivate request issued for: [{}]z1networkconnectivity.projects.locations.operations)
collectionapi_versionz Check operation [{}] for status.z&Waiting for operation [{}] to complete)r   SpokesClientReleaseTrackCONCEPTSspokeParser   r   statusPrintformatNamer	   REGISTRYParseRelativeNamenamer   VERSION_MAPr   CloudOperationPollerspoke_serviceoperation_servicedone	GetResultasync_WaitFor)selfargsclient	spoke_refop_refop_resourcepollerress           r   RunDeactivate.Run/   sG   $11'')+F##))+Iy)FJJ:AA  $$66F,889J9J9LM 7 OK (()=)=)/)A)ACF {{k**{{	jj9@@MNm
..AHH#[[*+C Jr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r7   __static_attributes__r9   r   r   r   r      s       
r   r   z   To deactivate 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)r>   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.network_connectivityr   googlecloudsdk.corer   r	   HiddenUniverseCompatibleReleaseTracksr   BETAGACommandr   detailed_helpr9   r   r   <module>rN      s     ' P P . ( A # ) D%%**D,=,=,@,@A* * B  *^		
 r   