
    \
                        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	d
ZdZ ej                  ej                  j                         ej"                   G d dej$                                      Z ej                  ej                  j(                        ej"                   G d dej$                                      Zy)z)Command to list locations in the Project.    )absolute_import)division)unicode_literals)	locations)utils)basez{description}zK         To list all apphub locations, run:

          $ {command}
        )DESCRIPTIONEXAMPLESz3
  table(
    name.scope("locations"):label=ID
  )
c                   *    e Zd ZdZeZed        Zd Zy)ListGAList Apphub locations.c                     | j                   j                  t               | j                   j                  t	        j
                  dt        j                  j                               y Nzapphub.projects.locationsrelease_track)	display_info	AddFormat_FORMAT
AddUriFuncapi_lib_utilsMakeGetUriFuncr   ReleaseTrackGAparsers    $lib/surface/apphub/locations/list.pyArgszListGA.Args0   sJ    
!!'*
""$$'++..	
    c                     t        j                  t        j                  j                        }t        j                         }|j                  |j                  |j                  |j                               S zRun the list command.r   )limit	page_sizeparent)apisLocationsClientr   r   r   r   GetProjectRefListr!   r"   RelativeNameselfargsclientproject_refs       r   Runz
ListGA.Run:   s\    !!0A0A0D0DEF--/K;;jj..'')   r   N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r.    r   r   r   r   )   #      - r   r   c                   *    e Zd ZdZeZed        Zd Zy)	ListAlphar   c                     | j                   j                  t               | j                   j                  t	        j
                  dt        j                  j                               y r   )	r   r   r   r   r   r   r   r   ALPHAr   s    r   r   zListAlpha.ArgsL   sJ    
!!'*
""$$'++11	
r   c                     t        j                  t        j                  j                        }t        j                         }|j                  |j                  |j                  |j                               S r    )r$   r%   r   r   r<   r   r&   r'   r!   r"   r(   r)   s       r   r.   zListAlpha.RunV   s\    !!0A0A0G0GHF--/K;;jj..'')   r   Nr/   r7   r   r   r:   r:   E   r8   r   r:   N)r3   
__future__r   r   r   googlecloudsdk.api_lib.apphubr   r$   r   r   googlecloudsdk.callioper   r4   r   ReleaseTracksr   r   UniverseCompatibleListCommandr   r<   r:   r7   r   r   <module>rD      s    0 &  ' ; @ ( # D%%(()T   *4 D%%++,     -r   