func IsBelow(value float64) ConditionOption {
	return func(cond *condition) {
		cond.builder.Evaluator = sdk.AlertEvaluator{Type: "lt", Params: []float64{value}}
	}
}
IsBelow will match queries returning a value below the given threshold.
package alert
import (
	"github.com/grafana-tools/sdk"
)
type Operator string
type ConditionOption func(condition *condition)
const And Operator = "and"
const Or Operator = "or"
type condition struct {
	builder *sdk.AlertCondition
}
func newCondition(options ...ConditionOption) *condition {
	cond := &condition{builder: &sdk.AlertCondition{
		Type: "query",
	}}
	for _, opt := range options {
		opt(cond)
	}
	return cond
}
func Avg(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "avg", Params: []string{}}
	}
}
func Sum(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "sum", Params: []string{}}
	}
}
func Count(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "count", Params: []string{}}
	}
}
func Last(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "last", Params: []string{}}
	}
}
func Min(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "min", Params: []string{}}
	}
}
func Max(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "max", Params: []string{}}
	}
}
func Median(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "median", Params: []string{}}
	}
}
func Diff(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "diff", Params: []string{}}
	}
}
func PercentDiff(refID string, from string, to string) ConditionOption {
	return func(cond *condition) {
		cond.builder.Query = sdk.AlertQuery{Params: []string{refID, from, to}}
		cond.builder.Reducer = sdk.AlertReducer{Type: "percent_diff", Params: []string{}}
	}
}
func HasNoValue() ConditionOption {
	return func(cond *condition) {
		cond.builder.Evaluator = sdk.AlertEvaluator{Type: "no_value", Params: []float64{}}
	}
}
func IsAbove(value float64) ConditionOption {
	return func(cond *condition) {
		cond.builder.Evaluator = sdk.AlertEvaluator{Type: "gt", Params: []float64{value}}
	}
}