DecisionPolicy class

A single decision policy.

Implemented types

Constructors

DecisionPolicy({required String id, required String name, required PolicyCondition condition, required DecisionGuidance guidance, String? description, int priority = 0, bool enabled = true, List<String> tags = const []})
const
DecisionPolicy.fromJson(Map<String, dynamic> json)
factory

Properties

condition → PolicyCondition
When this policy applies.
final
description → String?
Policy description.
final
enabled → bool
Whether policy is active.
final
guidance → DecisionGuidance
What to recommend when condition matches.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique policy ID.
final
name → String
Human-readable name.
final
priority → int
Evaluation priority (higher first).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tags → List<String>
Categorization tags.
final

Methods

copyWith({String? id, String? name, PolicyCondition? condition, DecisionGuidance? guidance, String? description, int? priority, bool? enabled, List<String>? tags}) → DecisionPolicy
Create a copy with overridden fields.
matches(Map<String, double> metrics, double aggregatedScore) → bool
Evaluate this policy against metrics.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited