// SetAppstreamAgentVersion sets the AppstreamAgentVersion field's value.
554495
func (s *CreateImageBuilderInput) SetAppstreamAgentVersion(v string) *CreateImageBuilderInput {
	s.AppstreamAgentVersion = &v
	return s
}
662115
func (s *ApplicationDetail) SetApplicationVersionId(v int64) *ApplicationDetail {
	s.ApplicationVersionId = &v
	return s
}
759659
func (s *APNSChannelResponse) SetVersion(v int64) *APNSChannelResponse {
	s.Version = &v
	return s
}
589329
func (s *DescribeBillingGroupOutput) SetVersion(v int64) *DescribeBillingGroupOutput {
	s.Version = &v
	return s
}
1253974
func (s *ApplicationVersionDescription) SetApplicationVersionArn(v string) *ApplicationVersionDescription {
	s.ApplicationVersionArn = &v
	return s
}
804618
func setVersion() {
	// A development build is one that's not at a tag or has uncommitted changes
	devBuild = gitTag == "" || gitShortStat != ""

	// Only set the appVersion if -ldflags was used
	if gitNearestTag != "" || gitTag != "" {
		if devBuild && gitNearestTag != "" {
			appVersion = fmt.Sprintf("%s (+%s %s)",
				strings.TrimPrefix(gitNearestTag, "v"), gitCommit, buildDate)
		} else if gitTag != "" {
			appVersion = strings.TrimPrefix(gitTag, "v")
		}
	}
}
238288
func (s *DescribeRobotApplicationInput) SetApplicationVersion(v string) *DescribeRobotApplicationInput {
	s.ApplicationVersion = &v
	return s
}
770
func (s *AddApplicationInputProcessingConfigurationOutput) SetApplicationVersionId(v int64) *AddApplicationInputProcessingConfigurationOutput {
	s.ApplicationVersionId = &v
	return s
}
1046555
func (s *DescribeHsmOutput) SetSoftwareVersion(v string) *DescribeHsmOutput {
	s.SoftwareVersion = &v
	return s
}
1110741
func (s *Device) SetSoftwareVersion(v string) *Device {
	s.SoftwareVersion = &v
	return s
}
678562
func (s *Connector) SetVersion(v string) *Connector {
	s.Version = &v
	return s
}
1265858
func (s *AddApplicationOutputOutput) SetApplicationVersionId(v int64) *AddApplicationOutputOutput {
	s.ApplicationVersionId = &v
	return s
}
256073
func (st *State) SetVersion(tag string, v version.Binary) error {
	var results params.ErrorResults
	args := params.EntitiesVersion{
		AgentTools: []params.EntityVersion{{
			Tag:   tag,
			Tools: &params.Version{v},
		}},
	}
	err := st.facade.FacadeCall("SetTools", args, &results)
	if err != nil {
		// TODO: Not directly tested
		return err
	}
	return results.OneError()
}
1259387
func (s *StreamInfo) SetVersion(v string) *StreamInfo {
	s.Version = &v
	return s
}
1236419
func (s *UpdateApplicationOutput) SetVersion(v *Version) *UpdateApplicationOutput {
	s.Version = v
	return s
}
1015677
func (s *DescribeSimulationApplicationInput) SetApplicationVersion(v string) *DescribeSimulationApplicationInput {
	s.ApplicationVersion = &v
	return s
}
1111021
func (u *Unit) SetAgentVersion(v version.Binary) (err error) {
	defer errors.DeferredAnnotatef(&err, "cannot set agent version for unit %q", u)
	if err = checkVersionValidity(v); err != nil {
		return err
	}
	versionedTool := &tools.Tools{Version: v}
	ops := []txn.Op{{
		C:      unitsC,
		Id:     u.doc.DocID,
		Assert: notDeadDoc,
		Update: bson.D{{"$set", bson.D{{"tools", versionedTool}}}},
	}}
	if err := u.st.db().RunTransaction(ops); err != nil {
		return onAbort(err, ErrDead)
	}
	u.doc.Tools = versionedTool
	return nil
}