// Code generated by applyconfiguration-gen. DO NOT EDIT.

package v1

import (
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/client-go/applyconfigurations/meta/v1"
)

// NodePlacementApplyConfiguration represents a declarative configuration of the NodePlacement type for use
// with apply.
type NodePlacementApplyConfiguration struct {
	NodeSelector *metav1.LabelSelectorApplyConfiguration `json:"nodeSelector,omitempty"`
	Tolerations  []corev1.Toleration                     `json:"tolerations,omitempty"`
}

// NodePlacementApplyConfiguration constructs a declarative configuration of the NodePlacement type for use with
// apply.
func NodePlacement() *NodePlacementApplyConfiguration {
	return &NodePlacementApplyConfiguration{}
}

// WithNodeSelector sets the NodeSelector field in the declarative configuration to the given value
// and returns the receiver, so that objects can be built by chaining "With" function invocations.
// If called multiple times, the NodeSelector field is set to the value of the last call.
func (b *NodePlacementApplyConfiguration) WithNodeSelector(value *metav1.LabelSelectorApplyConfiguration) *NodePlacementApplyConfiguration {
	b.NodeSelector = value
	return b
}

// WithTolerations adds the given value to the Tolerations field in the declarative configuration
// and returns the receiver, so that objects can be build by chaining "With" function invocations.
// If called multiple times, values provided by each call will be appended to the Tolerations field.
func (b *NodePlacementApplyConfiguration) WithTolerations(values ...corev1.Toleration) *NodePlacementApplyConfiguration {
	for i := range values {
		b.Tolerations = append(b.Tolerations, values[i])
	}
	return b
}
