ListLogsRequest.fromJson constructor

ListLogsRequest.fromJson(
  1. Object? j
)

Implementation

factory ListLogsRequest.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ListLogsRequest(
    parent: switch (json['parent']) {
      null => '',
      Object $1 => decodeString($1),
    },
    resourceNames: switch (json['resourceNames']) {
      null => [],
      List<Object?> $1 => [for (final i in $1) decodeString(i)],
      _ => throw const FormatException('"resourceNames" is not a list'),
    },
    pageSize: switch (json['pageSize']) {
      null => 0,
      Object $1 => decodeInt($1),
    },
    pageToken: switch (json['pageToken']) {
      null => '',
      Object $1 => decodeString($1),
    },
  );
}