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

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

package v3

import (
	projectcalicov3 "github.com/projectcalico/api/pkg/apis/projectcalico/v3"
)

// MigrationControllerConfigApplyConfiguration represents a declarative configuration of the MigrationControllerConfig type for use
// with apply.
type MigrationControllerConfigApplyConfiguration struct {
	// PolicyNameMigrator enables or disables the Policy Name Migrator, which migrates
	// old-style Calico backend policy names to use v3 style names.
	PolicyNameMigrator *projectcalicov3.ControllerMode `json:"enabled,omitempty"`
}

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

// WithPolicyNameMigrator sets the PolicyNameMigrator 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 PolicyNameMigrator field is set to the value of the last call.
func (b *MigrationControllerConfigApplyConfiguration) WithPolicyNameMigrator(value projectcalicov3.ControllerMode) *MigrationControllerConfigApplyConfiguration {
	b.PolicyNameMigrator = &value
	return b
}
