
    d                     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)z`Command to list Discovered Services that can be added to an application in the Project/Location.    )absolute_import)division)unicode_literals)discovered_services)utils)base)flagsz{description}z          To list DiscoveredServices that could be added to an application in
         location `us-east1`, run:

          $ {command} --location=us-east1
        )DESCRIPTIONEXAMPLESzi
  table(
    name.scope("discoveredServices"):label=ID,
    serviceReference,
    serviceProperties
  )
c                   *    e Zd ZdZeZed        Zd Zy)ListGA List Apphub discovered services.c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y Nz,apphub.projects.locations.discoveredServicesrelease_track)r	   AddListDiscoveredServiceFlagsdisplay_info	AddFormat_FORMAT
AddUriFuncapi_lib_utilsMakeGetUriFuncr   ReleaseTrackGAparsers    .lib/surface/apphub/discovered_services/list.pyArgszListGA.Args3   sX    	''/
!!'*
""$$:++..	
    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DiscoveredServicesClientr   r   r   CONCEPTSlocationParseListr#   r$   RelativeNameselfargsclientlocation_refs       r   Runz
ListGA.Run?   sf    **9J9J9M9MNF==))//1L;;jj..((*   r    N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r2    r    r   r   r   -   s!    ( -	 	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.ArgsP   sX    	''/
!!'*
""$$:++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   r2   zListAlpha.Run\   sk    **''--F ==))//1L;;jj..((*   r    Nr3   r;   r    r   r=   r=   J   s!    ( -	 	
r    r=   N)r7   
__future__r   r   r   googlecloudsdk.api_lib.apphubr   r&   r   r   googlecloudsdk.callioper   !googlecloudsdk.command_lib.apphubr	   r8   r   ReleaseTracksr   r   ListCommandr   r?   r=   r;   r    r   <module>rG      s    g &  ' E @ ( 3 # D%%(()T  *8 D%%++,    -r    