
    c                     n    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\R                  5      r
g	)
z#`gcloud app services list` command.    )absolute_import)division)unicode_literals)appengine_api_client)basec                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	List   ztList your existing services.

This command lists all services that are currently deployed to the App Engine
server.
EXAMPLESz`          To list all services in the current project, run:

            $ {command}

          c                 :    U R                   R                  S5        g )Nzu
          table(
            id:label=SERVICE:sort=1,
            versions.len():label=NUM_VERSIONS
          )
    )display_info	AddFormat)parsers     lib/surface/app/services/list.pyArgs	List.Args)   s    
!! # 	    c                 X   [         R                  " U R                  5       5      nUR                  5       nUR	                  U5      n/ nU HN  nU Vs/ s H   owR
                  UR                  :X  d  M  UPM"     nnUR                  UR                  US.5        MP     [        US S9$ s  snf )N)idversionsc                     U S   $ )Nr    )rs    r   <lambda>List.Run.<locals>.<lambda>=   s    $r   )key)	r   GetApiClientForTrackReleaseTrackListServicesListVersionsservicer   appendsorted)	selfargs
api_clientservicesr   resultr!   vversions_for_services	            r   RunList.Run2   s    %::4;L;L;NOJ&&(H&&x0HF)1MAYY'**5LaMmm)=
>@ 
 &/00	 Ns   B'2B'r   N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr   r+   __static_attributes__r   r   r   r	   r	      s1      - 	 	1r   r	   N)r1   
__future__r   r   r   googlecloudsdk.api_lib.appr   googlecloudsdk.callioper   ListCommandr	   r   r   r   <module>r9      s+    * &  ' ; ($14 $1r   