// SetCapacity specifies, relative to other nodes, how many assignments the
// node should have.
436223
func (n *BuilderNode) SetCapacity(v int) {
	n.builder.ring.NodeToCapacity[n.index] = v
}
636479
func (p *PodUpgrade) SetMinimumHealthCapacity(capacity float64) *PodUpgrade {
	p.MinimumHealthCapacity = &capacity
	return p
}
1176899
func (n *NodeInfo) SetNode(node *v1.Node) error {
	n.node = node

	n.allocatableResource = NewResource(node.Status.Allocatable)

	n.taints = node.Spec.Taints
	for i := range node.Status.Conditions {
		cond := &node.Status.Conditions[i]
		switch cond.Type {
		case v1.NodeMemoryPressure:
			n.memoryPressureCondition = cond.Status
		case v1.NodeDiskPressure:
			n.diskPressureCondition = cond.Status
		case v1.NodePIDPressure:
			n.pidPressureCondition = cond.Status
		default:
			// We ignore other conditions.
		}
	}
	n.TransientInfo = NewTransientSchedulerInfo()
	n.generation = nextGeneration()
	return nil
}
13568
func (s *FileSystem) SetStorageCapacity(v int64) *FileSystem {
	s.StorageCapacity = &v
	return s
}
254941
func (s *InstanceTypeConfig) SetWeightedCapacity(v int64) *InstanceTypeConfig {
	s.WeightedCapacity = &v
	return s
}
204646
func (s *ConsumedCapacity) SetCapacityUnits(v float64) *ConsumedCapacity {
	s.CapacityUnits = &v
	return s
}
1174656
func (s *UpdateFleetInput) SetComputeCapacity(v *ComputeCapacity) *UpdateFleetInput {
	s.ComputeCapacity = v
	return s
}
991541
func (s *ModifyCurrentDBClusterCapacityOutput) SetCurrentCapacity(v int64) *ModifyCurrentDBClusterCapacityOutput {
	s.CurrentCapacity = &v
	return s
}
1084021
func (db *StakeDatabase) SetPoolCacheCapacity(cap int) error {
	return db.poolInfo.SetCapacity(cap)
}
1319361
func (p *peerConnection) NodeDataCapacity(targetRTT time.Duration) int {
	p.lock.RLock()
	defer p.lock.RUnlock()

	return int(math.Min(1+math.Max(1, p.stateThroughput*float64(targetRTT)/float64(time.Second)), float64(MaxStateFetch)))
}
142440
func (s *CreateStackInput) SetCapabilities(v []*string) *CreateStackInput {
	s.Capabilities = v
	return s
}
1066491
func (s *UpdateAutoScalingGroupInput) SetDesiredCapacity(v int64) *UpdateAutoScalingGroupInput {
	s.DesiredCapacity = &v
	return s
}
395714
func (s *RootStorage) SetCapacity(v string) *RootStorage {
	s.Capacity = &v
	return s
}
601962
func (s *ListNodesOutput) SetNodes(v []*NodeSummary) *ListNodesOutput {
	s.Nodes = v
	return s
}
1163470
func (s *JobUpdate) SetAllocatedCapacity(v int64) *JobUpdate {
	s.AllocatedCapacity = &v
	return s
}
914530
func (s *CreateJobInput) SetAllocatedCapacity(v int64) *CreateJobInput {
	s.AllocatedCapacity = &v
	return s
}
1257382
func (s *StackSet) SetCapabilities(v []*string) *StackSet {
	s.Capabilities = v
	return s
}