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