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

package v1alpha1

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

// NodeExporterCollectorNetClassConfigApplyConfiguration represents a declarative configuration of the NodeExporterCollectorNetClassConfig type for use
// with apply.
//
// NodeExporterCollectorNetClassConfig provides configuration for the netclass collector
// of the node-exporter agent. The netclass collector collects information about network devices
// such as network speed, MTU, and carrier status.
// It is enabled by default.
// When collectionPolicy is DoNotCollect, the collect field must not be set.
type NodeExporterCollectorNetClassConfigApplyConfiguration struct {
	// collectionPolicy declares whether the netclass collector collects metrics.
	// This field is required.
	// Valid values are "Collect" and "DoNotCollect".
	// When set to "Collect", the netclass collector is active and network class information is collected.
	// When set to "DoNotCollect", the netclass collector is inactive and the corresponding metrics become unavailable.
	// When set to "DoNotCollect", the collect field must not be set.
	CollectionPolicy *configv1alpha1.NodeExporterCollectorCollectionPolicy `json:"collectionPolicy,omitempty"`
	// collect contains configuration options that apply only when the netclass 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 *NodeExporterCollectorNetClassCollectConfigApplyConfiguration `json:"collect,omitempty"`
}

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

// 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 *NodeExporterCollectorNetClassConfigApplyConfiguration) WithCollectionPolicy(value configv1alpha1.NodeExporterCollectorCollectionPolicy) *NodeExporterCollectorNetClassConfigApplyConfiguration {
	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 *NodeExporterCollectorNetClassConfigApplyConfiguration) WithCollect(value *NodeExporterCollectorNetClassCollectConfigApplyConfiguration) *NodeExporterCollectorNetClassConfigApplyConfiguration {
	b.Collect = value
	return b
}
