ExpressionPolicy class

A single expression policy.

Implemented types

Constructors

ExpressionPolicy({required String id, required String name, required PolicyCondition condition, required ExpressionStyle style, String? description, int priority = 0, bool enabled = true, List<String> tags = const []})
const
ExpressionPolicy.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
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
style ExpressionStyle
How to express when condition matches.
final
tags List<String>
Categorization tags.
final

Methods

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