InterconnectDiagnostics.fromJson constructor
InterconnectDiagnostics.fromJson(
- Object? j
Implementation
factory InterconnectDiagnostics.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return InterconnectDiagnostics(
arpCaches: switch (json['arpCaches']) {
null => [],
List<Object?> $1 => [
for (final i in $1) InterconnectDiagnosticsArpentry.fromJson(i),
],
_ => throw const FormatException('"arpCaches" is not a list'),
},
bundleAggregationType: switch (json['bundleAggregationType']) {
null => null,
Object $1 => decodeString($1),
},
bundleOperationalStatus: switch (json['bundleOperationalStatus']) {
null => null,
Object $1 => decodeString($1),
},
links: switch (json['links']) {
null => [],
List<Object?> $1 => [
for (final i in $1) InterconnectDiagnosticsLinkStatus.fromJson(i),
],
_ => throw const FormatException('"links" is not a list'),
},
macAddress: switch (json['macAddress']) {
null => null,
Object $1 => decodeString($1),
},
);
}