
    3	                     f    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  G d d	e      Zy
)zApphub Operations API.    )absolute_import)division)unicode_literals)
list_pager)utils)basec                   P    e Zd ZdZej
                  j                  fdZddZd Z	y)LocationsClientz#Client for locations in AppHub API.c                     t        j                  |      | _        t        j                  |      | _        | j                  j
                  | _        y )N)api_lib_utilsGetClientInstanceclientGetMessagesModulemessagesprojects_locations
_lo_client)selfrelease_tracks     .lib/googlecloudsdk/api_lib/apphub/locations.py__init__zLocationsClient.__init__   s7    11-@DK!33MBDMkk44DO    Nc                     | j                   j                  |      }t        j                  | j                  |d||d      S )a  List all AppHub locations in the Project.

    Args:
      parent: str, projects/{projectId}
      limit: int or None, the total number of results to return.
        Default value is None
      page_size: int, the number of entries in each batch (affects requests
        made, but not the yielded results). Default value is 100.

    Returns:
      A list of AppHub locations that belong to the given parent.
    name	locationspageSize)field
batch_sizelimitbatch_size_attribute)r   "ApphubProjectsLocationsListRequestr   YieldFromListr   )r   parentr   	page_sizelist_reqs        r   ListzLocationsClient.List"   sJ     }}?? @ H##' r   c                 p    | j                   j                  |      }| j                  j                  |      S )zDescribe an AppHub location.

    Args:
      location: str, the name for the AppHub Location being described.

    Returns:
      Described AppHub location resource.
    r   )r   !ApphubProjectsLocationsGetRequestr   Get)r   locationdescribe_reqs      r   DescribezLocationsClient.Describe:   s6     ==BB C L??|,,r   )Nd   )
__name__
__module____qualname____doc__r   ReleaseTrackALPHAr   r&   r,    r   r   r
   r
      s#    +#'#4#4#:#: 5
0-r   r
   N)r1   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.apphubr   r   googlecloudsdk.callioper   objectr
   r4   r   r   <module>r:      s(     &  ' ' @ (+-f +-r   