
    D	                         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
  \R                   " S S	\R                  5      5       rg
)zFCommand to list all Apigee organizations to which the user has access.    )absolute_import)division)unicode_literals)apigee)base)
propertiesc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
List   zCList Apigee organizations and their paired Cloud Platform projects.aG    {description}

  `{command}` lists all organizations to which the user's `gcloud auth`
  credentials have access, even if they don't match the active Cloud Platform
  project.

  Apigee organizations are distinct from Cloud Platform organizations, and
  usually have a one-to-one relationship with Cloud Platform projects.
  a!    To list all accessible organizations and their associated Cloud Platform projects, run:

      $ {command}

  To get a JSON array of all organizations whose Cloud Platform project names
  contain the word ``sandbox'', run:

      $ {command} --format=json --filter="project:(sandbox)"
  )DESCRIPTIONEXAMPLESc                 :    U R                   R                  S5        g )Nztable(name, project.flatten()))display_info	AddFormat)parsers    (lib/surface/apigee/organizations/list.pyArgs	List.Args5   s    
!!"BC    c              #   H  #    [         R                  R                  R                  R	                  5       (       a)  [        R
                  R                  [        U5      5      nO[        R
                  R                  5       nSU;   a  US    H  nUS   US   S.v   M     gg7f)zRun the list command.organizationsorganization
projectIds)nameprojectN)	r   VALUESapi_endpoint_overridesr   GetOrganizationsClientr
   varsListOrganizationsGlobal)selfargsresultr   s       r   RunList.Run9   s     //66::<<))..tDz:f))AACf&  1, 0#L1
 	
 2 !s   B B" N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r%   __static_attributes__r'   r   r   r
   r
      s1    K		-0 D D
r   r
   N)r,   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   googlecloudsdk.corer   UniverseCompatibleListCommandr
   r'   r   r   <module>r6      sD    M &  ' ) ( * *
4 *
 *
r   