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

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

package v3

import (
	numorstring "github.com/projectcalico/api/pkg/lib/numorstring"
)

// BGPFilterPrependASPathApplyConfiguration represents a declarative configuration of the BGPFilterPrependASPath type for use
// with apply.
//
// BGPFilterPrependASPath specifies AS numbers to prepend to a route's AS path.
type BGPFilterPrependASPathApplyConfiguration struct {
	// Prefix is the sequence of AS numbers to prepend to the route's AS path.
	// The resulting path starts with these AS numbers in the order listed;
	// e.g. [65000, 65001] produces the path "65000 65001 <original>".
	Prefix []numorstring.ASNumber `json:"prefix,omitempty"`
}

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

// WithPrefix adds the given value to the Prefix 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 Prefix field.
func (b *BGPFilterPrependASPathApplyConfiguration) WithPrefix(values ...numorstring.ASNumber) *BGPFilterPrependASPathApplyConfiguration {
	for i := range values {
		b.Prefix = append(b.Prefix, values[i])
	}
	return b
}
