SubnetworkLogConfig.fromJson constructor
SubnetworkLogConfig.fromJson(
- Object? j
Implementation
factory SubnetworkLogConfig.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return SubnetworkLogConfig(
aggregationInterval: switch (json['aggregationInterval']) {
null => null,
Object $1 => decodeString($1),
},
enable: switch (json['enable']) {
null => null,
Object $1 => decodeBool($1),
},
filterExpr: switch (json['filterExpr']) {
null => null,
Object $1 => decodeString($1),
},
flowSampling: switch (json['flowSampling']) {
null => null,
Object $1 => decodeDouble($1),
},
metadata: switch (json['metadata']) {
null => null,
Object $1 => decodeString($1),
},
metadataFields: switch (json['metadataFields']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"metadataFields" is not a list'),
},
);
}