ListPublisherModelsResponse.fromJson constructor

ListPublisherModelsResponse.fromJson(
  1. Object? j
)

Implementation

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