
                         R   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mZ ddlZej"                   ej$                  ej&                  j(                  ej&                  j*                         G d dej,                                      Zddie_        y)zICommand for deleting organization firewall policy packet mirroring rules.    )absolute_import)division)unicode_literals)base_classes)firewall_policy_rule_utils)client)base)firewall_policies_utils)flagsNc                   *    e Zd ZdZdZed        Zd Zy)DeletezDeletes a Compute Engine organization firewall policy packet mirroring rule.

  *{command}* is used to delete organization firewall policy packet mirroring
  rules.
  Nc                     t        j                  dd      | _        | j                  j                  |       t        j                  |d       t        j
                  |d       |j                  j                  t         j                         y )NTdelete)required	operationdeleted)r   F)r   )	r   FirewallPolicyRuleArgumentFIREWALL_POLICY_ARGAddArgumentAddFirewallPolicyIdAddOrganizationdisplay_infoAddCacheUpdaterFirewallPoliciesCompleter)clsparsers     ?lib/surface/compute/firewall_policies/mirroring_rules/delete.pyArgszDelete.Args)   sj    #>>C ''/	f	:	&51
''(G(GH    c           	         t        j                  | j                               }| j                  j	                  ||j
                  d      }t        j                  ||j                  |j
                  t        j                  | j                               j                               }t        j                  ||j                  |j                        }|j                  t!        j"                  |j%                               |d      S )NF)with_project)refcompute_client	resourcesversion)organization)priorityfirewall_policy_idonly_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResourcer$   r   $OrgFirewallPolicyPacketMirroringRulesix	text_typelowerr
   GetFirewallPolicyIdfirewall_policyr&   
DeleteRule
rule_utilsConvertPriorityToIntName)selfargsholderr"   firewall_policy_rule_clientr(   s         r   Runz
Delete.Run3   s    **4+<+<+>?F

"
"
4
4fU 5 C #)"M"M}}""d//1288:	# 1DD#&&
 '1100<-# 2  r   )__name__
__module____qualname____doc__r   classmethodr   r;    r   r   r   r      s(     I Ir   r   EXAMPLESz    To delete a rule with priority ``10" in an organization firewall policy with
    ID ``123456789", run:

      $ {command} 10 --firewall-policy=123456789
    )r?   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   r4   0googlecloudsdk.api_lib.compute.firewall_policiesr   googlecloudsdk.callioper	   4googlecloudsdk.command_lib.compute.firewall_policiesr
   r   r.   UniverseCompatibleReleaseTracksr+   ALPHABETADeleteCommandr   detailed_helprA   r   r   <module>rN      s    P &  ' 7 S C ( X F 
 D%%++T->->-C-CD'T ' E 'V   r   