
                             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\R                  5      rSS0\l        g)z/Command for updating network firewall policies.    )absolute_import)division)unicode_literals)base_classes)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 a Compute Engine network firewall policy.

*{command}* is used to update network firewall policies. 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
   NetworkFirewallPolicyArgumentNETWORK_FIREWALL_POLICY_ARGAddArgument"AddArgsUpdateNetworkFirewallPolicy)clsparsers     7lib/surface/compute/network_firewall_policies/update.pyArgsUpdate.Args%   sA    &+&I&I'+C###//x/P	,,V4    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UR                  SS9S   nUR                  R                  R                  UR                  UR                  S9nUR!                  USS9$ )N)compute_clientregionF)only_generate_requestr   )descriptionfingerprint)firewall_policyr    )r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkFirewallPolicyhasattrr   RegionNetworkFirewallPolicyDescribemessagesFirewallPolicyr!   r"   r   )selfargsholderrefnetwork_firewall_policyexisting_firewall_policyr#   s          r   Run
Update.Run,   s    **4+<+<+>?F

*
*
<
< C %::MM+sH - I I
mm!-  7??#  @  %%& (mm,,;;$$,88 < :O #))'u * F Fr    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r4   __static_attributes__r6   r   r   r   r      s'     !%5 5Fr   r   EXAMPLESa      To update a global network firewall policy with name ``my-policy'',
    to change the description to ``New description'', run:

      $ {command} my-policy           --description='New description'           --global

    To update a regional network firewall policy with name ``my-policy'',
    in region ``my-region'',
    to change the description to ``New description'', run:

      $ {command} my-policy           --description='New description'           --region=my-region
    N)r;   
__future__r   r   r   googlecloudsdk.api_lib.computer   8googlecloudsdk.api_lib.compute.network_firewall_policiesr   r   googlecloudsdk.callioper	   <googlecloudsdk.command_lib.compute.network_firewall_policiesr
   UpdateCommandr   detailed_helpr6   r   r   <module>rF      sK    6 &  ' 7 K R ( N!FT !FJ 	 r   