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

package v1alpha1

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

// NodeExporterCollectorSystemdConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorSystemdConfig type for use
// with apply.
//
// NodeExporterCollectorSystemdConfig provides configuration for the systemd collector
// of the node-exporter agent. The systemd collector collects statistics on the systemd daemon
// and its managed services.
// It is disabled by default.
// Enabling this collector with a long list of selected units may produce metrics with high
// cardinality. If you enable this collector, closely monitor the prometheus-k8s deployment
// for excessive memory usage.
// When collectionPolicy is DoNotCollect, the collect field must not be set.
type NodeExporterCollectorSystemdConfigApplyConfiguration struct {
	// collectionPolicy declares whether the systemd collector collects metrics.
	// This field is required.
	// Valid values are "Collect" and "DoNotCollect".
	// When set to "Collect", the systemd collector is active and systemd unit statistics are collected.
	// When set to "DoNotCollect", the systemd collector is inactive and the collect field must not be set.
	CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"`
	// collect contains configuration options that apply only when the systemd collector is actively collecting metrics
	// (i.e. when collectionPolicy is Collect).
	// collect is optional and may be omitted even when collectionPolicy is Collect.
	// collect may only be set when collectionPolicy is Collect.
	// When set, at least one field must be specified within collect.
	Collect *NodeExporterCollectorSystemdCollectConfigApplyConfiguration `json:"collect,omitempty"`
}

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

// WithCollectionPolicy sets the CollectionPolicy 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 CollectionPolicy field is set to the value of the last call.
func (b *NodeExporterCollectorSystemdConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorSystemdConfigApplyConfiguration {
	b.CollectionPolicy = &value
	return b
}

// WithCollect sets the Collect 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 Collect field is set to the value of the last call.
func (b *NodeExporterCollectorSystemdConfigApplyConfiguration) WithCollect(value *NodeExporterCollectorSystemdCollectConfigApplyConfiguration) *NodeExporterCollectorSystemdConfigApplyConfiguration {
	b.Collect = value
	return b
}
