
    L                         S 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	Jr  SS	KJr  SS
KJr   " S S\R                   5      rSS0\l        g)z5Command for describing network firewall policy rules.    )absolute_import)division)unicode_literals)base_classes)firewall_policy_rule_utils)client)region_client)base)flagsc                   2    \ rS rSrSrSr\S 5       rS rSr	g)Describe   zyDescribes a Compute Engine network firewall policy rule.

*{command}* is used to describe network firewall policy rules.
Nc                     [         R                  " SSS9U l        U R                  R                  U5        [         R                  " USS9  g )NTdescribe)required	operation	described)r   )r   !NetworkFirewallPolicyRuleArgumentNETWORK_FIREWALL_POLICY_ARGAddArgumentAddRulePriority)clsparsers     ?lib/surface/compute/network_firewall_policies/rules/describe.pyArgsDescribe.Args%   s>    &+&M&M'-C###//7	&K8    c                    [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " X2R                  S9n[        US5      (       a  [        R                  " X2R                  S9nUR                  [        R                  " UR                  5      UR                  SS9$ )N)refcompute_clientregion)r    F)priorityfirewall_policyonly_generate_request)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   NetworkFirewallPolicyRulehasattrr	   RegionNetworkFirewallPolicyRuleDescribeRule
rule_utilsConvertPriorityToIntr"   r#   )selfargsholderr   #network_firewall_policy_rule_clients        r   RunDescribe.Run,   s    **4+<+<+>?F

*
*
<
< C*0*J*J+/'sH,9,Y,Y
mm--) /;;00?,,# < % %r    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r3   __static_attributes__r5   r   r   r   r      s&    
 !%9 9%r   r   EXAMPLESa      To describe a rule with priority ``10'' in a global network firewall policy
    with name ``my-policy'', run:

      $ {command} 10           --firewall-policy=my-policy --global-firewall-policy

    To describe a rule with priority ``10'' in a regional network firewall
    policy with name ``my-policy'', in region ``region-a'', run:

      $ {command} 10           --firewall-policy=my-policy --firewall-policy-region=region-a
    N)r:   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   r-   8googlecloudsdk.api_lib.compute.network_firewall_policiesr   r	   googlecloudsdk.callioper
   <googlecloudsdk.command_lib.compute.network_firewall_policiesr   DescribeCommandr   detailed_helpr5   r   r   <module>rE      sL    < &  ' 7 S K R ( N%t## %@ 	 r   