
                             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&                  5       " S S\R(                  5      5       5       rSS0\l        g)z:Command for updating network firewall policy associations.    )absolute_import)division)unicode_literals)base_classes)!firewall_policy_association_utils)client)region_client)base)flagsc                   2    \ rS rSrSrSr\S 5       rS rSr	g)Update   zUpdate association between a firewall policy and a network.

*{command}* is used to update network firewall policy associations. A
network firewall policy is a set of rules that controls access to various
resources.
Nc                     [         R                  " SSS9U l        U R                  R                  USS9  [         R                  " U5        g )NTupdate)required	operation)operation_type)r   (NetworkFirewallPolicyAssociationArgumentNETWORK_FIREWALL_POLICY_ARGAddArgumentAddArgsUpdateAssociation)clsparsers     Dlib/surface/compute/network_firewall_policies/associations/update.pyArgsUpdate.Args)   sH     	66X	
 #
 ##//x/P	""6*    c                     [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " X2R                  S9n[        US5      (       a  [        R                  " X2R                  S9n[        R                  " UR                  5      nUR                  R                  R                  UR                   US9nUR#                  UUR$                  SS9$ )N)compute_clientregion)namepriorityF)associationfirewall_policyonly_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkFirewallPolicyhasattrr	   RegionNetworkFirewallPolicyassociation_utilsConvertPriorityToIntr"   messagesFirewallPolicyAssociationr!   PatchAssociationr$   )selfargsholderrefnetwork_firewall_policyr"   r#   s          r   Run
Update.Run3   s    **4+<+<+>?F

*
*
<
<C %::MM sH - I I
mm! !55dmmDH--((BBYY C K #33,,# 4  r    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r7   __static_attributes__r9   r   r   r   r      s&     !%+ +r   r   EXAMPLESa.    To update priority of association named ``my-association'' on network
  firewall policy with name ``my-policy'' in region ``region-a'', run:

    $ {command}
        --firewall-policy=my-policy
        --name=my-association
        --firewall-policy-region=region-a
        --priority=new-priority
  N)r>   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   r-   8googlecloudsdk.api_lib.compute.network_firewall_policiesr   r	   googlecloudsdk.callioper
   <googlecloudsdk.command_lib.compute.network_firewall_policiesr   HiddenReleaseTracksr'   ALPHAUpdateCommandr   detailed_helpr9   r   r   <module>rL      s    A &  ' 7 a K R ( N D%%++,,T , - ,`  	 r   