
                         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 Service Projects.    )absolute_import)division)unicode_literals)service_projects)utils)base)flagsz{description}z         To list all service projects attached to the host project
        `my-host-project`, run:

          $ {command} --project=my-host-project
        )DESCRIPTIONEXAMPLESz
  table(
    name.scope("serviceProjectAttachments"):label=ID,
    service_project,
    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 service projects.c                     t        j                  |        | j                  j                  t               | j                  j                  t        j                  dt        j                  j                               y Nz3apphub.projects.locations.serviceProjectAttachmentsrelease_track)r	   AddListServiceProjectFlagsdisplay_info	AddFormat_FORMAT
AddUriFuncapi_lib_utilsMakeGetUriFuncr   ReleaseTrackGAparsers    +lib/surface/apphub/service_projects/list.pyArgszListGA.Args3   sX    	$$V,
!!'*
""$$A++..	
    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ServiceProjectsClientr   r   r   CONCEPTSlocationParseListr#   r$   RelativeNameselfargsclientlocation_refs       r   Runz
ListGA.Run>   sf    ''d6G6G6J6JKF==))//1L;;jj..((*   r    N	__name__
__module____qualname____doc___DETAILED_HELPdetailed_helpstaticmethodr   r2    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.ArgsO   sX    	$$V,
!!'*
""$$A++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.RunZ   sf    ''d6G6G6M6MNF==))//1L;;jj..((*   r    Nr3   r;   r    r   r>   r>   I   r<   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>rH      s    ( &  ' B @ ( 3 # D%%(()T  *6 D%%++,    -r    