
                            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\R.                  5      5       5       rS\R2                  R4                  R6                  R9                  5        S3SS.\l        g)z'Command for rejecting spokes from hubs.    )absolute_import)division)unicode_literals)networkconnectivity_api)networkconnectivity_util)waiter)base)flags)log)
properties)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)RejectSpoke    zReject a spoke from a hub.

Reject a VPC spoke. By rejecting a spoke,
you prevent or remove connectivity between the associated VPC network
and any other VPC networks that are attached to the same hub.
c                     [         R                  " U S5        [         R                  " U S5        [         R                  " U 5        [         R                  " U 5        g )Nzto reject the spoke fromzURI of the spoke to reject)r
   AddHubResourceArgAddSpokeFlagAddRejectionDetailsFlagAddAsyncFlag)parsers    5lib/surface/network_connectivity/hubs/reject_spoke.pyArgsRejectSpoke.Args*   s@    	F$>?	v;<	!!&)	v    c                    [         R                  " U R                  5       S9nUR                  R                  R                  5       nU R                  5       [        R                  R                  :X  a'  UR                  X1R                  UR                  5      nO&UR                  X1R                  UR                  5      n[        R                  R                  SR                  UR!                  5       5      5        ["        R$                  R'                  UR(                  S[*        R,                  U R                  5          S9n[.        R0                  " UR2                  5      nUR4                  (       a  UR7                  U5      $ UR8                  (       a:  [        R                  R                  SR                  UR(                  5      5        U$ [.        R:                  " XeSR                  UR(                  5      5      nU$ )N)release_trackz%Reject spoke request issued for: [{}]z1networkconnectivity.projects.locations.operations)
collectionapi_versionz Check operation [{}] for status.z&Waiting for operation [{}] to complete)r   
HubsClientReleaseTrackCONCEPTShubParser	   BETARejectSpokeBetaspokedetailsr   r   statusPrintformatNamer   REGISTRYParseRelativeNamenamer   VERSION_MAPr   CloudOperationPollerNoResourcesoperation_servicedone	GetResultasync_WaitFor)selfargsclienthub_refop_refop_resourcepollerress           r   RunRejectSpoke.Run1   sx   $//'')+Fmm%%'Gd//444%%gzz4<<Hf!!'::t||DfJJ<CC  $$66F,889J9J9LM 7 OK 33F4L4LMF{{k**{{	jj9@@MNm
..077DFC Jr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r>   __static_attributes__r@   r   r   r   r       s       r   r   z   To reject a spoke named ``my-spoke'' from a hub named ``my-hub'' with reason ``my-reason'', run:

    $ {command} my-hub --spoke="https://networkconnectivity.zS/v1/projects/spoke-project/locations/global/spokes/my-spoke" --details=my-reason
  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   r   DefaultUniverseOnlyReleaseTracksr    r$   GACommandr   VALUEScoreuniverse_domainGetdetailed_helpr@   r   r   <module>rX      s     . &  ' O P . ( A # * ) D%%**D,=,=,@,@A+$,, + B +`? @J?P?P?U?U?e?e?i?i?k>l m		 r   