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

package v1

import (
	operatorv1 "github.com/openshift/api/operator/v1"
)

// NodeDisruptionPolicyStatusUnitApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyStatusUnit type for use
// with apply.
type NodeDisruptionPolicyStatusUnitApplyConfiguration struct {
	Name    *operatorv1.NodeDisruptionPolicyServiceName          `json:"name,omitempty"`
	Actions []NodeDisruptionPolicyStatusActionApplyConfiguration `json:"actions,omitempty"`
}

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

// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithName(value operatorv1.NodeDisruptionPolicyServiceName) *NodeDisruptionPolicyStatusUnitApplyConfiguration {
	b.Name = &value
	return b
}

// WithActions adds the given value to the Actions 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 Actions field.
func (b *NodeDisruptionPolicyStatusUnitApplyConfiguration) WithActions(values ...*NodeDisruptionPolicyStatusActionApplyConfiguration) *NodeDisruptionPolicyStatusUnitApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithActions")
		}
		b.Actions = append(b.Actions, *values[i])
	}
	return b
}
