ModelMonitoringSchema.fromJson constructor

ModelMonitoringSchema.fromJson(
  1. Object? j
)

Implementation

factory ModelMonitoringSchema.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ModelMonitoringSchema(
    featureFields: switch (json['featureFields']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) ModelMonitoringSchema_FieldSchema.fromJson(i),
      ],
      _ => throw const FormatException('"featureFields" is not a list'),
    },
    predictionFields: switch (json['predictionFields']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) ModelMonitoringSchema_FieldSchema.fromJson(i),
      ],
      _ => throw const FormatException('"predictionFields" is not a list'),
    },
    groundTruthFields: switch (json['groundTruthFields']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) ModelMonitoringSchema_FieldSchema.fromJson(i),
      ],
      _ => throw const FormatException('"groundTruthFields" is not a list'),
    },
  );
}