
    8                     X   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  \R"                  \R$                  " \R&                  R(                  \R&                  R*                  5       " S S\R,                  5      5       5       rSSS.\l        g)z%Command for rejecting spokes updates.    )absolute_import)division)unicode_literals)networkconnectivity_api)networkconnectivity_util)waiter)base)flags)log)	resourcesc                   .    \ rS rSrSr\S 5       rS rSrg)RejectSpokeUpdate   zReject a proposal to update a spoke in a hub.

Reject a VPC spoke update proposal. By rejecting a spoke update,
you prevent updating the 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 S5        [         R                  " U 5        [         R
                  " U 5        g )Nzto reject the spoke updatez!URI of the spoke to reject updatez"Etag of the spoke to reject update)r
   AddHubResourceArgAddSpokeFlagAddSpokeEtagFlagAddRejectionDetailsFlagAddAsyncFlag)parsers    <lib/surface/network_connectivity/hubs/reject_spoke_update.pyArgsRejectSpokeUpdate.Args)   sQ    	F$@A	vBC	6#GH	!!&)	v    c                 2   [         R                  " U R                  5       S9nUR                  R                  R                  5       nU R                  5       [        R                  R                  :X  a2  UR                  X1R                  UR                  UR                  5      nO1UR                  X1R                  UR                  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[0        R2                  " UR4                  5      nUR6                  (       a  UR9                  U5      $ UR:                  (       a:  [        R                  R                  SR!                  UR*                  5      5        U$ [0        R<                  " XeSR!                  UR*                  5      5      nU$ )N)release_trackz,Reject spoke update 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RejectSpokeUpdateBetaspoke
spoke_etag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RejectSpokeUpdate.Run1   s   $//'')F mm%%'Gd//444++
::tf ''
::tf JJ6==gllnM $$66F,889J9J9LM 7 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__rA   r   r   r   r      s       #r   r   z   To reject updating a spoke named ``my-spoke'' with ``etag'' in a hub named ``my-hub'' with reason ``my-reason'', run:

    $ {command} my-hub --spoke="projects/spoke-project/locations/global/hubs/my-spoke" --spoke-etag=etag --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)rF   
__future__r   r   r   +googlecloudsdk.api_lib.network_connectivityr   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper	   /googlecloudsdk.command_lib.network_connectivityr
   googlecloudsdk.corer   r   DefaultUniverseOnlyReleaseTracksr    r$   GACommandr   detailed_helprA   r   r   <module>rU      s     , &  ' O P . ( A # ) D%%**D,=,=,@,@A3 3 B 3p		#  r   