HealthCheck.fromJson constructor
HealthCheck.fromJson(
- Object? j
Implementation
factory HealthCheck.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return HealthCheck(
checkIntervalSec: switch (json['checkIntervalSec']) {
null => null,
Object $1 => decodeInt($1),
},
creationTimestamp: switch (json['creationTimestamp']) {
null => null,
Object $1 => decodeString($1),
},
description: switch (json['description']) {
null => null,
Object $1 => decodeString($1),
},
grpcHealthCheck: switch (json['grpcHealthCheck']) {
null => null,
Object $1 => GrpchealthCheck.fromJson($1),
},
grpcTlsHealthCheck: switch (json['grpcTlsHealthCheck']) {
null => null,
Object $1 => GrpctlshealthCheck.fromJson($1),
},
healthyThreshold: switch (json['healthyThreshold']) {
null => null,
Object $1 => decodeInt($1),
},
http2HealthCheck: switch (json['http2HealthCheck']) {
null => null,
Object $1 => Http2HealthCheck.fromJson($1),
},
httpHealthCheck: switch (json['httpHealthCheck']) {
null => null,
Object $1 => HttphealthCheck.fromJson($1),
},
httpsHealthCheck: switch (json['httpsHealthCheck']) {
null => null,
Object $1 => HttpshealthCheck.fromJson($1),
},
id: switch (json['id']) {
null => null,
Object $1 => decodeUint64($1),
},
kind: switch (json['kind']) {
null => null,
Object $1 => decodeString($1),
},
logConfig: switch (json['logConfig']) {
null => null,
Object $1 => HealthCheckLogConfig.fromJson($1),
},
name: switch (json['name']) {
null => null,
Object $1 => decodeString($1),
},
region: switch (json['region']) {
null => null,
Object $1 => decodeString($1),
},
selfLink: switch (json['selfLink']) {
null => null,
Object $1 => decodeString($1),
},
sourceRegions: switch (json['sourceRegions']) {
null => [],
List<Object?> $1 => [for (final i in $1) decodeString(i)],
_ => throw const FormatException('"sourceRegions" is not a list'),
},
sslHealthCheck: switch (json['sslHealthCheck']) {
null => null,
Object $1 => SslhealthCheck.fromJson($1),
},
tcpHealthCheck: switch (json['tcpHealthCheck']) {
null => null,
Object $1 => TcphealthCheck.fromJson($1),
},
timeoutSec: switch (json['timeoutSec']) {
null => null,
Object $1 => decodeInt($1),
},
type: switch (json['type']) {
null => null,
Object $1 => decodeString($1),
},
unhealthyThreshold: switch (json['unhealthyThreshold']) {
null => null,
Object $1 => decodeInt($1),
},
);
}