ListBatchPredictionJobsResponse.fromJson constructor

ListBatchPredictionJobsResponse.fromJson(
  1. Object? j
)

Implementation

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