ListViewsResponse.fromJson constructor

ListViewsResponse.fromJson(
  1. Object? j
)

Implementation

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