// WaitUntilMLModelAvailable uses the Amazon Machine Learning API operation
// DescribeMLModels to wait for a condition to be met before returning.
// If the condition is not met within the max attempt window, an error will
// be returned.
977092
func (c *MachineLearning) WaitUntilMLModelAvailable(input *DescribeMLModelsInput) error {
	return c.WaitUntilMLModelAvailableWithContext(aws.BackgroundContext(), input)
}
1098350
func (c *EC2) WaitUntilVpnConnectionAvailable(input *DescribeVpnConnectionsInput) error {
	return c.WaitUntilVpnConnectionAvailableWithContext(aws.BackgroundContext(), input)
}
366274
func WaitUntilSpotRequestFulfilled(ctx aws.Context, conn *ec2.EC2, spotRequestId string) error {
	spotRequestInput := ec2.DescribeSpotInstanceRequestsInput{
		SpotInstanceRequestIds: []*string{&spotRequestId},
	}

	err := conn.WaitUntilSpotInstanceRequestFulfilledWithContext(
		ctx,
		&spotRequestInput,
		getWaiterOptions()...)
	return err
}
130369
func (clstr *Cluster) WaitUntillMigrationIsFinished(timeout time.Duration) (err error) {
	if timeout <= 0 {
		timeout = _NO_TIMEOUT
	}
	done := make(chan error, 1)

	go func() {
		// this function is guaranteed to return after timeout
		// no go routines will be leaked
		for {
			if res, err := clstr.MigrationInProgress(timeout); err != nil || !res {
				done <- err
				return
			}
		}
	}()

	dealine := time.After(timeout)
	select {
	case <-dealine:
		return NewAerospikeError(TIMEOUT)
	case err = <-done:
		return err
	}
}
1310607
func (c *CloudWatch) WaitUntilAlarmExists(input *DescribeAlarmsInput) error {
	return c.WaitUntilAlarmExistsWithContext(aws.BackgroundContext(), input)
}
709280
func (c *EC2) WaitUntilVolumeInUse(input *DescribeVolumesInput) error {
	return c.WaitUntilVolumeInUseWithContext(aws.BackgroundContext(), input)
}
119256
func (c *EC2) WaitUntilVpcAvailable(input *DescribeVpcsInput) error {
	return c.WaitUntilVpcAvailableWithContext(aws.BackgroundContext(), input)
}
763091
func (_m *FacadeInterface) PredictStorageAvailability(ctx datastore.Context, lookahead time.Duration) (map[string]float64, error) {
	ret := _m.Called(ctx, lookahead)

	var r0 map[string]float64
	if rf, ok := ret.Get(0).(func(datastore.Context, time.Duration) map[string]float64); ok {
		r0 = rf(ctx, lookahead)
	} else {
		if ret.Get(0) != nil {
			r0 = ret.Get(0).(map[string]float64)
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(datastore.Context, time.Duration) error); ok {
		r1 = rf(ctx, lookahead)
	} else {
		r1 = ret.Error(1)
	}

	return r0, r1
}
977581
func (c *ELB) WaitUntilInstanceDeregistered(input *DescribeInstanceHealthInput) error {
	return c.WaitUntilInstanceDeregisteredWithContext(aws.BackgroundContext(), input)
}
589619
func (c *EC2) WaitUntilExportTaskCompleted(input *DescribeExportTasksInput) error {
	return c.WaitUntilExportTaskCompletedWithContext(aws.BackgroundContext(), input)
}
1234113
func (c *EC2) WaitUntilVolumeDeleted(input *DescribeVolumesInput) error {
	return c.WaitUntilVolumeDeletedWithContext(aws.BackgroundContext(), input)
}
1072194
func WaitNotVisible(sel interface{}, opts ...QueryOption) Action {
	return Query(sel, append(opts, NodeNotVisible)...)
}
270055
func (api *API) WaitUntilDeleted(in ApiInstance) error {
	var err error
	for in != nil {
		_, err = in.GetState()
		if err != nil {
			if apiError, ok := err.(ApiError); ok && apiError.httpStatusCode == http.StatusNotFound {
				return nil
			} else {
				return err
			}
		}
		time.Sleep(5 * time.Second)
	}
	return nil
}
1183049
func (c *EC2) WaitUntilImageAvailable(input *DescribeImagesInput) error {
	return c.WaitUntilImageAvailableWithContext(aws.BackgroundContext(), input)
}
941227
func (c *ELB) WaitUntilInstanceInService(input *DescribeInstanceHealthInput) error {
	return c.WaitUntilInstanceInServiceWithContext(aws.BackgroundContext(), input)
}
905811
func (l *Client) GetSegmentMLModel(id string) (SegmentML, error) {
	res := ApiResp{}
	data := SegmentML{}

	// make the request
	err := l.Get(parseLyticsURL(segmentMLEndpoint, map[string]string{"id": id}), nil, nil, &res, &data)
	if err != nil {
		return SegmentML{}, err
	}
	return data, nil
}
574515
func (pl *List) waitForPeerAvailableEvent(ctx context.Context) error {
	if _, ok := ctx.Deadline(); !ok {
		return _noContextDeadlineError
	}

	select {
	case <-pl.peerAvailableEvent:
		return nil
	case <-ctx.Done():
		return newUnavailableError(ctx.Err())
	}
}