
    ;m                        S r SSKJr  SSKJr  SSKJr  SSKrSSKrSSKJr  SSK	J
r
  SSKJr  Sr\R                  " S	\R                  5      rS
rSrSrSr " S S\R*                  5      r " S S\R.                  5      r   S!S jrS"S jrS"S jr\R8                  4S jrS rS rS r S r!S r"S r#S r$S r%S r&S r'S  r(g)#z0Common classes and functions for firewall rules.    )absolute_import)division)unicode_literalsN)
exceptions)arg_parserszPROTOCOL[:PORT[-PORT]]z

    (?P<protocol>[a-zA-Z0-9+.-]+) # The protocol group.

    (:(?P<ports>\d+(-\d+)?))?     # The optional ports group.
                                  # May specify a range.

    $                             # End of input marker.
    z  table(
    type,
    firewall_policy_name,
    firewall_policy_priority,
    priority,
    action,
    direction,
    disabled,
    ip_ranges.list():label=IP_RANGES
  )z  table(
    type,
    security_policy_name,
    priority,
    action,
    preview,
    expression,
    src_ip_ranges.list():label=SRC_IP_RANGES
  )zTo show all fields of the firewall, please show in JSON format: --format=json
To show more fields in table format, please see the examples in --help.
zTo show all fields of the security policy, please show in JSON format: --format=json
To show more fields in table format, please see the examples in --help.
c                       \ rS rSrSrSrg)ArgumentValidationErrorG   zERaised when a user specifies --rules and --allow parameters together. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       5lib/googlecloudsdk/api_lib/compute/firewalls_utils.pyr	   r	   G   s    Mr   r	   c                        \ rS rSrSrSrSrSrg)
ActionTypeK   zFirewall Action type.      r   N)r   r   r   r   r   ALLOWDENYr   r   r   r   r   r   K   s    
%	
$r   r   c           	         U(       a  SOSnU(       d6  U R                  SSSS9  U R                  S[        R                  " 5       SS	S
9  U nU(       a  U R                  U(       + S9nUR                  S[        [        R
                  " US9U(       + =(       a    U(       + SU(       a  SOS-   S9  U R                  SSR                  U(       a  SOS5      S9  SnU(       a  US-  nOUS-  nU R                  SU(       a  SO/ S[        R
                  " US9US9  SnU(       a  US-  nU(       a  US-  nU R                  S U(       a  SO/ S![        R
                  " US9US9  S"nU(       a  S#nU(       a  US$-  nU R                  S%U(       a  SO/ S![        R
                  " US9US9  S&n	U(       d  U	S'-  n	U R                  S(S)SU	S*9  U(       a  [        XU5        gg)+z@Adds common arguments for firewall create or update subcommands.r   r   z	--networkdefaultz        The network to which this rule is attached. If omitted, the
        rule is attached to the ``default'' network.
        )r   helpz--resource-manager-tagsz	KEY=VALUEz^            A comma-separated list of Resource Manager tags to apply to the firewall.
        )typemetavarr   )requiredz--allow
min_lengthaV        A list of protocols and ports whose traffic will be allowed.

      The protocols allowed over this connection. This can be the
      (case-sensitive) string values `tcp`, `udp`, `icmp`, `esp`, `ah`, `sctp`,
      or any IP protocol number. An IP-based protocol must be specified for each
      rule. The rule applies only to specified protocol.

      For port-based protocols - `tcp`, `udp`, and `sctp` - a list of
      destination ports or port ranges to which the rule applies may optionally
      be specified. If no port or port range is specified, the rule applies to
      all destination ports.

      The ICMP protocol is supported, but there is no support for configuring
      ICMP packet filtering by ICMP code.

      For example, to create a rule that allows TCP traffic through port 80 and
      ICMP traffic:

        $ {command} MY-RULE --allow tcp:80,icmp

      To create a rule that allows TCP traffic from port 20000 to 25000:

        $ {command} MY-RULE --allow tcp:20000-25000

      To create a rule that allows all TCP traffic:

        $ {command} MY-RULE --allow tcp

      <
      Setting this will override the current values.
       )r   r   r    r   z--descriptionz/A textual description for the firewall rule.{0}z* Set to an empty string to clear existing.)r   a        A list of IP address blocks that are allowed to make inbound
      connections that match the firewall rule to the instances on
      the network. The IP address blocks must be specified in CIDR
      format:
      link:http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing[].

      If neither --source-ranges nor --source-tags are specified,
      --source-ranges defaults to `0.0.0.0/0`, which means that the rule applies
      to all incoming IPv4 connections from inside or outside the network. If
      both --source-ranges and --source-tags are specified, the rule matches if
      either the range of the source matches  --source-ranges or the tag of the
      source matches --source-tags.
      z
      Setting this will override the existing source ranges for the firewall.
      The following will clear the existing source ranges:

        $ {command} MY-RULE --source-ranges
      z`
      Multiple IP address blocks can be specified if they are separated by
      commas.
      z--source-rangesN
CIDR_RANGEr   r   r   r   a        A list of instance tags indicating the set of instances on the network to
      which the rule applies if all other fields match.  If neither
      --source-ranges nor --source-tags are specified, --source-ranges
      defaults to `0.0.0.0/0`, which means that the rule applies to all
      incoming IPv4 connections from inside or outside the network.

      If both --source-ranges and --source-tags are specified, an inbound
      connection is allowed if either the range of the source matches
      --source-ranges or the tag of the source matches --source-tags.

      Tags can be assigned to instances during instance creation.
      zx
      If source tags are specified then neither a source nor target service
      account can also be specified.
      z
      Setting this will override the existing source tags for the firewall.
      The following will clear the existing source tags:

        $ {command} MY-RULE --source-tags
      z--source-tagsTAGa1        A list of instance tags indicating which instances the rule is applied to.
      If the field is set, the rule applies to only instances with a matching
      tag. If omitted, the rule applies to all instances in the network.

      Tags can be assigned to instances during instance creation.
      a  
      List of instance tags indicating the set of instances on the
      network which may accept connections that match the
      firewall rule.
      Note that tags can be assigned to instances during instance creation.

      If target tags are specified, then neither a source nor target
      service account can also be specified.

      If both target tags and target service account
      are omitted, all instances on the network can receive
      connections that match the rule.
      z
      Setting this will override the existing target tags for the firewall.
      The following will clear the existing target tags:

        $ {command} MY-RULE --target-tags
      z--target-tagsa        Disable a firewall rule and stop it from being enforced in the network.
      If a firewall rule is disabled, the associated network behaves as if the
      rule did not exist. To enable a disabled rule, use:

       $ {parent_command} update MY-RULE --no-disabled

      z&Firewall rules are enabled by default.z
--disabled
store_true)actionr   r   )add_argumentr   ArgDictadd_mutually_exclusive_groupALLOWED_METAVARArgListformatAddArgsForEgress)
parser
for_updatewith_egress_supportwith_service_accountr"   ruleset_parsersource_ranges_helpsource_tags_helptarget_tags_helpdisabled_helps
             r   AddCommonArgsr:   Q   sg    qA*	
   !  "	   .88 9 !N*5=)<%<
> 
?!  $"L 	<CC:D
6"N  O

  
 
  
 
 	 db*5  
  
 
  
 
 	 db*5  
 
  
 
 	 db*5  
- 
AAM<M  K VZ8 r   c           	         U(       a  SOSnU(       d  UR                  SSS/S SS9  S	nU(       a  US
-  nOUS-  nU R                  S[        [        R                  " US9USS9  U(       d  U R                  S/ SQS SS9  U R                  S[        SS9  SnU(       a  US-  nOUS-  nU R                  SU(       a  SO/ S[        R                  " US9US9  g)z@Adds arguments for egress firewall create or update subcommands.r   r   z--actionr   r   c                 "    U R                  5       $ Nupperxs    r   <lambda>"AddArgsForEgress.<locals>.<lambda>  
    qwwyr   z        The action for the firewall rule: whether to allow or deny matching
        traffic. If specified, the flag `--rules` must also be specified.
        )choicesr   r   a        A list of protocols and ports to which the firewall rule will apply.

      PROTOCOL is the IP protocol whose traffic will be checked.
      PROTOCOL can be either the name of a well-known protocol
      (e.g., tcp or icmp) or the IP protocol number.
      A list of IP protocols can be found at
      http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml

      A port or port range can be specified after PROTOCOL to which the
      firewall rule apply on traffic through specific ports. If no port
      or port range is specified, connections through all ranges are applied.
      TCP and UDP rules must include a port or port range.
      r#   z
      If specified, the flag --action must also be specified.

      For example, the following will create a rule that blocks TCP
      traffic through port 80 and ICMP traffic:

        $ {command} MY-RULE --action deny --rules tcp:80,icmp
      z--rulesr!   F)r   r   r   r    z--direction)INGRESSEGRESSINOUTc                 "    U R                  5       $ r=   r>   r@   s    r   rB   rC   C  rD   r   a6          If direction is NOT specified, then default is to apply on incoming
        traffic. For outbound traffic, it is NOT supported to specify
        source-tags.

        For convenience, 'IN' can be used to represent ingress direction and
        'OUT' can be used to represent egress direction.
        z
--prioritya;        This is an integer between 0 and 65535, both inclusive. When NOT
      specified, the value assumed is 1000. Relative priority determines
      precedence of conflicting rules: lower priority values imply higher
      precedence. DENY rules take precedence over ALLOW rules having equal
      priority.
      )r   r   a        The firewall rule will apply to traffic that has destination IP address
      in these IP address block list. The IP address blocks must be specified
      in CIDR format:
      link:http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing[].
      z
      Setting this will override the existing destination ranges for the
      firewall. The following will clear the existing destination ranges:

        $ {command} MY-RULE --destination-ranges
      z
      If --destination-ranges is NOT provided, then this
      flag will default to 0.0.0.0/0, allowing all IPv4 destinations. Multiple
      IP address blocks can be specified if they are separated by commas.
      z--destination-rangesNr%   r&   )r*   r-   r   r.   int)r1   r5   r2   r"   
rules_helpdestination_ranges_helps         r   r0   r0     s7   qA*	&! 	   
*  
 
J  
 
J 	*5   

2 	   	
  	
   
 
   
 

 	 db*5"  $r   c           	      
   U(       a  SOSnSnU(       a  US-  nU R                  SU(       a  SO/ S[        R                  " US9US	9  S
nU(       a  US-  nU R                  SU(       a  SO/ S[        R                  " US9US	9  g)z@Adds arguments for secure firewall create or update subcommands.r   r   a	        The email of a service account indicating the set of instances on the
      network which match a traffic source in the firewall rule.

      If a source service account is specified then neither source tags nor
      target tags can also be specified.
      z
      Setting this will override the existing source service accounts for the
      firewall.
      The following will clear the existing source service accounts:

        $ {command} MY-RULE --source-service-accounts
      z--source-service-accountsNEMAILr!   r&   af        The email of a service account indicating the set of instances to which
      firewall rules apply. If both target tags and target service account are
      omitted,  the firewall rule is applied to all instances on the network.

      If a target service account is specified then neither source tag nor
      target tags can also be specified.
      z
      Setting this will override the existing target service accounts for the
      firewall.
      The following will clear the existing target service accounts:

        $ {command} MY-RULE --target-service-accounts
      z--target-service-accounts)r*   r   r.   )r1   r2   r"   source_service_accounts_helptarget_service_accounts_helps        r   AddArgsForServiceAccountrR   s  s    qA*"
   %
 
  	! db*5'  )"
   %
 
  	! db*5'  )r   c                     / nU =(       d    /  H  n[         R                  U5      nU(       d*  [        R                  " SR	                  [
        U5      5      eUR                  S5      (       a  UR                  S5      /nO/ nU[        R                  :X  a*  UR                  R                  UR                  S5      US9nO)UR                  R                  UR                  S5      US9nUR                  U5        M     U$ )zCParses protocol:port mappings from --allow or --rules command line.z7Firewall rules must be of the form {0}; received [{1}].portsprotocol)
IPProtocolrT   )LEGAL_SPECSmatchcompute_exceptionsArgumentErrorr/   r-   groupr   r   FirewallAllowedValueListEntryDeniedValueListEntryappend)rulesmessage_classesr)   rule_value_listspecrX   rT   rules           r   
ParseRulesre     s    /krkdd#E,,
C
J
Jt%& & {{7{{7#$ee!!!%%;;[[,E < ;d %%::[[,E ; ;d4 # $ 
r   c                    U Vs/ s H>  o"R                   U R                  R                  R                  R                  :X  d  M<  UPM@     nnUR                  S SS9  U Vs/ s H>  o"R                   U R                  R                  R                  R                  :X  d  M<  UPM@     nnUR                  S SS9  X4-   $ s  snf s  snf )z:Sort the network firewall rules by direction and priority.c                     U R                   $ r=   priorityr@   s    r   rB   *SortNetworkFirewallRules.<locals>.<lambda>      ajjr   Fkeyreversec                     U R                   $ r=   rh   r@   s    r   rB   rj     s    QZZr   )	directionmessagesr\   DirectionValueValuesEnumrF   sortrG   )clientr`   itemingress_network_firewallegress_network_firewalls        r   SortNetworkFirewallRulesrx     s     too77??!@du   $8%Htoo77>>!?du   #7G	!	;;
   ;B=B=!;C Cc                    / / / pCnU H  n[        USS5      nUc  UR                  U5        M&  UU R                  R                  R                  R
                  :X  a  UR                  U5        Mg  UU R                  R                  R                  R                  :X  d  M  UR                  U5        M     X#U4 H  nUR                  S SS9  M     X#-   U-   $ )zHSort the organization firewall rules by optional direction and priority.rp   Nc                     U R                   $ r=   rh   r@   s    r   rB   &SortOrgFirewallRules.<locals>.<lambda>  s    r   Frl   )getattrr_   rq   SecurityPolicyRulerr   rF   rG   rs   )rt   r`   ingress_ruleegress_rulecloud_armor_ruleru   rp   	rule_lists           r   SortOrgFirewallRulesr     s    02B-,dk40Id#??--FFNN	O $??--FFMM	N   !/?@iNN+UN; A		#&6	66r   c                    U Vs/ s H>  o"R                   U R                  R                  R                  R                  :X  d  M<  UPM@     nnUR                  S SS9  U Vs/ s H>  o"R                   U R                  R                  R                  R                  :X  d  M<  UPM@     nnUR                  S SS9  X4-   $ s  snf s  snf )z?Sort the organization firewall rules by direction and priority.c                     U R                   $ r=   rh   r@   s    r   rB   )SortFirewallPolicyRules.<locals>.<lambda>  s    qzzr   Frl   c                     U R                   $ r=   rh   r@   s    r   rB   r     rk   r   )rp   rq   FirewallPolicyRulerr   rF   rs   rG   )rt   r`   ru   ingress_org_firewall_ruleegress_org_firewall_rules        r   SortFirewallPolicyRulesr     s     too((AAII!Jdu     %95 Itoo((AAHH!Idu   $8%H	"	==
ry   c                    UU R                   R                  R                  R                  :X  d\  UU R                   R                  R                  R                  :X  d.  UU R                   R
                  R                  R                  :X  a  gUU R                   R                  R                  R                  :X  d\  UU R                   R                  R                  R                  :X  d.  UU R                   R
                  R                  R                  :X  a  gUU R                   R                  R                  R                  :X  d.  UU R                   R
                  R                  R                  :X  a  gUU R                   R                  R                  R                  :X  d\  UU R                   R                  R                  R                  :X  d.  UU R                   R
                  R                  R                  :X  a  gUU R                   R                  R                  R                  :X  d.  UU R                   R
                  R                  R                  :X  a  gg)zDefines Firewall evaluation order.

Args:
  client: API client.
  fp_type: Firewall Policy type.

Returns:
  int representing type ordering
r   r   r         )rq   <NetworksGetEffectiveFirewallsResponseEffectiveFirewallPolicyTypeValueValuesEnum	HIERARCHY=InstancesGetEffectiveFirewallsResponseEffectiveFirewallPolicyQRegionNetworkFirewallPoliciesGetEffectiveFirewallsResponseEffectiveFirewallPolicySYSTEMSYSTEM_GLOBALSYSTEM_REGIONALNETWORKNETWORK_REGIONAL)rt   fp_types     r   _FirewallPolicyTypeOrderr     s    		U	U	i	i	s	st			V	V	j	j	t	t
u			j	j	~	~  
I  
I
I 		U	U	i	i	p	pq			V	V	j	j	x	x
y			j	j	~	~  
M  
M
M 		V	V	j	j	z	z{			j	j	~	~  
O  
O
O 		U	U	i	i	q	qr			V	V	j	j	r	r
s			j	j	~	~  
G  
G
G 		V	V	j	j	{	{|			j	j	~	~  
P  
P
P 	r   c                     ^  [        UU 4S jS9$ )z1Sort Firewall Policies in their evaluation order.c                 h   > [        TU R                  5      U R                  c  S4$ U R                  4$ )Nr   )r   r   ri   )fprt   s    r   rB   &SortFirewallPolicies.<locals>.<lambda>*  s.    
"6277
3{{"!(*r   )rm   )sorted)rt   fpss   ` r   SortFirewallPoliciesr   &  s    		
 r   c                    / nUR                    H3  n[        XU5      nUR                  SS05        UR                  U5        M5     UR                   H3  n[        XU5      nUR                  SS05        UR                  U5        M5     U$ )zGConvert organization firewall policy rules to effective firewall rules.	rule_typeFIREWALL_RULEPACKET_MIRRORING_RULE)r`   ConvertFirewallPolicyRuleupdater_   packetMirroringRules)rt   firewall_policyresultrd   ru   s        r   ,ConvertFirewallPolicyRulesToEffectiveFwRulesr   1  s    &##d$VdCDKKo./
MM$ $
 22d$VdCDKK567
MM$ 3
 
-r   c                 2
   0 nUR                   U R                  R                  R                  R                  :X  dp  UR                   U R                  R
                  R                  R                  :X  d8  UR                   U R                  R                  R                  R                  :X  a  UR                  SS05        GOUR                   U R                  R                  R                  R                  :X  dp  UR                   U R                  R
                  R                  R                  :X  d8  UR                   U R                  R                  R                  R                  :X  a  UR                  SS05        GOUR                   U R                  R
                  R                  R                  :X  d8  UR                   U R                  R                  R                  R                  :X  a  UR                  SS05        GOSUR                   U R                  R                  R                  R                  :X  dp  UR                   U R                  R
                  R                  R                  :X  d8  UR                   U R                  R                  R                  R                  :X  a  UR                  SS05        OUR                   U R                  R
                  R                  R                  :X  d8  UR                   U R                  R                  R                  R                  :X  a  UR                  SS05        OUR                  SS05        UR                  SUR                  05        UR                  S	UR                  05        UR                  S
UR                  05        UR                  SUR                  05        UR                  SUR                   05        UR                  SUR"                  R%                  5       05        UR                  S['        UR(                  5      05        UR*                  R,                  (       a'  UR                  SUR*                  R,                  05        UR*                  R.                  (       a'  UR                  SUR*                  R.                  05        UR0                  (       a  UR                  SUR0                  05        UR2                  (       a  UR                  SUR2                  05        U$ )z/Convert rule to effective firewall rule output.r   org-firewallznetwork-firewall-policyz network-regional-firewall-policyzsystem-network-firewall-policyz'system-network-regional-firewall-policyunknownfirewall_policy_prioritydescriptionfirewall_policy_nameri   rp   r)   disabled	ip_rangestarget_svc_accttarget_resources)r   rq   r   r   r   r   r   r   r   r   r   r   r   ri   r   namerp   r)   r?   boolr   rX   srcIpRangesdestIpRangestargetServiceAccountstargetResources)rt   r   rd   ru   s       r   r   r   A  s   	$		U	U	i	i	s	st					V	V	j	j	t	t
u					j	j	~	~  
I  
I
I 	KK()		U	U	i	i	q	qr					V	V	j	j	r	r
s					j	j	~	~  
G  
G
G 	KK234		V	V	j	j	{	{|					j	j	~	~  
P  
P
P 	KK;<=		U	U	i	i	p	pq					V	V	j	j	x	x
y					j	j	~	~  
M  
M
M 	KK9:;		V	V	j	j	z	z{					j	j	~	~  
O  
O
O 	KKBCDKK#$++)?+C+CDE++}d../0++%';';<=++z4==)*++{DNN+,++x**,-.++z4./0	ZZKKdjj4456	ZZKKdjj5567	KK"D$>$>?@	KK#T%9%9:;	+r   c                    / nU R                    GH  n0 nUR                  SS05        UR                  SUR                  05        UR                  SU R                  05        UR                  SUR                  05        UR                  SUR
                  05        UR                  SUR                  R                  5       05        UR                  SS	05        UR                  R                  R                  (       a1  UR                  S
UR                  R                  R                  05        UR                  R                  R                  (       a1  UR                  S
UR                  R                  R                  05        UR                  (       a  UR                  SUR                  05        UR                  (       a  UR                  SUR                  05        UR                  U5        GM     U$ )zGConvert organization security policy rules to effective firewall rules.r   r   r   r   ri   rp   r)   r   Falser   r   r   )r`   r   r   idri   rp   r)   r?   rX   configr   r   r   r   r_   security_policyr   rd   ru   s       r   /ConvertOrgSecurityPolicyRulesToEffectiveFwRulesr     sr   &##dDKK()KK 0 012KK'););<=KKT]]+,KKdnn-.KK4;;,,./0KKW%&zz$$
kk;

 1 1 = =>?zz%%
kk;

 1 1 > >?@!!
kk$d&@&@AB
kk%t';';<=
MM$# $$ 
-r   c                 \   / nU  GH"  n0 nUR                  SS05        UR                  SUR                  05        UR                  SUR                  05        UR                  SUR                  05        UR                  (       a  UR                  SS05        OUR                  SS05        UR
                  (       a  UR                  S	UR
                  05        UR                  (       a  UR                  S	UR                  05        UR                  (       a  UR                  S
UR                  05        UR                  (       a  UR                  SUR                  05        UR                  (       a  UR                  SUR                  05        UR                  (       a  UR                  SUR                  05        UR                  (       a  UR                  SS05        OUR                  SS05        UR                  SUR                  05        UR                  U5        GM%     U$ )z;Convert network firewall rules to effective firewall rules.r   znetwork-firewallr   ri   rp   r)   r   r   r   r   target_tagssrc_tagssrc_svc_acctr   TFr   )r   r   ri   rp   allowedsourceRangesdestinationRangesr   
targetTags
sourceTagssourceServiceAccountsr   r   r_   )network_firewallsr   rd   ru   s       r   -ConvertNetworkFirewallRulesToEffectiveFwRulesr     s   &dDKK+,-KK 0 012KKT]]+,KKdnn-.||
kk8W%&
kk8V$%
kk; 1 123
kk; 6 678!!
kk$d&@&@AB
kk=$//23
kk:t/0!!
kk>4??34}}
kk:t$%
kk:u%&KK#$
MM$7  8 
-r   c                    / nU R                    GH  n0 nUR                  SS05        UR                  SUR                  05        UR                  SU R                  05        UR                  SUR                  05        UR                  SUR
                  R                  5       05        UR                  SUR                  05        UR                  R                  (       aV  UR                  R                  R                  (       a1  UR                  SUR                  R                  R                  05        UR                  R                  (       aV  UR                  R                  R                  (       a1  UR                  S	UR                  R                  R                  05        UR                  U5        GM     U$ )
zEConvert org security policy rules to effective security policy rules.r   zorg-security-policyr   security_policy_nameri   r)   preview
expressionsrc_ip_ranges)r`   r   r   	shortNameri   r)   r?   r   rX   exprr   r   r   r_   r   s       r   /ConvertOrgSecurityPolicyRulesToEffectiveSpRulesr     s2   &##dDKK./0KK 0 012KK')B)BCDKKT]]+,KK4;;,,./0KKDLL)*zz4::??55
kk<!;!;<=zzTZZ..::
kk?DJJ$5$5$A$ABC
MM$ $ 
-r   c                    / nU R                    GH  n0 nUR                  SS05        UR                  SUR                  05        UR                  SU R                  05        UR                  SUR                  05        UR                  SUR
                  R                  5       05        UR                  SUR                  05        UR                  R                  (       aV  UR                  R                  R                  (       a1  UR                  SUR                  R                  R                  05        UR                  R                  (       aV  UR                  R                  R                  (       a1  UR                  S	UR                  R                  R                  05        UR                  U5        GM     U$ )
zAConvert security policy rules to effective security policy rules.r   zsecurity-policyr   r   ri   r)   r   r   r   )r`   r   r   r   ri   r)   r?   r   rX   r   r   r   r   r_   r   s       r   ,ConvertSecurityPolicyRulesToEffectiveSpRulesr     s2   &##dDKK*+,KK 0 012KK')=)=>?KKT]]+,KK4;;,,./0KKDLL)*zz4::??55
kk<!;!;<=zzTZZ..::
kk?DJJ$5$5$A$ABC
MM$ $ 
-r   )FFF)F))r   
__future__r   r   r   enumregooglecloudsdk.api_lib.computer   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computerY   r-   compileVERBOSErW   EFFECTIVE_FIREWALL_LIST_FORMAT%EFFECTIVE_SECURITY_POLICY_LIST_FORMATLIST_NOTICELIST_NOTICE_SECURITY_POLICYErrorr	   Enumr   r:   r0   rR   r   re   rx   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s    7 &  '  	 5 / O*jj 
	
" 	) % Nj.. N  #&+',z9zb$J.)b /9.>.> 0<7,>3l =@0D&r   