
                             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
 S\
R                  5      rS r " S S\5      rg)z,Utilities for dealing with ML locations API.    )absolute_import)division)unicode_literals)
list_pager)apis)
exceptions)
properties)	resourcesc                       \ rS rSrSrSrg)NoFieldsSpecifiedError   zEError indicating that no updates were requested in a Patch operation. N)__name__
__module____qualname____firstlineno____doc____static_attributes__r       1lib/googlecloudsdk/api_lib/ml_engine/locations.pyr   r      s    Mr   r   c                     [         R                  R                  U S[        R                  R
                  R                  R                  0SS9$ )N
projectsIdzml.projects.locations)params
collection)r
   REGISTRYParser	   VALUEScoreproject	GetOrFail)locations    r   _ParseLocationr"       sF    				!	!J--22::DDE( 
" 
* *r   c                   .    \ rS rSrSrSS jrS rS rSrg)	LocationsClient'   z8High-level client for the AI Platform locations surface.Nc                     U=(       d    [         R                  " SS5      U l        U=(       d    U R                  R                  U l        g )Nmlv1)r   GetClientInstanceclientMESSAGES_MODULEmessages)selfr*   r,   s      r   __init__LocationsClient.__init__*   s1    >D224>DK; ; ;DMr   c                     [        U5      nU R                  R                  UR                  5       S9nU R                  R
                  R                  U5      $ )zGet details about a location.)name)r"   r,   MlProjectsLocationsGetRequestRelativeNamer*   projects_locationsGet)r-   r!   location_refreqs       r   r5   LocationsClient.Get.   sL    !(+L
--
5
5&&( 6 *C;;))--c22r   c                     U R                   R                  UR                  5       S9n[        R                  " U R
                  R                  USSS9$ )z)List available locations for the project.)parent	locationspageSize)fieldbatch_size_attribute)r,   MlProjectsLocationsListRequestr3   r   YieldFromListr*   r4   )r-   project_refr7   s      r   ListLocationsClient.List5   sP    
--
6
6'') 7 +C##&&'	) )r   )r*   r,   )NN)	r   r   r   r   r   r.   r5   rB   r   r   r   r   r$   r$   '   s    @<3)r   r$   N)r   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.utilr   googlecloudsdk.corer   r	   r
   Errorr   r"   objectr$   r   r   r   <module>rJ      sG    3 &  ' ' , * * )NZ-- N*)f )r   