GetHealthCheckResult.fromMap constructor

GetHealthCheckResult.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory GetHealthCheckResult.fromMap(Map<String, dynamic> map) {
  return GetHealthCheckResult(
    checkIntervalSec: (() { final guardedValue = map['checkIntervalSec']; if (guardedValue == null) return null; return (guardedValue as num).toInt(); })(),
    creationTimestamp: (() { final guardedValue = map['creationTimestamp']; if (guardedValue == null) return null; return guardedValue as String; })(),
    deletionPolicy: (() { final guardedValue = map['deletionPolicy']; if (guardedValue == null) return null; return guardedValue as String; })(),
    description: (() { final guardedValue = map['description']; if (guardedValue == null) return null; return guardedValue as String; })(),
    grpcHealthChecks: (() { final guardedValue = map['grpcHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckGrpcHealthCheck>(guardedValue, (value) => GetHealthCheckGrpcHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    grpcTlsHealthChecks: (() { final guardedValue = map['grpcTlsHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckGrpcTlsHealthCheck>(guardedValue, (value) => GetHealthCheckGrpcTlsHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    healthyThreshold: (() { final guardedValue = map['healthyThreshold']; if (guardedValue == null) return null; return (guardedValue as num).toInt(); })(),
    http2HealthChecks: (() { final guardedValue = map['http2HealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckHttp2HealthCheck>(guardedValue, (value) => GetHealthCheckHttp2HealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    httpHealthChecks: (() { final guardedValue = map['httpHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckHttpHealthCheck>(guardedValue, (value) => GetHealthCheckHttpHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    httpsHealthChecks: (() { final guardedValue = map['httpsHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckHttpsHealthCheck>(guardedValue, (value) => GetHealthCheckHttpsHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    id: (() { final guardedValue = map['id']; if (guardedValue == null) return null; return guardedValue as String; })(),
    logConfigs: (() { final guardedValue = map['logConfigs']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckLogConfig>(guardedValue, (value) => GetHealthCheckLogConfig.fromMap((value as Map).cast<String, dynamic>())); })(),
    name: (() { final guardedValue = map['name']; if (guardedValue == null) return null; return guardedValue as String; })(),
    project: (() { final guardedValue = map['project']; if (guardedValue == null) return null; return guardedValue as String; })(),
    selfLink: (() { final guardedValue = map['selfLink']; if (guardedValue == null) return null; return guardedValue as String; })(),
    sourceRegions: (() { final guardedValue = map['sourceRegions']; if (guardedValue == null) return null; return (guardedValue as List).cast<String>(); })(),
    sslHealthChecks: (() { final guardedValue = map['sslHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckSslHealthCheck>(guardedValue, (value) => GetHealthCheckSslHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    tcpHealthChecks: (() { final guardedValue = map['tcpHealthChecks']; if (guardedValue == null) return null; return pulumi.Input.decodeList<GetHealthCheckTcpHealthCheck>(guardedValue, (value) => GetHealthCheckTcpHealthCheck.fromMap((value as Map).cast<String, dynamic>())); })(),
    timeoutSec: (() { final guardedValue = map['timeoutSec']; if (guardedValue == null) return null; return (guardedValue as num).toInt(); })(),
    type: (() { final guardedValue = map['type']; if (guardedValue == null) return null; return guardedValue as String; })(),
    unhealthyThreshold: (() { final guardedValue = map['unhealthyThreshold']; if (guardedValue == null) return null; return (guardedValue as num).toInt(); })(),
  );
}