// SetVReplicationState updates the state in the _vt.vreplication table.
9487
func SetVReplicationState(dbClient DBClient, uid uint32, state, message string) error {
	query := fmt.Sprintf("update _vt.vreplication set state='%v', message=%v where id=%v", state, encodeString(message), uid)
	if _, err := dbClient.ExecuteFetch(query, 1); err != nil {
		return fmt.Errorf("could not set state: %v: %v", query, err)
	}
	return nil
}
28044
func (s *Lag) SetLagState(v string) *Lag {
	s.LagState = &v
	return s
}
1031907
func (b *Backend) SetStateSuccess(signature *tasks.Signature, results []*tasks.TaskResult) error {
	state := tasks.NewSuccessTaskState(signature, results)
	return b.updateState(state)
}
1185524
func (o *CustomInstance) SetVCPU(v *int) *CustomInstance {
	if o.VCPU = v; o.VCPU == nil {
		o.nullFields = append(o.nullFields, "VCPU")
	}
	return o
}
88153
func (s *JobRun) SetJobRunState(v string) *JobRun {
	s.JobRunState = &v
	return s
}
759286
func (s *UpdateDocumentVersionInput) SetVersionStatus(v string) *UpdateDocumentVersionInput {
	s.VersionStatus = &v
	return s
}
913947
func (s *CreateVirtualServiceOutput) SetVirtualService(v *VirtualServiceData) *CreateVirtualServiceOutput {
	s.VirtualService = v
	return s
}
1262657
func (s *AwsSecurityFindingFilters) SetVerificationState(v []*StringFilter) *AwsSecurityFindingFilters {
	s.VerificationState = v
	return s
}
1194691
func (s *GatewayAssociation) SetVirtualGatewayRegion(v string) *GatewayAssociation {
	s.VirtualGatewayRegion = &v
	return s
}
219131
func (s *AppSummary) SetReplicationStatusMessage(v string) *AppSummary {
	s.ReplicationStatusMessage = &v
	return s
}
1075694
func (ar *allocRunner) AllocState() *state.State {
	ar.stateLock.RLock()
	state := ar.state.Copy()
	ar.stateLock.RUnlock()

	// If TaskStateUpdated has not been called yet, ar.state.TaskStates
	// won't be set as it is not the canonical source of TaskStates.
	if len(state.TaskStates) == 0 {
		ar.state.TaskStates = make(map[string]*structs.TaskState, len(ar.tasks))
		for k, tr := range ar.tasks {
			state.TaskStates[k] = tr.TaskState()
		}
	}

	// Generate alloc to get other state fields
	alloc := ar.clientAlloc(state.TaskStates)
	state.ClientStatus = alloc.ClientStatus
	state.ClientDescription = alloc.ClientDescription
	state.DeploymentStatus = alloc.DeploymentStatus

	return state
}
764037
func (s *ConfirmTransitVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *ConfirmTransitVirtualInterfaceOutput {
	s.VirtualInterfaceState = &v
	return s
}
695794
func (s *ListBackupJobsInput) SetByState(v string) *ListBackupJobsInput {
	s.ByState = &v
	return s
}
1115101
func (s *DeleteVirtualInterfaceOutput) SetVirtualInterfaceState(v string) *DeleteVirtualInterfaceOutput {
	s.VirtualInterfaceState = &v
	return s
}
821271
func (s *KeyMetadata) SetKeyState(v string) *KeyMetadata {
	s.KeyState = &v
	return s
}
118282
func (s *AwsSecurityFinding) SetVerificationState(v string) *AwsSecurityFinding {
	s.VerificationState = &v
	return s
}
1240771
func (i *VCSInstaller) setVersion(repo vcs.Repo, ref string) error {
	return repo.UpdateVersion(ref)
}