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

// CalicoNodeRouteApplyConfiguration represents a declarative configuration of the CalicoNodeRoute type for use
// with apply.
//
// CalicoNodeRoute contains the status of BGP routes on the node.
type CalicoNodeRouteApplyConfiguration struct {
	// Type indicates if the route is being used for forwarding or not.
	Type *projectcalicov3.CalicoNodeRouteType `json:"type,omitempty"`
	// Destination of the route.
	Destination *string `json:"destination,omitempty"`
	// Gateway for the destination.
	Gateway *string `json:"gateway,omitempty"`
	// Interface for the destination
	Interface *string `json:"interface,omitempty"`
	// LearnedFrom contains information regarding where this route originated.
	LearnedFrom *CalicoNodeRouteLearnedFromApplyConfiguration `json:"learnedFrom,omitempty"`
}

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

// 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 *CalicoNodeRouteApplyConfiguration) WithType(value projectcalicov3.CalicoNodeRouteType) *CalicoNodeRouteApplyConfiguration {
	b.Type = &value
	return b
}

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

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

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

// WithLearnedFrom sets the LearnedFrom 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 LearnedFrom field is set to the value of the last call.
func (b *CalicoNodeRouteApplyConfiguration) WithLearnedFrom(value *CalicoNodeRouteLearnedFromApplyConfiguration) *CalicoNodeRouteApplyConfiguration {
	b.LearnedFrom = value
	return b
}
