StreamingFetchFeatureValuesResponse.fromJson constructor

StreamingFetchFeatureValuesResponse.fromJson(
  1. Object? j
)

Implementation

factory StreamingFetchFeatureValuesResponse.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return StreamingFetchFeatureValuesResponse(
    status: switch (json['status']) {
      null => null,
      Object $1 => Status.fromJson($1),
    },
    data: switch (json['data']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) FetchFeatureValuesResponse.fromJson(i),
      ],
      _ => throw const FormatException('"data" is not a list'),
    },
    dataKeysWithError: switch (json['dataKeysWithError']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) FeatureViewDataKey.fromJson(i),
      ],
      _ => throw const FormatException('"dataKeysWithError" is not a list'),
    },
  );
}