// SetLabelModelVersion sets the LabelModelVersion field's value.
179088
func (s *GetLabelDetectionOutput) SetLabelModelVersion(v string) *GetLabelDetectionOutput {
	s.LabelModelVersion = &v
	return s
}
791804
func (s *ADMChannelResponse) SetVersion(v int64) *ADMChannelResponse {
	s.Version = &v
	return s
}
935689
func (s *DescribeThingGroupOutput) SetVersion(v int64) *DescribeThingGroupOutput {
	s.Version = &v
	return s
}
1371883
func (s *GetSlotTypeInput) SetVersion(v string) *GetSlotTypeInput {
	s.Version = &v
	return s
}
229896
func (s *InventoryItemSchema) SetVersion(v string) *InventoryItemSchema {
	s.Version = &v
	return s
}
587201
func (s *GetProductsInput) SetFormatVersion(v string) *GetProductsInput {
	s.FormatVersion = &v
	return s
}
646415
func (s *ActionTypeId) SetVersion(v string) *ActionTypeId {
	s.Version = &v
	return s
}
1084599
func (s *UpdateSimulationApplicationOutput) SetVersion(v string) *UpdateSimulationApplicationOutput {
	s.Version = &v
	return s
}
688265
func (s *ParameterHistory) SetVersion(v int64) *ParameterHistory {
	s.Version = &v
	return s
}
874999
func (s *ListFacesOutput) SetFaceModelVersion(v string) *ListFacesOutput {
	s.FaceModelVersion = &v
	return s
}
254549
func (s *Task) SetVersion(v int64) *Task {
	s.Version = &v
	return s
}
148634
func (s *CreateCollectionOutput) SetFaceModelVersion(v string) *CreateCollectionOutput {
	s.FaceModelVersion = &v
	return s
}
398567
func (s *ContainerInstance) SetVersion(v int64) *ContainerInstance {
	s.Version = &v
	return s
}
382479
func (c *Client) SetModelAgentVersion(args params.SetModelAgentVersion) error {
	if err := c.checkCanWrite(); err != nil {
		return err
	}

	if err := c.check.ChangeAllowed(); err != nil {
		return errors.Trace(err)
	}
	// Before changing the agent version to trigger an upgrade or downgrade,
	// we'll do a very basic check to ensure the environment is accessible.
	envOrBroker, err := c.newEnviron()
	if err != nil {
		return errors.Trace(err)
	}
	// Check IAAS clouds.
	if env, ok := envOrBroker.(environs.InstanceBroker); ok {
		if err := environs.CheckProviderAPI(env, c.callContext); err != nil {
			return err
		}
	}
	// Check k8s clusters.
	if env, ok := envOrBroker.(caas.ClusterMetadataChecker); ok {
		if _, err := env.GetClusterMetadata(""); err != nil {
			return errors.Annotate(err, "cannot make API call to provider")
		}
	}
	// If this is the controller model, also check to make sure that there are
	// no running migrations.  All models should have migration mode of None.
	if c.api.stateAccessor.IsController() {
		modelUUIDs, err := c.api.stateAccessor.AllModelUUIDs()
		if err != nil {
			return errors.Trace(err)
		}

		for _, modelUUID := range modelUUIDs {
			model, release, err := c.api.pool.GetModel(modelUUID)
			if err != nil {
				return errors.Trace(err)
			}
			if mode := model.MigrationMode(); mode != state.MigrationModeNone {
				release()
				return errors.Errorf("model \"%s/%s\" is %s, upgrade blocked", model.Owner().Name(), model.Name(), mode)
			}
			release()
		}
	}

	return c.api.stateAccessor.SetModelAgentVersion(args.Version, args.IgnoreAgentVersions)
}
1122615
func (s *DescribeCollectionOutput) SetFaceModelVersion(v string) *DescribeCollectionOutput {
	s.FaceModelVersion = &v
	return s
}
651803
func (s *UpdateBillingGroupOutput) SetVersion(v int64) *UpdateBillingGroupOutput {
	s.Version = &v
	return s
}
1241245
func (s *GetSlotTypeOutput) SetVersion(v string) *GetSlotTypeOutput {
	s.Version = &v
	return s
}