// See also https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSetMaxMemory
190341
func (d *Domain) SetMaxMemory(memory uint) error {
	var err C.virError
	result := C.virDomainSetMaxMemoryWrapper(d.ptr, C.ulong(memory), &err)
	if result == -1 {
		return makeError(&err)
	}
	return nil
}
1069723
func (s *JobUpdate) SetMaxRetries(v int64) *JobUpdate {
	s.MaxRetries = &v
	return s
}
811642
func (d *Domain) GetMaxMemory() (uint64, error) {
	var err C.virError
	ret := C.virDomainGetMaxMemoryWrapper(d.ptr, &err)
	if ret == 0 {
		return 0, makeError(&err)
	}

	return uint64(ret), nil
}
73375
func (s *Group) SetMaxSize(v int64) *Group {
	s.MaxSize = &v
	return s
}
9886
func (s *OrderableReplicationInstance) SetMaxAllocatedStorage(v int64) *OrderableReplicationInstance {
	s.MaxAllocatedStorage = &v
	return s
}
620957
func (s *ContainerOverride) SetMemory(v int64) *ContainerOverride {
	s.Memory = &v
	return s
}
1338874
func (window *Window) SetMaximumSize(maxW, maxH int32) {
	C.SDL_SetWindowMaximumSize(window.cptr(), C.int(maxW), C.int(maxH))
}
288358
func (c *Connect) SetMemoryParameters(params *NodeMemoryParameters, flags uint32) error {
	info := getMemoryParameterFieldInfo(params)

	cparams, cnparams, gerr := typedParamsPackNew(info)
	if gerr != nil {
		return gerr
	}

	defer C.virTypedParamsFree(cparams, cnparams)

	var err C.virError
	ret := C.virNodeSetMemoryParametersWrapper(c.ptr, cparams, cnparams, C.uint(flags), &err)
	if ret == -1 {
		return makeError(&err)
	}

	return nil
}
1111147
func (r *Ref) SetMaxHistory(m uint) *Ref {
	r.maxHistory = m
	return r
}
572064
func (s *ScheduledUpdateGroupActionRequest) SetMaxSize(v int64) *ScheduledUpdateGroupActionRequest {
	s.MaxSize = &v
	return s
}
1147024
func (s *Container) SetMemory(v string) *Container {
	s.Memory = &v
	return s
}
402575
func (s *Profile) SetMaxVolumeLimit(v int64) *Profile {
	s.MaxVolumeLimit = &v
	return s
}
1019345
func (s *UpdateProfileInput) SetMaxVolumeLimit(v int64) *UpdateProfileInput {
	s.MaxVolumeLimit = &v
	return s
}
452763
func (s *CampaignLimits) SetMaximumDuration(v int64) *CampaignLimits {
	s.MaximumDuration = &v
	return s
}
901789
func (s *AccountQuota) SetMax(v int64) *AccountQuota {
	s.Max = &v
	return s
}
1207891
func (c *ServicedCli) cmdHostSetMemory(ctx *cli.Context) {
	args := ctx.Args()
	if len(args) < 2 {
		fmt.Printf("Incorrect Usage.\n\n")
		cli.ShowCommandHelp(ctx, "set-memory")
		return
	}

	if err := c.driver.SetHostMemory(api.HostUpdateConfig{args[0], args[1]}); err != nil {
		fmt.Fprintln(os.Stderr, err)
	}
}
283710
func (c *Client) SetMaxRetries(retries int) {
	c.modifyLock.RLock()
	c.config.modifyLock.Lock()
	defer c.config.modifyLock.Unlock()
	c.modifyLock.RUnlock()

	c.config.MaxRetries = retries
}