// SetDetachFromIndex sets the DetachFromIndex field's value.
192504
func (s *BatchWriteOperationResponse) SetDetachFromIndex(v *BatchDetachFromIndexResponse) *BatchWriteOperationResponse {
	s.DetachFromIndex = v
	return s
}
633375
func (d *driver) VolumeDetach(
	ctx types.Context,
	volumeID string,
	opts *types.VolumeDetachOpts) (*types.Volume, error) {

	if err := d.refreshSession(ctx); err != nil {
		return nil, err
	}

	if volumeID == "" {
		return nil, goof.New("missing volume id")
	}

	volumes, err := d.getVolume(ctx, volumeID, "", types.VolAttFalse)
	if err != nil {
		return nil, err
	}

	if len(volumes) == 0 {
		return nil, apiUtils.NewNotFoundError(volumeID)
	}

	// TODO: Check if volumes[[0].Attachments > 0?

	if err := d.detachVolume(ctx, volumeID, ""); err != nil {
		return nil, goof.WithFieldsE(
			log.Fields{
				"provier":  vbox.Name,
				"volumeID": volumeID}, "error detaching volume", err)
	}

	ctx.Info("detached volume", volumeID)
	return d.VolumeInspect(
		ctx, volumeID, &types.VolumeInspectOpts{
			Attachments: types.VolAttReqTrue})
}
1043196
func (s *AiffSettings) SetBitDepth(v int64) *AiffSettings {
	s.BitDepth = &v
	return s
}
363432
func (s *PhoneNumber) SetDeletionTimestamp(v time.Time) *PhoneNumber {
	s.DeletionTimestamp = &v
	return s
}
350188
func (s *CreateDBClusterInput) SetDeletionProtection(v bool) *CreateDBClusterInput {
	s.DeletionProtection = &v
	return s
}
284100
func (s *ModifyDBClusterInput) SetDeletionProtection(v bool) *ModifyDBClusterInput {
	s.DeletionProtection = &v
	return s
}
1366402
func (s *WavSettings) SetBitDepth(v int64) *WavSettings {
	s.BitDepth = &v
	return s
}
611853
func (s *DescribeAutomationStepExecutionsOutput) SetStepExecutions(v []*StepExecution) *DescribeAutomationStepExecutionsOutput {
	s.StepExecutions = v
	return s
}
152108
func (s *DBCluster) SetDeletionProtection(v bool) *DBCluster {
	s.DeletionProtection = &v
	return s
}
1251697
func (s *SqlInjectionMatchTuple) SetFieldToMatch(v *FieldToMatch) *SqlInjectionMatchTuple {
	s.FieldToMatch = v
	return s
}
195474
func (s *AutomationExecution) SetStepExecutionsTruncated(v bool) *AutomationExecution {
	s.StepExecutionsTruncated = &v
	return s
}
733645
func (a *EmulateTouchFromMouseEventArgs) SetDeltaX(deltaX float64) *EmulateTouchFromMouseEventArgs {
	a.DeltaX = &deltaX
	return a
}
1195277
func (s *DescribeSecretOutput) SetDeletedDate(v time.Time) *DescribeSecretOutput {
	s.DeletedDate = &v
	return s
}
1035369
func (s *RestoreDBInstanceToPointInTimeInput) SetDeletionProtection(v bool) *RestoreDBInstanceToPointInTimeInput {
	s.DeletionProtection = &v
	return s
}
14128
func (s *CmafPackageCreateOrUpdateParameters) SetSegmentPrefix(v string) *CmafPackageCreateOrUpdateParameters {
	s.SegmentPrefix = &v
	return s
}
659405
func (c *Collector) OnXMLDetach(xpathQuery string) {
	c.lock.Lock()
	deleteIdx := -1
	for i, cc := range c.xmlCallbacks {
		if cc.Query == xpathQuery {
			deleteIdx = i
			break
		}
	}
	if deleteIdx != -1 {
		c.xmlCallbacks = append(c.xmlCallbacks[:deleteIdx], c.xmlCallbacks[deleteIdx+1:]...)
	}
	c.lock.Unlock()
}
957673
func (s *DeleteBranchOutput) SetDeletedBranch(v *BranchInfo) *DeleteBranchOutput {
	s.DeletedBranch = v
	return s
}