
    E                         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
S.r\R                  " \R                  R                   5       " S S\R"                  5      5       rg)z,'vmware private-connections update' command.    )absolute_import)division)unicode_literals)PrivateConnectionsClient)base)flags)logzq
          Updates a VMware Engine private connection. Only description and routing-mode can be updated.
        a  
        To update a private connection named `my-private-connection` in project `my-project` and region `us-west1` by changing its description to `Updated description for the private connection` and routing-mode to `GLOBAL`, run:

          $ {command} my-private-connection --location=us-west1 --project=my-project --description="Updated description for the private connection" --routing-mode=GLOBAL

        Or:

          $ {command} my-private-connection --description="Updated description for the private connection" --routing-mode=GLOBAL

        In the second example, the project and location are taken from gcloud properties core/project and compute/regions, respectively.
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Update.   z)Update a Google Cloud Private Connection.c                 (   [         R                  " U SS9  [        R                  R	                  U 5        [        R                  R                  U S5        U R                  R                  S5        U R                  SSS9  U R                  SSS	/S
S9  g)z Register flags for this command.T)
positionalyamlz--descriptionzA        Updated description for this Private Connection.
        )helpz--routing-modeGLOBALREGIONALzB        Updated routing mode for this Private Connection.
        )choicesr   N)	r   AddPrivateConnectionToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    0lib/surface/vmware/private_connections/update.pyArgsUpdate.Args4   s     
&&v$?OO'OOvt,
!!&)
  
 :&      c                    UR                   R                  R                  5       n[        5       nUR                  nUR                  X!R                  UR                  5      nU(       a!  [        R                  " UR                  SSS9  g UR                  UR                  U5      SR                  UR                  5       5      S9n[        R                  " UR                  5       SS9  U$ )NzPrivate ConnectionT)kindis_asyncz1waiting for private connection [{}] to be updated)operation_refmessage)r#   )CONCEPTSprivate_connectionParser   async_r   descriptionrouting_moder	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsr(   clientr$   	operationresources          r   Run
Update.RunG   s    99??A%'F{{H02B2B"//1I	
..3dD&&,,Y7CJJ++-
 ' H '')0D Or!    N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr   r8   __static_attributes__r:   r!   r   r   r   .   s!    1- $r!   r   N)r?   
__future__r   r   r   0googlecloudsdk.api_lib.vmware.privateconnectionsr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r@   ReleaseTracksReleaseTrackGAUpdateCommandr   r:   r!   r   <module>rM      sh    3 &  ' U ( 3 #	
	( D%%((),T , *,r!   