// 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"
)

// BGPFilterCommunityMatchApplyConfiguration represents a declarative configuration of the BGPFilterCommunityMatch type for use
// with apply.
//
// BGPFilterCommunityMatch specifies community-based match criteria for a BGP filter rule.
// Currently only a single community value is supported.  A MatchOperator field may be
// introduced in the future to support anyOf/allOf semantics with multiple values.
type BGPFilterCommunityMatchApplyConfiguration struct {
	// Values is a list of BGP community values to match against.
	Values []projectcalicov3.BGPCommunityValue `json:"values,omitempty"`
}

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

// WithValues adds the given value to the Values 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 Values field.
func (b *BGPFilterCommunityMatchApplyConfiguration) WithValues(values ...projectcalicov3.BGPCommunityValue) *BGPFilterCommunityMatchApplyConfiguration {
	for i := range values {
		b.Values = append(b.Values, values[i])
	}
	return b
}
