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

package v1alpha1

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

// MetadataConfigApplyConfiguration represents a declarative configuration of the MetadataConfig type for use
// with apply.
//
// MetadataConfig defines whether and how to send series metadata to remote write storage.
type MetadataConfigApplyConfiguration struct {
	// sendPolicy specifies whether to send metadata and how it is configured.
	// Default: send metadata using platform-chosen defaults (e.g. send interval 30 seconds).
	// Custom: send metadata using the settings in the custom field.
	SendPolicy *configv1alpha1.MetadataConfigSendPolicy `json:"sendPolicy,omitempty"`
	// custom defines custom metadata send settings. Required when sendPolicy is Custom (must have at least one property), and forbidden when sendPolicy is Default.
	Custom *MetadataConfigCustomApplyConfiguration `json:"custom,omitempty"`
}

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

// WithSendPolicy sets the SendPolicy 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 SendPolicy field is set to the value of the last call.
func (b *MetadataConfigApplyConfiguration) WithSendPolicy(value configv1alpha1.MetadataConfigSendPolicy) *MetadataConfigApplyConfiguration {
	b.SendPolicy = &value
	return b
}

// WithCustom sets the Custom 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 Custom field is set to the value of the last call.
func (b *MetadataConfigApplyConfiguration) WithCustom(value *MetadataConfigCustomApplyConfiguration) *MetadataConfigApplyConfiguration {
	b.Custom = value
	return b
}
