
                         D   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  \R                   " \R"                  R$                  \R"                  R&                  \R"                  R(                  5       " S	 S
\R*                  5      5       rg)z"Command for updating target pools.    )absolute_import)division)unicode_literals)base_classes)base)
exceptions)flagsc                   6    \ rS rSrSrSrSr\S 5       rS r	Sr
g)Update   zUpdate a Compute Engine target pool.

*{command}* updates a Compute Engine target pool.

## EXAMPLES

To update the security policy run this:

  $ {command} TARGET_POOL --security-policy='my-policy'
Nc                     [         R                  " 5       U l        U R                  R                  USS9  [        R
                  " SS9U l        U R                  R                  U5        g )Nupdate)operation_typeztarget pool)resource)r	   TargetPoolArgumentTARGET_POOL_ARGAddArgumentsecurity_policy_flags/SecurityPolicyRegionalArgumentForTargetResourceSECURITY_POLICY_ARG)clsparsers     *lib/surface/compute/target_pools/update.pyArgsUpdate.Args0   s`    224C##F8#D	8	8	9"	$  ''/    c           	         [         R                  " U R                  5       5      nUR                  nU R                  R                  UUR                  [        R                  " U5      S9n[        USS 5      b  [        USS 5      (       a4  U R                  R                  XR                  5      R                  5       nOS nUR                  R                  UR                  UR                  5       UR                   UR                  R#                  US9S9nUR%                  UR&                  R(                  SU4/5      $ S/n[*        R,                  " US5      e)N)scope_listersecurity_policy)securityPolicy)project
targetPoolregionsecurityPolicyReferenceSetSecurityPolicyz--security-policyz.Please specify at least one property to update)r   ComputeApiHolderReleaseTrackclientr   ResolveAsResource	resourcescompute_flagsGetDefaultScopeListergetattrr   SelfLinkmessages*ComputeTargetPoolsSetSecurityPolicyRequestr!   Namer#   SecurityPolicyReferenceMakeRequestsapitools_clienttargetPoolsr   MinimumArgumentException)selfargsholderr(   target_pool_refsecurity_policy_refrequestparameter_namess           r   Run
Update.Run:   s[   **4+<+<+>?F]]F**<<"88@ = BO t&-9	($	/	/"66HH""$$,HJ 	 #JJ!))$))+ ''"(//"I"I0 #J #	 K g   6#9#9#E#E#6#A "B C C ++O

-
-IK Kr    )__name__
__module____qualname____firstlineno____doc__r   r   classmethodr   r>   __static_attributes__r@   r   r   r   r      s,    	 /0 0Kr   r   N)rE   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   r   "googlecloudsdk.command_lib.computer	   r+   4googlecloudsdk.command_lib.compute.security_policiesr   /googlecloudsdk.command_lib.compute.target_poolsReleaseTracksr'   ALPHABETAGAUpdateCommandr   r@   r   r   <module>rS      s    ) &  ' 7 ( . E$ A T..33T5F5F5I5I7KT 7K7Kr   