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

package v1

// NodeDisruptionPolicyClusterStatusApplyConfiguration represents a declarative configuration of the NodeDisruptionPolicyClusterStatus type for use
// with apply.
//
// NodeDisruptionPolicyClusterStatus is the type for the status object, rendered by the controller as a
// merge of cluster defaults and user provided policies
type NodeDisruptionPolicyClusterStatusApplyConfiguration struct {
	// files is a list of MachineConfig file definitions and actions to take to changes on those paths
	Files []NodeDisruptionPolicyStatusFileApplyConfiguration `json:"files,omitempty"`
	// units is a list MachineConfig unit definitions and actions to take on changes to those services
	Units []NodeDisruptionPolicyStatusUnitApplyConfiguration `json:"units,omitempty"`
	// sshkey is the overall sshkey MachineConfig definition
	SSHKey *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration `json:"sshkey,omitempty"`
}

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

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

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

// WithSSHKey sets the SSHKey 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 SSHKey field is set to the value of the last call.
func (b *NodeDisruptionPolicyClusterStatusApplyConfiguration) WithSSHKey(value *NodeDisruptionPolicyStatusSSHKeyApplyConfiguration) *NodeDisruptionPolicyClusterStatusApplyConfiguration {
	b.SSHKey = value
	return b
}
