
                             d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddlm
Z
 dd	lmZ d
 Z G d de	j                        Zy)zUtilities for Locations.    )absolute_import)division)unicode_literalsN)
list_pager)base)
flag_utils)utilc                 B    t        j                  |       }t        |      S )zCreates Client.

  Args:
    release_track: release_track value, can be ALPHA, BETA, GA

  Returns:
    The versioned client.
  )r   GetApiVersionLocation)release_trackapi_versions     3lib/googlecloudsdk/api_lib/recommender/locations.pyCreateClientr      s     ((7+	+	    c                       e Zd ZdZ	 	 ddZy)r   z&Base Location client for all versions.Nc                    g g g }	}}g }
|r_| j                   j                  | _        | j                  j	                  d|z         }t        j                  | j                  |d||d      }|r_| j                   j                  | _        | j                  j                  d|z         }t        j                  | j                  |d||d      }|r{| j                   j                  | _        | j                  j                  dt        t        j                  |            z         }t        j                  | j                  |d||d      }	|r_| j                   j                  | _        | j                  j                  d|z         }t        j                  | j                  |d||d      }
t!        j"                  |||	|
      S )	a  List Locations.

    Args:
      page_size: int, The number of items to retrieve per request.
      project: string, The project name to retrieve locations for.
      folder: string, The folder name to retrieve locations for.
      organization: string, The organization name to retrieve locations for.
      billing_account: string, The billing project to retrieve locations for.
      limit: int, The maximum number of records to yield.

    Returns:
      The list of Locations.
    zfolders/)namepageSize	locations)batch_size_attribute
batch_sizelimitfieldzorganizations/z	projects/zbilling-accounts/)_clientfolders_locations_service	_messages&RecommenderFoldersLocationsListRequestr   YieldFromListorganizations_locations,RecommenderOrganizationsLocationsListRequestprojects_locations'RecommenderProjectsLocationsListRequeststrr	   GetProjectNumberbillingAccounts_locations.RecommenderBillingAccountsLocationsListRequest	itertoolschain)self	page_sizeprojectfolderorganizationbilling_accountr   folder_locationsorganization_locationsproject_locationsbilling_account_locationsrequests               r   ListzLocation.List-   s     CEb".?, "ll44dmEEF" F g $11
--
) ll::dmKK,. L g  *77
--
)  ll55dmFFS!6!6w!?@@ G g %22
--
) ll<<dmMM"_4 N g #-":":
--
)# ??!	 r   )NNNNN)__name__
__module____qualname____doc__r6    r   r   r   r   *   s    .15:>Mr   r   )r:   
__future__r   r   r   r)   apitools.base.pyr   "googlecloudsdk.api_lib.recommenderr   r   #googlecloudsdk.command_lib.projectsr	   r   
ClientBaser   r;   r   r   <module>rA      s9     &  '  ' 3 9 4
Pt Pr   