2deced7d40
* Introduce new models RoutingTree, RouteDefaults and Route and api-server to serve them that is backed by provisioning notification policy service. * update method UpdatePolicyTree of notification policy service to return route and new version * declare new actions alert.notifications.routes:read and alert.notifications.routes:write and two corresponding fixed roles. --------- Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com> Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
48 lines
1.8 KiB
Go
48 lines
1.8 KiB
Go
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Code generated by applyconfiguration-gen. DO NOT EDIT.
|
|
|
|
package v0alpha1
|
|
|
|
import (
|
|
v0alpha1 "github.com/grafana/grafana/pkg/apis/alerting_notifications/v0alpha1"
|
|
)
|
|
|
|
// MatcherApplyConfiguration represents a declarative configuration of the Matcher type for use
|
|
// with apply.
|
|
type MatcherApplyConfiguration struct {
|
|
Label *string `json:"label,omitempty"`
|
|
Type *v0alpha1.MatcherType `json:"type,omitempty"`
|
|
Value *string `json:"value,omitempty"`
|
|
}
|
|
|
|
// MatcherApplyConfiguration constructs a declarative configuration of the Matcher type for use with
|
|
// apply.
|
|
func Matcher() *MatcherApplyConfiguration {
|
|
return &MatcherApplyConfiguration{}
|
|
}
|
|
|
|
// WithLabel sets the Label 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 Label field is set to the value of the last call.
|
|
func (b *MatcherApplyConfiguration) WithLabel(value string) *MatcherApplyConfiguration {
|
|
b.Label = &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 *MatcherApplyConfiguration) WithType(value v0alpha1.MatcherType) *MatcherApplyConfiguration {
|
|
b.Type = &value
|
|
return b
|
|
}
|
|
|
|
// WithValue sets the Value 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 Value field is set to the value of the last call.
|
|
func (b *MatcherApplyConfiguration) WithValue(value string) *MatcherApplyConfiguration {
|
|
b.Value = &value
|
|
return b
|
|
}
|