
    )                     z    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	\R                  5      rg
)zECommand to list all billing accounts associated with the active user.    )absolute_import)division)unicode_literals)billing_client)base)	resourcesc                   >    \ rS rSrSr\S 5       r\S 5       rS rSr	g)List   a  List all active billing accounts.

`{command}` lists all billing accounts and subaccounts owned by the currently
authenticated user. Subaccounts have a non-empty MASTER_ACCOUNT_ID value.

## EXAMPLES

To list only open billing accounts, run:

    $ {command} --filter=open=true

## API REFERENCE

This command uses the *cloudbilling/v1* API. The full documentation for this
API can be found at: https://cloud.google.com/billing/v1/getting-started
c                 n    [         R                  R                  U R                  SS9R	                  5       $ )Nzcloudbilling.billingAccounts)
collection)r   REGISTRYParsenameSelfLink)accounts    $lib/surface/billing/accounts/list.py
ToSelfLinkList.ToSelfLink,   s3    ##!? $ AAIL    c                     U R                   R                  S5        U R                   R                  [        R                  5        g )Nz
          table(
            name.basename():label=ACCOUNT_ID,
            displayName:label=NAME,
            open,
            masterBillingAccount.basename():label=MASTER_ACCOUNT_ID
          )
    )display_info	AddFormat
AddUriFuncr
   r   )parsers    r   Args	List.Args1   s5    
!! # 	 ""4??3r   c                 ^    [         R                  " 5       nUR                  UR                  S9$ )zRun the list command.)limit)r   AccountsClientr
   r   )selfargsclients      r   RunList.Run=   s%    **,F;;TZZ;((r    N)
__name__
__module____qualname____firstlineno____doc__staticmethodr   r   r$   __static_attributes__r&   r   r   r
   r
      s6    " L L 	4 	4)r   r
   N)r+   
__future__r   r   r   googlecloudsdk.api_lib.billingr   googlecloudsdk.callioper   googlecloudsdk.corer   ListCommandr
   r&   r   r   <module>r3      s/    L &  ' 9 ( )&)4 &)r   