PolicyRule class

A single policy rule governing I/O actions.

Constructors

PolicyRule({required String id, required String name, String? description, required PolicyCondition when, required bool allow, PolicyConstraints? constraints, int? priority, bool enabled = true})
const
PolicyRule.fromJson(Map<String, dynamic> json)
factory

Properties

allow → bool
Whether the action is allowed (true) or denied (false).
final
constraints → PolicyConstraints?
Optional constraints applied when the rule allows an action.
final
description → String?
Optional description of the rule's purpose.
final
enabled → bool
Whether this rule is active.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Unique rule identifier.
final
name → String
Human-readable rule name.
final
priority → int?
Evaluation priority. Higher values are evaluated first.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
when → PolicyCondition
Condition that triggers this rule.
final

Methods

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