RoutePolicyPolicyTerm.fromJson constructor
RoutePolicyPolicyTerm.fromJson(
- Object? j
Implementation
factory RoutePolicyPolicyTerm.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return RoutePolicyPolicyTerm(
actions: switch (json['actions']) {
null => [],
List<Object?> $1 => [for (final i in $1) Expr.fromJson(i)],
_ => throw const FormatException('"actions" is not a list'),
},
match: switch (json['match']) {
null => null,
Object $1 => Expr.fromJson($1),
},
priority: switch (json['priority']) {
null => null,
Object $1 => decodeInt($1),
},
);
}