
    ]                         S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr   " S	 S
\R                  5      rg)z>A command that lists the resource collections for a given API.    )absolute_import)division)unicode_literals)base)
exceptions)flags)registryc                   .    \ rS rSrSr\S 5       rS rSrg)Lint   z;Show which collections have non-compliant list API methods.c                 2   [         R                  R                  U 5        [         R                  R                  U 5        U R	                  S[
        R                  SS9  [
        R                  R                  U 5        U R                  R                  S5        g )N--apiz/The name of the API to get the collections for.)	completerhelpz        table(
          collection:sort=6,
          has_list:sort=1,
          resource_arg:sort=2,
          flattened:sort=3,
          pageable:sort=4,
          page_size:sort=5)
    )r   PAGE_SIZE_FLAGRemoveFromParserURI_FLAGadd_argumentr   APICompleterAPI_VERSION_FLAGAddToParserdisplay_info	AddFormat)parsers    )lib/surface/meta/apis/collections/lint.pyArgs	Lint.Args   sz    ((0MM""6*
$$>  @ 
&&v.
!! # 	    c                 l   UR                   (       a(  UR                  (       d  [        R                  " SS5      e[        R
                  " UR                  UR                   S9n/ nU H  n[        R                  " UR                  UR                   S9nU(       d  M5  U Vs/ s H  ofR                  5       (       d  M  UPM     nnU(       ax  US   nUR                  UR                  S[        UR                  5      [        UR                  5       5      UR                  5       [        UR                  5       5      S.5        M  UR                  UR                  SS	.5        M     U V	s/ s H8  oS
   (       a*  U	S   (       a   U	S   (       a  U	S   (       a  U	S   (       a  M6  U	PM:     nn	U$ s  snf s  sn	f )Nr   zGThe --api-version flag can only be specified when using the --api flag.)api_nameapi_version)r!   r   T)
collectionhas_listresource_arg	flattenedpageable	page_sizeF)r"   r#   r#   r$   r%   r&   r'   )r!   apir   RequiredArgumentExceptionr	   GetAPICollections
GetMethods	full_nameIsListappendboolrequest_collectionListItemFieldHasTokenizedRequestBatchPageSizeField)
selfargscollectionsresultscmethodsmlist_methodsmethodrs
             r   RunLint.Run2   sa   00
 
 ,,dhh9=9I9IKKG##AKKQ]]Kg!(7AHHJal7	aakk$((,V-F-F(G%)&*>*>*@%A$*$>$>$@%)&*C*C*E%FH 	I 	akkuEF! & " ;'QJ-*+N*;*+K.*+J-*+K.	 'G ;
 N% 8;s    F,<F,)5F1"F1 N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r>   __static_attributes__r@   r   r   r   r      s    C	 	$"r   r   N)rE   
__future__r   r   r   googlecloudsdk.callioper   r   $googlecloudsdk.command_lib.meta.apisr   $googlecloudsdk.command_lib.util.apisr	   ListCommandr   r@   r   r   <module>rM      s2     E &  ' ( . 6 984 8r   