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

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

package v3

// CommunityApplyConfiguration represents a declarative configuration of the Community type for use
// with apply.
//
// Community contains standard or large community value and its name.
type CommunityApplyConfiguration struct {
	// Name given to community value.
	Name *string `json:"name,omitempty"`
	// Value must be of format `aa:nn` or `aa:nn:mm`.
	// For standard community use `aa:nn` format, where `aa` and `nn` are 16 bit number.
	// For large community use `aa:nn:mm` format, where `aa`, `nn` and `mm` are 32 bit number.
	// Where, `aa` is an AS Number, `nn` and `mm` are per-AS identifier.
	Value *string `json:"value,omitempty"`
}

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

// WithName sets the Name 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 Name field is set to the value of the last call.
func (b *CommunityApplyConfiguration) WithName(value string) *CommunityApplyConfiguration {
	b.Name = &value
	return b
}

// WithValue sets the Value 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 Value field is set to the value of the last call.
func (b *CommunityApplyConfiguration) WithValue(value string) *CommunityApplyConfiguration {
	b.Value = &value
	return b
}
