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

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

package v3

// ControllersConfigApplyConfiguration represents a declarative configuration of the ControllersConfig type for use
// with apply.
//
// ControllersConfig enables and configures individual Kubernetes controllers
type ControllersConfigApplyConfiguration struct {
	// Node enables and configures the node controller. Enabled by default, set to nil to disable.
	Node *NodeControllerConfigApplyConfiguration `json:"node,omitempty"`
	// Policy enables and configures the policy controller. Enabled by default, set to nil to disable.
	Policy *PolicyControllerConfigApplyConfiguration `json:"policy,omitempty"`
	// WorkloadEndpoint enables and configures the workload endpoint controller. Enabled by default, set to nil to disable.
	WorkloadEndpoint *WorkloadEndpointControllerConfigApplyConfiguration `json:"workloadEndpoint,omitempty"`
	// ServiceAccount enables and configures the service account controller. Enabled by default, set to nil to disable.
	ServiceAccount *ServiceAccountControllerConfigApplyConfiguration `json:"serviceAccount,omitempty"`
	// Namespace enables and configures the namespace controller. Enabled by default, set to nil to disable.
	Namespace *NamespaceControllerConfigApplyConfiguration `json:"namespace,omitempty"`
	// LoadBalancer enables and configures the LoadBalancer controller. Enabled by default, set to nil to disable.
	LoadBalancer *LoadBalancerControllerConfigApplyConfiguration `json:"loadBalancer,omitempty"`
	// Migration enables and configures migration controllers.
	Migration *MigrationControllerConfigApplyConfiguration `json:"policyMigration,omitempty"`
}

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

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

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

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

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

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

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

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