
    p                         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  G d	 d
ej                        Zy)z>A command that lists the resource collections for a given API.    )absolute_import)division)unicode_literals)base)
exceptions)flags)registryc                   &    e Zd ZdZed        Zd Zy)Listz)List the resource collections for an API.c                 8   t         j                  j                  |        t         j                  j                  |        | j	                  dt
        j                  d       t
        j                  j                  |        | j                  j                  d       y )N--apiz/The name of the API to get the collections for.)	completerhelpz`
      table(
        full_name:sort=1:label=COLLECTION_NAME,
        detailed_path
      )
    )r   PAGE_SIZE_FLAGRemoveFromParserURI_FLAGadd_argumentr   APICompleterAPI_VERSION_FLAGAddToParserdisplay_info	AddFormat)parsers    )lib/surface/meta/apis/collections/list.pyArgsz	List.Args   sz    ((0MM""6*
$$>  @ 
&&v.
!! # 	    c                     |j                   r"|j                  st        j                  dd      t	        j
                  |j                  |j                         S )Nr   zGThe --api-version flag can only be specified when using the --api flag.)api_nameapi_version)r   apir   RequiredArgumentExceptionr	   GetAPICollections)selfargss     r   RunzList.Run/   sR    00
 
 %%txx262B2BD Dr   N)__name__
__module____qualname____doc__staticmethodr   r%    r   r   r   r      s    1	 	Dr   r   N)r)   
__future__r   r   r   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.meta.apisr   $googlecloudsdk.command_lib.util.apisr	   ListCommandr   r+   r   r   <module>r1      s4     E &  ' ( . 6 9D4 Dr   