
                         T   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	lmZ dd
lmZ ddlmZ ddlmZ dZ e	j&                  e	j(                  j*                  e	j(                  j,                        e	j.                   G d de	j0                                      Zy)z&Command to update an Attached cluster.    )absolute_import)division)unicode_literals)attached)base)flags)resource_args)command_util)	constants)endpoint_utilz
To update a cluster named ``my-cluster'' managed in location ``us-west1'', run:

$ {command} my-cluster --location=us-west1 --description=testcluster
c                   .    e Zd ZdZdeiZed        Zd Zy)UpdatezUpdate an Attached cluster.EXAMPLESc                    t        j                  | d       t        j                  | d       t        j                  |        t        j
                  |        t        j                  | d       t        j                  | d       t        j                  | dd       t        j                  |        t        j                  |        t        j                  |        t        j                  |        t        j                  | d       t        j                  |        t         j"                  j%                  |        | j&                  j)                  t*        j,                         y )Nz	to updateF)requiredzupdate of the clusterT)r	   AddAttachedClusterResourceArgr   AddDescriptionAddClearDescriptionAddAnnotationsAddValidateOnly
AddLoggingAddMonitoringConfigAddBinauthzEvaluationModeAddAdminGroupsForUpdate AddWorkloadVulnerabilityScanningattached_flagsAddAdminUsersForUpdateAddPlatformVersionAddProxyConfigr   
ASYNC_FLAGAddToParserdisplay_info	AddFormatr   ATTACHED_CLUSTERS_FORMAT)parsers    1lib/surface/container/attached/clusters/update.pyArgszUpdate.Args-   s    //D	%0	f%	 	&"9:	VT"	feT2	##F+	!!&)	**62))&1%%fu=!!&)OO'
!!)"D"DE    c                 z   t        j                  |      j                  }t        j                  |      5  t        j                  |      }t        j                         }t        j                  |j                  d      }t        j                  ||||t        j                        cddd       S # 1 sw Y   yxY w)zRuns the update command.Updating)action)resource_refresource_clientargsmessagekindN)r	   ParseAttachedClusterResourceArglocationsIdr   GkemulticloudEndpointOverrideapi_utilClustersClientr
   ClusterMessageattachedClustersIdr   r   ATTACHED_CLUSTER_KIND)selfr.   locationcluster_refcluster_clientr/   s         r&   Runz
Update.RunA   s    <<TBNNH		4	4X	>!AA$Gk..0n++

(
(g   "(.. 
?	>	>s   A2B11B:N)	__name__
__module____qualname____doc__	_EXAMPLESdetailed_helpstaticmethodr'   r=    r(   r&   r   r   &   s*     $y)-F F&r(   r   N)rA   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   r4   googlecloudsdk.callioper   -googlecloudsdk.command_lib.container.attachedr   r   r	   2googlecloudsdk.command_lib.container.gkemulticloudr
   r   r   rB   ReleaseTracksReleaseTrackALPHAGADefaultUniverseOnlyUpdateCommandr   rE   r(   r&   <module>rQ      s    - &  ' O ( Q G K H L D	 D%%++T->->-A-AB(T (  C(r(   