
    
                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ d	d
dZ ej                  ej                  j                          G d dej"                               Zy)z1VMware Engine VPC network peering update command.    )absolute_import)division)unicode_literals)networkpeering)base)flags)logzK
          Update a VMware Engine VPC network peering description.
        a;  

          To update only the description of a VPC network peering named `my-peering` to `Example description`, run:

            $ {command} my-peering --description="Example description"

          In this example, the project is taken from gcloud properties core/project and location is taken as `global`.

    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Updatez8Update a Google Cloud VMware Engine VPC network peering.c                    t        j                  | d       t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       | j                  ddd       y)	z Register flags for this command.T)
positionalyamlz--descriptionFzB        Updated description for this VPC network peering.
        )requiredhelpN)	r   AddNetworkPeeringToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    -lib/surface/vmware/network_peerings/update.pyArgszUpdate.Args2   sl     
##Ft<OO'OOvt,
!!&)
      c                    |j                   j                  j                         }t        j                         }|j
                  }|j                  ||j                        }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )N)descriptionzVPC network peeringT)kindis_asyncz*waiting for vpc peering [{}] to be updated)operation_refmessage)r    )CONCEPTSnetwork_peeringParser   NetworkPeeringClientasync_r   r   r	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargspeeringclientr!   	operationresources          r   Runz
Update.Run@   s    mm++113G002F{{Hg43C3CDI	
..4tE&&,,Y7<CC  "$ ' %H ,,.5JKOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r5    r   r   r   r   ,   s!    @- r   r   N)r9   
__future__r   r   r   googlecloudsdk.api_lib.vmwarer   googlecloudsdk.callioper   2googlecloudsdk.command_lib.vmware.network_peeringsr   googlecloudsdk.corer	   r:   ReleaseTracksReleaseTrackGAUpdateCommandr   r=   r   r   <module>rG      sj    8 &  ' 8 ( D #		$ D%%(()"T " *"r   