// SetNodeCondition updates specific node condition with patch operation.
330612
func SetNodeCondition(c clientset.Interface, node types.NodeName, condition v1.NodeCondition) error {
	generatePatch := func(condition v1.NodeCondition) ([]byte, error) {
		raw, err := json.Marshal(&[]v1.NodeCondition{condition})
		if err != nil {
			return nil, err
		}
		return []byte(fmt.Sprintf(`{"status":{"conditions":%s}}`, raw)), nil
	}
	condition.LastHeartbeatTime = metav1.NewTime(time.Now())
	patch, err := generatePatch(condition)
	if err != nil {
		return nil
	}
	_, err = c.CoreV1().Nodes().PatchStatus(string(node), patch)
	return err
}
106577
func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput {
	s.Conditions = v
	return s
}
269190
func (manager *configManager) SetNodeConf(config *NodeConfig) error {
	if config == nil {
		return fmt.Errorf("input cannot be nil")
	}

	if len(config.NodeId) == 0 {
		return fmt.Errorf("node id cannot be nil")
	}

	manager.Lock()
	defer manager.Unlock()

	// push node data into kvdb
	if _, err := manager.kv.Put(getNodeKeyFromNodeID(config.NodeId), config, 0); err != nil {
		return err
	}

	return nil
}
1004207
func (s *ReservedNode) SetNodeCount(v int64) *ReservedNode {
	s.NodeCount = &v
	return s
}
587439
func (s *TrainingJob) SetStoppingCondition(v *StoppingCondition) *TrainingJob {
	s.StoppingCondition = v
	return s
}
1108874
func (s *RestoreFromClusterSnapshotInput) SetNodeType(v string) *RestoreFromClusterSnapshotInput {
	s.NodeType = &v
	return s
}
1372179
func (s *Rule) SetConditions(v []*RuleCondition) *Rule {
	s.Conditions = v
	return s
}
244012
func (a *SetBreakpointOnFunctionCallArgs) SetCondition(condition string) *SetBreakpointOnFunctionCallArgs {
	a.Condition = &condition
	return a
}
632730
func setCondition(hpa *autoscalingv2.HorizontalPodAutoscaler, conditionType autoscalingv2.HorizontalPodAutoscalerConditionType, status v1.ConditionStatus, reason, message string, args ...interface{}) {
	hpa.Status.Conditions = setConditionInList(hpa.Status.Conditions, conditionType, status, reason, message, args...)
}
1073041
func (s *ModifyRuleInput) SetConditions(v []*RuleCondition) *ModifyRuleInput {
	s.Conditions = v
	return s
}
45514
func (s *NodeSnapshot) SetNodeGroupConfiguration(v *NodeGroupConfiguration) *NodeSnapshot {
	s.NodeGroupConfiguration = v
	return s
}
1035845
func (s *Node) SetNodeId(v string) *Node {
	s.NodeId = &v
	return s
}
54527
func (fm *FingerprintManager) setNode(node *structs.Node) {
	fm.nodeLock.Lock()
	defer fm.nodeLock.Unlock()
	fm.node = node
}
1365535
func SetCondition(status *apps.ReplicaSetStatus, condition apps.ReplicaSetCondition) {
	currentCond := GetCondition(*status, condition.Type)
	if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {
		return
	}
	newConditions := filterOutCondition(status.Conditions, condition.Type)
	status.Conditions = append(newConditions, condition)
}
1075445
func (s *NodeInfo) SetNodeType(v string) *NodeInfo {
	s.NodeType = &v
	return s
}
944020
func (s *ListStreamsInput) SetStreamNameCondition(v *StreamNameCondition) *ListStreamsInput {
	s.StreamNameCondition = v
	return s
}
1239526
func (s *OperationFilter) SetCondition(v string) *OperationFilter {
	s.Condition = &v
	return s
}