// SPDX-License-Identifier: AGPL-3.0-only // Code generated by applyconfiguration-gen. DO NOT EDIT. package v0alpha1 // RoutingTreeSpecApplyConfiguration represents a declarative configuration of the RoutingTreeSpec type for use // with apply. type RoutingTreeSpecApplyConfiguration struct { Defaults *RouteDefaultsApplyConfiguration `json:"defaults,omitempty"` Routes []RouteApplyConfiguration `json:"routes,omitempty"` } // RoutingTreeSpecApplyConfiguration constructs a declarative configuration of the RoutingTreeSpec type for use with // apply. func RoutingTreeSpec() *RoutingTreeSpecApplyConfiguration { return &RoutingTreeSpecApplyConfiguration{} } // WithDefaults sets the Defaults 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 Defaults field is set to the value of the last call. func (b *RoutingTreeSpecApplyConfiguration) WithDefaults(value *RouteDefaultsApplyConfiguration) *RoutingTreeSpecApplyConfiguration { b.Defaults = value return b } // WithRoutes adds the given value to the Routes 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 Routes field. func (b *RoutingTreeSpecApplyConfiguration) WithRoutes(values ...*RouteApplyConfiguration) *RoutingTreeSpecApplyConfiguration { for i := range values { if values[i] == nil { panic("nil value passed to WithRoutes") } b.Routes = append(b.Routes, *values[i]) } return b }