
                         l    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 Z G d	 d
e      Zy)z6Utilities Assured Workloads API, Operations Endpoints.    )absolute_import)division)unicode_literals)
list_pager)util)	resourcesc                 x    t         j                  j                  | j                  d      }|j	                         S )Nz3assuredworkloads.organizations.locations.operations)
collection)r   REGISTRYParseRelativeNamenameSelfLink)resourceworkloads     0lib/googlecloudsdk/api_lib/assured/operations.pyGetWorkloadURIr      s9    11mmF 2 H( 
			    c                   &    e Zd ZdZddZddZd Zy)OperationsClientz/Client for operations in Assured Workloads API.c                     t        j                  ||      | _        t        j                  |      | _        | j                  j
                  | _        y )N)r   GetClientInstanceclientGetMessagesModulemessages"organizations_locations_operations_service)selfrelease_trackno_https      r   __init__zOperationsClient.__init__$   s9    ((@DK**=9DMKKBBDMr   Nc                     | j                   j                  ||      }t        j                  | j                  |d||d      S )a.  List all Assured Workloads operations that belong to the given parent organization.

    Args:
      parent: str, the parent organization of the Assured Workloads operations
        to be listed, in the form: organizations/{ORG_ID}/locations/{LOCATION}.
      limit: int or None, the total number of results to return.
      page_size: int, the number of entries in each batch (affects requests
        made, but not the yielded results).

    Returns:
      A list of all Assured Workloads operations that belong to the given parent
      organization.
    )r   pageSize
operationsN)field
batch_sizelimitbatch_size_attribute)r   ;AssuredworkloadsOrganizationsLocationsOperationsListRequestr   YieldFromListr   )r   parentr&   	page_sizelist_reqs        r   ListzOperationsClient.List)   sL     }}XXi Y )H##!# #r   c                     | j                   j                  |      }| j                  j                  j	                  |      S )zDescribe an Assured Workloads operation.

    Args:
      name: str, the name for the Assured Operation being described.

    Returns:
      Described Assured Workloads operation resource.
    )r   )r   :AssuredworkloadsOrganizationsLocationsOperationsGetRequestr   r   Get)r   r   describe_reqs      r   DescribezOperationsClient.DescribeA   s<     ==[[ \ L;;99==lKKr   )F)Nd   )__name__
__module____qualname____doc__r    r-   r2    r   r   r   r   !   s    7C
#0Lr   r   N)r7   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.assuredr   googlecloudsdk.corer   r   objectr   r8   r   r   <module>r>      s/    = &  ' ' / )+Lv +Lr   