
    	                     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)OperationsClientz$Client for operations in AppHub API.c                     t        j                  |      | _        t        j                  |      | _        | j                  j
                  | _        y )N)api_lib_utilsGetClientInstanceclientGetMessagesModulemessagesprojects_locations_operations
_op_client)selfrelease_tracks     /lib/googlecloudsdk/api_lib/apphub/operations.py__init__zOperationsClient.__init__   s7    11-@DK!33MBDMkk??DO    Nc                     | j                   j                  |      }t        j                  | j                  |d||d      S )a  List all AppHub operations in the Project/location.

    Args:
      parent: str, projects/{projectId}/locations/{location}
      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 operations that belong to the given parent.
    name
operationspageSize)field
batch_sizelimitbatch_size_attribute)r   ,ApphubProjectsLocationsOperationsListRequestr   YieldFromListr   )r   parentr   	page_sizelist_reqs        r   ListzOperationsClient.List"   sJ     }}II J H##'
 
r   c                 p    | j                   j                  |      }| j                  j                  |      S )zDescribe an AppHub operation.

    Args:
      operation: str, the name for the AppHub Operation being described.

    Returns:
      Described AppHub operation resource.
    r   )r   +ApphubProjectsLocationsOperationsGetRequestr   Get)r   	operationdescribe_reqs      r   DescribezOperationsClient.Describe:   s6     ==LL M L??|,,r   )Nd   )
__name__
__module____qualname____doc__r   ReleaseTrackALPHAr   r&   r,    r   r   r
   r
      s$    ,#'#4#4#:#: @

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(     &  ' ' @ (+-v +-r   