
                             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
 ddlmZ dd	lmZ dd
lmZ d Z G d de      Zy)z%Utilities for Eventarc Locations API.    )absolute_import)division)unicode_literals)
list_pager)common)util)apis)
properties)	resourcesc                 x    t         j                  j                  | j                  d      }|j	                         S )Nzeventarc.projects.locations)
collection)r   REGISTRYParseRelativeNamenameSelfLink)resourcelocations     0lib/googlecloudsdk/api_lib/eventarc/locations.pyGetLocationsURIr      s6    11mm = 2 ?(				    c                       e Zd ZdZd Zd Zy)LocationsClientz%Client for locations in Eventarc API.c                     t        j                  |      }t        j                  t         j                  |      }|j
                  | _        |j                  | _        y )N)	r   GetApiVersionr	   GetClientInstanceAPI_NAMEMESSAGES_MODULEmessagesprojects_locations_service)selfrelease_trackapi_versionclients       r   __init__zLocationsClient.__init__&   sB    &&}5K##FOO[AF**DM--DMr   c                    t        j                  t        j                  j                  j
                  j                  d            }| j                  j                  |      }t        j                  | j                  |d||d      S )a  List locations in the Eventarc API.

    Args:
      limit: int or None, the total number of results to return.
      page_size: int, the number of entries in each batch (affects requests
        made, but not the yielded results).

    Returns:
      Generator of locations.
    T)required)r   	locationspageSize)field
batch_sizelimitbatch_size_attribute)r   ProjectPathr
   VALUEScoreprojectGetr   $EventarcProjectsLocationsListRequestr   YieldFromListr    )r!   r,   	page_sizeproject_resource_relnamelist_reqs        r   ListzLocationsClient.List,   s~      $//&&**D*9 ;}}AA% B 'H##') )r   N)__name__
__module____qualname____doc__r%   r8    r   r   r   r   #   s    -.)r   r   N)r<   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.eventarcr   %googlecloudsdk.api_lib.runtime_configr   googlecloudsdk.api_lib.utilr	   googlecloudsdk.corer
   r   r   objectr   r=   r   r   <module>rE      s6    , &  ' ' 2 6 , * ))f )r   