
                         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)zKCommand for describing 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)DescribezDescribes a Compute Engine organization firewall policy packet mirroring rule.

  *{command}* is used to describe organization firewall policy packet mirroring
  rules.
  Nc                     t        j                  dd      | _        | j                  j                  |       t        j                  |d       t        j
                  |d       y )NTdescribe)required	operationF)r   	described)r   )r   FirewallPolicyRuleArgumentFIREWALL_POLICY_ARGAddArgumentAddOrganizationAddFirewallPolicyId)clsparsers     Alib/surface/compute/firewall_policies/mirroring_rules/describe.pyArgszDescribe.Args)   sP    #>>C ''/	&51	f<    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#   DescribeRule
rule_utilsConvertPriorityToIntName)selfargsholderr   firewall_policy_rule_clientr%   s         r   RunzDescribe.Run2   s    **4+<+<+>?F

"
"
4
4fU 5 C #)"M"M}}""d//1288:	# 1DD#&&
 '3300<-# 4  r   )__name__
__module____qualname____doc__r   classmethodr   r8    r   r   r   r      s&     = =r   r   EXAMPLESz    To describe a packet mirroring 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   r1   0googlecloudsdk.api_lib.compute.firewall_policiesr   googlecloudsdk.callioper	   4googlecloudsdk.command_lib.compute.firewall_policiesr
   r   r+   UniverseCompatibleReleaseTracksr(   ALPHABETADescribeCommandr   detailed_helpr>   r   r   <module>rK      s    R &  ' 7 S C ( X F 
 D%%++T->->-C-CD&t## & E &T   r   