
                             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  G d
 de
j                        Zd Z G d de      Zy)z,Utilities for dealing with ML locations API.    )absolute_import)division)unicode_literals)
list_pager)apis)
exceptions)
properties)	resourcesc                       e Zd ZdZy)NoFieldsSpecifiedErrorzEError indicating that no updates were requested in a Patch operation.N)__name__
__module____qualname____doc__     1lib/googlecloudsdk/api_lib/ml_engine/locations.pyr   r      s    Mr   r   c                     t         j                  j                  | dt        j                  j
                  j                  j                  id      S )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                   $    e Zd ZdZddZd Zd Zy)LocationsClientz8High-level client for the AI Platform locations surface.Nc                     |xs t        j                  dd      | _        |xs | j                  j                  | _        y )Nmlv1)r   GetClientInstanceclientMESSAGES_MODULEmessages)selfr&   r(   s      r   __init__zLocationsClient.__init__*   s1    >D224>DK; ; ;DMr   c                     t        |      }| j                  j                  |j                               }| j                  j
                  j                  |      S )zGet details about a location.)name)r   r(   MlProjectsLocationsGetRequestRelativeNamer&   projects_locationsGet)r)   r   location_refreqs       r   r0   zLocationsClient.Get.   sL    !(+L
--
5
5&&( 6 *C;;))--c22r   c                     | j                   j                  |j                               }t        j                  | j
                  j                  |dd      S )z)List available locations for the project.)parent	locationspageSize)fieldbatch_size_attribute)r(   MlProjectsLocationsListRequestr.   r   YieldFromListr&   r/   )r)   project_refr2   s      r   ListzLocationsClient.List5   sP    
--
6
6'') 7 +C##&&'	) )r   )NN)r   r   r   r   r*   r0   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>rC      sG    3 &  ' ' , * * )NZ-- N*)f )r   