// SetWindowsResourcesCPU sets g.Config.Windows.Resources.CPU.
178239
func (g *Generator) SetWindowsResourcesCPU(cpu rspec.WindowsCPUResources) {
	g.initConfigWindowsResources()
	g.Config.Windows.Resources.CPU = &cpu
}
188611
func (s *Device) SetCpu(v *CPU) *Device {
	s.Cpu = v
	return s
}
1255307
func (s *CreateFileSystemInput) SetWindowsConfiguration(v *CreateFileSystemWindowsConfiguration) *CreateFileSystemInput {
	s.WindowsConfiguration = v
	return s
}
259972
func (s *UpdateClusterInput) SetResources(v *JobResource) *UpdateClusterInput {
	s.Resources = v
	return s
}
1270421
func (s *KeyPair) SetResourceType(v string) *KeyPair {
	s.ResourceType = &v
	return s
}
726772
func (g *Generator) SetLinuxResourcesCPURealtimeRuntime(time int64) {
	g.InitConfigLinuxResourcesCPU()
	g.Config.Linux.Resources.CPU.RealtimeRuntime = &time
}
36524
func (s *UpdateClusterConfigInput) SetResourcesVpcConfig(v *VpcConfigRequest) *UpdateClusterConfigInput {
	s.ResourcesVpcConfig = v
	return s
}
442719
func (g *Generator) InitConfigLinuxResourcesCPU() {
	g.initConfigLinuxResources()
	if g.Config.Linux.Resources.CPU == nil {
		g.Config.Linux.Resources.CPU = &rspec.LinuxCPU{}
	}
}
821659
func (s *CreateApplicationVersionOutput) SetResourcesSupported(v bool) *CreateApplicationVersionOutput {
	s.ResourcesSupported = &v
	return s
}
954301
func setCPU(cpu string) error {
	var numCPU int

	availCPU := runtime.NumCPU()

	if strings.HasSuffix(cpu, "%") {
		// Percent
		var percent float32
		pctStr := cpu[:len(cpu)-1]
		pctInt, err := strconv.Atoi(pctStr)
		if err != nil || pctInt < 1 || pctInt > 100 {
			return errors.New("invalid CPU value: percentage must be between 1-100")
		}
		percent = float32(pctInt) / 100
		numCPU = int(float32(availCPU) * percent)
		if numCPU < 1 {
			numCPU = 1
		}
	} else {
		// Number
		num, err := strconv.Atoi(cpu)
		if err != nil || num < 1 {
			return errors.New("invalid CPU value: provide a number or percent greater than 0")
		}
		numCPU = num
	}

	if numCPU > availCPU {
		numCPU = availCPU
	}

	runtime.GOMAXPROCS(numCPU)
	return nil
}
1271650
func (s *AddTagsInput) SetResourceType(v string) *AddTagsInput {
	s.ResourceType = &v
	return s
}
446005
func (s *ResourceTagSet) SetResourceType(v string) *ResourceTagSet {
	s.ResourceType = &v
	return s
}
111036
func (s *PutEventsRequestEntry) SetResources(v []*string) *PutEventsRequestEntry {
	s.Resources = v
	return s
}
143499
func (s *Job) SetResourceType(v string) *Job {
	s.ResourceType = &v
	return s
}
1209989
func (s *InstanceInformation) SetResourceType(v string) *InstanceInformation {
	s.ResourceType = &v
	return s
}
1036080
func (s *Resource) SetResourceType(v string) *Resource {
	s.ResourceType = &v
	return s
}
523542
func (g *Generator) SetWindowsServicing(servicing bool) {
	g.initConfigWindows()
	g.Config.Windows.Servicing = servicing
}