diff --git a/.vscode/settings.json b/.vscode/settings.json index 49dbf3944c..b6da258a80 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,10 +20,7 @@ "editor.tabSize": 2 }, "svelte.enable-ts-plugin": true, - "eslint.validate": [ - "javascript", - "svelte" - ], + "eslint.validate": ["javascript", "svelte"], "typescript.preferences.importModuleSpecifier": "non-relative", "[dart]": { "editor.formatOnSave": true, diff --git a/mobile-v2/.gitignore b/mobile-v2/.gitignore new file mode 100644 index 0000000000..4e51a5b910 --- /dev/null +++ b/mobile-v2/.gitignore @@ -0,0 +1,48 @@ +# Generated +*.g.dart +*.gr.dart +*.drift.dart + +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/mobile-v2/.metadata b/mobile-v2/.metadata new file mode 100644 index 0000000000..d02048cb75 --- /dev/null +++ b/mobile-v2/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "300451adae589accbece3490f4396f10bdf15e6e" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: android + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + - platform: ios + create_revision: 300451adae589accbece3490f4396f10bdf15e6e + base_revision: 300451adae589accbece3490f4396f10bdf15e6e + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - "lib/main.dart" + - "ios/Runner.xcodeproj/project.pbxproj" diff --git a/mobile-v2/README.md b/mobile-v2/README.md new file mode 100644 index 0000000000..4f7e28f3d8 --- /dev/null +++ b/mobile-v2/README.md @@ -0,0 +1,55 @@ +# Immich Mobile Application - Flutter + +The Immich mobile app is a Flutter-based solution leveraging the Isar Database for local storage and Riverpod for state management. This structure optimizes functionality and maintainability, allowing for efficient development and robust performance. + +## Setup + +You must set up Flutter toolchain in your machine before you can perform any of the development. + +## Immich-Flutter Directory Structure + +Below are the directory inside the `lib` directory: + +- `constants`: Store essential constants utilized across the application, like colors and locale. + +- `extensions`: Extensions enhancing various existing functionalities within the app, such as asset_extensions.dart, string_extensions.dart, and more. + +- `module_template`: Provides a template structure for different modules within the app, including subdivisions like models, providers, services, UI, and views. + + - `models`: Placeholder for storing module-specific models. + - `providers`: Section to define module-specific Riverpod providers. + - `services`: Houses services tailored to the module's functionality. + - `ui`: Contains UI components and widgets for the module. + - `views`: Placeholder for module-specific views. + +- `modules`: Organizes different functional modules of the app, each containing subdivisions for models, providers, services, UI, and views. This structure promotes modular development and scalability. + +- `routing`: Includes guards like auth_guard.dart, backup_permission_guard.dart, and routers like router.dart and router.gr.dart for streamlined navigation and permission management. + +- `shared`: cache, models, providers, services, ui, views: Encapsulates shared functionalities, such as caching mechanisms, common models, providers, services, UI components, and views accessible across the application. + +- `utils`: A collection of utility classes and functions catering to different app functionalities, including async_mutex.dart, bytes_units.dart, debounce.dart, migration.dart, and more. + +## Immich Architectural Pattern + +The Immich Flutter app embraces a well-defined architectural pattern inspired by the Model-View-ViewModel (MVVM) approach. This layout organizes modules for models, providers, services, UI, and views, creating a modular development approach that strongly emphasizes a clean separation of concerns. + +Please use the `module_template` provided to create a new module. + +### Architecture Breakdown + +Below is how your code needs to be structured: + +- Models: In Immich, Models are like the app's blueprint—they're essential for organizing and using information. Imagine them as containers that hold data the app needs to function. They also handle basic rules and logic for managing and interacting with this data across the app. + +- Providers (Riverpod): Providers in Immich are a bit like traffic managers. They help different parts of the app communicate and share information effectively. They ensure that the right data gets to the right places at the right time. These providers use Riverpod, a tool that helps with managing and organizing how the app's information flows. Everything related to the state goes here. + +- Services: Services are the helpful behind-the-scenes workers in Immich. They handle important tasks like handling network requests or managing other essential functions. These services work independently and focus on supporting the app's main functionalities. + +- UI: In Immich, the UI focuses solely on how things appear and feel without worrying about the app's complex inner workings. You can slot in your reusable widget here. + +- Views: Views use Providers to get the needed information and handle actions without dealing with the technical complexities behind the scenes. Normally Flutter's screen & pages goes here. + +## Contributing + +Please refer to the [architecture](https://immich.app/docs/developer/architecture/) for contributing to the mobile app! diff --git a/mobile-v2/analysis_options.yaml b/mobile-v2/analysis_options.yaml new file mode 100644 index 0000000000..d7485e6d50 --- /dev/null +++ b/mobile-v2/analysis_options.yaml @@ -0,0 +1,18 @@ +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + rules: + avoid_single_cascade_in_expression_statements: false + +analyzer: + exclude: + - openapi/** + +dart_code_metrics: + extends: + - recommended + rules: + - prefer-match-file-name: false + - avoid-passing-self-as-argument: false diff --git a/mobile-v2/android/.gitignore b/mobile-v2/android/.gitignore new file mode 100644 index 0000000000..6f568019d3 --- /dev/null +++ b/mobile-v2/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/mobile-v2/android/app/build.gradle b/mobile-v2/android/app/build.gradle new file mode 100644 index 0000000000..3c931bca9d --- /dev/null +++ b/mobile-v2/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.alextran.immich" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + applicationId "com.alextran.immich" + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + + // Do not build for x86 platform. This will also prevent sqlite3 from bundling the library for x86 + ndk { + abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64' + } + } + + buildTypes { + release { + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/mobile-v2/android/app/src/debug/AndroidManifest.xml b/mobile-v2/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/mobile-v2/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/mobile-v2/android/app/src/main/AndroidManifest.xml b/mobile-v2/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000000..51d1691704 --- /dev/null +++ b/mobile-v2/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile-v2/android/app/src/main/kotlin/com/alextran/immich/MainActivity.kt b/mobile-v2/android/app/src/main/kotlin/com/alextran/immich/MainActivity.kt new file mode 100644 index 0000000000..c2e8c3f565 --- /dev/null +++ b/mobile-v2/android/app/src/main/kotlin/com/alextran/immich/MainActivity.kt @@ -0,0 +1,5 @@ +package com.alextran.immich + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/mobile-v2/android/app/src/main/res/drawable-v21/launch_background.xml b/mobile-v2/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000000..f74085f3f6 --- /dev/null +++ b/mobile-v2/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/mobile-v2/android/app/src/main/res/drawable/launch_background.xml b/mobile-v2/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000000..304732f884 --- /dev/null +++ b/mobile-v2/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/mobile-v2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/mobile-v2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000000..db77bb4b7b Binary files /dev/null and b/mobile-v2/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/mobile-v2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/mobile-v2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000000..17987b79bb Binary files /dev/null and b/mobile-v2/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/mobile-v2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/mobile-v2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000000..09d4391482 Binary files /dev/null and b/mobile-v2/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/mobile-v2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/mobile-v2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000000..d5f1c8d34e Binary files /dev/null and b/mobile-v2/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/mobile-v2/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/mobile-v2/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000000..4d6372eebd Binary files /dev/null and b/mobile-v2/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/mobile-v2/android/app/src/main/res/values-night/styles.xml b/mobile-v2/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000000..06952be745 --- /dev/null +++ b/mobile-v2/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/mobile-v2/android/app/src/main/res/values/styles.xml b/mobile-v2/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000000..cb1ef88056 --- /dev/null +++ b/mobile-v2/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/mobile-v2/android/app/src/profile/AndroidManifest.xml b/mobile-v2/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000000..399f6981d5 --- /dev/null +++ b/mobile-v2/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/mobile-v2/android/build.gradle b/mobile-v2/android/build.gradle new file mode 100644 index 0000000000..bc157bd1a1 --- /dev/null +++ b/mobile-v2/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/mobile-v2/android/gradle.properties b/mobile-v2/android/gradle.properties new file mode 100644 index 0000000000..598d13fee4 --- /dev/null +++ b/mobile-v2/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/mobile-v2/android/gradle/wrapper/gradle-wrapper.properties b/mobile-v2/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000000..e1ca574ef0 --- /dev/null +++ b/mobile-v2/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/mobile-v2/android/settings.gradle b/mobile-v2/android/settings.gradle new file mode 100644 index 0000000000..1d6d19b7f8 --- /dev/null +++ b/mobile-v2/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/mobile-v2/build.yaml b/mobile-v2/build.yaml new file mode 100644 index 0000000000..f656cecae7 --- /dev/null +++ b/mobile-v2/build.yaml @@ -0,0 +1,26 @@ +targets: + $default: + builders: + #drift @DriftDatabase() + drift_dev: + # Disable default builder to use modular builder instead + enabled: false + drift_dev:analyzer: + enabled: true + options: &options + store_date_time_values_as_text: true + named_parameters: true + write_from_json_string_constructor: false + data_class_to_companions: false + skip_verification_code: true + drift_dev:modular: + enabled: true + options: *options + #autoroute @RoutePage() + auto_route_generator:auto_route_generator: + generate_for: + - lib/**.page.dart + #autoroute @AutoRouterConfig() + auto_route_generator:auto_router_generator: + generate_for: + - lib/presentation/router.dart diff --git a/mobile-v2/ios/.gitignore b/mobile-v2/ios/.gitignore new file mode 100644 index 0000000000..7a7f9873ad --- /dev/null +++ b/mobile-v2/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/mobile-v2/ios/Flutter/AppFrameworkInfo.plist b/mobile-v2/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000000..7c56964006 --- /dev/null +++ b/mobile-v2/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/mobile-v2/ios/Flutter/Debug.xcconfig b/mobile-v2/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000000..ec97fc6f30 --- /dev/null +++ b/mobile-v2/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/mobile-v2/ios/Flutter/Release.xcconfig b/mobile-v2/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000000..c4855bfe20 --- /dev/null +++ b/mobile-v2/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/mobile-v2/ios/Podfile b/mobile-v2/ios/Podfile new file mode 100644 index 0000000000..d97f17e223 --- /dev/null +++ b/mobile-v2/ios/Podfile @@ -0,0 +1,44 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '12.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + use_modular_headers! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/mobile-v2/ios/Runner.xcodeproj/project.pbxproj b/mobile-v2/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..6d9d8e0481 --- /dev/null +++ b/mobile-v2/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.alextran.immich; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..919434a625 --- /dev/null +++ b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/mobile-v2/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/mobile-v2/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/mobile-v2/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000000..8e3ca5dfe1 --- /dev/null +++ b/mobile-v2/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile-v2/ios/Runner.xcworkspace/contents.xcworkspacedata b/mobile-v2/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..1d526a16ed --- /dev/null +++ b/mobile-v2/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/mobile-v2/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/mobile-v2/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000000..18d981003d --- /dev/null +++ b/mobile-v2/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/mobile-v2/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/mobile-v2/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000000..f9b0d7c5ea --- /dev/null +++ b/mobile-v2/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/mobile-v2/ios/Runner/AppDelegate.swift b/mobile-v2/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000000..70693e4a8c --- /dev/null +++ b/mobile-v2/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000000..d36b1fab2d --- /dev/null +++ b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000000..dc9ada4725 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000000..7353c41ecf Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000000..797d452e45 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000000..6ed2d933e1 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000000..4cd7b0099c Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000000..fe730945a0 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000000..321773cd85 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000000..797d452e45 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000000..502f463a9b Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000000..0ec3034392 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000000..0ec3034392 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000000..e9f5fea27c Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000000..84ac32ae7d Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000000..8953cba090 Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000000..0467bf12aa Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000000..0bedcf2fd4 --- /dev/null +++ b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000000..9da19eacad Binary files /dev/null and b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000000..89c2725b70 --- /dev/null +++ b/mobile-v2/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/mobile-v2/ios/Runner/Base.lproj/LaunchScreen.storyboard b/mobile-v2/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000000..f2e259c7c9 --- /dev/null +++ b/mobile-v2/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile-v2/ios/Runner/Base.lproj/Main.storyboard b/mobile-v2/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000000..f3c28516fb --- /dev/null +++ b/mobile-v2/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mobile-v2/ios/Runner/Info.plist b/mobile-v2/ios/Runner/Info.plist new file mode 100644 index 0000000000..73c6c04d66 --- /dev/null +++ b/mobile-v2/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Immich + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + immich + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/mobile-v2/ios/Runner/Runner-Bridging-Header.h b/mobile-v2/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000000..308a2a560b --- /dev/null +++ b/mobile-v2/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/mobile-v2/ios/RunnerTests/RunnerTests.swift b/mobile-v2/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000000..86a7c3b1b6 --- /dev/null +++ b/mobile-v2/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/mobile-v2/lib/domain/entities/log.entity.dart b/mobile-v2/lib/domain/entities/log.entity.dart new file mode 100644 index 0000000000..d455c58844 --- /dev/null +++ b/mobile-v2/lib/domain/entities/log.entity.dart @@ -0,0 +1,14 @@ +import 'package:drift/drift.dart'; +import 'package:immich_mobile/domain/models/log.model.dart'; + +class Logs extends Table { + const Logs(); + + IntColumn get id => integer().autoIncrement()(); + TextColumn get content => text()(); + IntColumn get level => intEnum()(); + DateTimeColumn get createdAt => dateTime().withDefault(currentDateAndTime)(); + TextColumn get logger => text().nullable()(); + TextColumn get error => text().nullable()(); + TextColumn get stack => text().nullable()(); +} diff --git a/mobile-v2/lib/domain/entities/store.entity.dart b/mobile-v2/lib/domain/entities/store.entity.dart new file mode 100644 index 0000000000..c7d7cee09c --- /dev/null +++ b/mobile-v2/lib/domain/entities/store.entity.dart @@ -0,0 +1,12 @@ +import 'package:drift/drift.dart'; + +class Store extends Table { + const Store(); + + @override + String get tableName => 'store'; + + IntColumn get id => integer().autoIncrement()(); + IntColumn get intValue => integer().nullable()(); + TextColumn get stringValue => text().nullable()(); +} diff --git a/mobile-v2/lib/domain/interfaces/database.interface.dart b/mobile-v2/lib/domain/interfaces/database.interface.dart new file mode 100644 index 0000000000..6cd5c0950f --- /dev/null +++ b/mobile-v2/lib/domain/interfaces/database.interface.dart @@ -0,0 +1,10 @@ +abstract class IDatabaseRepository { + /// Current version of the DB to aid with migration + int get schemaVersion; + + /// Initializes the DB and returns the corresponding object + T init(); + + /// Check and migrate the DB to the latest schema + void migrateDB(); +} diff --git a/mobile-v2/lib/domain/interfaces/log.interface.dart b/mobile-v2/lib/domain/interfaces/log.interface.dart new file mode 100644 index 0000000000..c410e41725 --- /dev/null +++ b/mobile-v2/lib/domain/interfaces/log.interface.dart @@ -0,0 +1,11 @@ +import 'dart:async'; + +import 'package:immich_mobile/domain/models/log.model.dart'; + +abstract class ILogRepository { + /// Fetches all logs + FutureOr> fetchLogs(); + + /// Truncates the logs to the most recent [limit]. Defaults to recent 250 logs + FutureOr truncateLogs({int limit = 250}); +} diff --git a/mobile-v2/lib/domain/interfaces/store.interface.dart b/mobile-v2/lib/domain/interfaces/store.interface.dart new file mode 100644 index 0000000000..9c37b8e4d7 --- /dev/null +++ b/mobile-v2/lib/domain/interfaces/store.interface.dart @@ -0,0 +1,17 @@ +import 'dart:async'; + +import 'package:immich_mobile/domain/models/store.model.dart'; + +abstract class IStoreRepository { + FutureOr getValue(StoreKey key); + + FutureOr setValue(StoreKey key, T value); + + FutureOr deleteValue(StoreKey key); + + Stream watchValue(StoreKey key); + + Stream> watchStore(); + + FutureOr clearStore(); +} diff --git a/mobile-v2/lib/domain/models/log.model.dart b/mobile-v2/lib/domain/models/log.model.dart new file mode 100644 index 0000000000..2b1a120b5a --- /dev/null +++ b/mobile-v2/lib/domain/models/log.model.dart @@ -0,0 +1,59 @@ +import 'package:logging/logging.dart'; + +/// Log levels according to dart logging [Level] +enum LogLevel { + all, + finest, + finer, + fine, + config, + info, + warning, + severe, + shout, + off, +} + +extension LevelExtension on Level { + LogLevel toLogLevel() => + LogLevel.values.elementAtOrNull(Level.LEVELS.indexOf(this)) ?? + LogLevel.info; +} + +class LogMessage { + final int id; + final String content; + final LogLevel level; + final DateTime createdAt; + final String? logger; + final String? error; + final String? stack; + + const LogMessage({ + required this.id, + required this.content, + required this.level, + required this.createdAt, + this.logger, + this.error, + this.stack, + }); + + @override + bool operator ==(covariant LogMessage other) { + if (identical(this, other)) return true; + + return other.hashCode == hashCode; + } + + @override + int get hashCode { + return id.hashCode ^ + content.hashCode ^ + level.hashCode ^ + createdAt.hashCode ^ + logger.hashCode ^ + error.hashCode ^ + stack.hashCode; + } +} diff --git a/mobile-v2/lib/domain/models/store.model.dart b/mobile-v2/lib/domain/models/store.model.dart new file mode 100644 index 0000000000..872a8559a1 --- /dev/null +++ b/mobile-v2/lib/domain/models/store.model.dart @@ -0,0 +1,70 @@ +/// Key for each possible value in the `Store`. +/// Defines the data type for each value +enum StoreKey { + // Server endpoint related stores + accessToken(0, type: String), + serverEndpoint(1, type: String), + ; + + const StoreKey(this.id, {required this.type}); + final int id; + final Type type; +} + +class StoreValue { + final int id; + final int? intValue; + final String? stringValue; + + const StoreValue({required this.id, this.intValue, this.stringValue}); + + @override + bool operator ==(covariant StoreValue other) { + if (identical(this, other)) return true; + + return other.hashCode == hashCode; + } + + @override + int get hashCode => id.hashCode ^ intValue.hashCode ^ stringValue.hashCode; + + T? extract(Type type) { + switch (type) { + case const (int): + return intValue as T?; + case const (bool): + return intValue == null ? null : (intValue! == 1) as T; + case const (DateTime): + return intValue == null + ? null + : DateTime.fromMicrosecondsSinceEpoch(intValue!) as T; + case const (String): + return stringValue as T?; + default: + throw UnsupportedError("Unknown Store Key type"); + } + } + + static StoreValue of(StoreKey key, T? value) { + int? i; + String? s; + + switch (key.type) { + case const (int): + i = value as int?; + break; + case const (bool): + i = value == null ? null : (value == true ? 1 : 0); + break; + case const (DateTime): + i = value == null ? null : (value as DateTime).microsecondsSinceEpoch; + break; + case const (String): + s = value as String?; + break; + default: + throw UnsupportedError("Unknown Store Key type"); + } + return StoreValue(id: key.id, intValue: i, stringValue: s); + } +} diff --git a/mobile-v2/lib/domain/repositories/database.repository.dart b/mobile-v2/lib/domain/repositories/database.repository.dart new file mode 100644 index 0000000000..066955a9c4 --- /dev/null +++ b/mobile-v2/lib/domain/repositories/database.repository.dart @@ -0,0 +1,54 @@ +import 'dart:io'; + +import 'package:drift/drift.dart'; +import 'package:drift/native.dart'; +import 'package:immich_mobile/domain/entities/log.entity.dart'; +import 'package:immich_mobile/domain/entities/store.entity.dart'; +import 'package:immich_mobile/domain/interfaces/database.interface.dart'; +import 'package:path/path.dart' as p; +import 'package:path_provider/path_provider.dart'; +import 'package:sqlite3/sqlite3.dart'; +import 'package:sqlite3_flutter_libs/sqlite3_flutter_libs.dart'; + +import 'database.repository.drift.dart'; + +@DriftDatabase(tables: [Logs, Store]) +class DriftDatabaseRepository extends $DriftDatabaseRepository + implements IDatabaseRepository { + DriftDatabaseRepository() : super(_openConnection()); + + static LazyDatabase _openConnection() { + return LazyDatabase(() async { + final dbFolder = await getApplicationDocumentsDirectory(); + final file = File(p.join(dbFolder.path, 'db.sqlite')); + + // Work around limitations on old Android versions + // https://github.com/simolus3/sqlite3.dart/tree/main/sqlite3_flutter_libs#problems-on-android-6 + if (Platform.isAndroid) { + await applyWorkaroundToOpenSqlite3OnOldAndroidVersions(); + } + + // Make sqlite3 pick a more suitable location for temporary files - the + // one from the system may be inaccessible due to sandboxing. + // https://github.com/simolus3/moor/issues/876#issuecomment-710013503 + final cachebase = (await getTemporaryDirectory()).path; + // We can't access /tmp on Android, which sqlite3 would try by default. + // Explicitly tell it about the correct temporary directory. + sqlite3.tempDirectory = cachebase; + + return NativeDatabase.createInBackground(file); + }); + } + + @override + GeneratedDatabase init() => this; + + @override + int get schemaVersion => 1; + + @override + // ignore: no-empty-block + void migrateDB() { + // No migrations yet + } +} diff --git a/mobile-v2/lib/domain/repositories/log.repository.dart b/mobile-v2/lib/domain/repositories/log.repository.dart new file mode 100644 index 0000000000..09a8f5a8c0 --- /dev/null +++ b/mobile-v2/lib/domain/repositories/log.repository.dart @@ -0,0 +1,43 @@ +import 'package:immich_mobile/domain/entities/log.entity.drift.dart'; +import 'package:immich_mobile/domain/interfaces/log.interface.dart'; +import 'package:immich_mobile/domain/models/log.model.dart'; +import 'package:immich_mobile/domain/repositories/database.repository.dart'; + +class LogDriftRepository implements ILogRepository { + final DriftDatabaseRepository db; + + const LogDriftRepository(this.db); + + @override + Future> fetchLogs() async { + return await db.select(db.logs).map((l) => l.toModel()).get(); + } + + @override + Future truncateLogs({int limit = 250}) { + return db.transaction(() async { + final totalCount = await db.managers.logs.count(); + if (totalCount > limit) { + final rowsToDelete = totalCount - limit; + await db.managers.logs + .orderBy((o) => o.createdAt.desc()) + .limit(rowsToDelete) + .delete(); + } + }); + } +} + +extension _LogToLogMessage on Log { + LogMessage toModel() { + return LogMessage( + id: id, + content: content, + createdAt: createdAt, + level: level, + error: error, + logger: logger, + stack: stack, + ); + } +} diff --git a/mobile-v2/lib/domain/repositories/store.repository.dart b/mobile-v2/lib/domain/repositories/store.repository.dart new file mode 100644 index 0000000000..39ad10273e --- /dev/null +++ b/mobile-v2/lib/domain/repositories/store.repository.dart @@ -0,0 +1,66 @@ +import 'dart:async'; + +import 'package:drift/drift.dart'; +import 'package:immich_mobile/domain/entities/store.entity.drift.dart'; +import 'package:immich_mobile/domain/interfaces/store.interface.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/domain/repositories/database.repository.dart'; + +class StoreDriftRepository implements IStoreRepository { + final DriftDatabaseRepository db; + + const StoreDriftRepository(this.db); + + @override + FutureOr getValue(StoreKey key) async { + final value = await db.managers.store + .filter((s) => s.id.equals(key.id)) + .getSingleOrNull(); + return value?.toModel().extract(key.type); + } + + @override + FutureOr setValue(StoreKey key, T value) { + return db.transaction(() async { + final storeValue = StoreValue.of(key, value); + await db.into(db.store).insertOnConflictUpdate(StoreCompanion.insert( + id: Value(storeValue.id), + intValue: Value(storeValue.intValue), + stringValue: Value(storeValue.stringValue), + )); + }); + } + + @override + FutureOr deleteValue(StoreKey key) { + return db.transaction(() async { + await db.managers.store.filter((s) => s.id.equals(key.id)).delete(); + }); + } + + @override + Stream> watchStore() { + return (db.select(db.store).map((s) => s.toModel())).watch(); + } + + @override + Stream watchValue(StoreKey key) { + return db.managers.store + .filter((s) => s.id.equals(key.id)) + .watchSingleOrNull() + .map((e) => e?.toModel().extract(key.type)); + } + + @override + FutureOr clearStore() { + return db.transaction(() async { + await db.managers.store.delete(); + }); + } +} + +extension _StoreDataToStoreValue on StoreData { + StoreValue toModel() { + return StoreValue(id: id, intValue: intValue, stringValue: stringValue); + } +} diff --git a/mobile-v2/lib/domain/service_locator.dart b/mobile-v2/lib/domain/service_locator.dart new file mode 100644 index 0000000000..e5c42c54f2 --- /dev/null +++ b/mobile-v2/lib/domain/service_locator.dart @@ -0,0 +1,29 @@ +import 'package:get_it/get_it.dart'; +import 'package:immich_mobile/domain/interfaces/log.interface.dart'; +import 'package:immich_mobile/domain/interfaces/store.interface.dart'; +import 'package:immich_mobile/domain/repositories/database.repository.dart'; +import 'package:immich_mobile/domain/repositories/log.repository.dart'; +import 'package:immich_mobile/domain/repositories/store.repository.dart'; +import 'package:immich_mobile/domain/store_manager.dart'; + +/// Ambient instance +final getIt = GetIt.instance; + +class ServiceLocator { + const ServiceLocator._internal(); + + static void configureServices() { + // Register DB + getIt.registerSingleton(DriftDatabaseRepository()); + _registerCoreServices(); + } + + static void _registerCoreServices() { + // Init store + getIt + .registerFactory(() => StoreDriftRepository(getIt())); + getIt.registerSingleton(StoreManager(getIt())); + // Logs + getIt.registerFactory(() => LogDriftRepository(getIt())); + } +} diff --git a/mobile-v2/lib/domain/store_manager.dart b/mobile-v2/lib/domain/store_manager.dart new file mode 100644 index 0000000000..fe6b0bec71 --- /dev/null +++ b/mobile-v2/lib/domain/store_manager.dart @@ -0,0 +1,99 @@ +import 'dart:async'; + +import 'package:collection/collection.dart'; +import 'package:immich_mobile/domain/interfaces/store.interface.dart'; +import 'package:immich_mobile/domain/models/store.model.dart'; +import 'package:immich_mobile/utils/mixins/log_context.mixin.dart'; + +class StoreKeyNotFoundException implements Exception { + final StoreKey key; + const StoreKeyNotFoundException(this.key); + + @override + String toString() => "Key '${key.name}' not found in Store"; +} + +/// Key-value store for individual items enumerated in StoreKey. +/// Supports String, int and JSON-serializable Objects +/// Can be used concurrently from multiple isolates +class StoreManager with LogContext { + late final IStoreRepository _db; + StreamSubscription? _subscription; + final Map _cache = {}; + + StoreManager._internal(); + static final StoreManager _instance = StoreManager._internal(); + + factory StoreManager(IStoreRepository db) { + if (_instance._subscription == null) { + _instance._db = db; + _instance._populateCache(); + _instance._subscription = + _instance._db.watchStore().listen(_instance._onChangeListener); + } + return _instance; + } + + void dispose() { + _subscription?.cancel(); + } + + FutureOr _populateCache() async { + for (StoreKey key in StoreKey.values) { + final StoreValue? value = await _db.getValue(key); + if (value != null) { + _cache[key.id] = value; + } + } + } + + /// clears all values from this store (cache and DB), only for testing! + Future clear() async { + _cache.clear(); + return await _db.clearStore(); + } + + /// Returns the stored value for the given key (possibly null) + T? tryGet(StoreKey key) => _cache[key.id] as T?; + + /// Returns the stored value for the given key or if null the [defaultValue] + /// Throws a [StoreKeyNotFoundException] if both are null + T get(StoreKey key, [T? defaultValue]) { + final value = _cache[key.id] ?? defaultValue; + if (value == null) { + throw StoreKeyNotFoundException(key); + } + return value; + } + + /// Watches a specific key for changes + Stream watch(StoreKey key) => _db.watchValue(key); + + /// Stores the value synchronously in the cache and asynchronously in the DB + FutureOr put(StoreKey key, T value) async { + if (_cache[key.id] == value) return Future.value(); + _cache[key.id] = value; + return await _db.setValue(key, value); + } + + /// Removes the value synchronously from the cache and asynchronously from the DB + Future delete(StoreKey key) async { + if (_cache[key.id] == null) return Future.value(); + _cache.remove(key.id); + return await _db.deleteValue(key); + } + + /// Updates the state in cache if a value is updated in any isolate + void _onChangeListener(List? data) { + if (data != null) { + for (StoreValue value in data) { + final key = StoreKey.values.firstWhereOrNull((e) => e.id == value.id); + if (key != null) { + _cache[value.id] = value.extract(key.type); + } else { + log.warning("No key available for value Id - ${value.id}"); + } + } + } + } +} diff --git a/mobile-v2/lib/main.dart b/mobile-v2/lib/main.dart new file mode 100644 index 0000000000..7862fadfd0 --- /dev/null +++ b/mobile-v2/lib/main.dart @@ -0,0 +1,28 @@ +import 'package:flutter/material.dart'; +import 'package:immich_mobile/domain/service_locator.dart'; + +void main() { + // Ensure the bindings are initialized + WidgetsFlutterBinding.ensureInitialized(); + + // DI Injection + ServiceLocator.configureServices(); + + runApp(const MainWidget()); +} + +class MainWidget extends StatelessWidget { + const MainWidget({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const Text('Flutter Demo Home Page'), + ); + } +} diff --git a/mobile-v2/lib/presentation/router.dart b/mobile-v2/lib/presentation/router.dart new file mode 100644 index 0000000000..2c9c639adf --- /dev/null +++ b/mobile-v2/lib/presentation/router.dart @@ -0,0 +1,9 @@ +import 'package:auto_route/auto_route.dart'; + +part 'router.gr.dart'; + +@AutoRouterConfig(replaceInRouteName: 'Page,Route') +class AppRouter extends _$AppRouter { + @override + List get routes => []; +} diff --git a/mobile-v2/lib/utils/constants/assets.gen.dart b/mobile-v2/lib/utils/constants/assets.gen.dart new file mode 100644 index 0000000000..4899ed03ae --- /dev/null +++ b/mobile-v2/lib/utils/constants/assets.gen.dart @@ -0,0 +1,112 @@ +/// GENERATED CODE - DO NOT MODIFY BY HAND +/// ***************************************************** +/// FlutterGen +/// ***************************************************** + +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use + +import 'package:flutter/widgets.dart'; + +class $AssetsImagesGen { + const $AssetsImagesGen(); + + /// File path: assets/images/immich-logo.png + AssetGenImage get immichLogo => + const AssetGenImage('assets/images/immich-logo.png'); + + /// File path: assets/images/immich-text-dark.png + AssetGenImage get immichTextDark => + const AssetGenImage('assets/images/immich-text-dark.png'); + + /// File path: assets/images/immich-text-light.png + AssetGenImage get immichTextLight => + const AssetGenImage('assets/images/immich-text-light.png'); + + /// List of all assets + List get values => + [immichLogo, immichTextDark, immichTextLight]; +} + +class Assets { + Assets._(); + + static const $AssetsImagesGen images = $AssetsImagesGen(); +} + +class AssetGenImage { + const AssetGenImage(this._assetName, {this.size = null}); + + final String _assetName; + + final Size? size; + + Image image({ + Key? key, + AssetBundle? bundle, + ImageFrameBuilder? frameBuilder, + ImageErrorWidgetBuilder? errorBuilder, + String? semanticLabel, + bool excludeFromSemantics = false, + double? scale, + double? width, + double? height, + Color? color, + Animation? opacity, + BlendMode? colorBlendMode, + BoxFit? fit, + AlignmentGeometry alignment = Alignment.center, + ImageRepeat repeat = ImageRepeat.noRepeat, + Rect? centerSlice, + bool matchTextDirection = false, + bool gaplessPlayback = false, + bool isAntiAlias = false, + String? package, + FilterQuality filterQuality = FilterQuality.low, + int? cacheWidth, + int? cacheHeight, + }) { + return Image.asset( + _assetName, + key: key, + bundle: bundle, + frameBuilder: frameBuilder, + errorBuilder: errorBuilder, + semanticLabel: semanticLabel, + excludeFromSemantics: excludeFromSemantics, + scale: scale, + width: width, + height: height, + color: color, + opacity: opacity, + colorBlendMode: colorBlendMode, + fit: fit, + alignment: alignment, + repeat: repeat, + centerSlice: centerSlice, + matchTextDirection: matchTextDirection, + gaplessPlayback: gaplessPlayback, + isAntiAlias: isAntiAlias, + package: package, + filterQuality: filterQuality, + cacheWidth: cacheWidth, + cacheHeight: cacheHeight, + ); + } + + ImageProvider provider({ + AssetBundle? bundle, + String? package, + }) { + return AssetImage( + _assetName, + bundle: bundle, + package: package, + ); + } + + String get path => _assetName; + + String get keyName => _assetName; +} diff --git a/mobile-v2/lib/utils/mixins/log_context.mixin.dart b/mobile-v2/lib/utils/mixins/log_context.mixin.dart new file mode 100644 index 0000000000..54b3eaf9d6 --- /dev/null +++ b/mobile-v2/lib/utils/mixins/log_context.mixin.dart @@ -0,0 +1,14 @@ +import 'package:flutter/foundation.dart'; +import 'package:logging/logging.dart'; + +mixin LogContext { + late final String ctx = logContext; + + /// Context name of the log message + /// Override this to provide a custom name + String get logContext => runtimeType.toString(); + + @protected + @nonVirtual + Logger get log => Logger.detached(ctx); +} diff --git a/mobile-v2/openapi/.gitignore b/mobile-v2/openapi/.gitignore new file mode 100644 index 0000000000..4298cdcbd1 --- /dev/null +++ b/mobile-v2/openapi/.gitignore @@ -0,0 +1,41 @@ +# See https://dart.dev/guides/libraries/private-files + +# Files and directories created by pub +.dart_tool/ +.buildlog +.packages +.project +.pub/ +build/ +**/packages/ + +# Files created by dart2js +# (Most Dart developers will use pub build to compile Dart, use/modify these +# rules if you intend to use dart2js directly +# Convention is to use extension '.dart.js' for Dart compiled to Javascript to +# differentiate from explicit Javascript files) +*.dart.js +*.part.js +*.js.deps +*.js.map +*.info.json + +# Directory created by dartdoc +doc/api/ + +# Don't commit pubspec lock file +# (Library packages only! Remove pattern if developing an application package) +pubspec.lock + +# Don’t commit files and directories created by other development environments. +# For example, if your development environment creates any of the following files, +# consider putting them in a global ignore file: + +# IntelliJ +*.iml +*.ipr +*.iws +.idea/ + +# Mac +.DS_Store diff --git a/mobile-v2/openapi/.openapi-generator-ignore b/mobile-v2/openapi/.openapi-generator-ignore new file mode 100644 index 0000000000..7484ee590a --- /dev/null +++ b/mobile-v2/openapi/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/mobile-v2/openapi/.openapi-generator/FILES b/mobile-v2/openapi/.openapi-generator/FILES new file mode 100644 index 0000000000..45401dd919 --- /dev/null +++ b/mobile-v2/openapi/.openapi-generator/FILES @@ -0,0 +1,221 @@ +.gitignore +.openapi-generator-ignore +README.md +analysis_options.yaml +lib/openapi.dart +lib/src/api.dart +lib/src/api/activity_api.dart +lib/src/api/album_api.dart +lib/src/api/api_key_api.dart +lib/src/api/asset_api.dart +lib/src/api/audit_api.dart +lib/src/api/authentication_api.dart +lib/src/api/download_api.dart +lib/src/api/face_api.dart +lib/src/api/file_report_api.dart +lib/src/api/job_api.dart +lib/src/api/library_api.dart +lib/src/api/memory_api.dart +lib/src/api/o_auth_api.dart +lib/src/api/partner_api.dart +lib/src/api/person_api.dart +lib/src/api/search_api.dart +lib/src/api/server_info_api.dart +lib/src/api/sessions_api.dart +lib/src/api/shared_link_api.dart +lib/src/api/sync_api.dart +lib/src/api/system_config_api.dart +lib/src/api/system_metadata_api.dart +lib/src/api/tag_api.dart +lib/src/api/timeline_api.dart +lib/src/api/trash_api.dart +lib/src/api/user_api.dart +lib/src/api_util.dart +lib/src/auth/api_key_auth.dart +lib/src/auth/auth.dart +lib/src/auth/basic_auth.dart +lib/src/auth/bearer_auth.dart +lib/src/auth/oauth.dart +lib/src/date_serializer.dart +lib/src/model/activity_create_dto.dart +lib/src/model/activity_response_dto.dart +lib/src/model/activity_statistics_response_dto.dart +lib/src/model/add_users_dto.dart +lib/src/model/admin_onboarding_update_dto.dart +lib/src/model/album_count_response_dto.dart +lib/src/model/album_response_dto.dart +lib/src/model/all_job_status_response_dto.dart +lib/src/model/api_key_create_dto.dart +lib/src/model/api_key_create_response_dto.dart +lib/src/model/api_key_response_dto.dart +lib/src/model/api_key_update_dto.dart +lib/src/model/asset_bulk_delete_dto.dart +lib/src/model/asset_bulk_update_dto.dart +lib/src/model/asset_bulk_upload_check_dto.dart +lib/src/model/asset_bulk_upload_check_item.dart +lib/src/model/asset_bulk_upload_check_response_dto.dart +lib/src/model/asset_bulk_upload_check_result.dart +lib/src/model/asset_delta_sync_response_dto.dart +lib/src/model/asset_face_response_dto.dart +lib/src/model/asset_face_update_dto.dart +lib/src/model/asset_face_update_item.dart +lib/src/model/asset_face_without_person_response_dto.dart +lib/src/model/asset_file_upload_response_dto.dart +lib/src/model/asset_ids_dto.dart +lib/src/model/asset_ids_response_dto.dart +lib/src/model/asset_job_name.dart +lib/src/model/asset_jobs_dto.dart +lib/src/model/asset_order.dart +lib/src/model/asset_response_dto.dart +lib/src/model/asset_stats_response_dto.dart +lib/src/model/asset_type_enum.dart +lib/src/model/audio_codec.dart +lib/src/model/audit_deletes_response_dto.dart +lib/src/model/bulk_id_response_dto.dart +lib/src/model/bulk_ids_dto.dart +lib/src/model/change_password_dto.dart +lib/src/model/check_existing_assets_dto.dart +lib/src/model/check_existing_assets_response_dto.dart +lib/src/model/clip_config.dart +lib/src/model/clip_mode.dart +lib/src/model/colorspace.dart +lib/src/model/cq_mode.dart +lib/src/model/create_album_dto.dart +lib/src/model/create_asset_dto.dart +lib/src/model/create_library_dto.dart +lib/src/model/create_profile_image_dto.dart +lib/src/model/create_profile_image_response_dto.dart +lib/src/model/create_tag_dto.dart +lib/src/model/create_user_dto.dart +lib/src/model/curated_locations_response_dto.dart +lib/src/model/curated_objects_response_dto.dart +lib/src/model/date.dart +lib/src/model/delete_user_dto.dart +lib/src/model/download_archive_info.dart +lib/src/model/download_info_dto.dart +lib/src/model/download_response_dto.dart +lib/src/model/entity_type.dart +lib/src/model/exif_response_dto.dart +lib/src/model/face_dto.dart +lib/src/model/file_checksum_dto.dart +lib/src/model/file_checksum_response_dto.dart +lib/src/model/file_report_dto.dart +lib/src/model/file_report_fix_dto.dart +lib/src/model/file_report_item_dto.dart +lib/src/model/image_format.dart +lib/src/model/job_command.dart +lib/src/model/job_command_dto.dart +lib/src/model/job_counts_dto.dart +lib/src/model/job_name.dart +lib/src/model/job_settings_dto.dart +lib/src/model/job_status_dto.dart +lib/src/model/library_response_dto.dart +lib/src/model/library_stats_response_dto.dart +lib/src/model/library_type.dart +lib/src/model/log_level.dart +lib/src/model/login_credential_dto.dart +lib/src/model/login_response_dto.dart +lib/src/model/logout_response_dto.dart +lib/src/model/map_marker_response_dto.dart +lib/src/model/map_theme.dart +lib/src/model/memory_create_dto.dart +lib/src/model/memory_lane_response_dto.dart +lib/src/model/memory_response_dto.dart +lib/src/model/memory_type.dart +lib/src/model/memory_update_dto.dart +lib/src/model/merge_person_dto.dart +lib/src/model/metadata_search_dto.dart +lib/src/model/model_type.dart +lib/src/model/o_auth_authorize_response_dto.dart +lib/src/model/o_auth_callback_dto.dart +lib/src/model/o_auth_config_dto.dart +lib/src/model/on_this_day_dto.dart +lib/src/model/partner_response_dto.dart +lib/src/model/path_entity_type.dart +lib/src/model/path_type.dart +lib/src/model/people_response_dto.dart +lib/src/model/people_update_dto.dart +lib/src/model/people_update_item.dart +lib/src/model/person_create_dto.dart +lib/src/model/person_response_dto.dart +lib/src/model/person_statistics_response_dto.dart +lib/src/model/person_update_dto.dart +lib/src/model/person_with_faces_response_dto.dart +lib/src/model/places_response_dto.dart +lib/src/model/queue_status_dto.dart +lib/src/model/reaction_level.dart +lib/src/model/reaction_type.dart +lib/src/model/recognition_config.dart +lib/src/model/reverse_geocoding_state_response_dto.dart +lib/src/model/scan_library_dto.dart +lib/src/model/search_album_response_dto.dart +lib/src/model/search_asset_response_dto.dart +lib/src/model/search_explore_item.dart +lib/src/model/search_explore_response_dto.dart +lib/src/model/search_facet_count_response_dto.dart +lib/src/model/search_facet_response_dto.dart +lib/src/model/search_response_dto.dart +lib/src/model/search_suggestion_type.dart +lib/src/model/server_config_dto.dart +lib/src/model/server_features_dto.dart +lib/src/model/server_info_response_dto.dart +lib/src/model/server_media_types_response_dto.dart +lib/src/model/server_ping_response.dart +lib/src/model/server_stats_response_dto.dart +lib/src/model/server_theme_dto.dart +lib/src/model/server_version_response_dto.dart +lib/src/model/session_response_dto.dart +lib/src/model/shared_link_create_dto.dart +lib/src/model/shared_link_edit_dto.dart +lib/src/model/shared_link_response_dto.dart +lib/src/model/shared_link_type.dart +lib/src/model/sign_up_dto.dart +lib/src/model/smart_info_response_dto.dart +lib/src/model/smart_search_dto.dart +lib/src/model/system_config_dto.dart +lib/src/model/system_config_f_fmpeg_dto.dart +lib/src/model/system_config_image_dto.dart +lib/src/model/system_config_job_dto.dart +lib/src/model/system_config_library_dto.dart +lib/src/model/system_config_library_scan_dto.dart +lib/src/model/system_config_library_watch_dto.dart +lib/src/model/system_config_logging_dto.dart +lib/src/model/system_config_machine_learning_dto.dart +lib/src/model/system_config_map_dto.dart +lib/src/model/system_config_new_version_check_dto.dart +lib/src/model/system_config_o_auth_dto.dart +lib/src/model/system_config_password_login_dto.dart +lib/src/model/system_config_reverse_geocoding_dto.dart +lib/src/model/system_config_server_dto.dart +lib/src/model/system_config_storage_template_dto.dart +lib/src/model/system_config_template_storage_option_dto.dart +lib/src/model/system_config_theme_dto.dart +lib/src/model/system_config_trash_dto.dart +lib/src/model/system_config_user_dto.dart +lib/src/model/tag_response_dto.dart +lib/src/model/tag_type_enum.dart +lib/src/model/thumbnail_format.dart +lib/src/model/time_bucket_response_dto.dart +lib/src/model/time_bucket_size.dart +lib/src/model/tone_mapping.dart +lib/src/model/transcode_hw_accel.dart +lib/src/model/transcode_policy.dart +lib/src/model/update_album_dto.dart +lib/src/model/update_asset_dto.dart +lib/src/model/update_library_dto.dart +lib/src/model/update_partner_dto.dart +lib/src/model/update_stack_parent_dto.dart +lib/src/model/update_tag_dto.dart +lib/src/model/update_user_dto.dart +lib/src/model/usage_by_user_dto.dart +lib/src/model/user_avatar_color.dart +lib/src/model/user_dto.dart +lib/src/model/user_response_dto.dart +lib/src/model/user_status.dart +lib/src/model/validate_access_token_response_dto.dart +lib/src/model/validate_library_dto.dart +lib/src/model/validate_library_import_path_response_dto.dart +lib/src/model/validate_library_response_dto.dart +lib/src/model/video_codec.dart +lib/src/serializers.dart +pubspec.yaml diff --git a/mobile-v2/openapi/.openapi-generator/VERSION b/mobile-v2/openapi/.openapi-generator/VERSION new file mode 100644 index 0000000000..4b49d9bb63 --- /dev/null +++ b/mobile-v2/openapi/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.2.0 \ No newline at end of file diff --git a/mobile-v2/openapi/README.md b/mobile-v2/openapi/README.md new file mode 100644 index 0000000000..c62219a1d0 --- /dev/null +++ b/mobile-v2/openapi/README.md @@ -0,0 +1,427 @@ +# openapi (EXPERIMENTAL) +Immich API + +This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.102.3 +- Build package: org.openapitools.codegen.languages.DartDioClientCodegen + +## Requirements + +* Dart 2.15.0+ or Flutter 2.8.0+ +* Dio 5.0.0+ (https://pub.dev/packages/dio) + +## Installation & Usage + +### pub.dev +To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml +```yaml +dependencies: + openapi: 1.0.0 +``` + +### Github +If this Dart package is published to Github, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + git: + url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git + #ref: main +``` + +### Local development +To use the package from your local drive, please include the following in pubspec.yaml +```yaml +dependencies: + openapi: + path: /path/to/openapi +``` + +## Getting Started + +Please follow the [installation procedure](#installation--usage) and then run the following: + +```dart +import 'package:openapi/openapi.dart'; + + +final api = Openapi().getAPIKeyApi(); +final APIKeyCreateDto aPIKeyCreateDto = ; // APIKeyCreateDto | + +try { + final response = await api.createApiKey(aPIKeyCreateDto); + print(response); +} catch on DioException (e) { + print("Exception when calling APIKeyApi->createApiKey: $e\n"); +} + +``` + +## Documentation for API Endpoints + +All URIs are relative to */api* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +[*APIKeyApi*](doc/APIKeyApi.md) | [**createApiKey**](doc/APIKeyApi.md#createapikey) | **POST** /api-key | +[*APIKeyApi*](doc/APIKeyApi.md) | [**deleteApiKey**](doc/APIKeyApi.md#deleteapikey) | **DELETE** /api-key/{id} | +[*APIKeyApi*](doc/APIKeyApi.md) | [**getApiKey**](doc/APIKeyApi.md#getapikey) | **GET** /api-key/{id} | +[*APIKeyApi*](doc/APIKeyApi.md) | [**getApiKeys**](doc/APIKeyApi.md#getapikeys) | **GET** /api-key | +[*APIKeyApi*](doc/APIKeyApi.md) | [**updateApiKey**](doc/APIKeyApi.md#updateapikey) | **PUT** /api-key/{id} | +[*ActivityApi*](doc/ActivityApi.md) | [**createActivity**](doc/ActivityApi.md#createactivity) | **POST** /activity | +[*ActivityApi*](doc/ActivityApi.md) | [**deleteActivity**](doc/ActivityApi.md#deleteactivity) | **DELETE** /activity/{id} | +[*ActivityApi*](doc/ActivityApi.md) | [**getActivities**](doc/ActivityApi.md#getactivities) | **GET** /activity | +[*ActivityApi*](doc/ActivityApi.md) | [**getActivityStatistics**](doc/ActivityApi.md#getactivitystatistics) | **GET** /activity/statistics | +[*AlbumApi*](doc/AlbumApi.md) | [**addAssetsToAlbum**](doc/AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets | +[*AlbumApi*](doc/AlbumApi.md) | [**addUsersToAlbum**](doc/AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users | +[*AlbumApi*](doc/AlbumApi.md) | [**createAlbum**](doc/AlbumApi.md#createalbum) | **POST** /album | +[*AlbumApi*](doc/AlbumApi.md) | [**deleteAlbum**](doc/AlbumApi.md#deletealbum) | **DELETE** /album/{id} | +[*AlbumApi*](doc/AlbumApi.md) | [**getAlbumCount**](doc/AlbumApi.md#getalbumcount) | **GET** /album/count | +[*AlbumApi*](doc/AlbumApi.md) | [**getAlbumInfo**](doc/AlbumApi.md#getalbuminfo) | **GET** /album/{id} | +[*AlbumApi*](doc/AlbumApi.md) | [**getAllAlbums**](doc/AlbumApi.md#getallalbums) | **GET** /album | +[*AlbumApi*](doc/AlbumApi.md) | [**removeAssetFromAlbum**](doc/AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets | +[*AlbumApi*](doc/AlbumApi.md) | [**removeUserFromAlbum**](doc/AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} | +[*AlbumApi*](doc/AlbumApi.md) | [**updateAlbumInfo**](doc/AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} | +[*AssetApi*](doc/AssetApi.md) | [**checkBulkUpload**](doc/AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check | +[*AssetApi*](doc/AssetApi.md) | [**checkExistingAssets**](doc/AssetApi.md#checkexistingassets) | **POST** /asset/exist | +[*AssetApi*](doc/AssetApi.md) | [**deleteAssets**](doc/AssetApi.md#deleteassets) | **DELETE** /asset | +[*AssetApi*](doc/AssetApi.md) | [**getAllAssets**](doc/AssetApi.md#getallassets) | **GET** /asset | +[*AssetApi*](doc/AssetApi.md) | [**getAllUserAssetsByDeviceId**](doc/AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} | +[*AssetApi*](doc/AssetApi.md) | [**getAssetInfo**](doc/AssetApi.md#getassetinfo) | **GET** /asset/{id} | +[*AssetApi*](doc/AssetApi.md) | [**getAssetSearchTerms**](doc/AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms | +[*AssetApi*](doc/AssetApi.md) | [**getAssetStatistics**](doc/AssetApi.md#getassetstatistics) | **GET** /asset/statistics | +[*AssetApi*](doc/AssetApi.md) | [**getAssetThumbnail**](doc/AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} | +[*AssetApi*](doc/AssetApi.md) | [**getCuratedLocations**](doc/AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations | +[*AssetApi*](doc/AssetApi.md) | [**getCuratedObjects**](doc/AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects | +[*AssetApi*](doc/AssetApi.md) | [**getMapMarkers**](doc/AssetApi.md#getmapmarkers) | **GET** /asset/map-marker | +[*AssetApi*](doc/AssetApi.md) | [**getMemoryLane**](doc/AssetApi.md#getmemorylane) | **GET** /asset/memory-lane | +[*AssetApi*](doc/AssetApi.md) | [**getRandom**](doc/AssetApi.md#getrandom) | **GET** /asset/random | +[*AssetApi*](doc/AssetApi.md) | [**runAssetJobs**](doc/AssetApi.md#runassetjobs) | **POST** /asset/jobs | +[*AssetApi*](doc/AssetApi.md) | [**searchAssets**](doc/AssetApi.md#searchassets) | **GET** /assets | +[*AssetApi*](doc/AssetApi.md) | [**serveFile**](doc/AssetApi.md#servefile) | **GET** /asset/file/{id} | +[*AssetApi*](doc/AssetApi.md) | [**updateAsset**](doc/AssetApi.md#updateasset) | **PUT** /asset/{id} | +[*AssetApi*](doc/AssetApi.md) | [**updateAssets**](doc/AssetApi.md#updateassets) | **PUT** /asset | +[*AssetApi*](doc/AssetApi.md) | [**updateStackParent**](doc/AssetApi.md#updatestackparent) | **PUT** /asset/stack/parent | +[*AssetApi*](doc/AssetApi.md) | [**uploadFile**](doc/AssetApi.md#uploadfile) | **POST** /asset/upload | +[*AuditApi*](doc/AuditApi.md) | [**getAuditDeletes**](doc/AuditApi.md#getauditdeletes) | **GET** /audit/deletes | +[*AuthenticationApi*](doc/AuthenticationApi.md) | [**changePassword**](doc/AuthenticationApi.md#changepassword) | **POST** /auth/change-password | +[*AuthenticationApi*](doc/AuthenticationApi.md) | [**login**](doc/AuthenticationApi.md#login) | **POST** /auth/login | +[*AuthenticationApi*](doc/AuthenticationApi.md) | [**logout**](doc/AuthenticationApi.md#logout) | **POST** /auth/logout | +[*AuthenticationApi*](doc/AuthenticationApi.md) | [**signUpAdmin**](doc/AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | +[*AuthenticationApi*](doc/AuthenticationApi.md) | [**validateAccessToken**](doc/AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | +[*DownloadApi*](doc/DownloadApi.md) | [**downloadArchive**](doc/DownloadApi.md#downloadarchive) | **POST** /download/archive | +[*DownloadApi*](doc/DownloadApi.md) | [**downloadFile**](doc/DownloadApi.md#downloadfile) | **POST** /download/asset/{id} | +[*DownloadApi*](doc/DownloadApi.md) | [**getDownloadInfo**](doc/DownloadApi.md#getdownloadinfo) | **POST** /download/info | +[*FaceApi*](doc/FaceApi.md) | [**getFaces**](doc/FaceApi.md#getfaces) | **GET** /face | +[*FaceApi*](doc/FaceApi.md) | [**reassignFacesById**](doc/FaceApi.md#reassignfacesbyid) | **PUT** /face/{id} | +[*FileReportApi*](doc/FileReportApi.md) | [**fixAuditFiles**](doc/FileReportApi.md#fixauditfiles) | **POST** /report/fix | +[*FileReportApi*](doc/FileReportApi.md) | [**getAuditFiles**](doc/FileReportApi.md#getauditfiles) | **GET** /report | +[*FileReportApi*](doc/FileReportApi.md) | [**getFileChecksums**](doc/FileReportApi.md#getfilechecksums) | **POST** /report/checksum | +[*JobApi*](doc/JobApi.md) | [**getAllJobsStatus**](doc/JobApi.md#getalljobsstatus) | **GET** /jobs | +[*JobApi*](doc/JobApi.md) | [**sendJobCommand**](doc/JobApi.md#sendjobcommand) | **PUT** /jobs/{id} | +[*LibraryApi*](doc/LibraryApi.md) | [**createLibrary**](doc/LibraryApi.md#createlibrary) | **POST** /library | +[*LibraryApi*](doc/LibraryApi.md) | [**deleteLibrary**](doc/LibraryApi.md#deletelibrary) | **DELETE** /library/{id} | +[*LibraryApi*](doc/LibraryApi.md) | [**getAllLibraries**](doc/LibraryApi.md#getalllibraries) | **GET** /library | +[*LibraryApi*](doc/LibraryApi.md) | [**getLibrary**](doc/LibraryApi.md#getlibrary) | **GET** /library/{id} | +[*LibraryApi*](doc/LibraryApi.md) | [**getLibraryStatistics**](doc/LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics | +[*LibraryApi*](doc/LibraryApi.md) | [**removeOfflineFiles**](doc/LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline | +[*LibraryApi*](doc/LibraryApi.md) | [**scanLibrary**](doc/LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan | +[*LibraryApi*](doc/LibraryApi.md) | [**updateLibrary**](doc/LibraryApi.md#updatelibrary) | **PUT** /library/{id} | +[*LibraryApi*](doc/LibraryApi.md) | [**validate**](doc/LibraryApi.md#validate) | **POST** /library/{id}/validate | +[*MemoryApi*](doc/MemoryApi.md) | [**addMemoryAssets**](doc/MemoryApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | +[*MemoryApi*](doc/MemoryApi.md) | [**createMemory**](doc/MemoryApi.md#creatememory) | **POST** /memories | +[*MemoryApi*](doc/MemoryApi.md) | [**deleteMemory**](doc/MemoryApi.md#deletememory) | **DELETE** /memories/{id} | +[*MemoryApi*](doc/MemoryApi.md) | [**getMemory**](doc/MemoryApi.md#getmemory) | **GET** /memories/{id} | +[*MemoryApi*](doc/MemoryApi.md) | [**removeMemoryAssets**](doc/MemoryApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | +[*MemoryApi*](doc/MemoryApi.md) | [**searchMemories**](doc/MemoryApi.md#searchmemories) | **GET** /memories | +[*MemoryApi*](doc/MemoryApi.md) | [**updateMemory**](doc/MemoryApi.md#updatememory) | **PUT** /memories/{id} | +[*OAuthApi*](doc/OAuthApi.md) | [**finishOAuth**](doc/OAuthApi.md#finishoauth) | **POST** /oauth/callback | +[*OAuthApi*](doc/OAuthApi.md) | [**linkOAuthAccount**](doc/OAuthApi.md#linkoauthaccount) | **POST** /oauth/link | +[*OAuthApi*](doc/OAuthApi.md) | [**redirectOAuthToMobile**](doc/OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | +[*OAuthApi*](doc/OAuthApi.md) | [**startOAuth**](doc/OAuthApi.md#startoauth) | **POST** /oauth/authorize | +[*OAuthApi*](doc/OAuthApi.md) | [**unlinkOAuthAccount**](doc/OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | +[*PartnerApi*](doc/PartnerApi.md) | [**createPartner**](doc/PartnerApi.md#createpartner) | **POST** /partner/{id} | +[*PartnerApi*](doc/PartnerApi.md) | [**getPartners**](doc/PartnerApi.md#getpartners) | **GET** /partner | +[*PartnerApi*](doc/PartnerApi.md) | [**removePartner**](doc/PartnerApi.md#removepartner) | **DELETE** /partner/{id} | +[*PartnerApi*](doc/PartnerApi.md) | [**updatePartner**](doc/PartnerApi.md#updatepartner) | **PUT** /partner/{id} | +[*PersonApi*](doc/PersonApi.md) | [**createPerson**](doc/PersonApi.md#createperson) | **POST** /person | +[*PersonApi*](doc/PersonApi.md) | [**getAllPeople**](doc/PersonApi.md#getallpeople) | **GET** /person | +[*PersonApi*](doc/PersonApi.md) | [**getPerson**](doc/PersonApi.md#getperson) | **GET** /person/{id} | +[*PersonApi*](doc/PersonApi.md) | [**getPersonAssets**](doc/PersonApi.md#getpersonassets) | **GET** /person/{id}/assets | +[*PersonApi*](doc/PersonApi.md) | [**getPersonStatistics**](doc/PersonApi.md#getpersonstatistics) | **GET** /person/{id}/statistics | +[*PersonApi*](doc/PersonApi.md) | [**getPersonThumbnail**](doc/PersonApi.md#getpersonthumbnail) | **GET** /person/{id}/thumbnail | +[*PersonApi*](doc/PersonApi.md) | [**mergePerson**](doc/PersonApi.md#mergeperson) | **POST** /person/{id}/merge | +[*PersonApi*](doc/PersonApi.md) | [**reassignFaces**](doc/PersonApi.md#reassignfaces) | **PUT** /person/{id}/reassign | +[*PersonApi*](doc/PersonApi.md) | [**updatePeople**](doc/PersonApi.md#updatepeople) | **PUT** /person | +[*PersonApi*](doc/PersonApi.md) | [**updatePerson**](doc/PersonApi.md#updateperson) | **PUT** /person/{id} | +[*SearchApi*](doc/SearchApi.md) | [**getAssetsByCity**](doc/SearchApi.md#getassetsbycity) | **GET** /search/cities | +[*SearchApi*](doc/SearchApi.md) | [**getExploreData**](doc/SearchApi.md#getexploredata) | **GET** /search/explore | +[*SearchApi*](doc/SearchApi.md) | [**getSearchSuggestions**](doc/SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | +[*SearchApi*](doc/SearchApi.md) | [**search**](doc/SearchApi.md#search) | **GET** /search | +[*SearchApi*](doc/SearchApi.md) | [**searchMetadata**](doc/SearchApi.md#searchmetadata) | **POST** /search/metadata | +[*SearchApi*](doc/SearchApi.md) | [**searchPerson**](doc/SearchApi.md#searchperson) | **GET** /search/person | +[*SearchApi*](doc/SearchApi.md) | [**searchPlaces**](doc/SearchApi.md#searchplaces) | **GET** /search/places | +[*SearchApi*](doc/SearchApi.md) | [**searchSmart**](doc/SearchApi.md#searchsmart) | **POST** /search/smart | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerConfig**](doc/ServerInfoApi.md#getserverconfig) | **GET** /server-info/config | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerFeatures**](doc/ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerInfo**](doc/ServerInfoApi.md#getserverinfo) | **GET** /server-info | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerStatistics**](doc/ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerVersion**](doc/ServerInfoApi.md#getserverversion) | **GET** /server-info/version | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getSupportedMediaTypes**](doc/ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getTheme**](doc/ServerInfoApi.md#gettheme) | **GET** /server-info/theme | +[*ServerInfoApi*](doc/ServerInfoApi.md) | [**pingServer**](doc/ServerInfoApi.md#pingserver) | **GET** /server-info/ping | +[*SessionsApi*](doc/SessionsApi.md) | [**deleteAllSessions**](doc/SessionsApi.md#deleteallsessions) | **DELETE** /sessions | +[*SessionsApi*](doc/SessionsApi.md) | [**deleteSession**](doc/SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | +[*SessionsApi*](doc/SessionsApi.md) | [**getSessions**](doc/SessionsApi.md#getsessions) | **GET** /sessions | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**addSharedLinkAssets**](doc/SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-link/{id}/assets | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**createSharedLink**](doc/SharedLinkApi.md#createsharedlink) | **POST** /shared-link | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getAllSharedLinks**](doc/SharedLinkApi.md#getallsharedlinks) | **GET** /shared-link | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getMySharedLink**](doc/SharedLinkApi.md#getmysharedlink) | **GET** /shared-link/me | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getSharedLinkById**](doc/SharedLinkApi.md#getsharedlinkbyid) | **GET** /shared-link/{id} | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**removeSharedLink**](doc/SharedLinkApi.md#removesharedlink) | **DELETE** /shared-link/{id} | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**removeSharedLinkAssets**](doc/SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets | +[*SharedLinkApi*](doc/SharedLinkApi.md) | [**updateSharedLink**](doc/SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} | +[*SyncApi*](doc/SyncApi.md) | [**getAllForUserFullSync**](doc/SyncApi.md#getallforuserfullsync) | **GET** /sync/full-sync | +[*SyncApi*](doc/SyncApi.md) | [**getDeltaSync**](doc/SyncApi.md#getdeltasync) | **GET** /sync/delta-sync | +[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getConfig**](doc/SystemConfigApi.md#getconfig) | **GET** /system-config | +[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getConfigDefaults**](doc/SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | +[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getMapStyle**](doc/SystemConfigApi.md#getmapstyle) | **GET** /system-config/map/style.json | +[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getStorageTemplateOptions**](doc/SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | +[*SystemConfigApi*](doc/SystemConfigApi.md) | [**updateConfig**](doc/SystemConfigApi.md#updateconfig) | **PUT** /system-config | +[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**getAdminOnboarding**](doc/SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | +[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**getReverseGeocodingState**](doc/SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | +[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**updateAdminOnboarding**](doc/SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | +[*TagApi*](doc/TagApi.md) | [**createTag**](doc/TagApi.md#createtag) | **POST** /tag | +[*TagApi*](doc/TagApi.md) | [**deleteTag**](doc/TagApi.md#deletetag) | **DELETE** /tag/{id} | +[*TagApi*](doc/TagApi.md) | [**getAllTags**](doc/TagApi.md#getalltags) | **GET** /tag | +[*TagApi*](doc/TagApi.md) | [**getTagAssets**](doc/TagApi.md#gettagassets) | **GET** /tag/{id}/assets | +[*TagApi*](doc/TagApi.md) | [**getTagById**](doc/TagApi.md#gettagbyid) | **GET** /tag/{id} | +[*TagApi*](doc/TagApi.md) | [**tagAssets**](doc/TagApi.md#tagassets) | **PUT** /tag/{id}/assets | +[*TagApi*](doc/TagApi.md) | [**untagAssets**](doc/TagApi.md#untagassets) | **DELETE** /tag/{id}/assets | +[*TagApi*](doc/TagApi.md) | [**updateTag**](doc/TagApi.md#updatetag) | **PATCH** /tag/{id} | +[*TimelineApi*](doc/TimelineApi.md) | [**getTimeBucket**](doc/TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | +[*TimelineApi*](doc/TimelineApi.md) | [**getTimeBuckets**](doc/TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | +[*TrashApi*](doc/TrashApi.md) | [**emptyTrash**](doc/TrashApi.md#emptytrash) | **POST** /trash/empty | +[*TrashApi*](doc/TrashApi.md) | [**restoreAssets**](doc/TrashApi.md#restoreassets) | **POST** /trash/restore/assets | +[*TrashApi*](doc/TrashApi.md) | [**restoreTrash**](doc/TrashApi.md#restoretrash) | **POST** /trash/restore | +[*UserApi*](doc/UserApi.md) | [**createProfileImage**](doc/UserApi.md#createprofileimage) | **POST** /user/profile-image | +[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user | +[*UserApi*](doc/UserApi.md) | [**deleteProfileImage**](doc/UserApi.md#deleteprofileimage) | **DELETE** /user/profile-image | +[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{id} | +[*UserApi*](doc/UserApi.md) | [**getAllUsers**](doc/UserApi.md#getallusers) | **GET** /user | +[*UserApi*](doc/UserApi.md) | [**getMyUserInfo**](doc/UserApi.md#getmyuserinfo) | **GET** /user/me | +[*UserApi*](doc/UserApi.md) | [**getProfileImage**](doc/UserApi.md#getprofileimage) | **GET** /user/profile-image/{id} | +[*UserApi*](doc/UserApi.md) | [**getUserById**](doc/UserApi.md#getuserbyid) | **GET** /user/info/{id} | +[*UserApi*](doc/UserApi.md) | [**restoreUser**](doc/UserApi.md#restoreuser) | **POST** /user/{id}/restore | +[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user | + + +## Documentation For Models + + - [APIKeyCreateDto](doc/APIKeyCreateDto.md) + - [APIKeyCreateResponseDto](doc/APIKeyCreateResponseDto.md) + - [APIKeyResponseDto](doc/APIKeyResponseDto.md) + - [APIKeyUpdateDto](doc/APIKeyUpdateDto.md) + - [ActivityCreateDto](doc/ActivityCreateDto.md) + - [ActivityResponseDto](doc/ActivityResponseDto.md) + - [ActivityStatisticsResponseDto](doc/ActivityStatisticsResponseDto.md) + - [AddUsersDto](doc/AddUsersDto.md) + - [AdminOnboardingUpdateDto](doc/AdminOnboardingUpdateDto.md) + - [AlbumCountResponseDto](doc/AlbumCountResponseDto.md) + - [AlbumResponseDto](doc/AlbumResponseDto.md) + - [AllJobStatusResponseDto](doc/AllJobStatusResponseDto.md) + - [AssetBulkDeleteDto](doc/AssetBulkDeleteDto.md) + - [AssetBulkUpdateDto](doc/AssetBulkUpdateDto.md) + - [AssetBulkUploadCheckDto](doc/AssetBulkUploadCheckDto.md) + - [AssetBulkUploadCheckItem](doc/AssetBulkUploadCheckItem.md) + - [AssetBulkUploadCheckResponseDto](doc/AssetBulkUploadCheckResponseDto.md) + - [AssetBulkUploadCheckResult](doc/AssetBulkUploadCheckResult.md) + - [AssetDeltaSyncResponseDto](doc/AssetDeltaSyncResponseDto.md) + - [AssetFaceResponseDto](doc/AssetFaceResponseDto.md) + - [AssetFaceUpdateDto](doc/AssetFaceUpdateDto.md) + - [AssetFaceUpdateItem](doc/AssetFaceUpdateItem.md) + - [AssetFaceWithoutPersonResponseDto](doc/AssetFaceWithoutPersonResponseDto.md) + - [AssetFileUploadResponseDto](doc/AssetFileUploadResponseDto.md) + - [AssetIdsDto](doc/AssetIdsDto.md) + - [AssetIdsResponseDto](doc/AssetIdsResponseDto.md) + - [AssetJobName](doc/AssetJobName.md) + - [AssetJobsDto](doc/AssetJobsDto.md) + - [AssetOrder](doc/AssetOrder.md) + - [AssetResponseDto](doc/AssetResponseDto.md) + - [AssetStatsResponseDto](doc/AssetStatsResponseDto.md) + - [AssetTypeEnum](doc/AssetTypeEnum.md) + - [AudioCodec](doc/AudioCodec.md) + - [AuditDeletesResponseDto](doc/AuditDeletesResponseDto.md) + - [BulkIdResponseDto](doc/BulkIdResponseDto.md) + - [BulkIdsDto](doc/BulkIdsDto.md) + - [CLIPConfig](doc/CLIPConfig.md) + - [CLIPMode](doc/CLIPMode.md) + - [CQMode](doc/CQMode.md) + - [ChangePasswordDto](doc/ChangePasswordDto.md) + - [CheckExistingAssetsDto](doc/CheckExistingAssetsDto.md) + - [CheckExistingAssetsResponseDto](doc/CheckExistingAssetsResponseDto.md) + - [Colorspace](doc/Colorspace.md) + - [CreateAlbumDto](doc/CreateAlbumDto.md) + - [CreateAssetDto](doc/CreateAssetDto.md) + - [CreateLibraryDto](doc/CreateLibraryDto.md) + - [CreateProfileImageDto](doc/CreateProfileImageDto.md) + - [CreateProfileImageResponseDto](doc/CreateProfileImageResponseDto.md) + - [CreateTagDto](doc/CreateTagDto.md) + - [CreateUserDto](doc/CreateUserDto.md) + - [CuratedLocationsResponseDto](doc/CuratedLocationsResponseDto.md) + - [CuratedObjectsResponseDto](doc/CuratedObjectsResponseDto.md) + - [DeleteUserDto](doc/DeleteUserDto.md) + - [DownloadArchiveInfo](doc/DownloadArchiveInfo.md) + - [DownloadInfoDto](doc/DownloadInfoDto.md) + - [DownloadResponseDto](doc/DownloadResponseDto.md) + - [EntityType](doc/EntityType.md) + - [ExifResponseDto](doc/ExifResponseDto.md) + - [FaceDto](doc/FaceDto.md) + - [FileChecksumDto](doc/FileChecksumDto.md) + - [FileChecksumResponseDto](doc/FileChecksumResponseDto.md) + - [FileReportDto](doc/FileReportDto.md) + - [FileReportFixDto](doc/FileReportFixDto.md) + - [FileReportItemDto](doc/FileReportItemDto.md) + - [ImageFormat](doc/ImageFormat.md) + - [JobCommand](doc/JobCommand.md) + - [JobCommandDto](doc/JobCommandDto.md) + - [JobCountsDto](doc/JobCountsDto.md) + - [JobName](doc/JobName.md) + - [JobSettingsDto](doc/JobSettingsDto.md) + - [JobStatusDto](doc/JobStatusDto.md) + - [LibraryResponseDto](doc/LibraryResponseDto.md) + - [LibraryStatsResponseDto](doc/LibraryStatsResponseDto.md) + - [LibraryType](doc/LibraryType.md) + - [LogLevel](doc/LogLevel.md) + - [LoginCredentialDto](doc/LoginCredentialDto.md) + - [LoginResponseDto](doc/LoginResponseDto.md) + - [LogoutResponseDto](doc/LogoutResponseDto.md) + - [MapMarkerResponseDto](doc/MapMarkerResponseDto.md) + - [MapTheme](doc/MapTheme.md) + - [MemoryCreateDto](doc/MemoryCreateDto.md) + - [MemoryLaneResponseDto](doc/MemoryLaneResponseDto.md) + - [MemoryResponseDto](doc/MemoryResponseDto.md) + - [MemoryType](doc/MemoryType.md) + - [MemoryUpdateDto](doc/MemoryUpdateDto.md) + - [MergePersonDto](doc/MergePersonDto.md) + - [MetadataSearchDto](doc/MetadataSearchDto.md) + - [ModelType](doc/ModelType.md) + - [OAuthAuthorizeResponseDto](doc/OAuthAuthorizeResponseDto.md) + - [OAuthCallbackDto](doc/OAuthCallbackDto.md) + - [OAuthConfigDto](doc/OAuthConfigDto.md) + - [OnThisDayDto](doc/OnThisDayDto.md) + - [PartnerResponseDto](doc/PartnerResponseDto.md) + - [PathEntityType](doc/PathEntityType.md) + - [PathType](doc/PathType.md) + - [PeopleResponseDto](doc/PeopleResponseDto.md) + - [PeopleUpdateDto](doc/PeopleUpdateDto.md) + - [PeopleUpdateItem](doc/PeopleUpdateItem.md) + - [PersonCreateDto](doc/PersonCreateDto.md) + - [PersonResponseDto](doc/PersonResponseDto.md) + - [PersonStatisticsResponseDto](doc/PersonStatisticsResponseDto.md) + - [PersonUpdateDto](doc/PersonUpdateDto.md) + - [PersonWithFacesResponseDto](doc/PersonWithFacesResponseDto.md) + - [PlacesResponseDto](doc/PlacesResponseDto.md) + - [QueueStatusDto](doc/QueueStatusDto.md) + - [ReactionLevel](doc/ReactionLevel.md) + - [ReactionType](doc/ReactionType.md) + - [RecognitionConfig](doc/RecognitionConfig.md) + - [ReverseGeocodingStateResponseDto](doc/ReverseGeocodingStateResponseDto.md) + - [ScanLibraryDto](doc/ScanLibraryDto.md) + - [SearchAlbumResponseDto](doc/SearchAlbumResponseDto.md) + - [SearchAssetResponseDto](doc/SearchAssetResponseDto.md) + - [SearchExploreItem](doc/SearchExploreItem.md) + - [SearchExploreResponseDto](doc/SearchExploreResponseDto.md) + - [SearchFacetCountResponseDto](doc/SearchFacetCountResponseDto.md) + - [SearchFacetResponseDto](doc/SearchFacetResponseDto.md) + - [SearchResponseDto](doc/SearchResponseDto.md) + - [SearchSuggestionType](doc/SearchSuggestionType.md) + - [ServerConfigDto](doc/ServerConfigDto.md) + - [ServerFeaturesDto](doc/ServerFeaturesDto.md) + - [ServerInfoResponseDto](doc/ServerInfoResponseDto.md) + - [ServerMediaTypesResponseDto](doc/ServerMediaTypesResponseDto.md) + - [ServerPingResponse](doc/ServerPingResponse.md) + - [ServerStatsResponseDto](doc/ServerStatsResponseDto.md) + - [ServerThemeDto](doc/ServerThemeDto.md) + - [ServerVersionResponseDto](doc/ServerVersionResponseDto.md) + - [SessionResponseDto](doc/SessionResponseDto.md) + - [SharedLinkCreateDto](doc/SharedLinkCreateDto.md) + - [SharedLinkEditDto](doc/SharedLinkEditDto.md) + - [SharedLinkResponseDto](doc/SharedLinkResponseDto.md) + - [SharedLinkType](doc/SharedLinkType.md) + - [SignUpDto](doc/SignUpDto.md) + - [SmartInfoResponseDto](doc/SmartInfoResponseDto.md) + - [SmartSearchDto](doc/SmartSearchDto.md) + - [SystemConfigDto](doc/SystemConfigDto.md) + - [SystemConfigFFmpegDto](doc/SystemConfigFFmpegDto.md) + - [SystemConfigImageDto](doc/SystemConfigImageDto.md) + - [SystemConfigJobDto](doc/SystemConfigJobDto.md) + - [SystemConfigLibraryDto](doc/SystemConfigLibraryDto.md) + - [SystemConfigLibraryScanDto](doc/SystemConfigLibraryScanDto.md) + - [SystemConfigLibraryWatchDto](doc/SystemConfigLibraryWatchDto.md) + - [SystemConfigLoggingDto](doc/SystemConfigLoggingDto.md) + - [SystemConfigMachineLearningDto](doc/SystemConfigMachineLearningDto.md) + - [SystemConfigMapDto](doc/SystemConfigMapDto.md) + - [SystemConfigNewVersionCheckDto](doc/SystemConfigNewVersionCheckDto.md) + - [SystemConfigOAuthDto](doc/SystemConfigOAuthDto.md) + - [SystemConfigPasswordLoginDto](doc/SystemConfigPasswordLoginDto.md) + - [SystemConfigReverseGeocodingDto](doc/SystemConfigReverseGeocodingDto.md) + - [SystemConfigServerDto](doc/SystemConfigServerDto.md) + - [SystemConfigStorageTemplateDto](doc/SystemConfigStorageTemplateDto.md) + - [SystemConfigTemplateStorageOptionDto](doc/SystemConfigTemplateStorageOptionDto.md) + - [SystemConfigThemeDto](doc/SystemConfigThemeDto.md) + - [SystemConfigTrashDto](doc/SystemConfigTrashDto.md) + - [SystemConfigUserDto](doc/SystemConfigUserDto.md) + - [TagResponseDto](doc/TagResponseDto.md) + - [TagTypeEnum](doc/TagTypeEnum.md) + - [ThumbnailFormat](doc/ThumbnailFormat.md) + - [TimeBucketResponseDto](doc/TimeBucketResponseDto.md) + - [TimeBucketSize](doc/TimeBucketSize.md) + - [ToneMapping](doc/ToneMapping.md) + - [TranscodeHWAccel](doc/TranscodeHWAccel.md) + - [TranscodePolicy](doc/TranscodePolicy.md) + - [UpdateAlbumDto](doc/UpdateAlbumDto.md) + - [UpdateAssetDto](doc/UpdateAssetDto.md) + - [UpdateLibraryDto](doc/UpdateLibraryDto.md) + - [UpdatePartnerDto](doc/UpdatePartnerDto.md) + - [UpdateStackParentDto](doc/UpdateStackParentDto.md) + - [UpdateTagDto](doc/UpdateTagDto.md) + - [UpdateUserDto](doc/UpdateUserDto.md) + - [UsageByUserDto](doc/UsageByUserDto.md) + - [UserAvatarColor](doc/UserAvatarColor.md) + - [UserDto](doc/UserDto.md) + - [UserResponseDto](doc/UserResponseDto.md) + - [UserStatus](doc/UserStatus.md) + - [ValidateAccessTokenResponseDto](doc/ValidateAccessTokenResponseDto.md) + - [ValidateLibraryDto](doc/ValidateLibraryDto.md) + - [ValidateLibraryImportPathResponseDto](doc/ValidateLibraryImportPathResponseDto.md) + - [ValidateLibraryResponseDto](doc/ValidateLibraryResponseDto.md) + - [VideoCodec](doc/VideoCodec.md) + + +## Documentation For Authorization + + +Authentication schemes defined for the API: +### bearer + +- **Type**: HTTP Bearer Token authentication (JWT) + +### cookie + +- **Type**: API key +- **API key parameter name**: immich_access_token +- **Location**: + +### api_key + +- **Type**: API key +- **API key parameter name**: x-api-key +- **Location**: HTTP header + + +## Author + + + diff --git a/mobile-v2/openapi/lib/openapi.dart b/mobile-v2/openapi/lib/openapi.dart new file mode 100644 index 0000000000..bb60b4ce8d --- /dev/null +++ b/mobile-v2/openapi/lib/openapi.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +export 'package:openapi/src/api.dart'; +export 'package:openapi/src/auth/api_key_auth.dart'; +export 'package:openapi/src/auth/basic_auth.dart'; +export 'package:openapi/src/auth/oauth.dart'; +export 'package:openapi/src/serializers.dart'; +export 'package:openapi/src/model/date.dart'; + +export 'package:openapi/src/api/api_key_api.dart'; +export 'package:openapi/src/api/activity_api.dart'; +export 'package:openapi/src/api/album_api.dart'; +export 'package:openapi/src/api/asset_api.dart'; +export 'package:openapi/src/api/audit_api.dart'; +export 'package:openapi/src/api/authentication_api.dart'; +export 'package:openapi/src/api/download_api.dart'; +export 'package:openapi/src/api/face_api.dart'; +export 'package:openapi/src/api/file_report_api.dart'; +export 'package:openapi/src/api/job_api.dart'; +export 'package:openapi/src/api/library_api.dart'; +export 'package:openapi/src/api/memory_api.dart'; +export 'package:openapi/src/api/o_auth_api.dart'; +export 'package:openapi/src/api/partner_api.dart'; +export 'package:openapi/src/api/person_api.dart'; +export 'package:openapi/src/api/search_api.dart'; +export 'package:openapi/src/api/server_info_api.dart'; +export 'package:openapi/src/api/sessions_api.dart'; +export 'package:openapi/src/api/shared_link_api.dart'; +export 'package:openapi/src/api/sync_api.dart'; +export 'package:openapi/src/api/system_config_api.dart'; +export 'package:openapi/src/api/system_metadata_api.dart'; +export 'package:openapi/src/api/tag_api.dart'; +export 'package:openapi/src/api/timeline_api.dart'; +export 'package:openapi/src/api/trash_api.dart'; +export 'package:openapi/src/api/user_api.dart'; + +export 'package:openapi/src/model/api_key_create_dto.dart'; +export 'package:openapi/src/model/api_key_create_response_dto.dart'; +export 'package:openapi/src/model/api_key_response_dto.dart'; +export 'package:openapi/src/model/api_key_update_dto.dart'; +export 'package:openapi/src/model/activity_create_dto.dart'; +export 'package:openapi/src/model/activity_response_dto.dart'; +export 'package:openapi/src/model/activity_statistics_response_dto.dart'; +export 'package:openapi/src/model/add_users_dto.dart'; +export 'package:openapi/src/model/admin_onboarding_update_dto.dart'; +export 'package:openapi/src/model/album_count_response_dto.dart'; +export 'package:openapi/src/model/album_response_dto.dart'; +export 'package:openapi/src/model/all_job_status_response_dto.dart'; +export 'package:openapi/src/model/asset_bulk_delete_dto.dart'; +export 'package:openapi/src/model/asset_bulk_update_dto.dart'; +export 'package:openapi/src/model/asset_bulk_upload_check_dto.dart'; +export 'package:openapi/src/model/asset_bulk_upload_check_item.dart'; +export 'package:openapi/src/model/asset_bulk_upload_check_response_dto.dart'; +export 'package:openapi/src/model/asset_bulk_upload_check_result.dart'; +export 'package:openapi/src/model/asset_delta_sync_response_dto.dart'; +export 'package:openapi/src/model/asset_face_response_dto.dart'; +export 'package:openapi/src/model/asset_face_update_dto.dart'; +export 'package:openapi/src/model/asset_face_update_item.dart'; +export 'package:openapi/src/model/asset_face_without_person_response_dto.dart'; +export 'package:openapi/src/model/asset_file_upload_response_dto.dart'; +export 'package:openapi/src/model/asset_ids_dto.dart'; +export 'package:openapi/src/model/asset_ids_response_dto.dart'; +export 'package:openapi/src/model/asset_job_name.dart'; +export 'package:openapi/src/model/asset_jobs_dto.dart'; +export 'package:openapi/src/model/asset_order.dart'; +export 'package:openapi/src/model/asset_response_dto.dart'; +export 'package:openapi/src/model/asset_stats_response_dto.dart'; +export 'package:openapi/src/model/asset_type_enum.dart'; +export 'package:openapi/src/model/audio_codec.dart'; +export 'package:openapi/src/model/audit_deletes_response_dto.dart'; +export 'package:openapi/src/model/bulk_id_response_dto.dart'; +export 'package:openapi/src/model/bulk_ids_dto.dart'; +export 'package:openapi/src/model/clip_config.dart'; +export 'package:openapi/src/model/clip_mode.dart'; +export 'package:openapi/src/model/cq_mode.dart'; +export 'package:openapi/src/model/change_password_dto.dart'; +export 'package:openapi/src/model/check_existing_assets_dto.dart'; +export 'package:openapi/src/model/check_existing_assets_response_dto.dart'; +export 'package:openapi/src/model/colorspace.dart'; +export 'package:openapi/src/model/create_album_dto.dart'; +export 'package:openapi/src/model/create_asset_dto.dart'; +export 'package:openapi/src/model/create_library_dto.dart'; +export 'package:openapi/src/model/create_profile_image_dto.dart'; +export 'package:openapi/src/model/create_profile_image_response_dto.dart'; +export 'package:openapi/src/model/create_tag_dto.dart'; +export 'package:openapi/src/model/create_user_dto.dart'; +export 'package:openapi/src/model/curated_locations_response_dto.dart'; +export 'package:openapi/src/model/curated_objects_response_dto.dart'; +export 'package:openapi/src/model/delete_user_dto.dart'; +export 'package:openapi/src/model/download_archive_info.dart'; +export 'package:openapi/src/model/download_info_dto.dart'; +export 'package:openapi/src/model/download_response_dto.dart'; +export 'package:openapi/src/model/entity_type.dart'; +export 'package:openapi/src/model/exif_response_dto.dart'; +export 'package:openapi/src/model/face_dto.dart'; +export 'package:openapi/src/model/file_checksum_dto.dart'; +export 'package:openapi/src/model/file_checksum_response_dto.dart'; +export 'package:openapi/src/model/file_report_dto.dart'; +export 'package:openapi/src/model/file_report_fix_dto.dart'; +export 'package:openapi/src/model/file_report_item_dto.dart'; +export 'package:openapi/src/model/image_format.dart'; +export 'package:openapi/src/model/job_command.dart'; +export 'package:openapi/src/model/job_command_dto.dart'; +export 'package:openapi/src/model/job_counts_dto.dart'; +export 'package:openapi/src/model/job_name.dart'; +export 'package:openapi/src/model/job_settings_dto.dart'; +export 'package:openapi/src/model/job_status_dto.dart'; +export 'package:openapi/src/model/library_response_dto.dart'; +export 'package:openapi/src/model/library_stats_response_dto.dart'; +export 'package:openapi/src/model/library_type.dart'; +export 'package:openapi/src/model/log_level.dart'; +export 'package:openapi/src/model/login_credential_dto.dart'; +export 'package:openapi/src/model/login_response_dto.dart'; +export 'package:openapi/src/model/logout_response_dto.dart'; +export 'package:openapi/src/model/map_marker_response_dto.dart'; +export 'package:openapi/src/model/map_theme.dart'; +export 'package:openapi/src/model/memory_create_dto.dart'; +export 'package:openapi/src/model/memory_lane_response_dto.dart'; +export 'package:openapi/src/model/memory_response_dto.dart'; +export 'package:openapi/src/model/memory_type.dart'; +export 'package:openapi/src/model/memory_update_dto.dart'; +export 'package:openapi/src/model/merge_person_dto.dart'; +export 'package:openapi/src/model/metadata_search_dto.dart'; +export 'package:openapi/src/model/model_type.dart'; +export 'package:openapi/src/model/o_auth_authorize_response_dto.dart'; +export 'package:openapi/src/model/o_auth_callback_dto.dart'; +export 'package:openapi/src/model/o_auth_config_dto.dart'; +export 'package:openapi/src/model/on_this_day_dto.dart'; +export 'package:openapi/src/model/partner_response_dto.dart'; +export 'package:openapi/src/model/path_entity_type.dart'; +export 'package:openapi/src/model/path_type.dart'; +export 'package:openapi/src/model/people_response_dto.dart'; +export 'package:openapi/src/model/people_update_dto.dart'; +export 'package:openapi/src/model/people_update_item.dart'; +export 'package:openapi/src/model/person_create_dto.dart'; +export 'package:openapi/src/model/person_response_dto.dart'; +export 'package:openapi/src/model/person_statistics_response_dto.dart'; +export 'package:openapi/src/model/person_update_dto.dart'; +export 'package:openapi/src/model/person_with_faces_response_dto.dart'; +export 'package:openapi/src/model/places_response_dto.dart'; +export 'package:openapi/src/model/queue_status_dto.dart'; +export 'package:openapi/src/model/reaction_level.dart'; +export 'package:openapi/src/model/reaction_type.dart'; +export 'package:openapi/src/model/recognition_config.dart'; +export 'package:openapi/src/model/reverse_geocoding_state_response_dto.dart'; +export 'package:openapi/src/model/scan_library_dto.dart'; +export 'package:openapi/src/model/search_album_response_dto.dart'; +export 'package:openapi/src/model/search_asset_response_dto.dart'; +export 'package:openapi/src/model/search_explore_item.dart'; +export 'package:openapi/src/model/search_explore_response_dto.dart'; +export 'package:openapi/src/model/search_facet_count_response_dto.dart'; +export 'package:openapi/src/model/search_facet_response_dto.dart'; +export 'package:openapi/src/model/search_response_dto.dart'; +export 'package:openapi/src/model/search_suggestion_type.dart'; +export 'package:openapi/src/model/server_config_dto.dart'; +export 'package:openapi/src/model/server_features_dto.dart'; +export 'package:openapi/src/model/server_info_response_dto.dart'; +export 'package:openapi/src/model/server_media_types_response_dto.dart'; +export 'package:openapi/src/model/server_ping_response.dart'; +export 'package:openapi/src/model/server_stats_response_dto.dart'; +export 'package:openapi/src/model/server_theme_dto.dart'; +export 'package:openapi/src/model/server_version_response_dto.dart'; +export 'package:openapi/src/model/session_response_dto.dart'; +export 'package:openapi/src/model/shared_link_create_dto.dart'; +export 'package:openapi/src/model/shared_link_edit_dto.dart'; +export 'package:openapi/src/model/shared_link_response_dto.dart'; +export 'package:openapi/src/model/shared_link_type.dart'; +export 'package:openapi/src/model/sign_up_dto.dart'; +export 'package:openapi/src/model/smart_info_response_dto.dart'; +export 'package:openapi/src/model/smart_search_dto.dart'; +export 'package:openapi/src/model/system_config_dto.dart'; +export 'package:openapi/src/model/system_config_f_fmpeg_dto.dart'; +export 'package:openapi/src/model/system_config_image_dto.dart'; +export 'package:openapi/src/model/system_config_job_dto.dart'; +export 'package:openapi/src/model/system_config_library_dto.dart'; +export 'package:openapi/src/model/system_config_library_scan_dto.dart'; +export 'package:openapi/src/model/system_config_library_watch_dto.dart'; +export 'package:openapi/src/model/system_config_logging_dto.dart'; +export 'package:openapi/src/model/system_config_machine_learning_dto.dart'; +export 'package:openapi/src/model/system_config_map_dto.dart'; +export 'package:openapi/src/model/system_config_new_version_check_dto.dart'; +export 'package:openapi/src/model/system_config_o_auth_dto.dart'; +export 'package:openapi/src/model/system_config_password_login_dto.dart'; +export 'package:openapi/src/model/system_config_reverse_geocoding_dto.dart'; +export 'package:openapi/src/model/system_config_server_dto.dart'; +export 'package:openapi/src/model/system_config_storage_template_dto.dart'; +export 'package:openapi/src/model/system_config_template_storage_option_dto.dart'; +export 'package:openapi/src/model/system_config_theme_dto.dart'; +export 'package:openapi/src/model/system_config_trash_dto.dart'; +export 'package:openapi/src/model/system_config_user_dto.dart'; +export 'package:openapi/src/model/tag_response_dto.dart'; +export 'package:openapi/src/model/tag_type_enum.dart'; +export 'package:openapi/src/model/thumbnail_format.dart'; +export 'package:openapi/src/model/time_bucket_response_dto.dart'; +export 'package:openapi/src/model/time_bucket_size.dart'; +export 'package:openapi/src/model/tone_mapping.dart'; +export 'package:openapi/src/model/transcode_hw_accel.dart'; +export 'package:openapi/src/model/transcode_policy.dart'; +export 'package:openapi/src/model/update_album_dto.dart'; +export 'package:openapi/src/model/update_asset_dto.dart'; +export 'package:openapi/src/model/update_library_dto.dart'; +export 'package:openapi/src/model/update_partner_dto.dart'; +export 'package:openapi/src/model/update_stack_parent_dto.dart'; +export 'package:openapi/src/model/update_tag_dto.dart'; +export 'package:openapi/src/model/update_user_dto.dart'; +export 'package:openapi/src/model/usage_by_user_dto.dart'; +export 'package:openapi/src/model/user_avatar_color.dart'; +export 'package:openapi/src/model/user_dto.dart'; +export 'package:openapi/src/model/user_response_dto.dart'; +export 'package:openapi/src/model/user_status.dart'; +export 'package:openapi/src/model/validate_access_token_response_dto.dart'; +export 'package:openapi/src/model/validate_library_dto.dart'; +export 'package:openapi/src/model/validate_library_import_path_response_dto.dart'; +export 'package:openapi/src/model/validate_library_response_dto.dart'; +export 'package:openapi/src/model/video_codec.dart'; +export 'package:openapi/src/auth/bearer_auth.dart'; diff --git a/mobile-v2/openapi/lib/src/api.dart b/mobile-v2/openapi/lib/src/api.dart new file mode 100644 index 0000000000..796fbe2a42 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api.dart @@ -0,0 +1,248 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/src/serializers.dart'; +import 'package:openapi/src/auth/api_key_auth.dart'; +import 'package:openapi/src/auth/basic_auth.dart'; +import 'package:openapi/src/auth/bearer_auth.dart'; +import 'package:openapi/src/auth/oauth.dart'; +import 'package:openapi/src/api/api_key_api.dart'; +import 'package:openapi/src/api/activity_api.dart'; +import 'package:openapi/src/api/album_api.dart'; +import 'package:openapi/src/api/asset_api.dart'; +import 'package:openapi/src/api/audit_api.dart'; +import 'package:openapi/src/api/authentication_api.dart'; +import 'package:openapi/src/api/download_api.dart'; +import 'package:openapi/src/api/face_api.dart'; +import 'package:openapi/src/api/file_report_api.dart'; +import 'package:openapi/src/api/job_api.dart'; +import 'package:openapi/src/api/library_api.dart'; +import 'package:openapi/src/api/memory_api.dart'; +import 'package:openapi/src/api/o_auth_api.dart'; +import 'package:openapi/src/api/partner_api.dart'; +import 'package:openapi/src/api/person_api.dart'; +import 'package:openapi/src/api/search_api.dart'; +import 'package:openapi/src/api/server_info_api.dart'; +import 'package:openapi/src/api/sessions_api.dart'; +import 'package:openapi/src/api/shared_link_api.dart'; +import 'package:openapi/src/api/sync_api.dart'; +import 'package:openapi/src/api/system_config_api.dart'; +import 'package:openapi/src/api/system_metadata_api.dart'; +import 'package:openapi/src/api/tag_api.dart'; +import 'package:openapi/src/api/timeline_api.dart'; +import 'package:openapi/src/api/trash_api.dart'; +import 'package:openapi/src/api/user_api.dart'; + +class Openapi { + static const String basePath = r'/api'; + + final Dio dio; + final Serializers serializers; + + Openapi({ + Dio? dio, + Serializers? serializers, + String? basePathOverride, + List? interceptors, + }) : this.serializers = serializers ?? standardSerializers, + this.dio = dio ?? + Dio(BaseOptions( + baseUrl: basePathOverride ?? basePath, + connectTimeout: const Duration(milliseconds: 5000), + receiveTimeout: const Duration(milliseconds: 3000), + )) { + if (interceptors == null) { + this.dio.interceptors.addAll([ + OAuthInterceptor(), + BasicAuthInterceptor(), + BearerAuthInterceptor(), + ApiKeyAuthInterceptor(), + ]); + } else { + this.dio.interceptors.addAll(interceptors); + } + } + + void setOAuthToken(String name, String token) { + if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token; + } + } + + void setBearerAuth(String name, String token) { + if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token; + } + } + + void setBasicAuth(String name, String username, String password) { + if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) { + (this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password); + } + } + + void setApiKey(String name, String apiKey) { + if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) { + (this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey; + } + } + + /// Get APIKeyApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + APIKeyApi getAPIKeyApi() { + return APIKeyApi(dio, serializers); + } + + /// Get ActivityApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + ActivityApi getActivityApi() { + return ActivityApi(dio, serializers); + } + + /// Get AlbumApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AlbumApi getAlbumApi() { + return AlbumApi(dio, serializers); + } + + /// Get AssetApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AssetApi getAssetApi() { + return AssetApi(dio, serializers); + } + + /// Get AuditApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AuditApi getAuditApi() { + return AuditApi(dio, serializers); + } + + /// Get AuthenticationApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + AuthenticationApi getAuthenticationApi() { + return AuthenticationApi(dio, serializers); + } + + /// Get DownloadApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + DownloadApi getDownloadApi() { + return DownloadApi(dio, serializers); + } + + /// Get FaceApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FaceApi getFaceApi() { + return FaceApi(dio, serializers); + } + + /// Get FileReportApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + FileReportApi getFileReportApi() { + return FileReportApi(dio, serializers); + } + + /// Get JobApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + JobApi getJobApi() { + return JobApi(dio, serializers); + } + + /// Get LibraryApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + LibraryApi getLibraryApi() { + return LibraryApi(dio, serializers); + } + + /// Get MemoryApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + MemoryApi getMemoryApi() { + return MemoryApi(dio, serializers); + } + + /// Get OAuthApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + OAuthApi getOAuthApi() { + return OAuthApi(dio, serializers); + } + + /// Get PartnerApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + PartnerApi getPartnerApi() { + return PartnerApi(dio, serializers); + } + + /// Get PersonApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + PersonApi getPersonApi() { + return PersonApi(dio, serializers); + } + + /// Get SearchApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SearchApi getSearchApi() { + return SearchApi(dio, serializers); + } + + /// Get ServerInfoApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + ServerInfoApi getServerInfoApi() { + return ServerInfoApi(dio, serializers); + } + + /// Get SessionsApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SessionsApi getSessionsApi() { + return SessionsApi(dio, serializers); + } + + /// Get SharedLinkApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SharedLinkApi getSharedLinkApi() { + return SharedLinkApi(dio, serializers); + } + + /// Get SyncApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SyncApi getSyncApi() { + return SyncApi(dio, serializers); + } + + /// Get SystemConfigApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SystemConfigApi getSystemConfigApi() { + return SystemConfigApi(dio, serializers); + } + + /// Get SystemMetadataApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + SystemMetadataApi getSystemMetadataApi() { + return SystemMetadataApi(dio, serializers); + } + + /// Get TagApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + TagApi getTagApi() { + return TagApi(dio, serializers); + } + + /// Get TimelineApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + TimelineApi getTimelineApi() { + return TimelineApi(dio, serializers); + } + + /// Get TrashApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + TrashApi getTrashApi() { + return TrashApi(dio, serializers); + } + + /// Get UserApi instance, base route and serializer can be overridden by a given but be careful, + /// by doing that all interceptors will not be executed + UserApi getUserApi() { + return UserApi(dio, serializers); + } +} diff --git a/mobile-v2/openapi/lib/src/api/activity_api.dart b/mobile-v2/openapi/lib/src/api/activity_api.dart new file mode 100644 index 0000000000..488af14d66 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/activity_api.dart @@ -0,0 +1,407 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/activity_create_dto.dart'; +import 'package:openapi/src/model/activity_response_dto.dart'; +import 'package:openapi/src/model/activity_statistics_response_dto.dart'; +import 'package:openapi/src/model/reaction_level.dart'; +import 'package:openapi/src/model/reaction_type.dart'; + +class ActivityApi { + + final Dio _dio; + + final Serializers _serializers; + + const ActivityApi(this._dio, this._serializers); + + /// createActivity + /// + /// + /// Parameters: + /// * [activityCreateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ActivityResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createActivity({ + required ActivityCreateDto activityCreateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/activity'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ActivityCreateDto); + _bodyData = _serializers.serialize(activityCreateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ActivityResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ActivityResponseDto), + ) as ActivityResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteActivity + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteActivity({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/activity/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getActivities + /// + /// + /// Parameters: + /// * [albumId] + /// * [assetId] + /// * [level] + /// * [type] + /// * [userId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getActivities({ + required String albumId, + String? assetId, + ReactionLevel? level, + ReactionType? type, + String? userId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/activity'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)), + if (assetId != null) r'assetId': encodeQueryParameter(_serializers, assetId, const FullType(String)), + if (level != null) r'level': encodeQueryParameter(_serializers, level, const FullType(ReactionLevel)), + if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(ReactionType)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(ActivityResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getActivityStatistics + /// + /// + /// Parameters: + /// * [albumId] + /// * [assetId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ActivityStatisticsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getActivityStatistics({ + required String albumId, + String? assetId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/activity/statistics'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)), + if (assetId != null) r'assetId': encodeQueryParameter(_serializers, assetId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ActivityStatisticsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ActivityStatisticsResponseDto), + ) as ActivityStatisticsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/album_api.dart b/mobile-v2/openapi/lib/src/api/album_api.dart new file mode 100644 index 0000000000..c31a026ef5 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/album_api.dart @@ -0,0 +1,1016 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/add_users_dto.dart'; +import 'package:openapi/src/model/album_count_response_dto.dart'; +import 'package:openapi/src/model/album_response_dto.dart'; +import 'package:openapi/src/model/bulk_id_response_dto.dart'; +import 'package:openapi/src/model/bulk_ids_dto.dart'; +import 'package:openapi/src/model/create_album_dto.dart'; +import 'package:openapi/src/model/update_album_dto.dart'; + +class AlbumApi { + + final Dio _dio; + + final Serializers _serializers; + + const AlbumApi(this._dio, this._serializers); + + /// addAssetsToAlbum + /// + /// + /// Parameters: + /// * [id] + /// * [bulkIdsDto] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> addAssetsToAlbum({ + required String id, + required BulkIdsDto bulkIdsDto, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(BulkIdsDto); + _bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// addUsersToAlbum + /// + /// + /// Parameters: + /// * [id] + /// * [addUsersDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AlbumResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> addUsersToAlbum({ + required String id, + required AddUsersDto addUsersDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}/users'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AddUsersDto); + _bodyData = _serializers.serialize(addUsersDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AlbumResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AlbumResponseDto), + ) as AlbumResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// createAlbum + /// + /// + /// Parameters: + /// * [createAlbumDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AlbumResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createAlbum({ + required CreateAlbumDto createAlbumDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CreateAlbumDto); + _bodyData = _serializers.serialize(createAlbumDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AlbumResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AlbumResponseDto), + ) as AlbumResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteAlbum + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteAlbum({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getAlbumCount + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AlbumCountResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAlbumCount({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/count'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AlbumCountResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AlbumCountResponseDto), + ) as AlbumCountResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAlbumInfo + /// + /// + /// Parameters: + /// * [id] + /// * [key] + /// * [withoutAssets] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AlbumResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAlbumInfo({ + required String id, + String? key, + bool? withoutAssets, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + if (withoutAssets != null) r'withoutAssets': encodeQueryParameter(_serializers, withoutAssets, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AlbumResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AlbumResponseDto), + ) as AlbumResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAllAlbums + /// + /// + /// Parameters: + /// * [assetId] - Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums + /// * [shared] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllAlbums({ + String? assetId, + bool? shared, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (assetId != null) r'assetId': encodeQueryParameter(_serializers, assetId, const FullType(String)), + if (shared != null) r'shared': encodeQueryParameter(_serializers, shared, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AlbumResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removeAssetFromAlbum + /// + /// + /// Parameters: + /// * [id] + /// * [bulkIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> removeAssetFromAlbum({ + required String id, + required BulkIdsDto bulkIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BulkIdsDto); + _bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removeUserFromAlbum + /// + /// + /// Parameters: + /// * [id] + /// * [userId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> removeUserFromAlbum({ + required String id, + required String userId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}/user/{userId}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()).replaceAll('{' r'userId' '}', encodeQueryParameter(_serializers, userId, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// updateAlbumInfo + /// + /// + /// Parameters: + /// * [id] + /// * [updateAlbumDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AlbumResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateAlbumInfo({ + required String id, + required UpdateAlbumDto updateAlbumDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/album/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateAlbumDto); + _bodyData = _serializers.serialize(updateAlbumDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AlbumResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AlbumResponseDto), + ) as AlbumResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/api_key_api.dart b/mobile-v2/openapi/lib/src/api/api_key_api.dart new file mode 100644 index 0000000000..ff935ffcb2 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/api_key_api.dart @@ -0,0 +1,492 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/api_key_create_dto.dart'; +import 'package:openapi/src/model/api_key_create_response_dto.dart'; +import 'package:openapi/src/model/api_key_response_dto.dart'; +import 'package:openapi/src/model/api_key_update_dto.dart'; + +class APIKeyApi { + + final Dio _dio; + + final Serializers _serializers; + + const APIKeyApi(this._dio, this._serializers); + + /// createApiKey + /// + /// + /// Parameters: + /// * [aPIKeyCreateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [APIKeyCreateResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createApiKey({ + required APIKeyCreateDto aPIKeyCreateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/api-key'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(APIKeyCreateDto); + _bodyData = _serializers.serialize(aPIKeyCreateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + APIKeyCreateResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(APIKeyCreateResponseDto), + ) as APIKeyCreateResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteApiKey + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteApiKey({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getApiKey + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [APIKeyResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getApiKey({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + APIKeyResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(APIKeyResponseDto), + ) as APIKeyResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getApiKeys + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getApiKeys({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/api-key'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(APIKeyResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateApiKey + /// + /// + /// Parameters: + /// * [id] + /// * [aPIKeyUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [APIKeyResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateApiKey({ + required String id, + required APIKeyUpdateDto aPIKeyUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(APIKeyUpdateDto); + _bodyData = _serializers.serialize(aPIKeyUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + APIKeyResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(APIKeyResponseDto), + ) as APIKeyResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/asset_api.dart b/mobile-v2/openapi/lib/src/api/asset_api.dart new file mode 100644 index 0000000000..3565d14878 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/asset_api.dart @@ -0,0 +1,2275 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'dart:typed_data'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_bulk_delete_dto.dart'; +import 'package:openapi/src/model/asset_bulk_update_dto.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_dto.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_response_dto.dart'; +import 'package:openapi/src/model/asset_file_upload_response_dto.dart'; +import 'package:openapi/src/model/asset_jobs_dto.dart'; +import 'package:openapi/src/model/asset_order.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/asset_stats_response_dto.dart'; +import 'package:openapi/src/model/asset_type_enum.dart'; +import 'package:openapi/src/model/check_existing_assets_dto.dart'; +import 'package:openapi/src/model/check_existing_assets_response_dto.dart'; +import 'package:openapi/src/model/curated_locations_response_dto.dart'; +import 'package:openapi/src/model/curated_objects_response_dto.dart'; +import 'package:openapi/src/model/map_marker_response_dto.dart'; +import 'package:openapi/src/model/memory_lane_response_dto.dart'; +import 'package:openapi/src/model/thumbnail_format.dart'; +import 'package:openapi/src/model/update_asset_dto.dart'; +import 'package:openapi/src/model/update_stack_parent_dto.dart'; + +class AssetApi { + + final Dio _dio; + + final Serializers _serializers; + + const AssetApi(this._dio, this._serializers); + + /// checkBulkUpload + /// Checks if assets exist by checksums + /// + /// Parameters: + /// * [assetBulkUploadCheckDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetBulkUploadCheckResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> checkBulkUpload({ + required AssetBulkUploadCheckDto assetBulkUploadCheckDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/bulk-upload-check'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetBulkUploadCheckDto); + _bodyData = _serializers.serialize(assetBulkUploadCheckDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetBulkUploadCheckResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetBulkUploadCheckResponseDto), + ) as AssetBulkUploadCheckResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// checkExistingAssets + /// Checks if multiple assets exist on the server and returns all existing - used by background backup + /// + /// Parameters: + /// * [checkExistingAssetsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [CheckExistingAssetsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> checkExistingAssets({ + required CheckExistingAssetsDto checkExistingAssetsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/exist'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CheckExistingAssetsDto); + _bodyData = _serializers.serialize(checkExistingAssetsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + CheckExistingAssetsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(CheckExistingAssetsResponseDto), + ) as CheckExistingAssetsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteAssets + /// + /// + /// Parameters: + /// * [assetBulkDeleteDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteAssets({ + required AssetBulkDeleteDto assetBulkDeleteDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetBulkDeleteDto); + _bodyData = _serializers.serialize(assetBulkDeleteDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getAllAssets + /// Get all AssetEntity belong to the user + /// + /// Parameters: + /// * [ifNoneMatch] - ETag of data already cached on the client + /// * [isArchived] + /// * [isFavorite] + /// * [skip] + /// * [take] + /// * [updatedAfter] + /// * [updatedBefore] + /// * [userId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllAssets({ + String? ifNoneMatch, + bool? isArchived, + bool? isFavorite, + int? skip, + int? take, + DateTime? updatedAfter, + DateTime? updatedBefore, + String? userId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset'; + final _options = Options( + method: r'GET', + headers: { + if (ifNoneMatch != null) r'if-none-match': ifNoneMatch, + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (skip != null) r'skip': encodeQueryParameter(_serializers, skip, const FullType(int)), + if (take != null) r'take': encodeQueryParameter(_serializers, take, const FullType(int)), + if (updatedAfter != null) r'updatedAfter': encodeQueryParameter(_serializers, updatedAfter, const FullType(DateTime)), + if (updatedBefore != null) r'updatedBefore': encodeQueryParameter(_serializers, updatedBefore, const FullType(DateTime)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAllUserAssetsByDeviceId + /// Get all asset of a device that are in the database, ID only. + /// + /// Parameters: + /// * [deviceId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllUserAssetsByDeviceId({ + required String deviceId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/device/{deviceId}'.replaceAll('{' r'deviceId' '}', encodeQueryParameter(_serializers, deviceId, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAssetInfo + /// + /// + /// Parameters: + /// * [id] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAssetInfo({ + required String id, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetResponseDto), + ) as AssetResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAssetSearchTerms + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAssetSearchTerms({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/search-terms'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAssetStatistics + /// + /// + /// Parameters: + /// * [isArchived] + /// * [isFavorite] + /// * [isTrashed] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetStatsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAssetStatistics({ + bool? isArchived, + bool? isFavorite, + bool? isTrashed, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/statistics'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (isTrashed != null) r'isTrashed': encodeQueryParameter(_serializers, isTrashed, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetStatsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetStatsResponseDto), + ) as AssetStatsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAssetThumbnail + /// + /// + /// Parameters: + /// * [id] + /// * [format] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> getAssetThumbnail({ + required String id, + ThumbnailFormat? format, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/thumbnail/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (format != null) r'format': encodeQueryParameter(_serializers, format, const FullType(ThumbnailFormat)), + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getCuratedLocations + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getCuratedLocations({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/curated-locations'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(CuratedLocationsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getCuratedObjects + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getCuratedObjects({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/curated-objects'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(CuratedObjectsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getMapMarkers + /// + /// + /// Parameters: + /// * [fileCreatedAfter] + /// * [fileCreatedBefore] + /// * [isArchived] + /// * [isFavorite] + /// * [withPartners] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getMapMarkers({ + DateTime? fileCreatedAfter, + DateTime? fileCreatedBefore, + bool? isArchived, + bool? isFavorite, + bool? withPartners, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/map-marker'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (fileCreatedAfter != null) r'fileCreatedAfter': encodeQueryParameter(_serializers, fileCreatedAfter, const FullType(DateTime)), + if (fileCreatedBefore != null) r'fileCreatedBefore': encodeQueryParameter(_serializers, fileCreatedBefore, const FullType(DateTime)), + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (withPartners != null) r'withPartners': encodeQueryParameter(_serializers, withPartners, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(MapMarkerResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getMemoryLane + /// + /// + /// Parameters: + /// * [day] + /// * [month] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getMemoryLane({ + required int day, + required int month, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/memory-lane'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'day': encodeQueryParameter(_serializers, day, const FullType(int)), + r'month': encodeQueryParameter(_serializers, month, const FullType(int)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(MemoryLaneResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getRandom + /// + /// + /// Parameters: + /// * [count] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getRandom({ + num? count, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/random'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (count != null) r'count': encodeQueryParameter(_serializers, count, const FullType(num)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// runAssetJobs + /// + /// + /// Parameters: + /// * [assetJobsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> runAssetJobs({ + required AssetJobsDto assetJobsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/jobs'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetJobsDto); + _bodyData = _serializers.serialize(assetJobsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// searchAssets + /// + /// + /// Parameters: + /// * [checksum] + /// * [city] + /// * [country] + /// * [createdAfter] + /// * [createdBefore] + /// * [deviceAssetId] + /// * [deviceId] + /// * [encodedVideoPath] + /// * [id] + /// * [isArchived] + /// * [isEncoded] + /// * [isExternal] + /// * [isFavorite] + /// * [isMotion] + /// * [isNotInAlbum] + /// * [isOffline] + /// * [isReadOnly] + /// * [isVisible] + /// * [lensModel] + /// * [libraryId] + /// * [make] + /// * [model] + /// * [order] + /// * [originalFileName] + /// * [originalPath] + /// * [page] + /// * [personIds] + /// * [previewPath] + /// * [resizePath] + /// * [size] + /// * [state] + /// * [takenAfter] + /// * [takenBefore] + /// * [thumbnailPath] + /// * [trashedAfter] + /// * [trashedBefore] + /// * [type] + /// * [updatedAfter] + /// * [updatedBefore] + /// * [webpPath] + /// * [withArchived] + /// * [withDeleted] + /// * [withExif] + /// * [withPeople] + /// * [withStacked] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + @Deprecated('This operation has been deprecated') + Future>> searchAssets({ + String? checksum, + String? city, + String? country, + DateTime? createdAfter, + DateTime? createdBefore, + String? deviceAssetId, + String? deviceId, + String? encodedVideoPath, + String? id, + bool? isArchived, + bool? isEncoded, + bool? isExternal, + bool? isFavorite, + bool? isMotion, + bool? isNotInAlbum, + bool? isOffline, + bool? isReadOnly, + bool? isVisible, + String? lensModel, + String? libraryId, + String? make, + String? model, + AssetOrder? order, + String? originalFileName, + String? originalPath, + num? page, + BuiltList? personIds, + String? previewPath, + @Deprecated('resizePath is deprecated') String? resizePath, + num? size, + String? state, + DateTime? takenAfter, + DateTime? takenBefore, + String? thumbnailPath, + DateTime? trashedAfter, + DateTime? trashedBefore, + AssetTypeEnum? type, + DateTime? updatedAfter, + DateTime? updatedBefore, + @Deprecated('webpPath is deprecated') String? webpPath, + bool? withArchived = false, + bool? withDeleted, + bool? withExif, + bool? withPeople, + bool? withStacked, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/assets'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (checksum != null) r'checksum': encodeQueryParameter(_serializers, checksum, const FullType(String)), + if (city != null) r'city': encodeQueryParameter(_serializers, city, const FullType(String)), + if (country != null) r'country': encodeQueryParameter(_serializers, country, const FullType(String)), + if (createdAfter != null) r'createdAfter': encodeQueryParameter(_serializers, createdAfter, const FullType(DateTime)), + if (createdBefore != null) r'createdBefore': encodeQueryParameter(_serializers, createdBefore, const FullType(DateTime)), + if (deviceAssetId != null) r'deviceAssetId': encodeQueryParameter(_serializers, deviceAssetId, const FullType(String)), + if (deviceId != null) r'deviceId': encodeQueryParameter(_serializers, deviceId, const FullType(String)), + if (encodedVideoPath != null) r'encodedVideoPath': encodeQueryParameter(_serializers, encodedVideoPath, const FullType(String)), + if (id != null) r'id': encodeQueryParameter(_serializers, id, const FullType(String)), + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isEncoded != null) r'isEncoded': encodeQueryParameter(_serializers, isEncoded, const FullType(bool)), + if (isExternal != null) r'isExternal': encodeQueryParameter(_serializers, isExternal, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (isMotion != null) r'isMotion': encodeQueryParameter(_serializers, isMotion, const FullType(bool)), + if (isNotInAlbum != null) r'isNotInAlbum': encodeQueryParameter(_serializers, isNotInAlbum, const FullType(bool)), + if (isOffline != null) r'isOffline': encodeQueryParameter(_serializers, isOffline, const FullType(bool)), + if (isReadOnly != null) r'isReadOnly': encodeQueryParameter(_serializers, isReadOnly, const FullType(bool)), + if (isVisible != null) r'isVisible': encodeQueryParameter(_serializers, isVisible, const FullType(bool)), + if (lensModel != null) r'lensModel': encodeQueryParameter(_serializers, lensModel, const FullType(String)), + if (libraryId != null) r'libraryId': encodeQueryParameter(_serializers, libraryId, const FullType(String)), + if (make != null) r'make': encodeQueryParameter(_serializers, make, const FullType(String)), + if (model != null) r'model': encodeQueryParameter(_serializers, model, const FullType(String)), + if (order != null) r'order': encodeQueryParameter(_serializers, order, const FullType(AssetOrder)), + if (originalFileName != null) r'originalFileName': encodeQueryParameter(_serializers, originalFileName, const FullType(String)), + if (originalPath != null) r'originalPath': encodeQueryParameter(_serializers, originalPath, const FullType(String)), + if (page != null) r'page': encodeQueryParameter(_serializers, page, const FullType(num)), + if (personIds != null) r'personIds': encodeCollectionQueryParameter(_serializers, personIds, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), + if (previewPath != null) r'previewPath': encodeQueryParameter(_serializers, previewPath, const FullType(String)), + if (resizePath != null) r'resizePath': encodeQueryParameter(_serializers, resizePath, const FullType(String)), + if (size != null) r'size': encodeQueryParameter(_serializers, size, const FullType(num)), + if (state != null) r'state': encodeQueryParameter(_serializers, state, const FullType(String)), + if (takenAfter != null) r'takenAfter': encodeQueryParameter(_serializers, takenAfter, const FullType(DateTime)), + if (takenBefore != null) r'takenBefore': encodeQueryParameter(_serializers, takenBefore, const FullType(DateTime)), + if (thumbnailPath != null) r'thumbnailPath': encodeQueryParameter(_serializers, thumbnailPath, const FullType(String)), + if (trashedAfter != null) r'trashedAfter': encodeQueryParameter(_serializers, trashedAfter, const FullType(DateTime)), + if (trashedBefore != null) r'trashedBefore': encodeQueryParameter(_serializers, trashedBefore, const FullType(DateTime)), + if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(AssetTypeEnum)), + if (updatedAfter != null) r'updatedAfter': encodeQueryParameter(_serializers, updatedAfter, const FullType(DateTime)), + if (updatedBefore != null) r'updatedBefore': encodeQueryParameter(_serializers, updatedBefore, const FullType(DateTime)), + if (webpPath != null) r'webpPath': encodeQueryParameter(_serializers, webpPath, const FullType(String)), + if (withArchived != null) r'withArchived': encodeQueryParameter(_serializers, withArchived, const FullType(bool)), + if (withDeleted != null) r'withDeleted': encodeQueryParameter(_serializers, withDeleted, const FullType(bool)), + if (withExif != null) r'withExif': encodeQueryParameter(_serializers, withExif, const FullType(bool)), + if (withPeople != null) r'withPeople': encodeQueryParameter(_serializers, withPeople, const FullType(bool)), + if (withStacked != null) r'withStacked': encodeQueryParameter(_serializers, withStacked, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// serveFile + /// + /// + /// Parameters: + /// * [id] + /// * [isThumb] + /// * [isWeb] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> serveFile({ + required String id, + bool? isThumb, + bool? isWeb, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/file/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (isThumb != null) r'isThumb': encodeQueryParameter(_serializers, isThumb, const FullType(bool)), + if (isWeb != null) r'isWeb': encodeQueryParameter(_serializers, isWeb, const FullType(bool)), + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateAsset + /// + /// + /// Parameters: + /// * [id] + /// * [updateAssetDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateAsset({ + required String id, + required UpdateAssetDto updateAssetDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateAssetDto); + _bodyData = _serializers.serialize(updateAssetDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetResponseDto), + ) as AssetResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateAssets + /// + /// + /// Parameters: + /// * [assetBulkUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updateAssets({ + required AssetBulkUpdateDto assetBulkUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetBulkUpdateDto); + _bodyData = _serializers.serialize(assetBulkUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// updateStackParent + /// + /// + /// Parameters: + /// * [updateStackParentDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updateStackParent({ + required UpdateStackParentDto updateStackParentDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/stack/parent'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateStackParentDto); + _bodyData = _serializers.serialize(updateStackParentDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// uploadFile + /// + /// + /// Parameters: + /// * [assetData] + /// * [deviceAssetId] + /// * [deviceId] + /// * [fileCreatedAt] + /// * [fileModifiedAt] + /// * [key] + /// * [duration] + /// * [isArchived] + /// * [isFavorite] + /// * [isOffline] + /// * [isReadOnly] + /// * [isVisible] + /// * [libraryId] + /// * [livePhotoData] + /// * [sidecarData] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetFileUploadResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> uploadFile({ + required MultipartFile assetData, + required String deviceAssetId, + required String deviceId, + required DateTime fileCreatedAt, + required DateTime fileModifiedAt, + String? key, + String? duration, + bool? isArchived, + bool? isFavorite, + bool? isOffline, + bool? isReadOnly, + bool? isVisible, + String? libraryId, + MultipartFile? livePhotoData, + MultipartFile? sidecarData, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/asset/upload'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + _bodyData = FormData.fromMap({ + r'assetData': assetData, + r'deviceAssetId': encodeFormParameter(_serializers, deviceAssetId, const FullType(String)), + r'deviceId': encodeFormParameter(_serializers, deviceId, const FullType(String)), + if (duration != null) r'duration': encodeFormParameter(_serializers, duration, const FullType(String)), + r'fileCreatedAt': encodeFormParameter(_serializers, fileCreatedAt, const FullType(DateTime)), + r'fileModifiedAt': encodeFormParameter(_serializers, fileModifiedAt, const FullType(DateTime)), + if (isArchived != null) r'isArchived': encodeFormParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeFormParameter(_serializers, isFavorite, const FullType(bool)), + if (isOffline != null) r'isOffline': encodeFormParameter(_serializers, isOffline, const FullType(bool)), + if (isReadOnly != null) r'isReadOnly': encodeFormParameter(_serializers, isReadOnly, const FullType(bool)), + if (isVisible != null) r'isVisible': encodeFormParameter(_serializers, isVisible, const FullType(bool)), + if (libraryId != null) r'libraryId': encodeFormParameter(_serializers, libraryId, const FullType(String)), + if (livePhotoData != null) r'livePhotoData': livePhotoData, + if (sidecarData != null) r'sidecarData': sidecarData, + }); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetFileUploadResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetFileUploadResponseDto), + ) as AssetFileUploadResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/audit_api.dart b/mobile-v2/openapi/lib/src/api/audit_api.dart new file mode 100644 index 0000000000..aeb6a872ee --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/audit_api.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/audit_deletes_response_dto.dart'; +import 'package:openapi/src/model/entity_type.dart'; + +class AuditApi { + + final Dio _dio; + + final Serializers _serializers; + + const AuditApi(this._dio, this._serializers); + + /// getAuditDeletes + /// + /// + /// Parameters: + /// * [after] + /// * [entityType] + /// * [userId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AuditDeletesResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAuditDeletes({ + required DateTime after, + required EntityType entityType, + String? userId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/audit/deletes'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'after': encodeQueryParameter(_serializers, after, const FullType(DateTime)), + r'entityType': encodeQueryParameter(_serializers, entityType, const FullType(EntityType)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AuditDeletesResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AuditDeletesResponseDto), + ) as AuditDeletesResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/authentication_api.dart b/mobile-v2/openapi/lib/src/api/authentication_api.dart new file mode 100644 index 0000000000..0c83ef3d11 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/authentication_api.dart @@ -0,0 +1,505 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/change_password_dto.dart'; +import 'package:openapi/src/model/login_credential_dto.dart'; +import 'package:openapi/src/model/login_response_dto.dart'; +import 'package:openapi/src/model/logout_response_dto.dart'; +import 'package:openapi/src/model/sign_up_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; +import 'package:openapi/src/model/validate_access_token_response_dto.dart'; + +class AuthenticationApi { + + final Dio _dio; + + final Serializers _serializers; + + const AuthenticationApi(this._dio, this._serializers); + + /// changePassword + /// + /// + /// Parameters: + /// * [changePasswordDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> changePassword({ + required ChangePasswordDto changePasswordDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/auth/change-password'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ChangePasswordDto); + _bodyData = _serializers.serialize(changePasswordDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// login + /// + /// + /// Parameters: + /// * [loginCredentialDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LoginResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> login({ + required LoginCredentialDto loginCredentialDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/auth/login'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(LoginCredentialDto); + _bodyData = _serializers.serialize(loginCredentialDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LoginResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LoginResponseDto), + ) as LoginResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// logout + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LogoutResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> logout({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/auth/logout'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LogoutResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LogoutResponseDto), + ) as LogoutResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// signUpAdmin + /// + /// + /// Parameters: + /// * [signUpDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> signUpAdmin({ + required SignUpDto signUpDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/auth/admin-sign-up'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(SignUpDto); + _bodyData = _serializers.serialize(signUpDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// validateAccessToken + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ValidateAccessTokenResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> validateAccessToken({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/auth/validateToken'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ValidateAccessTokenResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ValidateAccessTokenResponseDto), + ) as ValidateAccessTokenResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/download_api.dart b/mobile-v2/openapi/lib/src/api/download_api.dart new file mode 100644 index 0000000000..4388d13588 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/download_api.dart @@ -0,0 +1,356 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'dart:typed_data'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_ids_dto.dart'; +import 'package:openapi/src/model/download_info_dto.dart'; +import 'package:openapi/src/model/download_response_dto.dart'; + +class DownloadApi { + + final Dio _dio; + + final Serializers _serializers; + + const DownloadApi(this._dio, this._serializers); + + /// downloadArchive + /// + /// + /// Parameters: + /// * [assetIdsDto] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> downloadArchive({ + required AssetIdsDto assetIdsDto, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/download/archive'; + final _options = Options( + method: r'POST', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(AssetIdsDto); + _bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// downloadFile + /// + /// + /// Parameters: + /// * [id] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> downloadFile({ + required String id, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/download/asset/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getDownloadInfo + /// + /// + /// Parameters: + /// * [downloadInfoDto] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [DownloadResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getDownloadInfo({ + required DownloadInfoDto downloadInfoDto, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/download/info'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(DownloadInfoDto); + _bodyData = _serializers.serialize(downloadInfoDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + DownloadResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(DownloadResponseDto), + ) as DownloadResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/face_api.dart b/mobile-v2/openapi/lib/src/api/face_api.dart new file mode 100644 index 0000000000..97f71df7bf --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/face_api.dart @@ -0,0 +1,233 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_face_response_dto.dart'; +import 'package:openapi/src/model/face_dto.dart'; +import 'package:openapi/src/model/person_response_dto.dart'; + +class FaceApi { + + final Dio _dio; + + final Serializers _serializers; + + const FaceApi(this._dio, this._serializers); + + /// getFaces + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getFaces({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/face'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'id': encodeQueryParameter(_serializers, id, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetFaceResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// reassignFacesById + /// + /// + /// Parameters: + /// * [id] + /// * [faceDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PersonResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> reassignFacesById({ + required String id, + required FaceDto faceDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/face/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(FaceDto); + _bodyData = _serializers.serialize(faceDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PersonResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PersonResponseDto), + ) as PersonResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/file_report_api.dart b/mobile-v2/openapi/lib/src/api/file_report_api.dart new file mode 100644 index 0000000000..5b64aa694d --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/file_report_api.dart @@ -0,0 +1,307 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/file_checksum_dto.dart'; +import 'package:openapi/src/model/file_checksum_response_dto.dart'; +import 'package:openapi/src/model/file_report_dto.dart'; +import 'package:openapi/src/model/file_report_fix_dto.dart'; + +class FileReportApi { + + final Dio _dio; + + final Serializers _serializers; + + const FileReportApi(this._dio, this._serializers); + + /// fixAuditFiles + /// + /// + /// Parameters: + /// * [fileReportFixDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> fixAuditFiles({ + required FileReportFixDto fileReportFixDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/report/fix'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(FileReportFixDto); + _bodyData = _serializers.serialize(fileReportFixDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getAuditFiles + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [FileReportDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAuditFiles({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/report'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + FileReportDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(FileReportDto), + ) as FileReportDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getFileChecksums + /// + /// + /// Parameters: + /// * [fileChecksumDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getFileChecksums({ + required FileChecksumDto fileChecksumDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/report/checksum'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(FileChecksumDto); + _bodyData = _serializers.serialize(fileChecksumDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(FileChecksumResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/job_api.dart b/mobile-v2/openapi/lib/src/api/job_api.dart new file mode 100644 index 0000000000..3df144bd33 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/job_api.dart @@ -0,0 +1,226 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/all_job_status_response_dto.dart'; +import 'package:openapi/src/model/job_command_dto.dart'; +import 'package:openapi/src/model/job_name.dart'; +import 'package:openapi/src/model/job_status_dto.dart'; + +class JobApi { + + final Dio _dio; + + final Serializers _serializers; + + const JobApi(this._dio, this._serializers); + + /// getAllJobsStatus + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AllJobStatusResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAllJobsStatus({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/jobs'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AllJobStatusResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AllJobStatusResponseDto), + ) as AllJobStatusResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// sendJobCommand + /// + /// + /// Parameters: + /// * [id] + /// * [jobCommandDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [JobStatusDto] as data + /// Throws [DioException] if API call or serialization fails + Future> sendJobCommand({ + required JobName id, + required JobCommandDto jobCommandDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/jobs/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(JobName)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(JobCommandDto); + _bodyData = _serializers.serialize(jobCommandDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JobStatusDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/library_api.dart b/mobile-v2/openapi/lib/src/api/library_api.dart new file mode 100644 index 0000000000..e0348e495c --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/library_api.dart @@ -0,0 +1,855 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/create_library_dto.dart'; +import 'package:openapi/src/model/library_response_dto.dart'; +import 'package:openapi/src/model/library_stats_response_dto.dart'; +import 'package:openapi/src/model/library_type.dart'; +import 'package:openapi/src/model/scan_library_dto.dart'; +import 'package:openapi/src/model/update_library_dto.dart'; +import 'package:openapi/src/model/validate_library_dto.dart'; +import 'package:openapi/src/model/validate_library_response_dto.dart'; + +class LibraryApi { + + final Dio _dio; + + final Serializers _serializers; + + const LibraryApi(this._dio, this._serializers); + + /// createLibrary + /// + /// + /// Parameters: + /// * [createLibraryDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createLibrary({ + required CreateLibraryDto createLibraryDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CreateLibraryDto); + _bodyData = _serializers.serialize(createLibraryDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LibraryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LibraryResponseDto), + ) as LibraryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteLibrary + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteLibrary({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getAllLibraries + /// + /// + /// Parameters: + /// * [type] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllLibraries({ + LibraryType? type, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(LibraryType)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(LibraryResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getLibrary + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getLibrary({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LibraryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LibraryResponseDto), + ) as LibraryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getLibraryStatistics + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LibraryStatsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getLibraryStatistics({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}/statistics'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LibraryStatsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LibraryStatsResponseDto), + ) as LibraryStatsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removeOfflineFiles + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> removeOfflineFiles({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}/removeOffline'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// scanLibrary + /// + /// + /// Parameters: + /// * [id] + /// * [scanLibraryDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> scanLibrary({ + required String id, + required ScanLibraryDto scanLibraryDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}/scan'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ScanLibraryDto); + _bodyData = _serializers.serialize(scanLibraryDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// updateLibrary + /// + /// + /// Parameters: + /// * [id] + /// * [updateLibraryDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateLibrary({ + required String id, + required UpdateLibraryDto updateLibraryDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateLibraryDto); + _bodyData = _serializers.serialize(updateLibraryDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LibraryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LibraryResponseDto), + ) as LibraryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// validate + /// + /// + /// Parameters: + /// * [id] + /// * [validateLibraryDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ValidateLibraryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> validate({ + required String id, + required ValidateLibraryDto validateLibraryDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/library/{id}/validate'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(ValidateLibraryDto); + _bodyData = _serializers.serialize(validateLibraryDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ValidateLibraryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ValidateLibraryResponseDto), + ) as ValidateLibraryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/memory_api.dart b/mobile-v2/openapi/lib/src/api/memory_api.dart new file mode 100644 index 0000000000..9cbed7aca0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/memory_api.dart @@ -0,0 +1,719 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/bulk_id_response_dto.dart'; +import 'package:openapi/src/model/bulk_ids_dto.dart'; +import 'package:openapi/src/model/memory_create_dto.dart'; +import 'package:openapi/src/model/memory_response_dto.dart'; +import 'package:openapi/src/model/memory_update_dto.dart'; + +class MemoryApi { + + final Dio _dio; + + final Serializers _serializers; + + const MemoryApi(this._dio, this._serializers); + + /// addMemoryAssets + /// + /// + /// Parameters: + /// * [id] + /// * [bulkIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> addMemoryAssets({ + required String id, + required BulkIdsDto bulkIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BulkIdsDto); + _bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// createMemory + /// + /// + /// Parameters: + /// * [memoryCreateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createMemory({ + required MemoryCreateDto memoryCreateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(MemoryCreateDto); + _bodyData = _serializers.serialize(memoryCreateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + MemoryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(MemoryResponseDto), + ) as MemoryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteMemory + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteMemory({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getMemory + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getMemory({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + MemoryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(MemoryResponseDto), + ) as MemoryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removeMemoryAssets + /// + /// + /// Parameters: + /// * [id] + /// * [bulkIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> removeMemoryAssets({ + required String id, + required BulkIdsDto bulkIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BulkIdsDto); + _bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// searchMemories + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> searchMemories({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(MemoryResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateMemory + /// + /// + /// Parameters: + /// * [id] + /// * [memoryUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateMemory({ + required String id, + required MemoryUpdateDto memoryUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(MemoryUpdateDto); + _bodyData = _serializers.serialize(memoryUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + MemoryResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(MemoryResponseDto), + ) as MemoryResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/o_auth_api.dart b/mobile-v2/openapi/lib/src/api/o_auth_api.dart new file mode 100644 index 0000000000..c865fa48de --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/o_auth_api.dart @@ -0,0 +1,459 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/login_response_dto.dart'; +import 'package:openapi/src/model/o_auth_authorize_response_dto.dart'; +import 'package:openapi/src/model/o_auth_callback_dto.dart'; +import 'package:openapi/src/model/o_auth_config_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; + +class OAuthApi { + + final Dio _dio; + + final Serializers _serializers; + + const OAuthApi(this._dio, this._serializers); + + /// finishOAuth + /// + /// + /// Parameters: + /// * [oAuthCallbackDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [LoginResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> finishOAuth({ + required OAuthCallbackDto oAuthCallbackDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth/callback'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuthCallbackDto); + _bodyData = _serializers.serialize(oAuthCallbackDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + LoginResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(LoginResponseDto), + ) as LoginResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// linkOAuthAccount + /// + /// + /// Parameters: + /// * [oAuthCallbackDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> linkOAuthAccount({ + required OAuthCallbackDto oAuthCallbackDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth/link'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuthCallbackDto); + _bodyData = _serializers.serialize(oAuthCallbackDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// redirectOAuthToMobile + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> redirectOAuthToMobile({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth/mobile-redirect'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// startOAuth + /// + /// + /// Parameters: + /// * [oAuthConfigDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [OAuthAuthorizeResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> startOAuth({ + required OAuthConfigDto oAuthConfigDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth/authorize'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(OAuthConfigDto); + _bodyData = _serializers.serialize(oAuthConfigDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + OAuthAuthorizeResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(OAuthAuthorizeResponseDto), + ) as OAuthAuthorizeResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// unlinkOAuthAccount + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> unlinkOAuthAccount({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/oauth/unlink'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/partner_api.dart b/mobile-v2/openapi/lib/src/api/partner_api.dart new file mode 100644 index 0000000000..f39892778c --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/partner_api.dart @@ -0,0 +1,386 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/partner_response_dto.dart'; +import 'package:openapi/src/model/update_partner_dto.dart'; + +class PartnerApi { + + final Dio _dio; + + final Serializers _serializers; + + const PartnerApi(this._dio, this._serializers); + + /// createPartner + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PartnerResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createPartner({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PartnerResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PartnerResponseDto), + ) as PartnerResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getPartners + /// + /// + /// Parameters: + /// * [direction] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getPartners({ + required String direction, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/partner'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'direction': encodeQueryParameter(_serializers, direction, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(PartnerResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removePartner + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> removePartner({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// updatePartner + /// + /// + /// Parameters: + /// * [id] + /// * [updatePartnerDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PartnerResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updatePartner({ + required String id, + required UpdatePartnerDto updatePartnerDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdatePartnerDto); + _bodyData = _serializers.serialize(updatePartnerDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PartnerResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PartnerResponseDto), + ) as PartnerResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/person_api.dart b/mobile-v2/openapi/lib/src/api/person_api.dart new file mode 100644 index 0000000000..4156d5cd3e --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/person_api.dart @@ -0,0 +1,1051 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'dart:typed_data'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_face_update_dto.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/bulk_id_response_dto.dart'; +import 'package:openapi/src/model/merge_person_dto.dart'; +import 'package:openapi/src/model/people_response_dto.dart'; +import 'package:openapi/src/model/people_update_dto.dart'; +import 'package:openapi/src/model/person_create_dto.dart'; +import 'package:openapi/src/model/person_response_dto.dart'; +import 'package:openapi/src/model/person_statistics_response_dto.dart'; +import 'package:openapi/src/model/person_update_dto.dart'; + +class PersonApi { + + final Dio _dio; + + final Serializers _serializers; + + const PersonApi(this._dio, this._serializers); + + /// createPerson + /// + /// + /// Parameters: + /// * [personCreateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PersonResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createPerson({ + required PersonCreateDto personCreateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(PersonCreateDto); + _bodyData = _serializers.serialize(personCreateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PersonResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PersonResponseDto), + ) as PersonResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAllPeople + /// + /// + /// Parameters: + /// * [withHidden] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PeopleResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAllPeople({ + bool? withHidden, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (withHidden != null) r'withHidden': encodeQueryParameter(_serializers, withHidden, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PeopleResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PeopleResponseDto), + ) as PeopleResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getPerson + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PersonResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getPerson({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PersonResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PersonResponseDto), + ) as PersonResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getPersonAssets + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getPersonAssets({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getPersonStatistics + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PersonStatisticsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getPersonStatistics({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}/statistics'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PersonStatisticsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PersonStatisticsResponseDto), + ) as PersonStatisticsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getPersonThumbnail + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> getPersonThumbnail({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}/thumbnail'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// mergePerson + /// + /// + /// Parameters: + /// * [id] + /// * [mergePersonDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> mergePerson({ + required String id, + required MergePersonDto mergePersonDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}/merge'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(MergePersonDto); + _bodyData = _serializers.serialize(mergePersonDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// reassignFaces + /// + /// + /// Parameters: + /// * [id] + /// * [assetFaceUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> reassignFaces({ + required String id, + required AssetFaceUpdateDto assetFaceUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}/reassign'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetFaceUpdateDto); + _bodyData = _serializers.serialize(assetFaceUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(PersonResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updatePeople + /// + /// + /// Parameters: + /// * [peopleUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> updatePeople({ + required PeopleUpdateDto peopleUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(PeopleUpdateDto); + _bodyData = _serializers.serialize(peopleUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updatePerson + /// + /// + /// Parameters: + /// * [id] + /// * [personUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [PersonResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updatePerson({ + required String id, + required PersonUpdateDto personUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/person/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(PersonUpdateDto); + _bodyData = _serializers.serialize(personUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + PersonResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(PersonResponseDto), + ) as PersonResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/search_api.dart b/mobile-v2/openapi/lib/src/api/search_api.dart new file mode 100644 index 0000000000..570926c8eb --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/search_api.dart @@ -0,0 +1,856 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/metadata_search_dto.dart'; +import 'package:openapi/src/model/person_response_dto.dart'; +import 'package:openapi/src/model/places_response_dto.dart'; +import 'package:openapi/src/model/search_explore_response_dto.dart'; +import 'package:openapi/src/model/search_response_dto.dart'; +import 'package:openapi/src/model/search_suggestion_type.dart'; +import 'package:openapi/src/model/smart_search_dto.dart'; + +class SearchApi { + + final Dio _dio; + + final Serializers _serializers; + + const SearchApi(this._dio, this._serializers); + + /// getAssetsByCity + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAssetsByCity({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/cities'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getExploreData + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getExploreData({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/explore'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(SearchExploreResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getSearchSuggestions + /// + /// + /// Parameters: + /// * [type] + /// * [country] + /// * [make] + /// * [model] + /// * [state] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getSearchSuggestions({ + required SearchSuggestionType type, + String? country, + String? make, + String? model, + String? state, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/suggestions'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (country != null) r'country': encodeQueryParameter(_serializers, country, const FullType(String)), + if (make != null) r'make': encodeQueryParameter(_serializers, make, const FullType(String)), + if (model != null) r'model': encodeQueryParameter(_serializers, model, const FullType(String)), + if (state != null) r'state': encodeQueryParameter(_serializers, state, const FullType(String)), + r'type': encodeQueryParameter(_serializers, type, const FullType(SearchSuggestionType)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// search + /// + /// + /// Parameters: + /// * [clip] + /// * [motion] + /// * [page] + /// * [q] + /// * [query] + /// * [recent] + /// * [size] + /// * [smart] + /// * [type] + /// * [withArchived] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data + /// Throws [DioException] if API call or serialization fails + @Deprecated('This operation has been deprecated') + Future> search({ + @Deprecated('clip is deprecated') bool? clip, + bool? motion, + num? page, + String? q, + String? query, + bool? recent, + num? size, + bool? smart, + String? type, + bool? withArchived, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (clip != null) r'clip': encodeQueryParameter(_serializers, clip, const FullType(bool)), + if (motion != null) r'motion': encodeQueryParameter(_serializers, motion, const FullType(bool)), + if (page != null) r'page': encodeQueryParameter(_serializers, page, const FullType(num)), + if (q != null) r'q': encodeQueryParameter(_serializers, q, const FullType(String)), + if (query != null) r'query': encodeQueryParameter(_serializers, query, const FullType(String)), + if (recent != null) r'recent': encodeQueryParameter(_serializers, recent, const FullType(bool)), + if (size != null) r'size': encodeQueryParameter(_serializers, size, const FullType(num)), + if (smart != null) r'smart': encodeQueryParameter(_serializers, smart, const FullType(bool)), + if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(String)), + if (withArchived != null) r'withArchived': encodeQueryParameter(_serializers, withArchived, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SearchResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SearchResponseDto), + ) as SearchResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// searchMetadata + /// + /// + /// Parameters: + /// * [metadataSearchDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> searchMetadata({ + required MetadataSearchDto metadataSearchDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/metadata'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(MetadataSearchDto); + _bodyData = _serializers.serialize(metadataSearchDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SearchResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SearchResponseDto), + ) as SearchResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// searchPerson + /// + /// + /// Parameters: + /// * [name] + /// * [withHidden] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> searchPerson({ + required String name, + bool? withHidden, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/person'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'name': encodeQueryParameter(_serializers, name, const FullType(String)), + if (withHidden != null) r'withHidden': encodeQueryParameter(_serializers, withHidden, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(PersonResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// searchPlaces + /// + /// + /// Parameters: + /// * [name] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> searchPlaces({ + required String name, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/places'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'name': encodeQueryParameter(_serializers, name, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(PlacesResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// searchSmart + /// + /// + /// Parameters: + /// * [smartSearchDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> searchSmart({ + required SmartSearchDto smartSearchDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/search/smart'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(SmartSearchDto); + _bodyData = _serializers.serialize(smartSearchDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SearchResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SearchResponseDto), + ) as SearchResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/server_info_api.dart b/mobile-v2/openapi/lib/src/api/server_info_api.dart new file mode 100644 index 0000000000..44e485c7e0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/server_info_api.dart @@ -0,0 +1,643 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/server_config_dto.dart'; +import 'package:openapi/src/model/server_features_dto.dart'; +import 'package:openapi/src/model/server_info_response_dto.dart'; +import 'package:openapi/src/model/server_media_types_response_dto.dart'; +import 'package:openapi/src/model/server_ping_response.dart'; +import 'package:openapi/src/model/server_stats_response_dto.dart'; +import 'package:openapi/src/model/server_theme_dto.dart'; +import 'package:openapi/src/model/server_version_response_dto.dart'; + +class ServerInfoApi { + + final Dio _dio; + + final Serializers _serializers; + + const ServerInfoApi(this._dio, this._serializers); + + /// getServerConfig + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerConfigDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getServerConfig({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/config'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerConfigDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerConfigDto), + ) as ServerConfigDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getServerFeatures + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerFeaturesDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getServerFeatures({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/features'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerFeaturesDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerFeaturesDto), + ) as ServerFeaturesDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getServerInfo + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerInfoResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getServerInfo({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerInfoResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerInfoResponseDto), + ) as ServerInfoResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getServerStatistics + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerStatsResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getServerStatistics({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/statistics'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerStatsResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerStatsResponseDto), + ) as ServerStatsResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getServerVersion + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerVersionResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getServerVersion({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/version'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerVersionResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerVersionResponseDto), + ) as ServerVersionResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getSupportedMediaTypes + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerMediaTypesResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getSupportedMediaTypes({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/media-types'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerMediaTypesResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerMediaTypesResponseDto), + ) as ServerMediaTypesResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getTheme + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerThemeDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getTheme({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/theme'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerThemeDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerThemeDto), + ) as ServerThemeDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// pingServer + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ServerPingResponse] as data + /// Throws [DioException] if API call or serialization fails + Future> pingServer({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/server-info/ping'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ServerPingResponse? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ServerPingResponse), + ) as ServerPingResponse; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/sessions_api.dart b/mobile-v2/openapi/lib/src/api/sessions_api.dart new file mode 100644 index 0000000000..ea4653ae88 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/sessions_api.dart @@ -0,0 +1,235 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/session_response_dto.dart'; + +class SessionsApi { + + final Dio _dio; + + final Serializers _serializers; + + const SessionsApi(this._dio, this._serializers); + + /// deleteAllSessions + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteAllSessions({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/sessions'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// deleteSession + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteSession({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/sessions/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getSessions + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getSessions({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/sessions'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(SessionResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/shared_link_api.dart b/mobile-v2/openapi/lib/src/api/shared_link_api.dart new file mode 100644 index 0000000000..b4aadae95b --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/shared_link_api.dart @@ -0,0 +1,837 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_ids_dto.dart'; +import 'package:openapi/src/model/asset_ids_response_dto.dart'; +import 'package:openapi/src/model/shared_link_create_dto.dart'; +import 'package:openapi/src/model/shared_link_edit_dto.dart'; +import 'package:openapi/src/model/shared_link_response_dto.dart'; + +class SharedLinkApi { + + final Dio _dio; + + final Serializers _serializers; + + const SharedLinkApi(this._dio, this._serializers); + + /// addSharedLinkAssets + /// + /// + /// Parameters: + /// * [id] + /// * [assetIdsDto] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> addSharedLinkAssets({ + required String id, + required AssetIdsDto assetIdsDto, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(AssetIdsDto); + _bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// createSharedLink + /// + /// + /// Parameters: + /// * [sharedLinkCreateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createSharedLink({ + required SharedLinkCreateDto sharedLinkCreateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(SharedLinkCreateDto); + _bodyData = _serializers.serialize(sharedLinkCreateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SharedLinkResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SharedLinkResponseDto), + ) as SharedLinkResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAllSharedLinks + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllSharedLinks({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(SharedLinkResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getMySharedLink + /// + /// + /// Parameters: + /// * [key] + /// * [password] + /// * [token] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getMySharedLink({ + String? key, + String? password, + String? token, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/me'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)), + if (token != null) r'token': encodeQueryParameter(_serializers, token, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SharedLinkResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SharedLinkResponseDto), + ) as SharedLinkResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getSharedLinkById + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getSharedLinkById({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SharedLinkResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SharedLinkResponseDto), + ) as SharedLinkResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// removeSharedLink + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> removeSharedLink({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// removeSharedLinkAssets + /// + /// + /// Parameters: + /// * [id] + /// * [assetIdsDto] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> removeSharedLinkAssets({ + required String id, + required AssetIdsDto assetIdsDto, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + }; + + dynamic _bodyData; + + try { + const _type = FullType(AssetIdsDto); + _bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + queryParameters: _queryParameters, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateSharedLink + /// + /// + /// Parameters: + /// * [id] + /// * [sharedLinkEditDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateSharedLink({ + required String id, + required SharedLinkEditDto sharedLinkEditDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(SharedLinkEditDto); + _bodyData = _serializers.serialize(sharedLinkEditDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SharedLinkResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SharedLinkResponseDto), + ) as SharedLinkResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/sync_api.dart b/mobile-v2/openapi/lib/src/api/sync_api.dart new file mode 100644 index 0000000000..3701b7c57f --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/sync_api.dart @@ -0,0 +1,230 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_delta_sync_response_dto.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; + +class SyncApi { + + final Dio _dio; + + final Serializers _serializers; + + const SyncApi(this._dio, this._serializers); + + /// getAllForUserFullSync + /// + /// + /// Parameters: + /// * [limit] + /// * [updatedUntil] + /// * [lastCreationDate] + /// * [lastId] + /// * [userId] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllForUserFullSync({ + required int limit, + required DateTime updatedUntil, + DateTime? lastCreationDate, + String? lastId, + String? userId, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/sync/full-sync'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (lastCreationDate != null) r'lastCreationDate': encodeQueryParameter(_serializers, lastCreationDate, const FullType(DateTime)), + if (lastId != null) r'lastId': encodeQueryParameter(_serializers, lastId, const FullType(String)), + r'limit': encodeQueryParameter(_serializers, limit, const FullType(int)), + r'updatedUntil': encodeQueryParameter(_serializers, updatedUntil, const FullType(DateTime)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getDeltaSync + /// + /// + /// Parameters: + /// * [updatedAfter] + /// * [userIds] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AssetDeltaSyncResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getDeltaSync({ + required DateTime updatedAfter, + required BuiltList userIds, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/sync/delta-sync'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'updatedAfter': encodeQueryParameter(_serializers, updatedAfter, const FullType(DateTime)), + r'userIds': encodeCollectionQueryParameter(_serializers, userIds, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AssetDeltaSyncResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AssetDeltaSyncResponseDto), + ) as AssetDeltaSyncResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/system_config_api.dart b/mobile-v2/openapi/lib/src/api/system_config_api.dart new file mode 100644 index 0000000000..e146c0b226 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/system_config_api.dart @@ -0,0 +1,501 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_value/json_object.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/map_theme.dart'; +import 'package:openapi/src/model/system_config_dto.dart'; +import 'package:openapi/src/model/system_config_template_storage_option_dto.dart'; + +class SystemConfigApi { + + final Dio _dio; + + final Serializers _serializers; + + const SystemConfigApi(this._dio, this._serializers); + + /// getConfig + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getConfig({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-config'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SystemConfigDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SystemConfigDto), + ) as SystemConfigDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getConfigDefaults + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getConfigDefaults({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-config/defaults'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SystemConfigDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SystemConfigDto), + ) as SystemConfigDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getMapStyle + /// + /// + /// Parameters: + /// * [theme] + /// * [key] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [JsonObject] as data + /// Throws [DioException] if API call or serialization fails + Future> getMapStyle({ + required MapTheme theme, + String? key, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-config/map/style.json'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + r'theme': encodeQueryParameter(_serializers, theme, const FullType(MapTheme)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + JsonObject? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(JsonObject), + ) as JsonObject; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getStorageTemplateOptions + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SystemConfigTemplateStorageOptionDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getStorageTemplateOptions({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-config/storage-template-options'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SystemConfigTemplateStorageOptionDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SystemConfigTemplateStorageOptionDto), + ) as SystemConfigTemplateStorageOptionDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateConfig + /// + /// + /// Parameters: + /// * [systemConfigDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateConfig({ + required SystemConfigDto systemConfigDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-config'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(SystemConfigDto); + _bodyData = _serializers.serialize(systemConfigDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + SystemConfigDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(SystemConfigDto), + ) as SystemConfigDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/system_metadata_api.dart b/mobile-v2/openapi/lib/src/api/system_metadata_api.dart new file mode 100644 index 0000000000..5f85d13790 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/system_metadata_api.dart @@ -0,0 +1,282 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/admin_onboarding_update_dto.dart'; +import 'package:openapi/src/model/reverse_geocoding_state_response_dto.dart'; + +class SystemMetadataApi { + + final Dio _dio; + + final Serializers _serializers; + + const SystemMetadataApi(this._dio, this._serializers); + + /// getAdminOnboarding + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [AdminOnboardingUpdateDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getAdminOnboarding({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-metadata/admin-onboarding'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + AdminOnboardingUpdateDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(AdminOnboardingUpdateDto), + ) as AdminOnboardingUpdateDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getReverseGeocodingState + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [ReverseGeocodingStateResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getReverseGeocodingState({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-metadata/reverse-geocoding-state'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + ReverseGeocodingStateResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(ReverseGeocodingStateResponseDto), + ) as ReverseGeocodingStateResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateAdminOnboarding + /// + /// + /// Parameters: + /// * [adminOnboardingUpdateDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> updateAdminOnboarding({ + required AdminOnboardingUpdateDto adminOnboardingUpdateDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/system-metadata/admin-onboarding'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AdminOnboardingUpdateDto); + _bodyData = _serializers.serialize(adminOnboardingUpdateDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/mobile-v2/openapi/lib/src/api/tag_api.dart b/mobile-v2/openapi/lib/src/api/tag_api.dart new file mode 100644 index 0000000000..fa430bcea2 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/tag_api.dart @@ -0,0 +1,811 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_ids_dto.dart'; +import 'package:openapi/src/model/asset_ids_response_dto.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/create_tag_dto.dart'; +import 'package:openapi/src/model/tag_response_dto.dart'; +import 'package:openapi/src/model/update_tag_dto.dart'; + +class TagApi { + + final Dio _dio; + + final Serializers _serializers; + + const TagApi(this._dio, this._serializers); + + /// createTag + /// + /// + /// Parameters: + /// * [createTagDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [TagResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createTag({ + required CreateTagDto createTagDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CreateTagDto); + _bodyData = _serializers.serialize(createTagDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + TagResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(TagResponseDto), + ) as TagResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteTag + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteTag({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// getAllTags + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllTags({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getTagAssets + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getTagAssets({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getTagById + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [TagResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getTagById({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + TagResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(TagResponseDto), + ) as TagResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// tagAssets + /// + /// + /// Parameters: + /// * [id] + /// * [assetIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> tagAssets({ + required String id, + required AssetIdsDto assetIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetIdsDto); + _bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// untagAssets + /// + /// + /// Parameters: + /// * [id] + /// * [assetIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> untagAssets({ + required String id, + required AssetIdsDto assetIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(AssetIdsDto); + _bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateTag + /// + /// + /// Parameters: + /// * [id] + /// * [updateTagDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [TagResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateTag({ + required String id, + required UpdateTagDto updateTagDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'PATCH', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateTagDto); + _bodyData = _serializers.serialize(updateTagDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + TagResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(TagResponseDto), + ) as TagResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/timeline_api.dart b/mobile-v2/openapi/lib/src/api/timeline_api.dart new file mode 100644 index 0000000000..966fdb08e2 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/timeline_api.dart @@ -0,0 +1,280 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/asset_order.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/time_bucket_response_dto.dart'; +import 'package:openapi/src/model/time_bucket_size.dart'; + +class TimelineApi { + + final Dio _dio; + + final Serializers _serializers; + + const TimelineApi(this._dio, this._serializers); + + /// getTimeBucket + /// + /// + /// Parameters: + /// * [size] + /// * [timeBucket] + /// * [albumId] + /// * [isArchived] + /// * [isFavorite] + /// * [isTrashed] + /// * [key] + /// * [order] + /// * [personId] + /// * [userId] + /// * [withPartners] + /// * [withStacked] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getTimeBucket({ + required TimeBucketSize size, + required String timeBucket, + String? albumId, + bool? isArchived, + bool? isFavorite, + bool? isTrashed, + String? key, + AssetOrder? order, + String? personId, + String? userId, + bool? withPartners, + bool? withStacked, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/timeline/bucket'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (albumId != null) r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)), + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (isTrashed != null) r'isTrashed': encodeQueryParameter(_serializers, isTrashed, const FullType(bool)), + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + if (order != null) r'order': encodeQueryParameter(_serializers, order, const FullType(AssetOrder)), + if (personId != null) r'personId': encodeQueryParameter(_serializers, personId, const FullType(String)), + r'size': encodeQueryParameter(_serializers, size, const FullType(TimeBucketSize)), + r'timeBucket': encodeQueryParameter(_serializers, timeBucket, const FullType(String)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + if (withPartners != null) r'withPartners': encodeQueryParameter(_serializers, withPartners, const FullType(bool)), + if (withStacked != null) r'withStacked': encodeQueryParameter(_serializers, withStacked, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getTimeBuckets + /// + /// + /// Parameters: + /// * [size] + /// * [albumId] + /// * [isArchived] + /// * [isFavorite] + /// * [isTrashed] + /// * [key] + /// * [order] + /// * [personId] + /// * [userId] + /// * [withPartners] + /// * [withStacked] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getTimeBuckets({ + required TimeBucketSize size, + String? albumId, + bool? isArchived, + bool? isFavorite, + bool? isTrashed, + String? key, + AssetOrder? order, + String? personId, + String? userId, + bool? withPartners, + bool? withStacked, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/timeline/buckets'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + if (albumId != null) r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)), + if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)), + if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)), + if (isTrashed != null) r'isTrashed': encodeQueryParameter(_serializers, isTrashed, const FullType(bool)), + if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)), + if (order != null) r'order': encodeQueryParameter(_serializers, order, const FullType(AssetOrder)), + if (personId != null) r'personId': encodeQueryParameter(_serializers, personId, const FullType(String)), + r'size': encodeQueryParameter(_serializers, size, const FullType(TimeBucketSize)), + if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)), + if (withPartners != null) r'withPartners': encodeQueryParameter(_serializers, withPartners, const FullType(bool)), + if (withStacked != null) r'withStacked': encodeQueryParameter(_serializers, withStacked, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(TimeBucketResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api/trash_api.dart b/mobile-v2/openapi/lib/src/api/trash_api.dart new file mode 100644 index 0000000000..82a79a92f7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/trash_api.dart @@ -0,0 +1,225 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'package:openapi/src/model/bulk_ids_dto.dart'; + +class TrashApi { + + final Dio _dio; + + final Serializers _serializers; + + const TrashApi(this._dio, this._serializers); + + /// emptyTrash + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> emptyTrash({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/trash/empty'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// restoreAssets + /// + /// + /// Parameters: + /// * [bulkIdsDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> restoreAssets({ + required BulkIdsDto bulkIdsDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/trash/restore/assets'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(BulkIdsDto); + _bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// restoreTrash + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> restoreTrash({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/trash/restore'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + +} diff --git a/mobile-v2/openapi/lib/src/api/user_api.dart b/mobile-v2/openapi/lib/src/api/user_api.dart new file mode 100644 index 0000000000..15bbb952ac --- /dev/null +++ b/mobile-v2/openapi/lib/src/api/user_api.dart @@ -0,0 +1,991 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:async'; + +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +import 'dart:typed_data'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/api_util.dart'; +import 'package:openapi/src/model/create_profile_image_response_dto.dart'; +import 'package:openapi/src/model/create_user_dto.dart'; +import 'package:openapi/src/model/delete_user_dto.dart'; +import 'package:openapi/src/model/update_user_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; + +class UserApi { + + final Dio _dio; + + final Serializers _serializers; + + const UserApi(this._dio, this._serializers); + + /// createProfileImage + /// + /// + /// Parameters: + /// * [file] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [CreateProfileImageResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createProfileImage({ + required MultipartFile file, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/profile-image'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'multipart/form-data', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + _bodyData = FormData.fromMap({ + r'file': file, + }); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + CreateProfileImageResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(CreateProfileImageResponseDto), + ) as CreateProfileImageResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// createUser + /// + /// + /// Parameters: + /// * [createUserDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> createUser({ + required CreateUserDto createUserDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user'; + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(CreateUserDto); + _bodyData = _serializers.serialize(createUserDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// deleteProfileImage + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] + /// Throws [DioException] if API call or serialization fails + Future> deleteProfileImage({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/profile-image'; + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + return _response; + } + + /// deleteUser + /// + /// + /// Parameters: + /// * [id] + /// * [deleteUserDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> deleteUser({ + required String id, + required DeleteUserDto deleteUserDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'DELETE', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(DeleteUserDto); + _bodyData = _serializers.serialize(deleteUserDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getAllUsers + /// + /// + /// Parameters: + /// * [isAll] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [BuiltList] as data + /// Throws [DioException] if API call or serialization fails + Future>> getAllUsers({ + required bool isAll, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _queryParameters = { + r'isAll': encodeQueryParameter(_serializers, isAll, const FullType(bool)), + }; + + final _response = await _dio.request( + _path, + options: _options, + queryParameters: _queryParameters, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + BuiltList? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]), + ) as BuiltList; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response>( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getMyUserInfo + /// + /// + /// Parameters: + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getMyUserInfo({ + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/me'; + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getProfileImage + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [Uint8List] as data + /// Throws [DioException] if API call or serialization fails + Future> getProfileImage({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/profile-image/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + responseType: ResponseType.bytes, + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + Uint8List? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : rawResponse as Uint8List; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// getUserById + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> getUserById({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/info/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'GET', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// restoreUser + /// + /// + /// Parameters: + /// * [id] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> restoreUser({ + required String id, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user/{id}/restore'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString()); + final _options = Options( + method: r'POST', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + validateStatus: validateStatus, + ); + + final _response = await _dio.request( + _path, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + + /// updateUser + /// + /// + /// Parameters: + /// * [updateUserDto] + /// * [cancelToken] - A [CancelToken] that can be used to cancel the operation + /// * [headers] - Can be used to add additional headers to the request + /// * [extras] - Can be used to add flags to the request + /// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response + /// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress + /// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress + /// + /// Returns a [Future] containing a [Response] with a [UserResponseDto] as data + /// Throws [DioException] if API call or serialization fails + Future> updateUser({ + required UpdateUserDto updateUserDto, + CancelToken? cancelToken, + Map? headers, + Map? extra, + ValidateStatus? validateStatus, + ProgressCallback? onSendProgress, + ProgressCallback? onReceiveProgress, + }) async { + final _path = r'/user'; + final _options = Options( + method: r'PUT', + headers: { + ...?headers, + }, + extra: { + 'secure': >[ + { + 'type': 'apiKey', + 'name': 'cookie', + 'keyName': 'immich_access_token', + 'where': '', + },{ + 'type': 'apiKey', + 'name': 'api_key', + 'keyName': 'x-api-key', + 'where': 'header', + },{ + 'type': 'http', + 'scheme': 'Bearer', + 'name': 'bearer', + }, + ], + ...?extra, + }, + contentType: 'application/json', + validateStatus: validateStatus, + ); + + dynamic _bodyData; + + try { + const _type = FullType(UpdateUserDto); + _bodyData = _serializers.serialize(updateUserDto, specifiedType: _type); + + } catch(error, stackTrace) { + throw DioException( + requestOptions: _options.compose( + _dio.options, + _path, + ), + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + final _response = await _dio.request( + _path, + data: _bodyData, + options: _options, + cancelToken: cancelToken, + onSendProgress: onSendProgress, + onReceiveProgress: onReceiveProgress, + ); + + UserResponseDto? _responseData; + + try { + final rawResponse = _response.data; + _responseData = rawResponse == null ? null : _serializers.deserialize( + rawResponse, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + + } catch (error, stackTrace) { + throw DioException( + requestOptions: _response.requestOptions, + response: _response, + type: DioExceptionType.unknown, + error: error, + stackTrace: stackTrace, + ); + } + + return Response( + data: _responseData, + headers: _response.headers, + isRedirect: _response.isRedirect, + requestOptions: _response.requestOptions, + redirects: _response.redirects, + statusCode: _response.statusCode, + statusMessage: _response.statusMessage, + extra: _response.extra, + ); + } + +} diff --git a/mobile-v2/openapi/lib/src/api_util.dart b/mobile-v2/openapi/lib/src/api_util.dart new file mode 100644 index 0000000000..ed3bb12f25 --- /dev/null +++ b/mobile-v2/openapi/lib/src/api_util.dart @@ -0,0 +1,77 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; +import 'dart:typed_data'; + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:dio/dio.dart'; + +/// Format the given form parameter object into something that Dio can handle. +/// Returns primitive or String. +/// Returns List/Map if the value is BuildList/BuiltMap. +dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized is String) { + return serialized; + } + if (value is BuiltList || value is BuiltSet || value is BuiltMap) { + return serialized; + } + return json.encode(serialized); +} + +dynamic encodeQueryParameter( + Serializers serializers, + dynamic value, + FullType type, +) { + if (value == null) { + return ''; + } + if (value is String || value is num || value is bool) { + return value; + } + if (value is Uint8List) { + // Currently not sure how to serialize this + return value; + } + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (serialized == null) { + return ''; + } + if (serialized is String) { + return serialized; + } + return serialized; +} + +ListParam encodeCollectionQueryParameter( + Serializers serializers, + dynamic value, + FullType type, { + ListFormat format = ListFormat.multi, +}) { + final serialized = serializers.serialize( + value as Object, + specifiedType: type, + ); + if (value is BuiltList || value is BuiltSet) { + return ListParam(List.of((serialized as Iterable).cast()), format); + } + throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter'); +} diff --git a/mobile-v2/openapi/lib/src/auth/api_key_auth.dart b/mobile-v2/openapi/lib/src/auth/api_key_auth.dart new file mode 100644 index 0000000000..ee16e3f0f9 --- /dev/null +++ b/mobile-v2/openapi/lib/src/auth/api_key_auth.dart @@ -0,0 +1,30 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class ApiKeyAuthInterceptor extends AuthInterceptor { + final Map apiKeys = {}; + + @override + void onRequest(RequestOptions options, RequestInterceptorHandler handler) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey'); + for (final info in authInfo) { + final authName = info['name'] as String; + final authKeyName = info['keyName'] as String; + final authWhere = info['where'] as String; + final apiKey = apiKeys[authName]; + if (apiKey != null) { + if (authWhere == 'query') { + options.queryParameters[authKeyName] = apiKey; + } else { + options.headers[authKeyName] = apiKey; + } + } + } + super.onRequest(options, handler); + } +} diff --git a/mobile-v2/openapi/lib/src/auth/auth.dart b/mobile-v2/openapi/lib/src/auth/auth.dart new file mode 100644 index 0000000000..f7ae9bf3f1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/auth/auth.dart @@ -0,0 +1,18 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; + +abstract class AuthInterceptor extends Interceptor { + /// Get auth information on given route for the given type. + /// Can return an empty list if type is not present on auth data or + /// if route doesn't need authentication. + List> getAuthInfo(RequestOptions route, bool Function(Map secure) handles) { + if (route.extra.containsKey('secure')) { + final auth = route.extra['secure'] as List>; + return auth.where((secure) => handles(secure)).toList(); + } + return []; + } +} diff --git a/mobile-v2/openapi/lib/src/auth/basic_auth.dart b/mobile-v2/openapi/lib/src/auth/basic_auth.dart new file mode 100644 index 0000000000..b6e6dce04f --- /dev/null +++ b/mobile-v2/openapi/lib/src/auth/basic_auth.dart @@ -0,0 +1,37 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'dart:convert'; + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BasicAuthInfo { + final String username; + final String password; + + const BasicAuthInfo(this.username, this.password); +} + +class BasicAuthInterceptor extends AuthInterceptor { + final Map authInfo = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic'); + for (final info in metadataAuthInfo) { + final authName = info['name'] as String; + final basicAuthInfo = authInfo[authName]; + if (basicAuthInfo != null) { + final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}'; + options.headers['Authorization'] = basicAuth; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/mobile-v2/openapi/lib/src/auth/bearer_auth.dart b/mobile-v2/openapi/lib/src/auth/bearer_auth.dart new file mode 100644 index 0000000000..1d4402b376 --- /dev/null +++ b/mobile-v2/openapi/lib/src/auth/bearer_auth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class BearerAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/mobile-v2/openapi/lib/src/auth/oauth.dart b/mobile-v2/openapi/lib/src/auth/oauth.dart new file mode 100644 index 0000000000..337cf762b0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/auth/oauth.dart @@ -0,0 +1,26 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:dio/dio.dart'; +import 'package:openapi/src/auth/auth.dart'; + +class OAuthInterceptor extends AuthInterceptor { + final Map tokens = {}; + + @override + void onRequest( + RequestOptions options, + RequestInterceptorHandler handler, + ) { + final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2'); + for (final info in authInfo) { + final token = tokens[info['name']]; + if (token != null) { + options.headers['Authorization'] = 'Bearer ${token}'; + break; + } + } + super.onRequest(options, handler); + } +} diff --git a/mobile-v2/openapi/lib/src/date_serializer.dart b/mobile-v2/openapi/lib/src/date_serializer.dart new file mode 100644 index 0000000000..db3c5c437d --- /dev/null +++ b/mobile-v2/openapi/lib/src/date_serializer.dart @@ -0,0 +1,31 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/serializer.dart'; +import 'package:openapi/src/model/date.dart'; + +class DateSerializer implements PrimitiveSerializer { + + const DateSerializer(); + + @override + Iterable get types => BuiltList.of([Date]); + + @override + String get wireName => 'Date'; + + @override + Date deserialize(Serializers serializers, Object serialized, + {FullType specifiedType = FullType.unspecified}) { + final parsed = DateTime.parse(serialized as String); + return Date(parsed.year, parsed.month, parsed.day); + } + + @override + Object serialize(Serializers serializers, Date date, + {FullType specifiedType = FullType.unspecified}) { + return date.toString(); + } +} diff --git a/mobile-v2/openapi/lib/src/model/activity_create_dto.dart b/mobile-v2/openapi/lib/src/model/activity_create_dto.dart new file mode 100644 index 0000000000..70b4b0a6e0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/activity_create_dto.dart @@ -0,0 +1,160 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/reaction_type.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'activity_create_dto.g.dart'; + +/// ActivityCreateDto +/// +/// Properties: +/// * [albumId] +/// * [assetId] +/// * [comment] +/// * [type] +@BuiltValue() +abstract class ActivityCreateDto implements Built { + @BuiltValueField(wireName: r'albumId') + String get albumId; + + @BuiltValueField(wireName: r'assetId') + String? get assetId; + + @BuiltValueField(wireName: r'comment') + String? get comment; + + @BuiltValueField(wireName: r'type') + ReactionType get type; + // enum typeEnum { comment, like, }; + + ActivityCreateDto._(); + + factory ActivityCreateDto([void updates(ActivityCreateDtoBuilder b)]) = _$ActivityCreateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ActivityCreateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ActivityCreateDtoSerializer(); +} + +class _$ActivityCreateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ActivityCreateDto, _$ActivityCreateDto]; + + @override + final String wireName = r'ActivityCreateDto'; + + Iterable _serializeProperties( + Serializers serializers, + ActivityCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'albumId'; + yield serializers.serialize( + object.albumId, + specifiedType: const FullType(String), + ); + if (object.assetId != null) { + yield r'assetId'; + yield serializers.serialize( + object.assetId, + specifiedType: const FullType(String), + ); + } + if (object.comment != null) { + yield r'comment'; + yield serializers.serialize( + object.comment, + specifiedType: const FullType(String), + ); + } + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(ReactionType), + ); + } + + @override + Object serialize( + Serializers serializers, + ActivityCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ActivityCreateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumId = valueDes; + break; + case r'assetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.assetId = valueDes; + break; + case r'comment': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.comment = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ReactionType), + ) as ReactionType; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ActivityCreateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ActivityCreateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/activity_response_dto.dart b/mobile-v2/openapi/lib/src/model/activity_response_dto.dart new file mode 100644 index 0000000000..acfb9b2f03 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/activity_response_dto.dart @@ -0,0 +1,208 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/user_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'activity_response_dto.g.dart'; + +/// ActivityResponseDto +/// +/// Properties: +/// * [assetId] +/// * [comment] +/// * [createdAt] +/// * [id] +/// * [type] +/// * [user] +@BuiltValue() +abstract class ActivityResponseDto implements Built { + @BuiltValueField(wireName: r'assetId') + String? get assetId; + + @BuiltValueField(wireName: r'comment') + String? get comment; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'type') + ActivityResponseDtoTypeEnum get type; + // enum typeEnum { comment, like, }; + + @BuiltValueField(wireName: r'user') + UserDto get user; + + ActivityResponseDto._(); + + factory ActivityResponseDto([void updates(ActivityResponseDtoBuilder b)]) = _$ActivityResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ActivityResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ActivityResponseDtoSerializer(); +} + +class _$ActivityResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ActivityResponseDto, _$ActivityResponseDto]; + + @override + final String wireName = r'ActivityResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ActivityResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetId'; + yield object.assetId == null ? null : serializers.serialize( + object.assetId, + specifiedType: const FullType.nullable(String), + ); + if (object.comment != null) { + yield r'comment'; + yield serializers.serialize( + object.comment, + specifiedType: const FullType.nullable(String), + ); + } + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(ActivityResponseDtoTypeEnum), + ); + yield r'user'; + yield serializers.serialize( + object.user, + specifiedType: const FullType(UserDto), + ); + } + + @override + Object serialize( + Serializers serializers, + ActivityResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ActivityResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.assetId = valueDes; + break; + case r'comment': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.comment = valueDes; + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ActivityResponseDtoTypeEnum), + ) as ActivityResponseDtoTypeEnum; + result.type = valueDes; + break; + case r'user': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserDto), + ) as UserDto; + result.user.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ActivityResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ActivityResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class ActivityResponseDtoTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'comment') + static const ActivityResponseDtoTypeEnum comment = _$activityResponseDtoTypeEnum_comment; + @BuiltValueEnumConst(wireName: r'like') + static const ActivityResponseDtoTypeEnum like = _$activityResponseDtoTypeEnum_like; + + static Serializer get serializer => _$activityResponseDtoTypeEnumSerializer; + + const ActivityResponseDtoTypeEnum._(String name): super(name); + + static BuiltSet get values => _$activityResponseDtoTypeEnumValues; + static ActivityResponseDtoTypeEnum valueOf(String name) => _$activityResponseDtoTypeEnumValueOf(name); +} + diff --git a/mobile-v2/openapi/lib/src/model/activity_statistics_response_dto.dart b/mobile-v2/openapi/lib/src/model/activity_statistics_response_dto.dart new file mode 100644 index 0000000000..b7e97f75f7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/activity_statistics_response_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'activity_statistics_response_dto.g.dart'; + +/// ActivityStatisticsResponseDto +/// +/// Properties: +/// * [comments] +@BuiltValue() +abstract class ActivityStatisticsResponseDto implements Built { + @BuiltValueField(wireName: r'comments') + int get comments; + + ActivityStatisticsResponseDto._(); + + factory ActivityStatisticsResponseDto([void updates(ActivityStatisticsResponseDtoBuilder b)]) = _$ActivityStatisticsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ActivityStatisticsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ActivityStatisticsResponseDtoSerializer(); +} + +class _$ActivityStatisticsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ActivityStatisticsResponseDto, _$ActivityStatisticsResponseDto]; + + @override + final String wireName = r'ActivityStatisticsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ActivityStatisticsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'comments'; + yield serializers.serialize( + object.comments, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + ActivityStatisticsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ActivityStatisticsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'comments': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.comments = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ActivityStatisticsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ActivityStatisticsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/add_users_dto.dart b/mobile-v2/openapi/lib/src/model/add_users_dto.dart new file mode 100644 index 0000000000..2b1dbe9201 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/add_users_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'add_users_dto.g.dart'; + +/// AddUsersDto +/// +/// Properties: +/// * [sharedUserIds] +@BuiltValue() +abstract class AddUsersDto implements Built { + @BuiltValueField(wireName: r'sharedUserIds') + BuiltList get sharedUserIds; + + AddUsersDto._(); + + factory AddUsersDto([void updates(AddUsersDtoBuilder b)]) = _$AddUsersDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AddUsersDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AddUsersDtoSerializer(); +} + +class _$AddUsersDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AddUsersDto, _$AddUsersDto]; + + @override + final String wireName = r'AddUsersDto'; + + Iterable _serializeProperties( + Serializers serializers, + AddUsersDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'sharedUserIds'; + yield serializers.serialize( + object.sharedUserIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AddUsersDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AddUsersDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'sharedUserIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.sharedUserIds.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AddUsersDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AddUsersDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/admin_onboarding_update_dto.dart b/mobile-v2/openapi/lib/src/model/admin_onboarding_update_dto.dart new file mode 100644 index 0000000000..8d01cca366 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/admin_onboarding_update_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'admin_onboarding_update_dto.g.dart'; + +/// AdminOnboardingUpdateDto +/// +/// Properties: +/// * [isOnboarded] +@BuiltValue() +abstract class AdminOnboardingUpdateDto implements Built { + @BuiltValueField(wireName: r'isOnboarded') + bool get isOnboarded; + + AdminOnboardingUpdateDto._(); + + factory AdminOnboardingUpdateDto([void updates(AdminOnboardingUpdateDtoBuilder b)]) = _$AdminOnboardingUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AdminOnboardingUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AdminOnboardingUpdateDtoSerializer(); +} + +class _$AdminOnboardingUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AdminOnboardingUpdateDto, _$AdminOnboardingUpdateDto]; + + @override + final String wireName = r'AdminOnboardingUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + AdminOnboardingUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'isOnboarded'; + yield serializers.serialize( + object.isOnboarded, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + AdminOnboardingUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AdminOnboardingUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'isOnboarded': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOnboarded = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AdminOnboardingUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AdminOnboardingUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/album_count_response_dto.dart b/mobile-v2/openapi/lib/src/model/album_count_response_dto.dart new file mode 100644 index 0000000000..d3d18e77e1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/album_count_response_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'album_count_response_dto.g.dart'; + +/// AlbumCountResponseDto +/// +/// Properties: +/// * [notShared] +/// * [owned] +/// * [shared] +@BuiltValue() +abstract class AlbumCountResponseDto implements Built { + @BuiltValueField(wireName: r'notShared') + int get notShared; + + @BuiltValueField(wireName: r'owned') + int get owned; + + @BuiltValueField(wireName: r'shared') + int get shared; + + AlbumCountResponseDto._(); + + factory AlbumCountResponseDto([void updates(AlbumCountResponseDtoBuilder b)]) = _$AlbumCountResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AlbumCountResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AlbumCountResponseDtoSerializer(); +} + +class _$AlbumCountResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AlbumCountResponseDto, _$AlbumCountResponseDto]; + + @override + final String wireName = r'AlbumCountResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AlbumCountResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'notShared'; + yield serializers.serialize( + object.notShared, + specifiedType: const FullType(int), + ); + yield r'owned'; + yield serializers.serialize( + object.owned, + specifiedType: const FullType(int), + ); + yield r'shared'; + yield serializers.serialize( + object.shared, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + AlbumCountResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AlbumCountResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'notShared': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.notShared = valueDes; + break; + case r'owned': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.owned = valueDes; + break; + case r'shared': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.shared = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AlbumCountResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AlbumCountResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/album_response_dto.dart b/mobile-v2/openapi/lib/src/model/album_response_dto.dart new file mode 100644 index 0000000000..7f5ffd5ced --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/album_response_dto.dart @@ -0,0 +1,392 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_order.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'album_response_dto.g.dart'; + +/// AlbumResponseDto +/// +/// Properties: +/// * [albumName] +/// * [albumThumbnailAssetId] +/// * [assetCount] +/// * [assets] +/// * [createdAt] +/// * [description] +/// * [endDate] +/// * [hasSharedLink] +/// * [id] +/// * [isActivityEnabled] +/// * [lastModifiedAssetTimestamp] +/// * [order] +/// * [owner] +/// * [ownerId] +/// * [shared] +/// * [sharedUsers] +/// * [startDate] +/// * [updatedAt] +@BuiltValue() +abstract class AlbumResponseDto implements Built { + @BuiltValueField(wireName: r'albumName') + String get albumName; + + @BuiltValueField(wireName: r'albumThumbnailAssetId') + String? get albumThumbnailAssetId; + + @BuiltValueField(wireName: r'assetCount') + int get assetCount; + + @BuiltValueField(wireName: r'assets') + BuiltList get assets; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'description') + String get description; + + @BuiltValueField(wireName: r'endDate') + DateTime? get endDate; + + @BuiltValueField(wireName: r'hasSharedLink') + bool get hasSharedLink; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isActivityEnabled') + bool get isActivityEnabled; + + @BuiltValueField(wireName: r'lastModifiedAssetTimestamp') + DateTime? get lastModifiedAssetTimestamp; + + @BuiltValueField(wireName: r'order') + AssetOrder? get order; + // enum orderEnum { asc, desc, }; + + @BuiltValueField(wireName: r'owner') + UserResponseDto get owner; + + @BuiltValueField(wireName: r'ownerId') + String get ownerId; + + @BuiltValueField(wireName: r'shared') + bool get shared; + + @BuiltValueField(wireName: r'sharedUsers') + BuiltList get sharedUsers; + + @BuiltValueField(wireName: r'startDate') + DateTime? get startDate; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + AlbumResponseDto._(); + + factory AlbumResponseDto([void updates(AlbumResponseDtoBuilder b)]) = _$AlbumResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AlbumResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AlbumResponseDtoSerializer(); +} + +class _$AlbumResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AlbumResponseDto, _$AlbumResponseDto]; + + @override + final String wireName = r'AlbumResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AlbumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'albumName'; + yield serializers.serialize( + object.albumName, + specifiedType: const FullType(String), + ); + yield r'albumThumbnailAssetId'; + yield object.albumThumbnailAssetId == null ? null : serializers.serialize( + object.albumThumbnailAssetId, + specifiedType: const FullType.nullable(String), + ); + yield r'assetCount'; + yield serializers.serialize( + object.assetCount, + specifiedType: const FullType(int), + ); + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + if (object.endDate != null) { + yield r'endDate'; + yield serializers.serialize( + object.endDate, + specifiedType: const FullType(DateTime), + ); + } + yield r'hasSharedLink'; + yield serializers.serialize( + object.hasSharedLink, + specifiedType: const FullType(bool), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isActivityEnabled'; + yield serializers.serialize( + object.isActivityEnabled, + specifiedType: const FullType(bool), + ); + if (object.lastModifiedAssetTimestamp != null) { + yield r'lastModifiedAssetTimestamp'; + yield serializers.serialize( + object.lastModifiedAssetTimestamp, + specifiedType: const FullType(DateTime), + ); + } + if (object.order != null) { + yield r'order'; + yield serializers.serialize( + object.order, + specifiedType: const FullType(AssetOrder), + ); + } + yield r'owner'; + yield serializers.serialize( + object.owner, + specifiedType: const FullType(UserResponseDto), + ); + yield r'ownerId'; + yield serializers.serialize( + object.ownerId, + specifiedType: const FullType(String), + ); + yield r'shared'; + yield serializers.serialize( + object.shared, + specifiedType: const FullType(bool), + ); + yield r'sharedUsers'; + yield serializers.serialize( + object.sharedUsers, + specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]), + ); + if (object.startDate != null) { + yield r'startDate'; + yield serializers.serialize( + object.startDate, + specifiedType: const FullType(DateTime), + ); + } + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + AlbumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AlbumResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumName = valueDes; + break; + case r'albumThumbnailAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.albumThumbnailAssetId = valueDes; + break; + case r'assetCount': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.assetCount = valueDes; + break; + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.assets.replace(valueDes); + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'endDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.endDate = valueDes; + break; + case r'hasSharedLink': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.hasSharedLink = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isActivityEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isActivityEnabled = valueDes; + break; + case r'lastModifiedAssetTimestamp': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.lastModifiedAssetTimestamp = valueDes; + break; + case r'order': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetOrder), + ) as AssetOrder; + result.order = valueDes; + break; + case r'owner': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + result.owner.replace(valueDes); + break; + case r'ownerId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.ownerId = valueDes; + break; + case r'shared': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shared = valueDes; + break; + case r'sharedUsers': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]), + ) as BuiltList; + result.sharedUsers.replace(valueDes); + break; + case r'startDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.startDate = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AlbumResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AlbumResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/all_job_status_response_dto.dart b/mobile-v2/openapi/lib/src/model/all_job_status_response_dto.dart new file mode 100644 index 0000000000..e0832afa60 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/all_job_status_response_dto.dart @@ -0,0 +1,283 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/job_status_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'all_job_status_response_dto.g.dart'; + +/// AllJobStatusResponseDto +/// +/// Properties: +/// * [backgroundTask] +/// * [faceDetection] +/// * [facialRecognition] +/// * [library_] +/// * [metadataExtraction] +/// * [migration] +/// * [search] +/// * [sidecar] +/// * [smartSearch] +/// * [storageTemplateMigration] +/// * [thumbnailGeneration] +/// * [videoConversion] +@BuiltValue() +abstract class AllJobStatusResponseDto implements Built { + @BuiltValueField(wireName: r'backgroundTask') + JobStatusDto get backgroundTask; + + @BuiltValueField(wireName: r'faceDetection') + JobStatusDto get faceDetection; + + @BuiltValueField(wireName: r'facialRecognition') + JobStatusDto get facialRecognition; + + @BuiltValueField(wireName: r'library') + JobStatusDto get library_; + + @BuiltValueField(wireName: r'metadataExtraction') + JobStatusDto get metadataExtraction; + + @BuiltValueField(wireName: r'migration') + JobStatusDto get migration; + + @BuiltValueField(wireName: r'search') + JobStatusDto get search; + + @BuiltValueField(wireName: r'sidecar') + JobStatusDto get sidecar; + + @BuiltValueField(wireName: r'smartSearch') + JobStatusDto get smartSearch; + + @BuiltValueField(wireName: r'storageTemplateMigration') + JobStatusDto get storageTemplateMigration; + + @BuiltValueField(wireName: r'thumbnailGeneration') + JobStatusDto get thumbnailGeneration; + + @BuiltValueField(wireName: r'videoConversion') + JobStatusDto get videoConversion; + + AllJobStatusResponseDto._(); + + factory AllJobStatusResponseDto([void updates(AllJobStatusResponseDtoBuilder b)]) = _$AllJobStatusResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AllJobStatusResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AllJobStatusResponseDtoSerializer(); +} + +class _$AllJobStatusResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AllJobStatusResponseDto, _$AllJobStatusResponseDto]; + + @override + final String wireName = r'AllJobStatusResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AllJobStatusResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'backgroundTask'; + yield serializers.serialize( + object.backgroundTask, + specifiedType: const FullType(JobStatusDto), + ); + yield r'faceDetection'; + yield serializers.serialize( + object.faceDetection, + specifiedType: const FullType(JobStatusDto), + ); + yield r'facialRecognition'; + yield serializers.serialize( + object.facialRecognition, + specifiedType: const FullType(JobStatusDto), + ); + yield r'library'; + yield serializers.serialize( + object.library_, + specifiedType: const FullType(JobStatusDto), + ); + yield r'metadataExtraction'; + yield serializers.serialize( + object.metadataExtraction, + specifiedType: const FullType(JobStatusDto), + ); + yield r'migration'; + yield serializers.serialize( + object.migration, + specifiedType: const FullType(JobStatusDto), + ); + yield r'search'; + yield serializers.serialize( + object.search, + specifiedType: const FullType(JobStatusDto), + ); + yield r'sidecar'; + yield serializers.serialize( + object.sidecar, + specifiedType: const FullType(JobStatusDto), + ); + yield r'smartSearch'; + yield serializers.serialize( + object.smartSearch, + specifiedType: const FullType(JobStatusDto), + ); + yield r'storageTemplateMigration'; + yield serializers.serialize( + object.storageTemplateMigration, + specifiedType: const FullType(JobStatusDto), + ); + yield r'thumbnailGeneration'; + yield serializers.serialize( + object.thumbnailGeneration, + specifiedType: const FullType(JobStatusDto), + ); + yield r'videoConversion'; + yield serializers.serialize( + object.videoConversion, + specifiedType: const FullType(JobStatusDto), + ); + } + + @override + Object serialize( + Serializers serializers, + AllJobStatusResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AllJobStatusResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'backgroundTask': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.backgroundTask.replace(valueDes); + break; + case r'faceDetection': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.faceDetection.replace(valueDes); + break; + case r'facialRecognition': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.facialRecognition.replace(valueDes); + break; + case r'library': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.library_.replace(valueDes); + break; + case r'metadataExtraction': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.metadataExtraction.replace(valueDes); + break; + case r'migration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.migration.replace(valueDes); + break; + case r'search': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.search.replace(valueDes); + break; + case r'sidecar': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.sidecar.replace(valueDes); + break; + case r'smartSearch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.smartSearch.replace(valueDes); + break; + case r'storageTemplateMigration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.storageTemplateMigration.replace(valueDes); + break; + case r'thumbnailGeneration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.thumbnailGeneration.replace(valueDes); + break; + case r'videoConversion': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobStatusDto), + ) as JobStatusDto; + result.videoConversion.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AllJobStatusResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AllJobStatusResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/api_key_create_dto.dart b/mobile-v2/openapi/lib/src/model/api_key_create_dto.dart new file mode 100644 index 0000000000..1a4e6a15a3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/api_key_create_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_key_create_dto.g.dart'; + +/// APIKeyCreateDto +/// +/// Properties: +/// * [name] +@BuiltValue() +abstract class APIKeyCreateDto implements Built { + @BuiltValueField(wireName: r'name') + String? get name; + + APIKeyCreateDto._(); + + factory APIKeyCreateDto([void updates(APIKeyCreateDtoBuilder b)]) = _$APIKeyCreateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(APIKeyCreateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$APIKeyCreateDtoSerializer(); +} + +class _$APIKeyCreateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [APIKeyCreateDto, _$APIKeyCreateDto]; + + @override + final String wireName = r'APIKeyCreateDto'; + + Iterable _serializeProperties( + Serializers serializers, + APIKeyCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + APIKeyCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required APIKeyCreateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + APIKeyCreateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = APIKeyCreateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/api_key_create_response_dto.dart b/mobile-v2/openapi/lib/src/model/api_key_create_response_dto.dart new file mode 100644 index 0000000000..9ed0f84604 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/api_key_create_response_dto.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/api_key_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_key_create_response_dto.g.dart'; + +/// APIKeyCreateResponseDto +/// +/// Properties: +/// * [apiKey] +/// * [secret] +@BuiltValue() +abstract class APIKeyCreateResponseDto implements Built { + @BuiltValueField(wireName: r'apiKey') + APIKeyResponseDto get apiKey; + + @BuiltValueField(wireName: r'secret') + String get secret; + + APIKeyCreateResponseDto._(); + + factory APIKeyCreateResponseDto([void updates(APIKeyCreateResponseDtoBuilder b)]) = _$APIKeyCreateResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(APIKeyCreateResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$APIKeyCreateResponseDtoSerializer(); +} + +class _$APIKeyCreateResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [APIKeyCreateResponseDto, _$APIKeyCreateResponseDto]; + + @override + final String wireName = r'APIKeyCreateResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + APIKeyCreateResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'apiKey'; + yield serializers.serialize( + object.apiKey, + specifiedType: const FullType(APIKeyResponseDto), + ); + yield r'secret'; + yield serializers.serialize( + object.secret, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + APIKeyCreateResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required APIKeyCreateResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'apiKey': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(APIKeyResponseDto), + ) as APIKeyResponseDto; + result.apiKey.replace(valueDes); + break; + case r'secret': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.secret = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + APIKeyCreateResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = APIKeyCreateResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/api_key_response_dto.dart b/mobile-v2/openapi/lib/src/model/api_key_response_dto.dart new file mode 100644 index 0000000000..45f2dcee4e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/api_key_response_dto.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_key_response_dto.g.dart'; + +/// APIKeyResponseDto +/// +/// Properties: +/// * [createdAt] +/// * [id] +/// * [name] +/// * [updatedAt] +@BuiltValue() +abstract class APIKeyResponseDto + implements Built { + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + APIKeyResponseDto._(); + + factory APIKeyResponseDto([void updates(APIKeyResponseDtoBuilder b)]) = + _$APIKeyResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(APIKeyResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => + _$APIKeyResponseDtoSerializer(); +} + +class _$APIKeyResponseDtoSerializer + implements PrimitiveSerializer { + @override + final Iterable types = const [APIKeyResponseDto, _$APIKeyResponseDto]; + + @override + final String wireName = r'APIKeyResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + APIKeyResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + APIKeyResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, + specifiedType: specifiedType) + .toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required APIKeyResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + APIKeyResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = APIKeyResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} diff --git a/mobile-v2/openapi/lib/src/model/api_key_update_dto.dart b/mobile-v2/openapi/lib/src/model/api_key_update_dto.dart new file mode 100644 index 0000000000..b88154b680 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/api_key_update_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'api_key_update_dto.g.dart'; + +/// APIKeyUpdateDto +/// +/// Properties: +/// * [name] +@BuiltValue() +abstract class APIKeyUpdateDto implements Built { + @BuiltValueField(wireName: r'name') + String get name; + + APIKeyUpdateDto._(); + + factory APIKeyUpdateDto([void updates(APIKeyUpdateDtoBuilder b)]) = _$APIKeyUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(APIKeyUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$APIKeyUpdateDtoSerializer(); +} + +class _$APIKeyUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [APIKeyUpdateDto, _$APIKeyUpdateDto]; + + @override + final String wireName = r'APIKeyUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + APIKeyUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + APIKeyUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required APIKeyUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + APIKeyUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = APIKeyUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_delete_dto.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_delete_dto.dart new file mode 100644 index 0000000000..2554caf71b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_delete_dto.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_delete_dto.g.dart'; + +/// AssetBulkDeleteDto +/// +/// Properties: +/// * [force] +/// * [ids] +@BuiltValue() +abstract class AssetBulkDeleteDto implements Built { + @BuiltValueField(wireName: r'force') + bool? get force; + + @BuiltValueField(wireName: r'ids') + BuiltList get ids; + + AssetBulkDeleteDto._(); + + factory AssetBulkDeleteDto([void updates(AssetBulkDeleteDtoBuilder b)]) = _$AssetBulkDeleteDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkDeleteDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkDeleteDtoSerializer(); +} + +class _$AssetBulkDeleteDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkDeleteDto, _$AssetBulkDeleteDto]; + + @override + final String wireName = r'AssetBulkDeleteDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkDeleteDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.force != null) { + yield r'force'; + yield serializers.serialize( + object.force, + specifiedType: const FullType(bool), + ); + } + yield r'ids'; + yield serializers.serialize( + object.ids, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetBulkDeleteDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkDeleteDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'force': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.force = valueDes; + break; + case r'ids': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.ids.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkDeleteDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkDeleteDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_update_dto.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_update_dto.dart new file mode 100644 index 0000000000..801ba8ea78 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_update_dto.dart @@ -0,0 +1,233 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_update_dto.g.dart'; + +/// AssetBulkUpdateDto +/// +/// Properties: +/// * [dateTimeOriginal] +/// * [ids] +/// * [isArchived] +/// * [isFavorite] +/// * [latitude] +/// * [longitude] +/// * [removeParent] +/// * [stackParentId] +@BuiltValue() +abstract class AssetBulkUpdateDto implements Built { + @BuiltValueField(wireName: r'dateTimeOriginal') + String? get dateTimeOriginal; + + @BuiltValueField(wireName: r'ids') + BuiltList get ids; + + @BuiltValueField(wireName: r'isArchived') + bool? get isArchived; + + @BuiltValueField(wireName: r'isFavorite') + bool? get isFavorite; + + @BuiltValueField(wireName: r'latitude') + num? get latitude; + + @BuiltValueField(wireName: r'longitude') + num? get longitude; + + @BuiltValueField(wireName: r'removeParent') + bool? get removeParent; + + @BuiltValueField(wireName: r'stackParentId') + String? get stackParentId; + + AssetBulkUpdateDto._(); + + factory AssetBulkUpdateDto([void updates(AssetBulkUpdateDtoBuilder b)]) = _$AssetBulkUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkUpdateDtoSerializer(); +} + +class _$AssetBulkUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkUpdateDto, _$AssetBulkUpdateDto]; + + @override + final String wireName = r'AssetBulkUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.dateTimeOriginal != null) { + yield r'dateTimeOriginal'; + yield serializers.serialize( + object.dateTimeOriginal, + specifiedType: const FullType(String), + ); + } + yield r'ids'; + yield serializers.serialize( + object.ids, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + if (object.isArchived != null) { + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + } + if (object.isFavorite != null) { + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + } + if (object.latitude != null) { + yield r'latitude'; + yield serializers.serialize( + object.latitude, + specifiedType: const FullType(num), + ); + } + if (object.longitude != null) { + yield r'longitude'; + yield serializers.serialize( + object.longitude, + specifiedType: const FullType(num), + ); + } + if (object.removeParent != null) { + yield r'removeParent'; + yield serializers.serialize( + object.removeParent, + specifiedType: const FullType(bool), + ); + } + if (object.stackParentId != null) { + yield r'stackParentId'; + yield serializers.serialize( + object.stackParentId, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + AssetBulkUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'dateTimeOriginal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.dateTimeOriginal = valueDes; + break; + case r'ids': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.ids.replace(valueDes); + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'latitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.latitude = valueDes; + break; + case r'longitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.longitude = valueDes; + break; + case r'removeParent': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.removeParent = valueDes; + break; + case r'stackParentId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.stackParentId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_dto.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_dto.dart new file mode 100644 index 0000000000..a5fab3f28d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_item.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_upload_check_dto.g.dart'; + +/// AssetBulkUploadCheckDto +/// +/// Properties: +/// * [assets] +@BuiltValue() +abstract class AssetBulkUploadCheckDto implements Built { + @BuiltValueField(wireName: r'assets') + BuiltList get assets; + + AssetBulkUploadCheckDto._(); + + factory AssetBulkUploadCheckDto([void updates(AssetBulkUploadCheckDtoBuilder b)]) = _$AssetBulkUploadCheckDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkUploadCheckDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkUploadCheckDtoSerializer(); +} + +class _$AssetBulkUploadCheckDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkUploadCheckDto, _$AssetBulkUploadCheckDto]; + + @override + final String wireName = r'AssetBulkUploadCheckDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkUploadCheckDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckItem)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetBulkUploadCheckDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkUploadCheckDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckItem)]), + ) as BuiltList; + result.assets.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkUploadCheckDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkUploadCheckDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_item.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_item.dart new file mode 100644 index 0000000000..fa1b59cf8d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_item.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_upload_check_item.g.dart'; + +/// AssetBulkUploadCheckItem +/// +/// Properties: +/// * [checksum] - base64 or hex encoded sha1 hash +/// * [id] +@BuiltValue() +abstract class AssetBulkUploadCheckItem implements Built { + /// base64 or hex encoded sha1 hash + @BuiltValueField(wireName: r'checksum') + String get checksum; + + @BuiltValueField(wireName: r'id') + String get id; + + AssetBulkUploadCheckItem._(); + + factory AssetBulkUploadCheckItem([void updates(AssetBulkUploadCheckItemBuilder b)]) = _$AssetBulkUploadCheckItem; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkUploadCheckItemBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkUploadCheckItemSerializer(); +} + +class _$AssetBulkUploadCheckItemSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkUploadCheckItem, _$AssetBulkUploadCheckItem]; + + @override + final String wireName = r'AssetBulkUploadCheckItem'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkUploadCheckItem object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'checksum'; + yield serializers.serialize( + object.checksum, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetBulkUploadCheckItem object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkUploadCheckItemBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'checksum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.checksum = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkUploadCheckItem deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkUploadCheckItemBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_response_dto.dart new file mode 100644 index 0000000000..dc65b23f95 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_response_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_bulk_upload_check_result.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_upload_check_response_dto.g.dart'; + +/// AssetBulkUploadCheckResponseDto +/// +/// Properties: +/// * [results] +@BuiltValue() +abstract class AssetBulkUploadCheckResponseDto implements Built { + @BuiltValueField(wireName: r'results') + BuiltList get results; + + AssetBulkUploadCheckResponseDto._(); + + factory AssetBulkUploadCheckResponseDto([void updates(AssetBulkUploadCheckResponseDtoBuilder b)]) = _$AssetBulkUploadCheckResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkUploadCheckResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkUploadCheckResponseDtoSerializer(); +} + +class _$AssetBulkUploadCheckResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkUploadCheckResponseDto, _$AssetBulkUploadCheckResponseDto]; + + @override + final String wireName = r'AssetBulkUploadCheckResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkUploadCheckResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'results'; + yield serializers.serialize( + object.results, + specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckResult)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetBulkUploadCheckResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkUploadCheckResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'results': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckResult)]), + ) as BuiltList; + result.results.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkUploadCheckResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkUploadCheckResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_result.dart b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_result.dart new file mode 100644 index 0000000000..8c60b5f0ff --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_bulk_upload_check_result.dart @@ -0,0 +1,191 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_bulk_upload_check_result.g.dart'; + +/// AssetBulkUploadCheckResult +/// +/// Properties: +/// * [action] +/// * [assetId] +/// * [id] +/// * [reason] +@BuiltValue() +abstract class AssetBulkUploadCheckResult implements Built { + @BuiltValueField(wireName: r'action') + AssetBulkUploadCheckResultActionEnum get action; + // enum actionEnum { accept, reject, }; + + @BuiltValueField(wireName: r'assetId') + String? get assetId; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'reason') + AssetBulkUploadCheckResultReasonEnum? get reason; + // enum reasonEnum { duplicate, unsupported-format, }; + + AssetBulkUploadCheckResult._(); + + factory AssetBulkUploadCheckResult([void updates(AssetBulkUploadCheckResultBuilder b)]) = _$AssetBulkUploadCheckResult; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetBulkUploadCheckResultBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetBulkUploadCheckResultSerializer(); +} + +class _$AssetBulkUploadCheckResultSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetBulkUploadCheckResult, _$AssetBulkUploadCheckResult]; + + @override + final String wireName = r'AssetBulkUploadCheckResult'; + + Iterable _serializeProperties( + Serializers serializers, + AssetBulkUploadCheckResult object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'action'; + yield serializers.serialize( + object.action, + specifiedType: const FullType(AssetBulkUploadCheckResultActionEnum), + ); + if (object.assetId != null) { + yield r'assetId'; + yield serializers.serialize( + object.assetId, + specifiedType: const FullType(String), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + if (object.reason != null) { + yield r'reason'; + yield serializers.serialize( + object.reason, + specifiedType: const FullType(AssetBulkUploadCheckResultReasonEnum), + ); + } + } + + @override + Object serialize( + Serializers serializers, + AssetBulkUploadCheckResult object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetBulkUploadCheckResultBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'action': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetBulkUploadCheckResultActionEnum), + ) as AssetBulkUploadCheckResultActionEnum; + result.action = valueDes; + break; + case r'assetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.assetId = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'reason': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetBulkUploadCheckResultReasonEnum), + ) as AssetBulkUploadCheckResultReasonEnum; + result.reason = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetBulkUploadCheckResult deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetBulkUploadCheckResultBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class AssetBulkUploadCheckResultActionEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'accept') + static const AssetBulkUploadCheckResultActionEnum accept = _$assetBulkUploadCheckResultActionEnum_accept; + @BuiltValueEnumConst(wireName: r'reject') + static const AssetBulkUploadCheckResultActionEnum reject = _$assetBulkUploadCheckResultActionEnum_reject; + + static Serializer get serializer => _$assetBulkUploadCheckResultActionEnumSerializer; + + const AssetBulkUploadCheckResultActionEnum._(String name): super(name); + + static BuiltSet get values => _$assetBulkUploadCheckResultActionEnumValues; + static AssetBulkUploadCheckResultActionEnum valueOf(String name) => _$assetBulkUploadCheckResultActionEnumValueOf(name); +} + +class AssetBulkUploadCheckResultReasonEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'duplicate') + static const AssetBulkUploadCheckResultReasonEnum duplicate = _$assetBulkUploadCheckResultReasonEnum_duplicate; + @BuiltValueEnumConst(wireName: r'unsupported-format') + static const AssetBulkUploadCheckResultReasonEnum unsupportedFormat = _$assetBulkUploadCheckResultReasonEnum_unsupportedFormat; + + static Serializer get serializer => _$assetBulkUploadCheckResultReasonEnumSerializer; + + const AssetBulkUploadCheckResultReasonEnum._(String name): super(name); + + static BuiltSet get values => _$assetBulkUploadCheckResultReasonEnumValues; + static AssetBulkUploadCheckResultReasonEnum valueOf(String name) => _$assetBulkUploadCheckResultReasonEnumValueOf(name); +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_delta_sync_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_delta_sync_response_dto.dart new file mode 100644 index 0000000000..49ab789ba5 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_delta_sync_response_dto.dart @@ -0,0 +1,140 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_delta_sync_response_dto.g.dart'; + +/// AssetDeltaSyncResponseDto +/// +/// Properties: +/// * [deleted] +/// * [needsFullSync] +/// * [upserted] +@BuiltValue() +abstract class AssetDeltaSyncResponseDto implements Built { + @BuiltValueField(wireName: r'deleted') + BuiltList get deleted; + + @BuiltValueField(wireName: r'needsFullSync') + bool get needsFullSync; + + @BuiltValueField(wireName: r'upserted') + BuiltList get upserted; + + AssetDeltaSyncResponseDto._(); + + factory AssetDeltaSyncResponseDto([void updates(AssetDeltaSyncResponseDtoBuilder b)]) = _$AssetDeltaSyncResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetDeltaSyncResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetDeltaSyncResponseDtoSerializer(); +} + +class _$AssetDeltaSyncResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetDeltaSyncResponseDto, _$AssetDeltaSyncResponseDto]; + + @override + final String wireName = r'AssetDeltaSyncResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetDeltaSyncResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'deleted'; + yield serializers.serialize( + object.deleted, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'needsFullSync'; + yield serializers.serialize( + object.needsFullSync, + specifiedType: const FullType(bool), + ); + yield r'upserted'; + yield serializers.serialize( + object.upserted, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetDeltaSyncResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetDeltaSyncResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'deleted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.deleted.replace(valueDes); + break; + case r'needsFullSync': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.needsFullSync = valueDes; + break; + case r'upserted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.upserted.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetDeltaSyncResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetDeltaSyncResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_face_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_face_response_dto.dart new file mode 100644 index 0000000000..8b7ebb43d2 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_face_response_dto.dart @@ -0,0 +1,220 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/person_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_face_response_dto.g.dart'; + +/// AssetFaceResponseDto +/// +/// Properties: +/// * [boundingBoxX1] +/// * [boundingBoxX2] +/// * [boundingBoxY1] +/// * [boundingBoxY2] +/// * [id] +/// * [imageHeight] +/// * [imageWidth] +/// * [person] +@BuiltValue() +abstract class AssetFaceResponseDto implements Built { + @BuiltValueField(wireName: r'boundingBoxX1') + int get boundingBoxX1; + + @BuiltValueField(wireName: r'boundingBoxX2') + int get boundingBoxX2; + + @BuiltValueField(wireName: r'boundingBoxY1') + int get boundingBoxY1; + + @BuiltValueField(wireName: r'boundingBoxY2') + int get boundingBoxY2; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'imageHeight') + int get imageHeight; + + @BuiltValueField(wireName: r'imageWidth') + int get imageWidth; + + @BuiltValueField(wireName: r'person') + PersonResponseDto? get person; + + AssetFaceResponseDto._(); + + factory AssetFaceResponseDto([void updates(AssetFaceResponseDtoBuilder b)]) = _$AssetFaceResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetFaceResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetFaceResponseDtoSerializer(); +} + +class _$AssetFaceResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetFaceResponseDto, _$AssetFaceResponseDto]; + + @override + final String wireName = r'AssetFaceResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetFaceResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'boundingBoxX1'; + yield serializers.serialize( + object.boundingBoxX1, + specifiedType: const FullType(int), + ); + yield r'boundingBoxX2'; + yield serializers.serialize( + object.boundingBoxX2, + specifiedType: const FullType(int), + ); + yield r'boundingBoxY1'; + yield serializers.serialize( + object.boundingBoxY1, + specifiedType: const FullType(int), + ); + yield r'boundingBoxY2'; + yield serializers.serialize( + object.boundingBoxY2, + specifiedType: const FullType(int), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'imageHeight'; + yield serializers.serialize( + object.imageHeight, + specifiedType: const FullType(int), + ); + yield r'imageWidth'; + yield serializers.serialize( + object.imageWidth, + specifiedType: const FullType(int), + ); + yield r'person'; + yield object.person == null ? null : serializers.serialize( + object.person, + specifiedType: const FullType.nullable(PersonResponseDto), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetFaceResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetFaceResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'boundingBoxX1': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxX1 = valueDes; + break; + case r'boundingBoxX2': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxX2 = valueDes; + break; + case r'boundingBoxY1': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxY1 = valueDes; + break; + case r'boundingBoxY2': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxY2 = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'imageHeight': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.imageHeight = valueDes; + break; + case r'imageWidth': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.imageWidth = valueDes; + break; + case r'person': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(PersonResponseDto), + ) as PersonResponseDto?; + if (valueDes == null) continue; + result.person.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetFaceResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetFaceResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_face_update_dto.dart b/mobile-v2/openapi/lib/src/model/asset_face_update_dto.dart new file mode 100644 index 0000000000..9975e533c8 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_face_update_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_face_update_item.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_face_update_dto.g.dart'; + +/// AssetFaceUpdateDto +/// +/// Properties: +/// * [data] +@BuiltValue() +abstract class AssetFaceUpdateDto implements Built { + @BuiltValueField(wireName: r'data') + BuiltList get data; + + AssetFaceUpdateDto._(); + + factory AssetFaceUpdateDto([void updates(AssetFaceUpdateDtoBuilder b)]) = _$AssetFaceUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetFaceUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetFaceUpdateDtoSerializer(); +} + +class _$AssetFaceUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetFaceUpdateDto, _$AssetFaceUpdateDto]; + + @override + final String wireName = r'AssetFaceUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetFaceUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'data'; + yield serializers.serialize( + object.data, + specifiedType: const FullType(BuiltList, [FullType(AssetFaceUpdateItem)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetFaceUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetFaceUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'data': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetFaceUpdateItem)]), + ) as BuiltList; + result.data.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetFaceUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetFaceUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_face_update_item.dart b/mobile-v2/openapi/lib/src/model/asset_face_update_item.dart new file mode 100644 index 0000000000..58ade0968d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_face_update_item.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_face_update_item.g.dart'; + +/// AssetFaceUpdateItem +/// +/// Properties: +/// * [assetId] +/// * [personId] +@BuiltValue() +abstract class AssetFaceUpdateItem implements Built { + @BuiltValueField(wireName: r'assetId') + String get assetId; + + @BuiltValueField(wireName: r'personId') + String get personId; + + AssetFaceUpdateItem._(); + + factory AssetFaceUpdateItem([void updates(AssetFaceUpdateItemBuilder b)]) = _$AssetFaceUpdateItem; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetFaceUpdateItemBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetFaceUpdateItemSerializer(); +} + +class _$AssetFaceUpdateItemSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetFaceUpdateItem, _$AssetFaceUpdateItem]; + + @override + final String wireName = r'AssetFaceUpdateItem'; + + Iterable _serializeProperties( + Serializers serializers, + AssetFaceUpdateItem object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetId'; + yield serializers.serialize( + object.assetId, + specifiedType: const FullType(String), + ); + yield r'personId'; + yield serializers.serialize( + object.personId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetFaceUpdateItem object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetFaceUpdateItemBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.assetId = valueDes; + break; + case r'personId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.personId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetFaceUpdateItem deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetFaceUpdateItemBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_face_without_person_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_face_without_person_response_dto.dart new file mode 100644 index 0000000000..0a7ba4786e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_face_without_person_response_dto.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_face_without_person_response_dto.g.dart'; + +/// AssetFaceWithoutPersonResponseDto +/// +/// Properties: +/// * [boundingBoxX1] +/// * [boundingBoxX2] +/// * [boundingBoxY1] +/// * [boundingBoxY2] +/// * [id] +/// * [imageHeight] +/// * [imageWidth] +@BuiltValue() +abstract class AssetFaceWithoutPersonResponseDto implements Built { + @BuiltValueField(wireName: r'boundingBoxX1') + int get boundingBoxX1; + + @BuiltValueField(wireName: r'boundingBoxX2') + int get boundingBoxX2; + + @BuiltValueField(wireName: r'boundingBoxY1') + int get boundingBoxY1; + + @BuiltValueField(wireName: r'boundingBoxY2') + int get boundingBoxY2; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'imageHeight') + int get imageHeight; + + @BuiltValueField(wireName: r'imageWidth') + int get imageWidth; + + AssetFaceWithoutPersonResponseDto._(); + + factory AssetFaceWithoutPersonResponseDto([void updates(AssetFaceWithoutPersonResponseDtoBuilder b)]) = _$AssetFaceWithoutPersonResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetFaceWithoutPersonResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetFaceWithoutPersonResponseDtoSerializer(); +} + +class _$AssetFaceWithoutPersonResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetFaceWithoutPersonResponseDto, _$AssetFaceWithoutPersonResponseDto]; + + @override + final String wireName = r'AssetFaceWithoutPersonResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetFaceWithoutPersonResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'boundingBoxX1'; + yield serializers.serialize( + object.boundingBoxX1, + specifiedType: const FullType(int), + ); + yield r'boundingBoxX2'; + yield serializers.serialize( + object.boundingBoxX2, + specifiedType: const FullType(int), + ); + yield r'boundingBoxY1'; + yield serializers.serialize( + object.boundingBoxY1, + specifiedType: const FullType(int), + ); + yield r'boundingBoxY2'; + yield serializers.serialize( + object.boundingBoxY2, + specifiedType: const FullType(int), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'imageHeight'; + yield serializers.serialize( + object.imageHeight, + specifiedType: const FullType(int), + ); + yield r'imageWidth'; + yield serializers.serialize( + object.imageWidth, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetFaceWithoutPersonResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetFaceWithoutPersonResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'boundingBoxX1': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxX1 = valueDes; + break; + case r'boundingBoxX2': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxX2 = valueDes; + break; + case r'boundingBoxY1': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxY1 = valueDes; + break; + case r'boundingBoxY2': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.boundingBoxY2 = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'imageHeight': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.imageHeight = valueDes; + break; + case r'imageWidth': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.imageWidth = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetFaceWithoutPersonResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetFaceWithoutPersonResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_file_upload_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_file_upload_response_dto.dart new file mode 100644 index 0000000000..793b75b950 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_file_upload_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_file_upload_response_dto.g.dart'; + +/// AssetFileUploadResponseDto +/// +/// Properties: +/// * [duplicate] +/// * [id] +@BuiltValue() +abstract class AssetFileUploadResponseDto implements Built { + @BuiltValueField(wireName: r'duplicate') + bool get duplicate; + + @BuiltValueField(wireName: r'id') + String get id; + + AssetFileUploadResponseDto._(); + + factory AssetFileUploadResponseDto([void updates(AssetFileUploadResponseDtoBuilder b)]) = _$AssetFileUploadResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetFileUploadResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetFileUploadResponseDtoSerializer(); +} + +class _$AssetFileUploadResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetFileUploadResponseDto, _$AssetFileUploadResponseDto]; + + @override + final String wireName = r'AssetFileUploadResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetFileUploadResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'duplicate'; + yield serializers.serialize( + object.duplicate, + specifiedType: const FullType(bool), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetFileUploadResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetFileUploadResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'duplicate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.duplicate = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetFileUploadResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetFileUploadResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_ids_dto.dart b/mobile-v2/openapi/lib/src/model/asset_ids_dto.dart new file mode 100644 index 0000000000..450473ebdf --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_ids_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_ids_dto.g.dart'; + +/// AssetIdsDto +/// +/// Properties: +/// * [assetIds] +@BuiltValue() +abstract class AssetIdsDto implements Built { + @BuiltValueField(wireName: r'assetIds') + BuiltList get assetIds; + + AssetIdsDto._(); + + factory AssetIdsDto([void updates(AssetIdsDtoBuilder b)]) = _$AssetIdsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetIdsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetIdsDtoSerializer(); +} + +class _$AssetIdsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetIdsDto, _$AssetIdsDto]; + + @override + final String wireName = r'AssetIdsDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetIdsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetIdsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetIdsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetIdsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetIdsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_ids_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_ids_response_dto.dart new file mode 100644 index 0000000000..0c3f722b9d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_ids_response_dto.dart @@ -0,0 +1,159 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_ids_response_dto.g.dart'; + +/// AssetIdsResponseDto +/// +/// Properties: +/// * [assetId] +/// * [error] +/// * [success] +@BuiltValue() +abstract class AssetIdsResponseDto implements Built { + @BuiltValueField(wireName: r'assetId') + String get assetId; + + @BuiltValueField(wireName: r'error') + AssetIdsResponseDtoErrorEnum? get error; + // enum errorEnum { duplicate, no_permission, not_found, }; + + @BuiltValueField(wireName: r'success') + bool get success; + + AssetIdsResponseDto._(); + + factory AssetIdsResponseDto([void updates(AssetIdsResponseDtoBuilder b)]) = _$AssetIdsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetIdsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetIdsResponseDtoSerializer(); +} + +class _$AssetIdsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetIdsResponseDto, _$AssetIdsResponseDto]; + + @override + final String wireName = r'AssetIdsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetIdsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetId'; + yield serializers.serialize( + object.assetId, + specifiedType: const FullType(String), + ); + if (object.error != null) { + yield r'error'; + yield serializers.serialize( + object.error, + specifiedType: const FullType(AssetIdsResponseDtoErrorEnum), + ); + } + yield r'success'; + yield serializers.serialize( + object.success, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetIdsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetIdsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.assetId = valueDes; + break; + case r'error': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetIdsResponseDtoErrorEnum), + ) as AssetIdsResponseDtoErrorEnum; + result.error = valueDes; + break; + case r'success': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.success = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetIdsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetIdsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class AssetIdsResponseDtoErrorEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'duplicate') + static const AssetIdsResponseDtoErrorEnum duplicate = _$assetIdsResponseDtoErrorEnum_duplicate; + @BuiltValueEnumConst(wireName: r'no_permission') + static const AssetIdsResponseDtoErrorEnum noPermission = _$assetIdsResponseDtoErrorEnum_noPermission; + @BuiltValueEnumConst(wireName: r'not_found') + static const AssetIdsResponseDtoErrorEnum notFound = _$assetIdsResponseDtoErrorEnum_notFound; + + static Serializer get serializer => _$assetIdsResponseDtoErrorEnumSerializer; + + const AssetIdsResponseDtoErrorEnum._(String name): super(name); + + static BuiltSet get values => _$assetIdsResponseDtoErrorEnumValues; + static AssetIdsResponseDtoErrorEnum valueOf(String name) => _$assetIdsResponseDtoErrorEnumValueOf(name); +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_job_name.dart b/mobile-v2/openapi/lib/src/model/asset_job_name.dart new file mode 100644 index 0000000000..887cfce48f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_job_name.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_job_name.g.dart'; + +class AssetJobName extends EnumClass { + + @BuiltValueEnumConst(wireName: r'regenerate-thumbnail') + static const AssetJobName regenerateThumbnail = _$regenerateThumbnail; + @BuiltValueEnumConst(wireName: r'refresh-metadata') + static const AssetJobName refreshMetadata = _$refreshMetadata; + @BuiltValueEnumConst(wireName: r'transcode-video') + static const AssetJobName transcodeVideo = _$transcodeVideo; + + static Serializer get serializer => _$assetJobNameSerializer; + + const AssetJobName._(String name): super(name); + + static BuiltSet get values => _$values; + static AssetJobName valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class AssetJobNameMixin = Object with _$AssetJobNameMixin; + diff --git a/mobile-v2/openapi/lib/src/model/asset_jobs_dto.dart b/mobile-v2/openapi/lib/src/model/asset_jobs_dto.dart new file mode 100644 index 0000000000..e6b97ec0ef --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_jobs_dto.dart @@ -0,0 +1,125 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_job_name.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_jobs_dto.g.dart'; + +/// AssetJobsDto +/// +/// Properties: +/// * [assetIds] +/// * [name] +@BuiltValue() +abstract class AssetJobsDto implements Built { + @BuiltValueField(wireName: r'assetIds') + BuiltList get assetIds; + + @BuiltValueField(wireName: r'name') + AssetJobName get name; + // enum nameEnum { regenerate-thumbnail, refresh-metadata, transcode-video, }; + + AssetJobsDto._(); + + factory AssetJobsDto([void updates(AssetJobsDtoBuilder b)]) = _$AssetJobsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetJobsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetJobsDtoSerializer(); +} + +class _$AssetJobsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetJobsDto, _$AssetJobsDto]; + + @override + final String wireName = r'AssetJobsDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetJobsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(AssetJobName), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetJobsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetJobsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetJobName), + ) as AssetJobName; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetJobsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetJobsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_order.dart b/mobile-v2/openapi/lib/src/model/asset_order.dart new file mode 100644 index 0000000000..8ae3dd8567 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_order.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_order.g.dart'; + +class AssetOrder extends EnumClass { + + @BuiltValueEnumConst(wireName: r'asc') + static const AssetOrder asc = _$asc; + @BuiltValueEnumConst(wireName: r'desc') + static const AssetOrder desc = _$desc; + + static Serializer get serializer => _$assetOrderSerializer; + + const AssetOrder._(String name): super(name); + + static BuiltSet get values => _$values; + static AssetOrder valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class AssetOrderMixin = Object with _$AssetOrderMixin; + diff --git a/mobile-v2/openapi/lib/src/model/asset_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_response_dto.dart new file mode 100644 index 0000000000..76d4868f3d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_response_dto.dart @@ -0,0 +1,631 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_type_enum.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/exif_response_dto.dart'; +import 'package:openapi/src/model/smart_info_response_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; +import 'package:openapi/src/model/tag_response_dto.dart'; +import 'package:openapi/src/model/person_with_faces_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_response_dto.g.dart'; + +/// AssetResponseDto +/// +/// Properties: +/// * [checksum] - base64 encoded sha1 hash +/// * [deviceAssetId] +/// * [deviceId] +/// * [duration] +/// * [exifInfo] +/// * [fileCreatedAt] +/// * [fileModifiedAt] +/// * [hasMetadata] +/// * [id] +/// * [isArchived] +/// * [isExternal] +/// * [isFavorite] +/// * [isOffline] +/// * [isReadOnly] +/// * [isTrashed] +/// * [libraryId] +/// * [livePhotoVideoId] +/// * [localDateTime] +/// * [originalFileName] +/// * [originalPath] +/// * [owner] +/// * [ownerId] +/// * [people] +/// * [resized] +/// * [smartInfo] +/// * [stack] +/// * [stackCount] +/// * [stackParentId] +/// * [tags] +/// * [thumbhash] +/// * [type] +/// * [updatedAt] +@BuiltValue() +abstract class AssetResponseDto implements Built { + /// base64 encoded sha1 hash + @BuiltValueField(wireName: r'checksum') + String get checksum; + + @BuiltValueField(wireName: r'deviceAssetId') + String get deviceAssetId; + + @BuiltValueField(wireName: r'deviceId') + String get deviceId; + + @BuiltValueField(wireName: r'duration') + String get duration; + + @BuiltValueField(wireName: r'exifInfo') + ExifResponseDto? get exifInfo; + + @BuiltValueField(wireName: r'fileCreatedAt') + DateTime get fileCreatedAt; + + @BuiltValueField(wireName: r'fileModifiedAt') + DateTime get fileModifiedAt; + + @BuiltValueField(wireName: r'hasMetadata') + bool get hasMetadata; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isArchived') + bool get isArchived; + + @BuiltValueField(wireName: r'isExternal') + bool get isExternal; + + @BuiltValueField(wireName: r'isFavorite') + bool get isFavorite; + + @BuiltValueField(wireName: r'isOffline') + bool get isOffline; + + @BuiltValueField(wireName: r'isReadOnly') + bool get isReadOnly; + + @BuiltValueField(wireName: r'isTrashed') + bool get isTrashed; + + @BuiltValueField(wireName: r'libraryId') + String get libraryId; + + @BuiltValueField(wireName: r'livePhotoVideoId') + String? get livePhotoVideoId; + + @BuiltValueField(wireName: r'localDateTime') + DateTime get localDateTime; + + @BuiltValueField(wireName: r'originalFileName') + String get originalFileName; + + @BuiltValueField(wireName: r'originalPath') + String get originalPath; + + @BuiltValueField(wireName: r'owner') + UserResponseDto? get owner; + + @BuiltValueField(wireName: r'ownerId') + String get ownerId; + + @BuiltValueField(wireName: r'people') + BuiltList? get people; + + @BuiltValueField(wireName: r'resized') + bool get resized; + + @BuiltValueField(wireName: r'smartInfo') + SmartInfoResponseDto? get smartInfo; + + @BuiltValueField(wireName: r'stack') + BuiltList? get stack; + + @BuiltValueField(wireName: r'stackCount') + int? get stackCount; + + @BuiltValueField(wireName: r'stackParentId') + String? get stackParentId; + + @BuiltValueField(wireName: r'tags') + BuiltList? get tags; + + @BuiltValueField(wireName: r'thumbhash') + String? get thumbhash; + + @BuiltValueField(wireName: r'type') + AssetTypeEnum get type; + // enum typeEnum { IMAGE, VIDEO, AUDIO, OTHER, }; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + AssetResponseDto._(); + + factory AssetResponseDto([void updates(AssetResponseDtoBuilder b)]) = _$AssetResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetResponseDtoSerializer(); +} + +class _$AssetResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetResponseDto, _$AssetResponseDto]; + + @override + final String wireName = r'AssetResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'checksum'; + yield serializers.serialize( + object.checksum, + specifiedType: const FullType(String), + ); + yield r'deviceAssetId'; + yield serializers.serialize( + object.deviceAssetId, + specifiedType: const FullType(String), + ); + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + yield r'duration'; + yield serializers.serialize( + object.duration, + specifiedType: const FullType(String), + ); + if (object.exifInfo != null) { + yield r'exifInfo'; + yield serializers.serialize( + object.exifInfo, + specifiedType: const FullType(ExifResponseDto), + ); + } + yield r'fileCreatedAt'; + yield serializers.serialize( + object.fileCreatedAt, + specifiedType: const FullType(DateTime), + ); + yield r'fileModifiedAt'; + yield serializers.serialize( + object.fileModifiedAt, + specifiedType: const FullType(DateTime), + ); + yield r'hasMetadata'; + yield serializers.serialize( + object.hasMetadata, + specifiedType: const FullType(bool), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + yield r'isExternal'; + yield serializers.serialize( + object.isExternal, + specifiedType: const FullType(bool), + ); + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + yield r'isOffline'; + yield serializers.serialize( + object.isOffline, + specifiedType: const FullType(bool), + ); + yield r'isReadOnly'; + yield serializers.serialize( + object.isReadOnly, + specifiedType: const FullType(bool), + ); + yield r'isTrashed'; + yield serializers.serialize( + object.isTrashed, + specifiedType: const FullType(bool), + ); + yield r'libraryId'; + yield serializers.serialize( + object.libraryId, + specifiedType: const FullType(String), + ); + if (object.livePhotoVideoId != null) { + yield r'livePhotoVideoId'; + yield serializers.serialize( + object.livePhotoVideoId, + specifiedType: const FullType.nullable(String), + ); + } + yield r'localDateTime'; + yield serializers.serialize( + object.localDateTime, + specifiedType: const FullType(DateTime), + ); + yield r'originalFileName'; + yield serializers.serialize( + object.originalFileName, + specifiedType: const FullType(String), + ); + yield r'originalPath'; + yield serializers.serialize( + object.originalPath, + specifiedType: const FullType(String), + ); + if (object.owner != null) { + yield r'owner'; + yield serializers.serialize( + object.owner, + specifiedType: const FullType(UserResponseDto), + ); + } + yield r'ownerId'; + yield serializers.serialize( + object.ownerId, + specifiedType: const FullType(String), + ); + if (object.people != null) { + yield r'people'; + yield serializers.serialize( + object.people, + specifiedType: const FullType(BuiltList, [FullType(PersonWithFacesResponseDto)]), + ); + } + yield r'resized'; + yield serializers.serialize( + object.resized, + specifiedType: const FullType(bool), + ); + if (object.smartInfo != null) { + yield r'smartInfo'; + yield serializers.serialize( + object.smartInfo, + specifiedType: const FullType(SmartInfoResponseDto), + ); + } + if (object.stack != null) { + yield r'stack'; + yield serializers.serialize( + object.stack, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + } + yield r'stackCount'; + yield object.stackCount == null ? null : serializers.serialize( + object.stackCount, + specifiedType: const FullType.nullable(int), + ); + if (object.stackParentId != null) { + yield r'stackParentId'; + yield serializers.serialize( + object.stackParentId, + specifiedType: const FullType.nullable(String), + ); + } + if (object.tags != null) { + yield r'tags'; + yield serializers.serialize( + object.tags, + specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]), + ); + } + yield r'thumbhash'; + yield object.thumbhash == null ? null : serializers.serialize( + object.thumbhash, + specifiedType: const FullType.nullable(String), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(AssetTypeEnum), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'checksum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.checksum = valueDes; + break; + case r'deviceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceAssetId = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'duration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.duration = valueDes; + break; + case r'exifInfo': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ExifResponseDto), + ) as ExifResponseDto; + result.exifInfo.replace(valueDes); + break; + case r'fileCreatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.fileCreatedAt = valueDes; + break; + case r'fileModifiedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.fileModifiedAt = valueDes; + break; + case r'hasMetadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.hasMetadata = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isExternal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isExternal = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'isOffline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOffline = valueDes; + break; + case r'isReadOnly': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isReadOnly = valueDes; + break; + case r'isTrashed': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isTrashed = valueDes; + break; + case r'libraryId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.libraryId = valueDes; + break; + case r'livePhotoVideoId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.livePhotoVideoId = valueDes; + break; + case r'localDateTime': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.localDateTime = valueDes; + break; + case r'originalFileName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.originalFileName = valueDes; + break; + case r'originalPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.originalPath = valueDes; + break; + case r'owner': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserResponseDto), + ) as UserResponseDto; + result.owner.replace(valueDes); + break; + case r'ownerId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.ownerId = valueDes; + break; + case r'people': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(PersonWithFacesResponseDto)]), + ) as BuiltList; + result.people.replace(valueDes); + break; + case r'resized': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.resized = valueDes; + break; + case r'smartInfo': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SmartInfoResponseDto), + ) as SmartInfoResponseDto; + result.smartInfo.replace(valueDes); + break; + case r'stack': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.stack.replace(valueDes); + break; + case r'stackCount': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.stackCount = valueDes; + break; + case r'stackParentId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.stackParentId = valueDes; + break; + case r'tags': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]), + ) as BuiltList; + result.tags.replace(valueDes); + break; + case r'thumbhash': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.thumbhash = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetTypeEnum), + ) as AssetTypeEnum; + result.type = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_stats_response_dto.dart b/mobile-v2/openapi/lib/src/model/asset_stats_response_dto.dart new file mode 100644 index 0000000000..573334720d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_stats_response_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_stats_response_dto.g.dart'; + +/// AssetStatsResponseDto +/// +/// Properties: +/// * [images] +/// * [total] +/// * [videos] +@BuiltValue() +abstract class AssetStatsResponseDto implements Built { + @BuiltValueField(wireName: r'images') + int get images; + + @BuiltValueField(wireName: r'total') + int get total; + + @BuiltValueField(wireName: r'videos') + int get videos; + + AssetStatsResponseDto._(); + + factory AssetStatsResponseDto([void updates(AssetStatsResponseDtoBuilder b)]) = _$AssetStatsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AssetStatsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AssetStatsResponseDtoSerializer(); +} + +class _$AssetStatsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AssetStatsResponseDto, _$AssetStatsResponseDto]; + + @override + final String wireName = r'AssetStatsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AssetStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'images'; + yield serializers.serialize( + object.images, + specifiedType: const FullType(int), + ); + yield r'total'; + yield serializers.serialize( + object.total, + specifiedType: const FullType(int), + ); + yield r'videos'; + yield serializers.serialize( + object.videos, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + AssetStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AssetStatsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'images': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.images = valueDes; + break; + case r'total': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.total = valueDes; + break; + case r'videos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.videos = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AssetStatsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AssetStatsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/asset_type_enum.dart b/mobile-v2/openapi/lib/src/model/asset_type_enum.dart new file mode 100644 index 0000000000..8f83309961 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/asset_type_enum.dart @@ -0,0 +1,38 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'asset_type_enum.g.dart'; + +class AssetTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'IMAGE') + static const AssetTypeEnum IMAGE = _$IMAGE; + @BuiltValueEnumConst(wireName: r'VIDEO') + static const AssetTypeEnum VIDEO = _$VIDEO; + @BuiltValueEnumConst(wireName: r'AUDIO') + static const AssetTypeEnum AUDIO = _$AUDIO; + @BuiltValueEnumConst(wireName: r'OTHER') + static const AssetTypeEnum OTHER = _$OTHER; + + static Serializer get serializer => _$assetTypeEnumSerializer; + + const AssetTypeEnum._(String name): super(name); + + static BuiltSet get values => _$values; + static AssetTypeEnum valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class AssetTypeEnumMixin = Object with _$AssetTypeEnumMixin; + diff --git a/mobile-v2/openapi/lib/src/model/audio_codec.dart b/mobile-v2/openapi/lib/src/model/audio_codec.dart new file mode 100644 index 0000000000..bb1ea81fd0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/audio_codec.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'audio_codec.g.dart'; + +class AudioCodec extends EnumClass { + + @BuiltValueEnumConst(wireName: r'mp3') + static const AudioCodec mp3 = _$mp3; + @BuiltValueEnumConst(wireName: r'aac') + static const AudioCodec aac = _$aac; + @BuiltValueEnumConst(wireName: r'libopus') + static const AudioCodec libopus = _$libopus; + + static Serializer get serializer => _$audioCodecSerializer; + + const AudioCodec._(String name): super(name); + + static BuiltSet get values => _$values; + static AudioCodec valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class AudioCodecMixin = Object with _$AudioCodecMixin; + diff --git a/mobile-v2/openapi/lib/src/model/audit_deletes_response_dto.dart b/mobile-v2/openapi/lib/src/model/audit_deletes_response_dto.dart new file mode 100644 index 0000000000..d2b8daab74 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/audit_deletes_response_dto.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'audit_deletes_response_dto.g.dart'; + +/// AuditDeletesResponseDto +/// +/// Properties: +/// * [ids] +/// * [needsFullSync] +@BuiltValue() +abstract class AuditDeletesResponseDto implements Built { + @BuiltValueField(wireName: r'ids') + BuiltList get ids; + + @BuiltValueField(wireName: r'needsFullSync') + bool get needsFullSync; + + AuditDeletesResponseDto._(); + + factory AuditDeletesResponseDto([void updates(AuditDeletesResponseDtoBuilder b)]) = _$AuditDeletesResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(AuditDeletesResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$AuditDeletesResponseDtoSerializer(); +} + +class _$AuditDeletesResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [AuditDeletesResponseDto, _$AuditDeletesResponseDto]; + + @override + final String wireName = r'AuditDeletesResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + AuditDeletesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'ids'; + yield serializers.serialize( + object.ids, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'needsFullSync'; + yield serializers.serialize( + object.needsFullSync, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + AuditDeletesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required AuditDeletesResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'ids': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.ids.replace(valueDes); + break; + case r'needsFullSync': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.needsFullSync = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + AuditDeletesResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = AuditDeletesResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/bulk_id_response_dto.dart b/mobile-v2/openapi/lib/src/model/bulk_id_response_dto.dart new file mode 100644 index 0000000000..8f32d16ad8 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/bulk_id_response_dto.dart @@ -0,0 +1,161 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'bulk_id_response_dto.g.dart'; + +/// BulkIdResponseDto +/// +/// Properties: +/// * [error] +/// * [id] +/// * [success] +@BuiltValue() +abstract class BulkIdResponseDto implements Built { + @BuiltValueField(wireName: r'error') + BulkIdResponseDtoErrorEnum? get error; + // enum errorEnum { duplicate, no_permission, not_found, unknown, }; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'success') + bool get success; + + BulkIdResponseDto._(); + + factory BulkIdResponseDto([void updates(BulkIdResponseDtoBuilder b)]) = _$BulkIdResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(BulkIdResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$BulkIdResponseDtoSerializer(); +} + +class _$BulkIdResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [BulkIdResponseDto, _$BulkIdResponseDto]; + + @override + final String wireName = r'BulkIdResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + BulkIdResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.error != null) { + yield r'error'; + yield serializers.serialize( + object.error, + specifiedType: const FullType(BulkIdResponseDtoErrorEnum), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'success'; + yield serializers.serialize( + object.success, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + BulkIdResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required BulkIdResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'error': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BulkIdResponseDtoErrorEnum), + ) as BulkIdResponseDtoErrorEnum; + result.error = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'success': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.success = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + BulkIdResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = BulkIdResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class BulkIdResponseDtoErrorEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'duplicate') + static const BulkIdResponseDtoErrorEnum duplicate = _$bulkIdResponseDtoErrorEnum_duplicate; + @BuiltValueEnumConst(wireName: r'no_permission') + static const BulkIdResponseDtoErrorEnum noPermission = _$bulkIdResponseDtoErrorEnum_noPermission; + @BuiltValueEnumConst(wireName: r'not_found') + static const BulkIdResponseDtoErrorEnum notFound = _$bulkIdResponseDtoErrorEnum_notFound; + @BuiltValueEnumConst(wireName: r'unknown') + static const BulkIdResponseDtoErrorEnum unknown = _$bulkIdResponseDtoErrorEnum_unknown; + + static Serializer get serializer => _$bulkIdResponseDtoErrorEnumSerializer; + + const BulkIdResponseDtoErrorEnum._(String name): super(name); + + static BuiltSet get values => _$bulkIdResponseDtoErrorEnumValues; + static BulkIdResponseDtoErrorEnum valueOf(String name) => _$bulkIdResponseDtoErrorEnumValueOf(name); +} + diff --git a/mobile-v2/openapi/lib/src/model/bulk_ids_dto.dart b/mobile-v2/openapi/lib/src/model/bulk_ids_dto.dart new file mode 100644 index 0000000000..fd0d7c9461 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/bulk_ids_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'bulk_ids_dto.g.dart'; + +/// BulkIdsDto +/// +/// Properties: +/// * [ids] +@BuiltValue() +abstract class BulkIdsDto implements Built { + @BuiltValueField(wireName: r'ids') + BuiltList get ids; + + BulkIdsDto._(); + + factory BulkIdsDto([void updates(BulkIdsDtoBuilder b)]) = _$BulkIdsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(BulkIdsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$BulkIdsDtoSerializer(); +} + +class _$BulkIdsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [BulkIdsDto, _$BulkIdsDto]; + + @override + final String wireName = r'BulkIdsDto'; + + Iterable _serializeProperties( + Serializers serializers, + BulkIdsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'ids'; + yield serializers.serialize( + object.ids, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + BulkIdsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required BulkIdsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'ids': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.ids.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + BulkIdsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = BulkIdsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/change_password_dto.dart b/mobile-v2/openapi/lib/src/model/change_password_dto.dart new file mode 100644 index 0000000000..86a7c1459a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/change_password_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'change_password_dto.g.dart'; + +/// ChangePasswordDto +/// +/// Properties: +/// * [newPassword] +/// * [password] +@BuiltValue() +abstract class ChangePasswordDto implements Built { + @BuiltValueField(wireName: r'newPassword') + String get newPassword; + + @BuiltValueField(wireName: r'password') + String get password; + + ChangePasswordDto._(); + + factory ChangePasswordDto([void updates(ChangePasswordDtoBuilder b)]) = _$ChangePasswordDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ChangePasswordDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ChangePasswordDtoSerializer(); +} + +class _$ChangePasswordDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ChangePasswordDto, _$ChangePasswordDto]; + + @override + final String wireName = r'ChangePasswordDto'; + + Iterable _serializeProperties( + Serializers serializers, + ChangePasswordDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'newPassword'; + yield serializers.serialize( + object.newPassword, + specifiedType: const FullType(String), + ); + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + ChangePasswordDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ChangePasswordDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'newPassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.newPassword = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ChangePasswordDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ChangePasswordDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/check_existing_assets_dto.dart b/mobile-v2/openapi/lib/src/model/check_existing_assets_dto.dart new file mode 100644 index 0000000000..1fb7b096c8 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/check_existing_assets_dto.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'check_existing_assets_dto.g.dart'; + +/// CheckExistingAssetsDto +/// +/// Properties: +/// * [deviceAssetIds] +/// * [deviceId] +@BuiltValue() +abstract class CheckExistingAssetsDto implements Built { + @BuiltValueField(wireName: r'deviceAssetIds') + BuiltList get deviceAssetIds; + + @BuiltValueField(wireName: r'deviceId') + String get deviceId; + + CheckExistingAssetsDto._(); + + factory CheckExistingAssetsDto([void updates(CheckExistingAssetsDtoBuilder b)]) = _$CheckExistingAssetsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CheckExistingAssetsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CheckExistingAssetsDtoSerializer(); +} + +class _$CheckExistingAssetsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CheckExistingAssetsDto, _$CheckExistingAssetsDto]; + + @override + final String wireName = r'CheckExistingAssetsDto'; + + Iterable _serializeProperties( + Serializers serializers, + CheckExistingAssetsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'deviceAssetIds'; + yield serializers.serialize( + object.deviceAssetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + CheckExistingAssetsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CheckExistingAssetsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'deviceAssetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.deviceAssetIds.replace(valueDes); + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CheckExistingAssetsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CheckExistingAssetsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/check_existing_assets_response_dto.dart b/mobile-v2/openapi/lib/src/model/check_existing_assets_response_dto.dart new file mode 100644 index 0000000000..536979e61d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/check_existing_assets_response_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'check_existing_assets_response_dto.g.dart'; + +/// CheckExistingAssetsResponseDto +/// +/// Properties: +/// * [existingIds] +@BuiltValue() +abstract class CheckExistingAssetsResponseDto implements Built { + @BuiltValueField(wireName: r'existingIds') + BuiltList get existingIds; + + CheckExistingAssetsResponseDto._(); + + factory CheckExistingAssetsResponseDto([void updates(CheckExistingAssetsResponseDtoBuilder b)]) = _$CheckExistingAssetsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CheckExistingAssetsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CheckExistingAssetsResponseDtoSerializer(); +} + +class _$CheckExistingAssetsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CheckExistingAssetsResponseDto, _$CheckExistingAssetsResponseDto]; + + @override + final String wireName = r'CheckExistingAssetsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + CheckExistingAssetsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'existingIds'; + yield serializers.serialize( + object.existingIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + CheckExistingAssetsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CheckExistingAssetsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'existingIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.existingIds.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CheckExistingAssetsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CheckExistingAssetsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/clip_config.dart b/mobile-v2/openapi/lib/src/model/clip_config.dart new file mode 100644 index 0000000000..146cdab8b6 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/clip_config.dart @@ -0,0 +1,162 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/model_type.dart'; +import 'package:openapi/src/model/clip_mode.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'clip_config.g.dart'; + +/// CLIPConfig +/// +/// Properties: +/// * [enabled] +/// * [mode] +/// * [modelName] +/// * [modelType] +@BuiltValue() +abstract class CLIPConfig implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'mode') + CLIPMode? get mode; + // enum modeEnum { vision, text, }; + + @BuiltValueField(wireName: r'modelName') + String get modelName; + + @BuiltValueField(wireName: r'modelType') + ModelType? get modelType; + // enum modelTypeEnum { facial-recognition, clip, }; + + CLIPConfig._(); + + factory CLIPConfig([void updates(CLIPConfigBuilder b)]) = _$CLIPConfig; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CLIPConfigBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CLIPConfigSerializer(); +} + +class _$CLIPConfigSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CLIPConfig, _$CLIPConfig]; + + @override + final String wireName = r'CLIPConfig'; + + Iterable _serializeProperties( + Serializers serializers, + CLIPConfig object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + if (object.mode != null) { + yield r'mode'; + yield serializers.serialize( + object.mode, + specifiedType: const FullType(CLIPMode), + ); + } + yield r'modelName'; + yield serializers.serialize( + object.modelName, + specifiedType: const FullType(String), + ); + if (object.modelType != null) { + yield r'modelType'; + yield serializers.serialize( + object.modelType, + specifiedType: const FullType(ModelType), + ); + } + } + + @override + Object serialize( + Serializers serializers, + CLIPConfig object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CLIPConfigBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'mode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(CLIPMode), + ) as CLIPMode; + result.mode = valueDes; + break; + case r'modelName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.modelName = valueDes; + break; + case r'modelType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ModelType), + ) as ModelType; + result.modelType = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CLIPConfig deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CLIPConfigBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/clip_mode.dart b/mobile-v2/openapi/lib/src/model/clip_mode.dart new file mode 100644 index 0000000000..6ef6244a8f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/clip_mode.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'clip_mode.g.dart'; + +class CLIPMode extends EnumClass { + + @BuiltValueEnumConst(wireName: r'vision') + static const CLIPMode vision = _$vision; + @BuiltValueEnumConst(wireName: r'text') + static const CLIPMode text = _$text; + + static Serializer get serializer => _$cLIPModeSerializer; + + const CLIPMode._(String name): super(name); + + static BuiltSet get values => _$values; + static CLIPMode valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class CLIPModeMixin = Object with _$CLIPModeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/colorspace.dart b/mobile-v2/openapi/lib/src/model/colorspace.dart new file mode 100644 index 0000000000..2ae2c38fcc --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/colorspace.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'colorspace.g.dart'; + +class Colorspace extends EnumClass { + + @BuiltValueEnumConst(wireName: r'srgb') + static const Colorspace srgb = _$srgb; + @BuiltValueEnumConst(wireName: r'p3') + static const Colorspace p3 = _$p3; + + static Serializer get serializer => _$colorspaceSerializer; + + const Colorspace._(String name): super(name); + + static BuiltSet get values => _$values; + static Colorspace valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ColorspaceMixin = Object with _$ColorspaceMixin; + diff --git a/mobile-v2/openapi/lib/src/model/cq_mode.dart b/mobile-v2/openapi/lib/src/model/cq_mode.dart new file mode 100644 index 0000000000..f54d367b0c --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/cq_mode.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'cq_mode.g.dart'; + +class CQMode extends EnumClass { + + @BuiltValueEnumConst(wireName: r'auto') + static const CQMode auto = _$auto; + @BuiltValueEnumConst(wireName: r'cqp') + static const CQMode cqp = _$cqp; + @BuiltValueEnumConst(wireName: r'icq') + static const CQMode icq = _$icq; + + static Serializer get serializer => _$cQModeSerializer; + + const CQMode._(String name): super(name); + + static BuiltSet get values => _$values; + static CQMode valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class CQModeMixin = Object with _$CQModeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/create_album_dto.dart b/mobile-v2/openapi/lib/src/model/create_album_dto.dart new file mode 100644 index 0000000000..bd656fceba --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_album_dto.dart @@ -0,0 +1,161 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_album_dto.g.dart'; + +/// CreateAlbumDto +/// +/// Properties: +/// * [albumName] +/// * [assetIds] +/// * [description] +/// * [sharedWithUserIds] +@BuiltValue() +abstract class CreateAlbumDto implements Built { + @BuiltValueField(wireName: r'albumName') + String get albumName; + + @BuiltValueField(wireName: r'assetIds') + BuiltList? get assetIds; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'sharedWithUserIds') + BuiltList? get sharedWithUserIds; + + CreateAlbumDto._(); + + factory CreateAlbumDto([void updates(CreateAlbumDtoBuilder b)]) = _$CreateAlbumDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateAlbumDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateAlbumDtoSerializer(); +} + +class _$CreateAlbumDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateAlbumDto, _$CreateAlbumDto]; + + @override + final String wireName = r'CreateAlbumDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateAlbumDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'albumName'; + yield serializers.serialize( + object.albumName, + specifiedType: const FullType(String), + ); + if (object.assetIds != null) { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.sharedWithUserIds != null) { + yield r'sharedWithUserIds'; + yield serializers.serialize( + object.sharedWithUserIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + CreateAlbumDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateAlbumDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumName = valueDes; + break; + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'sharedWithUserIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.sharedWithUserIds.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateAlbumDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateAlbumDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_asset_dto.dart b/mobile-v2/openapi/lib/src/model/create_asset_dto.dart new file mode 100644 index 0000000000..a0eb02249b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_asset_dto.dart @@ -0,0 +1,333 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'dart:typed_data'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_asset_dto.g.dart'; + +/// CreateAssetDto +/// +/// Properties: +/// * [assetData] +/// * [deviceAssetId] +/// * [deviceId] +/// * [duration] +/// * [fileCreatedAt] +/// * [fileModifiedAt] +/// * [isArchived] +/// * [isFavorite] +/// * [isOffline] +/// * [isReadOnly] +/// * [isVisible] +/// * [libraryId] +/// * [livePhotoData] +/// * [sidecarData] +@BuiltValue() +abstract class CreateAssetDto implements Built { + @BuiltValueField(wireName: r'assetData') + Uint8List get assetData; + + @BuiltValueField(wireName: r'deviceAssetId') + String get deviceAssetId; + + @BuiltValueField(wireName: r'deviceId') + String get deviceId; + + @BuiltValueField(wireName: r'duration') + String? get duration; + + @BuiltValueField(wireName: r'fileCreatedAt') + DateTime get fileCreatedAt; + + @BuiltValueField(wireName: r'fileModifiedAt') + DateTime get fileModifiedAt; + + @BuiltValueField(wireName: r'isArchived') + bool? get isArchived; + + @BuiltValueField(wireName: r'isFavorite') + bool? get isFavorite; + + @BuiltValueField(wireName: r'isOffline') + bool? get isOffline; + + @BuiltValueField(wireName: r'isReadOnly') + bool? get isReadOnly; + + @BuiltValueField(wireName: r'isVisible') + bool? get isVisible; + + @BuiltValueField(wireName: r'libraryId') + String? get libraryId; + + @BuiltValueField(wireName: r'livePhotoData') + Uint8List? get livePhotoData; + + @BuiltValueField(wireName: r'sidecarData') + Uint8List? get sidecarData; + + CreateAssetDto._(); + + factory CreateAssetDto([void updates(CreateAssetDtoBuilder b)]) = _$CreateAssetDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateAssetDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateAssetDtoSerializer(); +} + +class _$CreateAssetDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateAssetDto, _$CreateAssetDto]; + + @override + final String wireName = r'CreateAssetDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateAssetDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetData'; + yield serializers.serialize( + object.assetData, + specifiedType: const FullType(Uint8List), + ); + yield r'deviceAssetId'; + yield serializers.serialize( + object.deviceAssetId, + specifiedType: const FullType(String), + ); + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + if (object.duration != null) { + yield r'duration'; + yield serializers.serialize( + object.duration, + specifiedType: const FullType(String), + ); + } + yield r'fileCreatedAt'; + yield serializers.serialize( + object.fileCreatedAt, + specifiedType: const FullType(DateTime), + ); + yield r'fileModifiedAt'; + yield serializers.serialize( + object.fileModifiedAt, + specifiedType: const FullType(DateTime), + ); + if (object.isArchived != null) { + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + } + if (object.isFavorite != null) { + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + } + if (object.isOffline != null) { + yield r'isOffline'; + yield serializers.serialize( + object.isOffline, + specifiedType: const FullType(bool), + ); + } + if (object.isReadOnly != null) { + yield r'isReadOnly'; + yield serializers.serialize( + object.isReadOnly, + specifiedType: const FullType(bool), + ); + } + if (object.isVisible != null) { + yield r'isVisible'; + yield serializers.serialize( + object.isVisible, + specifiedType: const FullType(bool), + ); + } + if (object.libraryId != null) { + yield r'libraryId'; + yield serializers.serialize( + object.libraryId, + specifiedType: const FullType(String), + ); + } + if (object.livePhotoData != null) { + yield r'livePhotoData'; + yield serializers.serialize( + object.livePhotoData, + specifiedType: const FullType(Uint8List), + ); + } + if (object.sidecarData != null) { + yield r'sidecarData'; + yield serializers.serialize( + object.sidecarData, + specifiedType: const FullType(Uint8List), + ); + } + } + + @override + Object serialize( + Serializers serializers, + CreateAssetDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateAssetDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetData': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(Uint8List), + ) as Uint8List; + result.assetData = valueDes; + break; + case r'deviceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceAssetId = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'duration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.duration = valueDes; + break; + case r'fileCreatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.fileCreatedAt = valueDes; + break; + case r'fileModifiedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.fileModifiedAt = valueDes; + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'isOffline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOffline = valueDes; + break; + case r'isReadOnly': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isReadOnly = valueDes; + break; + case r'isVisible': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isVisible = valueDes; + break; + case r'libraryId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.libraryId = valueDes; + break; + case r'livePhotoData': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(Uint8List), + ) as Uint8List; + result.livePhotoData = valueDes; + break; + case r'sidecarData': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(Uint8List), + ) as Uint8List; + result.sidecarData = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateAssetDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateAssetDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_library_dto.dart b/mobile-v2/openapi/lib/src/model/create_library_dto.dart new file mode 100644 index 0000000000..ce5aa0660a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_library_dto.dart @@ -0,0 +1,197 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/library_type.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_library_dto.g.dart'; + +/// CreateLibraryDto +/// +/// Properties: +/// * [exclusionPatterns] +/// * [importPaths] +/// * [isVisible] +/// * [name] +/// * [ownerId] +/// * [type] +@BuiltValue() +abstract class CreateLibraryDto implements Built { + @BuiltValueField(wireName: r'exclusionPatterns') + BuiltList? get exclusionPatterns; + + @BuiltValueField(wireName: r'importPaths') + BuiltList? get importPaths; + + @BuiltValueField(wireName: r'isVisible') + bool? get isVisible; + + @BuiltValueField(wireName: r'name') + String? get name; + + @BuiltValueField(wireName: r'ownerId') + String get ownerId; + + @BuiltValueField(wireName: r'type') + LibraryType get type; + // enum typeEnum { UPLOAD, EXTERNAL, }; + + CreateLibraryDto._(); + + factory CreateLibraryDto([void updates(CreateLibraryDtoBuilder b)]) = _$CreateLibraryDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateLibraryDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateLibraryDtoSerializer(); +} + +class _$CreateLibraryDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateLibraryDto, _$CreateLibraryDto]; + + @override + final String wireName = r'CreateLibraryDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.exclusionPatterns != null) { + yield r'exclusionPatterns'; + yield serializers.serialize( + object.exclusionPatterns, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.importPaths != null) { + yield r'importPaths'; + yield serializers.serialize( + object.importPaths, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.isVisible != null) { + yield r'isVisible'; + yield serializers.serialize( + object.isVisible, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + yield r'ownerId'; + yield serializers.serialize( + object.ownerId, + specifiedType: const FullType(String), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(LibraryType), + ); + } + + @override + Object serialize( + Serializers serializers, + CreateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateLibraryDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'exclusionPatterns': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.exclusionPatterns.replace(valueDes); + break; + case r'importPaths': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.importPaths.replace(valueDes); + break; + case r'isVisible': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isVisible = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'ownerId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.ownerId = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(LibraryType), + ) as LibraryType; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateLibraryDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateLibraryDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_profile_image_dto.dart b/mobile-v2/openapi/lib/src/model/create_profile_image_dto.dart new file mode 100644 index 0000000000..c4a4e88f87 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_profile_image_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'dart:typed_data'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_profile_image_dto.g.dart'; + +/// CreateProfileImageDto +/// +/// Properties: +/// * [file] +@BuiltValue() +abstract class CreateProfileImageDto implements Built { + @BuiltValueField(wireName: r'file') + Uint8List get file; + + CreateProfileImageDto._(); + + factory CreateProfileImageDto([void updates(CreateProfileImageDtoBuilder b)]) = _$CreateProfileImageDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateProfileImageDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateProfileImageDtoSerializer(); +} + +class _$CreateProfileImageDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateProfileImageDto, _$CreateProfileImageDto]; + + @override + final String wireName = r'CreateProfileImageDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateProfileImageDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'file'; + yield serializers.serialize( + object.file, + specifiedType: const FullType(Uint8List), + ); + } + + @override + Object serialize( + Serializers serializers, + CreateProfileImageDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateProfileImageDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'file': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(Uint8List), + ) as Uint8List; + result.file = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateProfileImageDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateProfileImageDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_profile_image_response_dto.dart b/mobile-v2/openapi/lib/src/model/create_profile_image_response_dto.dart new file mode 100644 index 0000000000..e41f5ac9ab --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_profile_image_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_profile_image_response_dto.g.dart'; + +/// CreateProfileImageResponseDto +/// +/// Properties: +/// * [profileImagePath] +/// * [userId] +@BuiltValue() +abstract class CreateProfileImageResponseDto implements Built { + @BuiltValueField(wireName: r'profileImagePath') + String get profileImagePath; + + @BuiltValueField(wireName: r'userId') + String get userId; + + CreateProfileImageResponseDto._(); + + factory CreateProfileImageResponseDto([void updates(CreateProfileImageResponseDtoBuilder b)]) = _$CreateProfileImageResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateProfileImageResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateProfileImageResponseDtoSerializer(); +} + +class _$CreateProfileImageResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateProfileImageResponseDto, _$CreateProfileImageResponseDto]; + + @override + final String wireName = r'CreateProfileImageResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateProfileImageResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'profileImagePath'; + yield serializers.serialize( + object.profileImagePath, + specifiedType: const FullType(String), + ); + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + CreateProfileImageResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateProfileImageResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'profileImagePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profileImagePath = valueDes; + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateProfileImageResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateProfileImageResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_tag_dto.dart b/mobile-v2/openapi/lib/src/model/create_tag_dto.dart new file mode 100644 index 0000000000..2b41bacd4b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_tag_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/tag_type_enum.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_tag_dto.g.dart'; + +/// CreateTagDto +/// +/// Properties: +/// * [name] +/// * [type] +@BuiltValue() +abstract class CreateTagDto implements Built { + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'type') + TagTypeEnum get type; + // enum typeEnum { OBJECT, FACE, CUSTOM, }; + + CreateTagDto._(); + + factory CreateTagDto([void updates(CreateTagDtoBuilder b)]) = _$CreateTagDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateTagDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateTagDtoSerializer(); +} + +class _$CreateTagDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateTagDto, _$CreateTagDto]; + + @override + final String wireName = r'CreateTagDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateTagDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(TagTypeEnum), + ); + } + + @override + Object serialize( + Serializers serializers, + CreateTagDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateTagDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(TagTypeEnum), + ) as TagTypeEnum; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateTagDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateTagDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/create_user_dto.dart b/mobile-v2/openapi/lib/src/model/create_user_dto.dart new file mode 100644 index 0000000000..308e28d433 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/create_user_dto.dart @@ -0,0 +1,212 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'create_user_dto.g.dart'; + +/// CreateUserDto +/// +/// Properties: +/// * [email] +/// * [memoriesEnabled] +/// * [name] +/// * [password] +/// * [quotaSizeInBytes] +/// * [shouldChangePassword] +/// * [storageLabel] +@BuiltValue() +abstract class CreateUserDto implements Built { + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'memoriesEnabled') + bool? get memoriesEnabled; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'password') + String get password; + + @BuiltValueField(wireName: r'quotaSizeInBytes') + int? get quotaSizeInBytes; + + @BuiltValueField(wireName: r'shouldChangePassword') + bool? get shouldChangePassword; + + @BuiltValueField(wireName: r'storageLabel') + String? get storageLabel; + + CreateUserDto._(); + + factory CreateUserDto([void updates(CreateUserDtoBuilder b)]) = _$CreateUserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CreateUserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CreateUserDtoSerializer(); +} + +class _$CreateUserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CreateUserDto, _$CreateUserDto]; + + @override + final String wireName = r'CreateUserDto'; + + Iterable _serializeProperties( + Serializers serializers, + CreateUserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + if (object.memoriesEnabled != null) { + yield r'memoriesEnabled'; + yield serializers.serialize( + object.memoriesEnabled, + specifiedType: const FullType(bool), + ); + } + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + if (object.quotaSizeInBytes != null) { + yield r'quotaSizeInBytes'; + yield serializers.serialize( + object.quotaSizeInBytes, + specifiedType: const FullType.nullable(int), + ); + } + if (object.shouldChangePassword != null) { + yield r'shouldChangePassword'; + yield serializers.serialize( + object.shouldChangePassword, + specifiedType: const FullType(bool), + ); + } + if (object.storageLabel != null) { + yield r'storageLabel'; + yield serializers.serialize( + object.storageLabel, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + CreateUserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CreateUserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'memoriesEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.memoriesEnabled = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + case r'quotaSizeInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaSizeInBytes = valueDes; + break; + case r'shouldChangePassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shouldChangePassword = valueDes; + break; + case r'storageLabel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.storageLabel = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CreateUserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CreateUserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/curated_locations_response_dto.dart b/mobile-v2/openapi/lib/src/model/curated_locations_response_dto.dart new file mode 100644 index 0000000000..cd9774d050 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/curated_locations_response_dto.dart @@ -0,0 +1,170 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'curated_locations_response_dto.g.dart'; + +/// CuratedLocationsResponseDto +/// +/// Properties: +/// * [city] +/// * [deviceAssetId] +/// * [deviceId] +/// * [id] +/// * [resizePath] +@BuiltValue() +abstract class CuratedLocationsResponseDto implements Built { + @BuiltValueField(wireName: r'city') + String get city; + + @BuiltValueField(wireName: r'deviceAssetId') + String get deviceAssetId; + + @BuiltValueField(wireName: r'deviceId') + String get deviceId; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'resizePath') + String get resizePath; + + CuratedLocationsResponseDto._(); + + factory CuratedLocationsResponseDto([void updates(CuratedLocationsResponseDtoBuilder b)]) = _$CuratedLocationsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CuratedLocationsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CuratedLocationsResponseDtoSerializer(); +} + +class _$CuratedLocationsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CuratedLocationsResponseDto, _$CuratedLocationsResponseDto]; + + @override + final String wireName = r'CuratedLocationsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + CuratedLocationsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'city'; + yield serializers.serialize( + object.city, + specifiedType: const FullType(String), + ); + yield r'deviceAssetId'; + yield serializers.serialize( + object.deviceAssetId, + specifiedType: const FullType(String), + ); + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'resizePath'; + yield serializers.serialize( + object.resizePath, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + CuratedLocationsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CuratedLocationsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.city = valueDes; + break; + case r'deviceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceAssetId = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'resizePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.resizePath = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CuratedLocationsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CuratedLocationsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/curated_objects_response_dto.dart b/mobile-v2/openapi/lib/src/model/curated_objects_response_dto.dart new file mode 100644 index 0000000000..7d1385f001 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/curated_objects_response_dto.dart @@ -0,0 +1,170 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'curated_objects_response_dto.g.dart'; + +/// CuratedObjectsResponseDto +/// +/// Properties: +/// * [deviceAssetId] +/// * [deviceId] +/// * [id] +/// * [object] +/// * [resizePath] +@BuiltValue() +abstract class CuratedObjectsResponseDto implements Built { + @BuiltValueField(wireName: r'deviceAssetId') + String get deviceAssetId; + + @BuiltValueField(wireName: r'deviceId') + String get deviceId; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'object') + String get object; + + @BuiltValueField(wireName: r'resizePath') + String get resizePath; + + CuratedObjectsResponseDto._(); + + factory CuratedObjectsResponseDto([void updates(CuratedObjectsResponseDtoBuilder b)]) = _$CuratedObjectsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(CuratedObjectsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$CuratedObjectsResponseDtoSerializer(); +} + +class _$CuratedObjectsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [CuratedObjectsResponseDto, _$CuratedObjectsResponseDto]; + + @override + final String wireName = r'CuratedObjectsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + CuratedObjectsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'deviceAssetId'; + yield serializers.serialize( + object.deviceAssetId, + specifiedType: const FullType(String), + ); + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'object'; + yield serializers.serialize( + object.object, + specifiedType: const FullType(String), + ); + yield r'resizePath'; + yield serializers.serialize( + object.resizePath, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + CuratedObjectsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required CuratedObjectsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'deviceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceAssetId = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'object': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.object = valueDes; + break; + case r'resizePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.resizePath = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + CuratedObjectsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = CuratedObjectsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/date.dart b/mobile-v2/openapi/lib/src/model/date.dart new file mode 100644 index 0000000000..b21c7f544b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/date.dart @@ -0,0 +1,70 @@ +/// A gregorian calendar date generated by +/// OpenAPI generator to differentiate +/// between [DateTime] and [Date] formats. +class Date implements Comparable { + final int year; + + /// January is 1. + final int month; + + /// First day is 1. + final int day; + + Date(this.year, this.month, this.day); + + /// The current date + static Date now({bool utc = false}) { + var now = DateTime.now(); + if (utc) { + now = now.toUtc(); + } + return now.toDate(); + } + + /// Convert to a [DateTime]. + DateTime toDateTime({bool utc = false}) { + if (utc) { + return DateTime.utc(year, month, day); + } else { + return DateTime(year, month, day); + } + } + + @override + int compareTo(Date other) { + int d = year.compareTo(other.year); + if (d != 0) { + return d; + } + d = month.compareTo(other.month); + if (d != 0) { + return d; + } + return day.compareTo(other.day); + } + + @override + bool operator ==(Object other) => + identical(this, other) || + other is Date && + runtimeType == other.runtimeType && + year == other.year && + month == other.month && + day == other.day; + + @override + int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode; + + @override + String toString() { + final yyyy = year.toString(); + final mm = month.toString().padLeft(2, '0'); + final dd = day.toString().padLeft(2, '0'); + + return '$yyyy-$mm-$dd'; + } +} + +extension DateTimeToDate on DateTime { + Date toDate() => Date(year, month, day); +} diff --git a/mobile-v2/openapi/lib/src/model/delete_user_dto.dart b/mobile-v2/openapi/lib/src/model/delete_user_dto.dart new file mode 100644 index 0000000000..248395d4c6 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/delete_user_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'delete_user_dto.g.dart'; + +/// DeleteUserDto +/// +/// Properties: +/// * [force] +@BuiltValue() +abstract class DeleteUserDto implements Built { + @BuiltValueField(wireName: r'force') + bool? get force; + + DeleteUserDto._(); + + factory DeleteUserDto([void updates(DeleteUserDtoBuilder b)]) = _$DeleteUserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DeleteUserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DeleteUserDtoSerializer(); +} + +class _$DeleteUserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [DeleteUserDto, _$DeleteUserDto]; + + @override + final String wireName = r'DeleteUserDto'; + + Iterable _serializeProperties( + Serializers serializers, + DeleteUserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.force != null) { + yield r'force'; + yield serializers.serialize( + object.force, + specifiedType: const FullType(bool), + ); + } + } + + @override + Object serialize( + Serializers serializers, + DeleteUserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required DeleteUserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'force': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.force = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + DeleteUserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = DeleteUserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/download_archive_info.dart b/mobile-v2/openapi/lib/src/model/download_archive_info.dart new file mode 100644 index 0000000000..b6b7d3abd7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/download_archive_info.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'download_archive_info.g.dart'; + +/// DownloadArchiveInfo +/// +/// Properties: +/// * [assetIds] +/// * [size] +@BuiltValue() +abstract class DownloadArchiveInfo implements Built { + @BuiltValueField(wireName: r'assetIds') + BuiltList get assetIds; + + @BuiltValueField(wireName: r'size') + int get size; + + DownloadArchiveInfo._(); + + factory DownloadArchiveInfo([void updates(DownloadArchiveInfoBuilder b)]) = _$DownloadArchiveInfo; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DownloadArchiveInfoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DownloadArchiveInfoSerializer(); +} + +class _$DownloadArchiveInfoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [DownloadArchiveInfo, _$DownloadArchiveInfo]; + + @override + final String wireName = r'DownloadArchiveInfo'; + + Iterable _serializeProperties( + Serializers serializers, + DownloadArchiveInfo object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'size'; + yield serializers.serialize( + object.size, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + DownloadArchiveInfo object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required DownloadArchiveInfoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.size = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + DownloadArchiveInfo deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = DownloadArchiveInfoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/download_info_dto.dart b/mobile-v2/openapi/lib/src/model/download_info_dto.dart new file mode 100644 index 0000000000..708c502268 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/download_info_dto.dart @@ -0,0 +1,163 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'download_info_dto.g.dart'; + +/// DownloadInfoDto +/// +/// Properties: +/// * [albumId] +/// * [archiveSize] +/// * [assetIds] +/// * [userId] +@BuiltValue() +abstract class DownloadInfoDto implements Built { + @BuiltValueField(wireName: r'albumId') + String? get albumId; + + @BuiltValueField(wireName: r'archiveSize') + int? get archiveSize; + + @BuiltValueField(wireName: r'assetIds') + BuiltList? get assetIds; + + @BuiltValueField(wireName: r'userId') + String? get userId; + + DownloadInfoDto._(); + + factory DownloadInfoDto([void updates(DownloadInfoDtoBuilder b)]) = _$DownloadInfoDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DownloadInfoDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DownloadInfoDtoSerializer(); +} + +class _$DownloadInfoDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [DownloadInfoDto, _$DownloadInfoDto]; + + @override + final String wireName = r'DownloadInfoDto'; + + Iterable _serializeProperties( + Serializers serializers, + DownloadInfoDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.albumId != null) { + yield r'albumId'; + yield serializers.serialize( + object.albumId, + specifiedType: const FullType(String), + ); + } + if (object.archiveSize != null) { + yield r'archiveSize'; + yield serializers.serialize( + object.archiveSize, + specifiedType: const FullType(int), + ); + } + if (object.assetIds != null) { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.userId != null) { + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + DownloadInfoDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required DownloadInfoDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumId = valueDes; + break; + case r'archiveSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.archiveSize = valueDes; + break; + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + DownloadInfoDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = DownloadInfoDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/download_response_dto.dart b/mobile-v2/openapi/lib/src/model/download_response_dto.dart new file mode 100644 index 0000000000..f44b484f23 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/download_response_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/download_archive_info.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'download_response_dto.g.dart'; + +/// DownloadResponseDto +/// +/// Properties: +/// * [archives] +/// * [totalSize] +@BuiltValue() +abstract class DownloadResponseDto implements Built { + @BuiltValueField(wireName: r'archives') + BuiltList get archives; + + @BuiltValueField(wireName: r'totalSize') + int get totalSize; + + DownloadResponseDto._(); + + factory DownloadResponseDto([void updates(DownloadResponseDtoBuilder b)]) = _$DownloadResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(DownloadResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$DownloadResponseDtoSerializer(); +} + +class _$DownloadResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [DownloadResponseDto, _$DownloadResponseDto]; + + @override + final String wireName = r'DownloadResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + DownloadResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'archives'; + yield serializers.serialize( + object.archives, + specifiedType: const FullType(BuiltList, [FullType(DownloadArchiveInfo)]), + ); + yield r'totalSize'; + yield serializers.serialize( + object.totalSize, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + DownloadResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required DownloadResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'archives': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(DownloadArchiveInfo)]), + ) as BuiltList; + result.archives.replace(valueDes); + break; + case r'totalSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.totalSize = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + DownloadResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = DownloadResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/entity_type.dart b/mobile-v2/openapi/lib/src/model/entity_type.dart new file mode 100644 index 0000000000..17a531ac25 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/entity_type.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'entity_type.g.dart'; + +class EntityType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'ASSET') + static const EntityType ASSET = _$ASSET; + @BuiltValueEnumConst(wireName: r'ALBUM') + static const EntityType ALBUM = _$ALBUM; + + static Serializer get serializer => _$entityTypeSerializer; + + const EntityType._(String name): super(name); + + static BuiltSet get values => _$values; + static EntityType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class EntityTypeMixin = Object with _$EntityTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/exif_response_dto.dart b/mobile-v2/openapi/lib/src/model/exif_response_dto.dart new file mode 100644 index 0000000000..b2ac5d8357 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/exif_response_dto.dart @@ -0,0 +1,489 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'exif_response_dto.g.dart'; + +/// ExifResponseDto +/// +/// Properties: +/// * [city] +/// * [country] +/// * [dateTimeOriginal] +/// * [description] +/// * [exifImageHeight] +/// * [exifImageWidth] +/// * [exposureTime] +/// * [fNumber] +/// * [fileSizeInByte] +/// * [focalLength] +/// * [iso] +/// * [latitude] +/// * [lensModel] +/// * [longitude] +/// * [make] +/// * [model] +/// * [modifyDate] +/// * [orientation] +/// * [projectionType] +/// * [state] +/// * [timeZone] +@BuiltValue() +abstract class ExifResponseDto implements Built { + @BuiltValueField(wireName: r'city') + String? get city; + + @BuiltValueField(wireName: r'country') + String? get country; + + @BuiltValueField(wireName: r'dateTimeOriginal') + DateTime? get dateTimeOriginal; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'exifImageHeight') + num? get exifImageHeight; + + @BuiltValueField(wireName: r'exifImageWidth') + num? get exifImageWidth; + + @BuiltValueField(wireName: r'exposureTime') + String? get exposureTime; + + @BuiltValueField(wireName: r'fNumber') + num? get fNumber; + + @BuiltValueField(wireName: r'fileSizeInByte') + int? get fileSizeInByte; + + @BuiltValueField(wireName: r'focalLength') + num? get focalLength; + + @BuiltValueField(wireName: r'iso') + num? get iso; + + @BuiltValueField(wireName: r'latitude') + num? get latitude; + + @BuiltValueField(wireName: r'lensModel') + String? get lensModel; + + @BuiltValueField(wireName: r'longitude') + num? get longitude; + + @BuiltValueField(wireName: r'make') + String? get make; + + @BuiltValueField(wireName: r'model') + String? get model; + + @BuiltValueField(wireName: r'modifyDate') + DateTime? get modifyDate; + + @BuiltValueField(wireName: r'orientation') + String? get orientation; + + @BuiltValueField(wireName: r'projectionType') + String? get projectionType; + + @BuiltValueField(wireName: r'state') + String? get state; + + @BuiltValueField(wireName: r'timeZone') + String? get timeZone; + + ExifResponseDto._(); + + factory ExifResponseDto([void updates(ExifResponseDtoBuilder b)]) = _$ExifResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ExifResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ExifResponseDtoSerializer(); +} + +class _$ExifResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ExifResponseDto, _$ExifResponseDto]; + + @override + final String wireName = r'ExifResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ExifResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.city != null) { + yield r'city'; + yield serializers.serialize( + object.city, + specifiedType: const FullType.nullable(String), + ); + } + if (object.country != null) { + yield r'country'; + yield serializers.serialize( + object.country, + specifiedType: const FullType.nullable(String), + ); + } + if (object.dateTimeOriginal != null) { + yield r'dateTimeOriginal'; + yield serializers.serialize( + object.dateTimeOriginal, + specifiedType: const FullType.nullable(DateTime), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType.nullable(String), + ); + } + if (object.exifImageHeight != null) { + yield r'exifImageHeight'; + yield serializers.serialize( + object.exifImageHeight, + specifiedType: const FullType.nullable(num), + ); + } + if (object.exifImageWidth != null) { + yield r'exifImageWidth'; + yield serializers.serialize( + object.exifImageWidth, + specifiedType: const FullType.nullable(num), + ); + } + if (object.exposureTime != null) { + yield r'exposureTime'; + yield serializers.serialize( + object.exposureTime, + specifiedType: const FullType.nullable(String), + ); + } + if (object.fNumber != null) { + yield r'fNumber'; + yield serializers.serialize( + object.fNumber, + specifiedType: const FullType.nullable(num), + ); + } + if (object.fileSizeInByte != null) { + yield r'fileSizeInByte'; + yield serializers.serialize( + object.fileSizeInByte, + specifiedType: const FullType.nullable(int), + ); + } + if (object.focalLength != null) { + yield r'focalLength'; + yield serializers.serialize( + object.focalLength, + specifiedType: const FullType.nullable(num), + ); + } + if (object.iso != null) { + yield r'iso'; + yield serializers.serialize( + object.iso, + specifiedType: const FullType.nullable(num), + ); + } + if (object.latitude != null) { + yield r'latitude'; + yield serializers.serialize( + object.latitude, + specifiedType: const FullType.nullable(num), + ); + } + if (object.lensModel != null) { + yield r'lensModel'; + yield serializers.serialize( + object.lensModel, + specifiedType: const FullType.nullable(String), + ); + } + if (object.longitude != null) { + yield r'longitude'; + yield serializers.serialize( + object.longitude, + specifiedType: const FullType.nullable(num), + ); + } + if (object.make != null) { + yield r'make'; + yield serializers.serialize( + object.make, + specifiedType: const FullType.nullable(String), + ); + } + if (object.model != null) { + yield r'model'; + yield serializers.serialize( + object.model, + specifiedType: const FullType.nullable(String), + ); + } + if (object.modifyDate != null) { + yield r'modifyDate'; + yield serializers.serialize( + object.modifyDate, + specifiedType: const FullType.nullable(DateTime), + ); + } + if (object.orientation != null) { + yield r'orientation'; + yield serializers.serialize( + object.orientation, + specifiedType: const FullType.nullable(String), + ); + } + if (object.projectionType != null) { + yield r'projectionType'; + yield serializers.serialize( + object.projectionType, + specifiedType: const FullType.nullable(String), + ); + } + if (object.state != null) { + yield r'state'; + yield serializers.serialize( + object.state, + specifiedType: const FullType.nullable(String), + ); + } + if (object.timeZone != null) { + yield r'timeZone'; + yield serializers.serialize( + object.timeZone, + specifiedType: const FullType.nullable(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ExifResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ExifResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.city = valueDes; + break; + case r'country': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.country = valueDes; + break; + case r'dateTimeOriginal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.dateTimeOriginal = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.description = valueDes; + break; + case r'exifImageHeight': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.exifImageHeight = valueDes; + break; + case r'exifImageWidth': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.exifImageWidth = valueDes; + break; + case r'exposureTime': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.exposureTime = valueDes; + break; + case r'fNumber': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.fNumber = valueDes; + break; + case r'fileSizeInByte': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.fileSizeInByte = valueDes; + break; + case r'focalLength': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.focalLength = valueDes; + break; + case r'iso': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.iso = valueDes; + break; + case r'latitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.latitude = valueDes; + break; + case r'lensModel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.lensModel = valueDes; + break; + case r'longitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(num), + ) as num?; + if (valueDes == null) continue; + result.longitude = valueDes; + break; + case r'make': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.make = valueDes; + break; + case r'model': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.model = valueDes; + break; + case r'modifyDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.modifyDate = valueDes; + break; + case r'orientation': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.orientation = valueDes; + break; + case r'projectionType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.projectionType = valueDes; + break; + case r'state': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.state = valueDes; + break; + case r'timeZone': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.timeZone = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ExifResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ExifResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/face_dto.dart b/mobile-v2/openapi/lib/src/model/face_dto.dart new file mode 100644 index 0000000000..bdf4d344d5 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/face_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'face_dto.g.dart'; + +/// FaceDto +/// +/// Properties: +/// * [id] +@BuiltValue() +abstract class FaceDto implements Built { + @BuiltValueField(wireName: r'id') + String get id; + + FaceDto._(); + + factory FaceDto([void updates(FaceDtoBuilder b)]) = _$FaceDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FaceDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FaceDtoSerializer(); +} + +class _$FaceDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FaceDto, _$FaceDto]; + + @override + final String wireName = r'FaceDto'; + + Iterable _serializeProperties( + Serializers serializers, + FaceDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + FaceDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FaceDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FaceDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FaceDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/file_checksum_dto.dart b/mobile-v2/openapi/lib/src/model/file_checksum_dto.dart new file mode 100644 index 0000000000..2b2726ec14 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/file_checksum_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_checksum_dto.g.dart'; + +/// FileChecksumDto +/// +/// Properties: +/// * [filenames] +@BuiltValue() +abstract class FileChecksumDto implements Built { + @BuiltValueField(wireName: r'filenames') + BuiltList get filenames; + + FileChecksumDto._(); + + factory FileChecksumDto([void updates(FileChecksumDtoBuilder b)]) = _$FileChecksumDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileChecksumDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileChecksumDtoSerializer(); +} + +class _$FileChecksumDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FileChecksumDto, _$FileChecksumDto]; + + @override + final String wireName = r'FileChecksumDto'; + + Iterable _serializeProperties( + Serializers serializers, + FileChecksumDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'filenames'; + yield serializers.serialize( + object.filenames, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + FileChecksumDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FileChecksumDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'filenames': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.filenames.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FileChecksumDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FileChecksumDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/file_checksum_response_dto.dart b/mobile-v2/openapi/lib/src/model/file_checksum_response_dto.dart new file mode 100644 index 0000000000..bd2910c531 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/file_checksum_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_checksum_response_dto.g.dart'; + +/// FileChecksumResponseDto +/// +/// Properties: +/// * [checksum] +/// * [filename] +@BuiltValue() +abstract class FileChecksumResponseDto implements Built { + @BuiltValueField(wireName: r'checksum') + String get checksum; + + @BuiltValueField(wireName: r'filename') + String get filename; + + FileChecksumResponseDto._(); + + factory FileChecksumResponseDto([void updates(FileChecksumResponseDtoBuilder b)]) = _$FileChecksumResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileChecksumResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileChecksumResponseDtoSerializer(); +} + +class _$FileChecksumResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FileChecksumResponseDto, _$FileChecksumResponseDto]; + + @override + final String wireName = r'FileChecksumResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + FileChecksumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'checksum'; + yield serializers.serialize( + object.checksum, + specifiedType: const FullType(String), + ); + yield r'filename'; + yield serializers.serialize( + object.filename, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + FileChecksumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FileChecksumResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'checksum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.checksum = valueDes; + break; + case r'filename': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.filename = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FileChecksumResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FileChecksumResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/file_report_dto.dart b/mobile-v2/openapi/lib/src/model/file_report_dto.dart new file mode 100644 index 0000000000..59b1c84594 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/file_report_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/file_report_item_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_report_dto.g.dart'; + +/// FileReportDto +/// +/// Properties: +/// * [extras] +/// * [orphans] +@BuiltValue() +abstract class FileReportDto implements Built { + @BuiltValueField(wireName: r'extras') + BuiltList get extras; + + @BuiltValueField(wireName: r'orphans') + BuiltList get orphans; + + FileReportDto._(); + + factory FileReportDto([void updates(FileReportDtoBuilder b)]) = _$FileReportDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileReportDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileReportDtoSerializer(); +} + +class _$FileReportDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FileReportDto, _$FileReportDto]; + + @override + final String wireName = r'FileReportDto'; + + Iterable _serializeProperties( + Serializers serializers, + FileReportDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'extras'; + yield serializers.serialize( + object.extras, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'orphans'; + yield serializers.serialize( + object.orphans, + specifiedType: const FullType(BuiltList, [FullType(FileReportItemDto)]), + ); + } + + @override + Object serialize( + Serializers serializers, + FileReportDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FileReportDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'extras': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.extras.replace(valueDes); + break; + case r'orphans': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(FileReportItemDto)]), + ) as BuiltList; + result.orphans.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FileReportDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FileReportDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/file_report_fix_dto.dart b/mobile-v2/openapi/lib/src/model/file_report_fix_dto.dart new file mode 100644 index 0000000000..cf026846bb --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/file_report_fix_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/file_report_item_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_report_fix_dto.g.dart'; + +/// FileReportFixDto +/// +/// Properties: +/// * [items] +@BuiltValue() +abstract class FileReportFixDto implements Built { + @BuiltValueField(wireName: r'items') + BuiltList get items; + + FileReportFixDto._(); + + factory FileReportFixDto([void updates(FileReportFixDtoBuilder b)]) = _$FileReportFixDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileReportFixDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileReportFixDtoSerializer(); +} + +class _$FileReportFixDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FileReportFixDto, _$FileReportFixDto]; + + @override + final String wireName = r'FileReportFixDto'; + + Iterable _serializeProperties( + Serializers serializers, + FileReportFixDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'items'; + yield serializers.serialize( + object.items, + specifiedType: const FullType(BuiltList, [FullType(FileReportItemDto)]), + ); + } + + @override + Object serialize( + Serializers serializers, + FileReportFixDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FileReportFixDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'items': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(FileReportItemDto)]), + ) as BuiltList; + result.items.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FileReportFixDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FileReportFixDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/file_report_item_dto.dart b/mobile-v2/openapi/lib/src/model/file_report_item_dto.dart new file mode 100644 index 0000000000..d5b76aa76a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/file_report_item_dto.dart @@ -0,0 +1,176 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/path_entity_type.dart'; +import 'package:openapi/src/model/path_type.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'file_report_item_dto.g.dart'; + +/// FileReportItemDto +/// +/// Properties: +/// * [checksum] +/// * [entityId] +/// * [entityType] +/// * [pathType] +/// * [pathValue] +@BuiltValue() +abstract class FileReportItemDto implements Built { + @BuiltValueField(wireName: r'checksum') + String? get checksum; + + @BuiltValueField(wireName: r'entityId') + String get entityId; + + @BuiltValueField(wireName: r'entityType') + PathEntityType get entityType; + // enum entityTypeEnum { asset, person, user, }; + + @BuiltValueField(wireName: r'pathType') + PathType get pathType; + // enum pathTypeEnum { original, preview, thumbnail, encoded_video, sidecar, face, profile, }; + + @BuiltValueField(wireName: r'pathValue') + String get pathValue; + + FileReportItemDto._(); + + factory FileReportItemDto([void updates(FileReportItemDtoBuilder b)]) = _$FileReportItemDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(FileReportItemDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$FileReportItemDtoSerializer(); +} + +class _$FileReportItemDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [FileReportItemDto, _$FileReportItemDto]; + + @override + final String wireName = r'FileReportItemDto'; + + Iterable _serializeProperties( + Serializers serializers, + FileReportItemDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.checksum != null) { + yield r'checksum'; + yield serializers.serialize( + object.checksum, + specifiedType: const FullType(String), + ); + } + yield r'entityId'; + yield serializers.serialize( + object.entityId, + specifiedType: const FullType(String), + ); + yield r'entityType'; + yield serializers.serialize( + object.entityType, + specifiedType: const FullType(PathEntityType), + ); + yield r'pathType'; + yield serializers.serialize( + object.pathType, + specifiedType: const FullType(PathType), + ); + yield r'pathValue'; + yield serializers.serialize( + object.pathValue, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + FileReportItemDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required FileReportItemDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'checksum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.checksum = valueDes; + break; + case r'entityId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.entityId = valueDes; + break; + case r'entityType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(PathEntityType), + ) as PathEntityType; + result.entityType = valueDes; + break; + case r'pathType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(PathType), + ) as PathType; + result.pathType = valueDes; + break; + case r'pathValue': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.pathValue = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + FileReportItemDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = FileReportItemDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/image_format.dart b/mobile-v2/openapi/lib/src/model/image_format.dart new file mode 100644 index 0000000000..4be979f8f6 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/image_format.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'image_format.g.dart'; + +class ImageFormat extends EnumClass { + + @BuiltValueEnumConst(wireName: r'jpeg') + static const ImageFormat jpeg = _$jpeg; + @BuiltValueEnumConst(wireName: r'webp') + static const ImageFormat webp = _$webp; + + static Serializer get serializer => _$imageFormatSerializer; + + const ImageFormat._(String name): super(name); + + static BuiltSet get values => _$values; + static ImageFormat valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ImageFormatMixin = Object with _$ImageFormatMixin; + diff --git a/mobile-v2/openapi/lib/src/model/job_command.dart b/mobile-v2/openapi/lib/src/model/job_command.dart new file mode 100644 index 0000000000..7348d0e952 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_command.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_command.g.dart'; + +class JobCommand extends EnumClass { + + @BuiltValueEnumConst(wireName: r'start') + static const JobCommand start = _$start; + @BuiltValueEnumConst(wireName: r'pause') + static const JobCommand pause = _$pause; + @BuiltValueEnumConst(wireName: r'resume') + static const JobCommand resume = _$resume; + @BuiltValueEnumConst(wireName: r'empty') + static const JobCommand empty = _$empty; + @BuiltValueEnumConst(wireName: r'clear-failed') + static const JobCommand clearFailed = _$clearFailed; + + static Serializer get serializer => _$jobCommandSerializer; + + const JobCommand._(String name): super(name); + + static BuiltSet get values => _$values; + static JobCommand valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class JobCommandMixin = Object with _$JobCommandMixin; + diff --git a/mobile-v2/openapi/lib/src/model/job_command_dto.dart b/mobile-v2/openapi/lib/src/model/job_command_dto.dart new file mode 100644 index 0000000000..8b106bde5f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_command_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/job_command.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_command_dto.g.dart'; + +/// JobCommandDto +/// +/// Properties: +/// * [command] +/// * [force] +@BuiltValue() +abstract class JobCommandDto implements Built { + @BuiltValueField(wireName: r'command') + JobCommand get command; + // enum commandEnum { start, pause, resume, empty, clear-failed, }; + + @BuiltValueField(wireName: r'force') + bool get force; + + JobCommandDto._(); + + factory JobCommandDto([void updates(JobCommandDtoBuilder b)]) = _$JobCommandDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JobCommandDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JobCommandDtoSerializer(); +} + +class _$JobCommandDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JobCommandDto, _$JobCommandDto]; + + @override + final String wireName = r'JobCommandDto'; + + Iterable _serializeProperties( + Serializers serializers, + JobCommandDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'command'; + yield serializers.serialize( + object.command, + specifiedType: const FullType(JobCommand), + ); + yield r'force'; + yield serializers.serialize( + object.force, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + JobCommandDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JobCommandDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'command': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobCommand), + ) as JobCommand; + result.command = valueDes; + break; + case r'force': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.force = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JobCommandDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JobCommandDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/job_counts_dto.dart b/mobile-v2/openapi/lib/src/model/job_counts_dto.dart new file mode 100644 index 0000000000..e5381c4454 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_counts_dto.dart @@ -0,0 +1,186 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_counts_dto.g.dart'; + +/// JobCountsDto +/// +/// Properties: +/// * [active] +/// * [completed] +/// * [delayed] +/// * [failed] +/// * [paused] +/// * [waiting] +@BuiltValue() +abstract class JobCountsDto implements Built { + @BuiltValueField(wireName: r'active') + int get active; + + @BuiltValueField(wireName: r'completed') + int get completed; + + @BuiltValueField(wireName: r'delayed') + int get delayed; + + @BuiltValueField(wireName: r'failed') + int get failed; + + @BuiltValueField(wireName: r'paused') + int get paused; + + @BuiltValueField(wireName: r'waiting') + int get waiting; + + JobCountsDto._(); + + factory JobCountsDto([void updates(JobCountsDtoBuilder b)]) = _$JobCountsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JobCountsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JobCountsDtoSerializer(); +} + +class _$JobCountsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JobCountsDto, _$JobCountsDto]; + + @override + final String wireName = r'JobCountsDto'; + + Iterable _serializeProperties( + Serializers serializers, + JobCountsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'active'; + yield serializers.serialize( + object.active, + specifiedType: const FullType(int), + ); + yield r'completed'; + yield serializers.serialize( + object.completed, + specifiedType: const FullType(int), + ); + yield r'delayed'; + yield serializers.serialize( + object.delayed, + specifiedType: const FullType(int), + ); + yield r'failed'; + yield serializers.serialize( + object.failed, + specifiedType: const FullType(int), + ); + yield r'paused'; + yield serializers.serialize( + object.paused, + specifiedType: const FullType(int), + ); + yield r'waiting'; + yield serializers.serialize( + object.waiting, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + JobCountsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JobCountsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'active': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.active = valueDes; + break; + case r'completed': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.completed = valueDes; + break; + case r'delayed': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.delayed = valueDes; + break; + case r'failed': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.failed = valueDes; + break; + case r'paused': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.paused = valueDes; + break; + case r'waiting': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.waiting = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JobCountsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JobCountsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/job_name.dart b/mobile-v2/openapi/lib/src/model/job_name.dart new file mode 100644 index 0000000000..7ad6ccdb88 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_name.dart @@ -0,0 +1,54 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_name.g.dart'; + +class JobName extends EnumClass { + + @BuiltValueEnumConst(wireName: r'thumbnailGeneration') + static const JobName thumbnailGeneration = _$thumbnailGeneration; + @BuiltValueEnumConst(wireName: r'metadataExtraction') + static const JobName metadataExtraction = _$metadataExtraction; + @BuiltValueEnumConst(wireName: r'videoConversion') + static const JobName videoConversion = _$videoConversion; + @BuiltValueEnumConst(wireName: r'faceDetection') + static const JobName faceDetection = _$faceDetection; + @BuiltValueEnumConst(wireName: r'facialRecognition') + static const JobName facialRecognition = _$facialRecognition; + @BuiltValueEnumConst(wireName: r'smartSearch') + static const JobName smartSearch = _$smartSearch; + @BuiltValueEnumConst(wireName: r'backgroundTask') + static const JobName backgroundTask = _$backgroundTask; + @BuiltValueEnumConst(wireName: r'storageTemplateMigration') + static const JobName storageTemplateMigration = _$storageTemplateMigration; + @BuiltValueEnumConst(wireName: r'migration') + static const JobName migration = _$migration; + @BuiltValueEnumConst(wireName: r'search') + static const JobName search = _$search; + @BuiltValueEnumConst(wireName: r'sidecar') + static const JobName sidecar = _$sidecar; + @BuiltValueEnumConst(wireName: r'library') + static const JobName library_ = _$library_; + + static Serializer get serializer => _$jobNameSerializer; + + const JobName._(String name): super(name); + + static BuiltSet get values => _$values; + static JobName valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class JobNameMixin = Object with _$JobNameMixin; + diff --git a/mobile-v2/openapi/lib/src/model/job_settings_dto.dart b/mobile-v2/openapi/lib/src/model/job_settings_dto.dart new file mode 100644 index 0000000000..5925765ad4 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_settings_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_settings_dto.g.dart'; + +/// JobSettingsDto +/// +/// Properties: +/// * [concurrency] +@BuiltValue() +abstract class JobSettingsDto implements Built { + @BuiltValueField(wireName: r'concurrency') + int get concurrency; + + JobSettingsDto._(); + + factory JobSettingsDto([void updates(JobSettingsDtoBuilder b)]) = _$JobSettingsDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JobSettingsDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JobSettingsDtoSerializer(); +} + +class _$JobSettingsDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JobSettingsDto, _$JobSettingsDto]; + + @override + final String wireName = r'JobSettingsDto'; + + Iterable _serializeProperties( + Serializers serializers, + JobSettingsDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'concurrency'; + yield serializers.serialize( + object.concurrency, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + JobSettingsDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JobSettingsDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'concurrency': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.concurrency = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JobSettingsDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JobSettingsDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/job_status_dto.dart b/mobile-v2/openapi/lib/src/model/job_status_dto.dart new file mode 100644 index 0000000000..a501e936b7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/job_status_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/queue_status_dto.dart'; +import 'package:openapi/src/model/job_counts_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'job_status_dto.g.dart'; + +/// JobStatusDto +/// +/// Properties: +/// * [jobCounts] +/// * [queueStatus] +@BuiltValue() +abstract class JobStatusDto implements Built { + @BuiltValueField(wireName: r'jobCounts') + JobCountsDto get jobCounts; + + @BuiltValueField(wireName: r'queueStatus') + QueueStatusDto get queueStatus; + + JobStatusDto._(); + + factory JobStatusDto([void updates(JobStatusDtoBuilder b)]) = _$JobStatusDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(JobStatusDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$JobStatusDtoSerializer(); +} + +class _$JobStatusDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [JobStatusDto, _$JobStatusDto]; + + @override + final String wireName = r'JobStatusDto'; + + Iterable _serializeProperties( + Serializers serializers, + JobStatusDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'jobCounts'; + yield serializers.serialize( + object.jobCounts, + specifiedType: const FullType(JobCountsDto), + ); + yield r'queueStatus'; + yield serializers.serialize( + object.queueStatus, + specifiedType: const FullType(QueueStatusDto), + ); + } + + @override + Object serialize( + Serializers serializers, + JobStatusDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required JobStatusDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'jobCounts': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobCountsDto), + ) as JobCountsDto; + result.jobCounts.replace(valueDes); + break; + case r'queueStatus': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(QueueStatusDto), + ) as QueueStatusDto; + result.queueStatus.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + JobStatusDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = JobStatusDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/library_response_dto.dart b/mobile-v2/openapi/lib/src/model/library_response_dto.dart new file mode 100644 index 0000000000..5dd208cdfb --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/library_response_dto.dart @@ -0,0 +1,254 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/library_type.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'library_response_dto.g.dart'; + +/// LibraryResponseDto +/// +/// Properties: +/// * [assetCount] +/// * [createdAt] +/// * [exclusionPatterns] +/// * [id] +/// * [importPaths] +/// * [name] +/// * [ownerId] +/// * [refreshedAt] +/// * [type] +/// * [updatedAt] +@BuiltValue() +abstract class LibraryResponseDto implements Built { + @BuiltValueField(wireName: r'assetCount') + int get assetCount; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'exclusionPatterns') + BuiltList get exclusionPatterns; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'importPaths') + BuiltList get importPaths; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'ownerId') + String get ownerId; + + @BuiltValueField(wireName: r'refreshedAt') + DateTime? get refreshedAt; + + @BuiltValueField(wireName: r'type') + LibraryType get type; + // enum typeEnum { UPLOAD, EXTERNAL, }; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + LibraryResponseDto._(); + + factory LibraryResponseDto([void updates(LibraryResponseDtoBuilder b)]) = _$LibraryResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(LibraryResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$LibraryResponseDtoSerializer(); +} + +class _$LibraryResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [LibraryResponseDto, _$LibraryResponseDto]; + + @override + final String wireName = r'LibraryResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + LibraryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assetCount'; + yield serializers.serialize( + object.assetCount, + specifiedType: const FullType(int), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'exclusionPatterns'; + yield serializers.serialize( + object.exclusionPatterns, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'importPaths'; + yield serializers.serialize( + object.importPaths, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'ownerId'; + yield serializers.serialize( + object.ownerId, + specifiedType: const FullType(String), + ); + yield r'refreshedAt'; + yield object.refreshedAt == null ? null : serializers.serialize( + object.refreshedAt, + specifiedType: const FullType.nullable(DateTime), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(LibraryType), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + LibraryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required LibraryResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetCount': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.assetCount = valueDes; + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'exclusionPatterns': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.exclusionPatterns.replace(valueDes); + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'importPaths': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.importPaths.replace(valueDes); + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'ownerId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.ownerId = valueDes; + break; + case r'refreshedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.refreshedAt = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(LibraryType), + ) as LibraryType; + result.type = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + LibraryResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = LibraryResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/library_stats_response_dto.dart b/mobile-v2/openapi/lib/src/model/library_stats_response_dto.dart new file mode 100644 index 0000000000..d7b4aea61a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/library_stats_response_dto.dart @@ -0,0 +1,158 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'library_stats_response_dto.g.dart'; + +/// LibraryStatsResponseDto +/// +/// Properties: +/// * [photos] +/// * [total] +/// * [usage] +/// * [videos] +@BuiltValue() +abstract class LibraryStatsResponseDto implements Built { + @BuiltValueField(wireName: r'photos') + int get photos; + + @BuiltValueField(wireName: r'total') + int get total; + + @BuiltValueField(wireName: r'usage') + int get usage; + + @BuiltValueField(wireName: r'videos') + int get videos; + + LibraryStatsResponseDto._(); + + factory LibraryStatsResponseDto([void updates(LibraryStatsResponseDtoBuilder b)]) = _$LibraryStatsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(LibraryStatsResponseDtoBuilder b) => b + ..photos = 0 + ..total = 0 + ..usage = 0 + ..videos = 0; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$LibraryStatsResponseDtoSerializer(); +} + +class _$LibraryStatsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [LibraryStatsResponseDto, _$LibraryStatsResponseDto]; + + @override + final String wireName = r'LibraryStatsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + LibraryStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'photos'; + yield serializers.serialize( + object.photos, + specifiedType: const FullType(int), + ); + yield r'total'; + yield serializers.serialize( + object.total, + specifiedType: const FullType(int), + ); + yield r'usage'; + yield serializers.serialize( + object.usage, + specifiedType: const FullType(int), + ); + yield r'videos'; + yield serializers.serialize( + object.videos, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + LibraryStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required LibraryStatsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'photos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.photos = valueDes; + break; + case r'total': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.total = valueDes; + break; + case r'usage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.usage = valueDes; + break; + case r'videos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.videos = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + LibraryStatsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = LibraryStatsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/library_type.dart b/mobile-v2/openapi/lib/src/model/library_type.dart new file mode 100644 index 0000000000..2763bc1302 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/library_type.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'library_type.g.dart'; + +class LibraryType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'UPLOAD') + static const LibraryType UPLOAD = _$UPLOAD; + @BuiltValueEnumConst(wireName: r'EXTERNAL') + static const LibraryType EXTERNAL = _$EXTERNAL; + + static Serializer get serializer => _$libraryTypeSerializer; + + const LibraryType._(String name): super(name); + + static BuiltSet get values => _$values; + static LibraryType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class LibraryTypeMixin = Object with _$LibraryTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/log_level.dart b/mobile-v2/openapi/lib/src/model/log_level.dart new file mode 100644 index 0000000000..ed98893777 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/log_level.dart @@ -0,0 +1,42 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'log_level.g.dart'; + +class LogLevel extends EnumClass { + + @BuiltValueEnumConst(wireName: r'verbose') + static const LogLevel verbose = _$verbose; + @BuiltValueEnumConst(wireName: r'debug') + static const LogLevel debug = _$debug; + @BuiltValueEnumConst(wireName: r'log') + static const LogLevel log = _$log; + @BuiltValueEnumConst(wireName: r'warn') + static const LogLevel warn = _$warn; + @BuiltValueEnumConst(wireName: r'error') + static const LogLevel error = _$error; + @BuiltValueEnumConst(wireName: r'fatal') + static const LogLevel fatal = _$fatal; + + static Serializer get serializer => _$logLevelSerializer; + + const LogLevel._(String name): super(name); + + static BuiltSet get values => _$values; + static LogLevel valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class LogLevelMixin = Object with _$LogLevelMixin; + diff --git a/mobile-v2/openapi/lib/src/model/login_credential_dto.dart b/mobile-v2/openapi/lib/src/model/login_credential_dto.dart new file mode 100644 index 0000000000..958059ff62 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/login_credential_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'login_credential_dto.g.dart'; + +/// LoginCredentialDto +/// +/// Properties: +/// * [email] +/// * [password] +@BuiltValue() +abstract class LoginCredentialDto implements Built { + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'password') + String get password; + + LoginCredentialDto._(); + + factory LoginCredentialDto([void updates(LoginCredentialDtoBuilder b)]) = _$LoginCredentialDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(LoginCredentialDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$LoginCredentialDtoSerializer(); +} + +class _$LoginCredentialDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [LoginCredentialDto, _$LoginCredentialDto]; + + @override + final String wireName = r'LoginCredentialDto'; + + Iterable _serializeProperties( + Serializers serializers, + LoginCredentialDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + LoginCredentialDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required LoginCredentialDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + LoginCredentialDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = LoginCredentialDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/login_response_dto.dart b/mobile-v2/openapi/lib/src/model/login_response_dto.dart new file mode 100644 index 0000000000..f619b1e231 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/login_response_dto.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'login_response_dto.g.dart'; + +/// LoginResponseDto +/// +/// Properties: +/// * [accessToken] +/// * [isAdmin] +/// * [name] +/// * [profileImagePath] +/// * [shouldChangePassword] +/// * [userEmail] +/// * [userId] +@BuiltValue() +abstract class LoginResponseDto implements Built { + @BuiltValueField(wireName: r'accessToken') + String get accessToken; + + @BuiltValueField(wireName: r'isAdmin') + bool get isAdmin; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'profileImagePath') + String get profileImagePath; + + @BuiltValueField(wireName: r'shouldChangePassword') + bool get shouldChangePassword; + + @BuiltValueField(wireName: r'userEmail') + String get userEmail; + + @BuiltValueField(wireName: r'userId') + String get userId; + + LoginResponseDto._(); + + factory LoginResponseDto([void updates(LoginResponseDtoBuilder b)]) = _$LoginResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(LoginResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$LoginResponseDtoSerializer(); +} + +class _$LoginResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [LoginResponseDto, _$LoginResponseDto]; + + @override + final String wireName = r'LoginResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + LoginResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'accessToken'; + yield serializers.serialize( + object.accessToken, + specifiedType: const FullType(String), + ); + yield r'isAdmin'; + yield serializers.serialize( + object.isAdmin, + specifiedType: const FullType(bool), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'profileImagePath'; + yield serializers.serialize( + object.profileImagePath, + specifiedType: const FullType(String), + ); + yield r'shouldChangePassword'; + yield serializers.serialize( + object.shouldChangePassword, + specifiedType: const FullType(bool), + ); + yield r'userEmail'; + yield serializers.serialize( + object.userEmail, + specifiedType: const FullType(String), + ); + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + LoginResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required LoginResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'accessToken': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.accessToken = valueDes; + break; + case r'isAdmin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isAdmin = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'profileImagePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profileImagePath = valueDes; + break; + case r'shouldChangePassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shouldChangePassword = valueDes; + break; + case r'userEmail': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userEmail = valueDes; + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + LoginResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = LoginResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/logout_response_dto.dart b/mobile-v2/openapi/lib/src/model/logout_response_dto.dart new file mode 100644 index 0000000000..c6605706bd --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/logout_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'logout_response_dto.g.dart'; + +/// LogoutResponseDto +/// +/// Properties: +/// * [redirectUri] +/// * [successful] +@BuiltValue() +abstract class LogoutResponseDto implements Built { + @BuiltValueField(wireName: r'redirectUri') + String get redirectUri; + + @BuiltValueField(wireName: r'successful') + bool get successful; + + LogoutResponseDto._(); + + factory LogoutResponseDto([void updates(LogoutResponseDtoBuilder b)]) = _$LogoutResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(LogoutResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$LogoutResponseDtoSerializer(); +} + +class _$LogoutResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [LogoutResponseDto, _$LogoutResponseDto]; + + @override + final String wireName = r'LogoutResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + LogoutResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'redirectUri'; + yield serializers.serialize( + object.redirectUri, + specifiedType: const FullType(String), + ); + yield r'successful'; + yield serializers.serialize( + object.successful, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + LogoutResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required LogoutResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'redirectUri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.redirectUri = valueDes; + break; + case r'successful': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.successful = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + LogoutResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = LogoutResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/map_marker_response_dto.dart b/mobile-v2/openapi/lib/src/model/map_marker_response_dto.dart new file mode 100644 index 0000000000..4f874b6c63 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/map_marker_response_dto.dart @@ -0,0 +1,189 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'map_marker_response_dto.g.dart'; + +/// MapMarkerResponseDto +/// +/// Properties: +/// * [city] +/// * [country] +/// * [id] +/// * [lat] +/// * [lon] +/// * [state] +@BuiltValue() +abstract class MapMarkerResponseDto implements Built { + @BuiltValueField(wireName: r'city') + String? get city; + + @BuiltValueField(wireName: r'country') + String? get country; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'lat') + double get lat; + + @BuiltValueField(wireName: r'lon') + double get lon; + + @BuiltValueField(wireName: r'state') + String? get state; + + MapMarkerResponseDto._(); + + factory MapMarkerResponseDto([void updates(MapMarkerResponseDtoBuilder b)]) = _$MapMarkerResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MapMarkerResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MapMarkerResponseDtoSerializer(); +} + +class _$MapMarkerResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MapMarkerResponseDto, _$MapMarkerResponseDto]; + + @override + final String wireName = r'MapMarkerResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + MapMarkerResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'city'; + yield object.city == null ? null : serializers.serialize( + object.city, + specifiedType: const FullType.nullable(String), + ); + yield r'country'; + yield object.country == null ? null : serializers.serialize( + object.country, + specifiedType: const FullType.nullable(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'lat'; + yield serializers.serialize( + object.lat, + specifiedType: const FullType(double), + ); + yield r'lon'; + yield serializers.serialize( + object.lon, + specifiedType: const FullType(double), + ); + yield r'state'; + yield object.state == null ? null : serializers.serialize( + object.state, + specifiedType: const FullType.nullable(String), + ); + } + + @override + Object serialize( + Serializers serializers, + MapMarkerResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MapMarkerResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.city = valueDes; + break; + case r'country': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.country = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'lat': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(double), + ) as double; + result.lat = valueDes; + break; + case r'lon': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(double), + ) as double; + result.lon = valueDes; + break; + case r'state': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.state = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MapMarkerResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MapMarkerResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/map_theme.dart b/mobile-v2/openapi/lib/src/model/map_theme.dart new file mode 100644 index 0000000000..767dfc17f7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/map_theme.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'map_theme.g.dart'; + +class MapTheme extends EnumClass { + + @BuiltValueEnumConst(wireName: r'light') + static const MapTheme light = _$light; + @BuiltValueEnumConst(wireName: r'dark') + static const MapTheme dark = _$dark; + + static Serializer get serializer => _$mapThemeSerializer; + + const MapTheme._(String name): super(name); + + static BuiltSet get values => _$values; + static MapTheme valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class MapThemeMixin = Object with _$MapThemeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/memory_create_dto.dart b/mobile-v2/openapi/lib/src/model/memory_create_dto.dart new file mode 100644 index 0000000000..d5962f3ba0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/memory_create_dto.dart @@ -0,0 +1,196 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/memory_type.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/on_this_day_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'memory_create_dto.g.dart'; + +/// MemoryCreateDto +/// +/// Properties: +/// * [assetIds] +/// * [data] +/// * [isSaved] +/// * [memoryAt] +/// * [seenAt] +/// * [type] +@BuiltValue() +abstract class MemoryCreateDto implements Built { + @BuiltValueField(wireName: r'assetIds') + BuiltList? get assetIds; + + @BuiltValueField(wireName: r'data') + OnThisDayDto get data; + + @BuiltValueField(wireName: r'isSaved') + bool? get isSaved; + + @BuiltValueField(wireName: r'memoryAt') + DateTime get memoryAt; + + @BuiltValueField(wireName: r'seenAt') + DateTime? get seenAt; + + @BuiltValueField(wireName: r'type') + MemoryType get type; + // enum typeEnum { on_this_day, }; + + MemoryCreateDto._(); + + factory MemoryCreateDto([void updates(MemoryCreateDtoBuilder b)]) = _$MemoryCreateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MemoryCreateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MemoryCreateDtoSerializer(); +} + +class _$MemoryCreateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MemoryCreateDto, _$MemoryCreateDto]; + + @override + final String wireName = r'MemoryCreateDto'; + + Iterable _serializeProperties( + Serializers serializers, + MemoryCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.assetIds != null) { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'data'; + yield serializers.serialize( + object.data, + specifiedType: const FullType(OnThisDayDto), + ); + if (object.isSaved != null) { + yield r'isSaved'; + yield serializers.serialize( + object.isSaved, + specifiedType: const FullType(bool), + ); + } + yield r'memoryAt'; + yield serializers.serialize( + object.memoryAt, + specifiedType: const FullType(DateTime), + ); + if (object.seenAt != null) { + yield r'seenAt'; + yield serializers.serialize( + object.seenAt, + specifiedType: const FullType(DateTime), + ); + } + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(MemoryType), + ); + } + + @override + Object serialize( + Serializers serializers, + MemoryCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MemoryCreateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'data': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OnThisDayDto), + ) as OnThisDayDto; + result.data.replace(valueDes); + break; + case r'isSaved': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isSaved = valueDes; + break; + case r'memoryAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.memoryAt = valueDes; + break; + case r'seenAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.seenAt = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(MemoryType), + ) as MemoryType; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MemoryCreateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MemoryCreateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/memory_lane_response_dto.dart b/mobile-v2/openapi/lib/src/model/memory_lane_response_dto.dart new file mode 100644 index 0000000000..5e5711420e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/memory_lane_response_dto.dart @@ -0,0 +1,141 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'memory_lane_response_dto.g.dart'; + +/// MemoryLaneResponseDto +/// +/// Properties: +/// * [assets] +/// * [title] +/// * [yearsAgo] +@BuiltValue() +abstract class MemoryLaneResponseDto implements Built { + @BuiltValueField(wireName: r'assets') + BuiltList get assets; + + @Deprecated('title has been deprecated') + @BuiltValueField(wireName: r'title') + String get title; + + @BuiltValueField(wireName: r'yearsAgo') + int get yearsAgo; + + MemoryLaneResponseDto._(); + + factory MemoryLaneResponseDto([void updates(MemoryLaneResponseDtoBuilder b)]) = _$MemoryLaneResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MemoryLaneResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MemoryLaneResponseDtoSerializer(); +} + +class _$MemoryLaneResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MemoryLaneResponseDto, _$MemoryLaneResponseDto]; + + @override + final String wireName = r'MemoryLaneResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + MemoryLaneResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + yield r'title'; + yield serializers.serialize( + object.title, + specifiedType: const FullType(String), + ); + yield r'yearsAgo'; + yield serializers.serialize( + object.yearsAgo, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + MemoryLaneResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MemoryLaneResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.assets.replace(valueDes); + break; + case r'title': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.title = valueDes; + break; + case r'yearsAgo': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.yearsAgo = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MemoryLaneResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MemoryLaneResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/memory_response_dto.dart b/mobile-v2/openapi/lib/src/model/memory_response_dto.dart new file mode 100644 index 0000000000..11ab794bc0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/memory_response_dto.dart @@ -0,0 +1,287 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/on_this_day_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'memory_response_dto.g.dart'; + +/// MemoryResponseDto +/// +/// Properties: +/// * [assets] +/// * [createdAt] +/// * [data] +/// * [deletedAt] +/// * [id] +/// * [isSaved] +/// * [memoryAt] +/// * [ownerId] +/// * [seenAt] +/// * [type] +/// * [updatedAt] +@BuiltValue() +abstract class MemoryResponseDto implements Built { + @BuiltValueField(wireName: r'assets') + BuiltList get assets; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'data') + OnThisDayDto get data; + + @BuiltValueField(wireName: r'deletedAt') + DateTime? get deletedAt; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isSaved') + bool get isSaved; + + @BuiltValueField(wireName: r'memoryAt') + DateTime get memoryAt; + + @BuiltValueField(wireName: r'ownerId') + String get ownerId; + + @BuiltValueField(wireName: r'seenAt') + DateTime? get seenAt; + + @BuiltValueField(wireName: r'type') + MemoryResponseDtoTypeEnum get type; + // enum typeEnum { on_this_day, }; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + MemoryResponseDto._(); + + factory MemoryResponseDto([void updates(MemoryResponseDtoBuilder b)]) = _$MemoryResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MemoryResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MemoryResponseDtoSerializer(); +} + +class _$MemoryResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MemoryResponseDto, _$MemoryResponseDto]; + + @override + final String wireName = r'MemoryResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + MemoryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'data'; + yield serializers.serialize( + object.data, + specifiedType: const FullType(OnThisDayDto), + ); + if (object.deletedAt != null) { + yield r'deletedAt'; + yield serializers.serialize( + object.deletedAt, + specifiedType: const FullType(DateTime), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isSaved'; + yield serializers.serialize( + object.isSaved, + specifiedType: const FullType(bool), + ); + yield r'memoryAt'; + yield serializers.serialize( + object.memoryAt, + specifiedType: const FullType(DateTime), + ); + yield r'ownerId'; + yield serializers.serialize( + object.ownerId, + specifiedType: const FullType(String), + ); + if (object.seenAt != null) { + yield r'seenAt'; + yield serializers.serialize( + object.seenAt, + specifiedType: const FullType(DateTime), + ); + } + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(MemoryResponseDtoTypeEnum), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + MemoryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MemoryResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.assets.replace(valueDes); + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'data': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(OnThisDayDto), + ) as OnThisDayDto; + result.data.replace(valueDes); + break; + case r'deletedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.deletedAt = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isSaved': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isSaved = valueDes; + break; + case r'memoryAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.memoryAt = valueDes; + break; + case r'ownerId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.ownerId = valueDes; + break; + case r'seenAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.seenAt = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(MemoryResponseDtoTypeEnum), + ) as MemoryResponseDtoTypeEnum; + result.type = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MemoryResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MemoryResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + +class MemoryResponseDtoTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'on_this_day') + static const MemoryResponseDtoTypeEnum onThisDay = _$memoryResponseDtoTypeEnum_onThisDay; + + static Serializer get serializer => _$memoryResponseDtoTypeEnumSerializer; + + const MemoryResponseDtoTypeEnum._(String name): super(name); + + static BuiltSet get values => _$memoryResponseDtoTypeEnumValues; + static MemoryResponseDtoTypeEnum valueOf(String name) => _$memoryResponseDtoTypeEnumValueOf(name); +} + diff --git a/mobile-v2/openapi/lib/src/model/memory_type.dart b/mobile-v2/openapi/lib/src/model/memory_type.dart new file mode 100644 index 0000000000..6928f2f647 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/memory_type.dart @@ -0,0 +1,32 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'memory_type.g.dart'; + +class MemoryType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'on_this_day') + static const MemoryType onThisDay = _$onThisDay; + + static Serializer get serializer => _$memoryTypeSerializer; + + const MemoryType._(String name): super(name); + + static BuiltSet get values => _$values; + static MemoryType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class MemoryTypeMixin = Object with _$MemoryTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/memory_update_dto.dart b/mobile-v2/openapi/lib/src/model/memory_update_dto.dart new file mode 100644 index 0000000000..25c1a57cc8 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/memory_update_dto.dart @@ -0,0 +1,144 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'memory_update_dto.g.dart'; + +/// MemoryUpdateDto +/// +/// Properties: +/// * [isSaved] +/// * [memoryAt] +/// * [seenAt] +@BuiltValue() +abstract class MemoryUpdateDto implements Built { + @BuiltValueField(wireName: r'isSaved') + bool? get isSaved; + + @BuiltValueField(wireName: r'memoryAt') + DateTime? get memoryAt; + + @BuiltValueField(wireName: r'seenAt') + DateTime? get seenAt; + + MemoryUpdateDto._(); + + factory MemoryUpdateDto([void updates(MemoryUpdateDtoBuilder b)]) = _$MemoryUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MemoryUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MemoryUpdateDtoSerializer(); +} + +class _$MemoryUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MemoryUpdateDto, _$MemoryUpdateDto]; + + @override + final String wireName = r'MemoryUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + MemoryUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.isSaved != null) { + yield r'isSaved'; + yield serializers.serialize( + object.isSaved, + specifiedType: const FullType(bool), + ); + } + if (object.memoryAt != null) { + yield r'memoryAt'; + yield serializers.serialize( + object.memoryAt, + specifiedType: const FullType(DateTime), + ); + } + if (object.seenAt != null) { + yield r'seenAt'; + yield serializers.serialize( + object.seenAt, + specifiedType: const FullType(DateTime), + ); + } + } + + @override + Object serialize( + Serializers serializers, + MemoryUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MemoryUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'isSaved': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isSaved = valueDes; + break; + case r'memoryAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.memoryAt = valueDes; + break; + case r'seenAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.seenAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MemoryUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MemoryUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/merge_person_dto.dart b/mobile-v2/openapi/lib/src/model/merge_person_dto.dart new file mode 100644 index 0000000000..6eeee8f372 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/merge_person_dto.dart @@ -0,0 +1,107 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'merge_person_dto.g.dart'; + +/// MergePersonDto +/// +/// Properties: +/// * [ids] +@BuiltValue() +abstract class MergePersonDto implements Built { + @BuiltValueField(wireName: r'ids') + BuiltList get ids; + + MergePersonDto._(); + + factory MergePersonDto([void updates(MergePersonDtoBuilder b)]) = _$MergePersonDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MergePersonDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MergePersonDtoSerializer(); +} + +class _$MergePersonDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MergePersonDto, _$MergePersonDto]; + + @override + final String wireName = r'MergePersonDto'; + + Iterable _serializeProperties( + Serializers serializers, + MergePersonDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'ids'; + yield serializers.serialize( + object.ids, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + MergePersonDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MergePersonDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'ids': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.ids.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MergePersonDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MergePersonDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/metadata_search_dto.dart b/mobile-v2/openapi/lib/src/model/metadata_search_dto.dart new file mode 100644 index 0000000000..c655bcb65e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/metadata_search_dto.dart @@ -0,0 +1,908 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_order.dart'; +import 'package:openapi/src/model/asset_type_enum.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'metadata_search_dto.g.dart'; + +/// MetadataSearchDto +/// +/// Properties: +/// * [checksum] +/// * [city] +/// * [country] +/// * [createdAfter] +/// * [createdBefore] +/// * [deviceAssetId] +/// * [deviceId] +/// * [encodedVideoPath] +/// * [id] +/// * [isArchived] +/// * [isEncoded] +/// * [isExternal] +/// * [isFavorite] +/// * [isMotion] +/// * [isNotInAlbum] +/// * [isOffline] +/// * [isReadOnly] +/// * [isVisible] +/// * [lensModel] +/// * [libraryId] +/// * [make] +/// * [model] +/// * [order] +/// * [originalFileName] +/// * [originalPath] +/// * [page] +/// * [personIds] +/// * [previewPath] +/// * [resizePath] +/// * [size] +/// * [state] +/// * [takenAfter] +/// * [takenBefore] +/// * [thumbnailPath] +/// * [trashedAfter] +/// * [trashedBefore] +/// * [type] +/// * [updatedAfter] +/// * [updatedBefore] +/// * [webpPath] +/// * [withArchived] +/// * [withDeleted] +/// * [withExif] +/// * [withPeople] +/// * [withStacked] +@BuiltValue() +abstract class MetadataSearchDto implements Built { + @BuiltValueField(wireName: r'checksum') + String? get checksum; + + @BuiltValueField(wireName: r'city') + String? get city; + + @BuiltValueField(wireName: r'country') + String? get country; + + @BuiltValueField(wireName: r'createdAfter') + DateTime? get createdAfter; + + @BuiltValueField(wireName: r'createdBefore') + DateTime? get createdBefore; + + @BuiltValueField(wireName: r'deviceAssetId') + String? get deviceAssetId; + + @BuiltValueField(wireName: r'deviceId') + String? get deviceId; + + @BuiltValueField(wireName: r'encodedVideoPath') + String? get encodedVideoPath; + + @BuiltValueField(wireName: r'id') + String? get id; + + @BuiltValueField(wireName: r'isArchived') + bool? get isArchived; + + @BuiltValueField(wireName: r'isEncoded') + bool? get isEncoded; + + @BuiltValueField(wireName: r'isExternal') + bool? get isExternal; + + @BuiltValueField(wireName: r'isFavorite') + bool? get isFavorite; + + @BuiltValueField(wireName: r'isMotion') + bool? get isMotion; + + @BuiltValueField(wireName: r'isNotInAlbum') + bool? get isNotInAlbum; + + @BuiltValueField(wireName: r'isOffline') + bool? get isOffline; + + @BuiltValueField(wireName: r'isReadOnly') + bool? get isReadOnly; + + @BuiltValueField(wireName: r'isVisible') + bool? get isVisible; + + @BuiltValueField(wireName: r'lensModel') + String? get lensModel; + + @BuiltValueField(wireName: r'libraryId') + String? get libraryId; + + @BuiltValueField(wireName: r'make') + String? get make; + + @BuiltValueField(wireName: r'model') + String? get model; + + @BuiltValueField(wireName: r'order') + AssetOrder? get order; + // enum orderEnum { asc, desc, }; + + @BuiltValueField(wireName: r'originalFileName') + String? get originalFileName; + + @BuiltValueField(wireName: r'originalPath') + String? get originalPath; + + @BuiltValueField(wireName: r'page') + num? get page; + + @BuiltValueField(wireName: r'personIds') + BuiltList? get personIds; + + @BuiltValueField(wireName: r'previewPath') + String? get previewPath; + + @Deprecated('resizePath has been deprecated') + @BuiltValueField(wireName: r'resizePath') + String? get resizePath; + + @BuiltValueField(wireName: r'size') + num? get size; + + @BuiltValueField(wireName: r'state') + String? get state; + + @BuiltValueField(wireName: r'takenAfter') + DateTime? get takenAfter; + + @BuiltValueField(wireName: r'takenBefore') + DateTime? get takenBefore; + + @BuiltValueField(wireName: r'thumbnailPath') + String? get thumbnailPath; + + @BuiltValueField(wireName: r'trashedAfter') + DateTime? get trashedAfter; + + @BuiltValueField(wireName: r'trashedBefore') + DateTime? get trashedBefore; + + @BuiltValueField(wireName: r'type') + AssetTypeEnum? get type; + // enum typeEnum { IMAGE, VIDEO, AUDIO, OTHER, }; + + @BuiltValueField(wireName: r'updatedAfter') + DateTime? get updatedAfter; + + @BuiltValueField(wireName: r'updatedBefore') + DateTime? get updatedBefore; + + @Deprecated('webpPath has been deprecated') + @BuiltValueField(wireName: r'webpPath') + String? get webpPath; + + @BuiltValueField(wireName: r'withArchived') + bool? get withArchived; + + @BuiltValueField(wireName: r'withDeleted') + bool? get withDeleted; + + @BuiltValueField(wireName: r'withExif') + bool? get withExif; + + @BuiltValueField(wireName: r'withPeople') + bool? get withPeople; + + @BuiltValueField(wireName: r'withStacked') + bool? get withStacked; + + MetadataSearchDto._(); + + factory MetadataSearchDto([void updates(MetadataSearchDtoBuilder b)]) = _$MetadataSearchDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(MetadataSearchDtoBuilder b) => b + ..withArchived = false; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$MetadataSearchDtoSerializer(); +} + +class _$MetadataSearchDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [MetadataSearchDto, _$MetadataSearchDto]; + + @override + final String wireName = r'MetadataSearchDto'; + + Iterable _serializeProperties( + Serializers serializers, + MetadataSearchDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.checksum != null) { + yield r'checksum'; + yield serializers.serialize( + object.checksum, + specifiedType: const FullType(String), + ); + } + if (object.city != null) { + yield r'city'; + yield serializers.serialize( + object.city, + specifiedType: const FullType(String), + ); + } + if (object.country != null) { + yield r'country'; + yield serializers.serialize( + object.country, + specifiedType: const FullType(String), + ); + } + if (object.createdAfter != null) { + yield r'createdAfter'; + yield serializers.serialize( + object.createdAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.createdBefore != null) { + yield r'createdBefore'; + yield serializers.serialize( + object.createdBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.deviceAssetId != null) { + yield r'deviceAssetId'; + yield serializers.serialize( + object.deviceAssetId, + specifiedType: const FullType(String), + ); + } + if (object.deviceId != null) { + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + } + if (object.encodedVideoPath != null) { + yield r'encodedVideoPath'; + yield serializers.serialize( + object.encodedVideoPath, + specifiedType: const FullType(String), + ); + } + if (object.id != null) { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + } + if (object.isArchived != null) { + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + } + if (object.isEncoded != null) { + yield r'isEncoded'; + yield serializers.serialize( + object.isEncoded, + specifiedType: const FullType(bool), + ); + } + if (object.isExternal != null) { + yield r'isExternal'; + yield serializers.serialize( + object.isExternal, + specifiedType: const FullType(bool), + ); + } + if (object.isFavorite != null) { + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + } + if (object.isMotion != null) { + yield r'isMotion'; + yield serializers.serialize( + object.isMotion, + specifiedType: const FullType(bool), + ); + } + if (object.isNotInAlbum != null) { + yield r'isNotInAlbum'; + yield serializers.serialize( + object.isNotInAlbum, + specifiedType: const FullType(bool), + ); + } + if (object.isOffline != null) { + yield r'isOffline'; + yield serializers.serialize( + object.isOffline, + specifiedType: const FullType(bool), + ); + } + if (object.isReadOnly != null) { + yield r'isReadOnly'; + yield serializers.serialize( + object.isReadOnly, + specifiedType: const FullType(bool), + ); + } + if (object.isVisible != null) { + yield r'isVisible'; + yield serializers.serialize( + object.isVisible, + specifiedType: const FullType(bool), + ); + } + if (object.lensModel != null) { + yield r'lensModel'; + yield serializers.serialize( + object.lensModel, + specifiedType: const FullType(String), + ); + } + if (object.libraryId != null) { + yield r'libraryId'; + yield serializers.serialize( + object.libraryId, + specifiedType: const FullType(String), + ); + } + if (object.make != null) { + yield r'make'; + yield serializers.serialize( + object.make, + specifiedType: const FullType(String), + ); + } + if (object.model != null) { + yield r'model'; + yield serializers.serialize( + object.model, + specifiedType: const FullType(String), + ); + } + if (object.order != null) { + yield r'order'; + yield serializers.serialize( + object.order, + specifiedType: const FullType(AssetOrder), + ); + } + if (object.originalFileName != null) { + yield r'originalFileName'; + yield serializers.serialize( + object.originalFileName, + specifiedType: const FullType(String), + ); + } + if (object.originalPath != null) { + yield r'originalPath'; + yield serializers.serialize( + object.originalPath, + specifiedType: const FullType(String), + ); + } + if (object.page != null) { + yield r'page'; + yield serializers.serialize( + object.page, + specifiedType: const FullType(num), + ); + } + if (object.personIds != null) { + yield r'personIds'; + yield serializers.serialize( + object.personIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.previewPath != null) { + yield r'previewPath'; + yield serializers.serialize( + object.previewPath, + specifiedType: const FullType(String), + ); + } + if (object.resizePath != null) { + yield r'resizePath'; + yield serializers.serialize( + object.resizePath, + specifiedType: const FullType(String), + ); + } + if (object.size != null) { + yield r'size'; + yield serializers.serialize( + object.size, + specifiedType: const FullType(num), + ); + } + if (object.state != null) { + yield r'state'; + yield serializers.serialize( + object.state, + specifiedType: const FullType(String), + ); + } + if (object.takenAfter != null) { + yield r'takenAfter'; + yield serializers.serialize( + object.takenAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.takenBefore != null) { + yield r'takenBefore'; + yield serializers.serialize( + object.takenBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.thumbnailPath != null) { + yield r'thumbnailPath'; + yield serializers.serialize( + object.thumbnailPath, + specifiedType: const FullType(String), + ); + } + if (object.trashedAfter != null) { + yield r'trashedAfter'; + yield serializers.serialize( + object.trashedAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.trashedBefore != null) { + yield r'trashedBefore'; + yield serializers.serialize( + object.trashedBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.type != null) { + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(AssetTypeEnum), + ); + } + if (object.updatedAfter != null) { + yield r'updatedAfter'; + yield serializers.serialize( + object.updatedAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.updatedBefore != null) { + yield r'updatedBefore'; + yield serializers.serialize( + object.updatedBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.webpPath != null) { + yield r'webpPath'; + yield serializers.serialize( + object.webpPath, + specifiedType: const FullType(String), + ); + } + if (object.withArchived != null) { + yield r'withArchived'; + yield serializers.serialize( + object.withArchived, + specifiedType: const FullType(bool), + ); + } + if (object.withDeleted != null) { + yield r'withDeleted'; + yield serializers.serialize( + object.withDeleted, + specifiedType: const FullType(bool), + ); + } + if (object.withExif != null) { + yield r'withExif'; + yield serializers.serialize( + object.withExif, + specifiedType: const FullType(bool), + ); + } + if (object.withPeople != null) { + yield r'withPeople'; + yield serializers.serialize( + object.withPeople, + specifiedType: const FullType(bool), + ); + } + if (object.withStacked != null) { + yield r'withStacked'; + yield serializers.serialize( + object.withStacked, + specifiedType: const FullType(bool), + ); + } + } + + @override + Object serialize( + Serializers serializers, + MetadataSearchDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required MetadataSearchDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'checksum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.checksum = valueDes; + break; + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.city = valueDes; + break; + case r'country': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.country = valueDes; + break; + case r'createdAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAfter = valueDes; + break; + case r'createdBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdBefore = valueDes; + break; + case r'deviceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceAssetId = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'encodedVideoPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.encodedVideoPath = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isEncoded': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isEncoded = valueDes; + break; + case r'isExternal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isExternal = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'isMotion': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isMotion = valueDes; + break; + case r'isNotInAlbum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isNotInAlbum = valueDes; + break; + case r'isOffline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOffline = valueDes; + break; + case r'isReadOnly': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isReadOnly = valueDes; + break; + case r'isVisible': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isVisible = valueDes; + break; + case r'lensModel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.lensModel = valueDes; + break; + case r'libraryId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.libraryId = valueDes; + break; + case r'make': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.make = valueDes; + break; + case r'model': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.model = valueDes; + break; + case r'order': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetOrder), + ) as AssetOrder; + result.order = valueDes; + break; + case r'originalFileName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.originalFileName = valueDes; + break; + case r'originalPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.originalPath = valueDes; + break; + case r'page': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.page = valueDes; + break; + case r'personIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.personIds.replace(valueDes); + break; + case r'previewPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.previewPath = valueDes; + break; + case r'resizePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.resizePath = valueDes; + break; + case r'size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.size = valueDes; + break; + case r'state': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.state = valueDes; + break; + case r'takenAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.takenAfter = valueDes; + break; + case r'takenBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.takenBefore = valueDes; + break; + case r'thumbnailPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.thumbnailPath = valueDes; + break; + case r'trashedAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.trashedAfter = valueDes; + break; + case r'trashedBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.trashedBefore = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetTypeEnum), + ) as AssetTypeEnum; + result.type = valueDes; + break; + case r'updatedAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAfter = valueDes; + break; + case r'updatedBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedBefore = valueDes; + break; + case r'webpPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.webpPath = valueDes; + break; + case r'withArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withArchived = valueDes; + break; + case r'withDeleted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withDeleted = valueDes; + break; + case r'withExif': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withExif = valueDes; + break; + case r'withPeople': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withPeople = valueDes; + break; + case r'withStacked': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withStacked = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + MetadataSearchDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = MetadataSearchDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/model_type.dart b/mobile-v2/openapi/lib/src/model/model_type.dart new file mode 100644 index 0000000000..5e427ddf89 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/model_type.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'model_type.g.dart'; + +class ModelType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'facial-recognition') + static const ModelType facialRecognition = _$facialRecognition; + @BuiltValueEnumConst(wireName: r'clip') + static const ModelType clip = _$clip; + + static Serializer get serializer => _$modelTypeSerializer; + + const ModelType._(String name): super(name); + + static BuiltSet get values => _$values; + static ModelType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ModelTypeMixin = Object with _$ModelTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/o_auth_authorize_response_dto.dart b/mobile-v2/openapi/lib/src/model/o_auth_authorize_response_dto.dart new file mode 100644 index 0000000000..7543b6916b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/o_auth_authorize_response_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth_authorize_response_dto.g.dart'; + +/// OAuthAuthorizeResponseDto +/// +/// Properties: +/// * [url] +@BuiltValue() +abstract class OAuthAuthorizeResponseDto implements Built { + @BuiltValueField(wireName: r'url') + String get url; + + OAuthAuthorizeResponseDto._(); + + factory OAuthAuthorizeResponseDto([void updates(OAuthAuthorizeResponseDtoBuilder b)]) = _$OAuthAuthorizeResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuthAuthorizeResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuthAuthorizeResponseDtoSerializer(); +} + +class _$OAuthAuthorizeResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuthAuthorizeResponseDto, _$OAuthAuthorizeResponseDto]; + + @override + final String wireName = r'OAuthAuthorizeResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + OAuthAuthorizeResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'url'; + yield serializers.serialize( + object.url, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + OAuthAuthorizeResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuthAuthorizeResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.url = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuthAuthorizeResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuthAuthorizeResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/o_auth_callback_dto.dart b/mobile-v2/openapi/lib/src/model/o_auth_callback_dto.dart new file mode 100644 index 0000000000..0a27602e81 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/o_auth_callback_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth_callback_dto.g.dart'; + +/// OAuthCallbackDto +/// +/// Properties: +/// * [url] +@BuiltValue() +abstract class OAuthCallbackDto implements Built { + @BuiltValueField(wireName: r'url') + String get url; + + OAuthCallbackDto._(); + + factory OAuthCallbackDto([void updates(OAuthCallbackDtoBuilder b)]) = _$OAuthCallbackDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuthCallbackDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuthCallbackDtoSerializer(); +} + +class _$OAuthCallbackDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuthCallbackDto, _$OAuthCallbackDto]; + + @override + final String wireName = r'OAuthCallbackDto'; + + Iterable _serializeProperties( + Serializers serializers, + OAuthCallbackDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'url'; + yield serializers.serialize( + object.url, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + OAuthCallbackDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuthCallbackDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.url = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuthCallbackDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuthCallbackDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/o_auth_config_dto.dart b/mobile-v2/openapi/lib/src/model/o_auth_config_dto.dart new file mode 100644 index 0000000000..f01f874ada --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/o_auth_config_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'o_auth_config_dto.g.dart'; + +/// OAuthConfigDto +/// +/// Properties: +/// * [redirectUri] +@BuiltValue() +abstract class OAuthConfigDto implements Built { + @BuiltValueField(wireName: r'redirectUri') + String get redirectUri; + + OAuthConfigDto._(); + + factory OAuthConfigDto([void updates(OAuthConfigDtoBuilder b)]) = _$OAuthConfigDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OAuthConfigDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OAuthConfigDtoSerializer(); +} + +class _$OAuthConfigDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OAuthConfigDto, _$OAuthConfigDto]; + + @override + final String wireName = r'OAuthConfigDto'; + + Iterable _serializeProperties( + Serializers serializers, + OAuthConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'redirectUri'; + yield serializers.serialize( + object.redirectUri, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + OAuthConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OAuthConfigDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'redirectUri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.redirectUri = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OAuthConfigDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OAuthConfigDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/on_this_day_dto.dart b/mobile-v2/openapi/lib/src/model/on_this_day_dto.dart new file mode 100644 index 0000000000..50b2c57837 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/on_this_day_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'on_this_day_dto.g.dart'; + +/// OnThisDayDto +/// +/// Properties: +/// * [year] +@BuiltValue() +abstract class OnThisDayDto implements Built { + @BuiltValueField(wireName: r'year') + num get year; + + OnThisDayDto._(); + + factory OnThisDayDto([void updates(OnThisDayDtoBuilder b)]) = _$OnThisDayDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(OnThisDayDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$OnThisDayDtoSerializer(); +} + +class _$OnThisDayDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [OnThisDayDto, _$OnThisDayDto]; + + @override + final String wireName = r'OnThisDayDto'; + + Iterable _serializeProperties( + Serializers serializers, + OnThisDayDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'year'; + yield serializers.serialize( + object.year, + specifiedType: const FullType(num), + ); + } + + @override + Object serialize( + Serializers serializers, + OnThisDayDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required OnThisDayDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'year': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.year = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + OnThisDayDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = OnThisDayDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/partner_response_dto.dart b/mobile-v2/openapi/lib/src/model/partner_response_dto.dart new file mode 100644 index 0000000000..9fd276f211 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/partner_response_dto.dart @@ -0,0 +1,374 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/user_status.dart'; +import 'package:openapi/src/model/user_avatar_color.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'partner_response_dto.g.dart'; + +/// PartnerResponseDto +/// +/// Properties: +/// * [avatarColor] +/// * [createdAt] +/// * [deletedAt] +/// * [email] +/// * [id] +/// * [inTimeline] +/// * [isAdmin] +/// * [memoriesEnabled] +/// * [name] +/// * [oauthId] +/// * [profileImagePath] +/// * [quotaSizeInBytes] +/// * [quotaUsageInBytes] +/// * [shouldChangePassword] +/// * [status] +/// * [storageLabel] +/// * [updatedAt] +@BuiltValue() +abstract class PartnerResponseDto implements Built { + @BuiltValueField(wireName: r'avatarColor') + UserAvatarColor get avatarColor; + // enum avatarColorEnum { primary, pink, red, yellow, blue, green, purple, orange, gray, amber, }; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'deletedAt') + DateTime? get deletedAt; + + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'inTimeline') + bool? get inTimeline; + + @BuiltValueField(wireName: r'isAdmin') + bool get isAdmin; + + @BuiltValueField(wireName: r'memoriesEnabled') + bool? get memoriesEnabled; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'oauthId') + String get oauthId; + + @BuiltValueField(wireName: r'profileImagePath') + String get profileImagePath; + + @BuiltValueField(wireName: r'quotaSizeInBytes') + int? get quotaSizeInBytes; + + @BuiltValueField(wireName: r'quotaUsageInBytes') + int? get quotaUsageInBytes; + + @BuiltValueField(wireName: r'shouldChangePassword') + bool get shouldChangePassword; + + @BuiltValueField(wireName: r'status') + UserStatus get status; + // enum statusEnum { active, removing, deleted, }; + + @BuiltValueField(wireName: r'storageLabel') + String? get storageLabel; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + PartnerResponseDto._(); + + factory PartnerResponseDto([void updates(PartnerResponseDtoBuilder b)]) = _$PartnerResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PartnerResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PartnerResponseDtoSerializer(); +} + +class _$PartnerResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PartnerResponseDto, _$PartnerResponseDto]; + + @override + final String wireName = r'PartnerResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PartnerResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'avatarColor'; + yield serializers.serialize( + object.avatarColor, + specifiedType: const FullType(UserAvatarColor), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'deletedAt'; + yield object.deletedAt == null ? null : serializers.serialize( + object.deletedAt, + specifiedType: const FullType.nullable(DateTime), + ); + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + if (object.inTimeline != null) { + yield r'inTimeline'; + yield serializers.serialize( + object.inTimeline, + specifiedType: const FullType(bool), + ); + } + yield r'isAdmin'; + yield serializers.serialize( + object.isAdmin, + specifiedType: const FullType(bool), + ); + if (object.memoriesEnabled != null) { + yield r'memoriesEnabled'; + yield serializers.serialize( + object.memoriesEnabled, + specifiedType: const FullType(bool), + ); + } + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'oauthId'; + yield serializers.serialize( + object.oauthId, + specifiedType: const FullType(String), + ); + yield r'profileImagePath'; + yield serializers.serialize( + object.profileImagePath, + specifiedType: const FullType(String), + ); + yield r'quotaSizeInBytes'; + yield object.quotaSizeInBytes == null ? null : serializers.serialize( + object.quotaSizeInBytes, + specifiedType: const FullType.nullable(int), + ); + yield r'quotaUsageInBytes'; + yield object.quotaUsageInBytes == null ? null : serializers.serialize( + object.quotaUsageInBytes, + specifiedType: const FullType.nullable(int), + ); + yield r'shouldChangePassword'; + yield serializers.serialize( + object.shouldChangePassword, + specifiedType: const FullType(bool), + ); + yield r'status'; + yield serializers.serialize( + object.status, + specifiedType: const FullType(UserStatus), + ); + yield r'storageLabel'; + yield object.storageLabel == null ? null : serializers.serialize( + object.storageLabel, + specifiedType: const FullType.nullable(String), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + PartnerResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PartnerResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'avatarColor': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserAvatarColor), + ) as UserAvatarColor; + result.avatarColor = valueDes; + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'deletedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.deletedAt = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'inTimeline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.inTimeline = valueDes; + break; + case r'isAdmin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isAdmin = valueDes; + break; + case r'memoriesEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.memoriesEnabled = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'oauthId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.oauthId = valueDes; + break; + case r'profileImagePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profileImagePath = valueDes; + break; + case r'quotaSizeInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaSizeInBytes = valueDes; + break; + case r'quotaUsageInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaUsageInBytes = valueDes; + break; + case r'shouldChangePassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shouldChangePassword = valueDes; + break; + case r'status': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserStatus), + ) as UserStatus; + result.status = valueDes; + break; + case r'storageLabel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.storageLabel = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PartnerResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PartnerResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/path_entity_type.dart b/mobile-v2/openapi/lib/src/model/path_entity_type.dart new file mode 100644 index 0000000000..98b3d59806 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/path_entity_type.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'path_entity_type.g.dart'; + +class PathEntityType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'asset') + static const PathEntityType asset = _$asset; + @BuiltValueEnumConst(wireName: r'person') + static const PathEntityType person = _$person; + @BuiltValueEnumConst(wireName: r'user') + static const PathEntityType user = _$user; + + static Serializer get serializer => _$pathEntityTypeSerializer; + + const PathEntityType._(String name): super(name); + + static BuiltSet get values => _$values; + static PathEntityType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class PathEntityTypeMixin = Object with _$PathEntityTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/path_type.dart b/mobile-v2/openapi/lib/src/model/path_type.dart new file mode 100644 index 0000000000..94cae15611 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/path_type.dart @@ -0,0 +1,44 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'path_type.g.dart'; + +class PathType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'original') + static const PathType original = _$original; + @BuiltValueEnumConst(wireName: r'preview') + static const PathType preview = _$preview; + @BuiltValueEnumConst(wireName: r'thumbnail') + static const PathType thumbnail = _$thumbnail; + @BuiltValueEnumConst(wireName: r'encoded_video') + static const PathType encodedVideo = _$encodedVideo; + @BuiltValueEnumConst(wireName: r'sidecar') + static const PathType sidecar = _$sidecar; + @BuiltValueEnumConst(wireName: r'face') + static const PathType face = _$face; + @BuiltValueEnumConst(wireName: r'profile') + static const PathType profile = _$profile; + + static Serializer get serializer => _$pathTypeSerializer; + + const PathType._(String name): super(name); + + static BuiltSet get values => _$values; + static PathType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class PathTypeMixin = Object with _$PathTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/people_response_dto.dart b/mobile-v2/openapi/lib/src/model/people_response_dto.dart new file mode 100644 index 0000000000..d4882ba7d4 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/people_response_dto.dart @@ -0,0 +1,140 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/person_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'people_response_dto.g.dart'; + +/// PeopleResponseDto +/// +/// Properties: +/// * [hidden] +/// * [people] +/// * [total] +@BuiltValue() +abstract class PeopleResponseDto implements Built { + @BuiltValueField(wireName: r'hidden') + int get hidden; + + @BuiltValueField(wireName: r'people') + BuiltList get people; + + @BuiltValueField(wireName: r'total') + int get total; + + PeopleResponseDto._(); + + factory PeopleResponseDto([void updates(PeopleResponseDtoBuilder b)]) = _$PeopleResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PeopleResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PeopleResponseDtoSerializer(); +} + +class _$PeopleResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PeopleResponseDto, _$PeopleResponseDto]; + + @override + final String wireName = r'PeopleResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PeopleResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'hidden'; + yield serializers.serialize( + object.hidden, + specifiedType: const FullType(int), + ); + yield r'people'; + yield serializers.serialize( + object.people, + specifiedType: const FullType(BuiltList, [FullType(PersonResponseDto)]), + ); + yield r'total'; + yield serializers.serialize( + object.total, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + PeopleResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PeopleResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'hidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.hidden = valueDes; + break; + case r'people': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(PersonResponseDto)]), + ) as BuiltList; + result.people.replace(valueDes); + break; + case r'total': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.total = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PeopleResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PeopleResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/people_update_dto.dart b/mobile-v2/openapi/lib/src/model/people_update_dto.dart new file mode 100644 index 0000000000..e0995064e9 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/people_update_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/people_update_item.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'people_update_dto.g.dart'; + +/// PeopleUpdateDto +/// +/// Properties: +/// * [people] +@BuiltValue() +abstract class PeopleUpdateDto implements Built { + @BuiltValueField(wireName: r'people') + BuiltList get people; + + PeopleUpdateDto._(); + + factory PeopleUpdateDto([void updates(PeopleUpdateDtoBuilder b)]) = _$PeopleUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PeopleUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PeopleUpdateDtoSerializer(); +} + +class _$PeopleUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PeopleUpdateDto, _$PeopleUpdateDto]; + + @override + final String wireName = r'PeopleUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + PeopleUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'people'; + yield serializers.serialize( + object.people, + specifiedType: const FullType(BuiltList, [FullType(PeopleUpdateItem)]), + ); + } + + @override + Object serialize( + Serializers serializers, + PeopleUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PeopleUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'people': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(PeopleUpdateItem)]), + ) as BuiltList; + result.people.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PeopleUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PeopleUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/people_update_item.dart b/mobile-v2/openapi/lib/src/model/people_update_item.dart new file mode 100644 index 0000000000..b6d81547b1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/people_update_item.dart @@ -0,0 +1,185 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'people_update_item.g.dart'; + +/// PeopleUpdateItem +/// +/// Properties: +/// * [birthDate] - Person date of birth. Note: the mobile app cannot currently set the birth date to null. +/// * [featureFaceAssetId] - Asset is used to get the feature face thumbnail. +/// * [id] - Person id. +/// * [isHidden] - Person visibility +/// * [name] - Person name. +@BuiltValue() +abstract class PeopleUpdateItem implements Built { + /// Person date of birth. Note: the mobile app cannot currently set the birth date to null. + @BuiltValueField(wireName: r'birthDate') + Date? get birthDate; + + /// Asset is used to get the feature face thumbnail. + @BuiltValueField(wireName: r'featureFaceAssetId') + String? get featureFaceAssetId; + + /// Person id. + @BuiltValueField(wireName: r'id') + String get id; + + /// Person visibility + @BuiltValueField(wireName: r'isHidden') + bool? get isHidden; + + /// Person name. + @BuiltValueField(wireName: r'name') + String? get name; + + PeopleUpdateItem._(); + + factory PeopleUpdateItem([void updates(PeopleUpdateItemBuilder b)]) = _$PeopleUpdateItem; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PeopleUpdateItemBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PeopleUpdateItemSerializer(); +} + +class _$PeopleUpdateItemSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PeopleUpdateItem, _$PeopleUpdateItem]; + + @override + final String wireName = r'PeopleUpdateItem'; + + Iterable _serializeProperties( + Serializers serializers, + PeopleUpdateItem object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.birthDate != null) { + yield r'birthDate'; + yield serializers.serialize( + object.birthDate, + specifiedType: const FullType.nullable(Date), + ); + } + if (object.featureFaceAssetId != null) { + yield r'featureFaceAssetId'; + yield serializers.serialize( + object.featureFaceAssetId, + specifiedType: const FullType(String), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + if (object.isHidden != null) { + yield r'isHidden'; + yield serializers.serialize( + object.isHidden, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + PeopleUpdateItem object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PeopleUpdateItemBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(Date), + ) as Date?; + if (valueDes == null) continue; + result.birthDate = valueDes; + break; + case r'featureFaceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.featureFaceAssetId = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isHidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isHidden = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PeopleUpdateItem deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PeopleUpdateItemBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/person_create_dto.dart b/mobile-v2/openapi/lib/src/model/person_create_dto.dart new file mode 100644 index 0000000000..ac3a57c33a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/person_create_dto.dart @@ -0,0 +1,149 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'person_create_dto.g.dart'; + +/// PersonCreateDto +/// +/// Properties: +/// * [birthDate] - Person date of birth. Note: the mobile app cannot currently set the birth date to null. +/// * [isHidden] - Person visibility +/// * [name] - Person name. +@BuiltValue() +abstract class PersonCreateDto implements Built { + /// Person date of birth. Note: the mobile app cannot currently set the birth date to null. + @BuiltValueField(wireName: r'birthDate') + Date? get birthDate; + + /// Person visibility + @BuiltValueField(wireName: r'isHidden') + bool? get isHidden; + + /// Person name. + @BuiltValueField(wireName: r'name') + String? get name; + + PersonCreateDto._(); + + factory PersonCreateDto([void updates(PersonCreateDtoBuilder b)]) = _$PersonCreateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PersonCreateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PersonCreateDtoSerializer(); +} + +class _$PersonCreateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PersonCreateDto, _$PersonCreateDto]; + + @override + final String wireName = r'PersonCreateDto'; + + Iterable _serializeProperties( + Serializers serializers, + PersonCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.birthDate != null) { + yield r'birthDate'; + yield serializers.serialize( + object.birthDate, + specifiedType: const FullType.nullable(Date), + ); + } + if (object.isHidden != null) { + yield r'isHidden'; + yield serializers.serialize( + object.isHidden, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + PersonCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PersonCreateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(Date), + ) as Date?; + if (valueDes == null) continue; + result.birthDate = valueDes; + break; + case r'isHidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isHidden = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PersonCreateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PersonCreateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/person_response_dto.dart b/mobile-v2/openapi/lib/src/model/person_response_dto.dart new file mode 100644 index 0000000000..d8797ecdbf --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/person_response_dto.dart @@ -0,0 +1,172 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'person_response_dto.g.dart'; + +/// PersonResponseDto +/// +/// Properties: +/// * [birthDate] +/// * [id] +/// * [isHidden] +/// * [name] +/// * [thumbnailPath] +@BuiltValue() +abstract class PersonResponseDto implements Built { + @BuiltValueField(wireName: r'birthDate') + Date? get birthDate; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isHidden') + bool get isHidden; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'thumbnailPath') + String get thumbnailPath; + + PersonResponseDto._(); + + factory PersonResponseDto([void updates(PersonResponseDtoBuilder b)]) = _$PersonResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PersonResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PersonResponseDtoSerializer(); +} + +class _$PersonResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PersonResponseDto, _$PersonResponseDto]; + + @override + final String wireName = r'PersonResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PersonResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'birthDate'; + yield object.birthDate == null ? null : serializers.serialize( + object.birthDate, + specifiedType: const FullType.nullable(Date), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isHidden'; + yield serializers.serialize( + object.isHidden, + specifiedType: const FullType(bool), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'thumbnailPath'; + yield serializers.serialize( + object.thumbnailPath, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + PersonResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PersonResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(Date), + ) as Date?; + if (valueDes == null) continue; + result.birthDate = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isHidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isHidden = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'thumbnailPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.thumbnailPath = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PersonResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PersonResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/person_statistics_response_dto.dart b/mobile-v2/openapi/lib/src/model/person_statistics_response_dto.dart new file mode 100644 index 0000000000..1eca6ff22f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/person_statistics_response_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'person_statistics_response_dto.g.dart'; + +/// PersonStatisticsResponseDto +/// +/// Properties: +/// * [assets] +@BuiltValue() +abstract class PersonStatisticsResponseDto implements Built { + @BuiltValueField(wireName: r'assets') + int get assets; + + PersonStatisticsResponseDto._(); + + factory PersonStatisticsResponseDto([void updates(PersonStatisticsResponseDtoBuilder b)]) = _$PersonStatisticsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PersonStatisticsResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PersonStatisticsResponseDtoSerializer(); +} + +class _$PersonStatisticsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PersonStatisticsResponseDto, _$PersonStatisticsResponseDto]; + + @override + final String wireName = r'PersonStatisticsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PersonStatisticsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + PersonStatisticsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PersonStatisticsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.assets = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PersonStatisticsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PersonStatisticsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/person_update_dto.dart b/mobile-v2/openapi/lib/src/model/person_update_dto.dart new file mode 100644 index 0000000000..4d6c9dae7d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/person_update_dto.dart @@ -0,0 +1,168 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'person_update_dto.g.dart'; + +/// PersonUpdateDto +/// +/// Properties: +/// * [birthDate] - Person date of birth. Note: the mobile app cannot currently set the birth date to null. +/// * [featureFaceAssetId] - Asset is used to get the feature face thumbnail. +/// * [isHidden] - Person visibility +/// * [name] - Person name. +@BuiltValue() +abstract class PersonUpdateDto implements Built { + /// Person date of birth. Note: the mobile app cannot currently set the birth date to null. + @BuiltValueField(wireName: r'birthDate') + Date? get birthDate; + + /// Asset is used to get the feature face thumbnail. + @BuiltValueField(wireName: r'featureFaceAssetId') + String? get featureFaceAssetId; + + /// Person visibility + @BuiltValueField(wireName: r'isHidden') + bool? get isHidden; + + /// Person name. + @BuiltValueField(wireName: r'name') + String? get name; + + PersonUpdateDto._(); + + factory PersonUpdateDto([void updates(PersonUpdateDtoBuilder b)]) = _$PersonUpdateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PersonUpdateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PersonUpdateDtoSerializer(); +} + +class _$PersonUpdateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PersonUpdateDto, _$PersonUpdateDto]; + + @override + final String wireName = r'PersonUpdateDto'; + + Iterable _serializeProperties( + Serializers serializers, + PersonUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.birthDate != null) { + yield r'birthDate'; + yield serializers.serialize( + object.birthDate, + specifiedType: const FullType.nullable(Date), + ); + } + if (object.featureFaceAssetId != null) { + yield r'featureFaceAssetId'; + yield serializers.serialize( + object.featureFaceAssetId, + specifiedType: const FullType(String), + ); + } + if (object.isHidden != null) { + yield r'isHidden'; + yield serializers.serialize( + object.isHidden, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + PersonUpdateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PersonUpdateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(Date), + ) as Date?; + if (valueDes == null) continue; + result.birthDate = valueDes; + break; + case r'featureFaceAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.featureFaceAssetId = valueDes; + break; + case r'isHidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isHidden = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PersonUpdateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PersonUpdateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/person_with_faces_response_dto.dart b/mobile-v2/openapi/lib/src/model/person_with_faces_response_dto.dart new file mode 100644 index 0000000000..a19f611f44 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/person_with_faces_response_dto.dart @@ -0,0 +1,190 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_face_without_person_response_dto.dart'; +import 'package:openapi/src/model/date.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'person_with_faces_response_dto.g.dart'; + +/// PersonWithFacesResponseDto +/// +/// Properties: +/// * [birthDate] +/// * [faces] +/// * [id] +/// * [isHidden] +/// * [name] +/// * [thumbnailPath] +@BuiltValue() +abstract class PersonWithFacesResponseDto implements Built { + @BuiltValueField(wireName: r'birthDate') + Date? get birthDate; + + @BuiltValueField(wireName: r'faces') + BuiltList get faces; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isHidden') + bool get isHidden; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'thumbnailPath') + String get thumbnailPath; + + PersonWithFacesResponseDto._(); + + factory PersonWithFacesResponseDto([void updates(PersonWithFacesResponseDtoBuilder b)]) = _$PersonWithFacesResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PersonWithFacesResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PersonWithFacesResponseDtoSerializer(); +} + +class _$PersonWithFacesResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PersonWithFacesResponseDto, _$PersonWithFacesResponseDto]; + + @override + final String wireName = r'PersonWithFacesResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PersonWithFacesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'birthDate'; + yield object.birthDate == null ? null : serializers.serialize( + object.birthDate, + specifiedType: const FullType.nullable(Date), + ); + yield r'faces'; + yield serializers.serialize( + object.faces, + specifiedType: const FullType(BuiltList, [FullType(AssetFaceWithoutPersonResponseDto)]), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isHidden'; + yield serializers.serialize( + object.isHidden, + specifiedType: const FullType(bool), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'thumbnailPath'; + yield serializers.serialize( + object.thumbnailPath, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + PersonWithFacesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PersonWithFacesResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'birthDate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(Date), + ) as Date?; + if (valueDes == null) continue; + result.birthDate = valueDes; + break; + case r'faces': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetFaceWithoutPersonResponseDto)]), + ) as BuiltList; + result.faces.replace(valueDes); + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isHidden': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isHidden = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'thumbnailPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.thumbnailPath = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PersonWithFacesResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PersonWithFacesResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/places_response_dto.dart b/mobile-v2/openapi/lib/src/model/places_response_dto.dart new file mode 100644 index 0000000000..4ab795c4f3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/places_response_dto.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'places_response_dto.g.dart'; + +/// PlacesResponseDto +/// +/// Properties: +/// * [admin1name] +/// * [admin2name] +/// * [latitude] +/// * [longitude] +/// * [name] +@BuiltValue() +abstract class PlacesResponseDto implements Built { + @BuiltValueField(wireName: r'admin1name') + String? get admin1name; + + @BuiltValueField(wireName: r'admin2name') + String? get admin2name; + + @BuiltValueField(wireName: r'latitude') + num get latitude; + + @BuiltValueField(wireName: r'longitude') + num get longitude; + + @BuiltValueField(wireName: r'name') + String get name; + + PlacesResponseDto._(); + + factory PlacesResponseDto([void updates(PlacesResponseDtoBuilder b)]) = _$PlacesResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(PlacesResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$PlacesResponseDtoSerializer(); +} + +class _$PlacesResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [PlacesResponseDto, _$PlacesResponseDto]; + + @override + final String wireName = r'PlacesResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + PlacesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.admin1name != null) { + yield r'admin1name'; + yield serializers.serialize( + object.admin1name, + specifiedType: const FullType(String), + ); + } + if (object.admin2name != null) { + yield r'admin2name'; + yield serializers.serialize( + object.admin2name, + specifiedType: const FullType(String), + ); + } + yield r'latitude'; + yield serializers.serialize( + object.latitude, + specifiedType: const FullType(num), + ); + yield r'longitude'; + yield serializers.serialize( + object.longitude, + specifiedType: const FullType(num), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + PlacesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required PlacesResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'admin1name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.admin1name = valueDes; + break; + case r'admin2name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.admin2name = valueDes; + break; + case r'latitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.latitude = valueDes; + break; + case r'longitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.longitude = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + PlacesResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = PlacesResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/queue_status_dto.dart b/mobile-v2/openapi/lib/src/model/queue_status_dto.dart new file mode 100644 index 0000000000..2b57155295 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/queue_status_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'queue_status_dto.g.dart'; + +/// QueueStatusDto +/// +/// Properties: +/// * [isActive] +/// * [isPaused] +@BuiltValue() +abstract class QueueStatusDto implements Built { + @BuiltValueField(wireName: r'isActive') + bool get isActive; + + @BuiltValueField(wireName: r'isPaused') + bool get isPaused; + + QueueStatusDto._(); + + factory QueueStatusDto([void updates(QueueStatusDtoBuilder b)]) = _$QueueStatusDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(QueueStatusDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$QueueStatusDtoSerializer(); +} + +class _$QueueStatusDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [QueueStatusDto, _$QueueStatusDto]; + + @override + final String wireName = r'QueueStatusDto'; + + Iterable _serializeProperties( + Serializers serializers, + QueueStatusDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'isActive'; + yield serializers.serialize( + object.isActive, + specifiedType: const FullType(bool), + ); + yield r'isPaused'; + yield serializers.serialize( + object.isPaused, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + QueueStatusDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required QueueStatusDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'isActive': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isActive = valueDes; + break; + case r'isPaused': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isPaused = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + QueueStatusDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = QueueStatusDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/reaction_level.dart b/mobile-v2/openapi/lib/src/model/reaction_level.dart new file mode 100644 index 0000000000..2bd70e94af --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/reaction_level.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'reaction_level.g.dart'; + +class ReactionLevel extends EnumClass { + + @BuiltValueEnumConst(wireName: r'album') + static const ReactionLevel album = _$album; + @BuiltValueEnumConst(wireName: r'asset') + static const ReactionLevel asset = _$asset; + + static Serializer get serializer => _$reactionLevelSerializer; + + const ReactionLevel._(String name): super(name); + + static BuiltSet get values => _$values; + static ReactionLevel valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ReactionLevelMixin = Object with _$ReactionLevelMixin; + diff --git a/mobile-v2/openapi/lib/src/model/reaction_type.dart b/mobile-v2/openapi/lib/src/model/reaction_type.dart new file mode 100644 index 0000000000..70bb8f6aff --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/reaction_type.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'reaction_type.g.dart'; + +class ReactionType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'comment') + static const ReactionType comment = _$comment; + @BuiltValueEnumConst(wireName: r'like') + static const ReactionType like = _$like; + + static Serializer get serializer => _$reactionTypeSerializer; + + const ReactionType._(String name): super(name); + + static BuiltSet get values => _$values; + static ReactionType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ReactionTypeMixin = Object with _$ReactionTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/recognition_config.dart b/mobile-v2/openapi/lib/src/model/recognition_config.dart new file mode 100644 index 0000000000..782b7170d0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/recognition_config.dart @@ -0,0 +1,190 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/model_type.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'recognition_config.g.dart'; + +/// RecognitionConfig +/// +/// Properties: +/// * [enabled] +/// * [maxDistance] +/// * [minFaces] +/// * [minScore] +/// * [modelName] +/// * [modelType] +@BuiltValue() +abstract class RecognitionConfig implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'maxDistance') + double get maxDistance; + + @BuiltValueField(wireName: r'minFaces') + int get minFaces; + + @BuiltValueField(wireName: r'minScore') + double get minScore; + + @BuiltValueField(wireName: r'modelName') + String get modelName; + + @BuiltValueField(wireName: r'modelType') + ModelType? get modelType; + // enum modelTypeEnum { facial-recognition, clip, }; + + RecognitionConfig._(); + + factory RecognitionConfig([void updates(RecognitionConfigBuilder b)]) = _$RecognitionConfig; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(RecognitionConfigBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$RecognitionConfigSerializer(); +} + +class _$RecognitionConfigSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [RecognitionConfig, _$RecognitionConfig]; + + @override + final String wireName = r'RecognitionConfig'; + + Iterable _serializeProperties( + Serializers serializers, + RecognitionConfig object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'maxDistance'; + yield serializers.serialize( + object.maxDistance, + specifiedType: const FullType(double), + ); + yield r'minFaces'; + yield serializers.serialize( + object.minFaces, + specifiedType: const FullType(int), + ); + yield r'minScore'; + yield serializers.serialize( + object.minScore, + specifiedType: const FullType(double), + ); + yield r'modelName'; + yield serializers.serialize( + object.modelName, + specifiedType: const FullType(String), + ); + if (object.modelType != null) { + yield r'modelType'; + yield serializers.serialize( + object.modelType, + specifiedType: const FullType(ModelType), + ); + } + } + + @override + Object serialize( + Serializers serializers, + RecognitionConfig object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required RecognitionConfigBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'maxDistance': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(double), + ) as double; + result.maxDistance = valueDes; + break; + case r'minFaces': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.minFaces = valueDes; + break; + case r'minScore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(double), + ) as double; + result.minScore = valueDes; + break; + case r'modelName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.modelName = valueDes; + break; + case r'modelType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ModelType), + ) as ModelType; + result.modelType = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + RecognitionConfig deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = RecognitionConfigBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/reverse_geocoding_state_response_dto.dart b/mobile-v2/openapi/lib/src/model/reverse_geocoding_state_response_dto.dart new file mode 100644 index 0000000000..34701a7323 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/reverse_geocoding_state_response_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'reverse_geocoding_state_response_dto.g.dart'; + +/// ReverseGeocodingStateResponseDto +/// +/// Properties: +/// * [lastImportFileName] +/// * [lastUpdate] +@BuiltValue() +abstract class ReverseGeocodingStateResponseDto implements Built { + @BuiltValueField(wireName: r'lastImportFileName') + String? get lastImportFileName; + + @BuiltValueField(wireName: r'lastUpdate') + String? get lastUpdate; + + ReverseGeocodingStateResponseDto._(); + + factory ReverseGeocodingStateResponseDto([void updates(ReverseGeocodingStateResponseDtoBuilder b)]) = _$ReverseGeocodingStateResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ReverseGeocodingStateResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ReverseGeocodingStateResponseDtoSerializer(); +} + +class _$ReverseGeocodingStateResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ReverseGeocodingStateResponseDto, _$ReverseGeocodingStateResponseDto]; + + @override + final String wireName = r'ReverseGeocodingStateResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ReverseGeocodingStateResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'lastImportFileName'; + yield object.lastImportFileName == null ? null : serializers.serialize( + object.lastImportFileName, + specifiedType: const FullType.nullable(String), + ); + yield r'lastUpdate'; + yield object.lastUpdate == null ? null : serializers.serialize( + object.lastUpdate, + specifiedType: const FullType.nullable(String), + ); + } + + @override + Object serialize( + Serializers serializers, + ReverseGeocodingStateResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ReverseGeocodingStateResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'lastImportFileName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.lastImportFileName = valueDes; + break; + case r'lastUpdate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.lastUpdate = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ReverseGeocodingStateResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ReverseGeocodingStateResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/scan_library_dto.dart b/mobile-v2/openapi/lib/src/model/scan_library_dto.dart new file mode 100644 index 0000000000..a31801abc8 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/scan_library_dto.dart @@ -0,0 +1,126 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'scan_library_dto.g.dart'; + +/// ScanLibraryDto +/// +/// Properties: +/// * [refreshAllFiles] +/// * [refreshModifiedFiles] +@BuiltValue() +abstract class ScanLibraryDto implements Built { + @BuiltValueField(wireName: r'refreshAllFiles') + bool? get refreshAllFiles; + + @BuiltValueField(wireName: r'refreshModifiedFiles') + bool? get refreshModifiedFiles; + + ScanLibraryDto._(); + + factory ScanLibraryDto([void updates(ScanLibraryDtoBuilder b)]) = _$ScanLibraryDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ScanLibraryDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ScanLibraryDtoSerializer(); +} + +class _$ScanLibraryDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ScanLibraryDto, _$ScanLibraryDto]; + + @override + final String wireName = r'ScanLibraryDto'; + + Iterable _serializeProperties( + Serializers serializers, + ScanLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.refreshAllFiles != null) { + yield r'refreshAllFiles'; + yield serializers.serialize( + object.refreshAllFiles, + specifiedType: const FullType(bool), + ); + } + if (object.refreshModifiedFiles != null) { + yield r'refreshModifiedFiles'; + yield serializers.serialize( + object.refreshModifiedFiles, + specifiedType: const FullType(bool), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ScanLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ScanLibraryDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'refreshAllFiles': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.refreshAllFiles = valueDes; + break; + case r'refreshModifiedFiles': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.refreshModifiedFiles = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ScanLibraryDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ScanLibraryDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_album_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_album_response_dto.dart new file mode 100644 index 0000000000..5a73317ed3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_album_response_dto.dart @@ -0,0 +1,157 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/search_facet_response_dto.dart'; +import 'package:openapi/src/model/album_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_album_response_dto.g.dart'; + +/// SearchAlbumResponseDto +/// +/// Properties: +/// * [count] +/// * [facets] +/// * [items] +/// * [total] +@BuiltValue() +abstract class SearchAlbumResponseDto implements Built { + @BuiltValueField(wireName: r'count') + int get count; + + @BuiltValueField(wireName: r'facets') + BuiltList get facets; + + @BuiltValueField(wireName: r'items') + BuiltList get items; + + @BuiltValueField(wireName: r'total') + int get total; + + SearchAlbumResponseDto._(); + + factory SearchAlbumResponseDto([void updates(SearchAlbumResponseDtoBuilder b)]) = _$SearchAlbumResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchAlbumResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchAlbumResponseDtoSerializer(); +} + +class _$SearchAlbumResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchAlbumResponseDto, _$SearchAlbumResponseDto]; + + @override + final String wireName = r'SearchAlbumResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchAlbumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'count'; + yield serializers.serialize( + object.count, + specifiedType: const FullType(int), + ); + yield r'facets'; + yield serializers.serialize( + object.facets, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetResponseDto)]), + ); + yield r'items'; + yield serializers.serialize( + object.items, + specifiedType: const FullType(BuiltList, [FullType(AlbumResponseDto)]), + ); + yield r'total'; + yield serializers.serialize( + object.total, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchAlbumResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchAlbumResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.count = valueDes; + break; + case r'facets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetResponseDto)]), + ) as BuiltList; + result.facets.replace(valueDes); + break; + case r'items': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AlbumResponseDto)]), + ) as BuiltList; + result.items.replace(valueDes); + break; + case r'total': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.total = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchAlbumResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchAlbumResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_asset_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_asset_response_dto.dart new file mode 100644 index 0000000000..23329bfa91 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_asset_response_dto.dart @@ -0,0 +1,174 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/search_facet_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_asset_response_dto.g.dart'; + +/// SearchAssetResponseDto +/// +/// Properties: +/// * [count] +/// * [facets] +/// * [items] +/// * [nextPage] +/// * [total] +@BuiltValue() +abstract class SearchAssetResponseDto implements Built { + @BuiltValueField(wireName: r'count') + int get count; + + @BuiltValueField(wireName: r'facets') + BuiltList get facets; + + @BuiltValueField(wireName: r'items') + BuiltList get items; + + @BuiltValueField(wireName: r'nextPage') + String? get nextPage; + + @BuiltValueField(wireName: r'total') + int get total; + + SearchAssetResponseDto._(); + + factory SearchAssetResponseDto([void updates(SearchAssetResponseDtoBuilder b)]) = _$SearchAssetResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchAssetResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchAssetResponseDtoSerializer(); +} + +class _$SearchAssetResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchAssetResponseDto, _$SearchAssetResponseDto]; + + @override + final String wireName = r'SearchAssetResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchAssetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'count'; + yield serializers.serialize( + object.count, + specifiedType: const FullType(int), + ); + yield r'facets'; + yield serializers.serialize( + object.facets, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetResponseDto)]), + ); + yield r'items'; + yield serializers.serialize( + object.items, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + yield r'nextPage'; + yield object.nextPage == null ? null : serializers.serialize( + object.nextPage, + specifiedType: const FullType.nullable(String), + ); + yield r'total'; + yield serializers.serialize( + object.total, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchAssetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchAssetResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.count = valueDes; + break; + case r'facets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetResponseDto)]), + ) as BuiltList; + result.facets.replace(valueDes); + break; + case r'items': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.items.replace(valueDes); + break; + case r'nextPage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.nextPage = valueDes; + break; + case r'total': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.total = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchAssetResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchAssetResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_explore_item.dart b/mobile-v2/openapi/lib/src/model/search_explore_item.dart new file mode 100644 index 0000000000..86e01a6364 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_explore_item.dart @@ -0,0 +1,123 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_explore_item.g.dart'; + +/// SearchExploreItem +/// +/// Properties: +/// * [data] +/// * [value] +@BuiltValue() +abstract class SearchExploreItem implements Built { + @BuiltValueField(wireName: r'data') + AssetResponseDto get data; + + @BuiltValueField(wireName: r'value') + String get value; + + SearchExploreItem._(); + + factory SearchExploreItem([void updates(SearchExploreItemBuilder b)]) = _$SearchExploreItem; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchExploreItemBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchExploreItemSerializer(); +} + +class _$SearchExploreItemSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchExploreItem, _$SearchExploreItem]; + + @override + final String wireName = r'SearchExploreItem'; + + Iterable _serializeProperties( + Serializers serializers, + SearchExploreItem object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'data'; + yield serializers.serialize( + object.data, + specifiedType: const FullType(AssetResponseDto), + ); + yield r'value'; + yield serializers.serialize( + object.value, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchExploreItem object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchExploreItemBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'data': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetResponseDto), + ) as AssetResponseDto; + result.data.replace(valueDes); + break; + case r'value': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.value = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchExploreItem deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchExploreItemBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_explore_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_explore_response_dto.dart new file mode 100644 index 0000000000..a750e947b1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_explore_response_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/search_explore_item.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_explore_response_dto.g.dart'; + +/// SearchExploreResponseDto +/// +/// Properties: +/// * [fieldName] +/// * [items] +@BuiltValue() +abstract class SearchExploreResponseDto implements Built { + @BuiltValueField(wireName: r'fieldName') + String get fieldName; + + @BuiltValueField(wireName: r'items') + BuiltList get items; + + SearchExploreResponseDto._(); + + factory SearchExploreResponseDto([void updates(SearchExploreResponseDtoBuilder b)]) = _$SearchExploreResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchExploreResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchExploreResponseDtoSerializer(); +} + +class _$SearchExploreResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchExploreResponseDto, _$SearchExploreResponseDto]; + + @override + final String wireName = r'SearchExploreResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchExploreResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'fieldName'; + yield serializers.serialize( + object.fieldName, + specifiedType: const FullType(String), + ); + yield r'items'; + yield serializers.serialize( + object.items, + specifiedType: const FullType(BuiltList, [FullType(SearchExploreItem)]), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchExploreResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchExploreResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'fieldName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.fieldName = valueDes; + break; + case r'items': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(SearchExploreItem)]), + ) as BuiltList; + result.items.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchExploreResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchExploreResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_facet_count_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_facet_count_response_dto.dart new file mode 100644 index 0000000000..1707a91db6 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_facet_count_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_facet_count_response_dto.g.dart'; + +/// SearchFacetCountResponseDto +/// +/// Properties: +/// * [count] +/// * [value] +@BuiltValue() +abstract class SearchFacetCountResponseDto implements Built { + @BuiltValueField(wireName: r'count') + int get count; + + @BuiltValueField(wireName: r'value') + String get value; + + SearchFacetCountResponseDto._(); + + factory SearchFacetCountResponseDto([void updates(SearchFacetCountResponseDtoBuilder b)]) = _$SearchFacetCountResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchFacetCountResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchFacetCountResponseDtoSerializer(); +} + +class _$SearchFacetCountResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchFacetCountResponseDto, _$SearchFacetCountResponseDto]; + + @override + final String wireName = r'SearchFacetCountResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchFacetCountResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'count'; + yield serializers.serialize( + object.count, + specifiedType: const FullType(int), + ); + yield r'value'; + yield serializers.serialize( + object.value, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchFacetCountResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchFacetCountResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.count = valueDes; + break; + case r'value': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.value = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchFacetCountResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchFacetCountResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_facet_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_facet_response_dto.dart new file mode 100644 index 0000000000..11dd1d222a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_facet_response_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/search_facet_count_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_facet_response_dto.g.dart'; + +/// SearchFacetResponseDto +/// +/// Properties: +/// * [counts] +/// * [fieldName] +@BuiltValue() +abstract class SearchFacetResponseDto implements Built { + @BuiltValueField(wireName: r'counts') + BuiltList get counts; + + @BuiltValueField(wireName: r'fieldName') + String get fieldName; + + SearchFacetResponseDto._(); + + factory SearchFacetResponseDto([void updates(SearchFacetResponseDtoBuilder b)]) = _$SearchFacetResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchFacetResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchFacetResponseDtoSerializer(); +} + +class _$SearchFacetResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchFacetResponseDto, _$SearchFacetResponseDto]; + + @override + final String wireName = r'SearchFacetResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchFacetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'counts'; + yield serializers.serialize( + object.counts, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetCountResponseDto)]), + ); + yield r'fieldName'; + yield serializers.serialize( + object.fieldName, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchFacetResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchFacetResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'counts': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(SearchFacetCountResponseDto)]), + ) as BuiltList; + result.counts.replace(valueDes); + break; + case r'fieldName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.fieldName = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchFacetResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchFacetResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_response_dto.dart b/mobile-v2/openapi/lib/src/model/search_response_dto.dart new file mode 100644 index 0000000000..8c4ba26d3b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_response_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/search_album_response_dto.dart'; +import 'package:openapi/src/model/search_asset_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_response_dto.g.dart'; + +/// SearchResponseDto +/// +/// Properties: +/// * [albums] +/// * [assets] +@BuiltValue() +abstract class SearchResponseDto implements Built { + @BuiltValueField(wireName: r'albums') + SearchAlbumResponseDto get albums; + + @BuiltValueField(wireName: r'assets') + SearchAssetResponseDto get assets; + + SearchResponseDto._(); + + factory SearchResponseDto([void updates(SearchResponseDtoBuilder b)]) = _$SearchResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SearchResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SearchResponseDtoSerializer(); +} + +class _$SearchResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SearchResponseDto, _$SearchResponseDto]; + + @override + final String wireName = r'SearchResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SearchResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'albums'; + yield serializers.serialize( + object.albums, + specifiedType: const FullType(SearchAlbumResponseDto), + ); + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(SearchAssetResponseDto), + ); + } + + @override + Object serialize( + Serializers serializers, + SearchResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SearchResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albums': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SearchAlbumResponseDto), + ) as SearchAlbumResponseDto; + result.albums.replace(valueDes); + break; + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SearchAssetResponseDto), + ) as SearchAssetResponseDto; + result.assets.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SearchResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SearchResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/search_suggestion_type.dart b/mobile-v2/openapi/lib/src/model/search_suggestion_type.dart new file mode 100644 index 0000000000..c69973b01d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/search_suggestion_type.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'search_suggestion_type.g.dart'; + +class SearchSuggestionType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'country') + static const SearchSuggestionType country = _$country; + @BuiltValueEnumConst(wireName: r'state') + static const SearchSuggestionType state = _$state; + @BuiltValueEnumConst(wireName: r'city') + static const SearchSuggestionType city = _$city; + @BuiltValueEnumConst(wireName: r'camera-make') + static const SearchSuggestionType cameraMake = _$cameraMake; + @BuiltValueEnumConst(wireName: r'camera-model') + static const SearchSuggestionType cameraModel = _$cameraModel; + + static Serializer get serializer => _$searchSuggestionTypeSerializer; + + const SearchSuggestionType._(String name): super(name); + + static BuiltSet get values => _$values; + static SearchSuggestionType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class SearchSuggestionTypeMixin = Object with _$SearchSuggestionTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/server_config_dto.dart b/mobile-v2/openapi/lib/src/model/server_config_dto.dart new file mode 100644 index 0000000000..6f10df09aa --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_config_dto.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_config_dto.g.dart'; + +/// ServerConfigDto +/// +/// Properties: +/// * [externalDomain] +/// * [isInitialized] +/// * [isOnboarded] +/// * [loginPageMessage] +/// * [oauthButtonText] +/// * [trashDays] +/// * [userDeleteDelay] +@BuiltValue() +abstract class ServerConfigDto implements Built { + @BuiltValueField(wireName: r'externalDomain') + String get externalDomain; + + @BuiltValueField(wireName: r'isInitialized') + bool get isInitialized; + + @BuiltValueField(wireName: r'isOnboarded') + bool get isOnboarded; + + @BuiltValueField(wireName: r'loginPageMessage') + String get loginPageMessage; + + @BuiltValueField(wireName: r'oauthButtonText') + String get oauthButtonText; + + @BuiltValueField(wireName: r'trashDays') + int get trashDays; + + @BuiltValueField(wireName: r'userDeleteDelay') + int get userDeleteDelay; + + ServerConfigDto._(); + + factory ServerConfigDto([void updates(ServerConfigDtoBuilder b)]) = _$ServerConfigDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerConfigDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerConfigDtoSerializer(); +} + +class _$ServerConfigDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerConfigDto, _$ServerConfigDto]; + + @override + final String wireName = r'ServerConfigDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'externalDomain'; + yield serializers.serialize( + object.externalDomain, + specifiedType: const FullType(String), + ); + yield r'isInitialized'; + yield serializers.serialize( + object.isInitialized, + specifiedType: const FullType(bool), + ); + yield r'isOnboarded'; + yield serializers.serialize( + object.isOnboarded, + specifiedType: const FullType(bool), + ); + yield r'loginPageMessage'; + yield serializers.serialize( + object.loginPageMessage, + specifiedType: const FullType(String), + ); + yield r'oauthButtonText'; + yield serializers.serialize( + object.oauthButtonText, + specifiedType: const FullType(String), + ); + yield r'trashDays'; + yield serializers.serialize( + object.trashDays, + specifiedType: const FullType(int), + ); + yield r'userDeleteDelay'; + yield serializers.serialize( + object.userDeleteDelay, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerConfigDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'externalDomain': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.externalDomain = valueDes; + break; + case r'isInitialized': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isInitialized = valueDes; + break; + case r'isOnboarded': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOnboarded = valueDes; + break; + case r'loginPageMessage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.loginPageMessage = valueDes; + break; + case r'oauthButtonText': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.oauthButtonText = valueDes; + break; + case r'trashDays': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.trashDays = valueDes; + break; + case r'userDeleteDelay': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.userDeleteDelay = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerConfigDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerConfigDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_features_dto.dart b/mobile-v2/openapi/lib/src/model/server_features_dto.dart new file mode 100644 index 0000000000..640325cf84 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_features_dto.dart @@ -0,0 +1,266 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_features_dto.g.dart'; + +/// ServerFeaturesDto +/// +/// Properties: +/// * [configFile] +/// * [facialRecognition] +/// * [map] +/// * [oauth] +/// * [oauthAutoLaunch] +/// * [passwordLogin] +/// * [reverseGeocoding] +/// * [search] +/// * [sidecar] +/// * [smartSearch] +/// * [trash] +@BuiltValue() +abstract class ServerFeaturesDto implements Built { + @BuiltValueField(wireName: r'configFile') + bool get configFile; + + @BuiltValueField(wireName: r'facialRecognition') + bool get facialRecognition; + + @BuiltValueField(wireName: r'map') + bool get map; + + @BuiltValueField(wireName: r'oauth') + bool get oauth; + + @BuiltValueField(wireName: r'oauthAutoLaunch') + bool get oauthAutoLaunch; + + @BuiltValueField(wireName: r'passwordLogin') + bool get passwordLogin; + + @BuiltValueField(wireName: r'reverseGeocoding') + bool get reverseGeocoding; + + @BuiltValueField(wireName: r'search') + bool get search; + + @BuiltValueField(wireName: r'sidecar') + bool get sidecar; + + @BuiltValueField(wireName: r'smartSearch') + bool get smartSearch; + + @BuiltValueField(wireName: r'trash') + bool get trash; + + ServerFeaturesDto._(); + + factory ServerFeaturesDto([void updates(ServerFeaturesDtoBuilder b)]) = _$ServerFeaturesDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerFeaturesDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerFeaturesDtoSerializer(); +} + +class _$ServerFeaturesDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerFeaturesDto, _$ServerFeaturesDto]; + + @override + final String wireName = r'ServerFeaturesDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerFeaturesDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'configFile'; + yield serializers.serialize( + object.configFile, + specifiedType: const FullType(bool), + ); + yield r'facialRecognition'; + yield serializers.serialize( + object.facialRecognition, + specifiedType: const FullType(bool), + ); + yield r'map'; + yield serializers.serialize( + object.map, + specifiedType: const FullType(bool), + ); + yield r'oauth'; + yield serializers.serialize( + object.oauth, + specifiedType: const FullType(bool), + ); + yield r'oauthAutoLaunch'; + yield serializers.serialize( + object.oauthAutoLaunch, + specifiedType: const FullType(bool), + ); + yield r'passwordLogin'; + yield serializers.serialize( + object.passwordLogin, + specifiedType: const FullType(bool), + ); + yield r'reverseGeocoding'; + yield serializers.serialize( + object.reverseGeocoding, + specifiedType: const FullType(bool), + ); + yield r'search'; + yield serializers.serialize( + object.search, + specifiedType: const FullType(bool), + ); + yield r'sidecar'; + yield serializers.serialize( + object.sidecar, + specifiedType: const FullType(bool), + ); + yield r'smartSearch'; + yield serializers.serialize( + object.smartSearch, + specifiedType: const FullType(bool), + ); + yield r'trash'; + yield serializers.serialize( + object.trash, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerFeaturesDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerFeaturesDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'configFile': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.configFile = valueDes; + break; + case r'facialRecognition': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.facialRecognition = valueDes; + break; + case r'map': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.map = valueDes; + break; + case r'oauth': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.oauth = valueDes; + break; + case r'oauthAutoLaunch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.oauthAutoLaunch = valueDes; + break; + case r'passwordLogin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.passwordLogin = valueDes; + break; + case r'reverseGeocoding': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.reverseGeocoding = valueDes; + break; + case r'search': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.search = valueDes; + break; + case r'sidecar': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.sidecar = valueDes; + break; + case r'smartSearch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.smartSearch = valueDes; + break; + case r'trash': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.trash = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerFeaturesDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerFeaturesDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_info_response_dto.dart b/mobile-v2/openapi/lib/src/model/server_info_response_dto.dart new file mode 100644 index 0000000000..800a4152ec --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_info_response_dto.dart @@ -0,0 +1,202 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_info_response_dto.g.dart'; + +/// ServerInfoResponseDto +/// +/// Properties: +/// * [diskAvailable] +/// * [diskAvailableRaw] +/// * [diskSize] +/// * [diskSizeRaw] +/// * [diskUsagePercentage] +/// * [diskUse] +/// * [diskUseRaw] +@BuiltValue() +abstract class ServerInfoResponseDto implements Built { + @BuiltValueField(wireName: r'diskAvailable') + String get diskAvailable; + + @BuiltValueField(wireName: r'diskAvailableRaw') + int get diskAvailableRaw; + + @BuiltValueField(wireName: r'diskSize') + String get diskSize; + + @BuiltValueField(wireName: r'diskSizeRaw') + int get diskSizeRaw; + + @BuiltValueField(wireName: r'diskUsagePercentage') + double get diskUsagePercentage; + + @BuiltValueField(wireName: r'diskUse') + String get diskUse; + + @BuiltValueField(wireName: r'diskUseRaw') + int get diskUseRaw; + + ServerInfoResponseDto._(); + + factory ServerInfoResponseDto([void updates(ServerInfoResponseDtoBuilder b)]) = _$ServerInfoResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerInfoResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerInfoResponseDtoSerializer(); +} + +class _$ServerInfoResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerInfoResponseDto, _$ServerInfoResponseDto]; + + @override + final String wireName = r'ServerInfoResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerInfoResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'diskAvailable'; + yield serializers.serialize( + object.diskAvailable, + specifiedType: const FullType(String), + ); + yield r'diskAvailableRaw'; + yield serializers.serialize( + object.diskAvailableRaw, + specifiedType: const FullType(int), + ); + yield r'diskSize'; + yield serializers.serialize( + object.diskSize, + specifiedType: const FullType(String), + ); + yield r'diskSizeRaw'; + yield serializers.serialize( + object.diskSizeRaw, + specifiedType: const FullType(int), + ); + yield r'diskUsagePercentage'; + yield serializers.serialize( + object.diskUsagePercentage, + specifiedType: const FullType(double), + ); + yield r'diskUse'; + yield serializers.serialize( + object.diskUse, + specifiedType: const FullType(String), + ); + yield r'diskUseRaw'; + yield serializers.serialize( + object.diskUseRaw, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerInfoResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerInfoResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'diskAvailable': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.diskAvailable = valueDes; + break; + case r'diskAvailableRaw': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.diskAvailableRaw = valueDes; + break; + case r'diskSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.diskSize = valueDes; + break; + case r'diskSizeRaw': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.diskSizeRaw = valueDes; + break; + case r'diskUsagePercentage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(double), + ) as double; + result.diskUsagePercentage = valueDes; + break; + case r'diskUse': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.diskUse = valueDes; + break; + case r'diskUseRaw': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.diskUseRaw = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerInfoResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerInfoResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_media_types_response_dto.dart b/mobile-v2/openapi/lib/src/model/server_media_types_response_dto.dart new file mode 100644 index 0000000000..289635c647 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_media_types_response_dto.dart @@ -0,0 +1,139 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_media_types_response_dto.g.dart'; + +/// ServerMediaTypesResponseDto +/// +/// Properties: +/// * [image] +/// * [sidecar] +/// * [video] +@BuiltValue() +abstract class ServerMediaTypesResponseDto implements Built { + @BuiltValueField(wireName: r'image') + BuiltList get image; + + @BuiltValueField(wireName: r'sidecar') + BuiltList get sidecar; + + @BuiltValueField(wireName: r'video') + BuiltList get video; + + ServerMediaTypesResponseDto._(); + + factory ServerMediaTypesResponseDto([void updates(ServerMediaTypesResponseDtoBuilder b)]) = _$ServerMediaTypesResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerMediaTypesResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerMediaTypesResponseDtoSerializer(); +} + +class _$ServerMediaTypesResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerMediaTypesResponseDto, _$ServerMediaTypesResponseDto]; + + @override + final String wireName = r'ServerMediaTypesResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerMediaTypesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'image'; + yield serializers.serialize( + object.image, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'sidecar'; + yield serializers.serialize( + object.sidecar, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'video'; + yield serializers.serialize( + object.video, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerMediaTypesResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerMediaTypesResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'image': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.image.replace(valueDes); + break; + case r'sidecar': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.sidecar.replace(valueDes); + break; + case r'video': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.video.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerMediaTypesResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerMediaTypesResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_ping_response.dart b/mobile-v2/openapi/lib/src/model/server_ping_response.dart new file mode 100644 index 0000000000..49027aebed --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_ping_response.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_ping_response.g.dart'; + +/// ServerPingResponse +/// +/// Properties: +/// * [res] +@BuiltValue() +abstract class ServerPingResponse implements Built { + @BuiltValueField(wireName: r'res') + String get res; + + ServerPingResponse._(); + + factory ServerPingResponse([void updates(ServerPingResponseBuilder b)]) = _$ServerPingResponse; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerPingResponseBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerPingResponseSerializer(); +} + +class _$ServerPingResponseSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerPingResponse, _$ServerPingResponse]; + + @override + final String wireName = r'ServerPingResponse'; + + Iterable _serializeProperties( + Serializers serializers, + ServerPingResponse object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'res'; + yield serializers.serialize( + object.res, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerPingResponse object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerPingResponseBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'res': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.res = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerPingResponse deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerPingResponseBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_stats_response_dto.dart b/mobile-v2/openapi/lib/src/model/server_stats_response_dto.dart new file mode 100644 index 0000000000..cc645e44e7 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_stats_response_dto.dart @@ -0,0 +1,160 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/usage_by_user_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_stats_response_dto.g.dart'; + +/// ServerStatsResponseDto +/// +/// Properties: +/// * [photos] +/// * [usage] +/// * [usageByUser] +/// * [videos] +@BuiltValue() +abstract class ServerStatsResponseDto implements Built { + @BuiltValueField(wireName: r'photos') + int get photos; + + @BuiltValueField(wireName: r'usage') + int get usage; + + @BuiltValueField(wireName: r'usageByUser') + BuiltList get usageByUser; + + @BuiltValueField(wireName: r'videos') + int get videos; + + ServerStatsResponseDto._(); + + factory ServerStatsResponseDto([void updates(ServerStatsResponseDtoBuilder b)]) = _$ServerStatsResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerStatsResponseDtoBuilder b) => b + ..photos = 0 + ..usage = 0 + ..usageByUser = ListBuilder() + ..videos = 0; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerStatsResponseDtoSerializer(); +} + +class _$ServerStatsResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerStatsResponseDto, _$ServerStatsResponseDto]; + + @override + final String wireName = r'ServerStatsResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'photos'; + yield serializers.serialize( + object.photos, + specifiedType: const FullType(int), + ); + yield r'usage'; + yield serializers.serialize( + object.usage, + specifiedType: const FullType(int), + ); + yield r'usageByUser'; + yield serializers.serialize( + object.usageByUser, + specifiedType: const FullType(BuiltList, [FullType(UsageByUserDto)]), + ); + yield r'videos'; + yield serializers.serialize( + object.videos, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerStatsResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerStatsResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'photos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.photos = valueDes; + break; + case r'usage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.usage = valueDes; + break; + case r'usageByUser': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(UsageByUserDto)]), + ) as BuiltList; + result.usageByUser.replace(valueDes); + break; + case r'videos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.videos = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerStatsResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerStatsResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_theme_dto.dart b/mobile-v2/openapi/lib/src/model/server_theme_dto.dart new file mode 100644 index 0000000000..168b132769 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_theme_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_theme_dto.g.dart'; + +/// ServerThemeDto +/// +/// Properties: +/// * [customCss] +@BuiltValue() +abstract class ServerThemeDto implements Built { + @BuiltValueField(wireName: r'customCss') + String get customCss; + + ServerThemeDto._(); + + factory ServerThemeDto([void updates(ServerThemeDtoBuilder b)]) = _$ServerThemeDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerThemeDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerThemeDtoSerializer(); +} + +class _$ServerThemeDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerThemeDto, _$ServerThemeDto]; + + @override + final String wireName = r'ServerThemeDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerThemeDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'customCss'; + yield serializers.serialize( + object.customCss, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerThemeDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerThemeDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'customCss': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.customCss = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerThemeDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerThemeDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/server_version_response_dto.dart b/mobile-v2/openapi/lib/src/model/server_version_response_dto.dart new file mode 100644 index 0000000000..224eca879f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/server_version_response_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'server_version_response_dto.g.dart'; + +/// ServerVersionResponseDto +/// +/// Properties: +/// * [major] +/// * [minor] +/// * [patch_] +@BuiltValue() +abstract class ServerVersionResponseDto implements Built { + @BuiltValueField(wireName: r'major') + int get major; + + @BuiltValueField(wireName: r'minor') + int get minor; + + @BuiltValueField(wireName: r'patch') + int get patch_; + + ServerVersionResponseDto._(); + + factory ServerVersionResponseDto([void updates(ServerVersionResponseDtoBuilder b)]) = _$ServerVersionResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ServerVersionResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ServerVersionResponseDtoSerializer(); +} + +class _$ServerVersionResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ServerVersionResponseDto, _$ServerVersionResponseDto]; + + @override + final String wireName = r'ServerVersionResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ServerVersionResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'major'; + yield serializers.serialize( + object.major, + specifiedType: const FullType(int), + ); + yield r'minor'; + yield serializers.serialize( + object.minor, + specifiedType: const FullType(int), + ); + yield r'patch'; + yield serializers.serialize( + object.patch_, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + ServerVersionResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ServerVersionResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'major': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.major = valueDes; + break; + case r'minor': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.minor = valueDes; + break; + case r'patch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.patch_ = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ServerVersionResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ServerVersionResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/session_response_dto.dart b/mobile-v2/openapi/lib/src/model/session_response_dto.dart new file mode 100644 index 0000000000..a2eb19df3e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/session_response_dto.dart @@ -0,0 +1,186 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'session_response_dto.g.dart'; + +/// SessionResponseDto +/// +/// Properties: +/// * [createdAt] +/// * [current] +/// * [deviceOS] +/// * [deviceType] +/// * [id] +/// * [updatedAt] +@BuiltValue() +abstract class SessionResponseDto implements Built { + @BuiltValueField(wireName: r'createdAt') + String get createdAt; + + @BuiltValueField(wireName: r'current') + bool get current; + + @BuiltValueField(wireName: r'deviceOS') + String get deviceOS; + + @BuiltValueField(wireName: r'deviceType') + String get deviceType; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'updatedAt') + String get updatedAt; + + SessionResponseDto._(); + + factory SessionResponseDto([void updates(SessionResponseDtoBuilder b)]) = _$SessionResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SessionResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SessionResponseDtoSerializer(); +} + +class _$SessionResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SessionResponseDto, _$SessionResponseDto]; + + @override + final String wireName = r'SessionResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SessionResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(String), + ); + yield r'current'; + yield serializers.serialize( + object.current, + specifiedType: const FullType(bool), + ); + yield r'deviceOS'; + yield serializers.serialize( + object.deviceOS, + specifiedType: const FullType(String), + ); + yield r'deviceType'; + yield serializers.serialize( + object.deviceType, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SessionResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SessionResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.createdAt = valueDes; + break; + case r'current': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.current = valueDes; + break; + case r'deviceOS': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceOS = valueDes; + break; + case r'deviceType': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceType = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SessionResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SessionResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/shared_link_create_dto.dart b/mobile-v2/openapi/lib/src/model/shared_link_create_dto.dart new file mode 100644 index 0000000000..36cc9de558 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/shared_link_create_dto.dart @@ -0,0 +1,256 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/shared_link_type.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'shared_link_create_dto.g.dart'; + +/// SharedLinkCreateDto +/// +/// Properties: +/// * [albumId] +/// * [allowDownload] +/// * [allowUpload] +/// * [assetIds] +/// * [description] +/// * [expiresAt] +/// * [password] +/// * [showMetadata] +/// * [type] +@BuiltValue() +abstract class SharedLinkCreateDto implements Built { + @BuiltValueField(wireName: r'albumId') + String? get albumId; + + @BuiltValueField(wireName: r'allowDownload') + bool? get allowDownload; + + @BuiltValueField(wireName: r'allowUpload') + bool? get allowUpload; + + @BuiltValueField(wireName: r'assetIds') + BuiltList? get assetIds; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'expiresAt') + DateTime? get expiresAt; + + @BuiltValueField(wireName: r'password') + String? get password; + + @BuiltValueField(wireName: r'showMetadata') + bool? get showMetadata; + + @BuiltValueField(wireName: r'type') + SharedLinkType get type; + // enum typeEnum { ALBUM, INDIVIDUAL, }; + + SharedLinkCreateDto._(); + + factory SharedLinkCreateDto([void updates(SharedLinkCreateDtoBuilder b)]) = _$SharedLinkCreateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SharedLinkCreateDtoBuilder b) => b + ..allowDownload = true + ..showMetadata = true; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SharedLinkCreateDtoSerializer(); +} + +class _$SharedLinkCreateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SharedLinkCreateDto, _$SharedLinkCreateDto]; + + @override + final String wireName = r'SharedLinkCreateDto'; + + Iterable _serializeProperties( + Serializers serializers, + SharedLinkCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.albumId != null) { + yield r'albumId'; + yield serializers.serialize( + object.albumId, + specifiedType: const FullType(String), + ); + } + if (object.allowDownload != null) { + yield r'allowDownload'; + yield serializers.serialize( + object.allowDownload, + specifiedType: const FullType(bool), + ); + } + if (object.allowUpload != null) { + yield r'allowUpload'; + yield serializers.serialize( + object.allowUpload, + specifiedType: const FullType(bool), + ); + } + if (object.assetIds != null) { + yield r'assetIds'; + yield serializers.serialize( + object.assetIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.expiresAt != null) { + yield r'expiresAt'; + yield serializers.serialize( + object.expiresAt, + specifiedType: const FullType.nullable(DateTime), + ); + } + if (object.password != null) { + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + if (object.showMetadata != null) { + yield r'showMetadata'; + yield serializers.serialize( + object.showMetadata, + specifiedType: const FullType(bool), + ); + } + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(SharedLinkType), + ); + } + + @override + Object serialize( + Serializers serializers, + SharedLinkCreateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SharedLinkCreateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumId = valueDes; + break; + case r'allowDownload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowDownload = valueDes; + break; + case r'allowUpload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowUpload = valueDes; + break; + case r'assetIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.assetIds.replace(valueDes); + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'expiresAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.expiresAt = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + case r'showMetadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.showMetadata = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SharedLinkType), + ) as SharedLinkType; + result.type = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SharedLinkCreateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SharedLinkCreateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/shared_link_edit_dto.dart b/mobile-v2/openapi/lib/src/model/shared_link_edit_dto.dart new file mode 100644 index 0000000000..7a657bddbf --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/shared_link_edit_dto.dart @@ -0,0 +1,218 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'shared_link_edit_dto.g.dart'; + +/// SharedLinkEditDto +/// +/// Properties: +/// * [allowDownload] +/// * [allowUpload] +/// * [changeExpiryTime] - Few clients cannot send null to set the expiryTime to never. Setting this flag and not sending expiryAt is considered as null instead. Clients that can send null values can ignore this. +/// * [description] +/// * [expiresAt] +/// * [password] +/// * [showMetadata] +@BuiltValue() +abstract class SharedLinkEditDto implements Built { + @BuiltValueField(wireName: r'allowDownload') + bool? get allowDownload; + + @BuiltValueField(wireName: r'allowUpload') + bool? get allowUpload; + + /// Few clients cannot send null to set the expiryTime to never. Setting this flag and not sending expiryAt is considered as null instead. Clients that can send null values can ignore this. + @BuiltValueField(wireName: r'changeExpiryTime') + bool? get changeExpiryTime; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'expiresAt') + DateTime? get expiresAt; + + @BuiltValueField(wireName: r'password') + String? get password; + + @BuiltValueField(wireName: r'showMetadata') + bool? get showMetadata; + + SharedLinkEditDto._(); + + factory SharedLinkEditDto([void updates(SharedLinkEditDtoBuilder b)]) = _$SharedLinkEditDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SharedLinkEditDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SharedLinkEditDtoSerializer(); +} + +class _$SharedLinkEditDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SharedLinkEditDto, _$SharedLinkEditDto]; + + @override + final String wireName = r'SharedLinkEditDto'; + + Iterable _serializeProperties( + Serializers serializers, + SharedLinkEditDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.allowDownload != null) { + yield r'allowDownload'; + yield serializers.serialize( + object.allowDownload, + specifiedType: const FullType(bool), + ); + } + if (object.allowUpload != null) { + yield r'allowUpload'; + yield serializers.serialize( + object.allowUpload, + specifiedType: const FullType(bool), + ); + } + if (object.changeExpiryTime != null) { + yield r'changeExpiryTime'; + yield serializers.serialize( + object.changeExpiryTime, + specifiedType: const FullType(bool), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.expiresAt != null) { + yield r'expiresAt'; + yield serializers.serialize( + object.expiresAt, + specifiedType: const FullType.nullable(DateTime), + ); + } + if (object.password != null) { + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + if (object.showMetadata != null) { + yield r'showMetadata'; + yield serializers.serialize( + object.showMetadata, + specifiedType: const FullType(bool), + ); + } + } + + @override + Object serialize( + Serializers serializers, + SharedLinkEditDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SharedLinkEditDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'allowDownload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowDownload = valueDes; + break; + case r'allowUpload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowUpload = valueDes; + break; + case r'changeExpiryTime': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.changeExpiryTime = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'expiresAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.expiresAt = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + case r'showMetadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.showMetadata = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SharedLinkEditDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SharedLinkEditDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/shared_link_response_dto.dart b/mobile-v2/openapi/lib/src/model/shared_link_response_dto.dart new file mode 100644 index 0000000000..fe1ee04817 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/shared_link_response_dto.dart @@ -0,0 +1,327 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/shared_link_type.dart'; +import 'package:openapi/src/model/album_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'shared_link_response_dto.g.dart'; + +/// SharedLinkResponseDto +/// +/// Properties: +/// * [album] +/// * [allowDownload] +/// * [allowUpload] +/// * [assets] +/// * [createdAt] +/// * [description] +/// * [expiresAt] +/// * [id] +/// * [key] +/// * [password] +/// * [showMetadata] +/// * [token] +/// * [type] +/// * [userId] +@BuiltValue() +abstract class SharedLinkResponseDto implements Built { + @BuiltValueField(wireName: r'album') + AlbumResponseDto? get album; + + @BuiltValueField(wireName: r'allowDownload') + bool get allowDownload; + + @BuiltValueField(wireName: r'allowUpload') + bool get allowUpload; + + @BuiltValueField(wireName: r'assets') + BuiltList get assets; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'expiresAt') + DateTime? get expiresAt; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'key') + String get key; + + @BuiltValueField(wireName: r'password') + String? get password; + + @BuiltValueField(wireName: r'showMetadata') + bool get showMetadata; + + @BuiltValueField(wireName: r'token') + String? get token; + + @BuiltValueField(wireName: r'type') + SharedLinkType get type; + // enum typeEnum { ALBUM, INDIVIDUAL, }; + + @BuiltValueField(wireName: r'userId') + String get userId; + + SharedLinkResponseDto._(); + + factory SharedLinkResponseDto([void updates(SharedLinkResponseDtoBuilder b)]) = _$SharedLinkResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SharedLinkResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SharedLinkResponseDtoSerializer(); +} + +class _$SharedLinkResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SharedLinkResponseDto, _$SharedLinkResponseDto]; + + @override + final String wireName = r'SharedLinkResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SharedLinkResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.album != null) { + yield r'album'; + yield serializers.serialize( + object.album, + specifiedType: const FullType(AlbumResponseDto), + ); + } + yield r'allowDownload'; + yield serializers.serialize( + object.allowDownload, + specifiedType: const FullType(bool), + ); + yield r'allowUpload'; + yield serializers.serialize( + object.allowUpload, + specifiedType: const FullType(bool), + ); + yield r'assets'; + yield serializers.serialize( + object.assets, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'description'; + yield object.description == null ? null : serializers.serialize( + object.description, + specifiedType: const FullType.nullable(String), + ); + yield r'expiresAt'; + yield object.expiresAt == null ? null : serializers.serialize( + object.expiresAt, + specifiedType: const FullType.nullable(DateTime), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'key'; + yield serializers.serialize( + object.key, + specifiedType: const FullType(String), + ); + yield r'password'; + yield object.password == null ? null : serializers.serialize( + object.password, + specifiedType: const FullType.nullable(String), + ); + yield r'showMetadata'; + yield serializers.serialize( + object.showMetadata, + specifiedType: const FullType(bool), + ); + if (object.token != null) { + yield r'token'; + yield serializers.serialize( + object.token, + specifiedType: const FullType.nullable(String), + ); + } + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(SharedLinkType), + ); + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SharedLinkResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SharedLinkResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'album': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AlbumResponseDto), + ) as AlbumResponseDto; + result.album.replace(valueDes); + break; + case r'allowDownload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowDownload = valueDes; + break; + case r'allowUpload': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.allowUpload = valueDes; + break; + case r'assets': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]), + ) as BuiltList; + result.assets.replace(valueDes); + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.description = valueDes; + break; + case r'expiresAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.expiresAt = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'key': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.key = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.password = valueDes; + break; + case r'showMetadata': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.showMetadata = valueDes; + break; + case r'token': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.token = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SharedLinkType), + ) as SharedLinkType; + result.type = valueDes; + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SharedLinkResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SharedLinkResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/shared_link_type.dart b/mobile-v2/openapi/lib/src/model/shared_link_type.dart new file mode 100644 index 0000000000..d4c1c8c61c --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/shared_link_type.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'shared_link_type.g.dart'; + +class SharedLinkType extends EnumClass { + + @BuiltValueEnumConst(wireName: r'ALBUM') + static const SharedLinkType ALBUM = _$ALBUM; + @BuiltValueEnumConst(wireName: r'INDIVIDUAL') + static const SharedLinkType INDIVIDUAL = _$INDIVIDUAL; + + static Serializer get serializer => _$sharedLinkTypeSerializer; + + const SharedLinkType._(String name): super(name); + + static BuiltSet get values => _$values; + static SharedLinkType valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class SharedLinkTypeMixin = Object with _$SharedLinkTypeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/sign_up_dto.dart b/mobile-v2/openapi/lib/src/model/sign_up_dto.dart new file mode 100644 index 0000000000..88061a2a7c --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/sign_up_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'sign_up_dto.g.dart'; + +/// SignUpDto +/// +/// Properties: +/// * [email] +/// * [name] +/// * [password] +@BuiltValue() +abstract class SignUpDto implements Built { + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'password') + String get password; + + SignUpDto._(); + + factory SignUpDto([void updates(SignUpDtoBuilder b)]) = _$SignUpDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SignUpDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SignUpDtoSerializer(); +} + +class _$SignUpDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SignUpDto, _$SignUpDto]; + + @override + final String wireName = r'SignUpDto'; + + Iterable _serializeProperties( + Serializers serializers, + SignUpDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SignUpDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SignUpDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SignUpDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SignUpDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/smart_info_response_dto.dart b/mobile-v2/openapi/lib/src/model/smart_info_response_dto.dart new file mode 100644 index 0000000000..b771e3bdbd --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/smart_info_response_dto.dart @@ -0,0 +1,129 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'smart_info_response_dto.g.dart'; + +/// SmartInfoResponseDto +/// +/// Properties: +/// * [objects] +/// * [tags] +@BuiltValue() +abstract class SmartInfoResponseDto implements Built { + @BuiltValueField(wireName: r'objects') + BuiltList? get objects; + + @BuiltValueField(wireName: r'tags') + BuiltList? get tags; + + SmartInfoResponseDto._(); + + factory SmartInfoResponseDto([void updates(SmartInfoResponseDtoBuilder b)]) = _$SmartInfoResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SmartInfoResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SmartInfoResponseDtoSerializer(); +} + +class _$SmartInfoResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SmartInfoResponseDto, _$SmartInfoResponseDto]; + + @override + final String wireName = r'SmartInfoResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + SmartInfoResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.objects != null) { + yield r'objects'; + yield serializers.serialize( + object.objects, + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ); + } + if (object.tags != null) { + yield r'tags'; + yield serializers.serialize( + object.tags, + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + SmartInfoResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SmartInfoResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'objects': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ) as BuiltList?; + if (valueDes == null) continue; + result.objects.replace(valueDes); + break; + case r'tags': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(BuiltList, [FullType(String)]), + ) as BuiltList?; + if (valueDes == null) continue; + result.tags.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SmartInfoResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SmartInfoResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/smart_search_dto.dart b/mobile-v2/openapi/lib/src/model/smart_search_dto.dart new file mode 100644 index 0000000000..db70b03bf5 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/smart_search_dto.dart @@ -0,0 +1,686 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_type_enum.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'smart_search_dto.g.dart'; + +/// SmartSearchDto +/// +/// Properties: +/// * [city] +/// * [country] +/// * [createdAfter] +/// * [createdBefore] +/// * [deviceId] +/// * [isArchived] +/// * [isEncoded] +/// * [isExternal] +/// * [isFavorite] +/// * [isMotion] +/// * [isNotInAlbum] +/// * [isOffline] +/// * [isReadOnly] +/// * [isVisible] +/// * [lensModel] +/// * [libraryId] +/// * [make] +/// * [model] +/// * [page] +/// * [personIds] +/// * [query] +/// * [size] +/// * [state] +/// * [takenAfter] +/// * [takenBefore] +/// * [trashedAfter] +/// * [trashedBefore] +/// * [type] +/// * [updatedAfter] +/// * [updatedBefore] +/// * [withArchived] +/// * [withDeleted] +/// * [withExif] +@BuiltValue() +abstract class SmartSearchDto implements Built { + @BuiltValueField(wireName: r'city') + String? get city; + + @BuiltValueField(wireName: r'country') + String? get country; + + @BuiltValueField(wireName: r'createdAfter') + DateTime? get createdAfter; + + @BuiltValueField(wireName: r'createdBefore') + DateTime? get createdBefore; + + @BuiltValueField(wireName: r'deviceId') + String? get deviceId; + + @BuiltValueField(wireName: r'isArchived') + bool? get isArchived; + + @BuiltValueField(wireName: r'isEncoded') + bool? get isEncoded; + + @BuiltValueField(wireName: r'isExternal') + bool? get isExternal; + + @BuiltValueField(wireName: r'isFavorite') + bool? get isFavorite; + + @BuiltValueField(wireName: r'isMotion') + bool? get isMotion; + + @BuiltValueField(wireName: r'isNotInAlbum') + bool? get isNotInAlbum; + + @BuiltValueField(wireName: r'isOffline') + bool? get isOffline; + + @BuiltValueField(wireName: r'isReadOnly') + bool? get isReadOnly; + + @BuiltValueField(wireName: r'isVisible') + bool? get isVisible; + + @BuiltValueField(wireName: r'lensModel') + String? get lensModel; + + @BuiltValueField(wireName: r'libraryId') + String? get libraryId; + + @BuiltValueField(wireName: r'make') + String? get make; + + @BuiltValueField(wireName: r'model') + String? get model; + + @BuiltValueField(wireName: r'page') + num? get page; + + @BuiltValueField(wireName: r'personIds') + BuiltList? get personIds; + + @BuiltValueField(wireName: r'query') + String get query; + + @BuiltValueField(wireName: r'size') + num? get size; + + @BuiltValueField(wireName: r'state') + String? get state; + + @BuiltValueField(wireName: r'takenAfter') + DateTime? get takenAfter; + + @BuiltValueField(wireName: r'takenBefore') + DateTime? get takenBefore; + + @BuiltValueField(wireName: r'trashedAfter') + DateTime? get trashedAfter; + + @BuiltValueField(wireName: r'trashedBefore') + DateTime? get trashedBefore; + + @BuiltValueField(wireName: r'type') + AssetTypeEnum? get type; + // enum typeEnum { IMAGE, VIDEO, AUDIO, OTHER, }; + + @BuiltValueField(wireName: r'updatedAfter') + DateTime? get updatedAfter; + + @BuiltValueField(wireName: r'updatedBefore') + DateTime? get updatedBefore; + + @BuiltValueField(wireName: r'withArchived') + bool? get withArchived; + + @BuiltValueField(wireName: r'withDeleted') + bool? get withDeleted; + + @BuiltValueField(wireName: r'withExif') + bool? get withExif; + + SmartSearchDto._(); + + factory SmartSearchDto([void updates(SmartSearchDtoBuilder b)]) = _$SmartSearchDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SmartSearchDtoBuilder b) => b + ..withArchived = false; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SmartSearchDtoSerializer(); +} + +class _$SmartSearchDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SmartSearchDto, _$SmartSearchDto]; + + @override + final String wireName = r'SmartSearchDto'; + + Iterable _serializeProperties( + Serializers serializers, + SmartSearchDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.city != null) { + yield r'city'; + yield serializers.serialize( + object.city, + specifiedType: const FullType(String), + ); + } + if (object.country != null) { + yield r'country'; + yield serializers.serialize( + object.country, + specifiedType: const FullType(String), + ); + } + if (object.createdAfter != null) { + yield r'createdAfter'; + yield serializers.serialize( + object.createdAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.createdBefore != null) { + yield r'createdBefore'; + yield serializers.serialize( + object.createdBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.deviceId != null) { + yield r'deviceId'; + yield serializers.serialize( + object.deviceId, + specifiedType: const FullType(String), + ); + } + if (object.isArchived != null) { + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + } + if (object.isEncoded != null) { + yield r'isEncoded'; + yield serializers.serialize( + object.isEncoded, + specifiedType: const FullType(bool), + ); + } + if (object.isExternal != null) { + yield r'isExternal'; + yield serializers.serialize( + object.isExternal, + specifiedType: const FullType(bool), + ); + } + if (object.isFavorite != null) { + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + } + if (object.isMotion != null) { + yield r'isMotion'; + yield serializers.serialize( + object.isMotion, + specifiedType: const FullType(bool), + ); + } + if (object.isNotInAlbum != null) { + yield r'isNotInAlbum'; + yield serializers.serialize( + object.isNotInAlbum, + specifiedType: const FullType(bool), + ); + } + if (object.isOffline != null) { + yield r'isOffline'; + yield serializers.serialize( + object.isOffline, + specifiedType: const FullType(bool), + ); + } + if (object.isReadOnly != null) { + yield r'isReadOnly'; + yield serializers.serialize( + object.isReadOnly, + specifiedType: const FullType(bool), + ); + } + if (object.isVisible != null) { + yield r'isVisible'; + yield serializers.serialize( + object.isVisible, + specifiedType: const FullType(bool), + ); + } + if (object.lensModel != null) { + yield r'lensModel'; + yield serializers.serialize( + object.lensModel, + specifiedType: const FullType(String), + ); + } + if (object.libraryId != null) { + yield r'libraryId'; + yield serializers.serialize( + object.libraryId, + specifiedType: const FullType(String), + ); + } + if (object.make != null) { + yield r'make'; + yield serializers.serialize( + object.make, + specifiedType: const FullType(String), + ); + } + if (object.model != null) { + yield r'model'; + yield serializers.serialize( + object.model, + specifiedType: const FullType(String), + ); + } + if (object.page != null) { + yield r'page'; + yield serializers.serialize( + object.page, + specifiedType: const FullType(num), + ); + } + if (object.personIds != null) { + yield r'personIds'; + yield serializers.serialize( + object.personIds, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + yield r'query'; + yield serializers.serialize( + object.query, + specifiedType: const FullType(String), + ); + if (object.size != null) { + yield r'size'; + yield serializers.serialize( + object.size, + specifiedType: const FullType(num), + ); + } + if (object.state != null) { + yield r'state'; + yield serializers.serialize( + object.state, + specifiedType: const FullType(String), + ); + } + if (object.takenAfter != null) { + yield r'takenAfter'; + yield serializers.serialize( + object.takenAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.takenBefore != null) { + yield r'takenBefore'; + yield serializers.serialize( + object.takenBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.trashedAfter != null) { + yield r'trashedAfter'; + yield serializers.serialize( + object.trashedAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.trashedBefore != null) { + yield r'trashedBefore'; + yield serializers.serialize( + object.trashedBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.type != null) { + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(AssetTypeEnum), + ); + } + if (object.updatedAfter != null) { + yield r'updatedAfter'; + yield serializers.serialize( + object.updatedAfter, + specifiedType: const FullType(DateTime), + ); + } + if (object.updatedBefore != null) { + yield r'updatedBefore'; + yield serializers.serialize( + object.updatedBefore, + specifiedType: const FullType(DateTime), + ); + } + if (object.withArchived != null) { + yield r'withArchived'; + yield serializers.serialize( + object.withArchived, + specifiedType: const FullType(bool), + ); + } + if (object.withDeleted != null) { + yield r'withDeleted'; + yield serializers.serialize( + object.withDeleted, + specifiedType: const FullType(bool), + ); + } + if (object.withExif != null) { + yield r'withExif'; + yield serializers.serialize( + object.withExif, + specifiedType: const FullType(bool), + ); + } + } + + @override + Object serialize( + Serializers serializers, + SmartSearchDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SmartSearchDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'city': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.city = valueDes; + break; + case r'country': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.country = valueDes; + break; + case r'createdAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAfter = valueDes; + break; + case r'createdBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdBefore = valueDes; + break; + case r'deviceId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.deviceId = valueDes; + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isEncoded': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isEncoded = valueDes; + break; + case r'isExternal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isExternal = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'isMotion': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isMotion = valueDes; + break; + case r'isNotInAlbum': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isNotInAlbum = valueDes; + break; + case r'isOffline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isOffline = valueDes; + break; + case r'isReadOnly': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isReadOnly = valueDes; + break; + case r'isVisible': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isVisible = valueDes; + break; + case r'lensModel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.lensModel = valueDes; + break; + case r'libraryId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.libraryId = valueDes; + break; + case r'make': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.make = valueDes; + break; + case r'model': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.model = valueDes; + break; + case r'page': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.page = valueDes; + break; + case r'personIds': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.personIds.replace(valueDes); + break; + case r'query': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.query = valueDes; + break; + case r'size': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.size = valueDes; + break; + case r'state': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.state = valueDes; + break; + case r'takenAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.takenAfter = valueDes; + break; + case r'takenBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.takenBefore = valueDes; + break; + case r'trashedAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.trashedAfter = valueDes; + break; + case r'trashedBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.trashedBefore = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetTypeEnum), + ) as AssetTypeEnum; + result.type = valueDes; + break; + case r'updatedAfter': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAfter = valueDes; + break; + case r'updatedBefore': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedBefore = valueDes; + break; + case r'withArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withArchived = valueDes; + break; + case r'withDeleted': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withDeleted = valueDes; + break; + case r'withExif': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.withExif = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SmartSearchDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SmartSearchDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_dto.dart new file mode 100644 index 0000000000..2d5fc268fb --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_dto.dart @@ -0,0 +1,362 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/system_config_new_version_check_dto.dart'; +import 'package:openapi/src/model/system_config_image_dto.dart'; +import 'package:openapi/src/model/system_config_o_auth_dto.dart'; +import 'package:openapi/src/model/system_config_library_dto.dart'; +import 'package:openapi/src/model/system_config_theme_dto.dart'; +import 'package:openapi/src/model/system_config_trash_dto.dart'; +import 'package:openapi/src/model/system_config_password_login_dto.dart'; +import 'package:openapi/src/model/system_config_machine_learning_dto.dart'; +import 'package:openapi/src/model/system_config_reverse_geocoding_dto.dart'; +import 'package:openapi/src/model/system_config_logging_dto.dart'; +import 'package:openapi/src/model/system_config_map_dto.dart'; +import 'package:openapi/src/model/system_config_user_dto.dart'; +import 'package:openapi/src/model/system_config_job_dto.dart'; +import 'package:openapi/src/model/system_config_server_dto.dart'; +import 'package:openapi/src/model/system_config_f_fmpeg_dto.dart'; +import 'package:openapi/src/model/system_config_storage_template_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_dto.g.dart'; + +/// SystemConfigDto +/// +/// Properties: +/// * [ffmpeg] +/// * [image] +/// * [job] +/// * [library_] +/// * [logging] +/// * [machineLearning] +/// * [map] +/// * [newVersionCheck] +/// * [oauth] +/// * [passwordLogin] +/// * [reverseGeocoding] +/// * [server] +/// * [storageTemplate] +/// * [theme] +/// * [trash] +/// * [user] +@BuiltValue() +abstract class SystemConfigDto implements Built { + @BuiltValueField(wireName: r'ffmpeg') + SystemConfigFFmpegDto get ffmpeg; + + @BuiltValueField(wireName: r'image') + SystemConfigImageDto get image; + + @BuiltValueField(wireName: r'job') + SystemConfigJobDto get job; + + @BuiltValueField(wireName: r'library') + SystemConfigLibraryDto get library_; + + @BuiltValueField(wireName: r'logging') + SystemConfigLoggingDto get logging; + + @BuiltValueField(wireName: r'machineLearning') + SystemConfigMachineLearningDto get machineLearning; + + @BuiltValueField(wireName: r'map') + SystemConfigMapDto get map; + + @BuiltValueField(wireName: r'newVersionCheck') + SystemConfigNewVersionCheckDto get newVersionCheck; + + @BuiltValueField(wireName: r'oauth') + SystemConfigOAuthDto get oauth; + + @BuiltValueField(wireName: r'passwordLogin') + SystemConfigPasswordLoginDto get passwordLogin; + + @BuiltValueField(wireName: r'reverseGeocoding') + SystemConfigReverseGeocodingDto get reverseGeocoding; + + @BuiltValueField(wireName: r'server') + SystemConfigServerDto get server; + + @BuiltValueField(wireName: r'storageTemplate') + SystemConfigStorageTemplateDto get storageTemplate; + + @BuiltValueField(wireName: r'theme') + SystemConfigThemeDto get theme; + + @BuiltValueField(wireName: r'trash') + SystemConfigTrashDto get trash; + + @BuiltValueField(wireName: r'user') + SystemConfigUserDto get user; + + SystemConfigDto._(); + + factory SystemConfigDto([void updates(SystemConfigDtoBuilder b)]) = _$SystemConfigDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigDtoSerializer(); +} + +class _$SystemConfigDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigDto, _$SystemConfigDto]; + + @override + final String wireName = r'SystemConfigDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'ffmpeg'; + yield serializers.serialize( + object.ffmpeg, + specifiedType: const FullType(SystemConfigFFmpegDto), + ); + yield r'image'; + yield serializers.serialize( + object.image, + specifiedType: const FullType(SystemConfigImageDto), + ); + yield r'job'; + yield serializers.serialize( + object.job, + specifiedType: const FullType(SystemConfigJobDto), + ); + yield r'library'; + yield serializers.serialize( + object.library_, + specifiedType: const FullType(SystemConfigLibraryDto), + ); + yield r'logging'; + yield serializers.serialize( + object.logging, + specifiedType: const FullType(SystemConfigLoggingDto), + ); + yield r'machineLearning'; + yield serializers.serialize( + object.machineLearning, + specifiedType: const FullType(SystemConfigMachineLearningDto), + ); + yield r'map'; + yield serializers.serialize( + object.map, + specifiedType: const FullType(SystemConfigMapDto), + ); + yield r'newVersionCheck'; + yield serializers.serialize( + object.newVersionCheck, + specifiedType: const FullType(SystemConfigNewVersionCheckDto), + ); + yield r'oauth'; + yield serializers.serialize( + object.oauth, + specifiedType: const FullType(SystemConfigOAuthDto), + ); + yield r'passwordLogin'; + yield serializers.serialize( + object.passwordLogin, + specifiedType: const FullType(SystemConfigPasswordLoginDto), + ); + yield r'reverseGeocoding'; + yield serializers.serialize( + object.reverseGeocoding, + specifiedType: const FullType(SystemConfigReverseGeocodingDto), + ); + yield r'server'; + yield serializers.serialize( + object.server, + specifiedType: const FullType(SystemConfigServerDto), + ); + yield r'storageTemplate'; + yield serializers.serialize( + object.storageTemplate, + specifiedType: const FullType(SystemConfigStorageTemplateDto), + ); + yield r'theme'; + yield serializers.serialize( + object.theme, + specifiedType: const FullType(SystemConfigThemeDto), + ); + yield r'trash'; + yield serializers.serialize( + object.trash, + specifiedType: const FullType(SystemConfigTrashDto), + ); + yield r'user'; + yield serializers.serialize( + object.user, + specifiedType: const FullType(SystemConfigUserDto), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'ffmpeg': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigFFmpegDto), + ) as SystemConfigFFmpegDto; + result.ffmpeg.replace(valueDes); + break; + case r'image': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigImageDto), + ) as SystemConfigImageDto; + result.image.replace(valueDes); + break; + case r'job': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigJobDto), + ) as SystemConfigJobDto; + result.job.replace(valueDes); + break; + case r'library': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigLibraryDto), + ) as SystemConfigLibraryDto; + result.library_.replace(valueDes); + break; + case r'logging': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigLoggingDto), + ) as SystemConfigLoggingDto; + result.logging.replace(valueDes); + break; + case r'machineLearning': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigMachineLearningDto), + ) as SystemConfigMachineLearningDto; + result.machineLearning.replace(valueDes); + break; + case r'map': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigMapDto), + ) as SystemConfigMapDto; + result.map.replace(valueDes); + break; + case r'newVersionCheck': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigNewVersionCheckDto), + ) as SystemConfigNewVersionCheckDto; + result.newVersionCheck.replace(valueDes); + break; + case r'oauth': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigOAuthDto), + ) as SystemConfigOAuthDto; + result.oauth.replace(valueDes); + break; + case r'passwordLogin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigPasswordLoginDto), + ) as SystemConfigPasswordLoginDto; + result.passwordLogin.replace(valueDes); + break; + case r'reverseGeocoding': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigReverseGeocodingDto), + ) as SystemConfigReverseGeocodingDto; + result.reverseGeocoding.replace(valueDes); + break; + case r'server': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigServerDto), + ) as SystemConfigServerDto; + result.server.replace(valueDes); + break; + case r'storageTemplate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigStorageTemplateDto), + ) as SystemConfigStorageTemplateDto; + result.storageTemplate.replace(valueDes); + break; + case r'theme': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigThemeDto), + ) as SystemConfigThemeDto; + result.theme.replace(valueDes); + break; + case r'trash': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigTrashDto), + ) as SystemConfigTrashDto; + result.trash.replace(valueDes); + break; + case r'user': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigUserDto), + ) as SystemConfigUserDto; + result.user.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_f_fmpeg_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_f_fmpeg_dto.dart new file mode 100644 index 0000000000..1b65dd5f80 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_f_fmpeg_dto.dart @@ -0,0 +1,423 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/audio_codec.dart'; +import 'package:openapi/src/model/transcode_hw_accel.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/video_codec.dart'; +import 'package:openapi/src/model/transcode_policy.dart'; +import 'package:openapi/src/model/cq_mode.dart'; +import 'package:openapi/src/model/tone_mapping.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_f_fmpeg_dto.g.dart'; + +/// SystemConfigFFmpegDto +/// +/// Properties: +/// * [accel] +/// * [acceptedAudioCodecs] +/// * [acceptedVideoCodecs] +/// * [bframes] +/// * [cqMode] +/// * [crf] +/// * [gopSize] +/// * [maxBitrate] +/// * [npl] +/// * [preferredHwDevice] +/// * [preset] +/// * [refs] +/// * [targetAudioCodec] +/// * [targetResolution] +/// * [targetVideoCodec] +/// * [temporalAQ] +/// * [threads] +/// * [tonemap] +/// * [transcode] +/// * [twoPass] +@BuiltValue() +abstract class SystemConfigFFmpegDto implements Built { + @BuiltValueField(wireName: r'accel') + TranscodeHWAccel get accel; + // enum accelEnum { nvenc, qsv, vaapi, rkmpp, disabled, }; + + @BuiltValueField(wireName: r'acceptedAudioCodecs') + BuiltList get acceptedAudioCodecs; + + @BuiltValueField(wireName: r'acceptedVideoCodecs') + BuiltList get acceptedVideoCodecs; + + @BuiltValueField(wireName: r'bframes') + int get bframes; + + @BuiltValueField(wireName: r'cqMode') + CQMode get cqMode; + // enum cqModeEnum { auto, cqp, icq, }; + + @BuiltValueField(wireName: r'crf') + int get crf; + + @BuiltValueField(wireName: r'gopSize') + int get gopSize; + + @BuiltValueField(wireName: r'maxBitrate') + String get maxBitrate; + + @BuiltValueField(wireName: r'npl') + int get npl; + + @BuiltValueField(wireName: r'preferredHwDevice') + String get preferredHwDevice; + + @BuiltValueField(wireName: r'preset') + String get preset; + + @BuiltValueField(wireName: r'refs') + int get refs; + + @BuiltValueField(wireName: r'targetAudioCodec') + AudioCodec get targetAudioCodec; + // enum targetAudioCodecEnum { mp3, aac, libopus, }; + + @BuiltValueField(wireName: r'targetResolution') + String get targetResolution; + + @BuiltValueField(wireName: r'targetVideoCodec') + VideoCodec get targetVideoCodec; + // enum targetVideoCodecEnum { h264, hevc, vp9, av1, }; + + @BuiltValueField(wireName: r'temporalAQ') + bool get temporalAQ; + + @BuiltValueField(wireName: r'threads') + int get threads; + + @BuiltValueField(wireName: r'tonemap') + ToneMapping get tonemap; + // enum tonemapEnum { hable, mobius, reinhard, disabled, }; + + @BuiltValueField(wireName: r'transcode') + TranscodePolicy get transcode; + // enum transcodeEnum { all, optimal, bitrate, required, disabled, }; + + @BuiltValueField(wireName: r'twoPass') + bool get twoPass; + + SystemConfigFFmpegDto._(); + + factory SystemConfigFFmpegDto([void updates(SystemConfigFFmpegDtoBuilder b)]) = _$SystemConfigFFmpegDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigFFmpegDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigFFmpegDtoSerializer(); +} + +class _$SystemConfigFFmpegDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigFFmpegDto, _$SystemConfigFFmpegDto]; + + @override + final String wireName = r'SystemConfigFFmpegDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigFFmpegDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'accel'; + yield serializers.serialize( + object.accel, + specifiedType: const FullType(TranscodeHWAccel), + ); + yield r'acceptedAudioCodecs'; + yield serializers.serialize( + object.acceptedAudioCodecs, + specifiedType: const FullType(BuiltList, [FullType(AudioCodec)]), + ); + yield r'acceptedVideoCodecs'; + yield serializers.serialize( + object.acceptedVideoCodecs, + specifiedType: const FullType(BuiltList, [FullType(VideoCodec)]), + ); + yield r'bframes'; + yield serializers.serialize( + object.bframes, + specifiedType: const FullType(int), + ); + yield r'cqMode'; + yield serializers.serialize( + object.cqMode, + specifiedType: const FullType(CQMode), + ); + yield r'crf'; + yield serializers.serialize( + object.crf, + specifiedType: const FullType(int), + ); + yield r'gopSize'; + yield serializers.serialize( + object.gopSize, + specifiedType: const FullType(int), + ); + yield r'maxBitrate'; + yield serializers.serialize( + object.maxBitrate, + specifiedType: const FullType(String), + ); + yield r'npl'; + yield serializers.serialize( + object.npl, + specifiedType: const FullType(int), + ); + yield r'preferredHwDevice'; + yield serializers.serialize( + object.preferredHwDevice, + specifiedType: const FullType(String), + ); + yield r'preset'; + yield serializers.serialize( + object.preset, + specifiedType: const FullType(String), + ); + yield r'refs'; + yield serializers.serialize( + object.refs, + specifiedType: const FullType(int), + ); + yield r'targetAudioCodec'; + yield serializers.serialize( + object.targetAudioCodec, + specifiedType: const FullType(AudioCodec), + ); + yield r'targetResolution'; + yield serializers.serialize( + object.targetResolution, + specifiedType: const FullType(String), + ); + yield r'targetVideoCodec'; + yield serializers.serialize( + object.targetVideoCodec, + specifiedType: const FullType(VideoCodec), + ); + yield r'temporalAQ'; + yield serializers.serialize( + object.temporalAQ, + specifiedType: const FullType(bool), + ); + yield r'threads'; + yield serializers.serialize( + object.threads, + specifiedType: const FullType(int), + ); + yield r'tonemap'; + yield serializers.serialize( + object.tonemap, + specifiedType: const FullType(ToneMapping), + ); + yield r'transcode'; + yield serializers.serialize( + object.transcode, + specifiedType: const FullType(TranscodePolicy), + ); + yield r'twoPass'; + yield serializers.serialize( + object.twoPass, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigFFmpegDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigFFmpegDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'accel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(TranscodeHWAccel), + ) as TranscodeHWAccel; + result.accel = valueDes; + break; + case r'acceptedAudioCodecs': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(AudioCodec)]), + ) as BuiltList; + result.acceptedAudioCodecs.replace(valueDes); + break; + case r'acceptedVideoCodecs': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(VideoCodec)]), + ) as BuiltList; + result.acceptedVideoCodecs.replace(valueDes); + break; + case r'bframes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.bframes = valueDes; + break; + case r'cqMode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(CQMode), + ) as CQMode; + result.cqMode = valueDes; + break; + case r'crf': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.crf = valueDes; + break; + case r'gopSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.gopSize = valueDes; + break; + case r'maxBitrate': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.maxBitrate = valueDes; + break; + case r'npl': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.npl = valueDes; + break; + case r'preferredHwDevice': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.preferredHwDevice = valueDes; + break; + case r'preset': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.preset = valueDes; + break; + case r'refs': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.refs = valueDes; + break; + case r'targetAudioCodec': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AudioCodec), + ) as AudioCodec; + result.targetAudioCodec = valueDes; + break; + case r'targetResolution': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.targetResolution = valueDes; + break; + case r'targetVideoCodec': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(VideoCodec), + ) as VideoCodec; + result.targetVideoCodec = valueDes; + break; + case r'temporalAQ': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.temporalAQ = valueDes; + break; + case r'threads': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.threads = valueDes; + break; + case r'tonemap': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ToneMapping), + ) as ToneMapping; + result.tonemap = valueDes; + break; + case r'transcode': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(TranscodePolicy), + ) as TranscodePolicy; + result.transcode = valueDes; + break; + case r'twoPass': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.twoPass = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigFFmpegDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigFFmpegDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_image_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_image_dto.dart new file mode 100644 index 0000000000..4fb668f22b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_image_dto.dart @@ -0,0 +1,207 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/colorspace.dart'; +import 'package:openapi/src/model/image_format.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_image_dto.g.dart'; + +/// SystemConfigImageDto +/// +/// Properties: +/// * [colorspace] +/// * [extractEmbedded] +/// * [previewFormat] +/// * [previewSize] +/// * [quality] +/// * [thumbnailFormat] +/// * [thumbnailSize] +@BuiltValue() +abstract class SystemConfigImageDto implements Built { + @BuiltValueField(wireName: r'colorspace') + Colorspace get colorspace; + // enum colorspaceEnum { srgb, p3, }; + + @BuiltValueField(wireName: r'extractEmbedded') + bool get extractEmbedded; + + @BuiltValueField(wireName: r'previewFormat') + ImageFormat get previewFormat; + // enum previewFormatEnum { jpeg, webp, }; + + @BuiltValueField(wireName: r'previewSize') + int get previewSize; + + @BuiltValueField(wireName: r'quality') + int get quality; + + @BuiltValueField(wireName: r'thumbnailFormat') + ImageFormat get thumbnailFormat; + // enum thumbnailFormatEnum { jpeg, webp, }; + + @BuiltValueField(wireName: r'thumbnailSize') + int get thumbnailSize; + + SystemConfigImageDto._(); + + factory SystemConfigImageDto([void updates(SystemConfigImageDtoBuilder b)]) = _$SystemConfigImageDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigImageDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigImageDtoSerializer(); +} + +class _$SystemConfigImageDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigImageDto, _$SystemConfigImageDto]; + + @override + final String wireName = r'SystemConfigImageDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigImageDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'colorspace'; + yield serializers.serialize( + object.colorspace, + specifiedType: const FullType(Colorspace), + ); + yield r'extractEmbedded'; + yield serializers.serialize( + object.extractEmbedded, + specifiedType: const FullType(bool), + ); + yield r'previewFormat'; + yield serializers.serialize( + object.previewFormat, + specifiedType: const FullType(ImageFormat), + ); + yield r'previewSize'; + yield serializers.serialize( + object.previewSize, + specifiedType: const FullType(int), + ); + yield r'quality'; + yield serializers.serialize( + object.quality, + specifiedType: const FullType(int), + ); + yield r'thumbnailFormat'; + yield serializers.serialize( + object.thumbnailFormat, + specifiedType: const FullType(ImageFormat), + ); + yield r'thumbnailSize'; + yield serializers.serialize( + object.thumbnailSize, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigImageDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigImageDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'colorspace': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(Colorspace), + ) as Colorspace; + result.colorspace = valueDes; + break; + case r'extractEmbedded': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.extractEmbedded = valueDes; + break; + case r'previewFormat': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ImageFormat), + ) as ImageFormat; + result.previewFormat = valueDes; + break; + case r'previewSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.previewSize = valueDes; + break; + case r'quality': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.quality = valueDes; + break; + case r'thumbnailFormat': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(ImageFormat), + ) as ImageFormat; + result.thumbnailFormat = valueDes; + break; + case r'thumbnailSize': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.thumbnailSize = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigImageDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigImageDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_job_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_job_dto.dart new file mode 100644 index 0000000000..3d0b2d8648 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_job_dto.dart @@ -0,0 +1,251 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/job_settings_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_job_dto.g.dart'; + +/// SystemConfigJobDto +/// +/// Properties: +/// * [backgroundTask] +/// * [faceDetection] +/// * [library_] +/// * [metadataExtraction] +/// * [migration] +/// * [search] +/// * [sidecar] +/// * [smartSearch] +/// * [thumbnailGeneration] +/// * [videoConversion] +@BuiltValue() +abstract class SystemConfigJobDto implements Built { + @BuiltValueField(wireName: r'backgroundTask') + JobSettingsDto get backgroundTask; + + @BuiltValueField(wireName: r'faceDetection') + JobSettingsDto get faceDetection; + + @BuiltValueField(wireName: r'library') + JobSettingsDto get library_; + + @BuiltValueField(wireName: r'metadataExtraction') + JobSettingsDto get metadataExtraction; + + @BuiltValueField(wireName: r'migration') + JobSettingsDto get migration; + + @BuiltValueField(wireName: r'search') + JobSettingsDto get search; + + @BuiltValueField(wireName: r'sidecar') + JobSettingsDto get sidecar; + + @BuiltValueField(wireName: r'smartSearch') + JobSettingsDto get smartSearch; + + @BuiltValueField(wireName: r'thumbnailGeneration') + JobSettingsDto get thumbnailGeneration; + + @BuiltValueField(wireName: r'videoConversion') + JobSettingsDto get videoConversion; + + SystemConfigJobDto._(); + + factory SystemConfigJobDto([void updates(SystemConfigJobDtoBuilder b)]) = _$SystemConfigJobDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigJobDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigJobDtoSerializer(); +} + +class _$SystemConfigJobDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigJobDto, _$SystemConfigJobDto]; + + @override + final String wireName = r'SystemConfigJobDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigJobDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'backgroundTask'; + yield serializers.serialize( + object.backgroundTask, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'faceDetection'; + yield serializers.serialize( + object.faceDetection, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'library'; + yield serializers.serialize( + object.library_, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'metadataExtraction'; + yield serializers.serialize( + object.metadataExtraction, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'migration'; + yield serializers.serialize( + object.migration, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'search'; + yield serializers.serialize( + object.search, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'sidecar'; + yield serializers.serialize( + object.sidecar, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'smartSearch'; + yield serializers.serialize( + object.smartSearch, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'thumbnailGeneration'; + yield serializers.serialize( + object.thumbnailGeneration, + specifiedType: const FullType(JobSettingsDto), + ); + yield r'videoConversion'; + yield serializers.serialize( + object.videoConversion, + specifiedType: const FullType(JobSettingsDto), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigJobDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigJobDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'backgroundTask': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.backgroundTask.replace(valueDes); + break; + case r'faceDetection': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.faceDetection.replace(valueDes); + break; + case r'library': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.library_.replace(valueDes); + break; + case r'metadataExtraction': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.metadataExtraction.replace(valueDes); + break; + case r'migration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.migration.replace(valueDes); + break; + case r'search': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.search.replace(valueDes); + break; + case r'sidecar': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.sidecar.replace(valueDes); + break; + case r'smartSearch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.smartSearch.replace(valueDes); + break; + case r'thumbnailGeneration': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.thumbnailGeneration.replace(valueDes); + break; + case r'videoConversion': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(JobSettingsDto), + ) as JobSettingsDto; + result.videoConversion.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigJobDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigJobDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_library_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_library_dto.dart new file mode 100644 index 0000000000..14f922b414 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_library_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/system_config_library_watch_dto.dart'; +import 'package:openapi/src/model/system_config_library_scan_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_library_dto.g.dart'; + +/// SystemConfigLibraryDto +/// +/// Properties: +/// * [scan] +/// * [watch] +@BuiltValue() +abstract class SystemConfigLibraryDto implements Built { + @BuiltValueField(wireName: r'scan') + SystemConfigLibraryScanDto get scan; + + @BuiltValueField(wireName: r'watch') + SystemConfigLibraryWatchDto get watch; + + SystemConfigLibraryDto._(); + + factory SystemConfigLibraryDto([void updates(SystemConfigLibraryDtoBuilder b)]) = _$SystemConfigLibraryDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigLibraryDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigLibraryDtoSerializer(); +} + +class _$SystemConfigLibraryDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigLibraryDto, _$SystemConfigLibraryDto]; + + @override + final String wireName = r'SystemConfigLibraryDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'scan'; + yield serializers.serialize( + object.scan, + specifiedType: const FullType(SystemConfigLibraryScanDto), + ); + yield r'watch'; + yield serializers.serialize( + object.watch, + specifiedType: const FullType(SystemConfigLibraryWatchDto), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigLibraryDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'scan': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigLibraryScanDto), + ) as SystemConfigLibraryScanDto; + result.scan.replace(valueDes); + break; + case r'watch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(SystemConfigLibraryWatchDto), + ) as SystemConfigLibraryWatchDto; + result.watch.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigLibraryDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigLibraryDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_library_scan_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_library_scan_dto.dart new file mode 100644 index 0000000000..5f68b083e0 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_library_scan_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_library_scan_dto.g.dart'; + +/// SystemConfigLibraryScanDto +/// +/// Properties: +/// * [cronExpression] +/// * [enabled] +@BuiltValue() +abstract class SystemConfigLibraryScanDto implements Built { + @BuiltValueField(wireName: r'cronExpression') + String get cronExpression; + + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigLibraryScanDto._(); + + factory SystemConfigLibraryScanDto([void updates(SystemConfigLibraryScanDtoBuilder b)]) = _$SystemConfigLibraryScanDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigLibraryScanDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigLibraryScanDtoSerializer(); +} + +class _$SystemConfigLibraryScanDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigLibraryScanDto, _$SystemConfigLibraryScanDto]; + + @override + final String wireName = r'SystemConfigLibraryScanDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigLibraryScanDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'cronExpression'; + yield serializers.serialize( + object.cronExpression, + specifiedType: const FullType(String), + ); + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigLibraryScanDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigLibraryScanDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'cronExpression': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.cronExpression = valueDes; + break; + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigLibraryScanDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigLibraryScanDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_library_watch_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_library_watch_dto.dart new file mode 100644 index 0000000000..6ea6d16b66 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_library_watch_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_library_watch_dto.g.dart'; + +/// SystemConfigLibraryWatchDto +/// +/// Properties: +/// * [enabled] +@BuiltValue() +abstract class SystemConfigLibraryWatchDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigLibraryWatchDto._(); + + factory SystemConfigLibraryWatchDto([void updates(SystemConfigLibraryWatchDtoBuilder b)]) = _$SystemConfigLibraryWatchDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigLibraryWatchDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigLibraryWatchDtoSerializer(); +} + +class _$SystemConfigLibraryWatchDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigLibraryWatchDto, _$SystemConfigLibraryWatchDto]; + + @override + final String wireName = r'SystemConfigLibraryWatchDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigLibraryWatchDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigLibraryWatchDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigLibraryWatchDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigLibraryWatchDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigLibraryWatchDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_logging_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_logging_dto.dart new file mode 100644 index 0000000000..3eae91a153 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_logging_dto.dart @@ -0,0 +1,124 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/log_level.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_logging_dto.g.dart'; + +/// SystemConfigLoggingDto +/// +/// Properties: +/// * [enabled] +/// * [level] +@BuiltValue() +abstract class SystemConfigLoggingDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'level') + LogLevel get level; + // enum levelEnum { verbose, debug, log, warn, error, fatal, }; + + SystemConfigLoggingDto._(); + + factory SystemConfigLoggingDto([void updates(SystemConfigLoggingDtoBuilder b)]) = _$SystemConfigLoggingDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigLoggingDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigLoggingDtoSerializer(); +} + +class _$SystemConfigLoggingDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigLoggingDto, _$SystemConfigLoggingDto]; + + @override + final String wireName = r'SystemConfigLoggingDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigLoggingDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'level'; + yield serializers.serialize( + object.level, + specifiedType: const FullType(LogLevel), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigLoggingDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigLoggingDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'level': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(LogLevel), + ) as LogLevel; + result.level = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigLoggingDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigLoggingDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_machine_learning_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_machine_learning_dto.dart new file mode 100644 index 0000000000..72cf9120b9 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_machine_learning_dto.dart @@ -0,0 +1,156 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/clip_config.dart'; +import 'package:openapi/src/model/recognition_config.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_machine_learning_dto.g.dart'; + +/// SystemConfigMachineLearningDto +/// +/// Properties: +/// * [clip] +/// * [enabled] +/// * [facialRecognition] +/// * [url] +@BuiltValue() +abstract class SystemConfigMachineLearningDto implements Built { + @BuiltValueField(wireName: r'clip') + CLIPConfig get clip; + + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'facialRecognition') + RecognitionConfig get facialRecognition; + + @BuiltValueField(wireName: r'url') + String get url; + + SystemConfigMachineLearningDto._(); + + factory SystemConfigMachineLearningDto([void updates(SystemConfigMachineLearningDtoBuilder b)]) = _$SystemConfigMachineLearningDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigMachineLearningDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigMachineLearningDtoSerializer(); +} + +class _$SystemConfigMachineLearningDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigMachineLearningDto, _$SystemConfigMachineLearningDto]; + + @override + final String wireName = r'SystemConfigMachineLearningDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigMachineLearningDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'clip'; + yield serializers.serialize( + object.clip, + specifiedType: const FullType(CLIPConfig), + ); + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'facialRecognition'; + yield serializers.serialize( + object.facialRecognition, + specifiedType: const FullType(RecognitionConfig), + ); + yield r'url'; + yield serializers.serialize( + object.url, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigMachineLearningDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigMachineLearningDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'clip': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(CLIPConfig), + ) as CLIPConfig; + result.clip.replace(valueDes); + break; + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'facialRecognition': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(RecognitionConfig), + ) as RecognitionConfig; + result.facialRecognition.replace(valueDes); + break; + case r'url': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.url = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigMachineLearningDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigMachineLearningDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_map_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_map_dto.dart new file mode 100644 index 0000000000..9fd6577b01 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_map_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_map_dto.g.dart'; + +/// SystemConfigMapDto +/// +/// Properties: +/// * [darkStyle] +/// * [enabled] +/// * [lightStyle] +@BuiltValue() +abstract class SystemConfigMapDto implements Built { + @BuiltValueField(wireName: r'darkStyle') + String get darkStyle; + + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'lightStyle') + String get lightStyle; + + SystemConfigMapDto._(); + + factory SystemConfigMapDto([void updates(SystemConfigMapDtoBuilder b)]) = _$SystemConfigMapDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigMapDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigMapDtoSerializer(); +} + +class _$SystemConfigMapDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigMapDto, _$SystemConfigMapDto]; + + @override + final String wireName = r'SystemConfigMapDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigMapDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'darkStyle'; + yield serializers.serialize( + object.darkStyle, + specifiedType: const FullType(String), + ); + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'lightStyle'; + yield serializers.serialize( + object.lightStyle, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigMapDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigMapDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'darkStyle': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.darkStyle = valueDes; + break; + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'lightStyle': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.lightStyle = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigMapDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigMapDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_new_version_check_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_new_version_check_dto.dart new file mode 100644 index 0000000000..ee252ece9e --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_new_version_check_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_new_version_check_dto.g.dart'; + +/// SystemConfigNewVersionCheckDto +/// +/// Properties: +/// * [enabled] +@BuiltValue() +abstract class SystemConfigNewVersionCheckDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigNewVersionCheckDto._(); + + factory SystemConfigNewVersionCheckDto([void updates(SystemConfigNewVersionCheckDtoBuilder b)]) = _$SystemConfigNewVersionCheckDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigNewVersionCheckDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigNewVersionCheckDtoSerializer(); +} + +class _$SystemConfigNewVersionCheckDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigNewVersionCheckDto, _$SystemConfigNewVersionCheckDto]; + + @override + final String wireName = r'SystemConfigNewVersionCheckDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigNewVersionCheckDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigNewVersionCheckDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigNewVersionCheckDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigNewVersionCheckDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigNewVersionCheckDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_o_auth_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_o_auth_dto.dart new file mode 100644 index 0000000000..5094009ce1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_o_auth_dto.dart @@ -0,0 +1,314 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_o_auth_dto.g.dart'; + +/// SystemConfigOAuthDto +/// +/// Properties: +/// * [autoLaunch] +/// * [autoRegister] +/// * [buttonText] +/// * [clientId] +/// * [clientSecret] +/// * [defaultStorageQuota] +/// * [enabled] +/// * [issuerUrl] +/// * [mobileOverrideEnabled] +/// * [mobileRedirectUri] +/// * [scope] +/// * [signingAlgorithm] +/// * [storageLabelClaim] +/// * [storageQuotaClaim] +@BuiltValue() +abstract class SystemConfigOAuthDto implements Built { + @BuiltValueField(wireName: r'autoLaunch') + bool get autoLaunch; + + @BuiltValueField(wireName: r'autoRegister') + bool get autoRegister; + + @BuiltValueField(wireName: r'buttonText') + String get buttonText; + + @BuiltValueField(wireName: r'clientId') + String get clientId; + + @BuiltValueField(wireName: r'clientSecret') + String get clientSecret; + + @BuiltValueField(wireName: r'defaultStorageQuota') + num get defaultStorageQuota; + + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'issuerUrl') + String get issuerUrl; + + @BuiltValueField(wireName: r'mobileOverrideEnabled') + bool get mobileOverrideEnabled; + + @BuiltValueField(wireName: r'mobileRedirectUri') + String get mobileRedirectUri; + + @BuiltValueField(wireName: r'scope') + String get scope; + + @BuiltValueField(wireName: r'signingAlgorithm') + String get signingAlgorithm; + + @BuiltValueField(wireName: r'storageLabelClaim') + String get storageLabelClaim; + + @BuiltValueField(wireName: r'storageQuotaClaim') + String get storageQuotaClaim; + + SystemConfigOAuthDto._(); + + factory SystemConfigOAuthDto([void updates(SystemConfigOAuthDtoBuilder b)]) = _$SystemConfigOAuthDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigOAuthDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigOAuthDtoSerializer(); +} + +class _$SystemConfigOAuthDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigOAuthDto, _$SystemConfigOAuthDto]; + + @override + final String wireName = r'SystemConfigOAuthDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigOAuthDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'autoLaunch'; + yield serializers.serialize( + object.autoLaunch, + specifiedType: const FullType(bool), + ); + yield r'autoRegister'; + yield serializers.serialize( + object.autoRegister, + specifiedType: const FullType(bool), + ); + yield r'buttonText'; + yield serializers.serialize( + object.buttonText, + specifiedType: const FullType(String), + ); + yield r'clientId'; + yield serializers.serialize( + object.clientId, + specifiedType: const FullType(String), + ); + yield r'clientSecret'; + yield serializers.serialize( + object.clientSecret, + specifiedType: const FullType(String), + ); + yield r'defaultStorageQuota'; + yield serializers.serialize( + object.defaultStorageQuota, + specifiedType: const FullType(num), + ); + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'issuerUrl'; + yield serializers.serialize( + object.issuerUrl, + specifiedType: const FullType(String), + ); + yield r'mobileOverrideEnabled'; + yield serializers.serialize( + object.mobileOverrideEnabled, + specifiedType: const FullType(bool), + ); + yield r'mobileRedirectUri'; + yield serializers.serialize( + object.mobileRedirectUri, + specifiedType: const FullType(String), + ); + yield r'scope'; + yield serializers.serialize( + object.scope, + specifiedType: const FullType(String), + ); + yield r'signingAlgorithm'; + yield serializers.serialize( + object.signingAlgorithm, + specifiedType: const FullType(String), + ); + yield r'storageLabelClaim'; + yield serializers.serialize( + object.storageLabelClaim, + specifiedType: const FullType(String), + ); + yield r'storageQuotaClaim'; + yield serializers.serialize( + object.storageQuotaClaim, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigOAuthDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigOAuthDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'autoLaunch': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.autoLaunch = valueDes; + break; + case r'autoRegister': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.autoRegister = valueDes; + break; + case r'buttonText': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.buttonText = valueDes; + break; + case r'clientId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientId = valueDes; + break; + case r'clientSecret': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.clientSecret = valueDes; + break; + case r'defaultStorageQuota': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.defaultStorageQuota = valueDes; + break; + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'issuerUrl': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.issuerUrl = valueDes; + break; + case r'mobileOverrideEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.mobileOverrideEnabled = valueDes; + break; + case r'mobileRedirectUri': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.mobileRedirectUri = valueDes; + break; + case r'scope': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.scope = valueDes; + break; + case r'signingAlgorithm': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.signingAlgorithm = valueDes; + break; + case r'storageLabelClaim': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.storageLabelClaim = valueDes; + break; + case r'storageQuotaClaim': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.storageQuotaClaim = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigOAuthDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigOAuthDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_password_login_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_password_login_dto.dart new file mode 100644 index 0000000000..ee772df8f6 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_password_login_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_password_login_dto.g.dart'; + +/// SystemConfigPasswordLoginDto +/// +/// Properties: +/// * [enabled] +@BuiltValue() +abstract class SystemConfigPasswordLoginDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigPasswordLoginDto._(); + + factory SystemConfigPasswordLoginDto([void updates(SystemConfigPasswordLoginDtoBuilder b)]) = _$SystemConfigPasswordLoginDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigPasswordLoginDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigPasswordLoginDtoSerializer(); +} + +class _$SystemConfigPasswordLoginDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigPasswordLoginDto, _$SystemConfigPasswordLoginDto]; + + @override + final String wireName = r'SystemConfigPasswordLoginDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigPasswordLoginDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigPasswordLoginDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigPasswordLoginDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigPasswordLoginDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigPasswordLoginDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_reverse_geocoding_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_reverse_geocoding_dto.dart new file mode 100644 index 0000000000..a707c49169 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_reverse_geocoding_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_reverse_geocoding_dto.g.dart'; + +/// SystemConfigReverseGeocodingDto +/// +/// Properties: +/// * [enabled] +@BuiltValue() +abstract class SystemConfigReverseGeocodingDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigReverseGeocodingDto._(); + + factory SystemConfigReverseGeocodingDto([void updates(SystemConfigReverseGeocodingDtoBuilder b)]) = _$SystemConfigReverseGeocodingDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigReverseGeocodingDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigReverseGeocodingDtoSerializer(); +} + +class _$SystemConfigReverseGeocodingDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigReverseGeocodingDto, _$SystemConfigReverseGeocodingDto]; + + @override + final String wireName = r'SystemConfigReverseGeocodingDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigReverseGeocodingDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigReverseGeocodingDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigReverseGeocodingDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigReverseGeocodingDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigReverseGeocodingDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_server_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_server_dto.dart new file mode 100644 index 0000000000..4bdcbdf236 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_server_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_server_dto.g.dart'; + +/// SystemConfigServerDto +/// +/// Properties: +/// * [externalDomain] +/// * [loginPageMessage] +@BuiltValue() +abstract class SystemConfigServerDto implements Built { + @BuiltValueField(wireName: r'externalDomain') + String get externalDomain; + + @BuiltValueField(wireName: r'loginPageMessage') + String get loginPageMessage; + + SystemConfigServerDto._(); + + factory SystemConfigServerDto([void updates(SystemConfigServerDtoBuilder b)]) = _$SystemConfigServerDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigServerDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigServerDtoSerializer(); +} + +class _$SystemConfigServerDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigServerDto, _$SystemConfigServerDto]; + + @override + final String wireName = r'SystemConfigServerDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigServerDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'externalDomain'; + yield serializers.serialize( + object.externalDomain, + specifiedType: const FullType(String), + ); + yield r'loginPageMessage'; + yield serializers.serialize( + object.loginPageMessage, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigServerDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigServerDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'externalDomain': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.externalDomain = valueDes; + break; + case r'loginPageMessage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.loginPageMessage = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigServerDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigServerDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_storage_template_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_storage_template_dto.dart new file mode 100644 index 0000000000..52690120cb --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_storage_template_dto.dart @@ -0,0 +1,138 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_storage_template_dto.g.dart'; + +/// SystemConfigStorageTemplateDto +/// +/// Properties: +/// * [enabled] +/// * [hashVerificationEnabled] +/// * [template] +@BuiltValue() +abstract class SystemConfigStorageTemplateDto implements Built { + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + @BuiltValueField(wireName: r'hashVerificationEnabled') + bool get hashVerificationEnabled; + + @BuiltValueField(wireName: r'template') + String get template; + + SystemConfigStorageTemplateDto._(); + + factory SystemConfigStorageTemplateDto([void updates(SystemConfigStorageTemplateDtoBuilder b)]) = _$SystemConfigStorageTemplateDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigStorageTemplateDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigStorageTemplateDtoSerializer(); +} + +class _$SystemConfigStorageTemplateDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigStorageTemplateDto, _$SystemConfigStorageTemplateDto]; + + @override + final String wireName = r'SystemConfigStorageTemplateDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigStorageTemplateDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + yield r'hashVerificationEnabled'; + yield serializers.serialize( + object.hashVerificationEnabled, + specifiedType: const FullType(bool), + ); + yield r'template'; + yield serializers.serialize( + object.template, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigStorageTemplateDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigStorageTemplateDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + case r'hashVerificationEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.hashVerificationEnabled = valueDes; + break; + case r'template': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.template = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigStorageTemplateDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigStorageTemplateDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_template_storage_option_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_template_storage_option_dto.dart new file mode 100644 index 0000000000..f252ef6233 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_template_storage_option_dto.dart @@ -0,0 +1,219 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_template_storage_option_dto.g.dart'; + +/// SystemConfigTemplateStorageOptionDto +/// +/// Properties: +/// * [dayOptions] +/// * [hourOptions] +/// * [minuteOptions] +/// * [monthOptions] +/// * [presetOptions] +/// * [secondOptions] +/// * [weekOptions] +/// * [yearOptions] +@BuiltValue() +abstract class SystemConfigTemplateStorageOptionDto implements Built { + @BuiltValueField(wireName: r'dayOptions') + BuiltList get dayOptions; + + @BuiltValueField(wireName: r'hourOptions') + BuiltList get hourOptions; + + @BuiltValueField(wireName: r'minuteOptions') + BuiltList get minuteOptions; + + @BuiltValueField(wireName: r'monthOptions') + BuiltList get monthOptions; + + @BuiltValueField(wireName: r'presetOptions') + BuiltList get presetOptions; + + @BuiltValueField(wireName: r'secondOptions') + BuiltList get secondOptions; + + @BuiltValueField(wireName: r'weekOptions') + BuiltList get weekOptions; + + @BuiltValueField(wireName: r'yearOptions') + BuiltList get yearOptions; + + SystemConfigTemplateStorageOptionDto._(); + + factory SystemConfigTemplateStorageOptionDto([void updates(SystemConfigTemplateStorageOptionDtoBuilder b)]) = _$SystemConfigTemplateStorageOptionDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigTemplateStorageOptionDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigTemplateStorageOptionDtoSerializer(); +} + +class _$SystemConfigTemplateStorageOptionDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigTemplateStorageOptionDto, _$SystemConfigTemplateStorageOptionDto]; + + @override + final String wireName = r'SystemConfigTemplateStorageOptionDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigTemplateStorageOptionDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'dayOptions'; + yield serializers.serialize( + object.dayOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'hourOptions'; + yield serializers.serialize( + object.hourOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'minuteOptions'; + yield serializers.serialize( + object.minuteOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'monthOptions'; + yield serializers.serialize( + object.monthOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'presetOptions'; + yield serializers.serialize( + object.presetOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'secondOptions'; + yield serializers.serialize( + object.secondOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'weekOptions'; + yield serializers.serialize( + object.weekOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + yield r'yearOptions'; + yield serializers.serialize( + object.yearOptions, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigTemplateStorageOptionDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigTemplateStorageOptionDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'dayOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.dayOptions.replace(valueDes); + break; + case r'hourOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.hourOptions.replace(valueDes); + break; + case r'minuteOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.minuteOptions.replace(valueDes); + break; + case r'monthOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.monthOptions.replace(valueDes); + break; + case r'presetOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.presetOptions.replace(valueDes); + break; + case r'secondOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.secondOptions.replace(valueDes); + break; + case r'weekOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.weekOptions.replace(valueDes); + break; + case r'yearOptions': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.yearOptions.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigTemplateStorageOptionDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigTemplateStorageOptionDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_theme_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_theme_dto.dart new file mode 100644 index 0000000000..b40661a335 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_theme_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_theme_dto.g.dart'; + +/// SystemConfigThemeDto +/// +/// Properties: +/// * [customCss] +@BuiltValue() +abstract class SystemConfigThemeDto implements Built { + @BuiltValueField(wireName: r'customCss') + String get customCss; + + SystemConfigThemeDto._(); + + factory SystemConfigThemeDto([void updates(SystemConfigThemeDtoBuilder b)]) = _$SystemConfigThemeDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigThemeDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigThemeDtoSerializer(); +} + +class _$SystemConfigThemeDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigThemeDto, _$SystemConfigThemeDto]; + + @override + final String wireName = r'SystemConfigThemeDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigThemeDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'customCss'; + yield serializers.serialize( + object.customCss, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigThemeDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigThemeDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'customCss': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.customCss = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigThemeDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigThemeDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_trash_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_trash_dto.dart new file mode 100644 index 0000000000..bc921c0159 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_trash_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_trash_dto.g.dart'; + +/// SystemConfigTrashDto +/// +/// Properties: +/// * [days] +/// * [enabled] +@BuiltValue() +abstract class SystemConfigTrashDto implements Built { + @BuiltValueField(wireName: r'days') + int get days; + + @BuiltValueField(wireName: r'enabled') + bool get enabled; + + SystemConfigTrashDto._(); + + factory SystemConfigTrashDto([void updates(SystemConfigTrashDtoBuilder b)]) = _$SystemConfigTrashDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigTrashDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigTrashDtoSerializer(); +} + +class _$SystemConfigTrashDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigTrashDto, _$SystemConfigTrashDto]; + + @override + final String wireName = r'SystemConfigTrashDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigTrashDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'days'; + yield serializers.serialize( + object.days, + specifiedType: const FullType(int), + ); + yield r'enabled'; + yield serializers.serialize( + object.enabled, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigTrashDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigTrashDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'days': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.days = valueDes; + break; + case r'enabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.enabled = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigTrashDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigTrashDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/system_config_user_dto.dart b/mobile-v2/openapi/lib/src/model/system_config_user_dto.dart new file mode 100644 index 0000000000..1af1eb06ad --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/system_config_user_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'system_config_user_dto.g.dart'; + +/// SystemConfigUserDto +/// +/// Properties: +/// * [deleteDelay] +@BuiltValue() +abstract class SystemConfigUserDto implements Built { + @BuiltValueField(wireName: r'deleteDelay') + int get deleteDelay; + + SystemConfigUserDto._(); + + factory SystemConfigUserDto([void updates(SystemConfigUserDtoBuilder b)]) = _$SystemConfigUserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(SystemConfigUserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$SystemConfigUserDtoSerializer(); +} + +class _$SystemConfigUserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [SystemConfigUserDto, _$SystemConfigUserDto]; + + @override + final String wireName = r'SystemConfigUserDto'; + + Iterable _serializeProperties( + Serializers serializers, + SystemConfigUserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'deleteDelay'; + yield serializers.serialize( + object.deleteDelay, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + SystemConfigUserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required SystemConfigUserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'deleteDelay': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.deleteDelay = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + SystemConfigUserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = SystemConfigUserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/tag_response_dto.dart b/mobile-v2/openapi/lib/src/model/tag_response_dto.dart new file mode 100644 index 0000000000..8fa20c8020 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/tag_response_dto.dart @@ -0,0 +1,156 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/tag_type_enum.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tag_response_dto.g.dart'; + +/// TagResponseDto +/// +/// Properties: +/// * [id] +/// * [name] +/// * [type] +/// * [userId] +@BuiltValue() +abstract class TagResponseDto implements Built { + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'type') + TagTypeEnum get type; + // enum typeEnum { OBJECT, FACE, CUSTOM, }; + + @BuiltValueField(wireName: r'userId') + String get userId; + + TagResponseDto._(); + + factory TagResponseDto([void updates(TagResponseDtoBuilder b)]) = _$TagResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TagResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TagResponseDtoSerializer(); +} + +class _$TagResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TagResponseDto, _$TagResponseDto]; + + @override + final String wireName = r'TagResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + TagResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'type'; + yield serializers.serialize( + object.type, + specifiedType: const FullType(TagTypeEnum), + ); + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + TagResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TagResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'type': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(TagTypeEnum), + ) as TagTypeEnum; + result.type = valueDes; + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TagResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TagResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/tag_type_enum.dart b/mobile-v2/openapi/lib/src/model/tag_type_enum.dart new file mode 100644 index 0000000000..3ab88a3edf --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/tag_type_enum.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tag_type_enum.g.dart'; + +class TagTypeEnum extends EnumClass { + + @BuiltValueEnumConst(wireName: r'OBJECT') + static const TagTypeEnum OBJECT = _$OBJECT; + @BuiltValueEnumConst(wireName: r'FACE') + static const TagTypeEnum FACE = _$FACE; + @BuiltValueEnumConst(wireName: r'CUSTOM') + static const TagTypeEnum CUSTOM = _$CUSTOM; + + static Serializer get serializer => _$tagTypeEnumSerializer; + + const TagTypeEnum._(String name): super(name); + + static BuiltSet get values => _$values; + static TagTypeEnum valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class TagTypeEnumMixin = Object with _$TagTypeEnumMixin; + diff --git a/mobile-v2/openapi/lib/src/model/thumbnail_format.dart b/mobile-v2/openapi/lib/src/model/thumbnail_format.dart new file mode 100644 index 0000000000..19911fa5b3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/thumbnail_format.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'thumbnail_format.g.dart'; + +class ThumbnailFormat extends EnumClass { + + @BuiltValueEnumConst(wireName: r'JPEG') + static const ThumbnailFormat JPEG = _$JPEG; + @BuiltValueEnumConst(wireName: r'WEBP') + static const ThumbnailFormat WEBP = _$WEBP; + + static Serializer get serializer => _$thumbnailFormatSerializer; + + const ThumbnailFormat._(String name): super(name); + + static BuiltSet get values => _$values; + static ThumbnailFormat valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ThumbnailFormatMixin = Object with _$ThumbnailFormatMixin; + diff --git a/mobile-v2/openapi/lib/src/model/time_bucket_response_dto.dart b/mobile-v2/openapi/lib/src/model/time_bucket_response_dto.dart new file mode 100644 index 0000000000..b2449be4c5 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/time_bucket_response_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'time_bucket_response_dto.g.dart'; + +/// TimeBucketResponseDto +/// +/// Properties: +/// * [count] +/// * [timeBucket] +@BuiltValue() +abstract class TimeBucketResponseDto implements Built { + @BuiltValueField(wireName: r'count') + int get count; + + @BuiltValueField(wireName: r'timeBucket') + String get timeBucket; + + TimeBucketResponseDto._(); + + factory TimeBucketResponseDto([void updates(TimeBucketResponseDtoBuilder b)]) = _$TimeBucketResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(TimeBucketResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$TimeBucketResponseDtoSerializer(); +} + +class _$TimeBucketResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [TimeBucketResponseDto, _$TimeBucketResponseDto]; + + @override + final String wireName = r'TimeBucketResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + TimeBucketResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'count'; + yield serializers.serialize( + object.count, + specifiedType: const FullType(int), + ); + yield r'timeBucket'; + yield serializers.serialize( + object.timeBucket, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + TimeBucketResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required TimeBucketResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'count': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.count = valueDes; + break; + case r'timeBucket': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.timeBucket = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + TimeBucketResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = TimeBucketResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/time_bucket_size.dart b/mobile-v2/openapi/lib/src/model/time_bucket_size.dart new file mode 100644 index 0000000000..e919beb47b --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/time_bucket_size.dart @@ -0,0 +1,34 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'time_bucket_size.g.dart'; + +class TimeBucketSize extends EnumClass { + + @BuiltValueEnumConst(wireName: r'DAY') + static const TimeBucketSize DAY = _$DAY; + @BuiltValueEnumConst(wireName: r'MONTH') + static const TimeBucketSize MONTH = _$MONTH; + + static Serializer get serializer => _$timeBucketSizeSerializer; + + const TimeBucketSize._(String name): super(name); + + static BuiltSet get values => _$values; + static TimeBucketSize valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class TimeBucketSizeMixin = Object with _$TimeBucketSizeMixin; + diff --git a/mobile-v2/openapi/lib/src/model/tone_mapping.dart b/mobile-v2/openapi/lib/src/model/tone_mapping.dart new file mode 100644 index 0000000000..584db2c5e9 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/tone_mapping.dart @@ -0,0 +1,38 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'tone_mapping.g.dart'; + +class ToneMapping extends EnumClass { + + @BuiltValueEnumConst(wireName: r'hable') + static const ToneMapping hable = _$hable; + @BuiltValueEnumConst(wireName: r'mobius') + static const ToneMapping mobius = _$mobius; + @BuiltValueEnumConst(wireName: r'reinhard') + static const ToneMapping reinhard = _$reinhard; + @BuiltValueEnumConst(wireName: r'disabled') + static const ToneMapping disabled = _$disabled; + + static Serializer get serializer => _$toneMappingSerializer; + + const ToneMapping._(String name): super(name); + + static BuiltSet get values => _$values; + static ToneMapping valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class ToneMappingMixin = Object with _$ToneMappingMixin; + diff --git a/mobile-v2/openapi/lib/src/model/transcode_hw_accel.dart b/mobile-v2/openapi/lib/src/model/transcode_hw_accel.dart new file mode 100644 index 0000000000..5a94e73ef1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/transcode_hw_accel.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'transcode_hw_accel.g.dart'; + +class TranscodeHWAccel extends EnumClass { + + @BuiltValueEnumConst(wireName: r'nvenc') + static const TranscodeHWAccel nvenc = _$nvenc; + @BuiltValueEnumConst(wireName: r'qsv') + static const TranscodeHWAccel qsv = _$qsv; + @BuiltValueEnumConst(wireName: r'vaapi') + static const TranscodeHWAccel vaapi = _$vaapi; + @BuiltValueEnumConst(wireName: r'rkmpp') + static const TranscodeHWAccel rkmpp = _$rkmpp; + @BuiltValueEnumConst(wireName: r'disabled') + static const TranscodeHWAccel disabled = _$disabled; + + static Serializer get serializer => _$transcodeHWAccelSerializer; + + const TranscodeHWAccel._(String name): super(name); + + static BuiltSet get values => _$values; + static TranscodeHWAccel valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class TranscodeHWAccelMixin = Object with _$TranscodeHWAccelMixin; + diff --git a/mobile-v2/openapi/lib/src/model/transcode_policy.dart b/mobile-v2/openapi/lib/src/model/transcode_policy.dart new file mode 100644 index 0000000000..d7844a1f89 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/transcode_policy.dart @@ -0,0 +1,40 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'transcode_policy.g.dart'; + +class TranscodePolicy extends EnumClass { + + @BuiltValueEnumConst(wireName: r'all') + static const TranscodePolicy all = _$all; + @BuiltValueEnumConst(wireName: r'optimal') + static const TranscodePolicy optimal = _$optimal; + @BuiltValueEnumConst(wireName: r'bitrate') + static const TranscodePolicy bitrate = _$bitrate; + @BuiltValueEnumConst(wireName: r'required') + static const TranscodePolicy required_ = _$required_; + @BuiltValueEnumConst(wireName: r'disabled') + static const TranscodePolicy disabled = _$disabled; + + static Serializer get serializer => _$transcodePolicySerializer; + + const TranscodePolicy._(String name): super(name); + + static BuiltSet get values => _$values; + static TranscodePolicy valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class TranscodePolicyMixin = Object with _$TranscodePolicyMixin; + diff --git a/mobile-v2/openapi/lib/src/model/update_album_dto.dart b/mobile-v2/openapi/lib/src/model/update_album_dto.dart new file mode 100644 index 0000000000..2e62ea6e80 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_album_dto.dart @@ -0,0 +1,182 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/asset_order.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_album_dto.g.dart'; + +/// UpdateAlbumDto +/// +/// Properties: +/// * [albumName] +/// * [albumThumbnailAssetId] +/// * [description] +/// * [isActivityEnabled] +/// * [order] +@BuiltValue() +abstract class UpdateAlbumDto implements Built { + @BuiltValueField(wireName: r'albumName') + String? get albumName; + + @BuiltValueField(wireName: r'albumThumbnailAssetId') + String? get albumThumbnailAssetId; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'isActivityEnabled') + bool? get isActivityEnabled; + + @BuiltValueField(wireName: r'order') + AssetOrder? get order; + // enum orderEnum { asc, desc, }; + + UpdateAlbumDto._(); + + factory UpdateAlbumDto([void updates(UpdateAlbumDtoBuilder b)]) = _$UpdateAlbumDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateAlbumDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateAlbumDtoSerializer(); +} + +class _$UpdateAlbumDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateAlbumDto, _$UpdateAlbumDto]; + + @override + final String wireName = r'UpdateAlbumDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateAlbumDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.albumName != null) { + yield r'albumName'; + yield serializers.serialize( + object.albumName, + specifiedType: const FullType(String), + ); + } + if (object.albumThumbnailAssetId != null) { + yield r'albumThumbnailAssetId'; + yield serializers.serialize( + object.albumThumbnailAssetId, + specifiedType: const FullType(String), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.isActivityEnabled != null) { + yield r'isActivityEnabled'; + yield serializers.serialize( + object.isActivityEnabled, + specifiedType: const FullType(bool), + ); + } + if (object.order != null) { + yield r'order'; + yield serializers.serialize( + object.order, + specifiedType: const FullType(AssetOrder), + ); + } + } + + @override + Object serialize( + Serializers serializers, + UpdateAlbumDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateAlbumDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'albumName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumName = valueDes; + break; + case r'albumThumbnailAssetId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.albumThumbnailAssetId = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'isActivityEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isActivityEnabled = valueDes; + break; + case r'order': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(AssetOrder), + ) as AssetOrder; + result.order = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateAlbumDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateAlbumDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_asset_dto.dart b/mobile-v2/openapi/lib/src/model/update_asset_dto.dart new file mode 100644 index 0000000000..320e1a8453 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_asset_dto.dart @@ -0,0 +1,198 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_asset_dto.g.dart'; + +/// UpdateAssetDto +/// +/// Properties: +/// * [dateTimeOriginal] +/// * [description] +/// * [isArchived] +/// * [isFavorite] +/// * [latitude] +/// * [longitude] +@BuiltValue() +abstract class UpdateAssetDto implements Built { + @BuiltValueField(wireName: r'dateTimeOriginal') + String? get dateTimeOriginal; + + @BuiltValueField(wireName: r'description') + String? get description; + + @BuiltValueField(wireName: r'isArchived') + bool? get isArchived; + + @BuiltValueField(wireName: r'isFavorite') + bool? get isFavorite; + + @BuiltValueField(wireName: r'latitude') + num? get latitude; + + @BuiltValueField(wireName: r'longitude') + num? get longitude; + + UpdateAssetDto._(); + + factory UpdateAssetDto([void updates(UpdateAssetDtoBuilder b)]) = _$UpdateAssetDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateAssetDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateAssetDtoSerializer(); +} + +class _$UpdateAssetDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateAssetDto, _$UpdateAssetDto]; + + @override + final String wireName = r'UpdateAssetDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateAssetDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.dateTimeOriginal != null) { + yield r'dateTimeOriginal'; + yield serializers.serialize( + object.dateTimeOriginal, + specifiedType: const FullType(String), + ); + } + if (object.description != null) { + yield r'description'; + yield serializers.serialize( + object.description, + specifiedType: const FullType(String), + ); + } + if (object.isArchived != null) { + yield r'isArchived'; + yield serializers.serialize( + object.isArchived, + specifiedType: const FullType(bool), + ); + } + if (object.isFavorite != null) { + yield r'isFavorite'; + yield serializers.serialize( + object.isFavorite, + specifiedType: const FullType(bool), + ); + } + if (object.latitude != null) { + yield r'latitude'; + yield serializers.serialize( + object.latitude, + specifiedType: const FullType(num), + ); + } + if (object.longitude != null) { + yield r'longitude'; + yield serializers.serialize( + object.longitude, + specifiedType: const FullType(num), + ); + } + } + + @override + Object serialize( + Serializers serializers, + UpdateAssetDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateAssetDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'dateTimeOriginal': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.dateTimeOriginal = valueDes; + break; + case r'description': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.description = valueDes; + break; + case r'isArchived': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isArchived = valueDes; + break; + case r'isFavorite': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isFavorite = valueDes; + break; + case r'latitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.latitude = valueDes; + break; + case r'longitude': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(num), + ) as num; + result.longitude = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateAssetDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateAssetDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_library_dto.dart b/mobile-v2/openapi/lib/src/model/update_library_dto.dart new file mode 100644 index 0000000000..c9df36353a --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_library_dto.dart @@ -0,0 +1,163 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_library_dto.g.dart'; + +/// UpdateLibraryDto +/// +/// Properties: +/// * [exclusionPatterns] +/// * [importPaths] +/// * [isVisible] +/// * [name] +@BuiltValue() +abstract class UpdateLibraryDto implements Built { + @BuiltValueField(wireName: r'exclusionPatterns') + BuiltList? get exclusionPatterns; + + @BuiltValueField(wireName: r'importPaths') + BuiltList? get importPaths; + + @BuiltValueField(wireName: r'isVisible') + bool? get isVisible; + + @BuiltValueField(wireName: r'name') + String? get name; + + UpdateLibraryDto._(); + + factory UpdateLibraryDto([void updates(UpdateLibraryDtoBuilder b)]) = _$UpdateLibraryDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateLibraryDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateLibraryDtoSerializer(); +} + +class _$UpdateLibraryDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateLibraryDto, _$UpdateLibraryDto]; + + @override + final String wireName = r'UpdateLibraryDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.exclusionPatterns != null) { + yield r'exclusionPatterns'; + yield serializers.serialize( + object.exclusionPatterns, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.importPaths != null) { + yield r'importPaths'; + yield serializers.serialize( + object.importPaths, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.isVisible != null) { + yield r'isVisible'; + yield serializers.serialize( + object.isVisible, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + UpdateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateLibraryDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'exclusionPatterns': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.exclusionPatterns.replace(valueDes); + break; + case r'importPaths': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.importPaths.replace(valueDes); + break; + case r'isVisible': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isVisible = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateLibraryDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateLibraryDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_partner_dto.dart b/mobile-v2/openapi/lib/src/model/update_partner_dto.dart new file mode 100644 index 0000000000..1ffa55c249 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_partner_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_partner_dto.g.dart'; + +/// UpdatePartnerDto +/// +/// Properties: +/// * [inTimeline] +@BuiltValue() +abstract class UpdatePartnerDto implements Built { + @BuiltValueField(wireName: r'inTimeline') + bool get inTimeline; + + UpdatePartnerDto._(); + + factory UpdatePartnerDto([void updates(UpdatePartnerDtoBuilder b)]) = _$UpdatePartnerDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdatePartnerDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdatePartnerDtoSerializer(); +} + +class _$UpdatePartnerDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdatePartnerDto, _$UpdatePartnerDto]; + + @override + final String wireName = r'UpdatePartnerDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdatePartnerDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'inTimeline'; + yield serializers.serialize( + object.inTimeline, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + UpdatePartnerDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdatePartnerDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'inTimeline': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.inTimeline = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdatePartnerDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdatePartnerDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_stack_parent_dto.dart b/mobile-v2/openapi/lib/src/model/update_stack_parent_dto.dart new file mode 100644 index 0000000000..7f50a9d1c9 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_stack_parent_dto.dart @@ -0,0 +1,122 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_stack_parent_dto.g.dart'; + +/// UpdateStackParentDto +/// +/// Properties: +/// * [newParentId] +/// * [oldParentId] +@BuiltValue() +abstract class UpdateStackParentDto implements Built { + @BuiltValueField(wireName: r'newParentId') + String get newParentId; + + @BuiltValueField(wireName: r'oldParentId') + String get oldParentId; + + UpdateStackParentDto._(); + + factory UpdateStackParentDto([void updates(UpdateStackParentDtoBuilder b)]) = _$UpdateStackParentDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateStackParentDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateStackParentDtoSerializer(); +} + +class _$UpdateStackParentDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateStackParentDto, _$UpdateStackParentDto]; + + @override + final String wireName = r'UpdateStackParentDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateStackParentDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'newParentId'; + yield serializers.serialize( + object.newParentId, + specifiedType: const FullType(String), + ); + yield r'oldParentId'; + yield serializers.serialize( + object.oldParentId, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + UpdateStackParentDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateStackParentDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'newParentId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.newParentId = valueDes; + break; + case r'oldParentId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.oldParentId = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateStackParentDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateStackParentDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_tag_dto.dart b/mobile-v2/openapi/lib/src/model/update_tag_dto.dart new file mode 100644 index 0000000000..14c64fb371 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_tag_dto.dart @@ -0,0 +1,108 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_tag_dto.g.dart'; + +/// UpdateTagDto +/// +/// Properties: +/// * [name] +@BuiltValue() +abstract class UpdateTagDto implements Built { + @BuiltValueField(wireName: r'name') + String? get name; + + UpdateTagDto._(); + + factory UpdateTagDto([void updates(UpdateTagDtoBuilder b)]) = _$UpdateTagDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateTagDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateTagDtoSerializer(); +} + +class _$UpdateTagDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateTagDto, _$UpdateTagDto]; + + @override + final String wireName = r'UpdateTagDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateTagDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + UpdateTagDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateTagDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateTagDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateTagDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/update_user_dto.dart b/mobile-v2/openapi/lib/src/model/update_user_dto.dart new file mode 100644 index 0000000000..46c41257fe --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/update_user_dto.dart @@ -0,0 +1,271 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/user_avatar_color.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'update_user_dto.g.dart'; + +/// UpdateUserDto +/// +/// Properties: +/// * [avatarColor] +/// * [email] +/// * [id] +/// * [isAdmin] +/// * [memoriesEnabled] +/// * [name] +/// * [password] +/// * [quotaSizeInBytes] +/// * [shouldChangePassword] +/// * [storageLabel] +@BuiltValue() +abstract class UpdateUserDto implements Built { + @BuiltValueField(wireName: r'avatarColor') + UserAvatarColor? get avatarColor; + // enum avatarColorEnum { primary, pink, red, yellow, blue, green, purple, orange, gray, amber, }; + + @BuiltValueField(wireName: r'email') + String? get email; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isAdmin') + bool? get isAdmin; + + @BuiltValueField(wireName: r'memoriesEnabled') + bool? get memoriesEnabled; + + @BuiltValueField(wireName: r'name') + String? get name; + + @BuiltValueField(wireName: r'password') + String? get password; + + @BuiltValueField(wireName: r'quotaSizeInBytes') + int? get quotaSizeInBytes; + + @BuiltValueField(wireName: r'shouldChangePassword') + bool? get shouldChangePassword; + + @BuiltValueField(wireName: r'storageLabel') + String? get storageLabel; + + UpdateUserDto._(); + + factory UpdateUserDto([void updates(UpdateUserDtoBuilder b)]) = _$UpdateUserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UpdateUserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UpdateUserDtoSerializer(); +} + +class _$UpdateUserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UpdateUserDto, _$UpdateUserDto]; + + @override + final String wireName = r'UpdateUserDto'; + + Iterable _serializeProperties( + Serializers serializers, + UpdateUserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.avatarColor != null) { + yield r'avatarColor'; + yield serializers.serialize( + object.avatarColor, + specifiedType: const FullType(UserAvatarColor), + ); + } + if (object.email != null) { + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + } + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + if (object.isAdmin != null) { + yield r'isAdmin'; + yield serializers.serialize( + object.isAdmin, + specifiedType: const FullType(bool), + ); + } + if (object.memoriesEnabled != null) { + yield r'memoriesEnabled'; + yield serializers.serialize( + object.memoriesEnabled, + specifiedType: const FullType(bool), + ); + } + if (object.name != null) { + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + } + if (object.password != null) { + yield r'password'; + yield serializers.serialize( + object.password, + specifiedType: const FullType(String), + ); + } + if (object.quotaSizeInBytes != null) { + yield r'quotaSizeInBytes'; + yield serializers.serialize( + object.quotaSizeInBytes, + specifiedType: const FullType.nullable(int), + ); + } + if (object.shouldChangePassword != null) { + yield r'shouldChangePassword'; + yield serializers.serialize( + object.shouldChangePassword, + specifiedType: const FullType(bool), + ); + } + if (object.storageLabel != null) { + yield r'storageLabel'; + yield serializers.serialize( + object.storageLabel, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + UpdateUserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UpdateUserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'avatarColor': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserAvatarColor), + ) as UserAvatarColor; + result.avatarColor = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isAdmin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isAdmin = valueDes; + break; + case r'memoriesEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.memoriesEnabled = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'password': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.password = valueDes; + break; + case r'quotaSizeInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaSizeInBytes = valueDes; + break; + case r'shouldChangePassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shouldChangePassword = valueDes; + break; + case r'storageLabel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.storageLabel = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UpdateUserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UpdateUserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/usage_by_user_dto.dart b/mobile-v2/openapi/lib/src/model/usage_by_user_dto.dart new file mode 100644 index 0000000000..b5682bcc5d --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/usage_by_user_dto.dart @@ -0,0 +1,187 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'usage_by_user_dto.g.dart'; + +/// UsageByUserDto +/// +/// Properties: +/// * [photos] +/// * [quotaSizeInBytes] +/// * [usage] +/// * [userId] +/// * [userName] +/// * [videos] +@BuiltValue() +abstract class UsageByUserDto implements Built { + @BuiltValueField(wireName: r'photos') + int get photos; + + @BuiltValueField(wireName: r'quotaSizeInBytes') + int? get quotaSizeInBytes; + + @BuiltValueField(wireName: r'usage') + int get usage; + + @BuiltValueField(wireName: r'userId') + String get userId; + + @BuiltValueField(wireName: r'userName') + String get userName; + + @BuiltValueField(wireName: r'videos') + int get videos; + + UsageByUserDto._(); + + factory UsageByUserDto([void updates(UsageByUserDtoBuilder b)]) = _$UsageByUserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UsageByUserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UsageByUserDtoSerializer(); +} + +class _$UsageByUserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UsageByUserDto, _$UsageByUserDto]; + + @override + final String wireName = r'UsageByUserDto'; + + Iterable _serializeProperties( + Serializers serializers, + UsageByUserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'photos'; + yield serializers.serialize( + object.photos, + specifiedType: const FullType(int), + ); + yield r'quotaSizeInBytes'; + yield object.quotaSizeInBytes == null ? null : serializers.serialize( + object.quotaSizeInBytes, + specifiedType: const FullType.nullable(int), + ); + yield r'usage'; + yield serializers.serialize( + object.usage, + specifiedType: const FullType(int), + ); + yield r'userId'; + yield serializers.serialize( + object.userId, + specifiedType: const FullType(String), + ); + yield r'userName'; + yield serializers.serialize( + object.userName, + specifiedType: const FullType(String), + ); + yield r'videos'; + yield serializers.serialize( + object.videos, + specifiedType: const FullType(int), + ); + } + + @override + Object serialize( + Serializers serializers, + UsageByUserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UsageByUserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'photos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.photos = valueDes; + break; + case r'quotaSizeInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaSizeInBytes = valueDes; + break; + case r'usage': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.usage = valueDes; + break; + case r'userId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userId = valueDes; + break; + case r'userName': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.userName = valueDes; + break; + case r'videos': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(int), + ) as int; + result.videos = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UsageByUserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UsageByUserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/user_avatar_color.dart b/mobile-v2/openapi/lib/src/model/user_avatar_color.dart new file mode 100644 index 0000000000..6e047a9651 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/user_avatar_color.dart @@ -0,0 +1,50 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user_avatar_color.g.dart'; + +class UserAvatarColor extends EnumClass { + + @BuiltValueEnumConst(wireName: r'primary') + static const UserAvatarColor primary = _$primary; + @BuiltValueEnumConst(wireName: r'pink') + static const UserAvatarColor pink = _$pink; + @BuiltValueEnumConst(wireName: r'red') + static const UserAvatarColor red = _$red; + @BuiltValueEnumConst(wireName: r'yellow') + static const UserAvatarColor yellow = _$yellow; + @BuiltValueEnumConst(wireName: r'blue') + static const UserAvatarColor blue = _$blue; + @BuiltValueEnumConst(wireName: r'green') + static const UserAvatarColor green = _$green; + @BuiltValueEnumConst(wireName: r'purple') + static const UserAvatarColor purple = _$purple; + @BuiltValueEnumConst(wireName: r'orange') + static const UserAvatarColor orange = _$orange; + @BuiltValueEnumConst(wireName: r'gray') + static const UserAvatarColor gray = _$gray; + @BuiltValueEnumConst(wireName: r'amber') + static const UserAvatarColor amber = _$amber; + + static Serializer get serializer => _$userAvatarColorSerializer; + + const UserAvatarColor._(String name): super(name); + + static BuiltSet get values => _$values; + static UserAvatarColor valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class UserAvatarColorMixin = Object with _$UserAvatarColorMixin; + diff --git a/mobile-v2/openapi/lib/src/model/user_dto.dart b/mobile-v2/openapi/lib/src/model/user_dto.dart new file mode 100644 index 0000000000..fb33ee80e3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/user_dto.dart @@ -0,0 +1,172 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/user_avatar_color.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user_dto.g.dart'; + +/// UserDto +/// +/// Properties: +/// * [avatarColor] +/// * [email] +/// * [id] +/// * [name] +/// * [profileImagePath] +@BuiltValue() +abstract class UserDto implements Built { + @BuiltValueField(wireName: r'avatarColor') + UserAvatarColor get avatarColor; + // enum avatarColorEnum { primary, pink, red, yellow, blue, green, purple, orange, gray, amber, }; + + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'profileImagePath') + String get profileImagePath; + + UserDto._(); + + factory UserDto([void updates(UserDtoBuilder b)]) = _$UserDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UserDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UserDtoSerializer(); +} + +class _$UserDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UserDto, _$UserDto]; + + @override + final String wireName = r'UserDto'; + + Iterable _serializeProperties( + Serializers serializers, + UserDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'avatarColor'; + yield serializers.serialize( + object.avatarColor, + specifiedType: const FullType(UserAvatarColor), + ); + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'profileImagePath'; + yield serializers.serialize( + object.profileImagePath, + specifiedType: const FullType(String), + ); + } + + @override + Object serialize( + Serializers serializers, + UserDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UserDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'avatarColor': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserAvatarColor), + ) as UserAvatarColor; + result.avatarColor = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'profileImagePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profileImagePath = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UserDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UserDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/user_response_dto.dart b/mobile-v2/openapi/lib/src/model/user_response_dto.dart new file mode 100644 index 0000000000..356aaa7f6c --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/user_response_dto.dart @@ -0,0 +1,356 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:openapi/src/model/user_status.dart'; +import 'package:openapi/src/model/user_avatar_color.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user_response_dto.g.dart'; + +/// UserResponseDto +/// +/// Properties: +/// * [avatarColor] +/// * [createdAt] +/// * [deletedAt] +/// * [email] +/// * [id] +/// * [isAdmin] +/// * [memoriesEnabled] +/// * [name] +/// * [oauthId] +/// * [profileImagePath] +/// * [quotaSizeInBytes] +/// * [quotaUsageInBytes] +/// * [shouldChangePassword] +/// * [status] +/// * [storageLabel] +/// * [updatedAt] +@BuiltValue() +abstract class UserResponseDto implements Built { + @BuiltValueField(wireName: r'avatarColor') + UserAvatarColor get avatarColor; + // enum avatarColorEnum { primary, pink, red, yellow, blue, green, purple, orange, gray, amber, }; + + @BuiltValueField(wireName: r'createdAt') + DateTime get createdAt; + + @BuiltValueField(wireName: r'deletedAt') + DateTime? get deletedAt; + + @BuiltValueField(wireName: r'email') + String get email; + + @BuiltValueField(wireName: r'id') + String get id; + + @BuiltValueField(wireName: r'isAdmin') + bool get isAdmin; + + @BuiltValueField(wireName: r'memoriesEnabled') + bool? get memoriesEnabled; + + @BuiltValueField(wireName: r'name') + String get name; + + @BuiltValueField(wireName: r'oauthId') + String get oauthId; + + @BuiltValueField(wireName: r'profileImagePath') + String get profileImagePath; + + @BuiltValueField(wireName: r'quotaSizeInBytes') + int? get quotaSizeInBytes; + + @BuiltValueField(wireName: r'quotaUsageInBytes') + int? get quotaUsageInBytes; + + @BuiltValueField(wireName: r'shouldChangePassword') + bool get shouldChangePassword; + + @BuiltValueField(wireName: r'status') + UserStatus get status; + // enum statusEnum { active, removing, deleted, }; + + @BuiltValueField(wireName: r'storageLabel') + String? get storageLabel; + + @BuiltValueField(wireName: r'updatedAt') + DateTime get updatedAt; + + UserResponseDto._(); + + factory UserResponseDto([void updates(UserResponseDtoBuilder b)]) = _$UserResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(UserResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$UserResponseDtoSerializer(); +} + +class _$UserResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [UserResponseDto, _$UserResponseDto]; + + @override + final String wireName = r'UserResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + UserResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'avatarColor'; + yield serializers.serialize( + object.avatarColor, + specifiedType: const FullType(UserAvatarColor), + ); + yield r'createdAt'; + yield serializers.serialize( + object.createdAt, + specifiedType: const FullType(DateTime), + ); + yield r'deletedAt'; + yield object.deletedAt == null ? null : serializers.serialize( + object.deletedAt, + specifiedType: const FullType.nullable(DateTime), + ); + yield r'email'; + yield serializers.serialize( + object.email, + specifiedType: const FullType(String), + ); + yield r'id'; + yield serializers.serialize( + object.id, + specifiedType: const FullType(String), + ); + yield r'isAdmin'; + yield serializers.serialize( + object.isAdmin, + specifiedType: const FullType(bool), + ); + if (object.memoriesEnabled != null) { + yield r'memoriesEnabled'; + yield serializers.serialize( + object.memoriesEnabled, + specifiedType: const FullType(bool), + ); + } + yield r'name'; + yield serializers.serialize( + object.name, + specifiedType: const FullType(String), + ); + yield r'oauthId'; + yield serializers.serialize( + object.oauthId, + specifiedType: const FullType(String), + ); + yield r'profileImagePath'; + yield serializers.serialize( + object.profileImagePath, + specifiedType: const FullType(String), + ); + yield r'quotaSizeInBytes'; + yield object.quotaSizeInBytes == null ? null : serializers.serialize( + object.quotaSizeInBytes, + specifiedType: const FullType.nullable(int), + ); + yield r'quotaUsageInBytes'; + yield object.quotaUsageInBytes == null ? null : serializers.serialize( + object.quotaUsageInBytes, + specifiedType: const FullType.nullable(int), + ); + yield r'shouldChangePassword'; + yield serializers.serialize( + object.shouldChangePassword, + specifiedType: const FullType(bool), + ); + yield r'status'; + yield serializers.serialize( + object.status, + specifiedType: const FullType(UserStatus), + ); + yield r'storageLabel'; + yield object.storageLabel == null ? null : serializers.serialize( + object.storageLabel, + specifiedType: const FullType.nullable(String), + ); + yield r'updatedAt'; + yield serializers.serialize( + object.updatedAt, + specifiedType: const FullType(DateTime), + ); + } + + @override + Object serialize( + Serializers serializers, + UserResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required UserResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'avatarColor': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserAvatarColor), + ) as UserAvatarColor; + result.avatarColor = valueDes; + break; + case r'createdAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.createdAt = valueDes; + break; + case r'deletedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(DateTime), + ) as DateTime?; + if (valueDes == null) continue; + result.deletedAt = valueDes; + break; + case r'email': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.email = valueDes; + break; + case r'id': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.id = valueDes; + break; + case r'isAdmin': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isAdmin = valueDes; + break; + case r'memoriesEnabled': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.memoriesEnabled = valueDes; + break; + case r'name': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.name = valueDes; + break; + case r'oauthId': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.oauthId = valueDes; + break; + case r'profileImagePath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.profileImagePath = valueDes; + break; + case r'quotaSizeInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaSizeInBytes = valueDes; + break; + case r'quotaUsageInBytes': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(int), + ) as int?; + if (valueDes == null) continue; + result.quotaUsageInBytes = valueDes; + break; + case r'shouldChangePassword': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.shouldChangePassword = valueDes; + break; + case r'status': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(UserStatus), + ) as UserStatus; + result.status = valueDes; + break; + case r'storageLabel': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType.nullable(String), + ) as String?; + if (valueDes == null) continue; + result.storageLabel = valueDes; + break; + case r'updatedAt': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(DateTime), + ) as DateTime; + result.updatedAt = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + UserResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = UserResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/user_status.dart b/mobile-v2/openapi/lib/src/model/user_status.dart new file mode 100644 index 0000000000..18510aa6af --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/user_status.dart @@ -0,0 +1,36 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'user_status.g.dart'; + +class UserStatus extends EnumClass { + + @BuiltValueEnumConst(wireName: r'active') + static const UserStatus active = _$active; + @BuiltValueEnumConst(wireName: r'removing') + static const UserStatus removing = _$removing; + @BuiltValueEnumConst(wireName: r'deleted') + static const UserStatus deleted = _$deleted; + + static Serializer get serializer => _$userStatusSerializer; + + const UserStatus._(String name): super(name); + + static BuiltSet get values => _$values; + static UserStatus valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class UserStatusMixin = Object with _$UserStatusMixin; + diff --git a/mobile-v2/openapi/lib/src/model/validate_access_token_response_dto.dart b/mobile-v2/openapi/lib/src/model/validate_access_token_response_dto.dart new file mode 100644 index 0000000000..78791ca1ea --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/validate_access_token_response_dto.dart @@ -0,0 +1,106 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'validate_access_token_response_dto.g.dart'; + +/// ValidateAccessTokenResponseDto +/// +/// Properties: +/// * [authStatus] +@BuiltValue() +abstract class ValidateAccessTokenResponseDto implements Built { + @BuiltValueField(wireName: r'authStatus') + bool get authStatus; + + ValidateAccessTokenResponseDto._(); + + factory ValidateAccessTokenResponseDto([void updates(ValidateAccessTokenResponseDtoBuilder b)]) = _$ValidateAccessTokenResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ValidateAccessTokenResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ValidateAccessTokenResponseDtoSerializer(); +} + +class _$ValidateAccessTokenResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ValidateAccessTokenResponseDto, _$ValidateAccessTokenResponseDto]; + + @override + final String wireName = r'ValidateAccessTokenResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ValidateAccessTokenResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'authStatus'; + yield serializers.serialize( + object.authStatus, + specifiedType: const FullType(bool), + ); + } + + @override + Object serialize( + Serializers serializers, + ValidateAccessTokenResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ValidateAccessTokenResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'authStatus': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.authStatus = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ValidateAccessTokenResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ValidateAccessTokenResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/validate_library_dto.dart b/mobile-v2/openapi/lib/src/model/validate_library_dto.dart new file mode 100644 index 0000000000..8296c0b0f3 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/validate_library_dto.dart @@ -0,0 +1,127 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'validate_library_dto.g.dart'; + +/// ValidateLibraryDto +/// +/// Properties: +/// * [exclusionPatterns] +/// * [importPaths] +@BuiltValue() +abstract class ValidateLibraryDto implements Built { + @BuiltValueField(wireName: r'exclusionPatterns') + BuiltList? get exclusionPatterns; + + @BuiltValueField(wireName: r'importPaths') + BuiltList? get importPaths; + + ValidateLibraryDto._(); + + factory ValidateLibraryDto([void updates(ValidateLibraryDtoBuilder b)]) = _$ValidateLibraryDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ValidateLibraryDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ValidateLibraryDtoSerializer(); +} + +class _$ValidateLibraryDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ValidateLibraryDto, _$ValidateLibraryDto]; + + @override + final String wireName = r'ValidateLibraryDto'; + + Iterable _serializeProperties( + Serializers serializers, + ValidateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.exclusionPatterns != null) { + yield r'exclusionPatterns'; + yield serializers.serialize( + object.exclusionPatterns, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + if (object.importPaths != null) { + yield r'importPaths'; + yield serializers.serialize( + object.importPaths, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ValidateLibraryDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ValidateLibraryDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'exclusionPatterns': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.exclusionPatterns.replace(valueDes); + break; + case r'importPaths': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(String)]), + ) as BuiltList; + result.importPaths.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ValidateLibraryDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ValidateLibraryDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/validate_library_import_path_response_dto.dart b/mobile-v2/openapi/lib/src/model/validate_library_import_path_response_dto.dart new file mode 100644 index 0000000000..5ffeab6797 --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/validate_library_import_path_response_dto.dart @@ -0,0 +1,141 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'validate_library_import_path_response_dto.g.dart'; + +/// ValidateLibraryImportPathResponseDto +/// +/// Properties: +/// * [importPath] +/// * [isValid] +/// * [message] +@BuiltValue() +abstract class ValidateLibraryImportPathResponseDto implements Built { + @BuiltValueField(wireName: r'importPath') + String get importPath; + + @BuiltValueField(wireName: r'isValid') + bool get isValid; + + @BuiltValueField(wireName: r'message') + String? get message; + + ValidateLibraryImportPathResponseDto._(); + + factory ValidateLibraryImportPathResponseDto([void updates(ValidateLibraryImportPathResponseDtoBuilder b)]) = _$ValidateLibraryImportPathResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ValidateLibraryImportPathResponseDtoBuilder b) => b + ..isValid = false; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ValidateLibraryImportPathResponseDtoSerializer(); +} + +class _$ValidateLibraryImportPathResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ValidateLibraryImportPathResponseDto, _$ValidateLibraryImportPathResponseDto]; + + @override + final String wireName = r'ValidateLibraryImportPathResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ValidateLibraryImportPathResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + yield r'importPath'; + yield serializers.serialize( + object.importPath, + specifiedType: const FullType(String), + ); + yield r'isValid'; + yield serializers.serialize( + object.isValid, + specifiedType: const FullType(bool), + ); + if (object.message != null) { + yield r'message'; + yield serializers.serialize( + object.message, + specifiedType: const FullType(String), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ValidateLibraryImportPathResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ValidateLibraryImportPathResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'importPath': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.importPath = valueDes; + break; + case r'isValid': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(bool), + ) as bool; + result.isValid = valueDes; + break; + case r'message': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(String), + ) as String; + result.message = valueDes; + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ValidateLibraryImportPathResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ValidateLibraryImportPathResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/validate_library_response_dto.dart b/mobile-v2/openapi/lib/src/model/validate_library_response_dto.dart new file mode 100644 index 0000000000..e4ec42091f --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/validate_library_response_dto.dart @@ -0,0 +1,110 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:openapi/src/model/validate_library_import_path_response_dto.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'validate_library_response_dto.g.dart'; + +/// ValidateLibraryResponseDto +/// +/// Properties: +/// * [importPaths] +@BuiltValue() +abstract class ValidateLibraryResponseDto implements Built { + @BuiltValueField(wireName: r'importPaths') + BuiltList? get importPaths; + + ValidateLibraryResponseDto._(); + + factory ValidateLibraryResponseDto([void updates(ValidateLibraryResponseDtoBuilder b)]) = _$ValidateLibraryResponseDto; + + @BuiltValueHook(initializeBuilder: true) + static void _defaults(ValidateLibraryResponseDtoBuilder b) => b; + + @BuiltValueSerializer(custom: true) + static Serializer get serializer => _$ValidateLibraryResponseDtoSerializer(); +} + +class _$ValidateLibraryResponseDtoSerializer implements PrimitiveSerializer { + @override + final Iterable types = const [ValidateLibraryResponseDto, _$ValidateLibraryResponseDto]; + + @override + final String wireName = r'ValidateLibraryResponseDto'; + + Iterable _serializeProperties( + Serializers serializers, + ValidateLibraryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) sync* { + if (object.importPaths != null) { + yield r'importPaths'; + yield serializers.serialize( + object.importPaths, + specifiedType: const FullType(BuiltList, [FullType(ValidateLibraryImportPathResponseDto)]), + ); + } + } + + @override + Object serialize( + Serializers serializers, + ValidateLibraryResponseDto object, { + FullType specifiedType = FullType.unspecified, + }) { + return _serializeProperties(serializers, object, specifiedType: specifiedType).toList(); + } + + void _deserializeProperties( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + required List serializedList, + required ValidateLibraryResponseDtoBuilder result, + required List unhandled, + }) { + for (var i = 0; i < serializedList.length; i += 2) { + final key = serializedList[i] as String; + final value = serializedList[i + 1]; + switch (key) { + case r'importPaths': + final valueDes = serializers.deserialize( + value, + specifiedType: const FullType(BuiltList, [FullType(ValidateLibraryImportPathResponseDto)]), + ) as BuiltList; + result.importPaths.replace(valueDes); + break; + default: + unhandled.add(key); + unhandled.add(value); + break; + } + } + } + + @override + ValidateLibraryResponseDto deserialize( + Serializers serializers, + Object serialized, { + FullType specifiedType = FullType.unspecified, + }) { + final result = ValidateLibraryResponseDtoBuilder(); + final serializedList = (serialized as Iterable).toList(); + final unhandled = []; + _deserializeProperties( + serializers, + serialized, + specifiedType: specifiedType, + serializedList: serializedList, + unhandled: unhandled, + result: result, + ); + return result.build(); + } +} + diff --git a/mobile-v2/openapi/lib/src/model/video_codec.dart b/mobile-v2/openapi/lib/src/model/video_codec.dart new file mode 100644 index 0000000000..236fa6e28c --- /dev/null +++ b/mobile-v2/openapi/lib/src/model/video_codec.dart @@ -0,0 +1,38 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_element +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/built_value.dart'; +import 'package:built_value/serializer.dart'; + +part 'video_codec.g.dart'; + +class VideoCodec extends EnumClass { + + @BuiltValueEnumConst(wireName: r'h264') + static const VideoCodec h264 = _$h264; + @BuiltValueEnumConst(wireName: r'hevc') + static const VideoCodec hevc = _$hevc; + @BuiltValueEnumConst(wireName: r'vp9') + static const VideoCodec vp9 = _$vp9; + @BuiltValueEnumConst(wireName: r'av1') + static const VideoCodec av1 = _$av1; + + static Serializer get serializer => _$videoCodecSerializer; + + const VideoCodec._(String name): super(name); + + static BuiltSet get values => _$values; + static VideoCodec valueOf(String name) => _$valueOf(name); +} + +/// Optionally, enum_class can generate a mixin to go with your enum for use +/// with Angular. It exposes your enum constants as getters. So, if you mix it +/// in to your Dart component class, the values become available to the +/// corresponding Angular template. +/// +/// Trigger mixin generation by writing a line like this one next to your enum. +abstract class VideoCodecMixin = Object with _$VideoCodecMixin; + diff --git a/mobile-v2/openapi/lib/src/serializers.dart b/mobile-v2/openapi/lib/src/serializers.dart new file mode 100644 index 0000000000..bbb8d099b1 --- /dev/null +++ b/mobile-v2/openapi/lib/src/serializers.dart @@ -0,0 +1,484 @@ +// +// AUTO-GENERATED FILE, DO NOT MODIFY! +// + +// ignore_for_file: unused_import + +import 'package:one_of_serializer/any_of_serializer.dart'; +import 'package:one_of_serializer/one_of_serializer.dart'; +import 'package:built_collection/built_collection.dart'; +import 'package:built_value/json_object.dart'; +import 'package:built_value/serializer.dart'; +import 'package:built_value/standard_json_plugin.dart'; +import 'package:built_value/iso_8601_date_time_serializer.dart'; +import 'package:openapi/src/date_serializer.dart'; +import 'package:openapi/src/model/date.dart'; + +import 'package:openapi/src/model/api_key_create_dto.dart'; +import 'package:openapi/src/model/api_key_create_response_dto.dart'; +import 'package:openapi/src/model/api_key_response_dto.dart'; +import 'package:openapi/src/model/api_key_update_dto.dart'; +import 'package:openapi/src/model/activity_create_dto.dart'; +import 'package:openapi/src/model/activity_response_dto.dart'; +import 'package:openapi/src/model/activity_statistics_response_dto.dart'; +import 'package:openapi/src/model/add_users_dto.dart'; +import 'package:openapi/src/model/admin_onboarding_update_dto.dart'; +import 'package:openapi/src/model/album_count_response_dto.dart'; +import 'package:openapi/src/model/album_response_dto.dart'; +import 'package:openapi/src/model/all_job_status_response_dto.dart'; +import 'package:openapi/src/model/asset_bulk_delete_dto.dart'; +import 'package:openapi/src/model/asset_bulk_update_dto.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_dto.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_item.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_response_dto.dart'; +import 'package:openapi/src/model/asset_bulk_upload_check_result.dart'; +import 'package:openapi/src/model/asset_delta_sync_response_dto.dart'; +import 'package:openapi/src/model/asset_face_response_dto.dart'; +import 'package:openapi/src/model/asset_face_update_dto.dart'; +import 'package:openapi/src/model/asset_face_update_item.dart'; +import 'package:openapi/src/model/asset_face_without_person_response_dto.dart'; +import 'package:openapi/src/model/asset_file_upload_response_dto.dart'; +import 'package:openapi/src/model/asset_ids_dto.dart'; +import 'package:openapi/src/model/asset_ids_response_dto.dart'; +import 'package:openapi/src/model/asset_job_name.dart'; +import 'package:openapi/src/model/asset_jobs_dto.dart'; +import 'package:openapi/src/model/asset_order.dart'; +import 'package:openapi/src/model/asset_response_dto.dart'; +import 'package:openapi/src/model/asset_stats_response_dto.dart'; +import 'package:openapi/src/model/asset_type_enum.dart'; +import 'package:openapi/src/model/audio_codec.dart'; +import 'package:openapi/src/model/audit_deletes_response_dto.dart'; +import 'package:openapi/src/model/bulk_id_response_dto.dart'; +import 'package:openapi/src/model/bulk_ids_dto.dart'; +import 'package:openapi/src/model/clip_config.dart'; +import 'package:openapi/src/model/clip_mode.dart'; +import 'package:openapi/src/model/cq_mode.dart'; +import 'package:openapi/src/model/change_password_dto.dart'; +import 'package:openapi/src/model/check_existing_assets_dto.dart'; +import 'package:openapi/src/model/check_existing_assets_response_dto.dart'; +import 'package:openapi/src/model/colorspace.dart'; +import 'package:openapi/src/model/create_album_dto.dart'; +import 'package:openapi/src/model/create_asset_dto.dart'; +import 'package:openapi/src/model/create_library_dto.dart'; +import 'package:openapi/src/model/create_profile_image_dto.dart'; +import 'package:openapi/src/model/create_profile_image_response_dto.dart'; +import 'package:openapi/src/model/create_tag_dto.dart'; +import 'package:openapi/src/model/create_user_dto.dart'; +import 'package:openapi/src/model/curated_locations_response_dto.dart'; +import 'package:openapi/src/model/curated_objects_response_dto.dart'; +import 'package:openapi/src/model/delete_user_dto.dart'; +import 'package:openapi/src/model/download_archive_info.dart'; +import 'package:openapi/src/model/download_info_dto.dart'; +import 'package:openapi/src/model/download_response_dto.dart'; +import 'package:openapi/src/model/entity_type.dart'; +import 'package:openapi/src/model/exif_response_dto.dart'; +import 'package:openapi/src/model/face_dto.dart'; +import 'package:openapi/src/model/file_checksum_dto.dart'; +import 'package:openapi/src/model/file_checksum_response_dto.dart'; +import 'package:openapi/src/model/file_report_dto.dart'; +import 'package:openapi/src/model/file_report_fix_dto.dart'; +import 'package:openapi/src/model/file_report_item_dto.dart'; +import 'package:openapi/src/model/image_format.dart'; +import 'package:openapi/src/model/job_command.dart'; +import 'package:openapi/src/model/job_command_dto.dart'; +import 'package:openapi/src/model/job_counts_dto.dart'; +import 'package:openapi/src/model/job_name.dart'; +import 'package:openapi/src/model/job_settings_dto.dart'; +import 'package:openapi/src/model/job_status_dto.dart'; +import 'package:openapi/src/model/library_response_dto.dart'; +import 'package:openapi/src/model/library_stats_response_dto.dart'; +import 'package:openapi/src/model/library_type.dart'; +import 'package:openapi/src/model/log_level.dart'; +import 'package:openapi/src/model/login_credential_dto.dart'; +import 'package:openapi/src/model/login_response_dto.dart'; +import 'package:openapi/src/model/logout_response_dto.dart'; +import 'package:openapi/src/model/map_marker_response_dto.dart'; +import 'package:openapi/src/model/map_theme.dart'; +import 'package:openapi/src/model/memory_create_dto.dart'; +import 'package:openapi/src/model/memory_lane_response_dto.dart'; +import 'package:openapi/src/model/memory_response_dto.dart'; +import 'package:openapi/src/model/memory_type.dart'; +import 'package:openapi/src/model/memory_update_dto.dart'; +import 'package:openapi/src/model/merge_person_dto.dart'; +import 'package:openapi/src/model/metadata_search_dto.dart'; +import 'package:openapi/src/model/model_type.dart'; +import 'package:openapi/src/model/o_auth_authorize_response_dto.dart'; +import 'package:openapi/src/model/o_auth_callback_dto.dart'; +import 'package:openapi/src/model/o_auth_config_dto.dart'; +import 'package:openapi/src/model/on_this_day_dto.dart'; +import 'package:openapi/src/model/partner_response_dto.dart'; +import 'package:openapi/src/model/path_entity_type.dart'; +import 'package:openapi/src/model/path_type.dart'; +import 'package:openapi/src/model/people_response_dto.dart'; +import 'package:openapi/src/model/people_update_dto.dart'; +import 'package:openapi/src/model/people_update_item.dart'; +import 'package:openapi/src/model/person_create_dto.dart'; +import 'package:openapi/src/model/person_response_dto.dart'; +import 'package:openapi/src/model/person_statistics_response_dto.dart'; +import 'package:openapi/src/model/person_update_dto.dart'; +import 'package:openapi/src/model/person_with_faces_response_dto.dart'; +import 'package:openapi/src/model/places_response_dto.dart'; +import 'package:openapi/src/model/queue_status_dto.dart'; +import 'package:openapi/src/model/reaction_level.dart'; +import 'package:openapi/src/model/reaction_type.dart'; +import 'package:openapi/src/model/recognition_config.dart'; +import 'package:openapi/src/model/reverse_geocoding_state_response_dto.dart'; +import 'package:openapi/src/model/scan_library_dto.dart'; +import 'package:openapi/src/model/search_album_response_dto.dart'; +import 'package:openapi/src/model/search_asset_response_dto.dart'; +import 'package:openapi/src/model/search_explore_item.dart'; +import 'package:openapi/src/model/search_explore_response_dto.dart'; +import 'package:openapi/src/model/search_facet_count_response_dto.dart'; +import 'package:openapi/src/model/search_facet_response_dto.dart'; +import 'package:openapi/src/model/search_response_dto.dart'; +import 'package:openapi/src/model/search_suggestion_type.dart'; +import 'package:openapi/src/model/server_config_dto.dart'; +import 'package:openapi/src/model/server_features_dto.dart'; +import 'package:openapi/src/model/server_info_response_dto.dart'; +import 'package:openapi/src/model/server_media_types_response_dto.dart'; +import 'package:openapi/src/model/server_ping_response.dart'; +import 'package:openapi/src/model/server_stats_response_dto.dart'; +import 'package:openapi/src/model/server_theme_dto.dart'; +import 'package:openapi/src/model/server_version_response_dto.dart'; +import 'package:openapi/src/model/session_response_dto.dart'; +import 'package:openapi/src/model/shared_link_create_dto.dart'; +import 'package:openapi/src/model/shared_link_edit_dto.dart'; +import 'package:openapi/src/model/shared_link_response_dto.dart'; +import 'package:openapi/src/model/shared_link_type.dart'; +import 'package:openapi/src/model/sign_up_dto.dart'; +import 'package:openapi/src/model/smart_info_response_dto.dart'; +import 'package:openapi/src/model/smart_search_dto.dart'; +import 'package:openapi/src/model/system_config_dto.dart'; +import 'package:openapi/src/model/system_config_f_fmpeg_dto.dart'; +import 'package:openapi/src/model/system_config_image_dto.dart'; +import 'package:openapi/src/model/system_config_job_dto.dart'; +import 'package:openapi/src/model/system_config_library_dto.dart'; +import 'package:openapi/src/model/system_config_library_scan_dto.dart'; +import 'package:openapi/src/model/system_config_library_watch_dto.dart'; +import 'package:openapi/src/model/system_config_logging_dto.dart'; +import 'package:openapi/src/model/system_config_machine_learning_dto.dart'; +import 'package:openapi/src/model/system_config_map_dto.dart'; +import 'package:openapi/src/model/system_config_new_version_check_dto.dart'; +import 'package:openapi/src/model/system_config_o_auth_dto.dart'; +import 'package:openapi/src/model/system_config_password_login_dto.dart'; +import 'package:openapi/src/model/system_config_reverse_geocoding_dto.dart'; +import 'package:openapi/src/model/system_config_server_dto.dart'; +import 'package:openapi/src/model/system_config_storage_template_dto.dart'; +import 'package:openapi/src/model/system_config_template_storage_option_dto.dart'; +import 'package:openapi/src/model/system_config_theme_dto.dart'; +import 'package:openapi/src/model/system_config_trash_dto.dart'; +import 'package:openapi/src/model/system_config_user_dto.dart'; +import 'package:openapi/src/model/tag_response_dto.dart'; +import 'package:openapi/src/model/tag_type_enum.dart'; +import 'package:openapi/src/model/thumbnail_format.dart'; +import 'package:openapi/src/model/time_bucket_response_dto.dart'; +import 'package:openapi/src/model/time_bucket_size.dart'; +import 'package:openapi/src/model/tone_mapping.dart'; +import 'package:openapi/src/model/transcode_hw_accel.dart'; +import 'package:openapi/src/model/transcode_policy.dart'; +import 'package:openapi/src/model/update_album_dto.dart'; +import 'package:openapi/src/model/update_asset_dto.dart'; +import 'package:openapi/src/model/update_library_dto.dart'; +import 'package:openapi/src/model/update_partner_dto.dart'; +import 'package:openapi/src/model/update_stack_parent_dto.dart'; +import 'package:openapi/src/model/update_tag_dto.dart'; +import 'package:openapi/src/model/update_user_dto.dart'; +import 'package:openapi/src/model/usage_by_user_dto.dart'; +import 'package:openapi/src/model/user_avatar_color.dart'; +import 'package:openapi/src/model/user_dto.dart'; +import 'package:openapi/src/model/user_response_dto.dart'; +import 'package:openapi/src/model/user_status.dart'; +import 'package:openapi/src/model/validate_access_token_response_dto.dart'; +import 'package:openapi/src/model/validate_library_dto.dart'; +import 'package:openapi/src/model/validate_library_import_path_response_dto.dart'; +import 'package:openapi/src/model/validate_library_response_dto.dart'; +import 'package:openapi/src/model/video_codec.dart'; + +part 'serializers.g.dart'; + +@SerializersFor([ + APIKeyCreateDto, + APIKeyCreateResponseDto, + APIKeyResponseDto, + APIKeyUpdateDto, + ActivityCreateDto, + ActivityResponseDto, + ActivityStatisticsResponseDto, + AddUsersDto, + AdminOnboardingUpdateDto, + AlbumCountResponseDto, + AlbumResponseDto, + AllJobStatusResponseDto, + AssetBulkDeleteDto, + AssetBulkUpdateDto, + AssetBulkUploadCheckDto, + AssetBulkUploadCheckItem, + AssetBulkUploadCheckResponseDto, + AssetBulkUploadCheckResult, + AssetDeltaSyncResponseDto, + AssetFaceResponseDto, + AssetFaceUpdateDto, + AssetFaceUpdateItem, + AssetFaceWithoutPersonResponseDto, + AssetFileUploadResponseDto, + AssetIdsDto, + AssetIdsResponseDto, + AssetJobName, + AssetJobsDto, + AssetOrder, + AssetResponseDto, + AssetStatsResponseDto, + AssetTypeEnum, + AudioCodec, + AuditDeletesResponseDto, + BulkIdResponseDto, + BulkIdsDto, + CLIPConfig, + CLIPMode, + CQMode, + ChangePasswordDto, + CheckExistingAssetsDto, + CheckExistingAssetsResponseDto, + Colorspace, + CreateAlbumDto, + CreateAssetDto, + CreateLibraryDto, + CreateProfileImageDto, + CreateProfileImageResponseDto, + CreateTagDto, + CreateUserDto, + CuratedLocationsResponseDto, + CuratedObjectsResponseDto, + DeleteUserDto, + DownloadArchiveInfo, + DownloadInfoDto, + DownloadResponseDto, + EntityType, + ExifResponseDto, + FaceDto, + FileChecksumDto, + FileChecksumResponseDto, + FileReportDto, + FileReportFixDto, + FileReportItemDto, + ImageFormat, + JobCommand, + JobCommandDto, + JobCountsDto, + JobName, + JobSettingsDto, + JobStatusDto, + LibraryResponseDto, + LibraryStatsResponseDto, + LibraryType, + LogLevel, + LoginCredentialDto, + LoginResponseDto, + LogoutResponseDto, + MapMarkerResponseDto, + MapTheme, + MemoryCreateDto, + MemoryLaneResponseDto, + MemoryResponseDto, + MemoryType, + MemoryUpdateDto, + MergePersonDto, + MetadataSearchDto, + ModelType, + OAuthAuthorizeResponseDto, + OAuthCallbackDto, + OAuthConfigDto, + OnThisDayDto, + PartnerResponseDto, + PathEntityType, + PathType, + PeopleResponseDto, + PeopleUpdateDto, + PeopleUpdateItem, + PersonCreateDto, + PersonResponseDto, + PersonStatisticsResponseDto, + PersonUpdateDto, + PersonWithFacesResponseDto, + PlacesResponseDto, + QueueStatusDto, + ReactionLevel, + ReactionType, + RecognitionConfig, + ReverseGeocodingStateResponseDto, + ScanLibraryDto, + SearchAlbumResponseDto, + SearchAssetResponseDto, + SearchExploreItem, + SearchExploreResponseDto, + SearchFacetCountResponseDto, + SearchFacetResponseDto, + SearchResponseDto, + SearchSuggestionType, + ServerConfigDto, + ServerFeaturesDto, + ServerInfoResponseDto, + ServerMediaTypesResponseDto, + ServerPingResponse, + ServerStatsResponseDto, + ServerThemeDto, + ServerVersionResponseDto, + SessionResponseDto, + SharedLinkCreateDto, + SharedLinkEditDto, + SharedLinkResponseDto, + SharedLinkType, + SignUpDto, + SmartInfoResponseDto, + SmartSearchDto, + SystemConfigDto, + SystemConfigFFmpegDto, + SystemConfigImageDto, + SystemConfigJobDto, + SystemConfigLibraryDto, + SystemConfigLibraryScanDto, + SystemConfigLibraryWatchDto, + SystemConfigLoggingDto, + SystemConfigMachineLearningDto, + SystemConfigMapDto, + SystemConfigNewVersionCheckDto, + SystemConfigOAuthDto, + SystemConfigPasswordLoginDto, + SystemConfigReverseGeocodingDto, + SystemConfigServerDto, + SystemConfigStorageTemplateDto, + SystemConfigTemplateStorageOptionDto, + SystemConfigThemeDto, + SystemConfigTrashDto, + SystemConfigUserDto, + TagResponseDto, + TagTypeEnum, + ThumbnailFormat, + TimeBucketResponseDto, + TimeBucketSize, + ToneMapping, + TranscodeHWAccel, + TranscodePolicy, + UpdateAlbumDto, + UpdateAssetDto, + UpdateLibraryDto, + UpdatePartnerDto, + UpdateStackParentDto, + UpdateTagDto, + UpdateUserDto, + UsageByUserDto, + UserAvatarColor, + UserDto, + UserResponseDto, + UserStatus, + ValidateAccessTokenResponseDto, + ValidateLibraryDto, + ValidateLibraryImportPathResponseDto, + ValidateLibraryResponseDto, + VideoCodec, +]) +Serializers serializers = (_$serializers.toBuilder() + ..addBuilderFactory( + const FullType(BuiltList, [FullType(PlacesResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(PersonResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(APIKeyResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(UserResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(AlbumResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(TimeBucketResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(MapMarkerResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(MemoryResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(BulkIdResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(SessionResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(FileChecksumResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(SearchExploreResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(SharedLinkResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(AssetResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(TagResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(ActivityResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(CuratedObjectsResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(LibraryResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(PartnerResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(AssetFaceResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(String)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(AssetIdsResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(MemoryLaneResponseDto)]), + () => ListBuilder(), + ) + ..addBuilderFactory( + const FullType(BuiltList, [FullType(CuratedLocationsResponseDto)]), + () => ListBuilder(), + ) + ..add(const OneOfSerializer()) + ..add(const AnyOfSerializer()) + ..add(const DateSerializer()) + ..add(Iso8601DateTimeSerializer())) + .build(); + +Serializers standardSerializers = + (serializers.toBuilder()..addPlugin(StandardJsonPlugin())).build(); diff --git a/mobile-v2/openapi/pubspec.yaml b/mobile-v2/openapi/pubspec.yaml new file mode 100644 index 0000000000..de93663746 --- /dev/null +++ b/mobile-v2/openapi/pubspec.yaml @@ -0,0 +1,19 @@ +name: openapi +version: 1.0.0 +description: OpenAPI API client +homepage: homepage + +environment: + sdk: '>=2.15.0 <3.0.0' + +dependencies: + dio: '^5.2.0' + one_of: '>=1.5.0 <2.0.0' + one_of_serializer: '>=1.5.0 <2.0.0' + built_value: '>=8.4.0 <9.0.0' + built_collection: '>=5.1.1 <6.0.0' + +dev_dependencies: + built_value_generator: '>=8.4.0 <9.0.0' + build_runner: any + test: ^1.16.0 diff --git a/mobile-v2/pubspec.lock b/mobile-v2/pubspec.lock new file mode 100644 index 0000000000..697d08411f --- /dev/null +++ b/mobile-v2/pubspec.lock @@ -0,0 +1,800 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + url: "https://pub.dev" + source: hosted + version: "67.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + url: "https://pub.dev" + source: hosted + version: "6.4.1" + analyzer_plugin: + dependency: transitive + description: + name: analyzer_plugin + sha256: "9661b30b13a685efaee9f02e5d01ed9f2b423bd889d28a304d02d704aee69161" + url: "https://pub.dev" + source: hosted + version: "0.11.3" + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" + async: + dependency: transitive + description: + name: async + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + url: "https://pub.dev" + source: hosted + version: "2.11.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + sha256: "3cc59d11a477506c593237572ecff94338dc83d9ce1b0bbb4953eae9e5a4f13f" + url: "https://pub.dev" + source: hosted + version: "8.1.0" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + sha256: ba28133d3a3bf0a66772bcc98dade5843753cd9f1a8fb4802b842895515b67d3 + url: "https://pub.dev" + source: hosted + version: "8.0.0" + bloc: + dependency: transitive + description: + name: bloc + sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e" + url: "https://pub.dev" + source: hosted + version: "8.1.4" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + build: + dependency: transitive + description: + name: build + sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + build_config: + dependency: transitive + description: + name: build_config + sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1 + url: "https://pub.dev" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + url: "https://pub.dev" + source: hosted + version: "4.0.1" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + sha256: "339086358431fa15d7eca8b6a36e5d783728cf025e559b834f4609a1fcfb7b0a" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22" + url: "https://pub.dev" + source: hosted + version: "2.4.9" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb + url: "https://pub.dev" + source: hosted + version: "8.9.2" + characters: + dependency: transitive + description: + name: characters + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + url: "https://pub.dev" + source: hosted + version: "1.3.0" + charcode: + dependency: transitive + description: + name: charcode + sha256: fb98c0f6d12c920a02ee2d998da788bca066ca5f148492b7085ee23372b12306 + url: "https://pub.dev" + source: hosted + version: "1.3.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: c05b7406fdabc7a49a3929d4af76bcaccbbffcbcdcf185b082e1ae07da323d19 + url: "https://pub.dev" + source: hosted + version: "0.4.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: f692079e25e7869c14132d39f223f8eec9830eb76131925143b2129c4bb01b37 + url: "https://pub.dev" + source: hosted + version: "4.10.0" + collection: + dependency: "direct main" + description: + name: collection + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + url: "https://pub.dev" + source: hosted + version: "1.18.0" + convert: + dependency: transitive + description: + name: convert + sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" + url: "https://pub.dev" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab + url: "https://pub.dev" + source: hosted + version: "3.0.3" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" + url: "https://pub.dev" + source: hosted + version: "2.3.6" + drift: + dependency: "direct main" + description: + path: drift + ref: develop + resolved-ref: "9c28a060206ffb991e30009a8e4fb9137d572051" + url: "https://github.com/simolus3/drift.git" + source: git + version: "2.18.0-dev" + drift_dev: + dependency: "direct dev" + description: + path: drift_dev + ref: develop + resolved-ref: "9c28a060206ffb991e30009a8e4fb9137d572051" + url: "https://github.com/simolus3/drift.git" + source: git + version: "2.18.0-dev" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + ffi: + dependency: transitive + description: + name: ffi + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + file: + dependency: transitive + description: + name: file + sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2 + url: "https://pub.dev" + source: hosted + version: "8.1.5" + flutter_hooks: + dependency: "direct main" + description: + name: flutter_hooks + sha256: cde36b12f7188c85286fba9b38cc5a902e7279f36dd676967106c041dc9dde70 + url: "https://pub.dev" + source: hosted + version: "0.20.5" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "9e8c3858111da373efc5aa341de011d9bd23e2c5c5e0c62bccf32438e192d7b1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 + url: "https://pub.dev" + source: hosted + version: "4.0.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: d85128a5dae4ea777324730dc65edd9c9f43155c109d5cc0a69cab74139fbac1 + url: "https://pub.dev" + source: hosted + version: "7.7.0" + glob: + dependency: transitive + description: + name: glob + sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + graphs: + dependency: transitive + description: + name: graphs + sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19 + url: "https://pub.dev" + source: hosted + version: "2.3.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b" + url: "https://pub.dev" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + injectable: + dependency: "direct main" + description: + name: injectable + sha256: "3d98967224a5fdd4094a61bf53ed9616c3fbcf3e090bf83e7cb7d436d0c20041" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + injectable_generator: + dependency: "direct dev" + description: + name: injectable_generator + sha256: "2ca3ada337eac0ef6b82f8049c970ddb63947738fdf32ac6cbef8d1567d7ba05" + url: "https://pub.dev" + source: hosted + version: "2.6.1" + io: + dependency: transitive + description: + name: io + sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + js: + dependency: transitive + description: + name: js + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + url: "https://pub.dev" + source: hosted + version: "0.7.1" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + url: "https://pub.dev" + source: hosted + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + lints: + dependency: transitive + description: + name: lints + sha256: cbf8d4b858bb0134ef3ef87841abdf8d63bfc255c266b7bf6b39daa1085c4290 + url: "https://pub.dev" + source: hosted + version: "3.0.0" + logging: + dependency: "direct main" + description: + name: logging + sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + url: "https://pub.dev" + source: hosted + version: "0.12.16+1" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + meta: + dependency: transitive + description: + name: meta + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + mime: + dependency: transitive + description: + name: mime + sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2" + url: "https://pub.dev" + source: hosted + version: "1.0.5" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + path: + dependency: "direct main" + description: + name: path + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + url: "https://pub.dev" + source: hosted + version: "1.9.0" + path_provider: + dependency: "direct main" + description: + name: path_provider + sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161 + url: "https://pub.dev" + source: hosted + version: "2.1.3" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d + url: "https://pub.dev" + source: hosted + version: "2.2.4" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170" + url: "https://pub.dev" + source: hosted + version: "2.2.1" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + url: "https://pub.dev" + source: hosted + version: "6.0.2" + platform: + dependency: transitive + description: + name: platform + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + url: "https://pub.dev" + source: hosted + version: "3.1.4" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a" + url: "https://pub.dev" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c + url: "https://pub.dev" + source: hosted + version: "6.1.2" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + url: "https://pub.dev" + source: hosted + version: "1.2.3" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + shelf: + dependency: transitive + description: + name: shelf + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 + url: "https://pub.dev" + source: hosted + version: "1.4.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + url: "https://pub.dev" + source: hosted + version: "1.0.4" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_gen: + dependency: "direct dev" + description: + name: source_gen + sha256: "14658ba5f669685cd3d63701d01b31ea748310f7ab854e471962670abcf57832" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + url: "https://pub.dev" + source: hosted + version: "1.10.0" + sqlite3: + dependency: "direct main" + description: + name: sqlite3 + sha256: "1abbeb84bf2b1a10e5e1138c913123c8aa9d83cd64e5f9a0dd847b3c83063202" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqlite3_flutter_libs: + dependency: "direct main" + description: + name: sqlite3_flutter_libs + sha256: d6c31c8511c441d1f12f20b607343df1afe4eddf24a1cf85021677c8eea26060 + url: "https://pub.dev" + source: hosted + version: "0.5.20" + sqlparser: + dependency: "direct overridden" + description: + path: sqlparser + ref: develop + resolved-ref: "9c28a060206ffb991e30009a8e4fb9137d572051" + url: "https://github.com/simolus3/drift.git" + source: git + version: "0.36.0-dev" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + url: "https://pub.dev" + source: hosted + version: "1.11.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + url: "https://pub.dev" + source: hosted + version: "2.1.2" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + url: "https://pub.dev" + source: hosted + version: "0.6.1" + timing: + dependency: transitive + description: + name: timing + sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" + source: hosted + version: "1.3.2" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" + watcher: + dependency: transitive + description: + name: watcher + sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + web: + dependency: transitive + description: + name: web + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + url: "https://pub.dev" + source: hosted + version: "0.5.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42" + url: "https://pub.dev" + source: hosted + version: "2.4.5" + win32: + dependency: transitive + description: + name: win32 + sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a" + url: "https://pub.dev" + source: hosted + version: "5.4.0" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d + url: "https://pub.dev" + source: hosted + version: "1.0.4" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" + url: "https://pub.dev" + source: hosted + version: "3.1.2" +sdks: + dart: ">=3.3.3 <4.0.0" + flutter: ">=3.16.0" diff --git a/mobile-v2/pubspec.yaml b/mobile-v2/pubspec.yaml new file mode 100644 index 0000000000..f8cd8b71e9 --- /dev/null +++ b/mobile-v2/pubspec.yaml @@ -0,0 +1,70 @@ +name: immich_mobile +description: Immich - selfhosted backup media file on mobile phone + +publish_to: 'none' +version: 1.102.0+132 + +environment: + sdk: '>=3.3.3 <4.0.0' + +dependencies: + flutter: + sdk: flutter + + # OS specific path + path_provider: ^2.0.0 + path: ^1.9.0 + # Database + drift: ^2.17.0 + sqlite3: ^2.4.2 + sqlite3_flutter_libs: ^0.5.0 + # Route handling + auto_route: ^8.1.0 + # Logging + logging: ^1.2.0 + # Hooks + flutter_hooks: ^0.20.5 + # Collection Utils + collection: ^1.18.0 + # BLOC + flutter_bloc: ^8.1.5 + # get_it + get_it: ^7.7.0 + injectable: ^2.4.1 + +dependency_overrides: + # TODO: Remove the drift related overrides once the manager PR change version is released to pub + drift: + git: + url: https://github.com/simolus3/drift.git + ref: develop + path: drift + drift_dev: + git: + url: https://github.com/simolus3/drift.git + ref: develop + path: drift_dev + sqlparser: + git: + url: https://github.com/simolus3/drift.git + ref: develop + path: sqlparser + +dev_dependencies: + flutter_test: + sdk: flutter + + # Recommended lints + flutter_lints: ^3.0.0 + # Code generator + build_runner: ^2.4.9 + source_gen: ^1.5.0 + # Database helper + drift_dev: ^2.17.0 + # Route helper + auto_route_generator: ^8.0.0 + # @injectable + injectable_generator: ^2.6.1 + +flutter: + uses-material-design: true