mirror of
https://github.com/immich-app/immich.git
synced 2026-07-21 05:44:35 +03:00
Compare commits
14 Commits
feature/lo
...
renovate/m
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4af0dfa456 | ||
|
|
6fa3f2feac | ||
|
|
3f6897ef80 | ||
|
|
89d0a9d59f | ||
|
|
45a6ea84af | ||
|
|
bf64f3867b | ||
|
|
4a4d468aa2 | ||
|
|
522def1ed6 | ||
|
|
3adc3920fb | ||
|
|
00cb50cc67 | ||
|
|
f2b0b696f6 | ||
|
|
b5401eb120 | ||
|
|
12fc8bac18 | ||
|
|
f2c00c107d |
@@ -7,7 +7,7 @@ sidebar_position: 85
|
||||
:::note
|
||||
This is a community contribution and not officially supported by the Immich team, but included here for convenience.
|
||||
|
||||
Community support can be found in the dedicated channel on the [Discord Server](https://discord.immich.app/).
|
||||
Community support should be directed to Synology-specific support platforms.
|
||||
:::
|
||||
|
||||
Immich can easily be installed on a Synology NAS using Container Manager within DSM. If you have not installed Container Manager already, you can install it in the Packages Center. Refer to the [Container Manager docs](https://kb.synology.com/en-us/DSM/help/ContainerManager/docker_desc?version=7) for more information on using Container Manager.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
ARG DEVICE=cpu
|
||||
|
||||
FROM python:3.11-bookworm@sha256:20ec607c68642c64c73269ce245aa0f060913f4129d15d9687850aa158e6269c AS builder-cpu
|
||||
FROM python:3.11-bookworm@sha256:5c34b355088846dddc8afb7442c20b9433dccdc8d66192dc52c616adeaa106a3 AS builder-cpu
|
||||
|
||||
FROM python:3.13-slim-trixie@sha256:f82c96458eedc847b233e582eb31336f4954b39cae020b6dcf5b3ed0e5cbcd74 AS builder-openvino
|
||||
FROM python:3.13-slim-trixie@sha256:6771159cd4fa5d9bba1258caf0b82e6b73458c694d178ad97c5e925c2d0e1a91 AS builder-openvino
|
||||
|
||||
FROM builder-cpu AS builder-cuda
|
||||
|
||||
@@ -39,12 +39,12 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --frozen --extra ${DEVICE} --no-dev --no-editable --no-install-project --compile-bytecode --no-progress --active --link-mode copy
|
||||
|
||||
FROM python:3.11-slim-bookworm@sha256:e2d3af735aff6eeee600b1933bedd99da6645fedf572cc12ef4cc1331f2ceebe AS prod-cpu
|
||||
FROM python:3.11-slim-bookworm@sha256:b18992999dbe963a45a8a4da40ac2b1975be1a776d939d098c647482bcad5cba AS prod-cpu
|
||||
|
||||
ENV LD_PRELOAD=/usr/lib/libmimalloc.so.2 \
|
||||
MACHINE_LEARNING_MODEL_ARENA=false
|
||||
|
||||
FROM python:3.13-slim-trixie@sha256:f82c96458eedc847b233e582eb31336f4954b39cae020b6dcf5b3ed0e5cbcd74 AS prod-openvino
|
||||
FROM python:3.13-slim-trixie@sha256:6771159cd4fa5d9bba1258caf0b82e6b73458c694d178ad97c5e925c2d0e1a91 AS prod-openvino
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install --no-install-recommends -yqq ocl-icd-libopencl1 wget && \
|
||||
|
||||
725
machine-learning/uv.lock
generated
725
machine-learning/uv.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ void main() {
|
||||
|
||||
void sendUser(SyncStream stream, String id, String name) {
|
||||
stream.send(
|
||||
type: SyncEntityType.userV1.value,
|
||||
type: SyncEntityType.userV1.toString(),
|
||||
data: SyncUserV1(
|
||||
id: id,
|
||||
name: name,
|
||||
|
||||
@@ -586,7 +586,7 @@
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build\n";
|
||||
shellScript = "/bin/bash \"$SRCROOT/scripts/xcode_flutter_build.sh\"\n";
|
||||
};
|
||||
BAEA01ACA3F5C9CD3D732370 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
|
||||
45
mobile/ios/scripts/xcode_flutter_build.sh
Executable file
45
mobile/ios/scripts/xcode_flutter_build.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env bash
|
||||
# Makes Flutter's builds through the Xcode GUI properly display errors and warnings
|
||||
# in the Issue navigator
|
||||
#
|
||||
# Flutter's `xcode_backend.dart` runs `flutter assemble` with `allowFail: true`,
|
||||
# which intentionally does not prefix output with `error:`. Unsure why they do this,
|
||||
# but this script rebuilds the expected output so Xcode can parse and display the errors
|
||||
|
||||
set -o pipefail
|
||||
|
||||
# The Immich mobile root (containing the Dart `lib` directory). This is used to make
|
||||
# absolute paths for Xcode linking
|
||||
app_root="${FLUTTER_APPLICATION_PATH:-$SRCROOT/..}"
|
||||
|
||||
/bin/sh "$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh" build 2>&1 \
|
||||
| awk -v app_root="$app_root" '
|
||||
# Match Dart CFE diagnostics: <path>.dart:<line>:<col>: <Kind>: <message>
|
||||
# Written for macOS/POSIX/BSD awk
|
||||
{
|
||||
# Always pass the original line through to preserve the original build log
|
||||
print
|
||||
|
||||
if ($0 ~ /^.*\.dart:[0-9]+:[0-9]+: (Error|Warning|Context|Info):/) {
|
||||
# Locate the ": Kind:" separator to split location from message.
|
||||
rest = $0
|
||||
if (match(rest, /: Error:/)) { kind = "Error"; keyword = "error" }
|
||||
else if (match(rest, /: Warning:/)) { kind = "Warning"; keyword = "warning" }
|
||||
else if (match(rest, /: Context:/)) { kind = "Context"; keyword = "note" }
|
||||
else if (match(rest, /: Info:/)) { kind = "Info"; keyword = "note" }
|
||||
|
||||
# location = everything before ": Kind:" (e.g. "lib/foo.dart:12:5")
|
||||
location = substr(rest, 1, RSTART - 1)
|
||||
# message = everything after ": Kind:" (leading space preserved)
|
||||
message = substr(rest, RSTART + length(": " kind ":"))
|
||||
|
||||
# Make the path absolute so Xcode links to it
|
||||
if (location !~ /^\//)
|
||||
location = app_root "/" location
|
||||
|
||||
printf "%s: %s:%s\n", location, keyword, message
|
||||
}
|
||||
}
|
||||
'
|
||||
|
||||
exit "${PIPESTATUS[0]}"
|
||||
@@ -129,7 +129,6 @@ class AppConfig {
|
||||
.themeDynamic => theme.dynamicTheme,
|
||||
.themeColorfulInterface => theme.colorfulInterface,
|
||||
.imagePreferRemote => image.preferRemote,
|
||||
.imageLoadPreview => image.loadPreview,
|
||||
.imageLoadOriginal => image.loadOriginal,
|
||||
.viewerLoopVideo => viewer.loopVideo,
|
||||
.viewerLoadOriginalVideo => viewer.loadOriginalVideo,
|
||||
@@ -182,7 +181,6 @@ class AppConfig {
|
||||
.themeDynamic => copyWith(theme: theme.copyWith(dynamicTheme: value as bool)),
|
||||
.themeColorfulInterface => copyWith(theme: theme.copyWith(colorfulInterface: value as bool)),
|
||||
.imagePreferRemote => copyWith(image: image.copyWith(preferRemote: value as bool)),
|
||||
.imageLoadPreview => copyWith(image: image.copyWith(loadPreview: value as bool)),
|
||||
.imageLoadOriginal => copyWith(image: image.copyWith(loadOriginal: value as bool)),
|
||||
.viewerLoopVideo => copyWith(viewer: viewer.copyWith(loopVideo: value as bool)),
|
||||
.viewerLoadOriginalVideo => copyWith(viewer: viewer.copyWith(loadOriginalVideo: value as bool)),
|
||||
|
||||
@@ -1,28 +1,20 @@
|
||||
class ImageConfig {
|
||||
final bool preferRemote;
|
||||
final bool loadPreview;
|
||||
final bool loadOriginal;
|
||||
|
||||
const ImageConfig({this.preferRemote = false, this.loadPreview = true, this.loadOriginal = false});
|
||||
const ImageConfig({this.preferRemote = false, this.loadOriginal = false});
|
||||
|
||||
ImageConfig copyWith({bool? preferRemote, bool? loadPreview, bool? loadOriginal}) => ImageConfig(
|
||||
preferRemote: preferRemote ?? this.preferRemote,
|
||||
loadPreview: loadPreview ?? this.loadPreview,
|
||||
loadOriginal: loadOriginal ?? this.loadOriginal,
|
||||
);
|
||||
ImageConfig copyWith({bool? preferRemote, bool? loadOriginal}) =>
|
||||
ImageConfig(preferRemote: preferRemote ?? this.preferRemote, loadOriginal: loadOriginal ?? this.loadOriginal);
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is ImageConfig &&
|
||||
other.preferRemote == preferRemote &&
|
||||
other.loadPreview == loadPreview &&
|
||||
other.loadOriginal == loadOriginal);
|
||||
(other is ImageConfig && other.preferRemote == preferRemote && other.loadOriginal == loadOriginal);
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(preferRemote, loadPreview, loadOriginal);
|
||||
int get hashCode => Object.hash(preferRemote, loadOriginal);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'ImageConfig(preferRemoteImage: $preferRemote, loadPreview: $loadPreview, loadOriginal: $loadOriginal)';
|
||||
String toString() => 'ImageConfig(preferRemoteImage: $preferRemote, loadOriginal: $loadOriginal)';
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ enum SettingsKey<T> {
|
||||
|
||||
// Image
|
||||
imagePreferRemote<bool>(),
|
||||
imageLoadPreview<bool>(),
|
||||
imageLoadOriginal<bool>(),
|
||||
|
||||
// Viewer
|
||||
|
||||
@@ -328,8 +328,6 @@ class SyncStreamService {
|
||||
return _syncStreamRepository.updateAssetOcrV1(data.cast());
|
||||
case SyncEntityType.assetOcrDeleteV1:
|
||||
return _syncStreamRepository.deleteAssetOcrV1(data.cast());
|
||||
default:
|
||||
_logger.warning("Unknown sync data type: $type");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,6 @@ extension on api.AssetVisibility {
|
||||
api.AssetVisibility.hidden => AssetVisibility.hidden,
|
||||
api.AssetVisibility.archive => AssetVisibility.archive,
|
||||
api.AssetVisibility.locked => AssetVisibility.locked,
|
||||
_ => AssetVisibility.timeline,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -68,6 +67,5 @@ extension on api.AssetTypeEnum {
|
||||
api.AssetTypeEnum.VIDEO => AssetType.video,
|
||||
api.AssetTypeEnum.AUDIO => AssetType.audio,
|
||||
api.AssetTypeEnum.OTHER => AssetType.other,
|
||||
_ => throw Exception('Unknown AssetType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -937,7 +937,6 @@ extension on AssetTypeEnum {
|
||||
AssetTypeEnum.VIDEO => AssetType.video,
|
||||
AssetTypeEnum.AUDIO => AssetType.audio,
|
||||
AssetTypeEnum.OTHER => AssetType.other,
|
||||
_ => throw Exception('Unknown AssetType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -945,14 +944,12 @@ extension on AssetOrder {
|
||||
AlbumAssetOrder toAlbumAssetOrder() => switch (this) {
|
||||
AssetOrder.asc => AlbumAssetOrder.asc,
|
||||
AssetOrder.desc => AlbumAssetOrder.desc,
|
||||
_ => throw Exception('Unknown AssetOrder value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
extension on MemoryType {
|
||||
MemoryTypeEnum toMemoryType() => switch (this) {
|
||||
MemoryType.onThisDay => MemoryTypeEnum.onThisDay,
|
||||
_ => throw Exception('Unknown MemoryType value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -961,7 +958,6 @@ extension on api.AlbumUserRole {
|
||||
api.AlbumUserRole.editor => AlbumUserRole.editor,
|
||||
api.AlbumUserRole.viewer => AlbumUserRole.viewer,
|
||||
api.AlbumUserRole.owner => AlbumUserRole.owner,
|
||||
_ => throw Exception('Unknown AlbumUserRole value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -971,7 +967,6 @@ extension on api.AssetVisibility {
|
||||
api.AssetVisibility.hidden => AssetVisibility.hidden,
|
||||
api.AssetVisibility.archive => AssetVisibility.archive,
|
||||
api.AssetVisibility.locked => AssetVisibility.locked,
|
||||
_ => throw Exception('Unknown AssetVisibility value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -980,12 +975,11 @@ extension on api.UserMetadataKey {
|
||||
api.UserMetadataKey.onboarding => UserMetadataKey.onboarding,
|
||||
api.UserMetadataKey.preferences => UserMetadataKey.preferences,
|
||||
api.UserMetadataKey.license => UserMetadataKey.license,
|
||||
_ => throw Exception('Unknown UserMetadataKey value: $this'),
|
||||
};
|
||||
}
|
||||
|
||||
extension on UserAvatarColor {
|
||||
AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == value);
|
||||
AvatarColor? toAvatarColor() => AvatarColor.values.firstWhereOrNull((c) => c.name == toString());
|
||||
}
|
||||
|
||||
extension on api.AssetEditAction {
|
||||
@@ -993,6 +987,5 @@ extension on api.AssetEditAction {
|
||||
api.AssetEditAction.crop => AssetEditAction.crop,
|
||||
api.AssetEditAction.rotate => AssetEditAction.rotate,
|
||||
api.AssetEditAction.mirror => AssetEditAction.mirror,
|
||||
_ => AssetEditAction.other,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import 'package:fluttertoast/fluttertoast.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
import 'package:immich_mobile/constants/enums.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
import 'package:immich_mobile/domain/models/settings_key.dart';
|
||||
import 'package:immich_mobile/extensions/build_context_extensions.dart';
|
||||
import 'package:immich_mobile/generated/translations.g.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart';
|
||||
@@ -129,12 +128,6 @@ class ShareActionButton extends ConsumerWidget {
|
||||
return;
|
||||
}
|
||||
|
||||
await ref.read(settingsProvider).write(SettingsKey.shareFileType, fileType);
|
||||
|
||||
if (!context.mounted) {
|
||||
return;
|
||||
}
|
||||
|
||||
await _share(context, ref, fileType);
|
||||
}
|
||||
|
||||
|
||||
@@ -745,10 +745,15 @@ class AddToAlbumHeader extends ConsumerWidget {
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
Future<void> onCreateAlbum() async {
|
||||
final albumName = await showDialog<String?>(context: context, builder: (context) => const NewAlbumNameModal());
|
||||
if (albumName == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
final selectedAssets = ref.read(multiSelectProvider).selectedAssets;
|
||||
final newAlbum = await ref
|
||||
.read(remoteAlbumProvider.notifier)
|
||||
.createAlbumWithAssets(title: "Untitled Album", assets: selectedAssets);
|
||||
.createAlbumWithAssets(title: albumName, assets: selectedAssets);
|
||||
|
||||
if (newAlbum == null) {
|
||||
ImmichToast.show(context: context, toastType: ToastType.error, msg: 'errors.failed_to_create_album'.tr());
|
||||
|
||||
@@ -91,7 +91,7 @@ class _NativeVideoViewerState extends ConsumerState<NativeVideoViewer> with Widg
|
||||
}
|
||||
case AppLifecycleState.paused:
|
||||
_shouldPlayOnForeground = await _controller?.isPlaying() ?? true;
|
||||
if (_shouldPlayOnForeground) {
|
||||
if (_shouldPlayOnForeground && mounted) {
|
||||
await _notifier.pause();
|
||||
}
|
||||
default:
|
||||
@@ -268,10 +268,13 @@ class _NativeVideoViewerState extends ConsumerState<NativeVideoViewer> with Widg
|
||||
return;
|
||||
}
|
||||
|
||||
await _notifier.load(source);
|
||||
// Grab refs to prevent reading after dispose
|
||||
final loopVideo = ref.read(appConfigProvider).viewer.loopVideo;
|
||||
await _notifier.setLoop(!widget.asset.isMotionPhoto && loopVideo);
|
||||
await _notifier.setVolume(1);
|
||||
final localNotifier = _notifier;
|
||||
|
||||
await localNotifier.load(source);
|
||||
await localNotifier.setLoop(!widget.asset.isMotionPhoto && loopVideo);
|
||||
await localNotifier.setVolume(1);
|
||||
}
|
||||
|
||||
void _initController(NativeVideoPlayerController nc) {
|
||||
|
||||
@@ -45,6 +45,7 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
|
||||
|
||||
completer.operation.valueOrCancellation().whenComplete(() {
|
||||
cachedStream.removeListener(listener);
|
||||
cachedOperation = null;
|
||||
});
|
||||
cachedOperation = completer.operation;
|
||||
return null;
|
||||
@@ -94,9 +95,6 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
|
||||
isFinished = isFinal;
|
||||
return codec;
|
||||
} catch (e) {
|
||||
if (isCancelled) {
|
||||
return null;
|
||||
}
|
||||
if (isFinal) {
|
||||
isFinished = true;
|
||||
PaintingBinding.instance.imageCache.evict(this);
|
||||
@@ -108,33 +106,18 @@ mixin CancellableImageProviderMixin<T extends Object> on CancellableImageProvide
|
||||
}
|
||||
}
|
||||
|
||||
Stream<ImageInfo> initialImageStream({required bool isFinal}) async* {
|
||||
Stream<ImageInfo> initialImageStream() async* {
|
||||
final cachedOperation = this.cachedOperation;
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
if (cachedOperation == null) {
|
||||
// image resolved synchronously
|
||||
isFinished = isFinal;
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
final cachedImage = await cachedOperation.valueOrCancellation();
|
||||
if (isCancelled || cachedImage == null) {
|
||||
return;
|
||||
if (cachedImage != null && !isCancelled) {
|
||||
yield cachedImage;
|
||||
}
|
||||
isFinished = isFinal;
|
||||
yield cachedImage;
|
||||
} catch (e, stack) {
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
if (isFinal) {
|
||||
isFinished = true;
|
||||
PaintingBinding.instance.imageCache.evict(this);
|
||||
rethrow;
|
||||
}
|
||||
_log.severe('Error loading initial image', e, stack);
|
||||
} finally {
|
||||
this.cachedOperation = null;
|
||||
|
||||
@@ -98,55 +98,51 @@ class LocalFullImageProvider extends CancellableImageProvider<LocalFullImageProv
|
||||
}
|
||||
|
||||
Stream<ImageInfo> _codec(LocalFullImageProvider key, ImageDecoderCallback decode) async* {
|
||||
final loadOriginal = SettingsRepository.instance.appConfig.image.loadOriginal;
|
||||
final loadPreview = SettingsRepository.instance.appConfig.image.loadPreview;
|
||||
yield* initialImageStream(isFinal: !loadOriginal && !loadPreview);
|
||||
yield* initialImageStream();
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadPreview) {
|
||||
final devicePixelRatio = PlatformDispatcher.instance.views.first.devicePixelRatio;
|
||||
final previewRequest = request = LocalImageRequest(
|
||||
localId: key.id,
|
||||
size: Size(size.width * devicePixelRatio, size.height * devicePixelRatio),
|
||||
assetType: key.assetType,
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: !loadOriginal);
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final loadOriginal = SettingsRepository.instance.appConfig.image.loadOriginal;
|
||||
final devicePixelRatio = PlatformDispatcher.instance.views.first.devicePixelRatio;
|
||||
var request = this.request = LocalImageRequest(
|
||||
localId: key.id,
|
||||
size: Size(size.width * devicePixelRatio, size.height * devicePixelRatio),
|
||||
assetType: key.assetType,
|
||||
);
|
||||
yield* loadRequest(request, decode, isFinal: !loadOriginal);
|
||||
|
||||
if (!loadOriginal) {
|
||||
return;
|
||||
}
|
||||
|
||||
final originalRequest = request = LocalImageRequest(localId: key.id, assetType: key.assetType, size: Size.zero);
|
||||
yield* loadRequest(originalRequest, decode, isFinal: true);
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
request = this.request = LocalImageRequest(localId: key.id, assetType: key.assetType, size: Size.zero);
|
||||
|
||||
yield* loadRequest(request, decode, isFinal: true);
|
||||
}
|
||||
|
||||
Stream<Object> _animatedCodec(LocalFullImageProvider key, ImageDecoderCallback decode) async* {
|
||||
yield* initialImageStream(isFinal: false);
|
||||
yield* initialImageStream();
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SettingsRepository.instance.appConfig.image.loadPreview) {
|
||||
final devicePixelRatio = PlatformDispatcher.instance.views.first.devicePixelRatio;
|
||||
final previewRequest = request = LocalImageRequest(
|
||||
localId: key.id,
|
||||
size: Size(size.width * devicePixelRatio, size.height * devicePixelRatio),
|
||||
assetType: key.assetType,
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: false);
|
||||
final devicePixelRatio = PlatformDispatcher.instance.views.first.devicePixelRatio;
|
||||
final previewRequest = request = LocalImageRequest(
|
||||
localId: key.id,
|
||||
size: Size(size.width * devicePixelRatio, size.height * devicePixelRatio),
|
||||
assetType: key.assetType,
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: false);
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// always try original for animated, since previews don't support animation
|
||||
|
||||
@@ -108,35 +108,31 @@ class RemoteFullImageProvider extends CancellableImageProvider<RemoteFullImagePr
|
||||
}
|
||||
|
||||
Stream<ImageInfo> _codec(RemoteFullImageProvider key, ImageDecoderCallback decode) async* {
|
||||
final isImage = assetType == AssetType.image;
|
||||
final loadOriginal = isImage && SettingsRepository.instance.appConfig.image.loadOriginal;
|
||||
final loadPreview = isImage && SettingsRepository.instance.appConfig.image.loadPreview;
|
||||
yield* initialImageStream(isFinal: !loadOriginal && !loadPreview);
|
||||
yield* initialImageStream();
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (loadPreview) {
|
||||
final previewRequest = request = RemoteImageRequest(
|
||||
uri: getThumbnailUrlForRemoteId(
|
||||
key.assetId,
|
||||
type: AssetMediaSize.preview,
|
||||
thumbhash: key.thumbhash,
|
||||
edited: key.edited,
|
||||
),
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: !loadOriginal);
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
final previewRequest = request = RemoteImageRequest(
|
||||
uri: getThumbnailUrlForRemoteId(
|
||||
key.assetId,
|
||||
type: AssetMediaSize.preview,
|
||||
thumbhash: key.thumbhash,
|
||||
edited: key.edited,
|
||||
),
|
||||
);
|
||||
final loadOriginal = assetType == AssetType.image && SettingsRepository.instance.appConfig.image.loadOriginal;
|
||||
yield* loadRequest(previewRequest, decode, isFinal: !loadOriginal);
|
||||
|
||||
if (!loadOriginal) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
final originalRequest = request = RemoteImageRequest(
|
||||
uri: getOriginalUrlForRemoteId(key.assetId, edited: key.edited),
|
||||
);
|
||||
@@ -144,26 +140,24 @@ class RemoteFullImageProvider extends CancellableImageProvider<RemoteFullImagePr
|
||||
}
|
||||
|
||||
Stream<Object> _animatedCodec(RemoteFullImageProvider key, ImageDecoderCallback decode) async* {
|
||||
yield* initialImageStream(isFinal: false);
|
||||
yield* initialImageStream();
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (SettingsRepository.instance.appConfig.image.loadPreview) {
|
||||
final previewRequest = request = RemoteImageRequest(
|
||||
uri: getThumbnailUrlForRemoteId(
|
||||
key.assetId,
|
||||
type: AssetMediaSize.preview,
|
||||
thumbhash: key.thumbhash,
|
||||
edited: key.edited,
|
||||
),
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: false);
|
||||
final previewRequest = request = RemoteImageRequest(
|
||||
uri: getThumbnailUrlForRemoteId(
|
||||
key.assetId,
|
||||
type: AssetMediaSize.preview,
|
||||
thumbhash: key.thumbhash,
|
||||
edited: key.edited,
|
||||
),
|
||||
);
|
||||
yield* loadRequest(previewRequest, decode, isFinal: false);
|
||||
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
if (isCancelled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// always try original for animated, since previews don't support animation
|
||||
|
||||
@@ -318,7 +318,7 @@ class BackgroundUploadService {
|
||||
isFavorite: asset.isFavorite,
|
||||
requiresWiFi: requiresWiFi,
|
||||
// Visibility hidden on upload to prevent the server from running regular jobs on the live photo asset
|
||||
fields: entity.isLivePhoto ? {'visibility': api.AssetVisibility.hidden.value} : null,
|
||||
fields: entity.isLivePhoto ? {'visibility': api.AssetVisibility.hidden.toString()} : null,
|
||||
cloudId: entity.isLivePhoto ? null : asset.cloudId,
|
||||
adjustmentTime: entity.isLivePhoto ? null : asset.adjustmentTime?.toIso8601String(),
|
||||
latitude: entity.isLivePhoto ? null : asset.latitude?.toString(),
|
||||
|
||||
@@ -342,7 +342,7 @@ class ForegroundUploadService {
|
||||
file: livePhotoFile,
|
||||
originalFileName: livePhotoTitle,
|
||||
// Visibility hidden on upload to prevent the server from running regular jobs on the live photo asset
|
||||
fields: {...fields, 'visibility': AssetVisibility.hidden.value},
|
||||
fields: {...fields, 'visibility': AssetVisibility.hidden.toString()},
|
||||
cancelToken: cancelToken,
|
||||
onProgress: onProgress != null
|
||||
? (bytes, totalBytes) => onProgress(asset.localId!, livePhotoTitle, bytes, totalBytes)
|
||||
|
||||
@@ -12,7 +12,7 @@ String getThumbnailUrlForRemoteId(
|
||||
bool edited = true,
|
||||
String? thumbhash,
|
||||
}) {
|
||||
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.value}&edited=$edited';
|
||||
final url = '${Store.get(StoreKey.serverEndpoint)}/assets/$id/thumbnail?size=${type.toString()}&edited=$edited';
|
||||
return thumbhash != null ? '$url&c=${Uri.encodeComponent(thumbhash)}' : url;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,17 +11,20 @@ import 'package:immich_mobile/domain/models/log.model.dart';
|
||||
import 'package:immich_mobile/domain/models/settings_key.dart';
|
||||
import 'package:immich_mobile/domain/models/store.model.dart';
|
||||
import 'package:immich_mobile/domain/models/timeline.model.dart';
|
||||
import 'package:immich_mobile/domain/services/feature_message.service.dart';
|
||||
import 'package:immich_mobile/entities/store.entity.dart';
|
||||
import 'package:immich_mobile/infrastructure/entities/settings.entity.drift.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/network.repository.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart';
|
||||
import 'package:immich_mobile/models/auth/auxilary_endpoint.model.dart';
|
||||
import 'package:immich_mobile/providers/album/album_sort_by_options.provider.dart';
|
||||
|
||||
const int targetVersion = 26;
|
||||
|
||||
Future<void> migrateDatabaseIfNeeded(Drift drift) async {
|
||||
final int version = Store.get(StoreKey.version, targetVersion);
|
||||
final int? storedVersion = Store.tryGet(StoreKey.version);
|
||||
final version = storedVersion ?? targetVersion;
|
||||
|
||||
if (version < 25) {
|
||||
await _migrateTo25();
|
||||
@@ -31,6 +34,10 @@ Future<void> migrateDatabaseIfNeeded(Drift drift) async {
|
||||
await _migrateTo26(drift);
|
||||
}
|
||||
|
||||
if (storedVersion == null) {
|
||||
await FeatureMessageService(SettingsRepository.instance).markSeen();
|
||||
}
|
||||
|
||||
await Store.put(StoreKey.version, targetVersion);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,7 @@ class ImageViewerQualitySetting extends HookConsumerWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final isPreview = useState(ref.read(appConfigProvider).image.loadPreview);
|
||||
final isOriginal = useState(ref.read(appConfigProvider).image.loadOriginal);
|
||||
useValueChanged<bool, void>(isPreview.value, (_, __) {
|
||||
ref.read(settingsProvider).write(.imageLoadPreview, isPreview.value);
|
||||
});
|
||||
useValueChanged<bool, void>(isOriginal.value, (_, __) {
|
||||
ref.read(settingsProvider).write(.imageLoadOriginal, isOriginal.value);
|
||||
});
|
||||
@@ -29,12 +25,6 @@ class ImageViewerQualitySetting extends HookConsumerWidget {
|
||||
icon: Icons.image_outlined,
|
||||
subtitle: "setting_image_viewer_help".t(context: context),
|
||||
),
|
||||
SettingsSwitchListTile(
|
||||
valueNotifier: isPreview,
|
||||
title: "setting_image_viewer_preview_title".t(context: context),
|
||||
subtitle: "setting_image_viewer_preview_subtitle".t(context: context),
|
||||
onChanged: (_) => ref.invalidate(appSettingsServiceProvider),
|
||||
),
|
||||
SettingsSwitchListTile(
|
||||
valueNotifier: isOriginal,
|
||||
title: "setting_image_viewer_original_title".t(context: context),
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.22.0
|
||||
7.24.0
|
||||
|
||||
4
mobile/openapi/README.md
generated
4
mobile/openapi/README.md
generated
@@ -4,12 +4,12 @@ Immich API
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 3.0.3
|
||||
- Generator version: 7.22.0
|
||||
- Generator version: 7.24.0
|
||||
- Build package: org.openapitools.codegen.languages.DartClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
Dart 2.12 or later
|
||||
Dart 2.17 or later
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
|
||||
4
mobile/openapi/lib/api_client.dart
generated
4
mobile/openapi/lib/api_client.dart
generated
@@ -97,9 +97,9 @@ class ApiClient {
|
||||
if (nullableHeaderParams != null) {
|
||||
request.headers.addAll(nullableHeaderParams);
|
||||
}
|
||||
if (msgBody is String) {
|
||||
if (msgBody is String && msgBody.isNotEmpty) {
|
||||
request.body = msgBody;
|
||||
} else if (msgBody is List<int>) {
|
||||
} else if (msgBody is List<int> && msgBody.isNotEmpty) {
|
||||
request.bodyBytes = msgBody;
|
||||
} else if (msgBody is Map<String, String>) {
|
||||
request.bodyFields = msgBody;
|
||||
|
||||
44
mobile/openapi/lib/model/album_user_role.dart
generated
44
mobile/openapi/lib/model/album_user_role.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Album user role
|
||||
class AlbumUserRole {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AlbumUserRole._(this.value);
|
||||
enum AlbumUserRole {
|
||||
editor._(r'editor'),
|
||||
owner._(r'owner'),
|
||||
viewer._(r'viewer'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AlbumUserRole._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const editor = AlbumUserRole._(r'editor');
|
||||
static const owner = AlbumUserRole._(r'owner');
|
||||
static const viewer = AlbumUserRole._(r'viewer');
|
||||
|
||||
/// List of all possible values in this [enum][AlbumUserRole].
|
||||
static const values = <AlbumUserRole>[
|
||||
editor,
|
||||
owner,
|
||||
viewer,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AlbumUserRole] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AlbumUserRole? fromJson(dynamic value) => AlbumUserRoleTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AlbumUserRole]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AlbumUserRole> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumUserRole>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class AlbumUserRoleTypeTransformer {
|
||||
|
||||
const AlbumUserRoleTypeTransformer._();
|
||||
|
||||
String encode(AlbumUserRole data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AlbumUserRole data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AlbumUserRole.
|
||||
/// Returns the instance of [AlbumUserRole] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class AlbumUserRoleTypeTransformer {
|
||||
/// 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.
|
||||
AlbumUserRole? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AlbumUserRole) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'editor': return AlbumUserRole.editor;
|
||||
@@ -82,7 +86,7 @@ class AlbumUserRoleTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AlbumUserRoleTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AlbumUserRoleTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/asset_edit_action.dart
generated
44
mobile/openapi/lib/model/asset_edit_action.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Type of edit action to perform
|
||||
class AssetEditAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetEditAction._(this.value);
|
||||
enum AssetEditAction {
|
||||
crop._(r'crop'),
|
||||
rotate._(r'rotate'),
|
||||
mirror._(r'mirror'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetEditAction._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const crop = AssetEditAction._(r'crop');
|
||||
static const rotate = AssetEditAction._(r'rotate');
|
||||
static const mirror = AssetEditAction._(r'mirror');
|
||||
|
||||
/// List of all possible values in this [enum][AssetEditAction].
|
||||
static const values = <AssetEditAction>[
|
||||
crop,
|
||||
rotate,
|
||||
mirror,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetEditAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetEditAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetEditAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetEditAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class AssetEditActionTypeTransformer {
|
||||
|
||||
const AssetEditActionTypeTransformer._();
|
||||
|
||||
String encode(AssetEditAction data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetEditAction data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetEditAction.
|
||||
/// Returns the instance of [AssetEditAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class AssetEditActionTypeTransformer {
|
||||
/// 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.
|
||||
AssetEditAction? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetEditAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'crop': return AssetEditAction.crop;
|
||||
@@ -82,7 +86,7 @@ class AssetEditActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetEditActionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetEditActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/asset_id_error_reason.dart
generated
44
mobile/openapi/lib/model/asset_id_error_reason.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Error reason if failed
|
||||
class AssetIdErrorReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetIdErrorReason._(this.value);
|
||||
enum AssetIdErrorReason {
|
||||
duplicate._(r'duplicate'),
|
||||
noPermission._(r'no_permission'),
|
||||
notFound._(r'not_found'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetIdErrorReason._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const duplicate = AssetIdErrorReason._(r'duplicate');
|
||||
static const noPermission = AssetIdErrorReason._(r'no_permission');
|
||||
static const notFound = AssetIdErrorReason._(r'not_found');
|
||||
|
||||
/// List of all possible values in this [enum][AssetIdErrorReason].
|
||||
static const values = <AssetIdErrorReason>[
|
||||
duplicate,
|
||||
noPermission,
|
||||
notFound,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetIdErrorReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetIdErrorReason? fromJson(dynamic value) => AssetIdErrorReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetIdErrorReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetIdErrorReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetIdErrorReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
|
||||
const AssetIdErrorReasonTypeTransformer._();
|
||||
|
||||
String encode(AssetIdErrorReason data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetIdErrorReason data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetIdErrorReason.
|
||||
/// Returns the instance of [AssetIdErrorReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
/// 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.
|
||||
AssetIdErrorReason? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetIdErrorReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return AssetIdErrorReason.duplicate;
|
||||
@@ -82,7 +86,7 @@ class AssetIdErrorReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetIdErrorReasonTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetIdErrorReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_job_name.dart
generated
47
mobile/openapi/lib/model/asset_job_name.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Job name
|
||||
class AssetJobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetJobName._(this.value);
|
||||
enum AssetJobName {
|
||||
refreshFaces._(r'refresh-faces'),
|
||||
refreshMetadata._(r'refresh-metadata'),
|
||||
regenerateThumbnail._(r'regenerate-thumbnail'),
|
||||
transcodeVideo._(r'transcode-video'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetJobName._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const refreshFaces = AssetJobName._(r'refresh-faces');
|
||||
static const refreshMetadata = AssetJobName._(r'refresh-metadata');
|
||||
static const regenerateThumbnail = AssetJobName._(r'regenerate-thumbnail');
|
||||
static const transcodeVideo = AssetJobName._(r'transcode-video');
|
||||
|
||||
/// List of all possible values in this [enum][AssetJobName].
|
||||
static const values = <AssetJobName>[
|
||||
refreshFaces,
|
||||
refreshMetadata,
|
||||
regenerateThumbnail,
|
||||
transcodeVideo,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetJobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetJobName? fromJson(dynamic value) => AssetJobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetJobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetJobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetJobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class AssetJobNameTypeTransformer {
|
||||
|
||||
const AssetJobNameTypeTransformer._();
|
||||
|
||||
String encode(AssetJobName data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetJobName data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetJobName.
|
||||
/// Returns the instance of [AssetJobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class AssetJobNameTypeTransformer {
|
||||
/// 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.
|
||||
AssetJobName? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetJobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'refresh-faces': return AssetJobName.refreshFaces;
|
||||
@@ -85,7 +88,7 @@ class AssetJobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetJobNameTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetJobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_media_size.dart
generated
47
mobile/openapi/lib/model/asset_media_size.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset media size
|
||||
class AssetMediaSize {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetMediaSize._(this.value);
|
||||
enum AssetMediaSize {
|
||||
original._(r'original'),
|
||||
fullsize._(r'fullsize'),
|
||||
preview._(r'preview'),
|
||||
thumbnail._(r'thumbnail'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetMediaSize._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const original = AssetMediaSize._(r'original');
|
||||
static const fullsize = AssetMediaSize._(r'fullsize');
|
||||
static const preview = AssetMediaSize._(r'preview');
|
||||
static const thumbnail = AssetMediaSize._(r'thumbnail');
|
||||
|
||||
/// List of all possible values in this [enum][AssetMediaSize].
|
||||
static const values = <AssetMediaSize>[
|
||||
original,
|
||||
fullsize,
|
||||
preview,
|
||||
thumbnail,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetMediaSize] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetMediaSize? fromJson(dynamic value) => AssetMediaSizeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetMediaSize]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetMediaSize> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetMediaSize>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class AssetMediaSizeTypeTransformer {
|
||||
|
||||
const AssetMediaSizeTypeTransformer._();
|
||||
|
||||
String encode(AssetMediaSize data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetMediaSize data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetMediaSize.
|
||||
/// Returns the instance of [AssetMediaSize] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class AssetMediaSizeTypeTransformer {
|
||||
/// 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.
|
||||
AssetMediaSize? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetMediaSize) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'original': return AssetMediaSize.original;
|
||||
@@ -85,7 +88,7 @@ class AssetMediaSizeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetMediaSizeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetMediaSizeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_media_status.dart
generated
41
mobile/openapi/lib/model/asset_media_status.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Upload status
|
||||
class AssetMediaStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetMediaStatus._(this.value);
|
||||
enum AssetMediaStatus {
|
||||
created._(r'created'),
|
||||
duplicate._(r'duplicate'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetMediaStatus._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const created = AssetMediaStatus._(r'created');
|
||||
static const duplicate = AssetMediaStatus._(r'duplicate');
|
||||
|
||||
/// List of all possible values in this [enum][AssetMediaStatus].
|
||||
static const values = <AssetMediaStatus>[
|
||||
created,
|
||||
duplicate,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetMediaStatus] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetMediaStatus? fromJson(dynamic value) => AssetMediaStatusTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetMediaStatus]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetMediaStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetMediaStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class AssetMediaStatusTypeTransformer {
|
||||
|
||||
const AssetMediaStatusTypeTransformer._();
|
||||
|
||||
String encode(AssetMediaStatus data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetMediaStatus data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetMediaStatus.
|
||||
/// Returns the instance of [AssetMediaStatus] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class AssetMediaStatusTypeTransformer {
|
||||
/// 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.
|
||||
AssetMediaStatus? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetMediaStatus) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'created': return AssetMediaStatus.created;
|
||||
@@ -79,7 +84,7 @@ class AssetMediaStatusTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetMediaStatusTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetMediaStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_order.dart
generated
41
mobile/openapi/lib/model/asset_order.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset sort order
|
||||
class AssetOrder {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetOrder._(this.value);
|
||||
enum AssetOrder {
|
||||
asc._(r'asc'),
|
||||
desc._(r'desc'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetOrder._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const asc = AssetOrder._(r'asc');
|
||||
static const desc = AssetOrder._(r'desc');
|
||||
|
||||
/// List of all possible values in this [enum][AssetOrder].
|
||||
static const values = <AssetOrder>[
|
||||
asc,
|
||||
desc,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetOrder] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetOrder]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetOrder> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetOrder>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class AssetOrderTypeTransformer {
|
||||
|
||||
const AssetOrderTypeTransformer._();
|
||||
|
||||
String encode(AssetOrder data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetOrder data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetOrder.
|
||||
/// Returns the instance of [AssetOrder] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class AssetOrderTypeTransformer {
|
||||
/// 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.
|
||||
AssetOrder? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetOrder) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'asc': return AssetOrder.asc;
|
||||
@@ -79,7 +84,7 @@ class AssetOrderTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetOrderTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetOrderTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_order_by.dart
generated
41
mobile/openapi/lib/model/asset_order_by.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset sorting property
|
||||
class AssetOrderBy {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetOrderBy._(this.value);
|
||||
enum AssetOrderBy {
|
||||
takenAt._(r'takenAt'),
|
||||
createdAt._(r'createdAt'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetOrderBy._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const takenAt = AssetOrderBy._(r'takenAt');
|
||||
static const createdAt = AssetOrderBy._(r'createdAt');
|
||||
|
||||
/// List of all possible values in this [enum][AssetOrderBy].
|
||||
static const values = <AssetOrderBy>[
|
||||
takenAt,
|
||||
createdAt,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetOrderBy] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetOrderBy? fromJson(dynamic value) => AssetOrderByTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetOrderBy]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetOrderBy> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetOrderBy>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class AssetOrderByTypeTransformer {
|
||||
|
||||
const AssetOrderByTypeTransformer._();
|
||||
|
||||
String encode(AssetOrderBy data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetOrderBy data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetOrderBy.
|
||||
/// Returns the instance of [AssetOrderBy] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class AssetOrderByTypeTransformer {
|
||||
/// 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.
|
||||
AssetOrderBy? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetOrderBy) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'takenAt': return AssetOrderBy.takenAt;
|
||||
@@ -79,7 +84,7 @@ class AssetOrderByTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetOrderByTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetOrderByTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_reject_reason.dart
generated
41
mobile/openapi/lib/model/asset_reject_reason.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Rejection reason if rejected
|
||||
class AssetRejectReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetRejectReason._(this.value);
|
||||
enum AssetRejectReason {
|
||||
duplicate._(r'duplicate'),
|
||||
unsupportedFormat._(r'unsupported-format'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetRejectReason._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const duplicate = AssetRejectReason._(r'duplicate');
|
||||
static const unsupportedFormat = AssetRejectReason._(r'unsupported-format');
|
||||
|
||||
/// List of all possible values in this [enum][AssetRejectReason].
|
||||
static const values = <AssetRejectReason>[
|
||||
duplicate,
|
||||
unsupportedFormat,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetRejectReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetRejectReason? fromJson(dynamic value) => AssetRejectReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetRejectReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetRejectReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetRejectReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class AssetRejectReasonTypeTransformer {
|
||||
|
||||
const AssetRejectReasonTypeTransformer._();
|
||||
|
||||
String encode(AssetRejectReason data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetRejectReason data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetRejectReason.
|
||||
/// Returns the instance of [AssetRejectReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class AssetRejectReasonTypeTransformer {
|
||||
/// 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.
|
||||
AssetRejectReason? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetRejectReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return AssetRejectReason.duplicate;
|
||||
@@ -79,7 +84,7 @@ class AssetRejectReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetRejectReasonTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetRejectReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_type_enum.dart
generated
47
mobile/openapi/lib/model/asset_type_enum.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset type
|
||||
class AssetTypeEnum {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetTypeEnum._(this.value);
|
||||
enum AssetTypeEnum {
|
||||
IMAGE._(r'IMAGE'),
|
||||
VIDEO._(r'VIDEO'),
|
||||
AUDIO._(r'AUDIO'),
|
||||
OTHER._(r'OTHER'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetTypeEnum._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const IMAGE = AssetTypeEnum._(r'IMAGE');
|
||||
static const VIDEO = AssetTypeEnum._(r'VIDEO');
|
||||
static const AUDIO = AssetTypeEnum._(r'AUDIO');
|
||||
static const OTHER = AssetTypeEnum._(r'OTHER');
|
||||
|
||||
/// List of all possible values in this [enum][AssetTypeEnum].
|
||||
static const values = <AssetTypeEnum>[
|
||||
IMAGE,
|
||||
VIDEO,
|
||||
AUDIO,
|
||||
OTHER,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetTypeEnum] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetTypeEnum]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetTypeEnum> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetTypeEnum>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class AssetTypeEnumTypeTransformer {
|
||||
|
||||
const AssetTypeEnumTypeTransformer._();
|
||||
|
||||
String encode(AssetTypeEnum data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetTypeEnum data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetTypeEnum.
|
||||
/// Returns the instance of [AssetTypeEnum] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class AssetTypeEnumTypeTransformer {
|
||||
/// 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.
|
||||
AssetTypeEnum? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetTypeEnum) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'IMAGE': return AssetTypeEnum.IMAGE;
|
||||
@@ -85,7 +88,7 @@ class AssetTypeEnumTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetTypeEnumTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetTypeEnumTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/asset_upload_action.dart
generated
41
mobile/openapi/lib/model/asset_upload_action.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Upload action
|
||||
class AssetUploadAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetUploadAction._(this.value);
|
||||
enum AssetUploadAction {
|
||||
accept._(r'accept'),
|
||||
reject._(r'reject'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetUploadAction._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const accept = AssetUploadAction._(r'accept');
|
||||
static const reject = AssetUploadAction._(r'reject');
|
||||
|
||||
/// List of all possible values in this [enum][AssetUploadAction].
|
||||
static const values = <AssetUploadAction>[
|
||||
accept,
|
||||
reject,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetUploadAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetUploadAction? fromJson(dynamic value) => AssetUploadActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetUploadAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetUploadAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetUploadAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class AssetUploadActionTypeTransformer {
|
||||
|
||||
const AssetUploadActionTypeTransformer._();
|
||||
|
||||
String encode(AssetUploadAction data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetUploadAction data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetUploadAction.
|
||||
/// Returns the instance of [AssetUploadAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class AssetUploadActionTypeTransformer {
|
||||
/// 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.
|
||||
AssetUploadAction? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetUploadAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'accept': return AssetUploadAction.accept;
|
||||
@@ -79,7 +84,7 @@ class AssetUploadActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetUploadActionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetUploadActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/asset_visibility.dart
generated
47
mobile/openapi/lib/model/asset_visibility.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Asset visibility
|
||||
class AssetVisibility {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AssetVisibility._(this.value);
|
||||
enum AssetVisibility {
|
||||
archive._(r'archive'),
|
||||
timeline._(r'timeline'),
|
||||
hidden._(r'hidden'),
|
||||
locked._(r'locked'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AssetVisibility._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const archive = AssetVisibility._(r'archive');
|
||||
static const timeline = AssetVisibility._(r'timeline');
|
||||
static const hidden = AssetVisibility._(r'hidden');
|
||||
static const locked = AssetVisibility._(r'locked');
|
||||
|
||||
/// List of all possible values in this [enum][AssetVisibility].
|
||||
static const values = <AssetVisibility>[
|
||||
archive,
|
||||
timeline,
|
||||
hidden,
|
||||
locked,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AssetVisibility] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AssetVisibility? fromJson(dynamic value) => AssetVisibilityTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AssetVisibility]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AssetVisibility> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AssetVisibility>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class AssetVisibilityTypeTransformer {
|
||||
|
||||
const AssetVisibilityTypeTransformer._();
|
||||
|
||||
String encode(AssetVisibility data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AssetVisibility data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AssetVisibility.
|
||||
/// Returns the instance of [AssetVisibility] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class AssetVisibilityTypeTransformer {
|
||||
/// 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.
|
||||
AssetVisibility? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AssetVisibility) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'archive': return AssetVisibility.archive;
|
||||
@@ -85,7 +88,7 @@ class AssetVisibilityTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AssetVisibilityTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AssetVisibilityTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/audio_codec.dart
generated
47
mobile/openapi/lib/model/audio_codec.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Target audio codec
|
||||
class AudioCodec {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const AudioCodec._(this.value);
|
||||
enum AudioCodec {
|
||||
mp3._(r'mp3'),
|
||||
aac._(r'aac'),
|
||||
opus._(r'opus'),
|
||||
pcmS16le._(r'pcm_s16le'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const AudioCodec._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const mp3 = AudioCodec._(r'mp3');
|
||||
static const aac = AudioCodec._(r'aac');
|
||||
static const opus = AudioCodec._(r'opus');
|
||||
static const pcmS16le = AudioCodec._(r'pcm_s16le');
|
||||
|
||||
/// List of all possible values in this [enum][AudioCodec].
|
||||
static const values = <AudioCodec>[
|
||||
mp3,
|
||||
aac,
|
||||
opus,
|
||||
pcmS16le,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [AudioCodec] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static AudioCodec? fromJson(dynamic value) => AudioCodecTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [AudioCodec]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<AudioCodec> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AudioCodec>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class AudioCodecTypeTransformer {
|
||||
|
||||
const AudioCodecTypeTransformer._();
|
||||
|
||||
String encode(AudioCodec data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(AudioCodec data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a AudioCodec.
|
||||
/// Returns the instance of [AudioCodec] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class AudioCodecTypeTransformer {
|
||||
/// 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.
|
||||
AudioCodec? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is AudioCodec) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'mp3': return AudioCodec.mp3;
|
||||
@@ -85,7 +88,7 @@ class AudioCodecTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [AudioCodecTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static AudioCodecTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/bulk_id_error_reason.dart
generated
50
mobile/openapi/lib/model/bulk_id_error_reason.dart
generated
@@ -11,35 +11,32 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Error reason
|
||||
class BulkIdErrorReason {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const BulkIdErrorReason._(this.value);
|
||||
enum BulkIdErrorReason {
|
||||
duplicate._(r'duplicate'),
|
||||
noPermission._(r'no_permission'),
|
||||
notFound._(r'not_found'),
|
||||
unknown._(r'unknown'),
|
||||
validation._(r'validation'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const BulkIdErrorReason._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const duplicate = BulkIdErrorReason._(r'duplicate');
|
||||
static const noPermission = BulkIdErrorReason._(r'no_permission');
|
||||
static const notFound = BulkIdErrorReason._(r'not_found');
|
||||
static const unknown = BulkIdErrorReason._(r'unknown');
|
||||
static const validation = BulkIdErrorReason._(r'validation');
|
||||
|
||||
/// List of all possible values in this [enum][BulkIdErrorReason].
|
||||
static const values = <BulkIdErrorReason>[
|
||||
duplicate,
|
||||
noPermission,
|
||||
notFound,
|
||||
unknown,
|
||||
validation,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [BulkIdErrorReason] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [BulkIdErrorReason]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<BulkIdErrorReason> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <BulkIdErrorReason>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -61,9 +58,11 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
|
||||
const BulkIdErrorReasonTypeTransformer._();
|
||||
|
||||
String encode(BulkIdErrorReason data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(BulkIdErrorReason data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a BulkIdErrorReason.
|
||||
/// Returns the instance of [BulkIdErrorReason] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -72,6 +71,9 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
/// 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.
|
||||
BulkIdErrorReason? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is BulkIdErrorReason) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'duplicate': return BulkIdErrorReason.duplicate;
|
||||
@@ -88,7 +90,7 @@ class BulkIdErrorReasonTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [BulkIdErrorReasonTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static BulkIdErrorReasonTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/calendar_heatmap_type.dart
generated
41
mobile/openapi/lib/model/calendar_heatmap_type.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Type of calendar heatmap
|
||||
class CalendarHeatmapType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const CalendarHeatmapType._(this.value);
|
||||
enum CalendarHeatmapType {
|
||||
upload._(r'Upload'),
|
||||
taken._(r'Taken'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const CalendarHeatmapType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const upload = CalendarHeatmapType._(r'Upload');
|
||||
static const taken = CalendarHeatmapType._(r'Taken');
|
||||
|
||||
/// List of all possible values in this [enum][CalendarHeatmapType].
|
||||
static const values = <CalendarHeatmapType>[
|
||||
upload,
|
||||
taken,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [CalendarHeatmapType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static CalendarHeatmapType? fromJson(dynamic value) => CalendarHeatmapTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [CalendarHeatmapType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<CalendarHeatmapType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CalendarHeatmapType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
|
||||
const CalendarHeatmapTypeTypeTransformer._();
|
||||
|
||||
String encode(CalendarHeatmapType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(CalendarHeatmapType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a CalendarHeatmapType.
|
||||
/// Returns the instance of [CalendarHeatmapType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
/// 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.
|
||||
CalendarHeatmapType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is CalendarHeatmapType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'Upload': return CalendarHeatmapType.upload;
|
||||
@@ -79,7 +84,7 @@ class CalendarHeatmapTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [CalendarHeatmapTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static CalendarHeatmapTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/colorspace.dart
generated
41
mobile/openapi/lib/model/colorspace.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Colorspace
|
||||
class Colorspace {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const Colorspace._(this.value);
|
||||
enum Colorspace {
|
||||
srgb._(r'srgb'),
|
||||
p3._(r'p3'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const Colorspace._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const srgb = Colorspace._(r'srgb');
|
||||
static const p3 = Colorspace._(r'p3');
|
||||
|
||||
/// List of all possible values in this [enum][Colorspace].
|
||||
static const values = <Colorspace>[
|
||||
srgb,
|
||||
p3,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [Colorspace] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static Colorspace? fromJson(dynamic value) => ColorspaceTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [Colorspace]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<Colorspace> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <Colorspace>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class ColorspaceTypeTransformer {
|
||||
|
||||
const ColorspaceTypeTransformer._();
|
||||
|
||||
String encode(Colorspace data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(Colorspace data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a Colorspace.
|
||||
/// Returns the instance of [Colorspace] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class ColorspaceTypeTransformer {
|
||||
/// 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.
|
||||
Colorspace? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is Colorspace) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'srgb': return Colorspace.srgb;
|
||||
@@ -79,7 +84,7 @@ class ColorspaceTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ColorspaceTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ColorspaceTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/cq_mode.dart
generated
44
mobile/openapi/lib/model/cq_mode.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// CQ mode
|
||||
class CQMode {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const CQMode._(this.value);
|
||||
enum CQMode {
|
||||
auto._(r'auto'),
|
||||
cqp._(r'cqp'),
|
||||
icq._(r'icq'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const CQMode._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const auto = CQMode._(r'auto');
|
||||
static const cqp = CQMode._(r'cqp');
|
||||
static const icq = CQMode._(r'icq');
|
||||
|
||||
/// List of all possible values in this [enum][CQMode].
|
||||
static const values = <CQMode>[
|
||||
auto,
|
||||
cqp,
|
||||
icq,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [CQMode] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static CQMode? fromJson(dynamic value) => CQModeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [CQMode]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<CQMode> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <CQMode>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class CQModeTypeTransformer {
|
||||
|
||||
const CQModeTypeTransformer._();
|
||||
|
||||
String encode(CQMode data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(CQMode data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a CQMode.
|
||||
/// Returns the instance of [CQMode] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class CQModeTypeTransformer {
|
||||
/// 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.
|
||||
CQMode? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is CQMode) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'auto': return CQMode.auto;
|
||||
@@ -82,7 +86,7 @@ class CQModeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [CQModeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static CQModeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/hls_video_resolution.dart
generated
50
mobile/openapi/lib/model/hls_video_resolution.dart
generated
@@ -11,35 +11,32 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// HLS video resolution
|
||||
class HlsVideoResolution {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const HlsVideoResolution._(this.value);
|
||||
enum HlsVideoResolution {
|
||||
number480._(480),
|
||||
number720._(720),
|
||||
number1080._(1080),
|
||||
number1440._(1440),
|
||||
number2160._(2160),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const HlsVideoResolution._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final int value;
|
||||
final int _value;
|
||||
|
||||
@override
|
||||
String toString() => value.toString();
|
||||
String toString() => _value.toString();
|
||||
|
||||
int toJson() => value;
|
||||
|
||||
static const number480 = HlsVideoResolution._(480);
|
||||
static const number720 = HlsVideoResolution._(720);
|
||||
static const number1080 = HlsVideoResolution._(1080);
|
||||
static const number1440 = HlsVideoResolution._(1440);
|
||||
static const number2160 = HlsVideoResolution._(2160);
|
||||
|
||||
/// List of all possible values in this [enum][HlsVideoResolution].
|
||||
static const values = <HlsVideoResolution>[
|
||||
number480,
|
||||
number720,
|
||||
number1080,
|
||||
number1440,
|
||||
number2160,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
int toJson() => _value;
|
||||
|
||||
/// Returns the instance of [HlsVideoResolution] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static HlsVideoResolution? fromJson(dynamic value) => HlsVideoResolutionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [HlsVideoResolution]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<HlsVideoResolution> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <HlsVideoResolution>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -61,9 +58,11 @@ class HlsVideoResolutionTypeTransformer {
|
||||
|
||||
const HlsVideoResolutionTypeTransformer._();
|
||||
|
||||
int encode(HlsVideoResolution data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
int encode(HlsVideoResolution data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a HlsVideoResolution.
|
||||
/// Returns the instance of [HlsVideoResolution] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -72,6 +71,9 @@ class HlsVideoResolutionTypeTransformer {
|
||||
/// 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.
|
||||
HlsVideoResolution? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is HlsVideoResolution) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case 480: return HlsVideoResolution.number480;
|
||||
@@ -88,7 +90,7 @@ class HlsVideoResolutionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [HlsVideoResolutionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static HlsVideoResolutionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/image_format.dart
generated
41
mobile/openapi/lib/model/image_format.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Image format
|
||||
class ImageFormat {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ImageFormat._(this.value);
|
||||
enum ImageFormat {
|
||||
jpeg._(r'jpeg'),
|
||||
webp._(r'webp'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ImageFormat._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const jpeg = ImageFormat._(r'jpeg');
|
||||
static const webp = ImageFormat._(r'webp');
|
||||
|
||||
/// List of all possible values in this [enum][ImageFormat].
|
||||
static const values = <ImageFormat>[
|
||||
jpeg,
|
||||
webp,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ImageFormat] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ImageFormat? fromJson(dynamic value) => ImageFormatTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ImageFormat]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ImageFormat> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ImageFormat>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class ImageFormatTypeTransformer {
|
||||
|
||||
const ImageFormatTypeTransformer._();
|
||||
|
||||
String encode(ImageFormat data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ImageFormat data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ImageFormat.
|
||||
/// Returns the instance of [ImageFormat] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class ImageFormatTypeTransformer {
|
||||
/// 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.
|
||||
ImageFormat? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ImageFormat) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'jpeg': return ImageFormat.jpeg;
|
||||
@@ -79,7 +84,7 @@ class ImageFormatTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ImageFormatTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ImageFormatTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/integrity_report.dart
generated
44
mobile/openapi/lib/model/integrity_report.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Integrity report type
|
||||
class IntegrityReport {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const IntegrityReport._(this.value);
|
||||
enum IntegrityReport {
|
||||
untrackedFile._(r'untracked_file'),
|
||||
missingFile._(r'missing_file'),
|
||||
checksumMismatch._(r'checksum_mismatch'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const IntegrityReport._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const untrackedFile = IntegrityReport._(r'untracked_file');
|
||||
static const missingFile = IntegrityReport._(r'missing_file');
|
||||
static const checksumMismatch = IntegrityReport._(r'checksum_mismatch');
|
||||
|
||||
/// List of all possible values in this [enum][IntegrityReport].
|
||||
static const values = <IntegrityReport>[
|
||||
untrackedFile,
|
||||
missingFile,
|
||||
checksumMismatch,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [IntegrityReport] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static IntegrityReport? fromJson(dynamic value) => IntegrityReportTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [IntegrityReport]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<IntegrityReport> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <IntegrityReport>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class IntegrityReportTypeTransformer {
|
||||
|
||||
const IntegrityReportTypeTransformer._();
|
||||
|
||||
String encode(IntegrityReport data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(IntegrityReport data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a IntegrityReport.
|
||||
/// Returns the instance of [IntegrityReport] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class IntegrityReportTypeTransformer {
|
||||
/// 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.
|
||||
IntegrityReport? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is IntegrityReport) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'untracked_file': return IntegrityReport.untrackedFile;
|
||||
@@ -82,7 +86,7 @@ class IntegrityReportTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [IntegrityReportTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static IntegrityReportTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
233
mobile/openapi/lib/model/job_name.dart
generated
233
mobile/openapi/lib/model/job_name.dart
generated
@@ -11,157 +11,93 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Job name
|
||||
class JobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const JobName._(this.value);
|
||||
enum JobName {
|
||||
assetDelete._(r'AssetDelete'),
|
||||
assetDeleteCheck._(r'AssetDeleteCheck'),
|
||||
assetDetectFacesQueueAll._(r'AssetDetectFacesQueueAll'),
|
||||
assetDetectFaces._(r'AssetDetectFaces'),
|
||||
assetDetectDuplicatesQueueAll._(r'AssetDetectDuplicatesQueueAll'),
|
||||
assetDetectDuplicates._(r'AssetDetectDuplicates'),
|
||||
assetEditThumbnailGeneration._(r'AssetEditThumbnailGeneration'),
|
||||
assetEncodeVideoQueueAll._(r'AssetEncodeVideoQueueAll'),
|
||||
assetEncodeVideo._(r'AssetEncodeVideo'),
|
||||
assetEmptyTrash._(r'AssetEmptyTrash'),
|
||||
assetExtractMetadataQueueAll._(r'AssetExtractMetadataQueueAll'),
|
||||
assetExtractMetadata._(r'AssetExtractMetadata'),
|
||||
assetFileMigration._(r'AssetFileMigration'),
|
||||
assetGenerateThumbnailsQueueAll._(r'AssetGenerateThumbnailsQueueAll'),
|
||||
assetGenerateThumbnails._(r'AssetGenerateThumbnails'),
|
||||
auditTableCleanup._(r'AuditTableCleanup'),
|
||||
databaseBackup._(r'DatabaseBackup'),
|
||||
facialRecognitionQueueAll._(r'FacialRecognitionQueueAll'),
|
||||
facialRecognition._(r'FacialRecognition'),
|
||||
fileDelete._(r'FileDelete'),
|
||||
fileMigrationQueueAll._(r'FileMigrationQueueAll'),
|
||||
libraryDeleteCheck._(r'LibraryDeleteCheck'),
|
||||
libraryDelete._(r'LibraryDelete'),
|
||||
libraryRemoveAsset._(r'LibraryRemoveAsset'),
|
||||
libraryScanAssetsQueueAll._(r'LibraryScanAssetsQueueAll'),
|
||||
librarySyncAssets._(r'LibrarySyncAssets'),
|
||||
librarySyncFilesQueueAll._(r'LibrarySyncFilesQueueAll'),
|
||||
librarySyncFiles._(r'LibrarySyncFiles'),
|
||||
libraryScanQueueAll._(r'LibraryScanQueueAll'),
|
||||
hlsSessionCleanup._(r'HlsSessionCleanup'),
|
||||
memoryCleanup._(r'MemoryCleanup'),
|
||||
memoryGenerate._(r'MemoryGenerate'),
|
||||
notificationsCleanup._(r'NotificationsCleanup'),
|
||||
notifyUserSignup._(r'NotifyUserSignup'),
|
||||
notifyAlbumInvite._(r'NotifyAlbumInvite'),
|
||||
notifyAlbumUpdate._(r'NotifyAlbumUpdate'),
|
||||
userDelete._(r'UserDelete'),
|
||||
userDeleteCheck._(r'UserDeleteCheck'),
|
||||
userSyncUsage._(r'UserSyncUsage'),
|
||||
personCleanup._(r'PersonCleanup'),
|
||||
personFileMigration._(r'PersonFileMigration'),
|
||||
personGenerateThumbnail._(r'PersonGenerateThumbnail'),
|
||||
sessionCleanup._(r'SessionCleanup'),
|
||||
sendMail._(r'SendMail'),
|
||||
sidecarQueueAll._(r'SidecarQueueAll'),
|
||||
sidecarCheck._(r'SidecarCheck'),
|
||||
sidecarWrite._(r'SidecarWrite'),
|
||||
smartSearchQueueAll._(r'SmartSearchQueueAll'),
|
||||
smartSearch._(r'SmartSearch'),
|
||||
storageTemplateMigration._(r'StorageTemplateMigration'),
|
||||
storageTemplateMigrationSingle._(r'StorageTemplateMigrationSingle'),
|
||||
tagCleanup._(r'TagCleanup'),
|
||||
versionCheck._(r'VersionCheck'),
|
||||
ocrQueueAll._(r'OcrQueueAll'),
|
||||
ocr._(r'Ocr'),
|
||||
workflowAssetTrigger._(r'WorkflowAssetTrigger'),
|
||||
integrityUntrackedFilesQueueAll._(r'IntegrityUntrackedFilesQueueAll'),
|
||||
integrityUntrackedFiles._(r'IntegrityUntrackedFiles'),
|
||||
integrityUntrackedRefresh._(r'IntegrityUntrackedRefresh'),
|
||||
integrityMissingFilesQueueAll._(r'IntegrityMissingFilesQueueAll'),
|
||||
integrityMissingFiles._(r'IntegrityMissingFiles'),
|
||||
integrityMissingFilesRefresh._(r'IntegrityMissingFilesRefresh'),
|
||||
integrityChecksumFiles._(r'IntegrityChecksumFiles'),
|
||||
integrityChecksumFilesRefresh._(r'IntegrityChecksumFilesRefresh'),
|
||||
integrityDeleteReportType._(r'IntegrityDeleteReportType'),
|
||||
integrityDeleteReports._(r'IntegrityDeleteReports'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const JobName._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const assetDelete = JobName._(r'AssetDelete');
|
||||
static const assetDeleteCheck = JobName._(r'AssetDeleteCheck');
|
||||
static const assetDetectFacesQueueAll = JobName._(r'AssetDetectFacesQueueAll');
|
||||
static const assetDetectFaces = JobName._(r'AssetDetectFaces');
|
||||
static const assetDetectDuplicatesQueueAll = JobName._(r'AssetDetectDuplicatesQueueAll');
|
||||
static const assetDetectDuplicates = JobName._(r'AssetDetectDuplicates');
|
||||
static const assetEditThumbnailGeneration = JobName._(r'AssetEditThumbnailGeneration');
|
||||
static const assetEncodeVideoQueueAll = JobName._(r'AssetEncodeVideoQueueAll');
|
||||
static const assetEncodeVideo = JobName._(r'AssetEncodeVideo');
|
||||
static const assetEmptyTrash = JobName._(r'AssetEmptyTrash');
|
||||
static const assetExtractMetadataQueueAll = JobName._(r'AssetExtractMetadataQueueAll');
|
||||
static const assetExtractMetadata = JobName._(r'AssetExtractMetadata');
|
||||
static const assetFileMigration = JobName._(r'AssetFileMigration');
|
||||
static const assetGenerateThumbnailsQueueAll = JobName._(r'AssetGenerateThumbnailsQueueAll');
|
||||
static const assetGenerateThumbnails = JobName._(r'AssetGenerateThumbnails');
|
||||
static const auditTableCleanup = JobName._(r'AuditTableCleanup');
|
||||
static const databaseBackup = JobName._(r'DatabaseBackup');
|
||||
static const facialRecognitionQueueAll = JobName._(r'FacialRecognitionQueueAll');
|
||||
static const facialRecognition = JobName._(r'FacialRecognition');
|
||||
static const fileDelete = JobName._(r'FileDelete');
|
||||
static const fileMigrationQueueAll = JobName._(r'FileMigrationQueueAll');
|
||||
static const libraryDeleteCheck = JobName._(r'LibraryDeleteCheck');
|
||||
static const libraryDelete = JobName._(r'LibraryDelete');
|
||||
static const libraryRemoveAsset = JobName._(r'LibraryRemoveAsset');
|
||||
static const libraryScanAssetsQueueAll = JobName._(r'LibraryScanAssetsQueueAll');
|
||||
static const librarySyncAssets = JobName._(r'LibrarySyncAssets');
|
||||
static const librarySyncFilesQueueAll = JobName._(r'LibrarySyncFilesQueueAll');
|
||||
static const librarySyncFiles = JobName._(r'LibrarySyncFiles');
|
||||
static const libraryScanQueueAll = JobName._(r'LibraryScanQueueAll');
|
||||
static const hlsSessionCleanup = JobName._(r'HlsSessionCleanup');
|
||||
static const memoryCleanup = JobName._(r'MemoryCleanup');
|
||||
static const memoryGenerate = JobName._(r'MemoryGenerate');
|
||||
static const notificationsCleanup = JobName._(r'NotificationsCleanup');
|
||||
static const notifyUserSignup = JobName._(r'NotifyUserSignup');
|
||||
static const notifyAlbumInvite = JobName._(r'NotifyAlbumInvite');
|
||||
static const notifyAlbumUpdate = JobName._(r'NotifyAlbumUpdate');
|
||||
static const userDelete = JobName._(r'UserDelete');
|
||||
static const userDeleteCheck = JobName._(r'UserDeleteCheck');
|
||||
static const userSyncUsage = JobName._(r'UserSyncUsage');
|
||||
static const personCleanup = JobName._(r'PersonCleanup');
|
||||
static const personFileMigration = JobName._(r'PersonFileMigration');
|
||||
static const personGenerateThumbnail = JobName._(r'PersonGenerateThumbnail');
|
||||
static const sessionCleanup = JobName._(r'SessionCleanup');
|
||||
static const sendMail = JobName._(r'SendMail');
|
||||
static const sidecarQueueAll = JobName._(r'SidecarQueueAll');
|
||||
static const sidecarCheck = JobName._(r'SidecarCheck');
|
||||
static const sidecarWrite = JobName._(r'SidecarWrite');
|
||||
static const smartSearchQueueAll = JobName._(r'SmartSearchQueueAll');
|
||||
static const smartSearch = JobName._(r'SmartSearch');
|
||||
static const storageTemplateMigration = JobName._(r'StorageTemplateMigration');
|
||||
static const storageTemplateMigrationSingle = JobName._(r'StorageTemplateMigrationSingle');
|
||||
static const tagCleanup = JobName._(r'TagCleanup');
|
||||
static const versionCheck = JobName._(r'VersionCheck');
|
||||
static const ocrQueueAll = JobName._(r'OcrQueueAll');
|
||||
static const ocr = JobName._(r'Ocr');
|
||||
static const workflowAssetTrigger = JobName._(r'WorkflowAssetTrigger');
|
||||
static const integrityUntrackedFilesQueueAll = JobName._(r'IntegrityUntrackedFilesQueueAll');
|
||||
static const integrityUntrackedFiles = JobName._(r'IntegrityUntrackedFiles');
|
||||
static const integrityUntrackedRefresh = JobName._(r'IntegrityUntrackedRefresh');
|
||||
static const integrityMissingFilesQueueAll = JobName._(r'IntegrityMissingFilesQueueAll');
|
||||
static const integrityMissingFiles = JobName._(r'IntegrityMissingFiles');
|
||||
static const integrityMissingFilesRefresh = JobName._(r'IntegrityMissingFilesRefresh');
|
||||
static const integrityChecksumFiles = JobName._(r'IntegrityChecksumFiles');
|
||||
static const integrityChecksumFilesRefresh = JobName._(r'IntegrityChecksumFilesRefresh');
|
||||
static const integrityDeleteReportType = JobName._(r'IntegrityDeleteReportType');
|
||||
static const integrityDeleteReports = JobName._(r'IntegrityDeleteReports');
|
||||
|
||||
/// List of all possible values in this [enum][JobName].
|
||||
static const values = <JobName>[
|
||||
assetDelete,
|
||||
assetDeleteCheck,
|
||||
assetDetectFacesQueueAll,
|
||||
assetDetectFaces,
|
||||
assetDetectDuplicatesQueueAll,
|
||||
assetDetectDuplicates,
|
||||
assetEditThumbnailGeneration,
|
||||
assetEncodeVideoQueueAll,
|
||||
assetEncodeVideo,
|
||||
assetEmptyTrash,
|
||||
assetExtractMetadataQueueAll,
|
||||
assetExtractMetadata,
|
||||
assetFileMigration,
|
||||
assetGenerateThumbnailsQueueAll,
|
||||
assetGenerateThumbnails,
|
||||
auditTableCleanup,
|
||||
databaseBackup,
|
||||
facialRecognitionQueueAll,
|
||||
facialRecognition,
|
||||
fileDelete,
|
||||
fileMigrationQueueAll,
|
||||
libraryDeleteCheck,
|
||||
libraryDelete,
|
||||
libraryRemoveAsset,
|
||||
libraryScanAssetsQueueAll,
|
||||
librarySyncAssets,
|
||||
librarySyncFilesQueueAll,
|
||||
librarySyncFiles,
|
||||
libraryScanQueueAll,
|
||||
hlsSessionCleanup,
|
||||
memoryCleanup,
|
||||
memoryGenerate,
|
||||
notificationsCleanup,
|
||||
notifyUserSignup,
|
||||
notifyAlbumInvite,
|
||||
notifyAlbumUpdate,
|
||||
userDelete,
|
||||
userDeleteCheck,
|
||||
userSyncUsage,
|
||||
personCleanup,
|
||||
personFileMigration,
|
||||
personGenerateThumbnail,
|
||||
sessionCleanup,
|
||||
sendMail,
|
||||
sidecarQueueAll,
|
||||
sidecarCheck,
|
||||
sidecarWrite,
|
||||
smartSearchQueueAll,
|
||||
smartSearch,
|
||||
storageTemplateMigration,
|
||||
storageTemplateMigrationSingle,
|
||||
tagCleanup,
|
||||
versionCheck,
|
||||
ocrQueueAll,
|
||||
ocr,
|
||||
workflowAssetTrigger,
|
||||
integrityUntrackedFilesQueueAll,
|
||||
integrityUntrackedFiles,
|
||||
integrityUntrackedRefresh,
|
||||
integrityMissingFilesQueueAll,
|
||||
integrityMissingFiles,
|
||||
integrityMissingFilesRefresh,
|
||||
integrityChecksumFiles,
|
||||
integrityChecksumFilesRefresh,
|
||||
integrityDeleteReportType,
|
||||
integrityDeleteReports,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [JobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static JobName? fromJson(dynamic value) => JobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [JobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<JobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <JobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -183,9 +119,11 @@ class JobNameTypeTransformer {
|
||||
|
||||
const JobNameTypeTransformer._();
|
||||
|
||||
String encode(JobName data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(JobName data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a JobName.
|
||||
/// Returns the instance of [JobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -194,6 +132,9 @@ class JobNameTypeTransformer {
|
||||
/// 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.
|
||||
JobName? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is JobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AssetDelete': return JobName.assetDelete;
|
||||
@@ -271,7 +212,7 @@ class JobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [JobNameTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static JobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/log_level.dart
generated
53
mobile/openapi/lib/model/log_level.dart
generated
@@ -11,37 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Log level
|
||||
class LogLevel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const LogLevel._(this.value);
|
||||
enum LogLevel {
|
||||
verbose._(r'verbose'),
|
||||
debug._(r'debug'),
|
||||
log._(r'log'),
|
||||
warn._(r'warn'),
|
||||
error._(r'error'),
|
||||
fatal._(r'fatal'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const LogLevel._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const verbose = LogLevel._(r'verbose');
|
||||
static const debug = LogLevel._(r'debug');
|
||||
static const log = LogLevel._(r'log');
|
||||
static const warn = LogLevel._(r'warn');
|
||||
static const error = LogLevel._(r'error');
|
||||
static const fatal = LogLevel._(r'fatal');
|
||||
|
||||
/// List of all possible values in this [enum][LogLevel].
|
||||
static const values = <LogLevel>[
|
||||
verbose,
|
||||
debug,
|
||||
log,
|
||||
warn,
|
||||
error,
|
||||
fatal,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [LogLevel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static LogLevel? fromJson(dynamic value) => LogLevelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [LogLevel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<LogLevel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <LogLevel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -63,9 +59,11 @@ class LogLevelTypeTransformer {
|
||||
|
||||
const LogLevelTypeTransformer._();
|
||||
|
||||
String encode(LogLevel data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(LogLevel data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a LogLevel.
|
||||
/// Returns the instance of [LogLevel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -74,6 +72,9 @@ class LogLevelTypeTransformer {
|
||||
/// 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.
|
||||
LogLevel? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is LogLevel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'verbose': return LogLevel.verbose;
|
||||
@@ -91,7 +92,7 @@ class LogLevelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [LogLevelTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static LogLevelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/maintenance_action.dart
generated
47
mobile/openapi/lib/model/maintenance_action.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Maintenance action
|
||||
class MaintenanceAction {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MaintenanceAction._(this.value);
|
||||
enum MaintenanceAction {
|
||||
start._(r'start'),
|
||||
end._(r'end'),
|
||||
selectDatabaseRestore._(r'select_database_restore'),
|
||||
restoreDatabase._(r'restore_database'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MaintenanceAction._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const start = MaintenanceAction._(r'start');
|
||||
static const end = MaintenanceAction._(r'end');
|
||||
static const selectDatabaseRestore = MaintenanceAction._(r'select_database_restore');
|
||||
static const restoreDatabase = MaintenanceAction._(r'restore_database');
|
||||
|
||||
/// List of all possible values in this [enum][MaintenanceAction].
|
||||
static const values = <MaintenanceAction>[
|
||||
start,
|
||||
end,
|
||||
selectDatabaseRestore,
|
||||
restoreDatabase,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [MaintenanceAction] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MaintenanceAction? fromJson(dynamic value) => MaintenanceActionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MaintenanceAction]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MaintenanceAction> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MaintenanceAction>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class MaintenanceActionTypeTransformer {
|
||||
|
||||
const MaintenanceActionTypeTransformer._();
|
||||
|
||||
String encode(MaintenanceAction data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MaintenanceAction data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MaintenanceAction.
|
||||
/// Returns the instance of [MaintenanceAction] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class MaintenanceActionTypeTransformer {
|
||||
/// 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.
|
||||
MaintenanceAction? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is MaintenanceAction) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'start': return MaintenanceAction.start;
|
||||
@@ -85,7 +88,7 @@ class MaintenanceActionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MaintenanceActionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static MaintenanceActionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
80
mobile/openapi/lib/model/manual_job_name.dart
generated
80
mobile/openapi/lib/model/manual_job_name.dart
generated
@@ -11,55 +11,42 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Manual job name
|
||||
class ManualJobName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ManualJobName._(this.value);
|
||||
enum ManualJobName {
|
||||
personCleanup._(r'person-cleanup'),
|
||||
tagCleanup._(r'tag-cleanup'),
|
||||
userCleanup._(r'user-cleanup'),
|
||||
memoryCleanup._(r'memory-cleanup'),
|
||||
memoryCreate._(r'memory-create'),
|
||||
backupDatabase._(r'backup-database'),
|
||||
integrityMissingFiles._(r'integrity-missing-files'),
|
||||
integrityUntrackedFiles._(r'integrity-untracked-files'),
|
||||
integrityChecksumMismatch._(r'integrity-checksum-mismatch'),
|
||||
integrityMissingFilesRefresh._(r'integrity-missing-files-refresh'),
|
||||
integrityUntrackedFilesRefresh._(r'integrity-untracked-files-refresh'),
|
||||
integrityChecksumMismatchRefresh._(r'integrity-checksum-mismatch-refresh'),
|
||||
integrityMissingFilesDeleteAll._(r'integrity-missing-files-delete-all'),
|
||||
integrityUntrackedFilesDeleteAll._(r'integrity-untracked-files-delete-all'),
|
||||
integrityChecksumMismatchDeleteAll._(r'integrity-checksum-mismatch-delete-all'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ManualJobName._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const personCleanup = ManualJobName._(r'person-cleanup');
|
||||
static const tagCleanup = ManualJobName._(r'tag-cleanup');
|
||||
static const userCleanup = ManualJobName._(r'user-cleanup');
|
||||
static const memoryCleanup = ManualJobName._(r'memory-cleanup');
|
||||
static const memoryCreate = ManualJobName._(r'memory-create');
|
||||
static const backupDatabase = ManualJobName._(r'backup-database');
|
||||
static const integrityMissingFiles = ManualJobName._(r'integrity-missing-files');
|
||||
static const integrityUntrackedFiles = ManualJobName._(r'integrity-untracked-files');
|
||||
static const integrityChecksumMismatch = ManualJobName._(r'integrity-checksum-mismatch');
|
||||
static const integrityMissingFilesRefresh = ManualJobName._(r'integrity-missing-files-refresh');
|
||||
static const integrityUntrackedFilesRefresh = ManualJobName._(r'integrity-untracked-files-refresh');
|
||||
static const integrityChecksumMismatchRefresh = ManualJobName._(r'integrity-checksum-mismatch-refresh');
|
||||
static const integrityMissingFilesDeleteAll = ManualJobName._(r'integrity-missing-files-delete-all');
|
||||
static const integrityUntrackedFilesDeleteAll = ManualJobName._(r'integrity-untracked-files-delete-all');
|
||||
static const integrityChecksumMismatchDeleteAll = ManualJobName._(r'integrity-checksum-mismatch-delete-all');
|
||||
|
||||
/// List of all possible values in this [enum][ManualJobName].
|
||||
static const values = <ManualJobName>[
|
||||
personCleanup,
|
||||
tagCleanup,
|
||||
userCleanup,
|
||||
memoryCleanup,
|
||||
memoryCreate,
|
||||
backupDatabase,
|
||||
integrityMissingFiles,
|
||||
integrityUntrackedFiles,
|
||||
integrityChecksumMismatch,
|
||||
integrityMissingFilesRefresh,
|
||||
integrityUntrackedFilesRefresh,
|
||||
integrityChecksumMismatchRefresh,
|
||||
integrityMissingFilesDeleteAll,
|
||||
integrityUntrackedFilesDeleteAll,
|
||||
integrityChecksumMismatchDeleteAll,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ManualJobName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ManualJobName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ManualJobName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ManualJobName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -81,9 +68,11 @@ class ManualJobNameTypeTransformer {
|
||||
|
||||
const ManualJobNameTypeTransformer._();
|
||||
|
||||
String encode(ManualJobName data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ManualJobName data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ManualJobName.
|
||||
/// Returns the instance of [ManualJobName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -92,6 +81,9 @@ class ManualJobNameTypeTransformer {
|
||||
/// 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.
|
||||
ManualJobName? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ManualJobName) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'person-cleanup': return ManualJobName.personCleanup;
|
||||
@@ -118,7 +110,7 @@ class ManualJobNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ManualJobNameTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ManualJobNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/memory_search_order.dart
generated
44
mobile/openapi/lib/model/memory_search_order.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Sort order
|
||||
class MemorySearchOrder {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemorySearchOrder._(this.value);
|
||||
enum MemorySearchOrder {
|
||||
asc._(r'asc'),
|
||||
desc._(r'desc'),
|
||||
random._(r'random'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MemorySearchOrder._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const asc = MemorySearchOrder._(r'asc');
|
||||
static const desc = MemorySearchOrder._(r'desc');
|
||||
static const random = MemorySearchOrder._(r'random');
|
||||
|
||||
/// List of all possible values in this [enum][MemorySearchOrder].
|
||||
static const values = <MemorySearchOrder>[
|
||||
asc,
|
||||
desc,
|
||||
random,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [MemorySearchOrder] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MemorySearchOrder? fromJson(dynamic value) => MemorySearchOrderTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MemorySearchOrder]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MemorySearchOrder> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemorySearchOrder>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class MemorySearchOrderTypeTransformer {
|
||||
|
||||
const MemorySearchOrderTypeTransformer._();
|
||||
|
||||
String encode(MemorySearchOrder data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MemorySearchOrder data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MemorySearchOrder.
|
||||
/// Returns the instance of [MemorySearchOrder] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class MemorySearchOrderTypeTransformer {
|
||||
/// 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.
|
||||
MemorySearchOrder? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is MemorySearchOrder) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'asc': return MemorySearchOrder.asc;
|
||||
@@ -82,7 +86,7 @@ class MemorySearchOrderTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MemorySearchOrderTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static MemorySearchOrderTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
38
mobile/openapi/lib/model/memory_type.dart
generated
38
mobile/openapi/lib/model/memory_type.dart
generated
@@ -11,27 +11,28 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Memory type
|
||||
class MemoryType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MemoryType._(this.value);
|
||||
enum MemoryType {
|
||||
onThisDay._(r'on_this_day'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MemoryType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const onThisDay = MemoryType._(r'on_this_day');
|
||||
|
||||
/// List of all possible values in this [enum][MemoryType].
|
||||
static const values = <MemoryType>[
|
||||
onThisDay,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [MemoryType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MemoryType? fromJson(dynamic value) => MemoryTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MemoryType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MemoryType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MemoryType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -53,9 +54,11 @@ class MemoryTypeTypeTransformer {
|
||||
|
||||
const MemoryTypeTypeTransformer._();
|
||||
|
||||
String encode(MemoryType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MemoryType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MemoryType.
|
||||
/// Returns the instance of [MemoryType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -64,6 +67,9 @@ class MemoryTypeTypeTransformer {
|
||||
/// 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.
|
||||
MemoryType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is MemoryType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'on_this_day': return MemoryType.onThisDay;
|
||||
@@ -76,7 +82,7 @@ class MemoryTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MemoryTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static MemoryTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/mirror_axis.dart
generated
41
mobile/openapi/lib/model/mirror_axis.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Axis to mirror along
|
||||
class MirrorAxis {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const MirrorAxis._(this.value);
|
||||
enum MirrorAxis {
|
||||
horizontal._(r'horizontal'),
|
||||
vertical._(r'vertical'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const MirrorAxis._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const horizontal = MirrorAxis._(r'horizontal');
|
||||
static const vertical = MirrorAxis._(r'vertical');
|
||||
|
||||
/// List of all possible values in this [enum][MirrorAxis].
|
||||
static const values = <MirrorAxis>[
|
||||
horizontal,
|
||||
vertical,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [MirrorAxis] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static MirrorAxis? fromJson(dynamic value) => MirrorAxisTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [MirrorAxis]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<MirrorAxis> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <MirrorAxis>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class MirrorAxisTypeTransformer {
|
||||
|
||||
const MirrorAxisTypeTransformer._();
|
||||
|
||||
String encode(MirrorAxis data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(MirrorAxis data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a MirrorAxis.
|
||||
/// Returns the instance of [MirrorAxis] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class MirrorAxisTypeTransformer {
|
||||
/// 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.
|
||||
MirrorAxis? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is MirrorAxis) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'horizontal': return MirrorAxis.horizontal;
|
||||
@@ -79,7 +84,7 @@ class MirrorAxisTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [MirrorAxisTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static MirrorAxisTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/notification_level.dart
generated
47
mobile/openapi/lib/model/notification_level.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Notification level
|
||||
class NotificationLevel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const NotificationLevel._(this.value);
|
||||
enum NotificationLevel {
|
||||
success._(r'success'),
|
||||
error._(r'error'),
|
||||
warning._(r'warning'),
|
||||
info._(r'info'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const NotificationLevel._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const success = NotificationLevel._(r'success');
|
||||
static const error = NotificationLevel._(r'error');
|
||||
static const warning = NotificationLevel._(r'warning');
|
||||
static const info = NotificationLevel._(r'info');
|
||||
|
||||
/// List of all possible values in this [enum][NotificationLevel].
|
||||
static const values = <NotificationLevel>[
|
||||
success,
|
||||
error,
|
||||
warning,
|
||||
info,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [NotificationLevel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static NotificationLevel? fromJson(dynamic value) => NotificationLevelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [NotificationLevel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<NotificationLevel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <NotificationLevel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class NotificationLevelTypeTransformer {
|
||||
|
||||
const NotificationLevelTypeTransformer._();
|
||||
|
||||
String encode(NotificationLevel data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(NotificationLevel data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a NotificationLevel.
|
||||
/// Returns the instance of [NotificationLevel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class NotificationLevelTypeTransformer {
|
||||
/// 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.
|
||||
NotificationLevel? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is NotificationLevel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'success': return NotificationLevel.success;
|
||||
@@ -85,7 +88,7 @@ class NotificationLevelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [NotificationLevelTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static NotificationLevelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/notification_type.dart
generated
53
mobile/openapi/lib/model/notification_type.dart
generated
@@ -11,37 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Notification type
|
||||
class NotificationType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const NotificationType._(this.value);
|
||||
enum NotificationType {
|
||||
jobFailed._(r'JobFailed'),
|
||||
backupFailed._(r'BackupFailed'),
|
||||
systemMessage._(r'SystemMessage'),
|
||||
albumInvite._(r'AlbumInvite'),
|
||||
albumUpdate._(r'AlbumUpdate'),
|
||||
custom._(r'Custom'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const NotificationType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const jobFailed = NotificationType._(r'JobFailed');
|
||||
static const backupFailed = NotificationType._(r'BackupFailed');
|
||||
static const systemMessage = NotificationType._(r'SystemMessage');
|
||||
static const albumInvite = NotificationType._(r'AlbumInvite');
|
||||
static const albumUpdate = NotificationType._(r'AlbumUpdate');
|
||||
static const custom = NotificationType._(r'Custom');
|
||||
|
||||
/// List of all possible values in this [enum][NotificationType].
|
||||
static const values = <NotificationType>[
|
||||
jobFailed,
|
||||
backupFailed,
|
||||
systemMessage,
|
||||
albumInvite,
|
||||
albumUpdate,
|
||||
custom,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [NotificationType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static NotificationType? fromJson(dynamic value) => NotificationTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [NotificationType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<NotificationType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <NotificationType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -63,9 +59,11 @@ class NotificationTypeTypeTransformer {
|
||||
|
||||
const NotificationTypeTypeTransformer._();
|
||||
|
||||
String encode(NotificationType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(NotificationType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a NotificationType.
|
||||
/// Returns the instance of [NotificationType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -74,6 +72,9 @@ class NotificationTypeTypeTransformer {
|
||||
/// 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.
|
||||
NotificationType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is NotificationType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'JobFailed': return NotificationType.jobFailed;
|
||||
@@ -91,7 +92,7 @@ class NotificationTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [NotificationTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static NotificationTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// OAuth token endpoint auth method
|
||||
class OAuthTokenEndpointAuthMethod {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const OAuthTokenEndpointAuthMethod._(this.value);
|
||||
enum OAuthTokenEndpointAuthMethod {
|
||||
clientSecretPost._(r'client_secret_post'),
|
||||
clientSecretBasic._(r'client_secret_basic'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const OAuthTokenEndpointAuthMethod._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const clientSecretPost = OAuthTokenEndpointAuthMethod._(r'client_secret_post');
|
||||
static const clientSecretBasic = OAuthTokenEndpointAuthMethod._(r'client_secret_basic');
|
||||
|
||||
/// List of all possible values in this [enum][OAuthTokenEndpointAuthMethod].
|
||||
static const values = <OAuthTokenEndpointAuthMethod>[
|
||||
clientSecretPost,
|
||||
clientSecretBasic,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static OAuthTokenEndpointAuthMethod? fromJson(dynamic value) => OAuthTokenEndpointAuthMethodTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [OAuthTokenEndpointAuthMethod]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<OAuthTokenEndpointAuthMethod> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <OAuthTokenEndpointAuthMethod>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class OAuthTokenEndpointAuthMethodTypeTransformer {
|
||||
|
||||
const OAuthTokenEndpointAuthMethodTypeTransformer._();
|
||||
|
||||
String encode(OAuthTokenEndpointAuthMethod data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(OAuthTokenEndpointAuthMethod data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a OAuthTokenEndpointAuthMethod.
|
||||
/// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class OAuthTokenEndpointAuthMethodTypeTransformer {
|
||||
/// 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.
|
||||
OAuthTokenEndpointAuthMethod? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is OAuthTokenEndpointAuthMethod) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'client_secret_post': return OAuthTokenEndpointAuthMethod.clientSecretPost;
|
||||
@@ -79,7 +84,7 @@ class OAuthTokenEndpointAuthMethodTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [OAuthTokenEndpointAuthMethodTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static OAuthTokenEndpointAuthMethodTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/partner_direction.dart
generated
41
mobile/openapi/lib/model/partner_direction.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Partner direction
|
||||
class PartnerDirection {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const PartnerDirection._(this.value);
|
||||
enum PartnerDirection {
|
||||
sharedBy._(r'shared-by'),
|
||||
sharedWith._(r'shared-with'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const PartnerDirection._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const sharedBy = PartnerDirection._(r'shared-by');
|
||||
static const sharedWith = PartnerDirection._(r'shared-with');
|
||||
|
||||
/// List of all possible values in this [enum][PartnerDirection].
|
||||
static const values = <PartnerDirection>[
|
||||
sharedBy,
|
||||
sharedWith,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [PartnerDirection] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static PartnerDirection? fromJson(dynamic value) => PartnerDirectionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [PartnerDirection]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<PartnerDirection> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <PartnerDirection>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class PartnerDirectionTypeTransformer {
|
||||
|
||||
const PartnerDirectionTypeTransformer._();
|
||||
|
||||
String encode(PartnerDirection data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(PartnerDirection data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a PartnerDirection.
|
||||
/// Returns the instance of [PartnerDirection] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class PartnerDirectionTypeTransformer {
|
||||
/// 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.
|
||||
PartnerDirection? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is PartnerDirection) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'shared-by': return PartnerDirection.sharedBy;
|
||||
@@ -79,7 +84,7 @@ class PartnerDirectionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [PartnerDirectionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static PartnerDirectionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
500
mobile/openapi/lib/model/permission.dart
generated
500
mobile/openapi/lib/model/permission.dart
generated
@@ -11,335 +11,182 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// List of permissions
|
||||
class Permission {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const Permission._(this.value);
|
||||
enum Permission {
|
||||
all._(r'all'),
|
||||
activityPeriodCreate._(r'activity.create'),
|
||||
activityPeriodRead._(r'activity.read'),
|
||||
activityPeriodUpdate._(r'activity.update'),
|
||||
activityPeriodDelete._(r'activity.delete'),
|
||||
activityPeriodStatistics._(r'activity.statistics'),
|
||||
apiKeyPeriodCreate._(r'apiKey.create'),
|
||||
apiKeyPeriodRead._(r'apiKey.read'),
|
||||
apiKeyPeriodUpdate._(r'apiKey.update'),
|
||||
apiKeyPeriodDelete._(r'apiKey.delete'),
|
||||
assetPeriodRead._(r'asset.read'),
|
||||
assetPeriodUpdate._(r'asset.update'),
|
||||
assetPeriodDelete._(r'asset.delete'),
|
||||
assetPeriodStatistics._(r'asset.statistics'),
|
||||
assetPeriodShare._(r'asset.share'),
|
||||
assetPeriodView._(r'asset.view'),
|
||||
assetPeriodDownload._(r'asset.download'),
|
||||
assetPeriodUpload._(r'asset.upload'),
|
||||
assetPeriodCopy._(r'asset.copy'),
|
||||
assetPeriodDerive._(r'asset.derive'),
|
||||
assetPeriodEditPeriodGet._(r'asset.edit.get'),
|
||||
assetPeriodEditPeriodCreate._(r'asset.edit.create'),
|
||||
assetPeriodEditPeriodDelete._(r'asset.edit.delete'),
|
||||
albumPeriodCreate._(r'album.create'),
|
||||
albumPeriodRead._(r'album.read'),
|
||||
albumPeriodUpdate._(r'album.update'),
|
||||
albumPeriodDelete._(r'album.delete'),
|
||||
albumPeriodStatistics._(r'album.statistics'),
|
||||
albumPeriodShare._(r'album.share'),
|
||||
albumPeriodDownload._(r'album.download'),
|
||||
albumAssetPeriodCreate._(r'albumAsset.create'),
|
||||
albumAssetPeriodDelete._(r'albumAsset.delete'),
|
||||
albumUserPeriodCreate._(r'albumUser.create'),
|
||||
albumUserPeriodUpdate._(r'albumUser.update'),
|
||||
albumUserPeriodDelete._(r'albumUser.delete'),
|
||||
authPeriodChangePassword._(r'auth.changePassword'),
|
||||
authDevicePeriodDelete._(r'authDevice.delete'),
|
||||
archivePeriodRead._(r'archive.read'),
|
||||
backupPeriodList._(r'backup.list'),
|
||||
backupPeriodDownload._(r'backup.download'),
|
||||
backupPeriodUpload._(r'backup.upload'),
|
||||
backupPeriodDelete._(r'backup.delete'),
|
||||
duplicatePeriodRead._(r'duplicate.read'),
|
||||
duplicatePeriodDelete._(r'duplicate.delete'),
|
||||
facePeriodCreate._(r'face.create'),
|
||||
facePeriodRead._(r'face.read'),
|
||||
facePeriodUpdate._(r'face.update'),
|
||||
facePeriodDelete._(r'face.delete'),
|
||||
folderPeriodRead._(r'folder.read'),
|
||||
jobPeriodCreate._(r'job.create'),
|
||||
jobPeriodRead._(r'job.read'),
|
||||
libraryPeriodCreate._(r'library.create'),
|
||||
libraryPeriodRead._(r'library.read'),
|
||||
libraryPeriodUpdate._(r'library.update'),
|
||||
libraryPeriodDelete._(r'library.delete'),
|
||||
libraryPeriodStatistics._(r'library.statistics'),
|
||||
timelinePeriodRead._(r'timeline.read'),
|
||||
timelinePeriodDownload._(r'timeline.download'),
|
||||
maintenance._(r'maintenance'),
|
||||
mapPeriodRead._(r'map.read'),
|
||||
mapPeriodSearch._(r'map.search'),
|
||||
memoryPeriodCreate._(r'memory.create'),
|
||||
memoryPeriodRead._(r'memory.read'),
|
||||
memoryPeriodUpdate._(r'memory.update'),
|
||||
memoryPeriodDelete._(r'memory.delete'),
|
||||
memoryPeriodStatistics._(r'memory.statistics'),
|
||||
memoryAssetPeriodCreate._(r'memoryAsset.create'),
|
||||
memoryAssetPeriodDelete._(r'memoryAsset.delete'),
|
||||
notificationPeriodCreate._(r'notification.create'),
|
||||
notificationPeriodRead._(r'notification.read'),
|
||||
notificationPeriodUpdate._(r'notification.update'),
|
||||
notificationPeriodDelete._(r'notification.delete'),
|
||||
partnerPeriodCreate._(r'partner.create'),
|
||||
partnerPeriodRead._(r'partner.read'),
|
||||
partnerPeriodUpdate._(r'partner.update'),
|
||||
partnerPeriodDelete._(r'partner.delete'),
|
||||
personPeriodCreate._(r'person.create'),
|
||||
personPeriodRead._(r'person.read'),
|
||||
personPeriodUpdate._(r'person.update'),
|
||||
personPeriodDelete._(r'person.delete'),
|
||||
personPeriodStatistics._(r'person.statistics'),
|
||||
personPeriodMerge._(r'person.merge'),
|
||||
personPeriodReassign._(r'person.reassign'),
|
||||
pinCodePeriodCreate._(r'pinCode.create'),
|
||||
pinCodePeriodUpdate._(r'pinCode.update'),
|
||||
pinCodePeriodDelete._(r'pinCode.delete'),
|
||||
pluginPeriodCreate._(r'plugin.create'),
|
||||
pluginPeriodRead._(r'plugin.read'),
|
||||
pluginPeriodUpdate._(r'plugin.update'),
|
||||
pluginPeriodDelete._(r'plugin.delete'),
|
||||
serverPeriodAbout._(r'server.about'),
|
||||
serverPeriodApkLinks._(r'server.apkLinks'),
|
||||
serverPeriodStorage._(r'server.storage'),
|
||||
serverPeriodStatistics._(r'server.statistics'),
|
||||
serverPeriodVersionCheck._(r'server.versionCheck'),
|
||||
serverLicensePeriodRead._(r'serverLicense.read'),
|
||||
serverLicensePeriodUpdate._(r'serverLicense.update'),
|
||||
serverLicensePeriodDelete._(r'serverLicense.delete'),
|
||||
sessionPeriodCreate._(r'session.create'),
|
||||
sessionPeriodRead._(r'session.read'),
|
||||
sessionPeriodUpdate._(r'session.update'),
|
||||
sessionPeriodDelete._(r'session.delete'),
|
||||
sessionPeriodLock._(r'session.lock'),
|
||||
sharedLinkPeriodCreate._(r'sharedLink.create'),
|
||||
sharedLinkPeriodRead._(r'sharedLink.read'),
|
||||
sharedLinkPeriodUpdate._(r'sharedLink.update'),
|
||||
sharedLinkPeriodDelete._(r'sharedLink.delete'),
|
||||
stackPeriodCreate._(r'stack.create'),
|
||||
stackPeriodRead._(r'stack.read'),
|
||||
stackPeriodUpdate._(r'stack.update'),
|
||||
stackPeriodDelete._(r'stack.delete'),
|
||||
syncPeriodStream._(r'sync.stream'),
|
||||
syncCheckpointPeriodRead._(r'syncCheckpoint.read'),
|
||||
syncCheckpointPeriodUpdate._(r'syncCheckpoint.update'),
|
||||
syncCheckpointPeriodDelete._(r'syncCheckpoint.delete'),
|
||||
systemConfigPeriodRead._(r'systemConfig.read'),
|
||||
systemConfigPeriodUpdate._(r'systemConfig.update'),
|
||||
systemMetadataPeriodRead._(r'systemMetadata.read'),
|
||||
systemMetadataPeriodUpdate._(r'systemMetadata.update'),
|
||||
tagPeriodCreate._(r'tag.create'),
|
||||
tagPeriodRead._(r'tag.read'),
|
||||
tagPeriodUpdate._(r'tag.update'),
|
||||
tagPeriodDelete._(r'tag.delete'),
|
||||
tagPeriodAsset._(r'tag.asset'),
|
||||
userPeriodRead._(r'user.read'),
|
||||
userPeriodUpdate._(r'user.update'),
|
||||
userLicensePeriodCreate._(r'userLicense.create'),
|
||||
userLicensePeriodRead._(r'userLicense.read'),
|
||||
userLicensePeriodUpdate._(r'userLicense.update'),
|
||||
userLicensePeriodDelete._(r'userLicense.delete'),
|
||||
userOnboardingPeriodRead._(r'userOnboarding.read'),
|
||||
userOnboardingPeriodUpdate._(r'userOnboarding.update'),
|
||||
userOnboardingPeriodDelete._(r'userOnboarding.delete'),
|
||||
userPreferencePeriodRead._(r'userPreference.read'),
|
||||
userPreferencePeriodUpdate._(r'userPreference.update'),
|
||||
userProfileImagePeriodCreate._(r'userProfileImage.create'),
|
||||
userProfileImagePeriodRead._(r'userProfileImage.read'),
|
||||
userProfileImagePeriodUpdate._(r'userProfileImage.update'),
|
||||
userProfileImagePeriodDelete._(r'userProfileImage.delete'),
|
||||
queuePeriodRead._(r'queue.read'),
|
||||
queuePeriodUpdate._(r'queue.update'),
|
||||
queueJobPeriodCreate._(r'queueJob.create'),
|
||||
queueJobPeriodRead._(r'queueJob.read'),
|
||||
queueJobPeriodUpdate._(r'queueJob.update'),
|
||||
queueJobPeriodDelete._(r'queueJob.delete'),
|
||||
workflowPeriodCreate._(r'workflow.create'),
|
||||
workflowPeriodRead._(r'workflow.read'),
|
||||
workflowPeriodUpdate._(r'workflow.update'),
|
||||
workflowPeriodDelete._(r'workflow.delete'),
|
||||
adminUserPeriodCreate._(r'adminUser.create'),
|
||||
adminUserPeriodRead._(r'adminUser.read'),
|
||||
adminUserPeriodUpdate._(r'adminUser.update'),
|
||||
adminUserPeriodDelete._(r'adminUser.delete'),
|
||||
adminSessionPeriodRead._(r'adminSession.read'),
|
||||
adminAuthPeriodUnlinkAll._(r'adminAuth.unlinkAll'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const Permission._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const all = Permission._(r'all');
|
||||
static const activityPeriodCreate = Permission._(r'activity.create');
|
||||
static const activityPeriodRead = Permission._(r'activity.read');
|
||||
static const activityPeriodUpdate = Permission._(r'activity.update');
|
||||
static const activityPeriodDelete = Permission._(r'activity.delete');
|
||||
static const activityPeriodStatistics = Permission._(r'activity.statistics');
|
||||
static const apiKeyPeriodCreate = Permission._(r'apiKey.create');
|
||||
static const apiKeyPeriodRead = Permission._(r'apiKey.read');
|
||||
static const apiKeyPeriodUpdate = Permission._(r'apiKey.update');
|
||||
static const apiKeyPeriodDelete = Permission._(r'apiKey.delete');
|
||||
static const assetPeriodRead = Permission._(r'asset.read');
|
||||
static const assetPeriodUpdate = Permission._(r'asset.update');
|
||||
static const assetPeriodDelete = Permission._(r'asset.delete');
|
||||
static const assetPeriodStatistics = Permission._(r'asset.statistics');
|
||||
static const assetPeriodShare = Permission._(r'asset.share');
|
||||
static const assetPeriodView = Permission._(r'asset.view');
|
||||
static const assetPeriodDownload = Permission._(r'asset.download');
|
||||
static const assetPeriodUpload = Permission._(r'asset.upload');
|
||||
static const assetPeriodCopy = Permission._(r'asset.copy');
|
||||
static const assetPeriodDerive = Permission._(r'asset.derive');
|
||||
static const assetPeriodEditPeriodGet = Permission._(r'asset.edit.get');
|
||||
static const assetPeriodEditPeriodCreate = Permission._(r'asset.edit.create');
|
||||
static const assetPeriodEditPeriodDelete = Permission._(r'asset.edit.delete');
|
||||
static const albumPeriodCreate = Permission._(r'album.create');
|
||||
static const albumPeriodRead = Permission._(r'album.read');
|
||||
static const albumPeriodUpdate = Permission._(r'album.update');
|
||||
static const albumPeriodDelete = Permission._(r'album.delete');
|
||||
static const albumPeriodStatistics = Permission._(r'album.statistics');
|
||||
static const albumPeriodShare = Permission._(r'album.share');
|
||||
static const albumPeriodDownload = Permission._(r'album.download');
|
||||
static const albumAssetPeriodCreate = Permission._(r'albumAsset.create');
|
||||
static const albumAssetPeriodDelete = Permission._(r'albumAsset.delete');
|
||||
static const albumUserPeriodCreate = Permission._(r'albumUser.create');
|
||||
static const albumUserPeriodUpdate = Permission._(r'albumUser.update');
|
||||
static const albumUserPeriodDelete = Permission._(r'albumUser.delete');
|
||||
static const authPeriodChangePassword = Permission._(r'auth.changePassword');
|
||||
static const authDevicePeriodDelete = Permission._(r'authDevice.delete');
|
||||
static const archivePeriodRead = Permission._(r'archive.read');
|
||||
static const backupPeriodList = Permission._(r'backup.list');
|
||||
static const backupPeriodDownload = Permission._(r'backup.download');
|
||||
static const backupPeriodUpload = Permission._(r'backup.upload');
|
||||
static const backupPeriodDelete = Permission._(r'backup.delete');
|
||||
static const duplicatePeriodRead = Permission._(r'duplicate.read');
|
||||
static const duplicatePeriodDelete = Permission._(r'duplicate.delete');
|
||||
static const facePeriodCreate = Permission._(r'face.create');
|
||||
static const facePeriodRead = Permission._(r'face.read');
|
||||
static const facePeriodUpdate = Permission._(r'face.update');
|
||||
static const facePeriodDelete = Permission._(r'face.delete');
|
||||
static const folderPeriodRead = Permission._(r'folder.read');
|
||||
static const jobPeriodCreate = Permission._(r'job.create');
|
||||
static const jobPeriodRead = Permission._(r'job.read');
|
||||
static const libraryPeriodCreate = Permission._(r'library.create');
|
||||
static const libraryPeriodRead = Permission._(r'library.read');
|
||||
static const libraryPeriodUpdate = Permission._(r'library.update');
|
||||
static const libraryPeriodDelete = Permission._(r'library.delete');
|
||||
static const libraryPeriodStatistics = Permission._(r'library.statistics');
|
||||
static const timelinePeriodRead = Permission._(r'timeline.read');
|
||||
static const timelinePeriodDownload = Permission._(r'timeline.download');
|
||||
static const maintenance = Permission._(r'maintenance');
|
||||
static const mapPeriodRead = Permission._(r'map.read');
|
||||
static const mapPeriodSearch = Permission._(r'map.search');
|
||||
static const memoryPeriodCreate = Permission._(r'memory.create');
|
||||
static const memoryPeriodRead = Permission._(r'memory.read');
|
||||
static const memoryPeriodUpdate = Permission._(r'memory.update');
|
||||
static const memoryPeriodDelete = Permission._(r'memory.delete');
|
||||
static const memoryPeriodStatistics = Permission._(r'memory.statistics');
|
||||
static const memoryAssetPeriodCreate = Permission._(r'memoryAsset.create');
|
||||
static const memoryAssetPeriodDelete = Permission._(r'memoryAsset.delete');
|
||||
static const notificationPeriodCreate = Permission._(r'notification.create');
|
||||
static const notificationPeriodRead = Permission._(r'notification.read');
|
||||
static const notificationPeriodUpdate = Permission._(r'notification.update');
|
||||
static const notificationPeriodDelete = Permission._(r'notification.delete');
|
||||
static const partnerPeriodCreate = Permission._(r'partner.create');
|
||||
static const partnerPeriodRead = Permission._(r'partner.read');
|
||||
static const partnerPeriodUpdate = Permission._(r'partner.update');
|
||||
static const partnerPeriodDelete = Permission._(r'partner.delete');
|
||||
static const personPeriodCreate = Permission._(r'person.create');
|
||||
static const personPeriodRead = Permission._(r'person.read');
|
||||
static const personPeriodUpdate = Permission._(r'person.update');
|
||||
static const personPeriodDelete = Permission._(r'person.delete');
|
||||
static const personPeriodStatistics = Permission._(r'person.statistics');
|
||||
static const personPeriodMerge = Permission._(r'person.merge');
|
||||
static const personPeriodReassign = Permission._(r'person.reassign');
|
||||
static const pinCodePeriodCreate = Permission._(r'pinCode.create');
|
||||
static const pinCodePeriodUpdate = Permission._(r'pinCode.update');
|
||||
static const pinCodePeriodDelete = Permission._(r'pinCode.delete');
|
||||
static const pluginPeriodCreate = Permission._(r'plugin.create');
|
||||
static const pluginPeriodRead = Permission._(r'plugin.read');
|
||||
static const pluginPeriodUpdate = Permission._(r'plugin.update');
|
||||
static const pluginPeriodDelete = Permission._(r'plugin.delete');
|
||||
static const serverPeriodAbout = Permission._(r'server.about');
|
||||
static const serverPeriodApkLinks = Permission._(r'server.apkLinks');
|
||||
static const serverPeriodStorage = Permission._(r'server.storage');
|
||||
static const serverPeriodStatistics = Permission._(r'server.statistics');
|
||||
static const serverPeriodVersionCheck = Permission._(r'server.versionCheck');
|
||||
static const serverLicensePeriodRead = Permission._(r'serverLicense.read');
|
||||
static const serverLicensePeriodUpdate = Permission._(r'serverLicense.update');
|
||||
static const serverLicensePeriodDelete = Permission._(r'serverLicense.delete');
|
||||
static const sessionPeriodCreate = Permission._(r'session.create');
|
||||
static const sessionPeriodRead = Permission._(r'session.read');
|
||||
static const sessionPeriodUpdate = Permission._(r'session.update');
|
||||
static const sessionPeriodDelete = Permission._(r'session.delete');
|
||||
static const sessionPeriodLock = Permission._(r'session.lock');
|
||||
static const sharedLinkPeriodCreate = Permission._(r'sharedLink.create');
|
||||
static const sharedLinkPeriodRead = Permission._(r'sharedLink.read');
|
||||
static const sharedLinkPeriodUpdate = Permission._(r'sharedLink.update');
|
||||
static const sharedLinkPeriodDelete = Permission._(r'sharedLink.delete');
|
||||
static const stackPeriodCreate = Permission._(r'stack.create');
|
||||
static const stackPeriodRead = Permission._(r'stack.read');
|
||||
static const stackPeriodUpdate = Permission._(r'stack.update');
|
||||
static const stackPeriodDelete = Permission._(r'stack.delete');
|
||||
static const syncPeriodStream = Permission._(r'sync.stream');
|
||||
static const syncCheckpointPeriodRead = Permission._(r'syncCheckpoint.read');
|
||||
static const syncCheckpointPeriodUpdate = Permission._(r'syncCheckpoint.update');
|
||||
static const syncCheckpointPeriodDelete = Permission._(r'syncCheckpoint.delete');
|
||||
static const systemConfigPeriodRead = Permission._(r'systemConfig.read');
|
||||
static const systemConfigPeriodUpdate = Permission._(r'systemConfig.update');
|
||||
static const systemMetadataPeriodRead = Permission._(r'systemMetadata.read');
|
||||
static const systemMetadataPeriodUpdate = Permission._(r'systemMetadata.update');
|
||||
static const tagPeriodCreate = Permission._(r'tag.create');
|
||||
static const tagPeriodRead = Permission._(r'tag.read');
|
||||
static const tagPeriodUpdate = Permission._(r'tag.update');
|
||||
static const tagPeriodDelete = Permission._(r'tag.delete');
|
||||
static const tagPeriodAsset = Permission._(r'tag.asset');
|
||||
static const userPeriodRead = Permission._(r'user.read');
|
||||
static const userPeriodUpdate = Permission._(r'user.update');
|
||||
static const userLicensePeriodCreate = Permission._(r'userLicense.create');
|
||||
static const userLicensePeriodRead = Permission._(r'userLicense.read');
|
||||
static const userLicensePeriodUpdate = Permission._(r'userLicense.update');
|
||||
static const userLicensePeriodDelete = Permission._(r'userLicense.delete');
|
||||
static const userOnboardingPeriodRead = Permission._(r'userOnboarding.read');
|
||||
static const userOnboardingPeriodUpdate = Permission._(r'userOnboarding.update');
|
||||
static const userOnboardingPeriodDelete = Permission._(r'userOnboarding.delete');
|
||||
static const userPreferencePeriodRead = Permission._(r'userPreference.read');
|
||||
static const userPreferencePeriodUpdate = Permission._(r'userPreference.update');
|
||||
static const userProfileImagePeriodCreate = Permission._(r'userProfileImage.create');
|
||||
static const userProfileImagePeriodRead = Permission._(r'userProfileImage.read');
|
||||
static const userProfileImagePeriodUpdate = Permission._(r'userProfileImage.update');
|
||||
static const userProfileImagePeriodDelete = Permission._(r'userProfileImage.delete');
|
||||
static const queuePeriodRead = Permission._(r'queue.read');
|
||||
static const queuePeriodUpdate = Permission._(r'queue.update');
|
||||
static const queueJobPeriodCreate = Permission._(r'queueJob.create');
|
||||
static const queueJobPeriodRead = Permission._(r'queueJob.read');
|
||||
static const queueJobPeriodUpdate = Permission._(r'queueJob.update');
|
||||
static const queueJobPeriodDelete = Permission._(r'queueJob.delete');
|
||||
static const workflowPeriodCreate = Permission._(r'workflow.create');
|
||||
static const workflowPeriodRead = Permission._(r'workflow.read');
|
||||
static const workflowPeriodUpdate = Permission._(r'workflow.update');
|
||||
static const workflowPeriodDelete = Permission._(r'workflow.delete');
|
||||
static const adminUserPeriodCreate = Permission._(r'adminUser.create');
|
||||
static const adminUserPeriodRead = Permission._(r'adminUser.read');
|
||||
static const adminUserPeriodUpdate = Permission._(r'adminUser.update');
|
||||
static const adminUserPeriodDelete = Permission._(r'adminUser.delete');
|
||||
static const adminSessionPeriodRead = Permission._(r'adminSession.read');
|
||||
static const adminAuthPeriodUnlinkAll = Permission._(r'adminAuth.unlinkAll');
|
||||
|
||||
/// List of all possible values in this [enum][Permission].
|
||||
static const values = <Permission>[
|
||||
all,
|
||||
activityPeriodCreate,
|
||||
activityPeriodRead,
|
||||
activityPeriodUpdate,
|
||||
activityPeriodDelete,
|
||||
activityPeriodStatistics,
|
||||
apiKeyPeriodCreate,
|
||||
apiKeyPeriodRead,
|
||||
apiKeyPeriodUpdate,
|
||||
apiKeyPeriodDelete,
|
||||
assetPeriodRead,
|
||||
assetPeriodUpdate,
|
||||
assetPeriodDelete,
|
||||
assetPeriodStatistics,
|
||||
assetPeriodShare,
|
||||
assetPeriodView,
|
||||
assetPeriodDownload,
|
||||
assetPeriodUpload,
|
||||
assetPeriodCopy,
|
||||
assetPeriodDerive,
|
||||
assetPeriodEditPeriodGet,
|
||||
assetPeriodEditPeriodCreate,
|
||||
assetPeriodEditPeriodDelete,
|
||||
albumPeriodCreate,
|
||||
albumPeriodRead,
|
||||
albumPeriodUpdate,
|
||||
albumPeriodDelete,
|
||||
albumPeriodStatistics,
|
||||
albumPeriodShare,
|
||||
albumPeriodDownload,
|
||||
albumAssetPeriodCreate,
|
||||
albumAssetPeriodDelete,
|
||||
albumUserPeriodCreate,
|
||||
albumUserPeriodUpdate,
|
||||
albumUserPeriodDelete,
|
||||
authPeriodChangePassword,
|
||||
authDevicePeriodDelete,
|
||||
archivePeriodRead,
|
||||
backupPeriodList,
|
||||
backupPeriodDownload,
|
||||
backupPeriodUpload,
|
||||
backupPeriodDelete,
|
||||
duplicatePeriodRead,
|
||||
duplicatePeriodDelete,
|
||||
facePeriodCreate,
|
||||
facePeriodRead,
|
||||
facePeriodUpdate,
|
||||
facePeriodDelete,
|
||||
folderPeriodRead,
|
||||
jobPeriodCreate,
|
||||
jobPeriodRead,
|
||||
libraryPeriodCreate,
|
||||
libraryPeriodRead,
|
||||
libraryPeriodUpdate,
|
||||
libraryPeriodDelete,
|
||||
libraryPeriodStatistics,
|
||||
timelinePeriodRead,
|
||||
timelinePeriodDownload,
|
||||
maintenance,
|
||||
mapPeriodRead,
|
||||
mapPeriodSearch,
|
||||
memoryPeriodCreate,
|
||||
memoryPeriodRead,
|
||||
memoryPeriodUpdate,
|
||||
memoryPeriodDelete,
|
||||
memoryPeriodStatistics,
|
||||
memoryAssetPeriodCreate,
|
||||
memoryAssetPeriodDelete,
|
||||
notificationPeriodCreate,
|
||||
notificationPeriodRead,
|
||||
notificationPeriodUpdate,
|
||||
notificationPeriodDelete,
|
||||
partnerPeriodCreate,
|
||||
partnerPeriodRead,
|
||||
partnerPeriodUpdate,
|
||||
partnerPeriodDelete,
|
||||
personPeriodCreate,
|
||||
personPeriodRead,
|
||||
personPeriodUpdate,
|
||||
personPeriodDelete,
|
||||
personPeriodStatistics,
|
||||
personPeriodMerge,
|
||||
personPeriodReassign,
|
||||
pinCodePeriodCreate,
|
||||
pinCodePeriodUpdate,
|
||||
pinCodePeriodDelete,
|
||||
pluginPeriodCreate,
|
||||
pluginPeriodRead,
|
||||
pluginPeriodUpdate,
|
||||
pluginPeriodDelete,
|
||||
serverPeriodAbout,
|
||||
serverPeriodApkLinks,
|
||||
serverPeriodStorage,
|
||||
serverPeriodStatistics,
|
||||
serverPeriodVersionCheck,
|
||||
serverLicensePeriodRead,
|
||||
serverLicensePeriodUpdate,
|
||||
serverLicensePeriodDelete,
|
||||
sessionPeriodCreate,
|
||||
sessionPeriodRead,
|
||||
sessionPeriodUpdate,
|
||||
sessionPeriodDelete,
|
||||
sessionPeriodLock,
|
||||
sharedLinkPeriodCreate,
|
||||
sharedLinkPeriodRead,
|
||||
sharedLinkPeriodUpdate,
|
||||
sharedLinkPeriodDelete,
|
||||
stackPeriodCreate,
|
||||
stackPeriodRead,
|
||||
stackPeriodUpdate,
|
||||
stackPeriodDelete,
|
||||
syncPeriodStream,
|
||||
syncCheckpointPeriodRead,
|
||||
syncCheckpointPeriodUpdate,
|
||||
syncCheckpointPeriodDelete,
|
||||
systemConfigPeriodRead,
|
||||
systemConfigPeriodUpdate,
|
||||
systemMetadataPeriodRead,
|
||||
systemMetadataPeriodUpdate,
|
||||
tagPeriodCreate,
|
||||
tagPeriodRead,
|
||||
tagPeriodUpdate,
|
||||
tagPeriodDelete,
|
||||
tagPeriodAsset,
|
||||
userPeriodRead,
|
||||
userPeriodUpdate,
|
||||
userLicensePeriodCreate,
|
||||
userLicensePeriodRead,
|
||||
userLicensePeriodUpdate,
|
||||
userLicensePeriodDelete,
|
||||
userOnboardingPeriodRead,
|
||||
userOnboardingPeriodUpdate,
|
||||
userOnboardingPeriodDelete,
|
||||
userPreferencePeriodRead,
|
||||
userPreferencePeriodUpdate,
|
||||
userProfileImagePeriodCreate,
|
||||
userProfileImagePeriodRead,
|
||||
userProfileImagePeriodUpdate,
|
||||
userProfileImagePeriodDelete,
|
||||
queuePeriodRead,
|
||||
queuePeriodUpdate,
|
||||
queueJobPeriodCreate,
|
||||
queueJobPeriodRead,
|
||||
queueJobPeriodUpdate,
|
||||
queueJobPeriodDelete,
|
||||
workflowPeriodCreate,
|
||||
workflowPeriodRead,
|
||||
workflowPeriodUpdate,
|
||||
workflowPeriodDelete,
|
||||
adminUserPeriodCreate,
|
||||
adminUserPeriodRead,
|
||||
adminUserPeriodUpdate,
|
||||
adminUserPeriodDelete,
|
||||
adminSessionPeriodRead,
|
||||
adminAuthPeriodUnlinkAll,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [Permission] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static Permission? fromJson(dynamic value) => PermissionTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [Permission]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<Permission> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <Permission>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -361,9 +208,11 @@ class PermissionTypeTransformer {
|
||||
|
||||
const PermissionTypeTransformer._();
|
||||
|
||||
String encode(Permission data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(Permission data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a Permission.
|
||||
/// Returns the instance of [Permission] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -372,6 +221,9 @@ class PermissionTypeTransformer {
|
||||
/// 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.
|
||||
Permission? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is Permission) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'all': return Permission.all;
|
||||
@@ -538,7 +390,7 @@ class PermissionTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [PermissionTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static PermissionTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/queue_command.dart
generated
50
mobile/openapi/lib/model/queue_command.dart
generated
@@ -11,35 +11,32 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Queue command to execute
|
||||
class QueueCommand {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const QueueCommand._(this.value);
|
||||
enum QueueCommand {
|
||||
start._(r'start'),
|
||||
pause._(r'pause'),
|
||||
resume._(r'resume'),
|
||||
empty._(r'empty'),
|
||||
clearFailed._(r'clear-failed'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const QueueCommand._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const start = QueueCommand._(r'start');
|
||||
static const pause = QueueCommand._(r'pause');
|
||||
static const resume = QueueCommand._(r'resume');
|
||||
static const empty = QueueCommand._(r'empty');
|
||||
static const clearFailed = QueueCommand._(r'clear-failed');
|
||||
|
||||
/// List of all possible values in this [enum][QueueCommand].
|
||||
static const values = <QueueCommand>[
|
||||
start,
|
||||
pause,
|
||||
resume,
|
||||
empty,
|
||||
clearFailed,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [QueueCommand] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static QueueCommand? fromJson(dynamic value) => QueueCommandTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [QueueCommand]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<QueueCommand> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <QueueCommand>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -61,9 +58,11 @@ class QueueCommandTypeTransformer {
|
||||
|
||||
const QueueCommandTypeTransformer._();
|
||||
|
||||
String encode(QueueCommand data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(QueueCommand data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a QueueCommand.
|
||||
/// Returns the instance of [QueueCommand] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -72,6 +71,9 @@ class QueueCommandTypeTransformer {
|
||||
/// 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.
|
||||
QueueCommand? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is QueueCommand) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'start': return QueueCommand.start;
|
||||
@@ -88,7 +90,7 @@ class QueueCommandTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [QueueCommandTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static QueueCommandTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/queue_job_status.dart
generated
53
mobile/openapi/lib/model/queue_job_status.dart
generated
@@ -11,37 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Queue job status
|
||||
class QueueJobStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const QueueJobStatus._(this.value);
|
||||
enum QueueJobStatus {
|
||||
active._(r'active'),
|
||||
failed._(r'failed'),
|
||||
completed._(r'completed'),
|
||||
delayed._(r'delayed'),
|
||||
waiting._(r'waiting'),
|
||||
paused._(r'paused'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const QueueJobStatus._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const active = QueueJobStatus._(r'active');
|
||||
static const failed = QueueJobStatus._(r'failed');
|
||||
static const completed = QueueJobStatus._(r'completed');
|
||||
static const delayed = QueueJobStatus._(r'delayed');
|
||||
static const waiting = QueueJobStatus._(r'waiting');
|
||||
static const paused = QueueJobStatus._(r'paused');
|
||||
|
||||
/// List of all possible values in this [enum][QueueJobStatus].
|
||||
static const values = <QueueJobStatus>[
|
||||
active,
|
||||
failed,
|
||||
completed,
|
||||
delayed,
|
||||
waiting,
|
||||
paused,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [QueueJobStatus] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static QueueJobStatus? fromJson(dynamic value) => QueueJobStatusTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [QueueJobStatus]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<QueueJobStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <QueueJobStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -63,9 +59,11 @@ class QueueJobStatusTypeTransformer {
|
||||
|
||||
const QueueJobStatusTypeTransformer._();
|
||||
|
||||
String encode(QueueJobStatus data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(QueueJobStatus data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a QueueJobStatus.
|
||||
/// Returns the instance of [QueueJobStatus] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -74,6 +72,9 @@ class QueueJobStatusTypeTransformer {
|
||||
/// 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.
|
||||
QueueJobStatus? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is QueueJobStatus) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'active': return QueueJobStatus.active;
|
||||
@@ -91,7 +92,7 @@ class QueueJobStatusTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [QueueJobStatusTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static QueueJobStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
92
mobile/openapi/lib/model/queue_name.dart
generated
92
mobile/openapi/lib/model/queue_name.dart
generated
@@ -11,63 +11,46 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Queue name
|
||||
class QueueName {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const QueueName._(this.value);
|
||||
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);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const thumbnailGeneration = QueueName._(r'thumbnailGeneration');
|
||||
static const metadataExtraction = QueueName._(r'metadataExtraction');
|
||||
static const videoConversion = QueueName._(r'videoConversion');
|
||||
static const faceDetection = QueueName._(r'faceDetection');
|
||||
static const facialRecognition = QueueName._(r'facialRecognition');
|
||||
static const smartSearch = QueueName._(r'smartSearch');
|
||||
static const duplicateDetection = QueueName._(r'duplicateDetection');
|
||||
static const backgroundTask = QueueName._(r'backgroundTask');
|
||||
static const storageTemplateMigration = QueueName._(r'storageTemplateMigration');
|
||||
static const migration = QueueName._(r'migration');
|
||||
static const search = QueueName._(r'search');
|
||||
static const sidecar = QueueName._(r'sidecar');
|
||||
static const library_ = QueueName._(r'library');
|
||||
static const notifications = QueueName._(r'notifications');
|
||||
static const backupDatabase = QueueName._(r'backupDatabase');
|
||||
static const ocr = QueueName._(r'ocr');
|
||||
static const workflow = QueueName._(r'workflow');
|
||||
static const integrityCheck = QueueName._(r'integrityCheck');
|
||||
static const editor = QueueName._(r'editor');
|
||||
|
||||
/// List of all possible values in this [enum][QueueName].
|
||||
static const values = <QueueName>[
|
||||
thumbnailGeneration,
|
||||
metadataExtraction,
|
||||
videoConversion,
|
||||
faceDetection,
|
||||
facialRecognition,
|
||||
smartSearch,
|
||||
duplicateDetection,
|
||||
backgroundTask,
|
||||
storageTemplateMigration,
|
||||
migration,
|
||||
search,
|
||||
sidecar,
|
||||
library_,
|
||||
notifications,
|
||||
backupDatabase,
|
||||
ocr,
|
||||
workflow,
|
||||
integrityCheck,
|
||||
editor,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [QueueName] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static QueueName? fromJson(dynamic value) => QueueNameTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [QueueName]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<QueueName> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <QueueName>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -89,9 +72,11 @@ class QueueNameTypeTransformer {
|
||||
|
||||
const QueueNameTypeTransformer._();
|
||||
|
||||
String encode(QueueName data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(QueueName data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a QueueName.
|
||||
/// Returns the instance of [QueueName] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -100,6 +85,9 @@ class QueueNameTypeTransformer {
|
||||
/// 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;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'thumbnailGeneration': return QueueName.thumbnailGeneration;
|
||||
@@ -130,7 +118,7 @@ class QueueNameTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [QueueNameTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static QueueNameTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/reaction_level.dart
generated
41
mobile/openapi/lib/model/reaction_level.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Reaction level
|
||||
class ReactionLevel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ReactionLevel._(this.value);
|
||||
enum ReactionLevel {
|
||||
album._(r'album'),
|
||||
asset._(r'asset'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ReactionLevel._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const album = ReactionLevel._(r'album');
|
||||
static const asset = ReactionLevel._(r'asset');
|
||||
|
||||
/// List of all possible values in this [enum][ReactionLevel].
|
||||
static const values = <ReactionLevel>[
|
||||
album,
|
||||
asset,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ReactionLevel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ReactionLevel? fromJson(dynamic value) => ReactionLevelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ReactionLevel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ReactionLevel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ReactionLevel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class ReactionLevelTypeTransformer {
|
||||
|
||||
const ReactionLevelTypeTransformer._();
|
||||
|
||||
String encode(ReactionLevel data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ReactionLevel data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ReactionLevel.
|
||||
/// Returns the instance of [ReactionLevel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class ReactionLevelTypeTransformer {
|
||||
/// 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.
|
||||
ReactionLevel? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ReactionLevel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'album': return ReactionLevel.album;
|
||||
@@ -79,7 +84,7 @@ class ReactionLevelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ReactionLevelTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ReactionLevelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/reaction_type.dart
generated
41
mobile/openapi/lib/model/reaction_type.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Reaction type
|
||||
class ReactionType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ReactionType._(this.value);
|
||||
enum ReactionType {
|
||||
comment._(r'comment'),
|
||||
like._(r'like'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ReactionType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const comment = ReactionType._(r'comment');
|
||||
static const like = ReactionType._(r'like');
|
||||
|
||||
/// List of all possible values in this [enum][ReactionType].
|
||||
static const values = <ReactionType>[
|
||||
comment,
|
||||
like,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ReactionType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ReactionType? fromJson(dynamic value) => ReactionTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ReactionType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ReactionType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ReactionType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class ReactionTypeTypeTransformer {
|
||||
|
||||
const ReactionTypeTypeTransformer._();
|
||||
|
||||
String encode(ReactionType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ReactionType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ReactionType.
|
||||
/// Returns the instance of [ReactionType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class ReactionTypeTypeTransformer {
|
||||
/// 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.
|
||||
ReactionType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ReactionType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'comment': return ReactionType.comment;
|
||||
@@ -79,7 +84,7 @@ class ReactionTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ReactionTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ReactionTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/release_channel.dart
generated
41
mobile/openapi/lib/model/release_channel.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Release channel
|
||||
class ReleaseChannel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ReleaseChannel._(this.value);
|
||||
enum ReleaseChannel {
|
||||
stable._(r'stable'),
|
||||
releaseCandidate._(r'releaseCandidate'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ReleaseChannel._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const stable = ReleaseChannel._(r'stable');
|
||||
static const releaseCandidate = ReleaseChannel._(r'releaseCandidate');
|
||||
|
||||
/// List of all possible values in this [enum][ReleaseChannel].
|
||||
static const values = <ReleaseChannel>[
|
||||
stable,
|
||||
releaseCandidate,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ReleaseChannel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ReleaseChannel? fromJson(dynamic value) => ReleaseChannelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ReleaseChannel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ReleaseChannel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ReleaseChannel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class ReleaseChannelTypeTransformer {
|
||||
|
||||
const ReleaseChannelTypeTransformer._();
|
||||
|
||||
String encode(ReleaseChannel data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ReleaseChannel data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ReleaseChannel.
|
||||
/// Returns the instance of [ReleaseChannel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class ReleaseChannelTypeTransformer {
|
||||
/// 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.
|
||||
ReleaseChannel? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ReleaseChannel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'stable': return ReleaseChannel.stable;
|
||||
@@ -79,7 +84,7 @@ class ReleaseChannelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ReleaseChannelTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ReleaseChannelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
56
mobile/openapi/lib/model/release_type.dart
generated
56
mobile/openapi/lib/model/release_type.dart
generated
@@ -11,39 +11,34 @@
|
||||
part of openapi.api;
|
||||
|
||||
|
||||
class ReleaseType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ReleaseType._(this.value);
|
||||
enum ReleaseType {
|
||||
major._(r'major'),
|
||||
premajor._(r'premajor'),
|
||||
minor._(r'minor'),
|
||||
preminor._(r'preminor'),
|
||||
patch_._(r'patch'),
|
||||
prepatch._(r'prepatch'),
|
||||
prerelease._(r'prerelease'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ReleaseType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const major = ReleaseType._(r'major');
|
||||
static const premajor = ReleaseType._(r'premajor');
|
||||
static const minor = ReleaseType._(r'minor');
|
||||
static const preminor = ReleaseType._(r'preminor');
|
||||
static const patch_ = ReleaseType._(r'patch');
|
||||
static const prepatch = ReleaseType._(r'prepatch');
|
||||
static const prerelease = ReleaseType._(r'prerelease');
|
||||
|
||||
/// List of all possible values in this [enum][ReleaseType].
|
||||
static const values = <ReleaseType>[
|
||||
major,
|
||||
premajor,
|
||||
minor,
|
||||
preminor,
|
||||
patch_,
|
||||
prepatch,
|
||||
prerelease,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ReleaseType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ReleaseType? fromJson(dynamic value) => ReleaseTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ReleaseType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ReleaseType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ReleaseType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -65,9 +60,11 @@ class ReleaseTypeTypeTransformer {
|
||||
|
||||
const ReleaseTypeTypeTransformer._();
|
||||
|
||||
String encode(ReleaseType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ReleaseType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ReleaseType.
|
||||
/// Returns the instance of [ReleaseType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -76,6 +73,9 @@ class ReleaseTypeTypeTransformer {
|
||||
/// 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.
|
||||
ReleaseType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ReleaseType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'major': return ReleaseType.major;
|
||||
@@ -94,7 +94,7 @@ class ReleaseTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ReleaseTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ReleaseTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/search_suggestion_type.dart
generated
53
mobile/openapi/lib/model/search_suggestion_type.dart
generated
@@ -11,37 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Suggestion type
|
||||
class SearchSuggestionType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const SearchSuggestionType._(this.value);
|
||||
enum SearchSuggestionType {
|
||||
country._(r'country'),
|
||||
state._(r'state'),
|
||||
city._(r'city'),
|
||||
cameraMake._(r'camera-make'),
|
||||
cameraModel._(r'camera-model'),
|
||||
cameraLensModel._(r'camera-lens-model'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const SearchSuggestionType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const country = SearchSuggestionType._(r'country');
|
||||
static const state = SearchSuggestionType._(r'state');
|
||||
static const city = SearchSuggestionType._(r'city');
|
||||
static const cameraMake = SearchSuggestionType._(r'camera-make');
|
||||
static const cameraModel = SearchSuggestionType._(r'camera-model');
|
||||
static const cameraLensModel = SearchSuggestionType._(r'camera-lens-model');
|
||||
|
||||
/// List of all possible values in this [enum][SearchSuggestionType].
|
||||
static const values = <SearchSuggestionType>[
|
||||
country,
|
||||
state,
|
||||
city,
|
||||
cameraMake,
|
||||
cameraModel,
|
||||
cameraLensModel,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [SearchSuggestionType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static SearchSuggestionType? fromJson(dynamic value) => SearchSuggestionTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [SearchSuggestionType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<SearchSuggestionType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SearchSuggestionType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -63,9 +59,11 @@ class SearchSuggestionTypeTypeTransformer {
|
||||
|
||||
const SearchSuggestionTypeTypeTransformer._();
|
||||
|
||||
String encode(SearchSuggestionType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(SearchSuggestionType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a SearchSuggestionType.
|
||||
/// Returns the instance of [SearchSuggestionType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -74,6 +72,9 @@ class SearchSuggestionTypeTypeTransformer {
|
||||
/// 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.
|
||||
SearchSuggestionType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is SearchSuggestionType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'country': return SearchSuggestionType.country;
|
||||
@@ -91,7 +92,7 @@ class SearchSuggestionTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [SearchSuggestionTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static SearchSuggestionTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/shared_link_type.dart
generated
41
mobile/openapi/lib/model/shared_link_type.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Shared link type
|
||||
class SharedLinkType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const SharedLinkType._(this.value);
|
||||
enum SharedLinkType {
|
||||
ALBUM._(r'ALBUM'),
|
||||
INDIVIDUAL._(r'INDIVIDUAL'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const SharedLinkType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const ALBUM = SharedLinkType._(r'ALBUM');
|
||||
static const INDIVIDUAL = SharedLinkType._(r'INDIVIDUAL');
|
||||
|
||||
/// List of all possible values in this [enum][SharedLinkType].
|
||||
static const values = <SharedLinkType>[
|
||||
ALBUM,
|
||||
INDIVIDUAL,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [SharedLinkType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static SharedLinkType? fromJson(dynamic value) => SharedLinkTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [SharedLinkType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<SharedLinkType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SharedLinkType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class SharedLinkTypeTypeTransformer {
|
||||
|
||||
const SharedLinkTypeTypeTransformer._();
|
||||
|
||||
String encode(SharedLinkType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(SharedLinkType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a SharedLinkType.
|
||||
/// Returns the instance of [SharedLinkType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class SharedLinkTypeTypeTransformer {
|
||||
/// 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.
|
||||
SharedLinkType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is SharedLinkType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'ALBUM': return SharedLinkType.ALBUM;
|
||||
@@ -79,7 +84,7 @@ class SharedLinkTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [SharedLinkTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static SharedLinkTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/source_type.dart
generated
44
mobile/openapi/lib/model/source_type.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Face detection source type
|
||||
class SourceType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const SourceType._(this.value);
|
||||
enum SourceType {
|
||||
machineLearning._(r'machine-learning'),
|
||||
exif._(r'exif'),
|
||||
manual._(r'manual'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const SourceType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const machineLearning = SourceType._(r'machine-learning');
|
||||
static const exif = SourceType._(r'exif');
|
||||
static const manual = SourceType._(r'manual');
|
||||
|
||||
/// List of all possible values in this [enum][SourceType].
|
||||
static const values = <SourceType>[
|
||||
machineLearning,
|
||||
exif,
|
||||
manual,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [SourceType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static SourceType? fromJson(dynamic value) => SourceTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [SourceType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<SourceType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SourceType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class SourceTypeTypeTransformer {
|
||||
|
||||
const SourceTypeTypeTransformer._();
|
||||
|
||||
String encode(SourceType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(SourceType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a SourceType.
|
||||
/// Returns the instance of [SourceType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class SourceTypeTypeTransformer {
|
||||
/// 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.
|
||||
SourceType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is SourceType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'machine-learning': return SourceType.machineLearning;
|
||||
@@ -82,7 +86,7 @@ class SourceTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [SourceTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static SourceTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
53
mobile/openapi/lib/model/storage_folder.dart
generated
53
mobile/openapi/lib/model/storage_folder.dart
generated
@@ -11,37 +11,33 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Storage folder
|
||||
class StorageFolder {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const StorageFolder._(this.value);
|
||||
enum StorageFolder {
|
||||
encodedVideo._(r'encoded-video'),
|
||||
library_._(r'library'),
|
||||
upload._(r'upload'),
|
||||
profile._(r'profile'),
|
||||
thumbs._(r'thumbs'),
|
||||
backups._(r'backups'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const StorageFolder._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const encodedVideo = StorageFolder._(r'encoded-video');
|
||||
static const library_ = StorageFolder._(r'library');
|
||||
static const upload = StorageFolder._(r'upload');
|
||||
static const profile = StorageFolder._(r'profile');
|
||||
static const thumbs = StorageFolder._(r'thumbs');
|
||||
static const backups = StorageFolder._(r'backups');
|
||||
|
||||
/// List of all possible values in this [enum][StorageFolder].
|
||||
static const values = <StorageFolder>[
|
||||
encodedVideo,
|
||||
library_,
|
||||
upload,
|
||||
profile,
|
||||
thumbs,
|
||||
backups,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [StorageFolder] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static StorageFolder? fromJson(dynamic value) => StorageFolderTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [StorageFolder]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<StorageFolder> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <StorageFolder>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -63,9 +59,11 @@ class StorageFolderTypeTransformer {
|
||||
|
||||
const StorageFolderTypeTransformer._();
|
||||
|
||||
String encode(StorageFolder data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(StorageFolder data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a StorageFolder.
|
||||
/// Returns the instance of [StorageFolder] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -74,6 +72,9 @@ class StorageFolderTypeTransformer {
|
||||
/// 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.
|
||||
StorageFolder? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is StorageFolder) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'encoded-video': return StorageFolder.encodedVideo;
|
||||
@@ -91,7 +92,7 @@ class StorageFolderTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [StorageFolderTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static StorageFolderTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
212
mobile/openapi/lib/model/sync_entity_type.dart
generated
212
mobile/openapi/lib/model/sync_entity_type.dart
generated
@@ -11,143 +11,86 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Sync entity type
|
||||
class SyncEntityType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const SyncEntityType._(this.value);
|
||||
enum SyncEntityType {
|
||||
authUserV1._(r'AuthUserV1'),
|
||||
userV1._(r'UserV1'),
|
||||
userDeleteV1._(r'UserDeleteV1'),
|
||||
assetV1._(r'AssetV1'),
|
||||
assetV2._(r'AssetV2'),
|
||||
assetDeleteV1._(r'AssetDeleteV1'),
|
||||
assetExifV1._(r'AssetExifV1'),
|
||||
assetEditV1._(r'AssetEditV1'),
|
||||
assetEditDeleteV1._(r'AssetEditDeleteV1'),
|
||||
assetMetadataV1._(r'AssetMetadataV1'),
|
||||
assetMetadataDeleteV1._(r'AssetMetadataDeleteV1'),
|
||||
assetOcrV1._(r'AssetOcrV1'),
|
||||
assetOcrDeleteV1._(r'AssetOcrDeleteV1'),
|
||||
partnerV1._(r'PartnerV1'),
|
||||
partnerDeleteV1._(r'PartnerDeleteV1'),
|
||||
partnerAssetV1._(r'PartnerAssetV1'),
|
||||
partnerAssetV2._(r'PartnerAssetV2'),
|
||||
partnerAssetBackfillV1._(r'PartnerAssetBackfillV1'),
|
||||
partnerAssetBackfillV2._(r'PartnerAssetBackfillV2'),
|
||||
partnerAssetDeleteV1._(r'PartnerAssetDeleteV1'),
|
||||
partnerAssetExifV1._(r'PartnerAssetExifV1'),
|
||||
partnerAssetExifBackfillV1._(r'PartnerAssetExifBackfillV1'),
|
||||
partnerStackBackfillV1._(r'PartnerStackBackfillV1'),
|
||||
partnerStackDeleteV1._(r'PartnerStackDeleteV1'),
|
||||
partnerStackV1._(r'PartnerStackV1'),
|
||||
albumV1._(r'AlbumV1'),
|
||||
albumV2._(r'AlbumV2'),
|
||||
albumDeleteV1._(r'AlbumDeleteV1'),
|
||||
albumUserV1._(r'AlbumUserV1'),
|
||||
albumUserBackfillV1._(r'AlbumUserBackfillV1'),
|
||||
albumUserDeleteV1._(r'AlbumUserDeleteV1'),
|
||||
albumAssetCreateV1._(r'AlbumAssetCreateV1'),
|
||||
albumAssetCreateV2._(r'AlbumAssetCreateV2'),
|
||||
albumAssetUpdateV1._(r'AlbumAssetUpdateV1'),
|
||||
albumAssetUpdateV2._(r'AlbumAssetUpdateV2'),
|
||||
albumAssetBackfillV1._(r'AlbumAssetBackfillV1'),
|
||||
albumAssetBackfillV2._(r'AlbumAssetBackfillV2'),
|
||||
albumAssetExifCreateV1._(r'AlbumAssetExifCreateV1'),
|
||||
albumAssetExifUpdateV1._(r'AlbumAssetExifUpdateV1'),
|
||||
albumAssetExifBackfillV1._(r'AlbumAssetExifBackfillV1'),
|
||||
albumToAssetV1._(r'AlbumToAssetV1'),
|
||||
albumToAssetDeleteV1._(r'AlbumToAssetDeleteV1'),
|
||||
albumToAssetBackfillV1._(r'AlbumToAssetBackfillV1'),
|
||||
memoryV1._(r'MemoryV1'),
|
||||
memoryDeleteV1._(r'MemoryDeleteV1'),
|
||||
memoryToAssetV1._(r'MemoryToAssetV1'),
|
||||
memoryToAssetDeleteV1._(r'MemoryToAssetDeleteV1'),
|
||||
stackV1._(r'StackV1'),
|
||||
stackDeleteV1._(r'StackDeleteV1'),
|
||||
personV1._(r'PersonV1'),
|
||||
personDeleteV1._(r'PersonDeleteV1'),
|
||||
assetFaceV1._(r'AssetFaceV1'),
|
||||
assetFaceV2._(r'AssetFaceV2'),
|
||||
assetFaceDeleteV1._(r'AssetFaceDeleteV1'),
|
||||
userMetadataV1._(r'UserMetadataV1'),
|
||||
userMetadataDeleteV1._(r'UserMetadataDeleteV1'),
|
||||
syncAckV1._(r'SyncAckV1'),
|
||||
syncResetV1._(r'SyncResetV1'),
|
||||
syncCompleteV1._(r'SyncCompleteV1'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const SyncEntityType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const authUserV1 = SyncEntityType._(r'AuthUserV1');
|
||||
static const userV1 = SyncEntityType._(r'UserV1');
|
||||
static const userDeleteV1 = SyncEntityType._(r'UserDeleteV1');
|
||||
static const assetV1 = SyncEntityType._(r'AssetV1');
|
||||
static const assetV2 = SyncEntityType._(r'AssetV2');
|
||||
static const assetDeleteV1 = SyncEntityType._(r'AssetDeleteV1');
|
||||
static const assetExifV1 = SyncEntityType._(r'AssetExifV1');
|
||||
static const assetEditV1 = SyncEntityType._(r'AssetEditV1');
|
||||
static const assetEditDeleteV1 = SyncEntityType._(r'AssetEditDeleteV1');
|
||||
static const assetMetadataV1 = SyncEntityType._(r'AssetMetadataV1');
|
||||
static const assetMetadataDeleteV1 = SyncEntityType._(r'AssetMetadataDeleteV1');
|
||||
static const assetOcrV1 = SyncEntityType._(r'AssetOcrV1');
|
||||
static const assetOcrDeleteV1 = SyncEntityType._(r'AssetOcrDeleteV1');
|
||||
static const partnerV1 = SyncEntityType._(r'PartnerV1');
|
||||
static const partnerDeleteV1 = SyncEntityType._(r'PartnerDeleteV1');
|
||||
static const partnerAssetV1 = SyncEntityType._(r'PartnerAssetV1');
|
||||
static const partnerAssetV2 = SyncEntityType._(r'PartnerAssetV2');
|
||||
static const partnerAssetBackfillV1 = SyncEntityType._(r'PartnerAssetBackfillV1');
|
||||
static const partnerAssetBackfillV2 = SyncEntityType._(r'PartnerAssetBackfillV2');
|
||||
static const partnerAssetDeleteV1 = SyncEntityType._(r'PartnerAssetDeleteV1');
|
||||
static const partnerAssetExifV1 = SyncEntityType._(r'PartnerAssetExifV1');
|
||||
static const partnerAssetExifBackfillV1 = SyncEntityType._(r'PartnerAssetExifBackfillV1');
|
||||
static const partnerStackBackfillV1 = SyncEntityType._(r'PartnerStackBackfillV1');
|
||||
static const partnerStackDeleteV1 = SyncEntityType._(r'PartnerStackDeleteV1');
|
||||
static const partnerStackV1 = SyncEntityType._(r'PartnerStackV1');
|
||||
static const albumV1 = SyncEntityType._(r'AlbumV1');
|
||||
static const albumV2 = SyncEntityType._(r'AlbumV2');
|
||||
static const albumDeleteV1 = SyncEntityType._(r'AlbumDeleteV1');
|
||||
static const albumUserV1 = SyncEntityType._(r'AlbumUserV1');
|
||||
static const albumUserBackfillV1 = SyncEntityType._(r'AlbumUserBackfillV1');
|
||||
static const albumUserDeleteV1 = SyncEntityType._(r'AlbumUserDeleteV1');
|
||||
static const albumAssetCreateV1 = SyncEntityType._(r'AlbumAssetCreateV1');
|
||||
static const albumAssetCreateV2 = SyncEntityType._(r'AlbumAssetCreateV2');
|
||||
static const albumAssetUpdateV1 = SyncEntityType._(r'AlbumAssetUpdateV1');
|
||||
static const albumAssetUpdateV2 = SyncEntityType._(r'AlbumAssetUpdateV2');
|
||||
static const albumAssetBackfillV1 = SyncEntityType._(r'AlbumAssetBackfillV1');
|
||||
static const albumAssetBackfillV2 = SyncEntityType._(r'AlbumAssetBackfillV2');
|
||||
static const albumAssetExifCreateV1 = SyncEntityType._(r'AlbumAssetExifCreateV1');
|
||||
static const albumAssetExifUpdateV1 = SyncEntityType._(r'AlbumAssetExifUpdateV1');
|
||||
static const albumAssetExifBackfillV1 = SyncEntityType._(r'AlbumAssetExifBackfillV1');
|
||||
static const albumToAssetV1 = SyncEntityType._(r'AlbumToAssetV1');
|
||||
static const albumToAssetDeleteV1 = SyncEntityType._(r'AlbumToAssetDeleteV1');
|
||||
static const albumToAssetBackfillV1 = SyncEntityType._(r'AlbumToAssetBackfillV1');
|
||||
static const memoryV1 = SyncEntityType._(r'MemoryV1');
|
||||
static const memoryDeleteV1 = SyncEntityType._(r'MemoryDeleteV1');
|
||||
static const memoryToAssetV1 = SyncEntityType._(r'MemoryToAssetV1');
|
||||
static const memoryToAssetDeleteV1 = SyncEntityType._(r'MemoryToAssetDeleteV1');
|
||||
static const stackV1 = SyncEntityType._(r'StackV1');
|
||||
static const stackDeleteV1 = SyncEntityType._(r'StackDeleteV1');
|
||||
static const personV1 = SyncEntityType._(r'PersonV1');
|
||||
static const personDeleteV1 = SyncEntityType._(r'PersonDeleteV1');
|
||||
static const assetFaceV1 = SyncEntityType._(r'AssetFaceV1');
|
||||
static const assetFaceV2 = SyncEntityType._(r'AssetFaceV2');
|
||||
static const assetFaceDeleteV1 = SyncEntityType._(r'AssetFaceDeleteV1');
|
||||
static const userMetadataV1 = SyncEntityType._(r'UserMetadataV1');
|
||||
static const userMetadataDeleteV1 = SyncEntityType._(r'UserMetadataDeleteV1');
|
||||
static const syncAckV1 = SyncEntityType._(r'SyncAckV1');
|
||||
static const syncResetV1 = SyncEntityType._(r'SyncResetV1');
|
||||
static const syncCompleteV1 = SyncEntityType._(r'SyncCompleteV1');
|
||||
|
||||
/// List of all possible values in this [enum][SyncEntityType].
|
||||
static const values = <SyncEntityType>[
|
||||
authUserV1,
|
||||
userV1,
|
||||
userDeleteV1,
|
||||
assetV1,
|
||||
assetV2,
|
||||
assetDeleteV1,
|
||||
assetExifV1,
|
||||
assetEditV1,
|
||||
assetEditDeleteV1,
|
||||
assetMetadataV1,
|
||||
assetMetadataDeleteV1,
|
||||
assetOcrV1,
|
||||
assetOcrDeleteV1,
|
||||
partnerV1,
|
||||
partnerDeleteV1,
|
||||
partnerAssetV1,
|
||||
partnerAssetV2,
|
||||
partnerAssetBackfillV1,
|
||||
partnerAssetBackfillV2,
|
||||
partnerAssetDeleteV1,
|
||||
partnerAssetExifV1,
|
||||
partnerAssetExifBackfillV1,
|
||||
partnerStackBackfillV1,
|
||||
partnerStackDeleteV1,
|
||||
partnerStackV1,
|
||||
albumV1,
|
||||
albumV2,
|
||||
albumDeleteV1,
|
||||
albumUserV1,
|
||||
albumUserBackfillV1,
|
||||
albumUserDeleteV1,
|
||||
albumAssetCreateV1,
|
||||
albumAssetCreateV2,
|
||||
albumAssetUpdateV1,
|
||||
albumAssetUpdateV2,
|
||||
albumAssetBackfillV1,
|
||||
albumAssetBackfillV2,
|
||||
albumAssetExifCreateV1,
|
||||
albumAssetExifUpdateV1,
|
||||
albumAssetExifBackfillV1,
|
||||
albumToAssetV1,
|
||||
albumToAssetDeleteV1,
|
||||
albumToAssetBackfillV1,
|
||||
memoryV1,
|
||||
memoryDeleteV1,
|
||||
memoryToAssetV1,
|
||||
memoryToAssetDeleteV1,
|
||||
stackV1,
|
||||
stackDeleteV1,
|
||||
personV1,
|
||||
personDeleteV1,
|
||||
assetFaceV1,
|
||||
assetFaceV2,
|
||||
assetFaceDeleteV1,
|
||||
userMetadataV1,
|
||||
userMetadataDeleteV1,
|
||||
syncAckV1,
|
||||
syncResetV1,
|
||||
syncCompleteV1,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [SyncEntityType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static SyncEntityType? fromJson(dynamic value) => SyncEntityTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [SyncEntityType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<SyncEntityType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SyncEntityType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -169,9 +112,11 @@ class SyncEntityTypeTypeTransformer {
|
||||
|
||||
const SyncEntityTypeTypeTransformer._();
|
||||
|
||||
String encode(SyncEntityType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(SyncEntityType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a SyncEntityType.
|
||||
/// Returns the instance of [SyncEntityType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -180,6 +125,9 @@ class SyncEntityTypeTypeTransformer {
|
||||
/// 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.
|
||||
SyncEntityType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is SyncEntityType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AuthUserV1': return SyncEntityType.authUserV1;
|
||||
@@ -250,7 +198,7 @@ class SyncEntityTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [SyncEntityTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static SyncEntityTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
116
mobile/openapi/lib/model/sync_request_type.dart
generated
116
mobile/openapi/lib/model/sync_request_type.dart
generated
@@ -11,79 +11,54 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Sync request type
|
||||
class SyncRequestType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const SyncRequestType._(this.value);
|
||||
enum SyncRequestType {
|
||||
albumsV1._(r'AlbumsV1'),
|
||||
albumsV2._(r'AlbumsV2'),
|
||||
albumUsersV1._(r'AlbumUsersV1'),
|
||||
albumToAssetsV1._(r'AlbumToAssetsV1'),
|
||||
albumAssetsV1._(r'AlbumAssetsV1'),
|
||||
albumAssetsV2._(r'AlbumAssetsV2'),
|
||||
albumAssetExifsV1._(r'AlbumAssetExifsV1'),
|
||||
assetsV1._(r'AssetsV1'),
|
||||
assetsV2._(r'AssetsV2'),
|
||||
assetExifsV1._(r'AssetExifsV1'),
|
||||
assetEditsV1._(r'AssetEditsV1'),
|
||||
assetMetadataV1._(r'AssetMetadataV1'),
|
||||
assetOcrV1._(r'AssetOcrV1'),
|
||||
authUsersV1._(r'AuthUsersV1'),
|
||||
memoriesV1._(r'MemoriesV1'),
|
||||
memoryToAssetsV1._(r'MemoryToAssetsV1'),
|
||||
partnersV1._(r'PartnersV1'),
|
||||
partnerAssetsV1._(r'PartnerAssetsV1'),
|
||||
partnerAssetsV2._(r'PartnerAssetsV2'),
|
||||
partnerAssetExifsV1._(r'PartnerAssetExifsV1'),
|
||||
partnerStacksV1._(r'PartnerStacksV1'),
|
||||
stacksV1._(r'StacksV1'),
|
||||
usersV1._(r'UsersV1'),
|
||||
peopleV1._(r'PeopleV1'),
|
||||
assetFacesV1._(r'AssetFacesV1'),
|
||||
assetFacesV2._(r'AssetFacesV2'),
|
||||
userMetadataV1._(r'UserMetadataV1'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const SyncRequestType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const albumsV1 = SyncRequestType._(r'AlbumsV1');
|
||||
static const albumsV2 = SyncRequestType._(r'AlbumsV2');
|
||||
static const albumUsersV1 = SyncRequestType._(r'AlbumUsersV1');
|
||||
static const albumToAssetsV1 = SyncRequestType._(r'AlbumToAssetsV1');
|
||||
static const albumAssetsV1 = SyncRequestType._(r'AlbumAssetsV1');
|
||||
static const albumAssetsV2 = SyncRequestType._(r'AlbumAssetsV2');
|
||||
static const albumAssetExifsV1 = SyncRequestType._(r'AlbumAssetExifsV1');
|
||||
static const assetsV1 = SyncRequestType._(r'AssetsV1');
|
||||
static const assetsV2 = SyncRequestType._(r'AssetsV2');
|
||||
static const assetExifsV1 = SyncRequestType._(r'AssetExifsV1');
|
||||
static const assetEditsV1 = SyncRequestType._(r'AssetEditsV1');
|
||||
static const assetMetadataV1 = SyncRequestType._(r'AssetMetadataV1');
|
||||
static const assetOcrV1 = SyncRequestType._(r'AssetOcrV1');
|
||||
static const authUsersV1 = SyncRequestType._(r'AuthUsersV1');
|
||||
static const memoriesV1 = SyncRequestType._(r'MemoriesV1');
|
||||
static const memoryToAssetsV1 = SyncRequestType._(r'MemoryToAssetsV1');
|
||||
static const partnersV1 = SyncRequestType._(r'PartnersV1');
|
||||
static const partnerAssetsV1 = SyncRequestType._(r'PartnerAssetsV1');
|
||||
static const partnerAssetsV2 = SyncRequestType._(r'PartnerAssetsV2');
|
||||
static const partnerAssetExifsV1 = SyncRequestType._(r'PartnerAssetExifsV1');
|
||||
static const partnerStacksV1 = SyncRequestType._(r'PartnerStacksV1');
|
||||
static const stacksV1 = SyncRequestType._(r'StacksV1');
|
||||
static const usersV1 = SyncRequestType._(r'UsersV1');
|
||||
static const peopleV1 = SyncRequestType._(r'PeopleV1');
|
||||
static const assetFacesV1 = SyncRequestType._(r'AssetFacesV1');
|
||||
static const assetFacesV2 = SyncRequestType._(r'AssetFacesV2');
|
||||
static const userMetadataV1 = SyncRequestType._(r'UserMetadataV1');
|
||||
|
||||
/// List of all possible values in this [enum][SyncRequestType].
|
||||
static const values = <SyncRequestType>[
|
||||
albumsV1,
|
||||
albumsV2,
|
||||
albumUsersV1,
|
||||
albumToAssetsV1,
|
||||
albumAssetsV1,
|
||||
albumAssetsV2,
|
||||
albumAssetExifsV1,
|
||||
assetsV1,
|
||||
assetsV2,
|
||||
assetExifsV1,
|
||||
assetEditsV1,
|
||||
assetMetadataV1,
|
||||
assetOcrV1,
|
||||
authUsersV1,
|
||||
memoriesV1,
|
||||
memoryToAssetsV1,
|
||||
partnersV1,
|
||||
partnerAssetsV1,
|
||||
partnerAssetsV2,
|
||||
partnerAssetExifsV1,
|
||||
partnerStacksV1,
|
||||
stacksV1,
|
||||
usersV1,
|
||||
peopleV1,
|
||||
assetFacesV1,
|
||||
assetFacesV2,
|
||||
userMetadataV1,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [SyncRequestType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static SyncRequestType? fromJson(dynamic value) => SyncRequestTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [SyncRequestType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<SyncRequestType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SyncRequestType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -105,9 +80,11 @@ class SyncRequestTypeTypeTransformer {
|
||||
|
||||
const SyncRequestTypeTypeTransformer._();
|
||||
|
||||
String encode(SyncRequestType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(SyncRequestType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a SyncRequestType.
|
||||
/// Returns the instance of [SyncRequestType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -116,6 +93,9 @@ class SyncRequestTypeTypeTransformer {
|
||||
/// 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.
|
||||
SyncRequestType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is SyncRequestType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AlbumsV1': return SyncRequestType.albumsV1;
|
||||
@@ -154,7 +134,7 @@ class SyncRequestTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [SyncRequestTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static SyncRequestTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,16 +35,16 @@ class TimeBucketAssetResponseDto {
|
||||
});
|
||||
|
||||
/// Array of city names extracted from EXIF GPS data
|
||||
Optional<List<String>?> city;
|
||||
Optional<List<String?>?> city;
|
||||
|
||||
/// Array of country names extracted from EXIF GPS data
|
||||
Optional<List<String>?> country;
|
||||
Optional<List<String?>?> country;
|
||||
|
||||
/// Array of UTC timestamps when each asset was originally uploaded to Immich
|
||||
List<String> createdAt;
|
||||
|
||||
/// Array of video/gif durations in milliseconds (null for static images)
|
||||
List<int> duration;
|
||||
List<int?> duration;
|
||||
|
||||
/// Array of file creation timestamps in UTC
|
||||
List<String> fileCreatedAt;
|
||||
@@ -62,22 +62,22 @@ class TimeBucketAssetResponseDto {
|
||||
List<bool> isTrashed;
|
||||
|
||||
/// Array of latitude coordinates extracted from EXIF GPS data
|
||||
Optional<List<num>?> latitude;
|
||||
Optional<List<num?>?> latitude;
|
||||
|
||||
/// Array of live photo video asset IDs (null for non-live photos)
|
||||
List<String> livePhotoVideoId;
|
||||
List<String?> livePhotoVideoId;
|
||||
|
||||
/// Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective.
|
||||
List<num> localOffsetHours;
|
||||
|
||||
/// Array of longitude coordinates extracted from EXIF GPS data
|
||||
Optional<List<num>?> longitude;
|
||||
Optional<List<num?>?> longitude;
|
||||
|
||||
/// Array of owner IDs for each asset
|
||||
List<String> ownerId;
|
||||
|
||||
/// Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\")
|
||||
List<String> projectionType;
|
||||
List<String?> projectionType;
|
||||
|
||||
/// Array of aspect ratios (width/height) for each asset
|
||||
List<num> ratio;
|
||||
@@ -86,7 +86,7 @@ class TimeBucketAssetResponseDto {
|
||||
Optional<List<List<String>?>?> stack;
|
||||
|
||||
/// Array of BlurHash strings for generating asset previews (base64 encoded)
|
||||
List<String> thumbhash;
|
||||
List<String?> thumbhash;
|
||||
|
||||
/// Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED)
|
||||
List<AssetVisibility> visibility;
|
||||
|
||||
47
mobile/openapi/lib/model/tone_mapping.dart
generated
47
mobile/openapi/lib/model/tone_mapping.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Tone mapping
|
||||
class ToneMapping {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const ToneMapping._(this.value);
|
||||
enum ToneMapping {
|
||||
hable._(r'hable'),
|
||||
mobius._(r'mobius'),
|
||||
reinhard._(r'reinhard'),
|
||||
disabled._(r'disabled'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const ToneMapping._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const hable = ToneMapping._(r'hable');
|
||||
static const mobius = ToneMapping._(r'mobius');
|
||||
static const reinhard = ToneMapping._(r'reinhard');
|
||||
static const disabled = ToneMapping._(r'disabled');
|
||||
|
||||
/// List of all possible values in this [enum][ToneMapping].
|
||||
static const values = <ToneMapping>[
|
||||
hable,
|
||||
mobius,
|
||||
reinhard,
|
||||
disabled,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [ToneMapping] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static ToneMapping? fromJson(dynamic value) => ToneMappingTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [ToneMapping]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<ToneMapping> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <ToneMapping>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class ToneMappingTypeTransformer {
|
||||
|
||||
const ToneMappingTypeTransformer._();
|
||||
|
||||
String encode(ToneMapping data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(ToneMapping data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a ToneMapping.
|
||||
/// Returns the instance of [ToneMapping] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class ToneMappingTypeTransformer {
|
||||
/// 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.
|
||||
ToneMapping? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is ToneMapping) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'hable': return ToneMapping.hable;
|
||||
@@ -85,7 +88,7 @@ class ToneMappingTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [ToneMappingTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static ToneMappingTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/transcode_hw_accel.dart
generated
50
mobile/openapi/lib/model/transcode_hw_accel.dart
generated
@@ -11,35 +11,32 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Transcode hardware acceleration
|
||||
class TranscodeHWAccel {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const TranscodeHWAccel._(this.value);
|
||||
enum TranscodeHWAccel {
|
||||
nvenc._(r'nvenc'),
|
||||
qsv._(r'qsv'),
|
||||
vaapi._(r'vaapi'),
|
||||
rkmpp._(r'rkmpp'),
|
||||
disabled._(r'disabled'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const TranscodeHWAccel._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const nvenc = TranscodeHWAccel._(r'nvenc');
|
||||
static const qsv = TranscodeHWAccel._(r'qsv');
|
||||
static const vaapi = TranscodeHWAccel._(r'vaapi');
|
||||
static const rkmpp = TranscodeHWAccel._(r'rkmpp');
|
||||
static const disabled = TranscodeHWAccel._(r'disabled');
|
||||
|
||||
/// List of all possible values in this [enum][TranscodeHWAccel].
|
||||
static const values = <TranscodeHWAccel>[
|
||||
nvenc,
|
||||
qsv,
|
||||
vaapi,
|
||||
rkmpp,
|
||||
disabled,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [TranscodeHWAccel] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static TranscodeHWAccel? fromJson(dynamic value) => TranscodeHWAccelTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [TranscodeHWAccel]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<TranscodeHWAccel> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TranscodeHWAccel>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -61,9 +58,11 @@ class TranscodeHWAccelTypeTransformer {
|
||||
|
||||
const TranscodeHWAccelTypeTransformer._();
|
||||
|
||||
String encode(TranscodeHWAccel data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(TranscodeHWAccel data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a TranscodeHWAccel.
|
||||
/// Returns the instance of [TranscodeHWAccel] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -72,6 +71,9 @@ class TranscodeHWAccelTypeTransformer {
|
||||
/// 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.
|
||||
TranscodeHWAccel? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is TranscodeHWAccel) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'nvenc': return TranscodeHWAccel.nvenc;
|
||||
@@ -88,7 +90,7 @@ class TranscodeHWAccelTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [TranscodeHWAccelTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static TranscodeHWAccelTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
50
mobile/openapi/lib/model/transcode_policy.dart
generated
50
mobile/openapi/lib/model/transcode_policy.dart
generated
@@ -11,35 +11,32 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Transcode policy
|
||||
class TranscodePolicy {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const TranscodePolicy._(this.value);
|
||||
enum TranscodePolicy {
|
||||
all._(r'all'),
|
||||
optimal._(r'optimal'),
|
||||
bitrate._(r'bitrate'),
|
||||
required_._(r'required'),
|
||||
disabled._(r'disabled'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const TranscodePolicy._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const all = TranscodePolicy._(r'all');
|
||||
static const optimal = TranscodePolicy._(r'optimal');
|
||||
static const bitrate = TranscodePolicy._(r'bitrate');
|
||||
static const required_ = TranscodePolicy._(r'required');
|
||||
static const disabled = TranscodePolicy._(r'disabled');
|
||||
|
||||
/// List of all possible values in this [enum][TranscodePolicy].
|
||||
static const values = <TranscodePolicy>[
|
||||
all,
|
||||
optimal,
|
||||
bitrate,
|
||||
required_,
|
||||
disabled,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [TranscodePolicy] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static TranscodePolicy? fromJson(dynamic value) => TranscodePolicyTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [TranscodePolicy]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<TranscodePolicy> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <TranscodePolicy>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -61,9 +58,11 @@ class TranscodePolicyTypeTransformer {
|
||||
|
||||
const TranscodePolicyTypeTransformer._();
|
||||
|
||||
String encode(TranscodePolicy data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(TranscodePolicy data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a TranscodePolicy.
|
||||
/// Returns the instance of [TranscodePolicy] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -72,6 +71,9 @@ class TranscodePolicyTypeTransformer {
|
||||
/// 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.
|
||||
TranscodePolicy? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is TranscodePolicy) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'all': return TranscodePolicy.all;
|
||||
@@ -88,7 +90,7 @@ class TranscodePolicyTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [TranscodePolicyTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static TranscodePolicyTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
65
mobile/openapi/lib/model/user_avatar_color.dart
generated
65
mobile/openapi/lib/model/user_avatar_color.dart
generated
@@ -11,45 +11,37 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// User avatar color
|
||||
class UserAvatarColor {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const UserAvatarColor._(this.value);
|
||||
enum UserAvatarColor {
|
||||
primary._(r'primary'),
|
||||
pink._(r'pink'),
|
||||
red._(r'red'),
|
||||
yellow._(r'yellow'),
|
||||
blue._(r'blue'),
|
||||
green._(r'green'),
|
||||
purple._(r'purple'),
|
||||
orange._(r'orange'),
|
||||
gray._(r'gray'),
|
||||
amber._(r'amber'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const UserAvatarColor._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const primary = UserAvatarColor._(r'primary');
|
||||
static const pink = UserAvatarColor._(r'pink');
|
||||
static const red = UserAvatarColor._(r'red');
|
||||
static const yellow = UserAvatarColor._(r'yellow');
|
||||
static const blue = UserAvatarColor._(r'blue');
|
||||
static const green = UserAvatarColor._(r'green');
|
||||
static const purple = UserAvatarColor._(r'purple');
|
||||
static const orange = UserAvatarColor._(r'orange');
|
||||
static const gray = UserAvatarColor._(r'gray');
|
||||
static const amber = UserAvatarColor._(r'amber');
|
||||
|
||||
/// List of all possible values in this [enum][UserAvatarColor].
|
||||
static const values = <UserAvatarColor>[
|
||||
primary,
|
||||
pink,
|
||||
red,
|
||||
yellow,
|
||||
blue,
|
||||
green,
|
||||
purple,
|
||||
orange,
|
||||
gray,
|
||||
amber,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [UserAvatarColor] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static UserAvatarColor? fromJson(dynamic value) => UserAvatarColorTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [UserAvatarColor]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<UserAvatarColor> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UserAvatarColor>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -71,9 +63,11 @@ class UserAvatarColorTypeTransformer {
|
||||
|
||||
const UserAvatarColorTypeTransformer._();
|
||||
|
||||
String encode(UserAvatarColor data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(UserAvatarColor data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a UserAvatarColor.
|
||||
/// Returns the instance of [UserAvatarColor] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -82,6 +76,9 @@ class UserAvatarColorTypeTransformer {
|
||||
/// 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.
|
||||
UserAvatarColor? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is UserAvatarColor) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'primary': return UserAvatarColor.primary;
|
||||
@@ -103,7 +100,7 @@ class UserAvatarColorTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [UserAvatarColorTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static UserAvatarColorTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/user_metadata_key.dart
generated
44
mobile/openapi/lib/model/user_metadata_key.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// User metadata key
|
||||
class UserMetadataKey {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const UserMetadataKey._(this.value);
|
||||
enum UserMetadataKey {
|
||||
preferences._(r'preferences'),
|
||||
license._(r'license'),
|
||||
onboarding._(r'onboarding'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const UserMetadataKey._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const preferences = UserMetadataKey._(r'preferences');
|
||||
static const license = UserMetadataKey._(r'license');
|
||||
static const onboarding = UserMetadataKey._(r'onboarding');
|
||||
|
||||
/// List of all possible values in this [enum][UserMetadataKey].
|
||||
static const values = <UserMetadataKey>[
|
||||
preferences,
|
||||
license,
|
||||
onboarding,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [UserMetadataKey] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static UserMetadataKey? fromJson(dynamic value) => UserMetadataKeyTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [UserMetadataKey]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<UserMetadataKey> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UserMetadataKey>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class UserMetadataKeyTypeTransformer {
|
||||
|
||||
const UserMetadataKeyTypeTransformer._();
|
||||
|
||||
String encode(UserMetadataKey data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(UserMetadataKey data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a UserMetadataKey.
|
||||
/// Returns the instance of [UserMetadataKey] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class UserMetadataKeyTypeTransformer {
|
||||
/// 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.
|
||||
UserMetadataKey? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is UserMetadataKey) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'preferences': return UserMetadataKey.preferences;
|
||||
@@ -82,7 +86,7 @@ class UserMetadataKeyTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [UserMetadataKeyTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static UserMetadataKeyTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
44
mobile/openapi/lib/model/user_status.dart
generated
44
mobile/openapi/lib/model/user_status.dart
generated
@@ -11,31 +11,30 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// User status
|
||||
class UserStatus {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const UserStatus._(this.value);
|
||||
enum UserStatus {
|
||||
active._(r'active'),
|
||||
removing._(r'removing'),
|
||||
deleted._(r'deleted'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const UserStatus._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const active = UserStatus._(r'active');
|
||||
static const removing = UserStatus._(r'removing');
|
||||
static const deleted = UserStatus._(r'deleted');
|
||||
|
||||
/// List of all possible values in this [enum][UserStatus].
|
||||
static const values = <UserStatus>[
|
||||
active,
|
||||
removing,
|
||||
deleted,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [UserStatus] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static UserStatus? fromJson(dynamic value) => UserStatusTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [UserStatus]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<UserStatus> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UserStatus>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -57,9 +56,11 @@ class UserStatusTypeTransformer {
|
||||
|
||||
const UserStatusTypeTransformer._();
|
||||
|
||||
String encode(UserStatus data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(UserStatus data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a UserStatus.
|
||||
/// Returns the instance of [UserStatus] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -68,6 +69,9 @@ class UserStatusTypeTransformer {
|
||||
/// 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.
|
||||
UserStatus? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is UserStatus) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'active': return UserStatus.active;
|
||||
@@ -82,7 +86,7 @@ class UserStatusTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [UserStatusTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static UserStatusTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/video_codec.dart
generated
47
mobile/openapi/lib/model/video_codec.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Target video codec
|
||||
class VideoCodec {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const VideoCodec._(this.value);
|
||||
enum VideoCodec {
|
||||
h264._(r'h264'),
|
||||
hevc._(r'hevc'),
|
||||
vp9._(r'vp9'),
|
||||
av1._(r'av1'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const VideoCodec._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const h264 = VideoCodec._(r'h264');
|
||||
static const hevc = VideoCodec._(r'hevc');
|
||||
static const vp9 = VideoCodec._(r'vp9');
|
||||
static const av1 = VideoCodec._(r'av1');
|
||||
|
||||
/// List of all possible values in this [enum][VideoCodec].
|
||||
static const values = <VideoCodec>[
|
||||
h264,
|
||||
hevc,
|
||||
vp9,
|
||||
av1,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [VideoCodec] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static VideoCodec? fromJson(dynamic value) => VideoCodecTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [VideoCodec]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<VideoCodec> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <VideoCodec>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class VideoCodecTypeTransformer {
|
||||
|
||||
const VideoCodecTypeTransformer._();
|
||||
|
||||
String encode(VideoCodec data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(VideoCodec data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a VideoCodec.
|
||||
/// Returns the instance of [VideoCodec] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class VideoCodecTypeTransformer {
|
||||
/// 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.
|
||||
VideoCodec? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is VideoCodec) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'h264': return VideoCodec.h264;
|
||||
@@ -85,7 +88,7 @@ class VideoCodecTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [VideoCodecTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static VideoCodecTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
47
mobile/openapi/lib/model/video_container.dart
generated
47
mobile/openapi/lib/model/video_container.dart
generated
@@ -11,33 +11,31 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Accepted video containers
|
||||
class VideoContainer {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const VideoContainer._(this.value);
|
||||
enum VideoContainer {
|
||||
mov._(r'mov'),
|
||||
mp4._(r'mp4'),
|
||||
ogg._(r'ogg'),
|
||||
webm._(r'webm'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const VideoContainer._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const mov = VideoContainer._(r'mov');
|
||||
static const mp4 = VideoContainer._(r'mp4');
|
||||
static const ogg = VideoContainer._(r'ogg');
|
||||
static const webm = VideoContainer._(r'webm');
|
||||
|
||||
/// List of all possible values in this [enum][VideoContainer].
|
||||
static const values = <VideoContainer>[
|
||||
mov,
|
||||
mp4,
|
||||
ogg,
|
||||
webm,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [VideoContainer] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static VideoContainer? fromJson(dynamic value) => VideoContainerTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [VideoContainer]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<VideoContainer> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <VideoContainer>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -59,9 +57,11 @@ class VideoContainerTypeTransformer {
|
||||
|
||||
const VideoContainerTypeTransformer._();
|
||||
|
||||
String encode(VideoContainer data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(VideoContainer data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a VideoContainer.
|
||||
/// Returns the instance of [VideoContainer] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -70,6 +70,9 @@ class VideoContainerTypeTransformer {
|
||||
/// 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.
|
||||
VideoContainer? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is VideoContainer) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'mov': return VideoContainer.mov;
|
||||
@@ -85,7 +88,7 @@ class VideoContainerTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [VideoContainerTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static VideoContainerTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
41
mobile/openapi/lib/model/workflow_trigger.dart
generated
41
mobile/openapi/lib/model/workflow_trigger.dart
generated
@@ -11,29 +11,29 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Plugin trigger type
|
||||
class WorkflowTrigger {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const WorkflowTrigger._(this.value);
|
||||
enum WorkflowTrigger {
|
||||
assetCreate._(r'AssetCreate'),
|
||||
assetMetadataExtraction._(r'AssetMetadataExtraction'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const WorkflowTrigger._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const assetCreate = WorkflowTrigger._(r'AssetCreate');
|
||||
static const assetMetadataExtraction = WorkflowTrigger._(r'AssetMetadataExtraction');
|
||||
|
||||
/// List of all possible values in this [enum][WorkflowTrigger].
|
||||
static const values = <WorkflowTrigger>[
|
||||
assetCreate,
|
||||
assetMetadataExtraction,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [WorkflowTrigger] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static WorkflowTrigger? fromJson(dynamic value) => WorkflowTriggerTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [WorkflowTrigger]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<WorkflowTrigger> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <WorkflowTrigger>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -55,9 +55,11 @@ class WorkflowTriggerTypeTransformer {
|
||||
|
||||
const WorkflowTriggerTypeTransformer._();
|
||||
|
||||
String encode(WorkflowTrigger data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(WorkflowTrigger data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a WorkflowTrigger.
|
||||
/// Returns the instance of [WorkflowTrigger] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -66,6 +68,9 @@ class WorkflowTriggerTypeTransformer {
|
||||
/// 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.
|
||||
WorkflowTrigger? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is WorkflowTrigger) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AssetCreate': return WorkflowTrigger.assetCreate;
|
||||
@@ -79,7 +84,7 @@ class WorkflowTriggerTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [WorkflowTriggerTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static WorkflowTriggerTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
38
mobile/openapi/lib/model/workflow_type.dart
generated
38
mobile/openapi/lib/model/workflow_type.dart
generated
@@ -11,27 +11,28 @@
|
||||
part of openapi.api;
|
||||
|
||||
/// Workflow type
|
||||
class WorkflowType {
|
||||
/// Instantiate a new enum with the provided [value].
|
||||
const WorkflowType._(this.value);
|
||||
enum WorkflowType {
|
||||
assetV1._(r'AssetV1'),
|
||||
;
|
||||
|
||||
/// Instantiate a new enum with the provided value.
|
||||
const WorkflowType._(this._value);
|
||||
|
||||
/// The underlying value of this enum member.
|
||||
final String value;
|
||||
final String _value;
|
||||
|
||||
@override
|
||||
String toString() => value;
|
||||
String toString() => _value;
|
||||
|
||||
String toJson() => value;
|
||||
|
||||
static const assetV1 = WorkflowType._(r'AssetV1');
|
||||
|
||||
/// List of all possible values in this [enum][WorkflowType].
|
||||
static const values = <WorkflowType>[
|
||||
assetV1,
|
||||
];
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String toJson() => _value;
|
||||
|
||||
/// Returns the instance of [WorkflowType] that was successfully decoded
|
||||
/// from the passed [value] on success, null otherwise.
|
||||
static WorkflowType? fromJson(dynamic value) => WorkflowTypeTypeTransformer().decode(value);
|
||||
|
||||
/// Returns a [List] containing instances of [WorkflowType]
|
||||
/// that were successfully decoded from the passed [JSON][json].
|
||||
static List<WorkflowType> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <WorkflowType>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
@@ -53,9 +54,11 @@ class WorkflowTypeTypeTransformer {
|
||||
|
||||
const WorkflowTypeTypeTransformer._();
|
||||
|
||||
String encode(WorkflowType data) => data.value;
|
||||
/// Encodes this enum as a value suitable for JSON.
|
||||
String encode(WorkflowType data) => data._value;
|
||||
|
||||
/// Decodes a [dynamic value][data] to a WorkflowType.
|
||||
/// Returns the instance of [WorkflowType] that was successfully decoded
|
||||
/// from the passed [data] value on success, null otherwise.
|
||||
///
|
||||
/// 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]
|
||||
@@ -64,6 +67,9 @@ class WorkflowTypeTypeTransformer {
|
||||
/// 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.
|
||||
WorkflowType? decode(dynamic data, {bool allowNull = true}) {
|
||||
if (data is WorkflowType) {
|
||||
return data;
|
||||
}
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'AssetV1': return WorkflowType.assetV1;
|
||||
@@ -76,7 +82,7 @@ class WorkflowTypeTypeTransformer {
|
||||
return null;
|
||||
}
|
||||
|
||||
/// Singleton [WorkflowTypeTypeTransformer] instance.
|
||||
/// The singleton instance of this transformer.
|
||||
static WorkflowTypeTypeTransformer? _instance;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ version: '1.0.0'
|
||||
description: 'OpenAPI API client'
|
||||
homepage: 'homepage'
|
||||
environment:
|
||||
sdk: '>=2.12.0 <4.0.0'
|
||||
sdk: '>=2.17.0 <4.0.0'
|
||||
dependencies:
|
||||
collection: '>=1.17.0 <2.0.0'
|
||||
http: '>=0.13.0 <2.0.0'
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/native.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:immich_mobile/constants/enums.dart';
|
||||
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
||||
import 'package:immich_mobile/domain/models/settings_key.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
|
||||
import 'package:immich_mobile/infrastructure/repositories/settings.repository.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/action_buttons/base_action_button.widget.dart';
|
||||
import 'package:immich_mobile/presentation/widgets/action_buttons/share_action_button.widget.dart';
|
||||
import 'package:immich_mobile/providers/asset_viewer/asset_viewer.provider.dart';
|
||||
import 'package:immich_mobile/providers/infrastructure/action.provider.dart';
|
||||
|
||||
import '../../factories/remote_asset_factory.dart';
|
||||
import '../presentation_context.dart';
|
||||
|
||||
class _RecordingActionNotifier extends ActionNotifier {
|
||||
final List<ShareAssetType> sharedFileTypes = [];
|
||||
|
||||
@override
|
||||
void build() {}
|
||||
|
||||
@override
|
||||
Future<ActionResult> shareAssets(
|
||||
ActionSource source,
|
||||
BuildContext context, {
|
||||
ShareAssetType fileType = ShareAssetType.original,
|
||||
Completer<void>? cancelCompleter,
|
||||
void Function(double progress)? onAssetDownloadProgress,
|
||||
}) async {
|
||||
sharedFileTypes.add(fileType);
|
||||
return const ActionResult(count: 1, success: true);
|
||||
}
|
||||
}
|
||||
|
||||
class _FakeAssetViewerNotifier extends AssetViewerStateNotifier {
|
||||
final BaseAsset asset;
|
||||
|
||||
_FakeAssetViewerNotifier(this.asset);
|
||||
|
||||
@override
|
||||
AssetViewerState build() => AssetViewerState(currentAsset: asset);
|
||||
}
|
||||
|
||||
void main() {
|
||||
late PresentationContext context;
|
||||
late _RecordingActionNotifier actionNotifier;
|
||||
|
||||
setUpAll(() async {
|
||||
final db = Drift(DatabaseConnection(NativeDatabase.memory(), closeStreamsSynchronously: true));
|
||||
await SettingsRepository.ensureInitialized(db);
|
||||
});
|
||||
|
||||
setUp(() async {
|
||||
context = await PresentationContext.create();
|
||||
actionNotifier = _RecordingActionNotifier();
|
||||
await SettingsRepository.instance.clear([SettingsKey.shareFileType]);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
context.dispose();
|
||||
});
|
||||
|
||||
Future<void> pumpShareButton(WidgetTester tester) async {
|
||||
final asset = RemoteAssetFactory.create(ownerId: context.currentUser.id);
|
||||
await tester.pumpTestWidget(
|
||||
context,
|
||||
const ShareActionButton(source: ActionSource.viewer),
|
||||
overrides: [
|
||||
actionProvider.overrideWith(() => actionNotifier),
|
||||
assetViewerProvider.overrideWith(() => _FakeAssetViewerNotifier(asset)),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> longPressAndPickPreview(WidgetTester tester) async {
|
||||
await tester.longPress(find.byType(BaseActionButton));
|
||||
await tester.pumpAndSettle();
|
||||
await tester.tap(find.byIcon(Icons.photo_size_select_large_rounded));
|
||||
await tester.pumpAndSettle();
|
||||
}
|
||||
|
||||
group('ShareActionButton', () {
|
||||
testWidgets('single press shares with the configured default quality', (tester) async {
|
||||
await pumpShareButton(tester);
|
||||
|
||||
await tester.tap(find.byType(BaseActionButton));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(actionNotifier.sharedFileTypes, [ShareAssetType.original]);
|
||||
});
|
||||
|
||||
testWidgets('long press shares with the quality picked in the dialog', (tester) async {
|
||||
await pumpShareButton(tester);
|
||||
|
||||
await longPressAndPickPreview(tester);
|
||||
|
||||
expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview]);
|
||||
});
|
||||
|
||||
testWidgets('quality picked on long press is a one-time choice and does not change the default', (tester) async {
|
||||
await pumpShareButton(tester);
|
||||
|
||||
await longPressAndPickPreview(tester);
|
||||
expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview]);
|
||||
|
||||
await tester.tap(find.byType(BaseActionButton));
|
||||
await tester.pumpAndSettle();
|
||||
|
||||
expect(actionNotifier.sharedFileTypes, [ShareAssetType.preview, ShareAssetType.original]);
|
||||
expect(SettingsRepository.instance.appConfig.share.fileType, ShareAssetType.original);
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
OPENAPI_GENERATOR_VERSION=v7.22.0
|
||||
OPENAPI_GENERATOR_VERSION=v7.24.0
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
@@ -23,7 +23,6 @@ patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api.dart <./patch/api.dart.patch
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/model/asset_edit_action_item_dto.dart <./patch/asset_edit_action_item_dto.dart.patch
|
||||
patch --no-backup-if-mismatch -u ../mobile/openapi/lib/model/time_bucket_asset_response_dto.dart <./patch/time_bucket_asset_response_dto.dart.patch
|
||||
# Don't include analysis_options.yaml for the generated openapi files
|
||||
# so that language servers can properly exclude the mobile/openapi directory
|
||||
rm ../mobile/openapi/analysis_options.yaml
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
|
||||
"spaces": 2,
|
||||
"generator-cli": {
|
||||
"version": "7.22.0"
|
||||
"version": "7.24.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,96 +1,30 @@
|
||||
@@ -13,7 +13,7 @@
|
||||
class ApiClient {
|
||||
ApiClient({this.basePath = '/api', this.authentication,});
|
||||
|
||||
|
||||
- final String basePath;
|
||||
+ String basePath;
|
||||
final Authentication? authentication;
|
||||
|
||||
|
||||
var _client = Client();
|
||||
@@ -44,8 +44,9 @@
|
||||
Object? body,
|
||||
Map<String, String> headerParams,
|
||||
Map<String, String> formParams,
|
||||
- String? contentType,
|
||||
- ) async {
|
||||
+ String? contentType, {
|
||||
+ Future<void>? abortTrigger,
|
||||
+ }) async {
|
||||
await authentication?.applyToParams(queryParams, headerParams);
|
||||
|
||||
headerParams.addAll(_defaultHeaderMap);
|
||||
@@ -63,7 +64,7 @@
|
||||
body is MultipartFile && (contentType == null ||
|
||||
!contentType.toLowerCase().startsWith('multipart/form-data'))
|
||||
) {
|
||||
- final request = StreamedRequest(method, uri);
|
||||
+ final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger);
|
||||
request.headers.addAll(headerParams);
|
||||
request.contentLength = body.length;
|
||||
body.finalize().listen(
|
||||
@@ -78,7 +79,7 @@
|
||||
}
|
||||
|
||||
if (body is MultipartRequest) {
|
||||
- final request = MultipartRequest(method, uri);
|
||||
+ final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger);
|
||||
request.fields.addAll(body.fields);
|
||||
request.files.addAll(body.files);
|
||||
request.headers.addAll(body.headers);
|
||||
@@ -92,14 +93,19 @@
|
||||
: await serializeAsync(body);
|
||||
final nullableHeaderParams = headerParams.isEmpty ? null : headerParams;
|
||||
|
||||
- switch(method) {
|
||||
- case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,);
|
||||
- case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,);
|
||||
- case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,);
|
||||
- case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,);
|
||||
- case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,);
|
||||
- case 'GET': return await _client.get(uri, headers: nullableHeaderParams,);
|
||||
+ final request = AbortableRequest(method, uri, abortTrigger: abortTrigger);
|
||||
+ if (nullableHeaderParams != null) {
|
||||
+ request.headers.addAll(nullableHeaderParams);
|
||||
}
|
||||
+ if (msgBody is String) {
|
||||
+ request.body = msgBody;
|
||||
+ } else if (msgBody is List<int>) {
|
||||
+ request.bodyBytes = msgBody;
|
||||
+ } else if (msgBody is Map<String, String>) {
|
||||
+ request.bodyFields = msgBody;
|
||||
+ }
|
||||
+ final response = await _client.send(request);
|
||||
+ return Response.fromStream(response);
|
||||
} on SocketException catch (error, trace) {
|
||||
throw ApiException.withInner(
|
||||
HttpStatus.badRequest,
|
||||
@@ -136,26 +146,21 @@
|
||||
trace,
|
||||
);
|
||||
}
|
||||
-
|
||||
- throw ApiException(
|
||||
- HttpStatus.badRequest,
|
||||
- 'Invalid HTTP operation: $method $path',
|
||||
- );
|
||||
@@ -143,19 +143,19 @@
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
- Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) async =>
|
||||
+ Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) =>
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
deserialize(value, targetType, growable: growable);
|
||||
|
||||
|
||||
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
|
||||
- dynamic deserialize(String value, String targetType, {bool growable = false,}) {
|
||||
+ Future<dynamic> deserialize(String value, String targetType, {bool growable = false,}) async {
|
||||
// Remove all spaces. Necessary for regular expressions as well.
|
||||
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
|
||||
|
||||
|
||||
// If the expected target type is String, nothing to do...
|
||||
return targetType == 'String'
|
||||
? value
|
||||
- : fromJson(json.decode(value), targetType, growable: growable);
|
||||
+ : fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable);
|
||||
}
|
||||
|
||||
// ignore: deprecated_member_use_from_same_package
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
@@ -83,7 +83,7 @@
|
||||
List<num> ratio;
|
||||
|
||||
/// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets)
|
||||
- Optional<List<List<String>>?> stack;
|
||||
+ Optional<List<List<String>?>?> stack;
|
||||
|
||||
/// Array of BlurHash strings for generating asset previews (base64 encoded)
|
||||
List<String> thumbhash;
|
||||
@@ -1,11 +1,8 @@
|
||||
--- api.mustache
|
||||
+++ api.mustache.modified
|
||||
@@ -49,9 +49,9 @@
|
||||
///
|
||||
{{/-last}}
|
||||
@@ -51,7 +51,7 @@
|
||||
{{/allParams}}
|
||||
- Future<Response> {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async {
|
||||
+ Future<Response> {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future<void>? abortTrigger, }) async {
|
||||
Future<Response> {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async {
|
||||
// ignore: prefer_const_declarations
|
||||
- final path = r'{{{path}}}'{{#pathParams}}
|
||||
+ final apiPath = r'{{{path}}}'{{#pathParams}}
|
||||
@@ -21,7 +18,7 @@
|
||||
{{#formParams}}
|
||||
{{^isFile}}
|
||||
if ({{{paramName}}} != null) {
|
||||
@@ -121,13 +121,14 @@
|
||||
@@ -121,7 +121,7 @@
|
||||
{{/isMultipart}}
|
||||
|
||||
return apiClient.invokeAPI(
|
||||
@@ -30,21 +27,3 @@
|
||||
'{{{httpMethod}}}',
|
||||
queryParams,
|
||||
postBody,
|
||||
headerParams,
|
||||
formParams,
|
||||
contentTypes.isEmpty ? null : contentTypes.first,
|
||||
+ abortTrigger: abortTrigger,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -161,8 +162,8 @@
|
||||
///
|
||||
{{/-last}}
|
||||
{{/allParams}}
|
||||
- Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} }{{/hasOptionalParams}}) async {
|
||||
- final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}}{{#hasOptionalParams}} {{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}},{{^-last}} {{/-last}}{{/required}}{{/allParams}} {{/hasOptionalParams}});
|
||||
+ Future<{{#returnType}}{{{.}}}?{{/returnType}}{{^returnType}}void{{/returnType}}> {{{nickname}}}({{#allParams}}{{#required}}{{{dataType}}} {{{paramName}}}, {{/required}}{{/allParams}}{ {{#allParams}}{{^required}}{{{dataType}}}? {{{paramName}}}, {{/required}}{{/allParams}}Future<void>? abortTrigger, }) async {
|
||||
+ final response = await {{{nickname}}}WithHttpInfo({{#allParams}}{{#required}}{{{paramName}}}, {{/required}}{{/allParams}}{{#allParams}}{{^required}}{{{paramName}}}: {{{paramName}}}, {{/required}}{{/allParams}}abortTrigger: abortTrigger,);
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
|
||||
}
|
||||
|
||||
@@ -34,14 +34,14 @@ class {{{classname}}} {
|
||||
{{/isNullable}}
|
||||
{{/isEnum}}
|
||||
{{#required}}
|
||||
{{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{{name}}};
|
||||
{{#useFinalProperties}}final {{/useFinalProperties}}{{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}} {{{name}}};
|
||||
{{/required}}
|
||||
{{^required}}
|
||||
{{#vendorExtensions.x-is-optional}}
|
||||
{{{datatypeWithEnum}}} {{{name}}};
|
||||
{{#useFinalProperties}}final {{/useFinalProperties}}{{{datatypeWithEnum}}} {{{name}}};
|
||||
{{/vendorExtensions.x-is-optional}}
|
||||
{{^vendorExtensions.x-is-optional}}
|
||||
{{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}?{{/defaultValue}}{{/isNullable}} {{{name}}};
|
||||
{{#useFinalProperties}}final {{/useFinalProperties}}{{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^defaultValue}}?{{/defaultValue}}{{/isNullable}} {{{name}}};
|
||||
{{/vendorExtensions.x-is-optional}}
|
||||
{{/required}}
|
||||
|
||||
@@ -150,6 +150,21 @@ class {{{classname}}} {
|
||||
return json;
|
||||
}
|
||||
|
||||
{{#useFinalProperties}}
|
||||
/// Clones this instance of [{{{classname}}}] and returns a new one where some of the
|
||||
/// properties have changed.
|
||||
{{{classname}}} copyWith({
|
||||
{{#vars}}
|
||||
{{{datatypeWithEnum}}}? {{{name}}},{{#isNullable}}
|
||||
bool {{{name}}}SetToNull = false,{{/isNullable}}
|
||||
{{/vars}}
|
||||
}) => {{{classname}}}(
|
||||
{{#vars}}
|
||||
{{{name}}}: {{#isNullable}}{{{name}}}SetToNull ? null : {{/isNullable}}{{{name}}} ?? this.{{{name}}},
|
||||
{{/vars}}
|
||||
);
|
||||
|
||||
{{/useFinalProperties}}
|
||||
/// Returns a new [{{{classname}}}] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
|
||||
@@ -26,155 +26,3 @@
|
||||
return {{{classname}}}(
|
||||
{{#vars}}
|
||||
{{#isDateTime}}
|
||||
@@ -195,48 +181,98 @@
|
||||
{{#complexType}}
|
||||
{{#isArray}}
|
||||
{{#items.isArray}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is List
|
||||
+ ? (json[r'{{{baseName}}}'] as List).map((e) =>
|
||||
+ {{#items.complexType}}
|
||||
+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}}
|
||||
+ {{/items.complexType}}
|
||||
+ {{^items.complexType}}
|
||||
+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false)
|
||||
+ {{/items.complexType}}
|
||||
+ ).toList()
|
||||
+ : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is List
|
||||
? (json[r'{{{baseName}}}'] as List).map((e) =>
|
||||
{{#items.complexType}}
|
||||
- {{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}
|
||||
+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.complexType}}>[]{{/items.isNullable}} : {{items.complexType}}.listFromJson(e){{#uniqueItems}}.toSet(){{/uniqueItems}}
|
||||
{{/items.complexType}}
|
||||
{{^items.complexType}}
|
||||
- e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>()
|
||||
+ e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (e as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false)
|
||||
{{/items.complexType}}
|
||||
).toList()
|
||||
: {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.isArray}}
|
||||
{{^items.isArray}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.isArray}}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{#isMap}}
|
||||
{{#items.isArray}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null
|
||||
+ {{#items.complexType}}
|
||||
+ : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(),
|
||||
+ {{/items.complexType}}
|
||||
+ {{^items.complexType}}
|
||||
+ : (json[r'{{{baseName}}}'] as Map<String, dynamic>).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false)))) : const Optional.absent(),
|
||||
+ {{/items.complexType}}
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] == null
|
||||
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
||||
- {{#items.complexType}}
|
||||
+ {{#items.complexType}}
|
||||
: {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']),
|
||||
- {{/items.complexType}}
|
||||
- {{^items.complexType}}
|
||||
- : (json[r'{{{baseName}}}'] as Map<String, dynamic>).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (v as List).cast<{{items.items.dataType}}>())),
|
||||
- {{/items.complexType}}
|
||||
+ {{/items.complexType}}
|
||||
+ {{^items.complexType}}
|
||||
+ : (json[r'{{{baseName}}}'] as Map<String, dynamic>).map((k, v) => MapEntry(k, v == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}>[]{{/items.isNullable}} : (v as List).map((value) => value as {{items.items.dataType}}{{#items.items.isNullable}}?{{/items.items.isNullable}}).toList(growable: false))),
|
||||
+ {{/items.complexType}}
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.isArray}}
|
||||
{{^items.isArray}}
|
||||
{{#items.isMap}}
|
||||
{{#items.complexType}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{items.complexType}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.complexType}}
|
||||
{{^items.complexType}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType<String, dynamic>(json, r'{{{baseName}}}')) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: mapCastOfType<String, dynamic>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.complexType}}
|
||||
{{/items.isMap}}
|
||||
{{^items.isMap}}
|
||||
{{#items.complexType}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'])) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}']),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.complexType}}
|
||||
{{^items.complexType}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}')) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/items.complexType}}
|
||||
{{/items.isMap}}
|
||||
{{/items.isArray}}
|
||||
@@ -259,23 +295,45 @@
|
||||
{{^complexType}}
|
||||
{{#isArray}}
|
||||
{{#isEnum}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present({{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] is Iterable
|
||||
+ ? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}
|
||||
+ : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: json[r'{{{baseName}}}'] is Iterable
|
||||
? (json[r'{{{baseName}}}'] as Iterable).cast<{{{items.datatype}}}>().{{#uniqueItems}}toSet(){{/uniqueItems}}{{^uniqueItems}}toList(growable: false){{/uniqueItems}}
|
||||
: {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/isEnum}}
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
{{#isMap}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(mapCastOfType<String, {{{items.datatype}}}>(json, r'{{{baseName}}}')) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: mapCastOfType<String, {{{items.datatype}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/isMap}}
|
||||
{{^isMap}}
|
||||
{{#isNumber}}
|
||||
+ {{#vendorExtensions.x-is-optional}}
|
||||
+ {{{name}}}: json.containsKey(r'{{{baseName}}}') ? Optional.present(json[r'{{{baseName}}}'] == null ? null : num.parse('${json[r'{{{baseName}}}']}')) : const Optional.absent(),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
+ {{^vendorExtensions.x-is-optional}}
|
||||
{{{name}}}: {{#isNullable}}json[r'{{{baseName}}}'] == null
|
||||
? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}
|
||||
: {{/isNullable}}{{{datatypeWithEnum}}}.parse('${json[r'{{{baseName}}}']}'),
|
||||
+ {{/vendorExtensions.x-is-optional}}
|
||||
{{/isNumber}}
|
||||
{{^isNumber}}
|
||||
{{#vendorExtensions.x-original-is-integer}}
|
||||
|
||||
@@ -103,6 +103,12 @@
|
||||
"default": false,
|
||||
"title": "Case sensitive",
|
||||
"description": "Whether matching should be case-sensitive"
|
||||
},
|
||||
"usePath": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"title": "Use path",
|
||||
"description": "Match the full path on the server instead of the original filename"
|
||||
}
|
||||
},
|
||||
"required": ["pattern"]
|
||||
|
||||
@@ -54,11 +54,11 @@ const methods = wrapper<Manifest>({
|
||||
},
|
||||
|
||||
assetFileFilter: ({ data, config }) => {
|
||||
const { pattern, matchType = 'contains', caseSensitive = false } = config;
|
||||
const { pattern, matchType = 'contains', caseSensitive = false, usePath = false } = config;
|
||||
|
||||
const { asset } = data;
|
||||
|
||||
const fileName = asset.originalFileName || '';
|
||||
const fileName = usePath ? asset.originalPath : asset.originalFileName;
|
||||
const searchName = caseSensitive ? fileName : fileName.toLowerCase();
|
||||
const searchPattern = caseSensitive ? pattern : pattern.toLowerCase();
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ select
|
||||
inner join "plugin" on "plugin"."id" = "plugin_method"."pluginId"
|
||||
where
|
||||
"workflow"."id" = "workflow_step"."workflowId"
|
||||
order by
|
||||
"workflow_step"."order" asc
|
||||
) as agg
|
||||
) as "steps"
|
||||
from
|
||||
@@ -57,6 +59,8 @@ select
|
||||
inner join "plugin" on "plugin"."id" = "plugin_method"."pluginId"
|
||||
where
|
||||
"workflow"."id" = "workflow_step"."workflowId"
|
||||
order by
|
||||
"workflow_step"."order" asc
|
||||
) as agg
|
||||
) as "steps"
|
||||
from
|
||||
|
||||
@@ -39,7 +39,8 @@ export class WorkflowRepository {
|
||||
'plugin_method.name as methodName',
|
||||
'workflow_step.config',
|
||||
'workflow_step.enabled',
|
||||
]),
|
||||
])
|
||||
.orderBy('workflow_step.order', 'asc'),
|
||||
).as('steps'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<div
|
||||
bind:this={menuScrollView}
|
||||
class={[
|
||||
'fixed z-1 w-max max-w-75 min-w-50 immich-scrollbar rounded-lg bg-slate-100 shadow-lg duration-250 ease-in-out',
|
||||
'fixed z-70 w-max max-w-75 min-w-50 immich-scrollbar rounded-lg bg-slate-100 shadow-lg duration-250 ease-in-out',
|
||||
position.needScrollBar ? 'overflow-auto' : 'overflow-hidden',
|
||||
]}
|
||||
style:left="{position.left}px"
|
||||
|
||||
@@ -63,6 +63,8 @@ export const openFilePicker = async (options: FilePickerParam = {}) => {
|
||||
fileSelector.addEventListener(
|
||||
'change',
|
||||
(e: Event) => {
|
||||
fileSelector.remove();
|
||||
|
||||
const target = e.target as HTMLInputElement;
|
||||
if (!target.files) {
|
||||
return;
|
||||
@@ -74,6 +76,11 @@ export const openFilePicker = async (options: FilePickerParam = {}) => {
|
||||
{ passive: true },
|
||||
);
|
||||
|
||||
fileSelector.addEventListener('cancel', () => fileSelector.remove(), { passive: true });
|
||||
|
||||
// Safari requires the file selector to be mounted
|
||||
fileSelector.hidden = true;
|
||||
document.body.append(fileSelector);
|
||||
fileSelector.click();
|
||||
} catch (error) {
|
||||
console.log('Error selecting file', error);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { afterNavigate, goto, invalidateAll } from '$app/navigation';
|
||||
import ActionMenuItem from '$lib/components/ActionMenuItem.svelte';
|
||||
import OnEvents from '$lib/components/OnEvents.svelte';
|
||||
import UserPageLayout, { headerId } from '$lib/components/layouts/UserPageLayout.svelte';
|
||||
import ButtonContextMenu from '$lib/components/shared-components/context-menu/ButtonContextMenu.svelte';
|
||||
import GalleryViewer from '$lib/components/shared-components/gallery-viewer/GalleryViewer.svelte';
|
||||
@@ -92,6 +93,8 @@
|
||||
</Sidebar>
|
||||
{/snippet}
|
||||
|
||||
<OnEvents onAssetsDelete={invalidateAll} />
|
||||
|
||||
<Breadcrumbs node={data.tree} icon={mdiFolderHome} title={$t('folders')} getLink={getLinkForPath} />
|
||||
|
||||
<section class="mt-2 h-[calc(100%-(--spacing(25)))] immich-scrollbar overflow-auto">
|
||||
|
||||
Reference in New Issue
Block a user