mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-04 07:45:30 +00:00
40 lines
820 B
Dart
40 lines
820 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
import 'options.dart';
|
|
import 'request.dart';
|
|
|
|
part 'create_task_batch.g.dart';
|
|
|
|
@JsonSerializable(explicitToJson: true)
|
|
class CreateTaskBatch {
|
|
List<CreateTaskBatchItem>? reqs;
|
|
Options? opts;
|
|
|
|
CreateTaskBatch({
|
|
this.reqs,
|
|
this.opts,
|
|
});
|
|
|
|
factory CreateTaskBatch.fromJson(
|
|
Map<String, dynamic> json,
|
|
) =>
|
|
_$CreateTaskBatchFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$CreateTaskBatchToJson(this);
|
|
}
|
|
|
|
@JsonSerializable()
|
|
class CreateTaskBatchItem {
|
|
Request? req;
|
|
Options? opts;
|
|
|
|
CreateTaskBatchItem({
|
|
this.req,
|
|
this.opts,
|
|
});
|
|
|
|
factory CreateTaskBatchItem.fromJson(Map<String, dynamic> json) =>
|
|
_$CreateTaskBatchItemFromJson(json);
|
|
Map<String, dynamic> toJson() => _$CreateTaskBatchItemToJson(this);
|
|
}
|