
    H
                         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 ej                   G d
 dej                               Zddde_        y)z3Command for listing organization firewall policies.    )absolute_import)division)unicode_literals)
list_pager)base_classes)lister)base)flagsc                   &    e Zd ZdZed        Zd Zy)ListzList Compute Engine organization firewall policies.

  *{command}* is used to list organization firewall policies. An organization
  firewall policy is a set of rules that controls access to various resources.
  c                     t        j                  |       |j                  j                  t         j                         t        j                  |       |j                  j                  t         j                         y )N)	r
   AddArgsListFirewallPolicydisplay_info	AddFormatDEFAULT_LIST_FORMATr   AddBaseListerArgsAddCacheUpdaterFirewallPoliciesCompleter)clsparsers     -lib/surface/compute/firewall_policies/list.pyArgsz	List.Args$   sR    	##F+
!!%";";<
V$
''(G(GH    c                 z   t        j                  | j                               }|j                  j                  }|j
                  }|j                  rd|j                  z   }n|j                  rd|j                  z   }|j                        }t        j                  |j                  |d|j                  d       S )Nzorganizations/zfolders/)parentIditems)fieldlimit
batch_size)r   ComputeApiHolderReleaseTrackclientapitools_clientMESSAGES_MODULEorganizationfolder"ComputeFirewallPoliciesListRequestr   YieldFromListfirewallPoliciesr   )selfargsholderr"   messages	parent_idrequests          r   RunzList.Run+   s    **4+<+<+>?F]]**F%%H"T%6%66i	t{{*i9999MG##jj r   N)__name__
__module____qualname____doc__classmethodr   r0    r   r   r   r      s"     I Ir   r   z    To list organization firewall policies under folder with ID
    ``123456789", run:

      $ {command} --folder=123456789
    a      To list firewall policies, the user must have the following
    permission: *`compute.firewallPolicies.list`.

    To find predefined roles that contain those permissions, see the [Compute
    Engine IAM roles](https://cloud.google.com/compute/docs/access/iam).
    )EXAMPLESzIAM PERMISSIONSN)r4   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper	   4googlecloudsdk.command_lib.compute.firewall_policiesr
   DefaultUniverseOnlyListCommandr   detailed_helpr6   r   r   <module>r@      s^    : &  ' ' 7 1 ( F 4  D	 r   