
    	                     (   S r SSKJr  SSKJr  SSKJr  SSK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 policies.    )absolute_import)division)unicode_literalsN)ClassVar)base_classes)client)base)flagsc                       \ rS rSr% Sr\\R                     \S'   \	S\
R                  4S j5       rS\
R                  4S jrSrg	)
Update   zUpdate a Compute Engine network policy.

*{command}* is used to update network policies. A network
policy is a set of rules that classifies network traffic.
NETWORK_POLICY_ARGparserc                     [         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
   NetworkPolicyArgumentr   AddArgumentAddArgsUpdateNetworkPolicy)clsr   s     .lib/surface/compute/network_policies/update.pyArgsUpdate.Args*   sC    "88C &&vh&G	$$V,    argsc                 H   [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " X2R                  S9nUR                  R                  R                  UR                  S9nUR                  US9$ )N)compute_client)description)network_policy)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkPolicymessagesr    r   )selfr   holderrefnetwork_policy_clientnew_network_policys         r   Run
Update.Run2   s    **4+<+<+>?F

!
!
3
3D:J:J
KC"00MM  //==$$ >  !''7I'JJr    N)__name__
__module____qualname____firstlineno____doc__r   compute_flagsResourceArgument__annotations__classmethodargparseArgumentParserr   	Namespacer-   __static_attributes__r/   r   r   r   r      sM     }==>>-// - -Kh(( Kr   r   EXAMPLESz    To update a network policy with name ``my-policy'',
    to change the description to ``New description'', run:

      $ {command} my-policy           --description='New description'           --region=my-region
    )r4   
__future__r   r   r   r9   typingr   googlecloudsdk.api_lib.computer   /googlecloudsdk.api_lib.compute.network_policiesr   googlecloudsdk.callioper	   "googlecloudsdk.command_lib.computer
   r5   3googlecloudsdk.command_lib.compute.network_policiesUniverseCompatibleReleaseTracksr#   ALPHAUpdateCommandr   detailed_helpr/   r   r   <module>rJ      s    - &  '   7 B ( E E D%%++,KT K - K@  	 r   