
    `                     b   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
dZdZ ej"                  ej$                  j&                         G d dej(                               Z ej"                  ej$                  j,                         G d dej(                               Zy)z4Command to list applicationsin the Project/Location.    )absolute_import)division)unicode_literals)utils)client)base)flagsz{description}zs         To list all applications in locations `us-east1`, run:

          $ {command} --location=us-east1
        )DESCRIPTIONEXAMPLESzw
  table(
    name.scope("applications"):label=ID,
    displayName,
    createTime.date(unit=1000, tz_default=UTC)
  )
c                   *    e Zd ZdZeZed        Zd Zy)ListGAList Apphub applications.c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y Nz&apphub.projects.locations.applicationsrelease_track)r	   AddListApplicationFlagsdisplay_info	AddFormat_FORMAT
AddUriFuncapi_lib_utilsMakeGetUriFuncr   ReleaseTrackGAparsers    'lib/surface/apphub/applications/list.pyArgszListGA.Args2   sX    	!!&)
!!'*
""$$4++..	
    c                    t        j                  t        j                  j                        }|j
                  j                  j                         }|j                  |j                  |j                  |j                               S zRun the list command.r   )limit	page_sizeparent)apisApplicationsClientr   r   r   CONCEPTSlocationParseListr#   r$   RelativeNameselfargsr   location_refs       r   Runz
ListGA.Run=   sf    $$43D3D3G3GHF==))//1L;;jj..((*   r    N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r1    r    r   r   r   ,   !    ! - r    r   c                   *    e Zd ZdZeZed        Zd Zy)	ListAlphar   c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y r   )r	   r   r   r   r   r   r   r   r   r   ALPHAr   s    r   r   zListAlpha.ArgsN   sX    	!!&)
!!'*
""$$4++11	
r    c                    t        j                  t        j                  j                        }|j
                  j                  j                         }|j                  |j                  |j                  |j                               S r"   )r&   r'   r   r   r?   r(   r)   r*   r+   r#   r$   r,   r-   s       r   r1   zListAlpha.RunY   sf    $$43D3D3J3JKF==))//1L;;jj..((*   r    Nr2   r:   r    r   r=   r=   H   r;   r    r=   N)r6   
__future__r   r   r   googlecloudsdk.api_lib.apphubr   r   *googlecloudsdk.api_lib.apphub.applicationsr   r&   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apphubr	   r7   r   ReleaseTracksr   r   ListCommandr   r?   r=   r:   r    r   <module>rH      s    ; &  ' @ E ( 3 # D%%(()T  *6 D%%++,    -r    