The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/generated/applyconfiguration/alerting_notifications/v0alpha1/routingtreespec.go

39 lines
1.6 KiB

// 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
}