
    I                         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
 ej                   ej                  ej                  j                         G d d	ej                                      Zy
)zDImplementation of gcloud Procurement consumer accounts list command.    )absolute_import)division)unicode_literals)apis)base)resource_argsc                   &    e Zd ZdZed        Zd Zy)Listz@Returns the List of Account objects resulting from the List API.c                 N   t        j                  | d       t        j                  j	                  |        t        j
                  j	                  |        t        j                  j	                  |        t        j                  j	                  |        | j                  dd       y)zrRegister flags for this command.

    Args:
      parser: argparse.ArgumentParser to register arguments with.
    z.Parent Cloud Billing account to list accounts.z--page-tokenz/Token that specifies the next page in the list.)helpN)	r   AddBillingAccountResourceArgr   FILTER_FLAGRemoveFromParser
LIMIT_FLAGSORT_BY_FLAGURI_FLAGadd_argument)parsers    :lib/surface/commerce_procurement/consumer/accounts/list.pyArgsz	List.Args   s     ..@B%%f-OO$$V,&&v.MM""6*
?  B    c                     |j                   j                  j                         }t        j                  j                  |j                         |j                  |j                        S )zRuns the command.

    Args:
      args: The arguments that were provided to this command invocation.

    Returns:
      List of accounts and next token if applicable.
    )	CONCEPTSbilling_accountParser   Accountsr
   RelativeName	page_size
page_token)selfargsbilling_account_refs      r   RunzList.Run0   sM     --77==?==1>>@"nndoo? ?r   N)__name__
__module____qualname____doc__staticmethodr   r#    r   r   r
   r
      s!     IB B ?r   r
   N)r'   
__future__r   r   r   +googlecloudsdk.api_lib.commerce_procurementr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.commerce_procurementr   HiddenReleaseTracksReleaseTrackALPHAListCommandr
   r)   r   r   <module>r3      sc    K &  ' < ( I D%%++,?4 ? - ?r   