immich/mobile/openapi/lib/model/queue_name.dart

125 lines
4.5 KiB
Dart
Raw Normal View History

2025-11-14 14:42:00 -05:00
//
// 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;
/// Queue name
enum QueueName {
thumbnailGeneration._(r'thumbnailGeneration'),
metadataExtraction._(r'metadataExtraction'),
videoConversion._(r'videoConversion'),
faceDetection._(r'faceDetection'),
facialRecognition._(r'facialRecognition'),
smartSearch._(r'smartSearch'),
duplicateDetection._(r'duplicateDetection'),
backgroundTask._(r'backgroundTask'),
storageTemplateMigration._(r'storageTemplateMigration'),
migration._(r'migration'),
search._(r'search'),
sidecar._(r'sidecar'),
library_._(r'library'),
notifications._(r'notifications'),
backupDatabase._(r'backupDatabase'),
ocr._(r'ocr'),
workflow._(r'workflow'),
integrityCheck._(r'integrityCheck'),
editor._(r'editor'),
;
/// Instantiate a new enum with the provided value.
const QueueName._(this._value);
2025-11-14 14:42:00 -05:00
/// The underlying value of this enum member.
final String _value;
2025-11-14 14:42:00 -05:00
@override
String toString() => _value;
2025-11-14 14:42:00 -05:00
/// Encodes this enum as a value suitable for JSON.
String toJson() => _value;
2025-11-14 14:42:00 -05:00
/// Returns the instance of [QueueName] that was successfully decoded
/// from the passed [value] on success, null otherwise.
2025-11-14 14:42:00 -05:00
static QueueName? fromJson(dynamic value) => QueueNameTypeTransformer().decode(value);
/// Returns a [List] containing instances of [QueueName]
/// that were successfully decoded from the passed [JSON][json].
2025-11-14 14:42:00 -05:00
static List<QueueName> listFromJson(dynamic json, {bool growable = false,}) {
final result = <QueueName>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = QueueName.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [QueueName] to String,
/// and [decode] dynamic data back to [QueueName].
class QueueNameTypeTransformer {
factory QueueNameTypeTransformer() => _instance ??= const QueueNameTypeTransformer._();
const QueueNameTypeTransformer._();
/// Encodes this enum as a value suitable for JSON.
String encode(QueueName data) => data._value;
2025-11-14 14:42:00 -05:00
/// Returns the instance of [QueueName] that was successfully decoded
/// from the passed [data] value on success, null otherwise.
2025-11-14 14:42:00 -05:00
///
/// 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.
QueueName? decode(dynamic data, {bool allowNull = true}) {
if (data is QueueName) {
return data;
}
2025-11-14 14:42:00 -05:00
if (data != null) {
switch (data) {
case r'thumbnailGeneration': return QueueName.thumbnailGeneration;
case r'metadataExtraction': return QueueName.metadataExtraction;
case r'videoConversion': return QueueName.videoConversion;
case r'faceDetection': return QueueName.faceDetection;
case r'facialRecognition': return QueueName.facialRecognition;
case r'smartSearch': return QueueName.smartSearch;
case r'duplicateDetection': return QueueName.duplicateDetection;
case r'backgroundTask': return QueueName.backgroundTask;
case r'storageTemplateMigration': return QueueName.storageTemplateMigration;
case r'migration': return QueueName.migration;
case r'search': return QueueName.search;
case r'sidecar': return QueueName.sidecar;
case r'library': return QueueName.library_;
case r'notifications': return QueueName.notifications;
case r'backupDatabase': return QueueName.backupDatabase;
case r'ocr': return QueueName.ocr;
feat: workflow foundation (#23621) * feat: plugins * feat: table definition * feat: type and migration * feat: add repositories * feat: validate manifest with class-validator and load manifest info to database * feat: workflow/plugin controller/service layer * feat: implement workflow logic * feat: make trigger static * feat: dynamical instantiate plugin instances * fix: access control and helper script * feat: it works * chore: simplify * refactor: refactor and use queue for workflow execution * refactor: remove unsused property in plugin-schema * build wasm in prod * feat: plugin loader in transaction * fix: docker build arm64 * generated files * shell check * fix tests * fix: waiting for migration to finish before loading plugin * remove context reassignment * feat: use mise to manage extism tools (#23760) * pr feedback * refactor: create workflow now including create filters and actions * feat: workflow medium tests * fix: broken medium test * feat: medium tests * chore: unify workflow job * sign user id with jwt * chore: query plugin with filters and action * chore: read manifest in repository * chore: load manifest from server configs * merge main * feat: endpoint documentation * pr feedback * load plugin from absolute path * refactor:handle trigger * throw error and return early * pr feedback * unify plugin services * fix: plugins code * clean up * remove triggerConfig * clean up * displayName and methodName --------- Co-authored-by: Jason Rasmussen <jason@rasm.me> Co-authored-by: bo0tzz <git@bo0tzz.me>
2025-11-14 14:05:05 -06:00
case r'workflow': return QueueName.workflow;
case r'integrityCheck': return QueueName.integrityCheck;
2026-01-09 17:59:52 -05:00
case r'editor': return QueueName.editor;
2025-11-14 14:42:00 -05:00
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// The singleton instance of this transformer.
2025-11-14 14:42:00 -05:00
static QueueNameTypeTransformer? _instance;
}