BackendServiceListUsable.fromJson constructor

BackendServiceListUsable.fromJson(
  1. Object? j
)

Implementation

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