
                         f    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	\5      rg
)z6API client library for Certificate Manager operations.    )absolute_import)division)unicode_literals)
list_pager)
api_client)waiterc                   8    \ rS rSrSrS	S jrS rS
S jrS rSr	g)OperationClient   z.API client for Certificate Manager operations.Nc                     U=(       d    [         R                  " 5       U l        U R                  R                  U l        U=(       d    U R                  R
                  U l        g )N)r   GetClientInstance_clientprojects_locations_operations_serviceMESSAGES_MODULEmessages)selfclientr   s      <lib/googlecloudsdk/api_lib/certificate_manager/operations.py__init__OperationClient.__init__   s>    ;Z99;DLLL>>DM< < <DM    c                     U R                   R                  UR                  5       S9nU R                  R	                  U5      $ )zGets operation.

Args:
  operation_ref: a Resource reference to a
    certificatemanager.projects.locations.operations resource to get.

Returns:
  Operation API representation.
)name)r   7CertificatemanagerProjectsLocationsOperationsGetRequestRelativeNamer   Get)r   operation_refrequests      r   r   OperationClient.Get#   s?     mmSS'') T +G==W%%r   c           	          U R                   R                  UR                  5       US9n[        R                  " U R
                  UUUSSS9$ )a  List operations in a given project and location.

Args:
  parent_ref: a Resource reference to a
    certificatemanager.projects.locations resource to list operations for.
  limit: int, the total number of results to return from the API.
  page_size: int, the number of results in each batch from the API.
  list_filter: str, filter to apply in the list request.

Returns:
  A list of the operations in the project.
)r   filter
operationspageSize)
batch_sizelimitfieldbatch_size_attribute)r   8CertificatemanagerProjectsLocationsOperationsListRequestr   r   YieldFromListr   )r   
parent_refr&   	page_sizelist_filterr   s         r   ListOperationClient.List1   sU     mmTT$$&{ U <G##') )r   c                 l    [         R                  " [         R                  " U R                  5      UUSS9$ )zWaits until operation is complete.

Args:
  operation_ref: a Resource reference to a
    certificatemanager.projects.locations.operations resource to wait for.
  message: str, message to be displayed while waiting.

Returns:
  Operation result.
i:  )wait_ceiling_ms)r   WaitForCloudOperationPollerNoResourcesr   )r   r   messages      r   WaitForOperation OperationClient.WaitForOperationH   s0     >>..t}}=!	# #r   )r   r   r   )NN)NNN)
__name__
__module____qualname____firstlineno____doc__r   r   r.   r5   __static_attributes__ r   r   r
   r
      s    6=
&).#r   r
   N)r;   
__future__r   r   r   apitools.base.pyr   *googlecloudsdk.api_lib.certificate_managerr   googlecloudsdk.api_lib.utilr   objectr
   r=   r   r   <module>rC      s(    = &  ' ' A .<#f <#r   