// Set the affinity field of the given VM.
508749
func (_class VMClass) SetAffinity(sessionID SessionRef, self VMRef, value HostRef) (_err error) {
	_method := "VM.set_affinity"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_valueArg, _err := convertHostRefToXen(fmt.Sprintf("%s(%s)", _method, "value"), value)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _valueArg)
	return
}
826699
func (s *VmServer) SetVmManagerType(v string) *VmServer {
	s.VmManagerType = &v
	return s
}
549106
func (s *logger) SetStaticField(name string, value interface{}) {
	s.staticArgs[name] = fmt.Sprintf("%v", value)
}
1272332
func (d *Parallels9Driver) SetDefaultConfiguration(vmName string) error {
	commands := make([][]string, 5)
	commands[0] = []string{"set", vmName, "--startup-view", "same"}
	commands[1] = []string{"set", vmName, "--on-shutdown", "close"}
	commands[2] = []string{"set", vmName, "--on-window-close", "keep-running"}
	commands[3] = []string{"set", vmName, "--auto-share-camera", "off"}
	commands[4] = []string{"set", vmName, "--smart-guard", "off"}

	for _, command := range commands {
		err := d.Prlctl(command...)
		if err != nil {
			return err
		}
	}
	return nil
}
481237
func (e Enum) setValue(v interface{}, key string) error {
	i, err := e.GetValue(key)
	if err != nil {
		return err
	}

	vValue := reflect.ValueOf(v).Elem()
	if !vValue.CanSet() {
		panic(fmt.Errorf("flagenum: Cannot set supplied value, %v", vValue))
	}

	iValue := reflect.ValueOf(i)
	if !vValue.Type().AssignableTo(iValue.Type()) {
		panic(fmt.Errorf("flagenum: Enumeration type (%v) is incompatible with supplied value (%v)",
			vValue.Type(), iValue.Type()))
	}

	vValue.Set(iValue)
	return nil
}
1221228
func (_class VMClass) SetIsATemplate(sessionID SessionRef, self VMRef, value bool) (_err error) {
	_method := "VM.set_is_a_template"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_valueArg, _err := convertBoolToXen(fmt.Sprintf("%s(%s)", _method, "value"), value)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _valueArg)
	return
}
1342153
func (s *UpdateVPCEConfigurationOutput) SetVpceConfiguration(v *VPCEConfiguration) *UpdateVPCEConfigurationOutput {
	s.VpceConfiguration = v
	return s
}
253401
func (g *Generator) SetVMKernelParameters(parameters []string) {
	g.initConfigVMKernel()
	g.Config.VM.Kernel.Parameters = parameters
}
318170
func (b *Box) SetTitleAlign(align int) *Box {
	b.titleAlign = align
	return b
}
736974
func (s *Listener) SetClientAffinity(v string) *Listener {
	s.ClientAffinity = &v
	return s
}
705149
func (f *FieldHeaderNames) Set(value string) error {
	// When arguments are passed through YAML, escaped double quotes
	// might be added to this string, and they would break the last
	// key/value pair. This ensures the string is clean.
	value = strings.Trim(value, "\"")

	fields := strings.Fields(value)

	for _, field := range fields {
		n := strings.SplitN(field, "=", 2)
		(*f)[n[0]] = n[1]
	}

	return nil
}
627669
func (s *AllocateTransitVirtualInterfaceOutput) SetVirtualInterface(v *VirtualInterface) *AllocateTransitVirtualInterfaceOutput {
	s.VirtualInterface = v
	return s
}
820461
func (t *Text) SetAlignment(align Alignment) {
	if align != t.align {
		t.align = align
		t.PostEventWidgetContent(t)
	}
}
330623
func (s *VolumeConfiguration) SetVolumeType(v string) *VolumeConfiguration {
	s.VolumeType = &v
	return s
}
57417
func (c *expvarStatsClient) Set(name string, value string, rate float64) {
	var s expvar.String
	s.Set(value)
	c.m.Set(name, &s)
}
38182
func (_class VMClass) SetAppliance(sessionID SessionRef, self VMRef, value VMApplianceRef) (_err error) {
	_method := "VM.set_appliance"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVMRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_valueArg, _err := convertVMApplianceRefToXen(fmt.Sprintf("%s(%s)", _method, "value"), value)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg, _valueArg)
	return
}
503210
func (g *Generator) SetVMHypervisorPath(path string) error {
	if !strings.HasPrefix(path, "/") {
		return fmt.Errorf("hypervisorPath %v is not an absolute path", path)
	}
	g.initConfigVMHypervisor()
	g.Config.VM.Hypervisor.Path = path
	return nil
}