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

package v1alpha1

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

// KubeStateMetricsResourceLabelsApplyConfiguration represents a declarative configuration of the KubeStateMetricsResourceLabels type for use
// with apply.
//
// KubeStateMetricsResourceLabels defines which Kubernetes labels to expose as metrics
// for a given resource type in kube-state-metrics.
type KubeStateMetricsResourceLabelsApplyConfiguration struct {
	// resource is the Kubernetes resource name whose labels should be exposed as metrics.
	// Currently, only "Job" and "CronJob" are supported due to cardinality concerns.
	// Valid values are "Job" and "CronJob".
	// This field is required.
	Resource *configv1alpha1.KubeStateMetricsResourceName `json:"resource,omitempty"`
	// labels is the list of Kubernetes label names to expose as metrics for this resource.
	// Use "*" to expose all labels for the specified resource.
	// When "*" is specified, it must be the only entry in the list; mixing "*" with
	// specific label names is not allowed.
	// This field is required.
	// Each label name must be unique within this list.
	// Minimum length for this list is 1.
	// Maximum length for this list is 50.
	Labels []configv1alpha1.KubeStateMetricsLabelName `json:"labels,omitempty"`
}

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

// WithResource sets the Resource 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 Resource field is set to the value of the last call.
func (b *KubeStateMetricsResourceLabelsApplyConfiguration) WithResource(value configv1alpha1.KubeStateMetricsResourceName) *KubeStateMetricsResourceLabelsApplyConfiguration {
	b.Resource = &value
	return b
}

// WithLabels adds the given value to the Labels 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 Labels field.
func (b *KubeStateMetricsResourceLabelsApplyConfiguration) WithLabels(values ...configv1alpha1.KubeStateMetricsLabelName) *KubeStateMetricsResourceLabelsApplyConfiguration {
	for i := range values {
		b.Labels = append(b.Labels, values[i])
	}
	return b
}
