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

package v1

import (
	corev1 "k8s.io/api/core/v1"
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

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

// NodePlacementApplyConfiguration constructs an 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 v1.LabelSelector) *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
}
