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

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

package v3

// CalicoNodeBGPStatusApplyConfiguration represents a declarative configuration of the CalicoNodeBGPStatus type for use
// with apply.
//
// CalicoNodeBGPStatus defines the observed state of BGP status on the node.
type CalicoNodeBGPStatusApplyConfiguration struct {
	// The total number of IPv4 established bgp sessions.
	NumberEstablishedV4 *int `json:"numberEstablishedV4,omitempty"`
	// The total number of IPv4 non-established bgp sessions.
	NumberNotEstablishedV4 *int `json:"numberNotEstablishedV4,omitempty"`
	// The total number of IPv6 established bgp sessions.
	NumberEstablishedV6 *int `json:"numberEstablishedV6,omitempty"`
	// The total number of IPv6 non-established bgp sessions.
	NumberNotEstablishedV6 *int `json:"numberNotEstablishedV6,omitempty"`
	// PeersV4 represents IPv4 BGP peers status on the node.
	PeersV4 []CalicoNodePeerApplyConfiguration `json:"peersV4,omitempty"`
	// PeersV6 represents IPv6 BGP peers status on the node.
	PeersV6 []CalicoNodePeerApplyConfiguration `json:"peersV6,omitempty"`
}

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

// WithNumberEstablishedV4 sets the NumberEstablishedV4 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 NumberEstablishedV4 field is set to the value of the last call.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithNumberEstablishedV4(value int) *CalicoNodeBGPStatusApplyConfiguration {
	b.NumberEstablishedV4 = &value
	return b
}

// WithNumberNotEstablishedV4 sets the NumberNotEstablishedV4 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 NumberNotEstablishedV4 field is set to the value of the last call.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithNumberNotEstablishedV4(value int) *CalicoNodeBGPStatusApplyConfiguration {
	b.NumberNotEstablishedV4 = &value
	return b
}

// WithNumberEstablishedV6 sets the NumberEstablishedV6 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 NumberEstablishedV6 field is set to the value of the last call.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithNumberEstablishedV6(value int) *CalicoNodeBGPStatusApplyConfiguration {
	b.NumberEstablishedV6 = &value
	return b
}

// WithNumberNotEstablishedV6 sets the NumberNotEstablishedV6 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 NumberNotEstablishedV6 field is set to the value of the last call.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithNumberNotEstablishedV6(value int) *CalicoNodeBGPStatusApplyConfiguration {
	b.NumberNotEstablishedV6 = &value
	return b
}

// WithPeersV4 adds the given value to the PeersV4 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 PeersV4 field.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithPeersV4(values ...*CalicoNodePeerApplyConfiguration) *CalicoNodeBGPStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithPeersV4")
		}
		b.PeersV4 = append(b.PeersV4, *values[i])
	}
	return b
}

// WithPeersV6 adds the given value to the PeersV6 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 PeersV6 field.
func (b *CalicoNodeBGPStatusApplyConfiguration) WithPeersV6(values ...*CalicoNodePeerApplyConfiguration) *CalicoNodeBGPStatusApplyConfiguration {
	for i := range values {
		if values[i] == nil {
			panic("nil value passed to WithPeersV6")
		}
		b.PeersV6 = append(b.PeersV6, *values[i])
	}
	return b
}
