// Copyright (c) 2026 Tigera, Inc. All rights reserved.

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

package v3

import (
	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// KubeControllersConfigurationSpecApplyConfiguration represents a declarative configuration of the KubeControllersConfigurationSpec type for use
// with apply.
//
// KubeControllersConfigurationSpec contains the values of the Kubernetes controllers configuration.
type KubeControllersConfigurationSpecApplyConfiguration struct {
	// LogSeverityScreen is the log severity above which logs are sent to the stdout. [Default: Info]
	// Valid values are: "None", "Debug", "Info", "Warning", "Error", "Fatal", "Panic".
	LogSeverityScreen *string `json:"logSeverityScreen,omitempty"`
	// HealthChecks enables or disables support for health checks [Default: Enabled]
	// Valid values are: "Enabled", "Disabled".
	HealthChecks *string `json:"healthChecks,omitempty"`
	// EtcdV3CompactionPeriod is the period between etcdv3 compaction requests. Set to 0 to disable. [Default: 10m]
	EtcdV3CompactionPeriod *v1.Duration `json:"etcdV3CompactionPeriod,omitempty"`
	// PrometheusMetricsPort is the TCP port that the Prometheus metrics server should bind to. Set to 0 to disable. [Default: 9094]
	// Valid values are: 0-65535.
	PrometheusMetricsPort *int `json:"prometheusMetricsPort,omitempty"`
	// Controllers enables and configures individual Kubernetes controllers
	Controllers *ControllersConfigApplyConfiguration `json:"controllers,omitempty"`
	// DebugProfilePort configures the port to serve memory and cpu profiles on. If not specified, profiling
	// is disabled.
	// Valid values are: 0-65535.
	DebugProfilePort *int32 `json:"debugProfilePort,omitempty"`
}

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

// WithLogSeverityScreen sets the LogSeverityScreen 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 LogSeverityScreen field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithLogSeverityScreen(value string) *KubeControllersConfigurationSpecApplyConfiguration {
	b.LogSeverityScreen = &value
	return b
}

// WithHealthChecks sets the HealthChecks 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 HealthChecks field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithHealthChecks(value string) *KubeControllersConfigurationSpecApplyConfiguration {
	b.HealthChecks = &value
	return b
}

// WithEtcdV3CompactionPeriod sets the EtcdV3CompactionPeriod 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 EtcdV3CompactionPeriod field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithEtcdV3CompactionPeriod(value v1.Duration) *KubeControllersConfigurationSpecApplyConfiguration {
	b.EtcdV3CompactionPeriod = &value
	return b
}

// WithPrometheusMetricsPort sets the PrometheusMetricsPort 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 PrometheusMetricsPort field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithPrometheusMetricsPort(value int) *KubeControllersConfigurationSpecApplyConfiguration {
	b.PrometheusMetricsPort = &value
	return b
}

// WithControllers sets the Controllers 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 Controllers field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithControllers(value *ControllersConfigApplyConfiguration) *KubeControllersConfigurationSpecApplyConfiguration {
	b.Controllers = value
	return b
}

// WithDebugProfilePort sets the DebugProfilePort 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 DebugProfilePort field is set to the value of the last call.
func (b *KubeControllersConfigurationSpecApplyConfiguration) WithDebugProfilePort(value int32) *KubeControllersConfigurationSpecApplyConfiguration {
	b.DebugProfilePort = &value
	return b
}
