FeatureViewDirectWriteResponse.fromJson constructor

FeatureViewDirectWriteResponse.fromJson(
  1. Object? j
)

Implementation

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