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