
    q                         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  SSKr\R$                   " S S\R&                  5      5       rSSS.\l        g)z2Command for moving organization firewall policies.    )absolute_import)division)unicode_literalsN)base_classes)client)base)firewall_policies_utils)flags)logc                   2    \ rS rSrSrSr\S 5       rS rSr	g)Move   zMove a Compute Engine organization firewall policy.

*{command}* is used to move is used to move organization firewall policies to
new parent nodes.
Nc                     [         R                  " SSS9U l        U R                  R                  USS9  [         R                  " U5        g )NTmove)required	operation)operation_type)r
   FirewallPolicyArgumentFIREWALL_POLICY_ARGAddArgumentAddArgsMove)clsparsers     -lib/surface/compute/firewall_policies/move.pyArgs	Move.Args+   sA    #::)C''v'F	f    c           	         [         R                  " U R                  5       5      nU R                  R	                  XR
                  SS9n[        R                  " UUR                  UR
                  [        R                  " U R                  5       5      R                  5       S9nS nUR                  S5      (       a  SUR                  -   nUR                  S5      (       a  SUR                  -   nUc+  [        R                  " S5        [         R"                  " 5         [$        R&                  " XCR)                  5       UR                  S	9nUR+                  SXeS
9$ )NF)with_project)refcompute_client	resourcesversionorganizationzorganizations/folderzfolders/zIMust specify parent id with --organization=ORGANIZATION or--folder=FOLDER)r$   )only_generate_requestfp_id	parent_id)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer"   r   OrgFirewallPolicysix	text_typelowerIsSpecifiedr$   r%   r   errorsysexitr	   GetFirewallPolicyIdNamer   )selfargsholderr    org_firewall_policyr(   r'   s          r   RunMove.Run2   s+   **4+<+<+>?F

"
"
4
4U 5 4C 22}}""d//1288:	< I''"T%6%66i!!t{{*i	ii " #	hhj#77XXZd6G6GIE###5 $ G Gr    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r:   __static_attributes__r<   r   r   r   r      s'      Gr   r   z    To move an organization firewall policy under folder with ID ``123456789" to
    folder ``987654321", run:

      $ {command} 123456789 --folder=987654321
    a      To move a firewall policy, the user must have the following
    permission: *`compute.firewallPolicies.move`.

    To find predefined roles that contain those permissions, see the [Compute
    Engine IAM roles](https://cloud.google.com/compute/docs/access/iam).
    )EXAMPLESzIAM PERMISSIONS)rA   
__future__r   r   r   r2   googlecloudsdk.api_lib.computer   0googlecloudsdk.api_lib.compute.firewall_policiesr   googlecloudsdk.callioper   4googlecloudsdk.command_lib.compute.firewall_policiesr	   r
   googlecloudsdk.corer   r-   DefaultUniverseOnlyUpdateCommandr   detailed_helpr<   r   r   <module>rN      sh    9 &  ' 
 7 C ( X F # 
&G4 &G &GV	 r   