
    2                     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S	K
Jr  S
 rSS jrg)zFThis file provides the implementation of the `functions list` command.    )absolute_import)division)unicode_literals)
list_pager)util)log)
properties)	resourcesc           
   #      #    S nU  Hn  n[         R                  R                  USU0SS9n[        R                  " UR
                  UR                  UR                  5       US9USSUS9 H  n	U	v   M	     Mp     g	7f)
a  Yield the functions from the given locations.

Args:
  locations: List[str], list of gcp regions.
  project: str, Name of the API to modify. E.g. "cloudfunctions"
  limit: int, List messages limit.
  messages: module, Generated messages module.
  client: base_api.BaseApiClient, cloud functions client library.
  filter_exp: Filter expression in list functions request.

Yields:
  protorpc.message.Message, The resources listed by the service.
c                     U R                   (       a0  [        R                  " SSR                  U R                   5      5        [	        X5      $ )NzThe following regions were fully or partially unreachable for query: %s
This could be due to permission setup. Additional informationcan be found in: https://cloud.google.com/functions/docs/troubleshootingz, )unreachabler   warningjoingetattr)message	attributes     ;lib/googlecloudsdk/command_lib/functions/v2/list/command.py_ReadAttrAndLogUnreachable7_YieldFromLocations.<locals>._ReadAttrAndLogUnreachable-   s>    	kkH ))G''
(	 7&&    
projectsIdz!cloudfunctions.projects.locations)params
collection)parentfilter	functionspageSize)servicerequestlimitfieldbatch_size_attributeget_field_funcN)r
   REGISTRYParser   YieldFromListprojects_locations_functions3CloudfunctionsProjectsLocationsFunctionsListRequestRelativeName)
	locationsprojectr    messagesclient
filter_expr   locationlocation_reffunctions
             r   _YieldFromLocationsr2      s     "' h%%++g&6 , L
 ,,33LL,,.z M 
 '1	 n	 s   A9A;Nc                     [         R                  " US9n[         R                  " US9n[        R                  R
                  R                  R                  5       nU R                  n[        U R                  XVXCU5      $ )zList Google Cloud Functions.)release_track)api_utilGetClientInstanceGetMessagesModuler	   VALUEScorer+   	GetOrFailr    r2   regions)argsr4   r.   r-   r,   r+   r    s          r   Runr=   N   se    %%MB&''mD(""**446'
**%	
llGHj
 r   )N)__doc__
__future__r   r   r   apitools.base.pyr   #googlecloudsdk.api_lib.functions.v2r   r5   googlecloudsdk.corer   r	   r
   r2   r=    r   r   <module>rD      s.    M &  ' ' @ # * )/d	r   