
    /                         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)zD'vmware private-clouds management-dns-zone-bindings update' command.    )absolute_import)division)unicode_literals)ManagementDNSZoneBindingClient)base)flags)logz9
          Update a management DNS zone binding.
        a\  
          To update a management DNS zone binding called `my-mgmt-dns-zone-binding` in private cloud `my-private-cloud` and zone `us-west2-a` with description `New Description`, run:

            $ {command} my-mgmt-dns-zone-binding --project=my-project --private-cloud=my-private-cloud --location=us-east2-b --description="New Description"

            Or:

            $ {command} my-mgmt-dns-zone-binding --private-cloud=my-private-cloud --description="New Description"

           In the second example, the project and location are taken from gcloud properties `core/project` and compute/zone.
    )DESCRIPTIONEXAMPLESc                   *    e Zd ZdZeZed        Zd Zy)Updatez%Update a management DNS zone binding.c                 
   t        j                  |        t        j                  j	                  |        t        j                  j                  | d       | j                  j                  d       | j                  ddd       y)z Register flags for this command.Tyamlz--descriptionz{        Text describing the binding resource that represents the network getting bound to the management DNS zone.
        )requiredhelpN)	r   &AddManagementDnsZoneBindingArgToParserr   
ASYNC_FLAGAddToParser
SetDefaultdisplay_info	AddFormatadd_argument)parsers    Hlib/surface/vmware/private_clouds/management_dns_zone_bindings/update.pyArgszUpdate.Args5   sj     
008OO'OOvt,
!!&)
      c                    |j                   j                  j                         }t               }|j	                  ||j
                        }|j                  }|r#t        j                  |j                  dd       y |j                  |j                  |      dj                  |j                                     }t        j                  |j                         d       |S )Nzmanagement DNS zone bindingT)kindis_asyncz:waiting for management DNS zone binding [{}] to be updated)operation_refmessage)r   )CONCEPTSmanagement_dns_zone_bindingParser   r   descriptionasync_r	   UpdatedResourcenameWaitForOperationGetOperationRefformatRelativeName)selfargsmdzbclient	operationr   resources          r   Runz
Update.RunC   s    ==44::<D+-FdD$4$45I{{H	)..!>O&&,,Y7!"(&):):)<"= ' ?H ))+2OPOr   N)	__name__
__module____qualname____doc__DETAILED_HELPdetailed_helpstaticmethodr   r3    r   r   r   r   /   s!    -- r   r   N)r7   
__future__r   r   r   6googlecloudsdk.api_lib.vmware.managementdnszonebindingr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.vmwarer   googlecloudsdk.corer	   r8   ReleaseTracksReleaseTrackGAUpdateCommandr   r;   r   r   <module>rE      sm    K '  ' a ( 3 #	
	( D%%(()$T $ *$r   