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

package v1alpha1

import (
	configv1alpha1 "github.com/openshift/api/config/v1alpha1"
)

// NodeExporterCollectorSystemdCollectConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorSystemdCollectConfig type for use
// with apply.
//
// NodeExporterCollectorSystemdCollectConfig holds configuration options for the systemd collector
// when it is actively collecting metrics. At least one field must be specified.
type NodeExporterCollectorSystemdCollectConfigApplyConfiguration struct {
	// units is a list of regular expression patterns that match systemd units to be included
	// by the systemd collector.
	// units is optional.
	// By default, the list is empty, so the collector exposes no metrics for systemd units.
	// Each entry is a regular expression pattern and must be at least 1 character and at most 1024 characters.
	// Maximum length for this list is 50.
	// Minimum length for this list is 1.
	// Entries in this list must be unique.
	Units []configv1alpha1.NodeExporterSystemdUnit `json:"units,omitempty"`
}

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

// 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 *NodeExporterCollectorSystemdCollectConfigApplyConfiguration) WithUnits(values ...configv1alpha1.NodeExporterSystemdUnit) *NodeExporterCollectorSystemdCollectConfigApplyConfiguration {
	for i := range values {
		b.Units = append(b.Units, values[i])
	}
	return b
}
