// SetJobs sets the Jobs field's value.
438751
func (s *BatchDescribeSimulationJobOutput) SetJobs(v []*SimulationJob) *BatchDescribeSimulationJobOutput {
	s.Jobs = v
	return s
}
790560
func (s *DescribeJobOutput) SetJob(v *Job) *DescribeJobOutput {
	s.Job = v
	return s
}
1138614
func (s *CreateJobResponse) SetJob(v *Job) *CreateJobResponse {
	s.Job = v
	return s
}
1067475
func (s *StartDocumentClassificationJobOutput) SetJobStatus(v string) *StartDocumentClassificationJobOutput {
	s.JobStatus = &v
	return s
}
212076
func (s *GetDocumentAnalysisOutput) SetJobStatus(v string) *GetDocumentAnalysisOutput {
	s.JobStatus = &v
	return s
}
944878
func (s *JobMetadata) SetJobState(v string) *JobMetadata {
	s.JobState = &v
	return s
}
716925
func (s *DescribeJobFlowsOutput) SetJobFlows(v []*JobFlowDetail) *DescribeJobFlowsOutput {
	s.JobFlows = v
	return s
}
745410
func (s *GetJobRunOutput) SetJobRun(v *JobRun) *GetJobRunOutput {
	s.JobRun = v
	return s
}
792974
func (s *CreateJobInput) SetJobId(v string) *CreateJobInput {
	s.JobId = &v
	return s
}
1260949
func (s *ListJobsByPipelineOutput) SetJobs(v []*Job) *ListJobsByPipelineOutput {
	s.Jobs = v
	return s
}
591225
func (s *ListJobTemplatesOutput) SetJobTemplates(v []*JobTemplate) *ListJobTemplatesOutput {
	s.JobTemplates = v
	return s
}
576632
func (s *SentimentDetectionJobProperties) SetJobStatus(v string) *SentimentDetectionJobProperties {
	s.JobStatus = &v
	return s
}
1329749
func (s *ListBackupJobsOutput) SetBackupJobs(v []*Job) *ListBackupJobsOutput {
	s.BackupJobs = v
	return s
}
864811
func (s *BatchGetJobsInput) SetJobNames(v []*string) *BatchGetJobsInput {
	s.JobNames = v
	return s
}
1049773
func (s *DescribeSimulationJobInput) SetJob(v string) *DescribeSimulationJobInput {
	s.Job = &v
	return s
}
824201
func (s *UserImportJobType) SetJobId(v string) *UserImportJobType {
	s.JobId = &v
	return s
}
615026
func (s *StateStore) setJobStatuses(index uint64, txn *memdb.Txn,
	jobs map[structs.NamespacedID]string, evalDelete bool) error {
	for tuple, forceStatus := range jobs {
		// COMPAT 0.7: Upgrade old objects that do not have namespaces
		if tuple.Namespace == "" {
			tuple.Namespace = structs.DefaultNamespace
		}

		existing, err := txn.First("jobs", "id", tuple.Namespace, tuple.ID)
		if err != nil {
			return fmt.Errorf("job lookup failed: %v", err)
		}

		if existing == nil {
			continue
		}

		if err := s.setJobStatus(index, txn, existing.(*structs.Job), evalDelete, forceStatus); err != nil {
			return err
		}
	}

	return nil
}