initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import 'service_scan_info.dart';
|
||||
|
||||
part 'scan_result.freezed.dart';
|
||||
part 'scan_result.g.dart';
|
||||
|
||||
/// Mirrors `models.ScanResult`, returned by `POST /node/scan`.
|
||||
@freezed
|
||||
sealed class ScanResult with _$ScanResult {
|
||||
const factory ScanResult({
|
||||
@JsonKey(name: 'scanned_paths') @Default(<String>[]) List<String> scannedPaths,
|
||||
@Default(0) int found,
|
||||
@Default(<ServiceScanInfo>[]) List<ServiceScanInfo> created,
|
||||
@Default(<ServiceScanInfo>[]) List<ServiceScanInfo> updated,
|
||||
@Default(<String>[]) List<String> errors,
|
||||
}) = _ScanResult;
|
||||
|
||||
factory ScanResult.fromJson(Map<String, dynamic> json) => _$ScanResultFromJson(json);
|
||||
}
|
||||
Reference in New Issue
Block a user