HealthCheckService.fromJson constructor
HealthCheckService.fromJson(
- Object? j
Implementation
factory HealthCheckService.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return HealthCheckService(
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => null,
Object $1 => decodeString($1),
},
fingerprint: switch (json['fingerprint']) {
null => null,
Object $1 => decodeString($1),
},
healthChecks: switch (json['healthChecks']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"healthChecks" is not a list'),
},
healthStatusAggregationPolicy:
switch (json['healthStatusAggregationPolicy']) {
null => null,
Object $1 => decodeString($1),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeUint64($1),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
networkEndpointGroups: switch (json['networkEndpointGroups']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException(
'"networkEndpointGroups" is not a list',
),
},
notificationEndpoints: switch (json['notificationEndpoints']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException(
'"notificationEndpoints" is not a list',
),
},
region: switch (json['region']) {
null => null,
Object $1 => decodeString($1),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
);
}