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

package v1alpha1

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

// NodeExporterCollectorBuddyInfoConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorBuddyInfoConfig type for use
// with apply.
//
// NodeExporterCollectorBuddyInfoConfig provides configuration for the buddyinfo collector
// of the node-exporter agent. The buddyinfo collector collects statistics about memory fragmentation
// from the node_buddyinfo_blocks metric using data from /proc/buddyinfo.
// It is disabled by default.
type NodeExporterCollectorBuddyInfoConfigApplyConfiguration struct {
	// collectionPolicy declares whether the buddyinfo collector collects metrics.
	// This field is required.
	// Valid values are "Collect" and "DoNotCollect".
	// When set to "Collect", the buddyinfo collector is active and memory fragmentation statistics are collected.
	// When set to "DoNotCollect", the buddyinfo collector is inactive.
	CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"`
}

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

// 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 *NodeExporterCollectorBuddyInfoConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorBuddyInfoConfigApplyConfiguration {
	b.CollectionPolicy = &value
	return b
}
