mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix: ensure name spec is defined correctly
This commit is contained in:
Generated
+6
@@ -406,6 +406,7 @@ Class | Method | HTTP request | Description
|
||||
- [CreateLibraryDto](doc//CreateLibraryDto.md)
|
||||
- [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md)
|
||||
- [CropParameters](doc//CropParameters.md)
|
||||
- [DatabaseBackup](doc//DatabaseBackup.md)
|
||||
- [DatabaseBackupConfig](doc//DatabaseBackupConfig.md)
|
||||
- [DownloadArchiveInfo](doc//DownloadArchiveInfo.md)
|
||||
- [DownloadInfoDto](doc//DownloadInfoDto.md)
|
||||
@@ -448,7 +449,9 @@ Class | Method | HTTP request | Description
|
||||
- [MapReverseGeocodeResponseDto](doc//MapReverseGeocodeResponseDto.md)
|
||||
- [MemoriesResponse](doc//MemoriesResponse.md)
|
||||
- [MemoriesUpdate](doc//MemoriesUpdate.md)
|
||||
- [MemoryCleanup](doc//MemoryCleanup.md)
|
||||
- [MemoryCreateDto](doc//MemoryCreateDto.md)
|
||||
- [MemoryGenerate](doc//MemoryGenerate.md)
|
||||
- [MemoryResponseDto](doc//MemoryResponseDto.md)
|
||||
- [MemorySearchOrder](doc//MemorySearchOrder.md)
|
||||
- [MemoryStatisticsResponseDto](doc//MemoryStatisticsResponseDto.md)
|
||||
@@ -483,6 +486,7 @@ Class | Method | HTTP request | Description
|
||||
- [PeopleUpdateDto](doc//PeopleUpdateDto.md)
|
||||
- [PeopleUpdateItem](doc//PeopleUpdateItem.md)
|
||||
- [Permission](doc//Permission.md)
|
||||
- [PersonCleanup](doc//PersonCleanup.md)
|
||||
- [PersonCreateDto](doc//PersonCreateDto.md)
|
||||
- [PersonResponseDto](doc//PersonResponseDto.md)
|
||||
- [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md)
|
||||
@@ -627,6 +631,7 @@ Class | Method | HTTP request | Description
|
||||
- [SystemConfigUserDto](doc//SystemConfigUserDto.md)
|
||||
- [TagBulkAssetsDto](doc//TagBulkAssetsDto.md)
|
||||
- [TagBulkAssetsResponseDto](doc//TagBulkAssetsResponseDto.md)
|
||||
- [TagCleanup](doc//TagCleanup.md)
|
||||
- [TagCreateDto](doc//TagCreateDto.md)
|
||||
- [TagResponseDto](doc//TagResponseDto.md)
|
||||
- [TagUpdateDto](doc//TagUpdateDto.md)
|
||||
@@ -652,6 +657,7 @@ Class | Method | HTTP request | Description
|
||||
- [UserAdminResponseDto](doc//UserAdminResponseDto.md)
|
||||
- [UserAdminUpdateDto](doc//UserAdminUpdateDto.md)
|
||||
- [UserAvatarColor](doc//UserAvatarColor.md)
|
||||
- [UserDeleteCheck](doc//UserDeleteCheck.md)
|
||||
- [UserLicense](doc//UserLicense.md)
|
||||
- [UserMetadataKey](doc//UserMetadataKey.md)
|
||||
- [UserPreferencesResponseDto](doc//UserPreferencesResponseDto.md)
|
||||
|
||||
Generated
+6
@@ -151,6 +151,7 @@ part 'model/create_album_dto.dart';
|
||||
part 'model/create_library_dto.dart';
|
||||
part 'model/create_profile_image_response_dto.dart';
|
||||
part 'model/crop_parameters.dart';
|
||||
part 'model/database_backup.dart';
|
||||
part 'model/database_backup_config.dart';
|
||||
part 'model/download_archive_info.dart';
|
||||
part 'model/download_info_dto.dart';
|
||||
@@ -193,7 +194,9 @@ part 'model/map_marker_response_dto.dart';
|
||||
part 'model/map_reverse_geocode_response_dto.dart';
|
||||
part 'model/memories_response.dart';
|
||||
part 'model/memories_update.dart';
|
||||
part 'model/memory_cleanup.dart';
|
||||
part 'model/memory_create_dto.dart';
|
||||
part 'model/memory_generate.dart';
|
||||
part 'model/memory_response_dto.dart';
|
||||
part 'model/memory_search_order.dart';
|
||||
part 'model/memory_statistics_response_dto.dart';
|
||||
@@ -228,6 +231,7 @@ part 'model/people_update.dart';
|
||||
part 'model/people_update_dto.dart';
|
||||
part 'model/people_update_item.dart';
|
||||
part 'model/permission.dart';
|
||||
part 'model/person_cleanup.dart';
|
||||
part 'model/person_create_dto.dart';
|
||||
part 'model/person_response_dto.dart';
|
||||
part 'model/person_statistics_response_dto.dart';
|
||||
@@ -372,6 +376,7 @@ part 'model/system_config_trash_dto.dart';
|
||||
part 'model/system_config_user_dto.dart';
|
||||
part 'model/tag_bulk_assets_dto.dart';
|
||||
part 'model/tag_bulk_assets_response_dto.dart';
|
||||
part 'model/tag_cleanup.dart';
|
||||
part 'model/tag_create_dto.dart';
|
||||
part 'model/tag_response_dto.dart';
|
||||
part 'model/tag_update_dto.dart';
|
||||
@@ -397,6 +402,7 @@ part 'model/user_admin_delete_dto.dart';
|
||||
part 'model/user_admin_response_dto.dart';
|
||||
part 'model/user_admin_update_dto.dart';
|
||||
part 'model/user_avatar_color.dart';
|
||||
part 'model/user_delete_check.dart';
|
||||
part 'model/user_license.dart';
|
||||
part 'model/user_metadata_key.dart';
|
||||
part 'model/user_preferences_response_dto.dart';
|
||||
|
||||
Generated
+12
@@ -350,6 +350,8 @@ class ApiClient {
|
||||
return CreateProfileImageResponseDto.fromJson(value);
|
||||
case 'CropParameters':
|
||||
return CropParameters.fromJson(value);
|
||||
case 'DatabaseBackup':
|
||||
return DatabaseBackupTypeTransformer().decode(value);
|
||||
case 'DatabaseBackupConfig':
|
||||
return DatabaseBackupConfig.fromJson(value);
|
||||
case 'DownloadArchiveInfo':
|
||||
@@ -434,8 +436,12 @@ class ApiClient {
|
||||
return MemoriesResponse.fromJson(value);
|
||||
case 'MemoriesUpdate':
|
||||
return MemoriesUpdate.fromJson(value);
|
||||
case 'MemoryCleanup':
|
||||
return MemoryCleanupTypeTransformer().decode(value);
|
||||
case 'MemoryCreateDto':
|
||||
return MemoryCreateDto.fromJson(value);
|
||||
case 'MemoryGenerate':
|
||||
return MemoryGenerateTypeTransformer().decode(value);
|
||||
case 'MemoryResponseDto':
|
||||
return MemoryResponseDto.fromJson(value);
|
||||
case 'MemorySearchOrder':
|
||||
@@ -504,6 +510,8 @@ class ApiClient {
|
||||
return PeopleUpdateItem.fromJson(value);
|
||||
case 'Permission':
|
||||
return PermissionTypeTransformer().decode(value);
|
||||
case 'PersonCleanup':
|
||||
return PersonCleanupTypeTransformer().decode(value);
|
||||
case 'PersonCreateDto':
|
||||
return PersonCreateDto.fromJson(value);
|
||||
case 'PersonResponseDto':
|
||||
@@ -792,6 +800,8 @@ class ApiClient {
|
||||
return TagBulkAssetsDto.fromJson(value);
|
||||
case 'TagBulkAssetsResponseDto':
|
||||
return TagBulkAssetsResponseDto.fromJson(value);
|
||||
case 'TagCleanup':
|
||||
return TagCleanupTypeTransformer().decode(value);
|
||||
case 'TagCreateDto':
|
||||
return TagCreateDto.fromJson(value);
|
||||
case 'TagResponseDto':
|
||||
@@ -842,6 +852,8 @@ class ApiClient {
|
||||
return UserAdminUpdateDto.fromJson(value);
|
||||
case 'UserAvatarColor':
|
||||
return UserAvatarColorTypeTransformer().decode(value);
|
||||
case 'UserDeleteCheck':
|
||||
return UserDeleteCheckTypeTransformer().decode(value);
|
||||
case 'UserLicense':
|
||||
return UserLicense.fromJson(value);
|
||||
case 'UserMetadataKey':
|
||||
|
||||
Generated
+18
@@ -91,6 +91,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is Colorspace) {
|
||||
return ColorspaceTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is DatabaseBackup) {
|
||||
return DatabaseBackupTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ImageFormat) {
|
||||
return ImageFormatTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -106,6 +109,12 @@ String parameterToString(dynamic value) {
|
||||
if (value is ManualJobName) {
|
||||
return ManualJobNameTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemoryCleanup) {
|
||||
return MemoryCleanupTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemoryGenerate) {
|
||||
return MemoryGenerateTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is MemorySearchOrder) {
|
||||
return MemorySearchOrderTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -130,6 +139,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is Permission) {
|
||||
return PermissionTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is PersonCleanup) {
|
||||
return PersonCleanupTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is PluginContextType) {
|
||||
return PluginContextTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -166,6 +178,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is SyncRequestType) {
|
||||
return SyncRequestTypeTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is TagCleanup) {
|
||||
return TagCleanupTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is ToneMapping) {
|
||||
return ToneMappingTypeTransformer().encode(value).toString();
|
||||
}
|
||||
@@ -178,6 +193,9 @@ String parameterToString(dynamic value) {
|
||||
if (value is UserAvatarColor) {
|
||||
return UserAvatarColorTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is UserDeleteCheck) {
|
||||
return UserDeleteCheckTypeTransformer().encode(value).toString();
|
||||
}
|
||||
if (value is UserMetadataKey) {
|
||||
return UserMetadataKeyTypeTransformer().encode(value).toString();
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 DatabaseBackup {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const DatabaseBackup._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const databaseBackup = DatabaseBackup._(r'DatabaseBackup');
|
||||
|
||||
/// List of all possible values in this [enum][DatabaseBackup].
|
||||
static const values = <DatabaseBackup>[
|
||||
databaseBackup,
|
||||
];
|
||||
|
||||
static DatabaseBackup? fromJson(dynamic value) => DatabaseBackupTypeTransformer().decode(value);
|
||||
|
||||
static List<DatabaseBackup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <DatabaseBackup>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = DatabaseBackup.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [DatabaseBackup] to String,
|
||||
/// and [decode] dynamic data back to [DatabaseBackup].
|
||||
class DatabaseBackupTypeTransformer {
|
||||
factory DatabaseBackupTypeTransformer() => _instance ??= const DatabaseBackupTypeTransformer._();
|
||||
|
||||
const DatabaseBackupTypeTransformer._();
|
||||
|
||||
String encode(DatabaseBackup data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a DatabaseBackup.
|
||||
///
|
||||
/// 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.
|
||||
DatabaseBackup? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'DatabaseBackup': return DatabaseBackup.databaseBackup;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [DatabaseBackupTypeTransformer] instance.
|
||||
static DatabaseBackupTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobDatabaseBackup {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
DatabaseBackup name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobDatabaseBackup &&
|
||||
@@ -52,7 +52,7 @@ class JobDatabaseBackup {
|
||||
|
||||
return JobDatabaseBackup(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: DatabaseBackup.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobMemoryCleanup {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
MemoryCleanup name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobMemoryCleanup &&
|
||||
@@ -52,7 +52,7 @@ class JobMemoryCleanup {
|
||||
|
||||
return JobMemoryCleanup(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: MemoryCleanup.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobMemoryGenerate {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
MemoryGenerate name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobMemoryGenerate &&
|
||||
@@ -52,7 +52,7 @@ class JobMemoryGenerate {
|
||||
|
||||
return JobMemoryGenerate(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: MemoryGenerate.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobPersonCleanup {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
PersonCleanup name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobPersonCleanup &&
|
||||
@@ -52,7 +52,7 @@ class JobPersonCleanup {
|
||||
|
||||
return JobPersonCleanup(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: PersonCleanup.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobTagCleanup {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
TagCleanup name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobTagCleanup &&
|
||||
@@ -52,7 +52,7 @@ class JobTagCleanup {
|
||||
|
||||
return JobTagCleanup(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: TagCleanup.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class JobUserDeleteCheck {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
UserDeleteCheck name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is JobUserDeleteCheck &&
|
||||
@@ -52,7 +52,7 @@ class JobUserDeleteCheck {
|
||||
|
||||
return JobUserDeleteCheck(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: UserDeleteCheck.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 MemoryCleanup {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemoryCleanup._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const memoryCleanup = MemoryCleanup._(r'MemoryCleanup');
|
||||
|
||||
/// List of all possible values in this [enum][MemoryCleanup].
|
||||
static const values = <MemoryCleanup>[
|
||||
memoryCleanup,
|
||||
];
|
||||
|
||||
static MemoryCleanup? fromJson(dynamic value) => MemoryCleanupTypeTransformer().decode(value);
|
||||
|
||||
static List<MemoryCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemoryCleanup>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = MemoryCleanup.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [MemoryCleanup] to String,
|
||||
/// and [decode] dynamic data back to [MemoryCleanup].
|
||||
class MemoryCleanupTypeTransformer {
|
||||
factory MemoryCleanupTypeTransformer() => _instance ??= const MemoryCleanupTypeTransformer._();
|
||||
|
||||
const MemoryCleanupTypeTransformer._();
|
||||
|
||||
String encode(MemoryCleanup data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MemoryCleanup.
|
||||
///
|
||||
/// 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.
|
||||
MemoryCleanup? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'MemoryCleanup': return MemoryCleanup.memoryCleanup;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MemoryCleanupTypeTransformer] instance.
|
||||
static MemoryCleanupTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 MemoryGenerate {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemoryGenerate._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const memoryGenerate = MemoryGenerate._(r'MemoryGenerate');
|
||||
|
||||
/// List of all possible values in this [enum][MemoryGenerate].
|
||||
static const values = <MemoryGenerate>[
|
||||
memoryGenerate,
|
||||
];
|
||||
|
||||
static MemoryGenerate? fromJson(dynamic value) => MemoryGenerateTypeTransformer().decode(value);
|
||||
|
||||
static List<MemoryGenerate> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemoryGenerate>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = MemoryGenerate.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [MemoryGenerate] to String,
|
||||
/// and [decode] dynamic data back to [MemoryGenerate].
|
||||
class MemoryGenerateTypeTransformer {
|
||||
factory MemoryGenerateTypeTransformer() => _instance ??= const MemoryGenerateTypeTransformer._();
|
||||
|
||||
const MemoryGenerateTypeTransformer._();
|
||||
|
||||
String encode(MemoryGenerate data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MemoryGenerate.
|
||||
///
|
||||
/// 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.
|
||||
MemoryGenerate? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'MemoryGenerate': return MemoryGenerate.memoryGenerate;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MemoryGenerateTypeTransformer] instance.
|
||||
static MemoryGenerateTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 PersonCleanup {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const PersonCleanup._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const personCleanup = PersonCleanup._(r'PersonCleanup');
|
||||
|
||||
/// List of all possible values in this [enum][PersonCleanup].
|
||||
static const values = <PersonCleanup>[
|
||||
personCleanup,
|
||||
];
|
||||
|
||||
static PersonCleanup? fromJson(dynamic value) => PersonCleanupTypeTransformer().decode(value);
|
||||
|
||||
static List<PersonCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <PersonCleanup>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = PersonCleanup.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [PersonCleanup] to String,
|
||||
/// and [decode] dynamic data back to [PersonCleanup].
|
||||
class PersonCleanupTypeTransformer {
|
||||
factory PersonCleanupTypeTransformer() => _instance ??= const PersonCleanupTypeTransformer._();
|
||||
|
||||
const PersonCleanupTypeTransformer._();
|
||||
|
||||
String encode(PersonCleanup data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a PersonCleanup.
|
||||
///
|
||||
/// 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.
|
||||
PersonCleanup? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'PersonCleanup': return PersonCleanup.personCleanup;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [PersonCleanupTypeTransformer] instance.
|
||||
static PersonCleanupTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ class QueueJobCreateDtoJob {
|
||||
|
||||
BaseJobData data;
|
||||
|
||||
num name;
|
||||
DatabaseBackup name;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is QueueJobCreateDtoJob &&
|
||||
@@ -52,7 +52,7 @@ class QueueJobCreateDtoJob {
|
||||
|
||||
return QueueJobCreateDtoJob(
|
||||
data: BaseJobData.fromJson(json[r'data'])!,
|
||||
name: num.parse('${json[r'name']}'),
|
||||
name: DatabaseBackup.fromJson(json[r'name'])!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 TagCleanup {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const TagCleanup._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const tagCleanup = TagCleanup._(r'TagCleanup');
|
||||
|
||||
/// List of all possible values in this [enum][TagCleanup].
|
||||
static const values = <TagCleanup>[
|
||||
tagCleanup,
|
||||
];
|
||||
|
||||
static TagCleanup? fromJson(dynamic value) => TagCleanupTypeTransformer().decode(value);
|
||||
|
||||
static List<TagCleanup> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TagCleanup>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = TagCleanup.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [TagCleanup] to String,
|
||||
/// and [decode] dynamic data back to [TagCleanup].
|
||||
class TagCleanupTypeTransformer {
|
||||
factory TagCleanupTypeTransformer() => _instance ??= const TagCleanupTypeTransformer._();
|
||||
|
||||
const TagCleanupTypeTransformer._();
|
||||
|
||||
String encode(TagCleanup data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a TagCleanup.
|
||||
///
|
||||
/// 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.
|
||||
TagCleanup? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'TagCleanup': return TagCleanup.tagCleanup;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [TagCleanupTypeTransformer] instance.
|
||||
static TagCleanupTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// 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 UserDeleteCheck {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const UserDeleteCheck._(this.value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const userDeleteCheck = UserDeleteCheck._(r'UserDeleteCheck');
|
||||
|
||||
/// List of all possible values in this [enum][UserDeleteCheck].
|
||||
static const values = <UserDeleteCheck>[
|
||||
userDeleteCheck,
|
||||
];
|
||||
|
||||
static UserDeleteCheck? fromJson(dynamic value) => UserDeleteCheckTypeTransformer().decode(value);
|
||||
|
||||
static List<UserDeleteCheck> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UserDeleteCheck>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = UserDeleteCheck.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
}
|
||||
|
||||
/// Transformation class that can [encode] an instance of [UserDeleteCheck] to String,
|
||||
/// and [decode] dynamic data back to [UserDeleteCheck].
|
||||
class UserDeleteCheckTypeTransformer {
|
||||
factory UserDeleteCheckTypeTransformer() => _instance ??= const UserDeleteCheckTypeTransformer._();
|
||||
|
||||
const UserDeleteCheckTypeTransformer._();
|
||||
|
||||
String encode(UserDeleteCheck data) => data.value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a UserDeleteCheck.
|
||||
///
|
||||
/// 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.
|
||||
UserDeleteCheck? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'UserDeleteCheck': return UserDeleteCheck.userDeleteCheck;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [UserDeleteCheckTypeTransformer] instance.
|
||||
static UserDeleteCheckTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user