mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
feat(server,web): libraries (#3124)
* feat: libraries Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
parent
816db700e1
commit
acdc66413c
143 changed files with 10941 additions and 386 deletions
|
|
@ -15,6 +15,7 @@ class AllJobStatusResponseDto {
|
|||
AllJobStatusResponseDto({
|
||||
required this.backgroundTask,
|
||||
required this.clipEncoding,
|
||||
required this.library_,
|
||||
required this.metadataExtraction,
|
||||
required this.objectTagging,
|
||||
required this.recognizeFaces,
|
||||
|
|
@ -29,6 +30,8 @@ class AllJobStatusResponseDto {
|
|||
|
||||
JobStatusDto clipEncoding;
|
||||
|
||||
JobStatusDto library_;
|
||||
|
||||
JobStatusDto metadataExtraction;
|
||||
|
||||
JobStatusDto objectTagging;
|
||||
|
|
@ -49,6 +52,7 @@ class AllJobStatusResponseDto {
|
|||
bool operator ==(Object other) => identical(this, other) || other is AllJobStatusResponseDto &&
|
||||
other.backgroundTask == backgroundTask &&
|
||||
other.clipEncoding == clipEncoding &&
|
||||
other.library_ == library_ &&
|
||||
other.metadataExtraction == metadataExtraction &&
|
||||
other.objectTagging == objectTagging &&
|
||||
other.recognizeFaces == recognizeFaces &&
|
||||
|
|
@ -63,6 +67,7 @@ class AllJobStatusResponseDto {
|
|||
// ignore: unnecessary_parenthesis
|
||||
(backgroundTask.hashCode) +
|
||||
(clipEncoding.hashCode) +
|
||||
(library_.hashCode) +
|
||||
(metadataExtraction.hashCode) +
|
||||
(objectTagging.hashCode) +
|
||||
(recognizeFaces.hashCode) +
|
||||
|
|
@ -73,12 +78,13 @@ class AllJobStatusResponseDto {
|
|||
(videoConversion.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AllJobStatusResponseDto[backgroundTask=$backgroundTask, clipEncoding=$clipEncoding, metadataExtraction=$metadataExtraction, objectTagging=$objectTagging, recognizeFaces=$recognizeFaces, search=$search, sidecar=$sidecar, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]';
|
||||
String toString() => 'AllJobStatusResponseDto[backgroundTask=$backgroundTask, clipEncoding=$clipEncoding, library_=$library_, metadataExtraction=$metadataExtraction, objectTagging=$objectTagging, recognizeFaces=$recognizeFaces, search=$search, sidecar=$sidecar, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backgroundTask'] = this.backgroundTask;
|
||||
json[r'clipEncoding'] = this.clipEncoding;
|
||||
json[r'library'] = this.library_;
|
||||
json[r'metadataExtraction'] = this.metadataExtraction;
|
||||
json[r'objectTagging'] = this.objectTagging;
|
||||
json[r'recognizeFaces'] = this.recognizeFaces;
|
||||
|
|
@ -100,6 +106,7 @@ class AllJobStatusResponseDto {
|
|||
return AllJobStatusResponseDto(
|
||||
backgroundTask: JobStatusDto.fromJson(json[r'backgroundTask'])!,
|
||||
clipEncoding: JobStatusDto.fromJson(json[r'clipEncoding'])!,
|
||||
library_: JobStatusDto.fromJson(json[r'library'])!,
|
||||
metadataExtraction: JobStatusDto.fromJson(json[r'metadataExtraction'])!,
|
||||
objectTagging: JobStatusDto.fromJson(json[r'objectTagging'])!,
|
||||
recognizeFaces: JobStatusDto.fromJson(json[r'recognizeFaces'])!,
|
||||
|
|
@ -157,6 +164,7 @@ class AllJobStatusResponseDto {
|
|||
static const requiredKeys = <String>{
|
||||
'backgroundTask',
|
||||
'clipEncoding',
|
||||
'library',
|
||||
'metadataExtraction',
|
||||
'objectTagging',
|
||||
'recognizeFaces',
|
||||
|
|
|
|||
34
mobile/openapi/lib/model/asset_response_dto.dart
generated
34
mobile/openapi/lib/model/asset_response_dto.dart
generated
|
|
@ -22,7 +22,11 @@ class AssetResponseDto {
|
|||
required this.fileModifiedAt,
|
||||
required this.id,
|
||||
required this.isArchived,
|
||||
required this.isExternal,
|
||||
required this.isFavorite,
|
||||
required this.isOffline,
|
||||
required this.isReadOnly,
|
||||
required this.libraryId,
|
||||
this.livePhotoVideoId,
|
||||
required this.originalFileName,
|
||||
required this.originalPath,
|
||||
|
|
@ -62,8 +66,16 @@ class AssetResponseDto {
|
|||
|
||||
bool isArchived;
|
||||
|
||||
bool isExternal;
|
||||
|
||||
bool isFavorite;
|
||||
|
||||
bool isOffline;
|
||||
|
||||
bool isReadOnly;
|
||||
|
||||
String libraryId;
|
||||
|
||||
String? livePhotoVideoId;
|
||||
|
||||
String originalFileName;
|
||||
|
|
@ -112,7 +124,11 @@ class AssetResponseDto {
|
|||
other.fileModifiedAt == fileModifiedAt &&
|
||||
other.id == id &&
|
||||
other.isArchived == isArchived &&
|
||||
other.isExternal == isExternal &&
|
||||
other.isFavorite == isFavorite &&
|
||||
other.isOffline == isOffline &&
|
||||
other.isReadOnly == isReadOnly &&
|
||||
other.libraryId == libraryId &&
|
||||
other.livePhotoVideoId == livePhotoVideoId &&
|
||||
other.originalFileName == originalFileName &&
|
||||
other.originalPath == originalPath &&
|
||||
|
|
@ -138,7 +154,11 @@ class AssetResponseDto {
|
|||
(fileModifiedAt.hashCode) +
|
||||
(id.hashCode) +
|
||||
(isArchived.hashCode) +
|
||||
(isExternal.hashCode) +
|
||||
(isFavorite.hashCode) +
|
||||
(isOffline.hashCode) +
|
||||
(isReadOnly.hashCode) +
|
||||
(libraryId.hashCode) +
|
||||
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
|
||||
(originalFileName.hashCode) +
|
||||
(originalPath.hashCode) +
|
||||
|
|
@ -153,7 +173,7 @@ class AssetResponseDto {
|
|||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]';
|
||||
String toString() => 'AssetResponseDto[checksum=$checksum, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isExternal=$isExternal, isFavorite=$isFavorite, isOffline=$isOffline, isReadOnly=$isReadOnly, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -170,7 +190,11 @@ class AssetResponseDto {
|
|||
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
|
||||
json[r'id'] = this.id;
|
||||
json[r'isArchived'] = this.isArchived;
|
||||
json[r'isExternal'] = this.isExternal;
|
||||
json[r'isFavorite'] = this.isFavorite;
|
||||
json[r'isOffline'] = this.isOffline;
|
||||
json[r'isReadOnly'] = this.isReadOnly;
|
||||
json[r'libraryId'] = this.libraryId;
|
||||
if (this.livePhotoVideoId != null) {
|
||||
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
|
||||
} else {
|
||||
|
|
@ -219,7 +243,11 @@ class AssetResponseDto {
|
|||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
|
||||
isExternal: mapValueOfType<bool>(json, r'isExternal')!,
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
|
||||
isOffline: mapValueOfType<bool>(json, r'isOffline')!,
|
||||
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly')!,
|
||||
libraryId: mapValueOfType<String>(json, r'libraryId')!,
|
||||
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
|
||||
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
|
||||
originalPath: mapValueOfType<String>(json, r'originalPath')!,
|
||||
|
|
@ -287,7 +315,11 @@ class AssetResponseDto {
|
|||
'fileModifiedAt',
|
||||
'id',
|
||||
'isArchived',
|
||||
'isExternal',
|
||||
'isFavorite',
|
||||
'isOffline',
|
||||
'isReadOnly',
|
||||
'libraryId',
|
||||
'originalFileName',
|
||||
'originalPath',
|
||||
'ownerId',
|
||||
|
|
|
|||
150
mobile/openapi/lib/model/create_library_dto.dart
generated
Normal file
150
mobile/openapi/lib/model/create_library_dto.dart
generated
Normal file
|
|
@ -0,0 +1,150 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class CreateLibraryDto {
|
||||
/// Returns a new [CreateLibraryDto] instance.
|
||||
CreateLibraryDto({
|
||||
this.exclusionPatterns = const [],
|
||||
this.importPaths = const [],
|
||||
this.isVisible,
|
||||
this.name,
|
||||
required this.type,
|
||||
});
|
||||
|
||||
List<String> exclusionPatterns;
|
||||
|
||||
List<String> importPaths;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isVisible;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? name;
|
||||
|
||||
LibraryType type;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is CreateLibraryDto &&
|
||||
other.exclusionPatterns == exclusionPatterns &&
|
||||
other.importPaths == importPaths &&
|
||||
other.isVisible == isVisible &&
|
||||
other.name == name &&
|
||||
other.type == type;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(exclusionPatterns.hashCode) +
|
||||
(importPaths.hashCode) +
|
||||
(isVisible == null ? 0 : isVisible!.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode) +
|
||||
(type.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, isVisible=$isVisible, name=$name, type=$type]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'exclusionPatterns'] = this.exclusionPatterns;
|
||||
json[r'importPaths'] = this.importPaths;
|
||||
if (this.isVisible != null) {
|
||||
json[r'isVisible'] = this.isVisible;
|
||||
} else {
|
||||
// json[r'isVisible'] = null;
|
||||
}
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
} else {
|
||||
// json[r'name'] = null;
|
||||
}
|
||||
json[r'type'] = this.type;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [CreateLibraryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static CreateLibraryDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return CreateLibraryDto(
|
||||
exclusionPatterns: json[r'exclusionPatterns'] is List
|
||||
? (json[r'exclusionPatterns'] as List).cast<String>()
|
||||
: const [],
|
||||
importPaths: json[r'importPaths'] is List
|
||||
? (json[r'importPaths'] as List).cast<String>()
|
||||
: const [],
|
||||
isVisible: mapValueOfType<bool>(json, r'isVisible'),
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
type: LibraryType.fromJson(json[r'type'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<CreateLibraryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CreateLibraryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = CreateLibraryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, CreateLibraryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, CreateLibraryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = CreateLibraryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of CreateLibraryDto-objects as value to a dart map
|
||||
static Map<String, List<CreateLibraryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<CreateLibraryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = CreateLibraryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'type',
|
||||
};
|
||||
}
|
||||
|
||||
53
mobile/openapi/lib/model/import_asset_dto.dart
generated
53
mobile/openapi/lib/model/import_asset_dto.dart
generated
|
|
@ -20,9 +20,12 @@ class ImportAssetDto {
|
|||
required this.fileCreatedAt,
|
||||
required this.fileModifiedAt,
|
||||
this.isArchived,
|
||||
this.isExternal,
|
||||
required this.isFavorite,
|
||||
this.isOffline,
|
||||
this.isReadOnly = true,
|
||||
this.isVisible,
|
||||
this.libraryId,
|
||||
this.sidecarPath,
|
||||
});
|
||||
|
||||
|
|
@ -52,8 +55,24 @@ class ImportAssetDto {
|
|||
///
|
||||
bool? isArchived;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isExternal;
|
||||
|
||||
bool isFavorite;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isOffline;
|
||||
|
||||
bool isReadOnly;
|
||||
|
||||
///
|
||||
|
|
@ -64,6 +83,14 @@ class ImportAssetDto {
|
|||
///
|
||||
bool? isVisible;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? libraryId;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
|
|
@ -81,9 +108,12 @@ class ImportAssetDto {
|
|||
other.fileCreatedAt == fileCreatedAt &&
|
||||
other.fileModifiedAt == fileModifiedAt &&
|
||||
other.isArchived == isArchived &&
|
||||
other.isExternal == isExternal &&
|
||||
other.isFavorite == isFavorite &&
|
||||
other.isOffline == isOffline &&
|
||||
other.isReadOnly == isReadOnly &&
|
||||
other.isVisible == isVisible &&
|
||||
other.libraryId == libraryId &&
|
||||
other.sidecarPath == sidecarPath;
|
||||
|
||||
@override
|
||||
|
|
@ -96,13 +126,16 @@ class ImportAssetDto {
|
|||
(fileCreatedAt.hashCode) +
|
||||
(fileModifiedAt.hashCode) +
|
||||
(isArchived == null ? 0 : isArchived!.hashCode) +
|
||||
(isExternal == null ? 0 : isExternal!.hashCode) +
|
||||
(isFavorite.hashCode) +
|
||||
(isOffline == null ? 0 : isOffline!.hashCode) +
|
||||
(isReadOnly.hashCode) +
|
||||
(isVisible == null ? 0 : isVisible!.hashCode) +
|
||||
(libraryId == null ? 0 : libraryId!.hashCode) +
|
||||
(sidecarPath == null ? 0 : sidecarPath!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ImportAssetDto[assetPath=$assetPath, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, isArchived=$isArchived, isFavorite=$isFavorite, isReadOnly=$isReadOnly, isVisible=$isVisible, sidecarPath=$sidecarPath]';
|
||||
String toString() => 'ImportAssetDto[assetPath=$assetPath, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, isArchived=$isArchived, isExternal=$isExternal, isFavorite=$isFavorite, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, libraryId=$libraryId, sidecarPath=$sidecarPath]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
|
|
@ -120,14 +153,29 @@ class ImportAssetDto {
|
|||
json[r'isArchived'] = this.isArchived;
|
||||
} else {
|
||||
// json[r'isArchived'] = null;
|
||||
}
|
||||
if (this.isExternal != null) {
|
||||
json[r'isExternal'] = this.isExternal;
|
||||
} else {
|
||||
// json[r'isExternal'] = null;
|
||||
}
|
||||
json[r'isFavorite'] = this.isFavorite;
|
||||
if (this.isOffline != null) {
|
||||
json[r'isOffline'] = this.isOffline;
|
||||
} else {
|
||||
// json[r'isOffline'] = null;
|
||||
}
|
||||
json[r'isReadOnly'] = this.isReadOnly;
|
||||
if (this.isVisible != null) {
|
||||
json[r'isVisible'] = this.isVisible;
|
||||
} else {
|
||||
// json[r'isVisible'] = null;
|
||||
}
|
||||
if (this.libraryId != null) {
|
||||
json[r'libraryId'] = this.libraryId;
|
||||
} else {
|
||||
// json[r'libraryId'] = null;
|
||||
}
|
||||
if (this.sidecarPath != null) {
|
||||
json[r'sidecarPath'] = this.sidecarPath;
|
||||
} else {
|
||||
|
|
@ -151,9 +199,12 @@ class ImportAssetDto {
|
|||
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
|
||||
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
|
||||
isArchived: mapValueOfType<bool>(json, r'isArchived'),
|
||||
isExternal: mapValueOfType<bool>(json, r'isExternal'),
|
||||
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
|
||||
isOffline: mapValueOfType<bool>(json, r'isOffline'),
|
||||
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly') ?? true,
|
||||
isVisible: mapValueOfType<bool>(json, r'isVisible'),
|
||||
libraryId: mapValueOfType<String>(json, r'libraryId'),
|
||||
sidecarPath: mapValueOfType<String>(json, r'sidecarPath'),
|
||||
);
|
||||
}
|
||||
|
|
|
|||
3
mobile/openapi/lib/model/job_name.dart
generated
3
mobile/openapi/lib/model/job_name.dart
generated
|
|
@ -33,6 +33,7 @@ class JobName {
|
|||
static const storageTemplateMigration = JobName._(r'storageTemplateMigration');
|
||||
static const search = JobName._(r'search');
|
||||
static const sidecar = JobName._(r'sidecar');
|
||||
static const library_ = JobName._(r'library');
|
||||
|
||||
/// List of all possible values in this [enum][JobName].
|
||||
static const values = <JobName>[
|
||||
|
|
@ -46,6 +47,7 @@ class JobName {
|
|||
storageTemplateMigration,
|
||||
search,
|
||||
sidecar,
|
||||
library_,
|
||||
];
|
||||
|
||||
static JobName? fromJson(dynamic value) => JobNameTypeTransformer().decode(value);
|
||||
|
|
@ -94,6 +96,7 @@ class JobNameTypeTransformer {
|
|||
case r'storageTemplateMigration': return JobName.storageTemplateMigration;
|
||||
case r'search': return JobName.search;
|
||||
case r'sidecar': return JobName.sidecar;
|
||||
case r'library': return JobName.library_;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
|
|
|||
178
mobile/openapi/lib/model/library_response_dto.dart
generated
Normal file
178
mobile/openapi/lib/model/library_response_dto.dart
generated
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class LibraryResponseDto {
|
||||
/// Returns a new [LibraryResponseDto] instance.
|
||||
LibraryResponseDto({
|
||||
required this.assetCount,
|
||||
required this.createdAt,
|
||||
this.exclusionPatterns = const [],
|
||||
required this.id,
|
||||
this.importPaths = const [],
|
||||
required this.name,
|
||||
required this.ownerId,
|
||||
required this.refreshedAt,
|
||||
required this.type,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
int assetCount;
|
||||
|
||||
DateTime createdAt;
|
||||
|
||||
List<String> exclusionPatterns;
|
||||
|
||||
String id;
|
||||
|
||||
List<String> importPaths;
|
||||
|
||||
String name;
|
||||
|
||||
String ownerId;
|
||||
|
||||
DateTime? refreshedAt;
|
||||
|
||||
LibraryType type;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LibraryResponseDto &&
|
||||
other.assetCount == assetCount &&
|
||||
other.createdAt == createdAt &&
|
||||
other.exclusionPatterns == exclusionPatterns &&
|
||||
other.id == id &&
|
||||
other.importPaths == importPaths &&
|
||||
other.name == name &&
|
||||
other.ownerId == ownerId &&
|
||||
other.refreshedAt == refreshedAt &&
|
||||
other.type == type &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(assetCount.hashCode) +
|
||||
(createdAt.hashCode) +
|
||||
(exclusionPatterns.hashCode) +
|
||||
(id.hashCode) +
|
||||
(importPaths.hashCode) +
|
||||
(name.hashCode) +
|
||||
(ownerId.hashCode) +
|
||||
(refreshedAt == null ? 0 : refreshedAt!.hashCode) +
|
||||
(type.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LibraryResponseDto[assetCount=$assetCount, createdAt=$createdAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name, ownerId=$ownerId, refreshedAt=$refreshedAt, type=$type, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'assetCount'] = this.assetCount;
|
||||
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
|
||||
json[r'exclusionPatterns'] = this.exclusionPatterns;
|
||||
json[r'id'] = this.id;
|
||||
json[r'importPaths'] = this.importPaths;
|
||||
json[r'name'] = this.name;
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
if (this.refreshedAt != null) {
|
||||
json[r'refreshedAt'] = this.refreshedAt!.toUtc().toIso8601String();
|
||||
} else {
|
||||
// json[r'refreshedAt'] = null;
|
||||
}
|
||||
json[r'type'] = this.type;
|
||||
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LibraryResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LibraryResponseDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return LibraryResponseDto(
|
||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||
createdAt: mapDateTime(json, r'createdAt', '')!,
|
||||
exclusionPatterns: json[r'exclusionPatterns'] is List
|
||||
? (json[r'exclusionPatterns'] as List).cast<String>()
|
||||
: const [],
|
||||
id: mapValueOfType<String>(json, r'id')!,
|
||||
importPaths: json[r'importPaths'] is List
|
||||
? (json[r'importPaths'] as List).cast<String>()
|
||||
: const [],
|
||||
name: mapValueOfType<String>(json, r'name')!,
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
refreshedAt: mapDateTime(json, r'refreshedAt', ''),
|
||||
type: LibraryType.fromJson(json[r'type'])!,
|
||||
updatedAt: mapDateTime(json, r'updatedAt', '')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<LibraryResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LibraryResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = LibraryResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, LibraryResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, LibraryResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = LibraryResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LibraryResponseDto-objects as value to a dart map
|
||||
static Map<String, List<LibraryResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<LibraryResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = LibraryResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'assetCount',
|
||||
'createdAt',
|
||||
'exclusionPatterns',
|
||||
'id',
|
||||
'importPaths',
|
||||
'name',
|
||||
'ownerId',
|
||||
'refreshedAt',
|
||||
'type',
|
||||
'updatedAt',
|
||||
};
|
||||
}
|
||||
|
||||
122
mobile/openapi/lib/model/library_stats_response_dto.dart
generated
Normal file
122
mobile/openapi/lib/model/library_stats_response_dto.dart
generated
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class LibraryStatsResponseDto {
|
||||
/// Returns a new [LibraryStatsResponseDto] instance.
|
||||
LibraryStatsResponseDto({
|
||||
this.photos = 0,
|
||||
this.total = 0,
|
||||
this.usage = 0,
|
||||
this.videos = 0,
|
||||
});
|
||||
|
||||
int photos;
|
||||
|
||||
int total;
|
||||
|
||||
int usage;
|
||||
|
||||
int videos;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is LibraryStatsResponseDto &&
|
||||
other.photos == photos &&
|
||||
other.total == total &&
|
||||
other.usage == usage &&
|
||||
other.videos == videos;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(photos.hashCode) +
|
||||
(total.hashCode) +
|
||||
(usage.hashCode) +
|
||||
(videos.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'LibraryStatsResponseDto[photos=$photos, total=$total, usage=$usage, videos=$videos]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'photos'] = this.photos;
|
||||
json[r'total'] = this.total;
|
||||
json[r'usage'] = this.usage;
|
||||
json[r'videos'] = this.videos;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [LibraryStatsResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static LibraryStatsResponseDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return LibraryStatsResponseDto(
|
||||
photos: mapValueOfType<int>(json, r'photos')!,
|
||||
total: mapValueOfType<int>(json, r'total')!,
|
||||
usage: mapValueOfType<int>(json, r'usage')!,
|
||||
videos: mapValueOfType<int>(json, r'videos')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<LibraryStatsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LibraryStatsResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = LibraryStatsResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, LibraryStatsResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, LibraryStatsResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = LibraryStatsResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of LibraryStatsResponseDto-objects as value to a dart map
|
||||
static Map<String, List<LibraryStatsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<LibraryStatsResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = LibraryStatsResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'photos',
|
||||
'total',
|
||||
'usage',
|
||||
'videos',
|
||||
};
|
||||
}
|
||||
|
||||
85
mobile/openapi/lib/model/library_type.dart
generated
Normal file
85
mobile/openapi/lib/model/library_type.dart
generated
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class LibraryType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const LibraryType._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const UPLOAD = LibraryType._(r'UPLOAD');
|
||||
static const EXTERNAL = LibraryType._(r'EXTERNAL');
|
||||
|
||||
/// List of all possible values in this [enum][LibraryType].
|
||||
static const values = <LibraryType>[
|
||||
UPLOAD,
|
||||
EXTERNAL,
|
||||
];
|
||||
|
||||
static LibraryType? fromJson(dynamic value) => LibraryTypeTypeTransformer().decode(value);
|
||||
|
||||
static List<LibraryType>? listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LibraryType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = LibraryType.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [LibraryType] to String,
|
||||
/// and [decode] dynamic data back to [LibraryType].
|
||||
class LibraryTypeTypeTransformer {
|
||||
factory LibraryTypeTypeTransformer() => _instance ??= const LibraryTypeTypeTransformer._();
|
||||
|
||||
const LibraryTypeTypeTransformer._();
|
||||
|
||||
String encode(LibraryType data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a LibraryType.
|
||||
///
|
||||
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
|
||||
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
|
||||
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
|
||||
///
|
||||
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
|
||||
/// and users are still using an old app with the old code.
|
||||
LibraryType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'UPLOAD': return LibraryType.UPLOAD;
|
||||
case r'EXTERNAL': return LibraryType.EXTERNAL;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [LibraryTypeTypeTransformer] instance.
|
||||
static LibraryTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
114
mobile/openapi/lib/model/scan_library_dto.dart
generated
Normal file
114
mobile/openapi/lib/model/scan_library_dto.dart
generated
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class ScanLibraryDto {
|
||||
/// Returns a new [ScanLibraryDto] instance.
|
||||
ScanLibraryDto({
|
||||
this.refreshAllFiles = false,
|
||||
this.refreshModifiedFiles,
|
||||
});
|
||||
|
||||
bool refreshAllFiles;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? refreshModifiedFiles;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is ScanLibraryDto &&
|
||||
other.refreshAllFiles == refreshAllFiles &&
|
||||
other.refreshModifiedFiles == refreshModifiedFiles;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(refreshAllFiles.hashCode) +
|
||||
(refreshModifiedFiles == null ? 0 : refreshModifiedFiles!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'ScanLibraryDto[refreshAllFiles=$refreshAllFiles, refreshModifiedFiles=$refreshModifiedFiles]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'refreshAllFiles'] = this.refreshAllFiles;
|
||||
if (this.refreshModifiedFiles != null) {
|
||||
json[r'refreshModifiedFiles'] = this.refreshModifiedFiles;
|
||||
} else {
|
||||
// json[r'refreshModifiedFiles'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [ScanLibraryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static ScanLibraryDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return ScanLibraryDto(
|
||||
refreshAllFiles: mapValueOfType<bool>(json, r'refreshAllFiles') ?? false,
|
||||
refreshModifiedFiles: mapValueOfType<bool>(json, r'refreshModifiedFiles'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<ScanLibraryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ScanLibraryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = ScanLibraryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, ScanLibraryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, ScanLibraryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = ScanLibraryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of ScanLibraryDto-objects as value to a dart map
|
||||
static Map<String, List<ScanLibraryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<ScanLibraryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = ScanLibraryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
10
mobile/openapi/lib/model/system_config_job_dto.dart
generated
10
mobile/openapi/lib/model/system_config_job_dto.dart
generated
|
|
@ -15,6 +15,7 @@ class SystemConfigJobDto {
|
|||
SystemConfigJobDto({
|
||||
required this.backgroundTask,
|
||||
required this.clipEncoding,
|
||||
required this.library_,
|
||||
required this.metadataExtraction,
|
||||
required this.objectTagging,
|
||||
required this.recognizeFaces,
|
||||
|
|
@ -29,6 +30,8 @@ class SystemConfigJobDto {
|
|||
|
||||
JobSettingsDto clipEncoding;
|
||||
|
||||
JobSettingsDto library_;
|
||||
|
||||
JobSettingsDto metadataExtraction;
|
||||
|
||||
JobSettingsDto objectTagging;
|
||||
|
|
@ -49,6 +52,7 @@ class SystemConfigJobDto {
|
|||
bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto &&
|
||||
other.backgroundTask == backgroundTask &&
|
||||
other.clipEncoding == clipEncoding &&
|
||||
other.library_ == library_ &&
|
||||
other.metadataExtraction == metadataExtraction &&
|
||||
other.objectTagging == objectTagging &&
|
||||
other.recognizeFaces == recognizeFaces &&
|
||||
|
|
@ -63,6 +67,7 @@ class SystemConfigJobDto {
|
|||
// ignore: unnecessary_parenthesis
|
||||
(backgroundTask.hashCode) +
|
||||
(clipEncoding.hashCode) +
|
||||
(library_.hashCode) +
|
||||
(metadataExtraction.hashCode) +
|
||||
(objectTagging.hashCode) +
|
||||
(recognizeFaces.hashCode) +
|
||||
|
|
@ -73,12 +78,13 @@ class SystemConfigJobDto {
|
|||
(videoConversion.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, clipEncoding=$clipEncoding, metadataExtraction=$metadataExtraction, objectTagging=$objectTagging, recognizeFaces=$recognizeFaces, search=$search, sidecar=$sidecar, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]';
|
||||
String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, clipEncoding=$clipEncoding, library_=$library_, metadataExtraction=$metadataExtraction, objectTagging=$objectTagging, recognizeFaces=$recognizeFaces, search=$search, sidecar=$sidecar, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'backgroundTask'] = this.backgroundTask;
|
||||
json[r'clipEncoding'] = this.clipEncoding;
|
||||
json[r'library'] = this.library_;
|
||||
json[r'metadataExtraction'] = this.metadataExtraction;
|
||||
json[r'objectTagging'] = this.objectTagging;
|
||||
json[r'recognizeFaces'] = this.recognizeFaces;
|
||||
|
|
@ -100,6 +106,7 @@ class SystemConfigJobDto {
|
|||
return SystemConfigJobDto(
|
||||
backgroundTask: JobSettingsDto.fromJson(json[r'backgroundTask'])!,
|
||||
clipEncoding: JobSettingsDto.fromJson(json[r'clipEncoding'])!,
|
||||
library_: JobSettingsDto.fromJson(json[r'library'])!,
|
||||
metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!,
|
||||
objectTagging: JobSettingsDto.fromJson(json[r'objectTagging'])!,
|
||||
recognizeFaces: JobSettingsDto.fromJson(json[r'recognizeFaces'])!,
|
||||
|
|
@ -157,6 +164,7 @@ class SystemConfigJobDto {
|
|||
static const requiredKeys = <String>{
|
||||
'backgroundTask',
|
||||
'clipEncoding',
|
||||
'library',
|
||||
'metadataExtraction',
|
||||
'objectTagging',
|
||||
'recognizeFaces',
|
||||
|
|
|
|||
142
mobile/openapi/lib/model/update_library_dto.dart
generated
Normal file
142
mobile/openapi/lib/model/update_library_dto.dart
generated
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
// @dart=2.12
|
||||
|
||||
// ignore_for_file: unused_element, unused_import
|
||||
// ignore_for_file: always_put_required_named_parameters_first
|
||||
// ignore_for_file: constant_identifier_names
|
||||
// ignore_for_file: lines_longer_than_80_chars
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class UpdateLibraryDto {
|
||||
/// Returns a new [UpdateLibraryDto] instance.
|
||||
UpdateLibraryDto({
|
||||
this.exclusionPatterns = const [],
|
||||
this.importPaths = const [],
|
||||
this.isVisible,
|
||||
this.name,
|
||||
});
|
||||
|
||||
List<String> exclusionPatterns;
|
||||
|
||||
List<String> importPaths;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isVisible;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
String? name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is UpdateLibraryDto &&
|
||||
other.exclusionPatterns == exclusionPatterns &&
|
||||
other.importPaths == importPaths &&
|
||||
other.isVisible == isVisible &&
|
||||
other.name == name;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(exclusionPatterns.hashCode) +
|
||||
(importPaths.hashCode) +
|
||||
(isVisible == null ? 0 : isVisible!.hashCode) +
|
||||
(name == null ? 0 : name!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'UpdateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, isVisible=$isVisible, name=$name]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'exclusionPatterns'] = this.exclusionPatterns;
|
||||
json[r'importPaths'] = this.importPaths;
|
||||
if (this.isVisible != null) {
|
||||
json[r'isVisible'] = this.isVisible;
|
||||
} else {
|
||||
// json[r'isVisible'] = null;
|
||||
}
|
||||
if (this.name != null) {
|
||||
json[r'name'] = this.name;
|
||||
} else {
|
||||
// json[r'name'] = null;
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [UpdateLibraryDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static UpdateLibraryDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return UpdateLibraryDto(
|
||||
exclusionPatterns: json[r'exclusionPatterns'] is List
|
||||
? (json[r'exclusionPatterns'] as List).cast<String>()
|
||||
: const [],
|
||||
importPaths: json[r'importPaths'] is List
|
||||
? (json[r'importPaths'] as List).cast<String>()
|
||||
: const [],
|
||||
isVisible: mapValueOfType<bool>(json, r'isVisible'),
|
||||
name: mapValueOfType<String>(json, r'name'),
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<UpdateLibraryDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UpdateLibraryDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = UpdateLibraryDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, UpdateLibraryDto> mapFromJson(dynamic json) {
|
||||
final map = <String, UpdateLibraryDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = UpdateLibraryDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of UpdateLibraryDto-objects as value to a dart map
|
||||
static Map<String, List<UpdateLibraryDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<UpdateLibraryDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = UpdateLibraryDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue