
    
                     *    S r SSKJr  SSKJr  SS jrg)z'AlloyDB instance operations API helper.    )api_util)waiterc                    [         R                  " U5      nUR                  nU(       a,  [        R                  " UR
                  UR                  5      nO [        R                  " UR                  5      n[        R                  " X`USSS9$ )a  Waits for the given google.longrunning.Operation to complete.

Args:
  op_ref: The operation to poll.
  message: String to display for default progress_tracker.
  release_track: The API release track (e.g. ALPHA, BETA, etc.)
  creates_resource: Whether or not the operation creates a resource

Raises:
  apitools.base.py.HttpError: if the request returns an HTTP error

Returns:
  The Operation or the Resource the Operation is associated with.
g      ?i'  )exponential_sleep_multipliersleep_ms)	r   AlloyDBClientalloydb_clientr   CloudOperationPoller%projects_locations_clusters_instancesprojects_locations_operationsCloudOperationPollerNoResourcesWaitFor)op_refmessagerelease_trackcreates_resourceclientr	   pollers          9lib/googlecloudsdk/api_lib/alloydb/instance_operations.pyAwaitr      s{     !!-0&((.((<<446F 33446F	gC%
Q Q    N)T)__doc__googlecloudsdk.api_lib.alloydbr   googlecloudsdk.api_lib.utilr   r    r   r   <module>r      s    . 4 .Qr   