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