
                         p    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\	5      r
 " S	 S
\	5      rg)z#Client class for Cloud Billing API.    )absolute_import)division)unicode_literals)
list_pager)utilsc                   2    \ rS rSrSrSS jrS rS	S jrSrg)
AccountsClient   z/High-level client for billing accounts service.Nc                     U=(       d    [         R                  " 5       U l        U=(       d    U R                  R                  U l        U R                  R
                  U l        g N)r   	GetClientclientMESSAGES_MODULEmessagesbillingAccounts_serviceselfr   r   s      4lib/googlecloudsdk/api_lib/billing/billing_client.py__init__AccountsClient.__init__   s<    -EOO-DK; ; ;DMKK//DM    c                     U R                   R                  U R                  R                  UR	                  5       S95      $ Nname)r   Getr   %CloudbillingBillingAccountsGetRequestRelativeName)r   account_refs     r   r   AccountsClient.Get"   s<    ==;;))+ 	< 	-. .r   c                 v    [         R                  " U R                  U R                  R	                  5       SSUS9$ )Nr   pageSizefieldbatch_size_attributelimit)r   YieldFromListr   r   &CloudbillingBillingAccountsListRequest)r   r'   s     r   ListAccountsClient.List'   s5    ##<<>' r   )r   r   r   NNr   )	__name__
__module____qualname____firstlineno____doc__r   r   r*   __static_attributes__ r   r   r	   r	      s    70
.
r   r	   c                   8    \ rS rSrSrS	S jrS rS rS
S jrSr	g)ProjectsClient1   z/High-level client for billing projects service.Nc                     U=(       d    [         R                  " 5       U l        U=(       d    U R                  R                  U l        g r   )r   r   r   r   r   r   s      r   r   ProjectsClient.__init__4   s+    -EOO-DK; ; ;DMr   c                     U R                   R                  R                  U R                  R	                  UR                  5       S95      $ r   )r   projectsGetBillingInfor   )CloudbillingProjectsGetBillingInfoRequestr   )r   project_refs     r   r   ProjectsClient.Get:   sC    ;;..??))+ 	@ 	
 r   c           	          U(       a  UR                  5       OSnU R                  R                  R                  U R                  R                  UR                  5       U R                  R                  US9S95      $ )a*  Link the given account to the given project.

Args:
  project_ref: a Resource reference to the project to be linked to
  account_ref: a Resource reference to the account to link, or None to
    unlink the project from its current account.

Returns:
  ProjectBillingInfo, the new ProjectBillingInfo
 )billingAccountName)r   projectBillingInfo)r   r   r:   UpdateBillingInfor   ,CloudbillingProjectsUpdateBillingInfoRequestProjectBillingInfo)r   r=   r    billing_account_names       r   LinkProjectsClient.LinkA   st     :E;335";;11BB))+#}}??#7  @   	C 	
 r   c                     [         R                  " U R                  R                  U R                  R                  UR                  5       S9SSUS9$ )Nr   rB   r#   r$   )r   r(   r   billingAccounts_projectsr   .CloudbillingBillingAccountsProjectsListRequestr   )r   r    r'   s      r   r*   ProjectsClient.ListV   sQ    ##,,DD))+ 	E 	
 #' r   )r   r   r,   r   )
r-   r.   r/   r0   r1   r   r   rG   r*   r2   r3   r   r   r5   r5   1   s    7<*	r   r5   N)r1   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.billingr   objectr	   r5   r3   r   r   <module>rQ      s1    * &  ' ' 0V ..V .r   