SearchModelDeploymentMonitoringStatsAnomaliesResponse.fromJson constructor

SearchModelDeploymentMonitoringStatsAnomaliesResponse.fromJson(
  1. Object? j
)

Implementation

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