
    Q
                         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	Z G d
 dej                        Zy)z$Command to list Apigee applications.    )absolute_import)division)unicode_literals)apigee)base)defaults)resource_argsz/ANY/c                   .    e Zd ZdZddiZed        Zd Zy)ListzList Apigee applications.EXAMPLESa  
          To list all Apigee applications in the active Cloud Platform project,
          run:

              $ {command}

          To list all Apigee applications belonging to the developer
          ``horse@example.com'' in an Apigee organization called ``my-org'',
          formatted as JSON, run:

              $ {command} --developer=horse@example.com --organization=my-org --format=json
          c                     t        j                         t        j                  dt              g}t	        j
                  | ddd|       | j                  j                  d       y )N	developerzorganization.developerzApigee organization, and optionally developer, whose applications should be listed. If developer is not specified, all developers will be listed.

To get a list of valid developers, run:

    $ {grandparent_command} developers list

F)
positionalfallthroughsztable(appId, name))r   !GCPProductOrganizationFallthroughStaticFallthroughANY_DEVELOPERr	   AddSingleResourceArgumentdisplay_info	AddFormat)parserr   s     'lib/surface/apigee/applications/list.pyArgsz	List.Args2   sa     	224"";>L ++ 	:
 !	# !!"67    c                     |j                   j                  j                         j                         }|d   t        k(  r|d= t
        j                  j                  |      S )zRun the list command.developersId)CONCEPTSr   ParseAsDictr   r   ApplicationsClientr   )selfargsidentifierss      r   RunzList.RunD   sO    --))//188:K>"m3
n
%$$))+66r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r$    r   r   r   r      s/    ! -  8 8"7r   r   N)r(   
__future__r   r   r   googlecloudsdk.api_libr   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apigeer   r	   r   ListCommandr   r+   r   r   <module>r1      s8    + &  ' ) ( 6 ;
 *74 *7r   