
    &                        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R                  \R                  R                  5       5      rS r\R                  " \R                  R                   5       " S	 S
\R"                  5      5       r\R                  " \R                  R&                  5       " S S\5      5       rg)z!The `app instances list` command.    )absolute_import)division)unicode_literals)appengine_api_client)basez%https://appengine.googleapis.com/{0}/c                 |     [         U R                  R                  -   $ ! [         a    [         U S   S   -   s $ f = f)Ninstancename)APPENGINE_PATH_STARTr	   r
   AttributeError)resources    !lib/surface/app/instances/list.py_GetUrir      sB    ?("3"3"8"888	 ?(:"6v">>>?s    ;;c                   6    \ rS rSrSrSS0r\S 5       rS rSr	g)	List%   BList the instances affiliated with the current App Engine project.EXAMPLESa+            To list all App Engine instances, run:

              $ {command}

          To list all App Engine instances for a given service, run:

              $ {command} -s myservice

          To list all App Engine instances for a given version, run:

              $ {command} -v v1
          c                     U R                  SSSS9  U R                  SSSS9  U R                  R                  S5        U R                  R                  [        5        U R                  R                  S 5        g 	Nz	--servicez-szAIf specified, only list instances belonging to the given service.)helpz	--versionz-vzAIf specified, only list instances belonging to the given version.a  
          table(
            service:sort=1,
            version:sort=2,
            id:sort=3,
            instance.vmStatus.yesno(no="N/A"),
            instance.vmLiveness,
            instance.vmDebugEnabled.yesno(yes="YES", no=""):label=DEBUG_MODE
          )
    add_argumentdisplay_info	AddFormat
AddUriFuncr   AddCacheUpdaterparsers    r   Args	List.Args9   s    
T3  5 T3  5 !! 	# 		 ""7+
''-    c                     [         R                  " U R                  5       5      nUR                  UR                  UR
                  5      $ Nr   GetApiClientForTrackReleaseTrackGetAllInstancesserviceversionselfargs
api_clients      r   RunList.RunO   6    %::4;L;L;NOJ%%dllDLLAAr"    N)
__name__
__module____qualname____firstlineno____doc__detailed_helpstaticmethodr    r/   __static_attributes__r2   r"   r   r   r   %   s0    J  -  . .*Br"   r   c                   .    \ rS rSrSr\S 5       rS rSrg)ListBetaT   r   c                     U R                  SSSS9  U R                  SSSS9  U R                  R                  S5        U R                  R                  [        5        U R                  R                  S 5        g r   r   r   s    r   r    ListBeta.ArgsX   s    
#  %
 #  %
 !! 	# 		 ""7+
''-r"   c                     [         R                  " U R                  5       5      nUR                  UR                  UR
                  5      $ r$   r%   r+   s      r   r/   ListBeta.Runq   r1   r"   r2   N)	r3   r4   r5   r6   r7   r9   r    r/   r:   r2   r"   r   r<   r<   T   s    J. .0Br"   r<   N)r7   
__future__r   r   r   googlecloudsdk.api_lib.appr   googlecloudsdk.callioper   formatAppengineApiClient
ApiVersionr   r   ReleaseTracksr'   GAListCommandr   BETAr<   r2   r"   r   <module>rL      s    ( &  ' ; (>EE++668: ? D%%(()+B4 +B *+B\ D%%**+Bt B ,Br"   