ListCustomJobsResponse.fromJson constructor

ListCustomJobsResponse.fromJson(
  1. Object? j
)

Implementation

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