fromJson static method

ServicePortRuntimeState fromJson(
  1. Map<String, dynamic> json
)

Implementation

static ServicePortRuntimeState fromJson(Map<String, dynamic> json) {
  return ServicePortRuntimeState(
    num: PortNum.fromJson(json["num"]),
    liveness: json["liveness"] as String?,
    livenessStatus: (json["liveness_status"] as String?) ?? "not_configured",
    lastCheckedAt: ServiceRuntimeState._toDouble(json["last_checked_at"]),
    lastError: json["last_error"] as String?,
  );
}