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

// CalicoNodePeerApplyConfiguration represents a declarative configuration of the CalicoNodePeer type for use
// with apply.
//
// CalicoNodePeer contains the status of BGP peers on the node.
type CalicoNodePeerApplyConfiguration struct {
	// IP address of the peer whose condition we are reporting.
	PeerIP *string `json:"peerIP,omitempty"`
	// Type indicates whether this peer is configured via the node-to-node mesh,
	// or via en explicit global or per-node BGPPeer object.
	Type *projectcalicov3.BGPPeerType `json:"type,omitempty"`
	// State is the BGP session state.
	State *projectcalicov3.BGPSessionState `json:"state,omitempty"`
	// Since the state or reason last changed.
	Since *string `json:"since,omitempty"`
}

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

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

// WithType sets the Type 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 Type field is set to the value of the last call.
func (b *CalicoNodePeerApplyConfiguration) WithType(value projectcalicov3.BGPPeerType) *CalicoNodePeerApplyConfiguration {
	b.Type = &value
	return b
}

// WithState sets the State 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 State field is set to the value of the last call.
func (b *CalicoNodePeerApplyConfiguration) WithState(value projectcalicov3.BGPSessionState) *CalicoNodePeerApplyConfiguration {
	b.State = &value
	return b
}

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