// SetAgentVersion sets the AgentVersion field's value.
335466
func (s *CreateStackInput) SetAgentVersion(v string) *CreateStackInput {
	s.AgentVersion = &v
	return s
}
384996
func (s *Parameter) SetVersion(v int64) *Parameter {
	s.Version = &v
	return s
}
792120
func (s *GetApplicationOutput) SetVersion(v *Version) *GetApplicationOutput {
	s.Version = v
	return s
}
749534
func (c *Client) AgentVersion() (version.Number, error) {
	var result params.AgentVersionResult
	if err := c.facade.FacadeCall("AgentVersion", nil, &result); err != nil {
		return version.Number{}, err
	}
	return result.Version, nil
}
1241245
func (s *GetSlotTypeOutput) SetVersion(v string) *GetSlotTypeOutput {
	s.Version = &v
	return s
}
16653
func (s *RobotSoftwareSuite) SetVersion(v string) *RobotSoftwareSuite {
	s.Version = &v
	return s
}
1295717
func (s *CreateScriptInput) SetVersion(v string) *CreateScriptInput {
	s.Version = &v
	return s
}
1298486
func (s *Api) SetVersion(v string) *Api {
	s.Version = &v
	return s
}
1284
func (s *AgentInfo) SetAgentType(v string) *AgentInfo {
	s.AgentType = &v
	return s
}
862114
func (s *GrokClassifier) SetVersion(v int64) *GrokClassifier {
	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)
}
294239
func (s *UpdateApiInput) SetVersion(v string) *UpdateApiInput {
	s.Version = &v
	return s
}
1074221
func (s *AgentVersion) SetVersion(v string) *AgentVersion {
	s.Version = &v
	return s
}
318835
func (s *DescribeSimulationApplicationOutput) SetVersion(v string) *DescribeSimulationApplicationOutput {
	s.Version = &v
	return s
}
751243
func (s *AgentInfo) SetVersion(v string) *AgentInfo {
	s.Version = &v
	return s
}
1259387
func (s *StreamInfo) SetVersion(v string) *StreamInfo {
	s.Version = &v
	return s
}
1188833
func (s *EnvironmentTier) SetVersion(v string) *EnvironmentTier {
	s.Version = &v
	return s
}