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

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

package v3

// BGPFilterOperationApplyConfiguration represents a declarative configuration of the BGPFilterOperation type for use
// with apply.
//
// BGPFilterOperation is a discriminated union representing a single route modification.
// Exactly one field must be set.
type BGPFilterOperationApplyConfiguration struct {
	// AddCommunity adds the specified BGP community to the route.
	AddCommunity *BGPFilterAddCommunityApplyConfiguration `json:"addCommunity,omitempty"`
	// PrependASPath prepends the specified AS numbers to the route's AS path.
	PrependASPath *BGPFilterPrependASPathApplyConfiguration `json:"prependASPath,omitempty"`
	// SetPriority sets the route's priority (metric), in the same units as the
	// ...RoutePriority fields in FelixConfiguration.
	SetPriority *BGPFilterSetPriorityApplyConfiguration `json:"setPriority,omitempty"`
}

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

// WithAddCommunity sets the AddCommunity 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 AddCommunity field is set to the value of the last call.
func (b *BGPFilterOperationApplyConfiguration) WithAddCommunity(value *BGPFilterAddCommunityApplyConfiguration) *BGPFilterOperationApplyConfiguration {
	b.AddCommunity = value
	return b
}

// WithPrependASPath sets the PrependASPath 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 PrependASPath field is set to the value of the last call.
func (b *BGPFilterOperationApplyConfiguration) WithPrependASPath(value *BGPFilterPrependASPathApplyConfiguration) *BGPFilterOperationApplyConfiguration {
	b.PrependASPath = value
	return b
}

// WithSetPriority sets the SetPriority 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 SetPriority field is set to the value of the last call.
func (b *BGPFilterOperationApplyConfiguration) WithSetPriority(value *BGPFilterSetPriorityApplyConfiguration) *BGPFilterOperationApplyConfiguration {
	b.SetPriority = value
	return b
}
