mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: annotate oneOf in open api schema
This commit is contained in:
Generated
+8
@@ -389,6 +389,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [AudioCodec](doc//AudioCodec.md)
|
- [AudioCodec](doc//AudioCodec.md)
|
||||||
- [AuthStatusResponseDto](doc//AuthStatusResponseDto.md)
|
- [AuthStatusResponseDto](doc//AuthStatusResponseDto.md)
|
||||||
- [AvatarUpdate](doc//AvatarUpdate.md)
|
- [AvatarUpdate](doc//AvatarUpdate.md)
|
||||||
|
- [BaseJobData](doc//BaseJobData.md)
|
||||||
- [BulkIdErrorReason](doc//BulkIdErrorReason.md)
|
- [BulkIdErrorReason](doc//BulkIdErrorReason.md)
|
||||||
- [BulkIdResponseDto](doc//BulkIdResponseDto.md)
|
- [BulkIdResponseDto](doc//BulkIdResponseDto.md)
|
||||||
- [BulkIdsDto](doc//BulkIdsDto.md)
|
- [BulkIdsDto](doc//BulkIdsDto.md)
|
||||||
@@ -422,8 +423,14 @@ Class | Method | HTTP request | Description
|
|||||||
- [FoldersUpdate](doc//FoldersUpdate.md)
|
- [FoldersUpdate](doc//FoldersUpdate.md)
|
||||||
- [ImageFormat](doc//ImageFormat.md)
|
- [ImageFormat](doc//ImageFormat.md)
|
||||||
- [JobCreateDto](doc//JobCreateDto.md)
|
- [JobCreateDto](doc//JobCreateDto.md)
|
||||||
|
- [JobDatabaseBackup](doc//JobDatabaseBackup.md)
|
||||||
|
- [JobMemoryCleanup](doc//JobMemoryCleanup.md)
|
||||||
|
- [JobMemoryGenerate](doc//JobMemoryGenerate.md)
|
||||||
- [JobName](doc//JobName.md)
|
- [JobName](doc//JobName.md)
|
||||||
|
- [JobPersonCleanup](doc//JobPersonCleanup.md)
|
||||||
- [JobSettingsDto](doc//JobSettingsDto.md)
|
- [JobSettingsDto](doc//JobSettingsDto.md)
|
||||||
|
- [JobTagCleanup](doc//JobTagCleanup.md)
|
||||||
|
- [JobUserDeleteCheck](doc//JobUserDeleteCheck.md)
|
||||||
- [LibraryResponseDto](doc//LibraryResponseDto.md)
|
- [LibraryResponseDto](doc//LibraryResponseDto.md)
|
||||||
- [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md)
|
- [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md)
|
||||||
- [LicenseKeyDto](doc//LicenseKeyDto.md)
|
- [LicenseKeyDto](doc//LicenseKeyDto.md)
|
||||||
@@ -497,6 +504,7 @@ Class | Method | HTTP request | Description
|
|||||||
- [QueueCommandDto](doc//QueueCommandDto.md)
|
- [QueueCommandDto](doc//QueueCommandDto.md)
|
||||||
- [QueueDeleteDto](doc//QueueDeleteDto.md)
|
- [QueueDeleteDto](doc//QueueDeleteDto.md)
|
||||||
- [QueueJobCreateDto](doc//QueueJobCreateDto.md)
|
- [QueueJobCreateDto](doc//QueueJobCreateDto.md)
|
||||||
|
- [QueueJobCreateDtoJob](doc//QueueJobCreateDtoJob.md)
|
||||||
- [QueueJobResponseDto](doc//QueueJobResponseDto.md)
|
- [QueueJobResponseDto](doc//QueueJobResponseDto.md)
|
||||||
- [QueueJobStatus](doc//QueueJobStatus.md)
|
- [QueueJobStatus](doc//QueueJobStatus.md)
|
||||||
- [QueueName](doc//QueueName.md)
|
- [QueueName](doc//QueueName.md)
|
||||||
|
|||||||
Generated
+8
@@ -134,6 +134,7 @@ part 'model/asset_visibility.dart';
|
|||||||
part 'model/audio_codec.dart';
|
part 'model/audio_codec.dart';
|
||||||
part 'model/auth_status_response_dto.dart';
|
part 'model/auth_status_response_dto.dart';
|
||||||
part 'model/avatar_update.dart';
|
part 'model/avatar_update.dart';
|
||||||
|
part 'model/base_job_data.dart';
|
||||||
part 'model/bulk_id_error_reason.dart';
|
part 'model/bulk_id_error_reason.dart';
|
||||||
part 'model/bulk_id_response_dto.dart';
|
part 'model/bulk_id_response_dto.dart';
|
||||||
part 'model/bulk_ids_dto.dart';
|
part 'model/bulk_ids_dto.dart';
|
||||||
@@ -167,8 +168,14 @@ part 'model/folders_response.dart';
|
|||||||
part 'model/folders_update.dart';
|
part 'model/folders_update.dart';
|
||||||
part 'model/image_format.dart';
|
part 'model/image_format.dart';
|
||||||
part 'model/job_create_dto.dart';
|
part 'model/job_create_dto.dart';
|
||||||
|
part 'model/job_database_backup.dart';
|
||||||
|
part 'model/job_memory_cleanup.dart';
|
||||||
|
part 'model/job_memory_generate.dart';
|
||||||
part 'model/job_name.dart';
|
part 'model/job_name.dart';
|
||||||
|
part 'model/job_person_cleanup.dart';
|
||||||
part 'model/job_settings_dto.dart';
|
part 'model/job_settings_dto.dart';
|
||||||
|
part 'model/job_tag_cleanup.dart';
|
||||||
|
part 'model/job_user_delete_check.dart';
|
||||||
part 'model/library_response_dto.dart';
|
part 'model/library_response_dto.dart';
|
||||||
part 'model/library_stats_response_dto.dart';
|
part 'model/library_stats_response_dto.dart';
|
||||||
part 'model/license_key_dto.dart';
|
part 'model/license_key_dto.dart';
|
||||||
@@ -242,6 +249,7 @@ part 'model/queue_command.dart';
|
|||||||
part 'model/queue_command_dto.dart';
|
part 'model/queue_command_dto.dart';
|
||||||
part 'model/queue_delete_dto.dart';
|
part 'model/queue_delete_dto.dart';
|
||||||
part 'model/queue_job_create_dto.dart';
|
part 'model/queue_job_create_dto.dart';
|
||||||
|
part 'model/queue_job_create_dto_job.dart';
|
||||||
part 'model/queue_job_response_dto.dart';
|
part 'model/queue_job_response_dto.dart';
|
||||||
part 'model/queue_job_status.dart';
|
part 'model/queue_job_status.dart';
|
||||||
part 'model/queue_name.dart';
|
part 'model/queue_name.dart';
|
||||||
|
|||||||
Generated
+16
@@ -316,6 +316,8 @@ class ApiClient {
|
|||||||
return AuthStatusResponseDto.fromJson(value);
|
return AuthStatusResponseDto.fromJson(value);
|
||||||
case 'AvatarUpdate':
|
case 'AvatarUpdate':
|
||||||
return AvatarUpdate.fromJson(value);
|
return AvatarUpdate.fromJson(value);
|
||||||
|
case 'BaseJobData':
|
||||||
|
return BaseJobData.fromJson(value);
|
||||||
case 'BulkIdErrorReason':
|
case 'BulkIdErrorReason':
|
||||||
return BulkIdErrorReasonTypeTransformer().decode(value);
|
return BulkIdErrorReasonTypeTransformer().decode(value);
|
||||||
case 'BulkIdResponseDto':
|
case 'BulkIdResponseDto':
|
||||||
@@ -382,10 +384,22 @@ class ApiClient {
|
|||||||
return ImageFormatTypeTransformer().decode(value);
|
return ImageFormatTypeTransformer().decode(value);
|
||||||
case 'JobCreateDto':
|
case 'JobCreateDto':
|
||||||
return JobCreateDto.fromJson(value);
|
return JobCreateDto.fromJson(value);
|
||||||
|
case 'JobDatabaseBackup':
|
||||||
|
return JobDatabaseBackup.fromJson(value);
|
||||||
|
case 'JobMemoryCleanup':
|
||||||
|
return JobMemoryCleanup.fromJson(value);
|
||||||
|
case 'JobMemoryGenerate':
|
||||||
|
return JobMemoryGenerate.fromJson(value);
|
||||||
case 'JobName':
|
case 'JobName':
|
||||||
return JobNameTypeTransformer().decode(value);
|
return JobNameTypeTransformer().decode(value);
|
||||||
|
case 'JobPersonCleanup':
|
||||||
|
return JobPersonCleanup.fromJson(value);
|
||||||
case 'JobSettingsDto':
|
case 'JobSettingsDto':
|
||||||
return JobSettingsDto.fromJson(value);
|
return JobSettingsDto.fromJson(value);
|
||||||
|
case 'JobTagCleanup':
|
||||||
|
return JobTagCleanup.fromJson(value);
|
||||||
|
case 'JobUserDeleteCheck':
|
||||||
|
return JobUserDeleteCheck.fromJson(value);
|
||||||
case 'LibraryResponseDto':
|
case 'LibraryResponseDto':
|
||||||
return LibraryResponseDto.fromJson(value);
|
return LibraryResponseDto.fromJson(value);
|
||||||
case 'LibraryStatsResponseDto':
|
case 'LibraryStatsResponseDto':
|
||||||
@@ -532,6 +546,8 @@ class ApiClient {
|
|||||||
return QueueDeleteDto.fromJson(value);
|
return QueueDeleteDto.fromJson(value);
|
||||||
case 'QueueJobCreateDto':
|
case 'QueueJobCreateDto':
|
||||||
return QueueJobCreateDto.fromJson(value);
|
return QueueJobCreateDto.fromJson(value);
|
||||||
|
case 'QueueJobCreateDtoJob':
|
||||||
|
return QueueJobCreateDtoJob.fromJson(value);
|
||||||
case 'QueueJobResponseDto':
|
case 'QueueJobResponseDto':
|
||||||
return QueueJobResponseDto.fromJson(value);
|
return QueueJobResponseDto.fromJson(value);
|
||||||
case 'QueueJobStatus':
|
case 'QueueJobStatus':
|
||||||
|
|||||||
+108
@@ -0,0 +1,108 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 BaseJobData {
|
||||||
|
/// Returns a new [BaseJobData] instance.
|
||||||
|
BaseJobData({
|
||||||
|
this.force,
|
||||||
|
});
|
||||||
|
|
||||||
|
///
|
||||||
|
/// 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? force;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is BaseJobData &&
|
||||||
|
other.force == force;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(force == null ? 0 : force!.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'BaseJobData[force=$force]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
if (this.force != null) {
|
||||||
|
json[r'force'] = this.force;
|
||||||
|
} else {
|
||||||
|
// json[r'force'] = null;
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [BaseJobData] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static BaseJobData? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "BaseJobData");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return BaseJobData(
|
||||||
|
force: mapValueOfType<bool>(json, r'force'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<BaseJobData> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <BaseJobData>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = BaseJobData.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, BaseJobData> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, BaseJobData>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = BaseJobData.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of BaseJobData-objects as value to a dart map
|
||||||
|
static Map<String, List<BaseJobData>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<BaseJobData>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = BaseJobData.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobDatabaseBackup {
|
||||||
|
/// Returns a new [JobDatabaseBackup] instance.
|
||||||
|
JobDatabaseBackup({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobDatabaseBackup &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobDatabaseBackup[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobDatabaseBackup] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobDatabaseBackup? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobDatabaseBackup");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobDatabaseBackup(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobDatabaseBackup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobDatabaseBackup>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobDatabaseBackup.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobDatabaseBackup> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobDatabaseBackup>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobDatabaseBackup.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobDatabaseBackup-objects as value to a dart map
|
||||||
|
static Map<String, List<JobDatabaseBackup>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobDatabaseBackup>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobDatabaseBackup.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobMemoryCleanup {
|
||||||
|
/// Returns a new [JobMemoryCleanup] instance.
|
||||||
|
JobMemoryCleanup({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobMemoryCleanup &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobMemoryCleanup[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobMemoryCleanup] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobMemoryCleanup? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobMemoryCleanup");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobMemoryCleanup(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobMemoryCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobMemoryCleanup>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobMemoryCleanup.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobMemoryCleanup> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobMemoryCleanup>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobMemoryCleanup.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobMemoryCleanup-objects as value to a dart map
|
||||||
|
static Map<String, List<JobMemoryCleanup>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobMemoryCleanup>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobMemoryCleanup.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobMemoryGenerate {
|
||||||
|
/// Returns a new [JobMemoryGenerate] instance.
|
||||||
|
JobMemoryGenerate({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobMemoryGenerate &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobMemoryGenerate[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobMemoryGenerate] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobMemoryGenerate? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobMemoryGenerate");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobMemoryGenerate(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobMemoryGenerate> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobMemoryGenerate>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobMemoryGenerate.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobMemoryGenerate> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobMemoryGenerate>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobMemoryGenerate.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobMemoryGenerate-objects as value to a dart map
|
||||||
|
static Map<String, List<JobMemoryGenerate>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobMemoryGenerate>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobMemoryGenerate.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobPersonCleanup {
|
||||||
|
/// Returns a new [JobPersonCleanup] instance.
|
||||||
|
JobPersonCleanup({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobPersonCleanup &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobPersonCleanup[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobPersonCleanup] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobPersonCleanup? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobPersonCleanup");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobPersonCleanup(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobPersonCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobPersonCleanup>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobPersonCleanup.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobPersonCleanup> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobPersonCleanup>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobPersonCleanup.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobPersonCleanup-objects as value to a dart map
|
||||||
|
static Map<String, List<JobPersonCleanup>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobPersonCleanup>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobPersonCleanup.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobTagCleanup {
|
||||||
|
/// Returns a new [JobTagCleanup] instance.
|
||||||
|
JobTagCleanup({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobTagCleanup &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobTagCleanup[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobTagCleanup] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobTagCleanup? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobTagCleanup");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobTagCleanup(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobTagCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobTagCleanup>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobTagCleanup.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobTagCleanup> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobTagCleanup>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobTagCleanup.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobTagCleanup-objects as value to a dart map
|
||||||
|
static Map<String, List<JobTagCleanup>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobTagCleanup>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobTagCleanup.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 JobUserDeleteCheck {
|
||||||
|
/// Returns a new [JobUserDeleteCheck] instance.
|
||||||
|
JobUserDeleteCheck({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is JobUserDeleteCheck &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'JobUserDeleteCheck[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [JobUserDeleteCheck] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static JobUserDeleteCheck? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "JobUserDeleteCheck");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return JobUserDeleteCheck(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<JobUserDeleteCheck> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <JobUserDeleteCheck>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = JobUserDeleteCheck.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, JobUserDeleteCheck> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, JobUserDeleteCheck>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = JobUserDeleteCheck.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of JobUserDeleteCheck-objects as value to a dart map
|
||||||
|
static Map<String, List<JobUserDeleteCheck>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<JobUserDeleteCheck>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = JobUserDeleteCheck.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
+2
-2
@@ -16,7 +16,7 @@ class QueueJobCreateDto {
|
|||||||
required this.job,
|
required this.job,
|
||||||
});
|
});
|
||||||
|
|
||||||
Object job;
|
QueueJobCreateDtoJob job;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
bool operator ==(Object other) => identical(this, other) || other is QueueJobCreateDto &&
|
bool operator ==(Object other) => identical(this, other) || other is QueueJobCreateDto &&
|
||||||
@@ -45,7 +45,7 @@ class QueueJobCreateDto {
|
|||||||
final json = value.cast<String, dynamic>();
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
return QueueJobCreateDto(
|
return QueueJobCreateDto(
|
||||||
job: mapValueOfType<Object>(json, r'job')!,
|
job: QueueJobCreateDtoJob.fromJson(json[r'job'])!,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
//
|
||||||
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||||
|
//
|
||||||
|
// @dart=2.18
|
||||||
|
|
||||||
|
// 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 QueueJobCreateDtoJob {
|
||||||
|
/// Returns a new [QueueJobCreateDtoJob] instance.
|
||||||
|
QueueJobCreateDtoJob({
|
||||||
|
required this.data,
|
||||||
|
required this.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
BaseJobData data;
|
||||||
|
|
||||||
|
num name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
bool operator ==(Object other) => identical(this, other) || other is QueueJobCreateDtoJob &&
|
||||||
|
other.data == data &&
|
||||||
|
other.name == name;
|
||||||
|
|
||||||
|
@override
|
||||||
|
int get hashCode =>
|
||||||
|
// ignore: unnecessary_parenthesis
|
||||||
|
(data.hashCode) +
|
||||||
|
(name.hashCode);
|
||||||
|
|
||||||
|
@override
|
||||||
|
String toString() => 'QueueJobCreateDtoJob[data=$data, name=$name]';
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final json = <String, dynamic>{};
|
||||||
|
json[r'data'] = this.data;
|
||||||
|
json[r'name'] = this.name;
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns a new [QueueJobCreateDtoJob] instance and imports its values from
|
||||||
|
/// [value] if it's a [Map], null otherwise.
|
||||||
|
// ignore: prefer_constructors_over_static_methods
|
||||||
|
static QueueJobCreateDtoJob? fromJson(dynamic value) {
|
||||||
|
upgradeDto(value, "QueueJobCreateDtoJob");
|
||||||
|
if (value is Map) {
|
||||||
|
final json = value.cast<String, dynamic>();
|
||||||
|
|
||||||
|
return QueueJobCreateDtoJob(
|
||||||
|
data: BaseJobData.fromJson(json[r'data'])!,
|
||||||
|
name: num.parse('${json[r'name']}'),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
static List<QueueJobCreateDtoJob> listFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final result = <QueueJobCreateDtoJob>[];
|
||||||
|
if (json is List && json.isNotEmpty) {
|
||||||
|
for (final row in json) {
|
||||||
|
final value = QueueJobCreateDtoJob.fromJson(row);
|
||||||
|
if (value != null) {
|
||||||
|
result.add(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result.toList(growable: growable);
|
||||||
|
}
|
||||||
|
|
||||||
|
static Map<String, QueueJobCreateDtoJob> mapFromJson(dynamic json) {
|
||||||
|
final map = <String, QueueJobCreateDtoJob>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
final value = QueueJobCreateDtoJob.fromJson(entry.value);
|
||||||
|
if (value != null) {
|
||||||
|
map[entry.key] = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
// maps a json object with a list of QueueJobCreateDtoJob-objects as value to a dart map
|
||||||
|
static Map<String, List<QueueJobCreateDtoJob>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||||
|
final map = <String, List<QueueJobCreateDtoJob>>{};
|
||||||
|
if (json is Map && json.isNotEmpty) {
|
||||||
|
// ignore: parameter_assignments
|
||||||
|
json = json.cast<String, dynamic>();
|
||||||
|
for (final entry in json.entries) {
|
||||||
|
map[entry.key] = QueueJobCreateDtoJob.listFromJson(entry.value, growable: growable,);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The list of required keys that must be present in a JSON.
|
||||||
|
static const requiredKeys = <String>{
|
||||||
|
'data',
|
||||||
|
'name',
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@@ -16575,6 +16575,14 @@
|
|||||||
},
|
},
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"BaseJobData": {
|
||||||
|
"properties": {
|
||||||
|
"force": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"BulkIdErrorReason": {
|
"BulkIdErrorReason": {
|
||||||
"enum": [
|
"enum": [
|
||||||
"duplicate",
|
"duplicate",
|
||||||
@@ -17255,6 +17263,54 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"JobDatabaseBackup": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"JobMemoryCleanup": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"JobMemoryGenerate": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"JobName": {
|
"JobName": {
|
||||||
"enum": [
|
"enum": [
|
||||||
"AssetDelete",
|
"AssetDelete",
|
||||||
@@ -17316,6 +17372,22 @@
|
|||||||
],
|
],
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"JobPersonCleanup": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"JobSettingsDto": {
|
"JobSettingsDto": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"concurrency": {
|
"concurrency": {
|
||||||
@@ -17328,6 +17400,38 @@
|
|||||||
],
|
],
|
||||||
"type": "object"
|
"type": "object"
|
||||||
},
|
},
|
||||||
|
"JobTagCleanup": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
|
"JobUserDeleteCheck": {
|
||||||
|
"properties": {
|
||||||
|
"data": {
|
||||||
|
"$ref": "#/components/schemas/BaseJobData"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"enum": [],
|
||||||
|
"type": "number"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"data",
|
||||||
|
"name"
|
||||||
|
],
|
||||||
|
"type": "object"
|
||||||
|
},
|
||||||
"LibraryResponseDto": {
|
"LibraryResponseDto": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"assetCount": {
|
"assetCount": {
|
||||||
@@ -19188,7 +19292,26 @@
|
|||||||
"QueueJobCreateDto": {
|
"QueueJobCreateDto": {
|
||||||
"properties": {
|
"properties": {
|
||||||
"job": {
|
"job": {
|
||||||
"type": "object"
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobTagCleanup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobPersonCleanup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobUserDeleteCheck"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobMemoryCleanup"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobMemoryGenerate"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/JobDatabaseBackup"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -1038,8 +1038,35 @@ export type QueueResponseDto = {
|
|||||||
name: QueueName;
|
name: QueueName;
|
||||||
statistics: QueueStatisticsDto;
|
statistics: QueueStatisticsDto;
|
||||||
};
|
};
|
||||||
|
export type BaseJobData = {
|
||||||
|
force?: boolean;
|
||||||
|
};
|
||||||
|
export type JobTagCleanup = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
|
export type JobPersonCleanup = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
|
export type JobUserDeleteCheck = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
|
export type JobMemoryCleanup = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
|
export type JobMemoryGenerate = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
|
export type JobDatabaseBackup = {
|
||||||
|
data: BaseJobData;
|
||||||
|
name: Name;
|
||||||
|
};
|
||||||
export type QueueJobCreateDto = {
|
export type QueueJobCreateDto = {
|
||||||
job: object;
|
job: JobTagCleanup | JobPersonCleanup | JobUserDeleteCheck | JobMemoryCleanup | JobMemoryGenerate | JobDatabaseBackup;
|
||||||
};
|
};
|
||||||
export type QueueUpdateDto = {
|
export type QueueUpdateDto = {
|
||||||
isPaused?: boolean;
|
isPaused?: boolean;
|
||||||
@@ -5609,6 +5636,8 @@ export enum PluginTriggerType {
|
|||||||
AssetCreate = "AssetCreate",
|
AssetCreate = "AssetCreate",
|
||||||
PersonRecognized = "PersonRecognized"
|
PersonRecognized = "PersonRecognized"
|
||||||
}
|
}
|
||||||
|
export enum Name {
|
||||||
|
}
|
||||||
export enum QueueJobStatus {
|
export enum QueueJobStatus {
|
||||||
Active = "active",
|
Active = "active",
|
||||||
Failed = "failed",
|
Failed = "failed",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger';
|
import { ApiExtraModels, ApiProperty, getSchemaPath } from '@nestjs/swagger';
|
||||||
import { ClassConstructor, Transform, Type } from 'class-transformer';
|
import { ClassConstructor, Transform, Type } from 'class-transformer';
|
||||||
import { Equals, IsBoolean, IsDefined, IsOptional, ValidateNested } from 'class-validator';
|
import { Equals, IsBoolean, IsDefined, IsOptional, ValidateNested } from 'class-validator';
|
||||||
import { HistoryBuilder, Property } from 'src/decorators';
|
import { HistoryBuilder, Property } from 'src/decorators';
|
||||||
@@ -56,7 +56,11 @@ const JOB_MAP: Record<string, ClassConstructor<object>> = {
|
|||||||
[JobName.DatabaseBackup]: JobDatabaseBackup,
|
[JobName.DatabaseBackup]: JobDatabaseBackup,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ApiExtraModels(...Object.values(JOB_MAP))
|
||||||
export class QueueJobCreateDto {
|
export class QueueJobCreateDto {
|
||||||
|
@ApiProperty({
|
||||||
|
oneOf: Object.values(JOB_MAP).map((job) => ({ $ref: getSchemaPath(job) })),
|
||||||
|
})
|
||||||
@ValidateNested()
|
@ValidateNested()
|
||||||
@Transform(transformToOneOf(JOB_MAP))
|
@Transform(transformToOneOf(JOB_MAP))
|
||||||
@IsDefined({
|
@IsDefined({
|
||||||
|
|||||||
Reference in New Issue
Block a user