refactor: rename db backup routes

This commit is contained in:
izzy
2025-12-03 11:47:48 +00:00
parent fe8eb85e37
commit a63b418507
14 changed files with 168 additions and 146 deletions

View File

@@ -10,16 +10,16 @@
part of openapi.api;
class MaintenanceIntegrityResponseDto {
/// Returns a new [MaintenanceIntegrityResponseDto] instance.
MaintenanceIntegrityResponseDto({
class MaintenanceDetectInstallResponseDto {
/// Returns a new [MaintenanceDetectInstallResponseDto] instance.
MaintenanceDetectInstallResponseDto({
this.storage = const [],
});
List<MaintenanceStorageFolderIntegrityDto> storage;
List<MaintenanceDetectInstallStorageFolderDto> storage;
@override
bool operator ==(Object other) => identical(this, other) || other is MaintenanceIntegrityResponseDto &&
bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallResponseDto &&
_deepEquality.equals(other.storage, storage);
@override
@@ -28,7 +28,7 @@ class MaintenanceIntegrityResponseDto {
(storage.hashCode);
@override
String toString() => 'MaintenanceIntegrityResponseDto[storage=$storage]';
String toString() => 'MaintenanceDetectInstallResponseDto[storage=$storage]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -36,26 +36,26 @@ class MaintenanceIntegrityResponseDto {
return json;
}
/// Returns a new [MaintenanceIntegrityResponseDto] instance and imports its values from
/// Returns a new [MaintenanceDetectInstallResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static MaintenanceIntegrityResponseDto? fromJson(dynamic value) {
upgradeDto(value, "MaintenanceIntegrityResponseDto");
static MaintenanceDetectInstallResponseDto? fromJson(dynamic value) {
upgradeDto(value, "MaintenanceDetectInstallResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return MaintenanceIntegrityResponseDto(
storage: MaintenanceStorageFolderIntegrityDto.listFromJson(json[r'storage']),
return MaintenanceDetectInstallResponseDto(
storage: MaintenanceDetectInstallStorageFolderDto.listFromJson(json[r'storage']),
);
}
return null;
}
static List<MaintenanceIntegrityResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <MaintenanceIntegrityResponseDto>[];
static List<MaintenanceDetectInstallResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <MaintenanceDetectInstallResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = MaintenanceIntegrityResponseDto.fromJson(row);
final value = MaintenanceDetectInstallResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
@@ -64,12 +64,12 @@ class MaintenanceIntegrityResponseDto {
return result.toList(growable: growable);
}
static Map<String, MaintenanceIntegrityResponseDto> mapFromJson(dynamic json) {
final map = <String, MaintenanceIntegrityResponseDto>{};
static Map<String, MaintenanceDetectInstallResponseDto> mapFromJson(dynamic json) {
final map = <String, MaintenanceDetectInstallResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = MaintenanceIntegrityResponseDto.fromJson(entry.value);
final value = MaintenanceDetectInstallResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@@ -78,14 +78,14 @@ class MaintenanceIntegrityResponseDto {
return map;
}
// maps a json object with a list of MaintenanceIntegrityResponseDto-objects as value to a dart map
static Map<String, List<MaintenanceIntegrityResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<MaintenanceIntegrityResponseDto>>{};
// maps a json object with a list of MaintenanceDetectInstallResponseDto-objects as value to a dart map
static Map<String, List<MaintenanceDetectInstallResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<MaintenanceDetectInstallResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = MaintenanceIntegrityResponseDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = MaintenanceDetectInstallResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;

View File

@@ -10,9 +10,9 @@
part of openapi.api;
class MaintenanceStorageFolderIntegrityDto {
/// Returns a new [MaintenanceStorageFolderIntegrityDto] instance.
MaintenanceStorageFolderIntegrityDto({
class MaintenanceDetectInstallStorageFolderDto {
/// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance.
MaintenanceDetectInstallStorageFolderDto({
required this.files,
required this.folder,
required this.readable,
@@ -28,7 +28,7 @@ class MaintenanceStorageFolderIntegrityDto {
bool writable;
@override
bool operator ==(Object other) => identical(this, other) || other is MaintenanceStorageFolderIntegrityDto &&
bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallStorageFolderDto &&
other.files == files &&
other.folder == folder &&
other.readable == readable &&
@@ -43,7 +43,7 @@ class MaintenanceStorageFolderIntegrityDto {
(writable.hashCode);
@override
String toString() => 'MaintenanceStorageFolderIntegrityDto[files=$files, folder=$folder, readable=$readable, writable=$writable]';
String toString() => 'MaintenanceDetectInstallStorageFolderDto[files=$files, folder=$folder, readable=$readable, writable=$writable]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -54,15 +54,15 @@ class MaintenanceStorageFolderIntegrityDto {
return json;
}
/// Returns a new [MaintenanceStorageFolderIntegrityDto] instance and imports its values from
/// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static MaintenanceStorageFolderIntegrityDto? fromJson(dynamic value) {
upgradeDto(value, "MaintenanceStorageFolderIntegrityDto");
static MaintenanceDetectInstallStorageFolderDto? fromJson(dynamic value) {
upgradeDto(value, "MaintenanceDetectInstallStorageFolderDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return MaintenanceStorageFolderIntegrityDto(
return MaintenanceDetectInstallStorageFolderDto(
files: num.parse('${json[r'files']}'),
folder: StorageFolder.fromJson(json[r'folder'])!,
readable: mapValueOfType<bool>(json, r'readable')!,
@@ -72,11 +72,11 @@ class MaintenanceStorageFolderIntegrityDto {
return null;
}
static List<MaintenanceStorageFolderIntegrityDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <MaintenanceStorageFolderIntegrityDto>[];
static List<MaintenanceDetectInstallStorageFolderDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <MaintenanceDetectInstallStorageFolderDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = MaintenanceStorageFolderIntegrityDto.fromJson(row);
final value = MaintenanceDetectInstallStorageFolderDto.fromJson(row);
if (value != null) {
result.add(value);
}
@@ -85,12 +85,12 @@ class MaintenanceStorageFolderIntegrityDto {
return result.toList(growable: growable);
}
static Map<String, MaintenanceStorageFolderIntegrityDto> mapFromJson(dynamic json) {
final map = <String, MaintenanceStorageFolderIntegrityDto>{};
static Map<String, MaintenanceDetectInstallStorageFolderDto> mapFromJson(dynamic json) {
final map = <String, MaintenanceDetectInstallStorageFolderDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = MaintenanceStorageFolderIntegrityDto.fromJson(entry.value);
final value = MaintenanceDetectInstallStorageFolderDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
@@ -99,14 +99,14 @@ class MaintenanceStorageFolderIntegrityDto {
return map;
}
// maps a json object with a list of MaintenanceStorageFolderIntegrityDto-objects as value to a dart map
static Map<String, List<MaintenanceStorageFolderIntegrityDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<MaintenanceStorageFolderIntegrityDto>>{};
// maps a json object with a list of MaintenanceDetectInstallStorageFolderDto-objects as value to a dart map
static Map<String, List<MaintenanceDetectInstallStorageFolderDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<MaintenanceDetectInstallStorageFolderDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = MaintenanceStorageFolderIntegrityDto.listFromJson(entry.value, growable: growable,);
map[entry.key] = MaintenanceDetectInstallStorageFolderDto.listFromJson(entry.value, growable: growable,);
}
}
return map;