WafExpressionSet.fromJson constructor
WafExpressionSet.fromJson(
- Object? j
Implementation
factory WafExpressionSet.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return WafExpressionSet(
aliases: switch (json['aliases']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"aliases" is not a list'),
},
expressions: switch (json['expressions']) {
null => [],
List<Object?> $1 => [
for (final i in $1) WafExpressionSetExpression.fromJson(i),
],
_ => throw const FormatException('"expressions" is not a list'),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeString($1),
},
);
}