
    y                     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Z	y)
z'AlloyDB instance operations API helper.    )absolute_import)division)unicode_literals)api_util)waiterc                    t        j                  |      }|j                  }|r+t        j                  |j
                  |j                        }nt        j                  |j                        }t        j                  || |dd      S )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	fgC%
Q Q    N)T)
__doc__
__future__r   r   r   googlecloudsdk.api_lib.alloydbr   googlecloudsdk.api_lib.utilr   r    r   r   <module>r       s    . &  ' 3 .Qr   