
                            d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ddlmZ dd	lmZ dd
lZe
j                   e
j                   e
j"                  j$                         G d de
j&                                      Zddde_        y
)zBCommand for replacing the rules of organization firewall policies.    )absolute_import)division)unicode_literals)base_classes)client)base)firewall_policies_utils)flagsNc                   *    e Zd ZdZdZed        Zd Zy)ForceStartProgressiveRolloutz5Starts a new rollout of organization firewall policy.Nc                     t        j                  dd      | _        | j                  j                  |d       t        j                  |       y )NTzstart a new rollout of)required	operationzforce-start-progressive-rollout)operation_type)r
   FirewallPolicyArgumentFIREWALL_POLICY_ARGAddArgument#AddArgsForceStartProgressiveRollout)clsparsers     Hlib/surface/compute/firewall_policies/force_start_progressive_rollout.pyArgsz!ForceStartProgressiveRollout.Args$   sL    #::!9C ''@ (  
--f5    c           	         t        j                  | j                               }| j                  j	                  ||j
                  d      }t        j                  ||j                  |j
                  t        j                  | j                               j                               }t        j                  ||j                         |j                        }|j                  |d      S )NF)with_project)refcompute_client	resourcesversion)organization)firewall_policyonly_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer   r   OrgFirewallPolicysix	text_typelowerr	   GetFirewallPolicyIdNamer    r   )selfargsholderr   org_firewall_policy
dest_fp_ids         r   Runz ForceStartProgressiveRollout.Run.   s    **4+<+<+>?F

"
"
4
4fU 5 C !22}}""d//1288:	 )<<SXXZd6G6GJ ;;"# <  r   )__name__
__module____qualname____doc__r   classmethodr   r1    r   r   r   r      s$     >6 6r   r   zz    To start a new rollout of an organization firewall policy with ID ``123456789", run:

      $ {command} 123456789
    aw      To start rollout of a firewall policy, the user must have the following
    permission:
    *`compute.firewallPolicies.update`,
    *`compute.firewallPolicies.use',
    *'compute.organizations.setFirewallPolicy'.

    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)r5   
__future__r   r   r   googlecloudsdk.api_lib.computer   0googlecloudsdk.api_lib.compute.firewall_policiesr   googlecloudsdk.callioper   4googlecloudsdk.command_lib.compute.firewall_policiesr	   r
   r'   DefaultUniverseOnlyReleaseTracksr$   ALPHAUpdateCommandr   detailed_helpr7   r   r   <module>rC      s    I &  ' 7 C ( X F 
 D%%++, 4#5#5   -  H
	
.  *r   