func (dv *ListDecisionValue) RuleIDs() []int64 {
	return dv.ruleIDs
}
RuleIDs returns the list of rule ids which produced the evaluation results.
The indices of the ruleIDs correlate 1:1 with the value indices.
package model
import (
	"fmt"
	"strings"
	"github.com/google/cel-go/cel"
	"github.com/google/cel-go/common/types"
	"github.com/google/cel-go/common/types/ref"
)
func NewDecision() *Decision {
	return &Decision{}
}
type Decision struct {
	Name      string
	Reference *cel.Ast
	Output    *cel.Ast
}
type DecisionValue interface {
	fmt.Stringer
	Name() string
	IsFinal() bool
}
type SingleDecisionValue interface {
	DecisionValue
	Value() ref.Val
	Details() *cel.EvalDetails
	RuleID() int64
}
type MultiDecisionValue interface {
	DecisionValue
	Values() []ref.Val
	Details() []*cel.EvalDetails
	RuleIDs() []int64
}
type DecisionSelector func(decision string) bool
func NewBoolDecisionValue(name string, value types.Bool) *BoolDecisionValue {
	return &BoolDecisionValue{
		name:  name,
		value: value,
	}
}
type BoolDecisionValue struct {
	name    string
	value   ref.Val
	isFinal bool
	details *cel.EvalDetails
	ruleID  int64
}
func (dv *BoolDecisionValue) And(other ref.Val) *BoolDecisionValue {
	v, vBool := dv.value.(types.Bool)
	if vBool && v == types.False {
		return dv
	}
	o, oBool := other.(types.Bool)
	if oBool && o == types.False {
		dv.value = types.False
		return dv
	}
	if vBool && oBool {
		return dv
	}
	dv.value = logicallyMergeUnkErr(dv.value, other)
	return dv
}
func (dv *BoolDecisionValue) Details() *cel.EvalDetails {
	return dv.details
}
func (dv *BoolDecisionValue) Finalize(details *cel.EvalDetails, rule Rule) DecisionValue {
	dv.details = details
	if rule != nil {
		dv.ruleID = rule.GetID()
	}
	dv.isFinal = true
	return dv
}
func (dv *BoolDecisionValue) IsFinal() bool {
	return dv.isFinal
}
func (dv *BoolDecisionValue) Or(other ref.Val) *BoolDecisionValue {
	v, vBool := dv.value.(types.Bool)
	if vBool && v == types.True {
		return dv
	}
	o, oBool := other.(types.Bool)
	if oBool && o == types.True {
		dv.value = types.True
		return dv
	}
	if vBool && oBool {
		return dv
	}
	dv.value = logicallyMergeUnkErr(dv.value, other)
	return dv
}
func (dv *BoolDecisionValue) Name() string {
	return dv.name
}
func (dv *BoolDecisionValue) RuleID() int64 {
	return dv.ruleID
}
func (dv *BoolDecisionValue) String() string {
	var buf strings.Builder
	buf.WriteString(dv.name)
	buf.WriteString(": ")
	buf.WriteString(fmt.Sprintf("rule[%d] -> ", dv.ruleID))
	buf.WriteString(fmt.Sprintf("%v", dv.value))
	return buf.String()
}
func (dv *BoolDecisionValue) Value() ref.Val {
	return dv.value
}
func NewListDecisionValue(name string) *ListDecisionValue {
	return &ListDecisionValue{
		name:    name,
		values:  []ref.Val{},
		details: []*cel.EvalDetails{},
		ruleIDs: []int64{},
	}
}
type ListDecisionValue struct {
	name    string
	values  []ref.Val
	isFinal bool
	details []*cel.EvalDetails
	ruleIDs []int64
}
func (dv *ListDecisionValue) Append(val ref.Val, det *cel.EvalDetails, rule Rule) {
	dv.values = append(dv.values, val)
	dv.details = append(dv.details, det)
	ruleID := int64(0)
	if rule != nil {
		ruleID = rule.GetID()
	}
	dv.ruleIDs = append(dv.ruleIDs, ruleID)
}
func (dv *ListDecisionValue) Details() []*cel.EvalDetails {
	return dv.details
}
func (dv *ListDecisionValue) Finalize() DecisionValue {
	dv.isFinal = true
	return dv
}
func (dv *ListDecisionValue) IsFinal() bool {
	return dv.isFinal
}
func (dv *ListDecisionValue) Name() string {
	return dv.name
}