
    
                     x    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KJr  S	 r " S
 S\5      rg)z%Utilities for Eventarc Providers API.    )absolute_import)division)unicode_literals)
list_pager)common)apis)	resourcesc                 r    [         R                  R                  U R                  SS9nUR	                  5       $ )Nz%eventarc.projects.locations.providers)
collection)r	   REGISTRYParseRelativeNamenameSelfLink)resourceproviders     0lib/googlecloudsdk/api_lib/eventarc/providers.pyGetProvidersURIr      s7    11mm G 2 I(				    c                   *    \ rS rSrSrS rS rS rSrg)ProvidersClient!   z+Client for event providers in Eventarc API.c                     [         R                  " U5      n[        R                  " [         R                  U5      nUR
                  U l        UR                  U l        g )N)	r   GetApiVersionr   GetClientInstanceAPI_NAMEMESSAGES_MODULE	_messagesprojects_locations_providers_service)selfrelease_trackapi_versionclients       r   __init__ProvidersClient.__init__$   sB    &&}5K##FOO[AF++DN77DMr   c           	      z    U R                   R                  XS9n[        R                  " U R                  USUUSS9$ )an  Lists event providers in a given location.

Args:
  location: str, the relative name of the location to list event providers
    in.
  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:
  A generator of event providers in the location.
)parentpageSize	providersr(   )field
batch_sizelimitbatch_size_attribute)r   -EventarcProjectsLocationsProvidersListRequestr   YieldFromListr   )r    locationr,   	page_sizelist_reqs        r   ListProvidersClient.List*   sJ     ~~KK L -H##') )r   c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ )ziGets a Provider.

Args:
  provider_ref: Resource, the Provider to get.

Returns:
  The Provider message.
)r   )r   ,EventarcProjectsLocationsProvidersGetRequestRelativeNamer   Get)r    provider_refget_reqs      r   r8   ProvidersClient.GetA   s?     nnII&&( J *G==W%%r   )r   r   N)	__name__
__module____qualname____firstlineno____doc__r$   r3   r8   __static_attributes__ r   r   r   r   !   s    38).&r   r   N)r@   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.eventarcr   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer	   r   objectr   rB   r   r   <module>rI      s0    , &  ' ' 2 , )+&f +&r   