UpsertDatapointsRequest.fromJson constructor
UpsertDatapointsRequest.fromJson(
- Object? j
Implementation
factory UpsertDatapointsRequest.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return UpsertDatapointsRequest(
index: switch (json['index']) {
null => '',
Object $1 => decodeString($1),
},
datapoints: switch (json['datapoints']) {
null => [],
List<Object?> $1 => [for (final i in $1) IndexDatapoint.fromJson(i)],
_ => throw const FormatException('"datapoints" is not a list'),
},
updateMask: switch (json['updateMask']) {
null => null,
Object $1 => protobuf.FieldMask.fromJson($1),
},
);
}