diff --git a/.gitattributes b/.gitattributes index 935698a983..14bba0a3eb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,8 +1,3 @@ -mobile/openapi/**/*.md -diff -merge -mobile/openapi/**/*.md linguist-generated=true -mobile/openapi/**/*.dart -diff -merge -mobile/openapi/**/*.dart linguist-generated=true - mobile/lib/**/*.g.dart -diff -merge mobile/lib/**/*.g.dart linguist-generated=true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e01d28ed9d..b9fb652f59 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -742,7 +742,6 @@ jobs: id: verify-changed-files with: files: | - mobile/openapi packages/sdk open-api/immich-openapi-specs.json diff --git a/.gitignore b/.gitignore index 8beeeedfe3..9acfc8a879 100644 --- a/.gitignore +++ b/.gitignore @@ -11,13 +11,10 @@ docker/library uploads coverage +mobile/generated mobile/gradle.properties -mobile/openapi/pubspec.lock mobile/*.jks mobile/libisar.dylib -mobile/openapi/test -mobile/openapi/doc -mobile/openapi/.openapi-generator/FILES mobile/ios/build packages/**/build diff --git a/docs/docs/api.md b/docs/docs/api.md index 2e8ab5eb1b..debd75e4d4 100644 --- a/docs/docs/api.md +++ b/docs/docs/api.md @@ -10,4 +10,4 @@ OpenAPI is used to generate the client (Typescript, Dart) SDK. `openapi-generato mise open-api ``` -You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/openapi` for Dart SDK. +You can find the generated client SDK in the `packages/sdk/client` for Typescript SDK and `mobile/generated/openapi` for Dart SDK. diff --git a/mobile/analysis_options.yaml b/mobile/analysis_options.yaml index 7c49052fc2..f5ead8de2e 100644 --- a/mobile/analysis_options.yaml +++ b/mobile/analysis_options.yaml @@ -40,7 +40,7 @@ linter: # https://dart.dev/guides/language/analysis-options analyzer: exclude: - - openapi/** + - generated/openapi/** - build/** - lib/generated_plugin_registrant.dart - lib/**/*.g.dart diff --git a/mobile/openapi/.gitignore b/mobile/openapi/.gitignore deleted file mode 100644 index 0f74d293b9..0000000000 --- a/mobile/openapi/.gitignore +++ /dev/null @@ -1,19 +0,0 @@ -# See https://dart.dev/guides/libraries/private-files - -.dart_tool/ -.packages -build/ - -# Except for application packages -pubspec.lock - -doc/api/ - -# IntelliJ -*.iml -*.ipr -*.iws -.idea/ - -# Mac -.DS_Store diff --git a/mobile/openapi/.openapi-generator-ignore b/mobile/openapi/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a..0000000000 --- a/mobile/openapi/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# 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/openapi/.openapi-generator/VERSION b/mobile/openapi/.openapi-generator/VERSION deleted file mode 100644 index 07832195c5..0000000000 --- a/mobile/openapi/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.24.0 diff --git a/mobile/openapi/.travis.yml b/mobile/openapi/.travis.yml deleted file mode 100644 index 2774ccbba0..0000000000 --- a/mobile/openapi/.travis.yml +++ /dev/null @@ -1,14 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# -# https://docs.travis-ci.com/user/languages/dart/ -# -language: dart -dart: -# Install a specific stable release -- "2.12" -install: -- pub get - -script: -- pub run test diff --git a/mobile/openapi/README.md b/mobile/openapi/README.md deleted file mode 100644 index d5653d4e2d..0000000000 --- a/mobile/openapi/README.md +++ /dev/null @@ -1,748 +0,0 @@ -# openapi -Immich API - -This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 3.1.0 -- Generator version: 7.24.0 -- Build package: org.openapitools.codegen.languages.DartClientCodegen - -## Requirements - -Dart 2.17 or later - -## Installation & Usage - -### Github -If this Dart package is published to Github, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` - -### Local -To use the package in your local drive, add the following dependency to your pubspec.yaml -``` -dependencies: - openapi: - path: /path/to/openapi -``` - -## Tests - -TODO - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```dart -import 'package:openapi/api.dart'; - -// TODO Configure API key authorization: cookie -//defaultApiClient.getAuthentication('cookie').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('cookie').apiKeyPrefix = 'Bearer'; -// TODO Configure API key authorization: api_key -//defaultApiClient.getAuthentication('api_key').apiKey = 'YOUR_API_KEY'; -// uncomment below to setup prefix (e.g. Bearer) for API key, if needed -//defaultApiClient.getAuthentication('api_key').apiKeyPrefix = 'Bearer'; -// TODO Configure HTTP Bearer authorization: bearer -// Case 1. Use String Token -//defaultApiClient.getAuthentication('bearer').setAccessToken('YOUR_ACCESS_TOKEN'); -// Case 2. Use Function which generate token. -// String yourTokenGeneratorFunction() { ... } -//defaultApiClient.getAuthentication('bearer').setAccessToken(yourTokenGeneratorFunction); - -final api_instance = APIKeysApi(); -final apiKeyCreateDto = ApiKeyCreateDto(); // ApiKeyCreateDto | - -try { - final result = api_instance.createApiKey(apiKeyCreateDto); - print(result); -} catch (e) { - print('Exception when calling APIKeysApi->createApiKey: $e\n'); -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to */api* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*APIKeysApi* | [**createApiKey**](doc//APIKeysApi.md#createapikey) | **POST** /api-keys | Create an API key -*APIKeysApi* | [**deleteApiKey**](doc//APIKeysApi.md#deleteapikey) | **DELETE** /api-keys/{id} | Delete an API key -*APIKeysApi* | [**getApiKey**](doc//APIKeysApi.md#getapikey) | **GET** /api-keys/{id} | Retrieve an API key -*APIKeysApi* | [**getApiKeys**](doc//APIKeysApi.md#getapikeys) | **GET** /api-keys | List all API keys -*APIKeysApi* | [**getMyApiKey**](doc//APIKeysApi.md#getmyapikey) | **GET** /api-keys/me | Retrieve the current API key -*APIKeysApi* | [**updateApiKey**](doc//APIKeysApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key -*ActivitiesApi* | [**createActivity**](doc//ActivitiesApi.md#createactivity) | **POST** /activities | Create an activity -*ActivitiesApi* | [**deleteActivity**](doc//ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity -*ActivitiesApi* | [**getActivities**](doc//ActivitiesApi.md#getactivities) | **GET** /activities | List all activities -*ActivitiesApi* | [**getActivityStatistics**](doc//ActivitiesApi.md#getactivitystatistics) | **GET** /activities/statistics | Retrieve activity statistics -*AlbumsApi* | [**addAssetsToAlbum**](doc//AlbumsApi.md#addassetstoalbum) | **PUT** /albums/{id}/assets | Add assets to an album -*AlbumsApi* | [**addAssetsToAlbums**](doc//AlbumsApi.md#addassetstoalbums) | **PUT** /albums/assets | Add assets to albums -*AlbumsApi* | [**addUsersToAlbum**](doc//AlbumsApi.md#adduserstoalbum) | **PUT** /albums/{id}/users | Share album with users -*AlbumsApi* | [**createAlbum**](doc//AlbumsApi.md#createalbum) | **POST** /albums | Create an album -*AlbumsApi* | [**deleteAlbum**](doc//AlbumsApi.md#deletealbum) | **DELETE** /albums/{id} | Delete an album -*AlbumsApi* | [**getAlbumInfo**](doc//AlbumsApi.md#getalbuminfo) | **GET** /albums/{id} | Retrieve an album -*AlbumsApi* | [**getAlbumMapMarkers**](doc//AlbumsApi.md#getalbummapmarkers) | **GET** /albums/{id}/map-markers | Retrieve album map markers -*AlbumsApi* | [**getAlbumStatistics**](doc//AlbumsApi.md#getalbumstatistics) | **GET** /albums/statistics | Retrieve album statistics -*AlbumsApi* | [**getAllAlbums**](doc//AlbumsApi.md#getallalbums) | **GET** /albums | List all albums -*AlbumsApi* | [**removeAssetFromAlbum**](doc//AlbumsApi.md#removeassetfromalbum) | **DELETE** /albums/{id}/assets | Remove assets from an album -*AlbumsApi* | [**removeUserFromAlbum**](doc//AlbumsApi.md#removeuserfromalbum) | **DELETE** /albums/{id}/user/{userId} | Remove user from album -*AlbumsApi* | [**updateAlbumInfo**](doc//AlbumsApi.md#updatealbuminfo) | **PATCH** /albums/{id} | Update an album -*AlbumsApi* | [**updateAlbumUser**](doc//AlbumsApi.md#updatealbumuser) | **PUT** /albums/{id}/user/{userId} | Update user role -*AssetsApi* | [**checkBulkUpload**](doc//AssetsApi.md#checkbulkupload) | **POST** /assets/bulk-upload-check | Check bulk upload -*AssetsApi* | [**copyAsset**](doc//AssetsApi.md#copyasset) | **PUT** /assets/copy | Copy asset -*AssetsApi* | [**deleteAssetMetadata**](doc//AssetsApi.md#deleteassetmetadata) | **DELETE** /assets/{id}/metadata/{key} | Delete asset metadata by key -*AssetsApi* | [**deleteAssets**](doc//AssetsApi.md#deleteassets) | **DELETE** /assets | Delete assets -*AssetsApi* | [**deleteBulkAssetMetadata**](doc//AssetsApi.md#deletebulkassetmetadata) | **DELETE** /assets/metadata | Delete asset metadata -*AssetsApi* | [**downloadAsset**](doc//AssetsApi.md#downloadasset) | **GET** /assets/{id}/original | Download original asset -*AssetsApi* | [**editAsset**](doc//AssetsApi.md#editasset) | **PUT** /assets/{id}/edits | Apply edits to an existing asset -*AssetsApi* | [**endSession**](doc//AssetsApi.md#endsession) | **DELETE** /assets/{id}/video/stream/{sessionId} | End HLS streaming session -*AssetsApi* | [**getAssetEdits**](doc//AssetsApi.md#getassetedits) | **GET** /assets/{id}/edits | Retrieve edits for an existing asset -*AssetsApi* | [**getAssetInfo**](doc//AssetsApi.md#getassetinfo) | **GET** /assets/{id} | Retrieve an asset -*AssetsApi* | [**getAssetMetadata**](doc//AssetsApi.md#getassetmetadata) | **GET** /assets/{id}/metadata | Get asset metadata -*AssetsApi* | [**getAssetMetadataByKey**](doc//AssetsApi.md#getassetmetadatabykey) | **GET** /assets/{id}/metadata/{key} | Retrieve asset metadata by key -*AssetsApi* | [**getAssetOcr**](doc//AssetsApi.md#getassetocr) | **GET** /assets/{id}/ocr | Retrieve asset OCR data -*AssetsApi* | [**getAssetStatistics**](doc//AssetsApi.md#getassetstatistics) | **GET** /assets/statistics | Get asset statistics -*AssetsApi* | [**getMainPlaylist**](doc//AssetsApi.md#getmainplaylist) | **GET** /assets/{id}/video/stream/main.m3u8 | Get HLS main playlist -*AssetsApi* | [**getMediaPlaylist**](doc//AssetsApi.md#getmediaplaylist) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 | Get HLS media playlist -*AssetsApi* | [**getSegment**](doc//AssetsApi.md#getsegment) | **GET** /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} | Get HLS segment or init file -*AssetsApi* | [**playAssetVideo**](doc//AssetsApi.md#playassetvideo) | **GET** /assets/{id}/video/playback | Play asset video -*AssetsApi* | [**removeAssetEdits**](doc//AssetsApi.md#removeassetedits) | **DELETE** /assets/{id}/edits | Remove edits from an existing asset -*AssetsApi* | [**runAssetJobs**](doc//AssetsApi.md#runassetjobs) | **POST** /assets/jobs | Run an asset job -*AssetsApi* | [**updateAsset**](doc//AssetsApi.md#updateasset) | **PUT** /assets/{id} | Update an asset -*AssetsApi* | [**updateAssetMetadata**](doc//AssetsApi.md#updateassetmetadata) | **PUT** /assets/{id}/metadata | Update asset metadata -*AssetsApi* | [**updateAssets**](doc//AssetsApi.md#updateassets) | **PUT** /assets | Update assets -*AssetsApi* | [**updateBulkAssetMetadata**](doc//AssetsApi.md#updatebulkassetmetadata) | **PUT** /assets/metadata | Upsert asset metadata -*AssetsApi* | [**uploadAsset**](doc//AssetsApi.md#uploadasset) | **POST** /assets | Upload asset -*AssetsApi* | [**viewAsset**](doc//AssetsApi.md#viewasset) | **GET** /assets/{id}/thumbnail | View asset thumbnail -*AuthenticationApi* | [**changePassword**](doc//AuthenticationApi.md#changepassword) | **POST** /auth/change-password | Change password -*AuthenticationApi* | [**changePinCode**](doc//AuthenticationApi.md#changepincode) | **PUT** /auth/pin-code | Change pin code -*AuthenticationApi* | [**finishOAuth**](doc//AuthenticationApi.md#finishoauth) | **POST** /oauth/callback | Finish OAuth -*AuthenticationApi* | [**getAuthStatus**](doc//AuthenticationApi.md#getauthstatus) | **GET** /auth/status | Retrieve auth status -*AuthenticationApi* | [**linkOAuthAccount**](doc//AuthenticationApi.md#linkoauthaccount) | **POST** /oauth/link | Link OAuth account -*AuthenticationApi* | [**lockAuthSession**](doc//AuthenticationApi.md#lockauthsession) | **POST** /auth/session/lock | Lock auth session -*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login | Login -*AuthenticationApi* | [**logout**](doc//AuthenticationApi.md#logout) | **POST** /auth/logout | Logout -*AuthenticationApi* | [**logoutOAuth**](doc//AuthenticationApi.md#logoutoauth) | **POST** /oauth/backchannel-logout | Backchannel OAuth logout -*AuthenticationApi* | [**redirectOAuthToMobile**](doc//AuthenticationApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect | Redirect OAuth to mobile -*AuthenticationApi* | [**resetPinCode**](doc//AuthenticationApi.md#resetpincode) | **DELETE** /auth/pin-code | Reset pin code -*AuthenticationApi* | [**setupPinCode**](doc//AuthenticationApi.md#setuppincode) | **POST** /auth/pin-code | Setup pin code -*AuthenticationApi* | [**signUpAdmin**](doc//AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up | Register admin -*AuthenticationApi* | [**startOAuth**](doc//AuthenticationApi.md#startoauth) | **POST** /oauth/authorize | Start OAuth -*AuthenticationApi* | [**unlinkOAuthAccount**](doc//AuthenticationApi.md#unlinkoauthaccount) | **POST** /oauth/unlink | Unlink OAuth account -*AuthenticationApi* | [**unlockAuthSession**](doc//AuthenticationApi.md#unlockauthsession) | **POST** /auth/session/unlock | Unlock auth session -*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken | Validate access token -*AuthenticationAdminApi* | [**unlinkAllOAuthAccountsAdmin**](doc//AuthenticationAdminApi.md#unlinkalloauthaccountsadmin) | **POST** /admin/auth/unlink-all | Unlink all OAuth accounts -*DatabaseBackupsAdminApi* | [**deleteDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#deletedatabasebackup) | **DELETE** /admin/database-backups | Delete database backup -*DatabaseBackupsAdminApi* | [**downloadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#downloaddatabasebackup) | **GET** /admin/database-backups/{filename} | Download database backup -*DatabaseBackupsAdminApi* | [**listDatabaseBackups**](doc//DatabaseBackupsAdminApi.md#listdatabasebackups) | **GET** /admin/database-backups | List database backups -*DatabaseBackupsAdminApi* | [**startDatabaseRestoreFlow**](doc//DatabaseBackupsAdminApi.md#startdatabaserestoreflow) | **POST** /admin/database-backups/start-restore | Start database backup restore flow -*DatabaseBackupsAdminApi* | [**uploadDatabaseBackup**](doc//DatabaseBackupsAdminApi.md#uploaddatabasebackup) | **POST** /admin/database-backups/upload | Upload database backup -*DeprecatedApi* | [**createPartnerDeprecated**](doc//DeprecatedApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner -*DeprecatedApi* | [**getQueuesLegacy**](doc//DeprecatedApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*DeprecatedApi* | [**runQueueCommandLegacy**](doc//DeprecatedApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs -*DeprecatedApi* | [**updateApiKey**](doc//DeprecatedApi.md#updateapikey) | **PUT** /api-keys/{id} | Update an API key -*DeprecatedApi* | [**updateAsset**](doc//DeprecatedApi.md#updateasset) | **PUT** /assets/{id} | Update an asset -*DeprecatedApi* | [**updateAssets**](doc//DeprecatedApi.md#updateassets) | **PUT** /assets | Update assets -*DeprecatedApi* | [**updateLibrary**](doc//DeprecatedApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library -*DeprecatedApi* | [**updateMemory**](doc//DeprecatedApi.md#updatememory) | **PUT** /memories/{id} | Update a memory -*DeprecatedApi* | [**updateMyPreferences**](doc//DeprecatedApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences -*DeprecatedApi* | [**updateMyUser**](doc//DeprecatedApi.md#updatemyuser) | **PUT** /users/me | Update current user -*DeprecatedApi* | [**updatePerson**](doc//DeprecatedApi.md#updateperson) | **PUT** /people/{id} | Update person -*DeprecatedApi* | [**updateSession**](doc//DeprecatedApi.md#updatesession) | **PUT** /sessions/{id} | Update a session -*DeprecatedApi* | [**updateStack**](doc//DeprecatedApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack -*DeprecatedApi* | [**updateTag**](doc//DeprecatedApi.md#updatetag) | **PUT** /tags/{id} | Update a tag -*DeprecatedApi* | [**updateUserAdmin**](doc//DeprecatedApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user -*DeprecatedApi* | [**updateUserPreferencesAdmin**](doc//DeprecatedApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences -*DeprecatedApi* | [**updateWorkflow**](doc//DeprecatedApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow -*DownloadApi* | [**downloadArchive**](doc//DownloadApi.md#downloadarchive) | **POST** /download/archive | Download asset archive -*DownloadApi* | [**getDownloadInfo**](doc//DownloadApi.md#getdownloadinfo) | **POST** /download/info | Retrieve download information -*DuplicatesApi* | [**deleteDuplicate**](doc//DuplicatesApi.md#deleteduplicate) | **DELETE** /duplicates/{id} | Dismiss a duplicate group -*DuplicatesApi* | [**deleteDuplicates**](doc//DuplicatesApi.md#deleteduplicates) | **DELETE** /duplicates | Delete duplicates -*DuplicatesApi* | [**getAssetDuplicates**](doc//DuplicatesApi.md#getassetduplicates) | **GET** /duplicates | Retrieve duplicates -*DuplicatesApi* | [**resolveDuplicates**](doc//DuplicatesApi.md#resolveduplicates) | **POST** /duplicates/resolve | Resolve duplicate groups -*FacesApi* | [**createFace**](doc//FacesApi.md#createface) | **POST** /faces | Create a face -*FacesApi* | [**deleteFace**](doc//FacesApi.md#deleteface) | **DELETE** /faces/{id} | Delete a face -*FacesApi* | [**getFaces**](doc//FacesApi.md#getfaces) | **GET** /faces | Retrieve faces for asset -*FacesApi* | [**reassignFacesById**](doc//FacesApi.md#reassignfacesbyid) | **PUT** /faces/{id} | Re-assign a face to another person -*JobsApi* | [**createJob**](doc//JobsApi.md#createjob) | **POST** /jobs | Create a manual job -*JobsApi* | [**getQueuesLegacy**](doc//JobsApi.md#getqueueslegacy) | **GET** /jobs | Retrieve queue counts and status -*JobsApi* | [**runQueueCommandLegacy**](doc//JobsApi.md#runqueuecommandlegacy) | **PUT** /jobs/{name} | Run jobs -*LibrariesApi* | [**createLibrary**](doc//LibrariesApi.md#createlibrary) | **POST** /libraries | Create a library -*LibrariesApi* | [**deleteLibrary**](doc//LibrariesApi.md#deletelibrary) | **DELETE** /libraries/{id} | Delete a library -*LibrariesApi* | [**getAllLibraries**](doc//LibrariesApi.md#getalllibraries) | **GET** /libraries | Retrieve libraries -*LibrariesApi* | [**getLibrary**](doc//LibrariesApi.md#getlibrary) | **GET** /libraries/{id} | Retrieve a library -*LibrariesApi* | [**getLibraryStatistics**](doc//LibrariesApi.md#getlibrarystatistics) | **GET** /libraries/{id}/statistics | Retrieve library statistics -*LibrariesApi* | [**scanLibrary**](doc//LibrariesApi.md#scanlibrary) | **POST** /libraries/{id}/scan | Scan a library -*LibrariesApi* | [**updateLibrary**](doc//LibrariesApi.md#updatelibrary) | **PUT** /libraries/{id} | Update a library -*LibrariesApi* | [**validate**](doc//LibrariesApi.md#validate) | **POST** /libraries/{id}/validate | Validate library settings -*MaintenanceAdminApi* | [**deleteIntegrityReport**](doc//MaintenanceAdminApi.md#deleteintegrityreport) | **DELETE** /admin/integrity/report/{id} | Delete integrity report item -*MaintenanceAdminApi* | [**detectPriorInstall**](doc//MaintenanceAdminApi.md#detectpriorinstall) | **GET** /admin/maintenance/detect-install | Detect existing install -*MaintenanceAdminApi* | [**getIntegrityReport**](doc//MaintenanceAdminApi.md#getintegrityreport) | **GET** /admin/integrity/report | Get integrity report by type -*MaintenanceAdminApi* | [**getIntegrityReportCsv**](doc//MaintenanceAdminApi.md#getintegrityreportcsv) | **GET** /admin/integrity/report/{type}/csv | Export integrity report by type as CSV -*MaintenanceAdminApi* | [**getIntegrityReportFile**](doc//MaintenanceAdminApi.md#getintegrityreportfile) | **GET** /admin/integrity/report/{id}/file | Download flagged file -*MaintenanceAdminApi* | [**getIntegrityReportSummary**](doc//MaintenanceAdminApi.md#getintegrityreportsummary) | **GET** /admin/integrity/summary | Get integrity report summary -*MaintenanceAdminApi* | [**getMaintenanceStatus**](doc//MaintenanceAdminApi.md#getmaintenancestatus) | **GET** /admin/maintenance/status | Get maintenance mode status -*MaintenanceAdminApi* | [**maintenanceLogin**](doc//MaintenanceAdminApi.md#maintenancelogin) | **POST** /admin/maintenance/login | Log into maintenance mode -*MaintenanceAdminApi* | [**setMaintenanceMode**](doc//MaintenanceAdminApi.md#setmaintenancemode) | **POST** /admin/maintenance | Set maintenance mode -*MapApi* | [**getMapMarkers**](doc//MapApi.md#getmapmarkers) | **GET** /map/markers | Retrieve map markers -*MapApi* | [**reverseGeocode**](doc//MapApi.md#reversegeocode) | **GET** /map/reverse-geocode | Reverse geocode coordinates -*MemoriesApi* | [**addMemoryAssets**](doc//MemoriesApi.md#addmemoryassets) | **PUT** /memories/{id}/assets | Add assets to a memory -*MemoriesApi* | [**createMemory**](doc//MemoriesApi.md#creatememory) | **POST** /memories | Create a memory -*MemoriesApi* | [**deleteMemory**](doc//MemoriesApi.md#deletememory) | **DELETE** /memories/{id} | Delete a memory -*MemoriesApi* | [**getMemory**](doc//MemoriesApi.md#getmemory) | **GET** /memories/{id} | Retrieve a memory -*MemoriesApi* | [**memoriesStatistics**](doc//MemoriesApi.md#memoriesstatistics) | **GET** /memories/statistics | Retrieve memories statistics -*MemoriesApi* | [**removeMemoryAssets**](doc//MemoriesApi.md#removememoryassets) | **DELETE** /memories/{id}/assets | Remove assets from a memory -*MemoriesApi* | [**searchMemories**](doc//MemoriesApi.md#searchmemories) | **GET** /memories | Retrieve memories -*MemoriesApi* | [**updateMemory**](doc//MemoriesApi.md#updatememory) | **PUT** /memories/{id} | Update a memory -*NotificationsApi* | [**deleteNotification**](doc//NotificationsApi.md#deletenotification) | **DELETE** /notifications/{id} | Delete a notification -*NotificationsApi* | [**deleteNotifications**](doc//NotificationsApi.md#deletenotifications) | **DELETE** /notifications | Delete notifications -*NotificationsApi* | [**getNotification**](doc//NotificationsApi.md#getnotification) | **GET** /notifications/{id} | Get a notification -*NotificationsApi* | [**getNotifications**](doc//NotificationsApi.md#getnotifications) | **GET** /notifications | Retrieve notifications -*NotificationsApi* | [**updateNotification**](doc//NotificationsApi.md#updatenotification) | **PUT** /notifications/{id} | Update a notification -*NotificationsApi* | [**updateNotifications**](doc//NotificationsApi.md#updatenotifications) | **PUT** /notifications | Update notifications -*NotificationsAdminApi* | [**createNotification**](doc//NotificationsAdminApi.md#createnotification) | **POST** /admin/notifications | Create a notification -*NotificationsAdminApi* | [**getNotificationTemplateAdmin**](doc//NotificationsAdminApi.md#getnotificationtemplateadmin) | **POST** /admin/notifications/templates/{name} | Render email template -*NotificationsAdminApi* | [**sendTestEmailAdmin**](doc//NotificationsAdminApi.md#sendtestemailadmin) | **POST** /admin/notifications/test-email | Send test email -*PartnersApi* | [**createPartner**](doc//PartnersApi.md#createpartner) | **POST** /partners | Create a partner -*PartnersApi* | [**createPartnerDeprecated**](doc//PartnersApi.md#createpartnerdeprecated) | **POST** /partners/{id} | Create a partner -*PartnersApi* | [**getPartners**](doc//PartnersApi.md#getpartners) | **GET** /partners | Retrieve partners -*PartnersApi* | [**removePartner**](doc//PartnersApi.md#removepartner) | **DELETE** /partners/{id} | Remove a partner -*PartnersApi* | [**updatePartner**](doc//PartnersApi.md#updatepartner) | **PUT** /partners/{id} | Update a partner -*PeopleApi* | [**createPerson**](doc//PeopleApi.md#createperson) | **POST** /people | Create a person -*PeopleApi* | [**deletePeople**](doc//PeopleApi.md#deletepeople) | **DELETE** /people | Delete people -*PeopleApi* | [**deletePerson**](doc//PeopleApi.md#deleteperson) | **DELETE** /people/{id} | Delete person -*PeopleApi* | [**getAllPeople**](doc//PeopleApi.md#getallpeople) | **GET** /people | Get all people -*PeopleApi* | [**getPerson**](doc//PeopleApi.md#getperson) | **GET** /people/{id} | Get a person -*PeopleApi* | [**getPersonStatistics**](doc//PeopleApi.md#getpersonstatistics) | **GET** /people/{id}/statistics | Get person statistics -*PeopleApi* | [**getPersonThumbnail**](doc//PeopleApi.md#getpersonthumbnail) | **GET** /people/{id}/thumbnail | Get person thumbnail -*PeopleApi* | [**mergePerson**](doc//PeopleApi.md#mergeperson) | **POST** /people/{id}/merge | Merge people -*PeopleApi* | [**reassignFaces**](doc//PeopleApi.md#reassignfaces) | **PUT** /people/{id}/reassign | Reassign faces -*PeopleApi* | [**updatePeople**](doc//PeopleApi.md#updatepeople) | **PUT** /people | Update people -*PeopleApi* | [**updatePerson**](doc//PeopleApi.md#updateperson) | **PUT** /people/{id} | Update person -*PluginsApi* | [**getPlugin**](doc//PluginsApi.md#getplugin) | **GET** /plugins/{id} | Retrieve a plugin -*PluginsApi* | [**searchPluginMethods**](doc//PluginsApi.md#searchpluginmethods) | **GET** /plugins/methods | Retrieve plugin methods -*PluginsApi* | [**searchPluginTemplates**](doc//PluginsApi.md#searchplugintemplates) | **GET** /plugins/templates | Retrieve workflow templates -*PluginsApi* | [**searchPlugins**](doc//PluginsApi.md#searchplugins) | **GET** /plugins | List all plugins -*QueuesApi* | [**emptyQueue**](doc//QueuesApi.md#emptyqueue) | **DELETE** /queues/{name}/jobs | Empty a queue -*QueuesApi* | [**getQueue**](doc//QueuesApi.md#getqueue) | **GET** /queues/{name} | Retrieve a queue -*QueuesApi* | [**getQueueJobs**](doc//QueuesApi.md#getqueuejobs) | **GET** /queues/{name}/jobs | Retrieve queue jobs -*QueuesApi* | [**getQueues**](doc//QueuesApi.md#getqueues) | **GET** /queues | List all queues -*QueuesApi* | [**updateQueue**](doc//QueuesApi.md#updatequeue) | **PUT** /queues/{name} | Update a queue -*SearchApi* | [**getAssetsByCity**](doc//SearchApi.md#getassetsbycity) | **GET** /search/cities | Retrieve assets by city -*SearchApi* | [**getExploreData**](doc//SearchApi.md#getexploredata) | **GET** /search/explore | Retrieve explore data -*SearchApi* | [**getSearchSuggestions**](doc//SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions | Retrieve search suggestions -*SearchApi* | [**searchAssetStatistics**](doc//SearchApi.md#searchassetstatistics) | **POST** /search/statistics | Search asset statistics -*SearchApi* | [**searchAssets**](doc//SearchApi.md#searchassets) | **POST** /search/metadata | Search assets by metadata -*SearchApi* | [**searchLargeAssets**](doc//SearchApi.md#searchlargeassets) | **POST** /search/large-assets | Search large assets -*SearchApi* | [**searchPerson**](doc//SearchApi.md#searchperson) | **GET** /search/person | Search people -*SearchApi* | [**searchPlaces**](doc//SearchApi.md#searchplaces) | **GET** /search/places | Search places -*SearchApi* | [**searchRandom**](doc//SearchApi.md#searchrandom) | **POST** /search/random | Search random assets -*SearchApi* | [**searchSmart**](doc//SearchApi.md#searchsmart) | **POST** /search/smart | Smart asset search -*ServerApi* | [**deleteServerLicense**](doc//ServerApi.md#deleteserverlicense) | **DELETE** /server/license | Delete server product key -*ServerApi* | [**getAboutInfo**](doc//ServerApi.md#getaboutinfo) | **GET** /server/about | Get server information -*ServerApi* | [**getApkLinks**](doc//ServerApi.md#getapklinks) | **GET** /server/apk-links | Get APK links -*ServerApi* | [**getServerConfig**](doc//ServerApi.md#getserverconfig) | **GET** /server/config | Get config -*ServerApi* | [**getServerFeatures**](doc//ServerApi.md#getserverfeatures) | **GET** /server/features | Get features -*ServerApi* | [**getServerLicense**](doc//ServerApi.md#getserverlicense) | **GET** /server/license | Get product key -*ServerApi* | [**getServerStatistics**](doc//ServerApi.md#getserverstatistics) | **GET** /server/statistics | Get statistics -*ServerApi* | [**getServerVersion**](doc//ServerApi.md#getserverversion) | **GET** /server/version | Get server version -*ServerApi* | [**getStorage**](doc//ServerApi.md#getstorage) | **GET** /server/storage | Get storage -*ServerApi* | [**getSupportedMediaTypes**](doc//ServerApi.md#getsupportedmediatypes) | **GET** /server/media-types | Get supported media types -*ServerApi* | [**getVersionCheck**](doc//ServerApi.md#getversioncheck) | **GET** /server/version-check | Get version check status -*ServerApi* | [**getVersionHistory**](doc//ServerApi.md#getversionhistory) | **GET** /server/version-history | Get version history -*ServerApi* | [**pingServer**](doc//ServerApi.md#pingserver) | **GET** /server/ping | Ping -*ServerApi* | [**setServerLicense**](doc//ServerApi.md#setserverlicense) | **PUT** /server/license | Set server product key -*SessionsApi* | [**createSession**](doc//SessionsApi.md#createsession) | **POST** /sessions | Create a session -*SessionsApi* | [**deleteAllSessions**](doc//SessionsApi.md#deleteallsessions) | **DELETE** /sessions | Delete all sessions -*SessionsApi* | [**deleteSession**](doc//SessionsApi.md#deletesession) | **DELETE** /sessions/{id} | Delete a session -*SessionsApi* | [**getSessions**](doc//SessionsApi.md#getsessions) | **GET** /sessions | Retrieve sessions -*SessionsApi* | [**lockSession**](doc//SessionsApi.md#locksession) | **POST** /sessions/{id}/lock | Lock a session -*SessionsApi* | [**updateSession**](doc//SessionsApi.md#updatesession) | **PUT** /sessions/{id} | Update a session -*SharedLinksApi* | [**addSharedLinkAssets**](doc//SharedLinksApi.md#addsharedlinkassets) | **PUT** /shared-links/{id}/assets | Add assets to a shared link -*SharedLinksApi* | [**createSharedLink**](doc//SharedLinksApi.md#createsharedlink) | **POST** /shared-links | Create a shared link -*SharedLinksApi* | [**getAllSharedLinks**](doc//SharedLinksApi.md#getallsharedlinks) | **GET** /shared-links | Retrieve all shared links -*SharedLinksApi* | [**getMySharedLink**](doc//SharedLinksApi.md#getmysharedlink) | **GET** /shared-links/me | Retrieve current shared link -*SharedLinksApi* | [**getSharedLinkById**](doc//SharedLinksApi.md#getsharedlinkbyid) | **GET** /shared-links/{id} | Retrieve a shared link -*SharedLinksApi* | [**removeSharedLink**](doc//SharedLinksApi.md#removesharedlink) | **DELETE** /shared-links/{id} | Delete a shared link -*SharedLinksApi* | [**removeSharedLinkAssets**](doc//SharedLinksApi.md#removesharedlinkassets) | **DELETE** /shared-links/{id}/assets | Remove assets from a shared link -*SharedLinksApi* | [**sharedLinkLogin**](doc//SharedLinksApi.md#sharedlinklogin) | **POST** /shared-links/login | Shared link login -*SharedLinksApi* | [**updateSharedLink**](doc//SharedLinksApi.md#updatesharedlink) | **PATCH** /shared-links/{id} | Update a shared link -*StacksApi* | [**createStack**](doc//StacksApi.md#createstack) | **POST** /stacks | Create a stack -*StacksApi* | [**deleteStack**](doc//StacksApi.md#deletestack) | **DELETE** /stacks/{id} | Delete a stack -*StacksApi* | [**deleteStacks**](doc//StacksApi.md#deletestacks) | **DELETE** /stacks | Delete stacks -*StacksApi* | [**getStack**](doc//StacksApi.md#getstack) | **GET** /stacks/{id} | Retrieve a stack -*StacksApi* | [**removeAssetFromStack**](doc//StacksApi.md#removeassetfromstack) | **DELETE** /stacks/{id}/assets/{assetId} | Remove an asset from a stack -*StacksApi* | [**searchStacks**](doc//StacksApi.md#searchstacks) | **GET** /stacks | Retrieve stacks -*StacksApi* | [**updateStack**](doc//StacksApi.md#updatestack) | **PUT** /stacks/{id} | Update a stack -*SyncApi* | [**deleteSyncAck**](doc//SyncApi.md#deletesyncack) | **DELETE** /sync/ack | Delete acknowledgements -*SyncApi* | [**getSyncAck**](doc//SyncApi.md#getsyncack) | **GET** /sync/ack | Retrieve acknowledgements -*SyncApi* | [**getSyncStream**](doc//SyncApi.md#getsyncstream) | **POST** /sync/stream | Stream sync changes -*SyncApi* | [**sendSyncAck**](doc//SyncApi.md#sendsyncack) | **POST** /sync/ack | Acknowledge changes -*SystemConfigApi* | [**getConfig**](doc//SystemConfigApi.md#getconfig) | **GET** /system-config | Get system configuration -*SystemConfigApi* | [**getConfigDefaults**](doc//SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults | Get system configuration defaults -*SystemConfigApi* | [**getStorageTemplateOptions**](doc//SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options | Get storage template options -*SystemConfigApi* | [**updateConfig**](doc//SystemConfigApi.md#updateconfig) | **PUT** /system-config | Update system configuration -*SystemMetadataApi* | [**getAdminOnboarding**](doc//SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding | Retrieve admin onboarding -*SystemMetadataApi* | [**getReverseGeocodingState**](doc//SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state | Retrieve reverse geocoding state -*SystemMetadataApi* | [**getVersionCheckState**](doc//SystemMetadataApi.md#getversioncheckstate) | **GET** /system-metadata/version-check-state | Retrieve version check state -*SystemMetadataApi* | [**updateAdminOnboarding**](doc//SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding | Update admin onboarding -*TagsApi* | [**bulkTagAssets**](doc//TagsApi.md#bulktagassets) | **PUT** /tags/assets | Tag assets -*TagsApi* | [**createTag**](doc//TagsApi.md#createtag) | **POST** /tags | Create a tag -*TagsApi* | [**deleteTag**](doc//TagsApi.md#deletetag) | **DELETE** /tags/{id} | Delete a tag -*TagsApi* | [**getAllTags**](doc//TagsApi.md#getalltags) | **GET** /tags | Retrieve tags -*TagsApi* | [**getTagById**](doc//TagsApi.md#gettagbyid) | **GET** /tags/{id} | Retrieve a tag -*TagsApi* | [**tagAssets**](doc//TagsApi.md#tagassets) | **PUT** /tags/{id}/assets | Tag assets -*TagsApi* | [**untagAssets**](doc//TagsApi.md#untagassets) | **DELETE** /tags/{id}/assets | Untag assets -*TagsApi* | [**updateTag**](doc//TagsApi.md#updatetag) | **PUT** /tags/{id} | Update a tag -*TagsApi* | [**upsertTags**](doc//TagsApi.md#upserttags) | **PUT** /tags | Upsert tags -*TimelineApi* | [**getTimeBucket**](doc//TimelineApi.md#gettimebucket) | **GET** /timeline/bucket | Get time bucket -*TimelineApi* | [**getTimeBuckets**](doc//TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets | Get time buckets -*TrashApi* | [**emptyTrash**](doc//TrashApi.md#emptytrash) | **POST** /trash/empty | Empty trash -*TrashApi* | [**restoreAssets**](doc//TrashApi.md#restoreassets) | **POST** /trash/restore/assets | Restore assets -*TrashApi* | [**restoreTrash**](doc//TrashApi.md#restoretrash) | **POST** /trash/restore | Restore trash -*UsersApi* | [**createProfileImage**](doc//UsersApi.md#createprofileimage) | **POST** /users/profile-image | Create user profile image -*UsersApi* | [**deleteProfileImage**](doc//UsersApi.md#deleteprofileimage) | **DELETE** /users/profile-image | Delete user profile image -*UsersApi* | [**deleteUserLicense**](doc//UsersApi.md#deleteuserlicense) | **DELETE** /users/me/license | Delete user product key -*UsersApi* | [**deleteUserOnboarding**](doc//UsersApi.md#deleteuseronboarding) | **DELETE** /users/me/onboarding | Delete user onboarding -*UsersApi* | [**getMyCalendarHeatmap**](doc//UsersApi.md#getmycalendarheatmap) | **GET** /users/me/calendar-heatmap | Retrieve calendar heatmap activity -*UsersApi* | [**getMyPreferences**](doc//UsersApi.md#getmypreferences) | **GET** /users/me/preferences | Get my preferences -*UsersApi* | [**getMyUser**](doc//UsersApi.md#getmyuser) | **GET** /users/me | Get current user -*UsersApi* | [**getProfileImage**](doc//UsersApi.md#getprofileimage) | **GET** /users/{id}/profile-image | Retrieve user profile image -*UsersApi* | [**getUser**](doc//UsersApi.md#getuser) | **GET** /users/{id} | Retrieve a user -*UsersApi* | [**getUserLicense**](doc//UsersApi.md#getuserlicense) | **GET** /users/me/license | Retrieve user product key -*UsersApi* | [**getUserOnboarding**](doc//UsersApi.md#getuseronboarding) | **GET** /users/me/onboarding | Retrieve user onboarding -*UsersApi* | [**searchUsers**](doc//UsersApi.md#searchusers) | **GET** /users | Get all users -*UsersApi* | [**setUserLicense**](doc//UsersApi.md#setuserlicense) | **PUT** /users/me/license | Set user product key -*UsersApi* | [**setUserOnboarding**](doc//UsersApi.md#setuseronboarding) | **PUT** /users/me/onboarding | Update user onboarding -*UsersApi* | [**updateMyPreferences**](doc//UsersApi.md#updatemypreferences) | **PUT** /users/me/preferences | Update my preferences -*UsersApi* | [**updateMyUser**](doc//UsersApi.md#updatemyuser) | **PUT** /users/me | Update current user -*UsersAdminApi* | [**createUserAdmin**](doc//UsersAdminApi.md#createuseradmin) | **POST** /admin/users | Create a user -*UsersAdminApi* | [**deleteUserAdmin**](doc//UsersAdminApi.md#deleteuseradmin) | **DELETE** /admin/users/{id} | Delete a user -*UsersAdminApi* | [**getUserAdmin**](doc//UsersAdminApi.md#getuseradmin) | **GET** /admin/users/{id} | Retrieve a user -*UsersAdminApi* | [**getUserCalendarHeatmapAdmin**](doc//UsersAdminApi.md#getusercalendarheatmapadmin) | **GET** /admin/users/{id}/calendar-heatmap | Retrieve calendar heatmap activity -*UsersAdminApi* | [**getUserPreferencesAdmin**](doc//UsersAdminApi.md#getuserpreferencesadmin) | **GET** /admin/users/{id}/preferences | Retrieve user preferences -*UsersAdminApi* | [**getUserSessionsAdmin**](doc//UsersAdminApi.md#getusersessionsadmin) | **GET** /admin/users/{id}/sessions | Retrieve user sessions -*UsersAdminApi* | [**getUserStatisticsAdmin**](doc//UsersAdminApi.md#getuserstatisticsadmin) | **GET** /admin/users/{id}/statistics | Retrieve user statistics -*UsersAdminApi* | [**restoreUserAdmin**](doc//UsersAdminApi.md#restoreuseradmin) | **POST** /admin/users/{id}/restore | Restore a deleted user -*UsersAdminApi* | [**searchUsersAdmin**](doc//UsersAdminApi.md#searchusersadmin) | **GET** /admin/users | Search users -*UsersAdminApi* | [**updateUserAdmin**](doc//UsersAdminApi.md#updateuseradmin) | **PUT** /admin/users/{id} | Update a user -*UsersAdminApi* | [**updateUserPreferencesAdmin**](doc//UsersAdminApi.md#updateuserpreferencesadmin) | **PUT** /admin/users/{id}/preferences | Update user preferences -*ViewsApi* | [**getAssetsByOriginalPath**](doc//ViewsApi.md#getassetsbyoriginalpath) | **GET** /view/folder | Retrieve assets by original path -*ViewsApi* | [**getUniqueOriginalPaths**](doc//ViewsApi.md#getuniqueoriginalpaths) | **GET** /view/folder/unique-paths | Retrieve unique paths -*WorkflowsApi* | [**createWorkflow**](doc//WorkflowsApi.md#createworkflow) | **POST** /workflows | Create a workflow -*WorkflowsApi* | [**deleteWorkflow**](doc//WorkflowsApi.md#deleteworkflow) | **DELETE** /workflows/{id} | Delete a workflow -*WorkflowsApi* | [**getWorkflow**](doc//WorkflowsApi.md#getworkflow) | **GET** /workflows/{id} | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowForShare**](doc//WorkflowsApi.md#getworkflowforshare) | **GET** /workflows/{id}/share | Retrieve a workflow -*WorkflowsApi* | [**getWorkflowTriggers**](doc//WorkflowsApi.md#getworkflowtriggers) | **GET** /workflows/triggers | List all workflow triggers -*WorkflowsApi* | [**searchWorkflows**](doc//WorkflowsApi.md#searchworkflows) | **GET** /workflows | List all workflows -*WorkflowsApi* | [**updateWorkflow**](doc//WorkflowsApi.md#updateworkflow) | **PUT** /workflows/{id} | Update a workflow - - -## Documentation For Models - - - [ActivityCreateDto](doc//ActivityCreateDto.md) - - [ActivityResponseDto](doc//ActivityResponseDto.md) - - [ActivityStatisticsResponseDto](doc//ActivityStatisticsResponseDto.md) - - [AddUsersDto](doc//AddUsersDto.md) - - [AdminOnboardingUpdateDto](doc//AdminOnboardingUpdateDto.md) - - [AlbumResponseDto](doc//AlbumResponseDto.md) - - [AlbumStatisticsResponseDto](doc//AlbumStatisticsResponseDto.md) - - [AlbumUserAddDto](doc//AlbumUserAddDto.md) - - [AlbumUserCreateDto](doc//AlbumUserCreateDto.md) - - [AlbumUserResponseDto](doc//AlbumUserResponseDto.md) - - [AlbumUserRole](doc//AlbumUserRole.md) - - [AlbumsAddAssetsDto](doc//AlbumsAddAssetsDto.md) - - [AlbumsAddAssetsResponseDto](doc//AlbumsAddAssetsResponseDto.md) - - [AlbumsResponse](doc//AlbumsResponse.md) - - [AlbumsUpdate](doc//AlbumsUpdate.md) - - [ApiKeyCreateDto](doc//ApiKeyCreateDto.md) - - [ApiKeyCreateResponseDto](doc//ApiKeyCreateResponseDto.md) - - [ApiKeyResponseDto](doc//ApiKeyResponseDto.md) - - [ApiKeyUpdateDto](doc//ApiKeyUpdateDto.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) - - [AssetCopyDto](doc//AssetCopyDto.md) - - [AssetEditAction](doc//AssetEditAction.md) - - [AssetEditActionItemDto](doc//AssetEditActionItemDto.md) - - [AssetEditActionItemDtoParameters](doc//AssetEditActionItemDtoParameters.md) - - [AssetEditActionItemResponseDto](doc//AssetEditActionItemResponseDto.md) - - [AssetEditsCreateDto](doc//AssetEditsCreateDto.md) - - [AssetEditsResponseDto](doc//AssetEditsResponseDto.md) - - [AssetFaceCreateDto](doc//AssetFaceCreateDto.md) - - [AssetFaceDeleteDto](doc//AssetFaceDeleteDto.md) - - [AssetFaceResponseDto](doc//AssetFaceResponseDto.md) - - [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md) - - [AssetFaceUpdateItem](doc//AssetFaceUpdateItem.md) - - [AssetIdErrorReason](doc//AssetIdErrorReason.md) - - [AssetIdsDto](doc//AssetIdsDto.md) - - [AssetIdsResponseDto](doc//AssetIdsResponseDto.md) - - [AssetJobName](doc//AssetJobName.md) - - [AssetJobsDto](doc//AssetJobsDto.md) - - [AssetMediaResponseDto](doc//AssetMediaResponseDto.md) - - [AssetMediaSize](doc//AssetMediaSize.md) - - [AssetMediaStatus](doc//AssetMediaStatus.md) - - [AssetMetadataBulkDeleteDto](doc//AssetMetadataBulkDeleteDto.md) - - [AssetMetadataBulkDeleteItemDto](doc//AssetMetadataBulkDeleteItemDto.md) - - [AssetMetadataBulkResponseDto](doc//AssetMetadataBulkResponseDto.md) - - [AssetMetadataBulkUpsertDto](doc//AssetMetadataBulkUpsertDto.md) - - [AssetMetadataBulkUpsertItemDto](doc//AssetMetadataBulkUpsertItemDto.md) - - [AssetMetadataResponseDto](doc//AssetMetadataResponseDto.md) - - [AssetMetadataUpsertDto](doc//AssetMetadataUpsertDto.md) - - [AssetMetadataUpsertItemDto](doc//AssetMetadataUpsertItemDto.md) - - [AssetOcrResponseDto](doc//AssetOcrResponseDto.md) - - [AssetOrder](doc//AssetOrder.md) - - [AssetOrderBy](doc//AssetOrderBy.md) - - [AssetRejectReason](doc//AssetRejectReason.md) - - [AssetResponseDto](doc//AssetResponseDto.md) - - [AssetStackResponseDto](doc//AssetStackResponseDto.md) - - [AssetStatsResponseDto](doc//AssetStatsResponseDto.md) - - [AssetTypeEnum](doc//AssetTypeEnum.md) - - [AssetUploadAction](doc//AssetUploadAction.md) - - [AssetVisibility](doc//AssetVisibility.md) - - [AudioCodec](doc//AudioCodec.md) - - [AuthStatusResponseDto](doc//AuthStatusResponseDto.md) - - [AvatarUpdate](doc//AvatarUpdate.md) - - [BulkIdErrorReason](doc//BulkIdErrorReason.md) - - [BulkIdResponseDto](doc//BulkIdResponseDto.md) - - [BulkIdsDto](doc//BulkIdsDto.md) - - [CLIPConfig](doc//CLIPConfig.md) - - [CQMode](doc//CQMode.md) - - [CalendarHeatmapResponseDto](doc//CalendarHeatmapResponseDto.md) - - [CalendarHeatmapResponseDtoSeriesInner](doc//CalendarHeatmapResponseDtoSeriesInner.md) - - [CalendarHeatmapType](doc//CalendarHeatmapType.md) - - [CastResponse](doc//CastResponse.md) - - [CastUpdate](doc//CastUpdate.md) - - [ChangePasswordDto](doc//ChangePasswordDto.md) - - [Colorspace](doc//Colorspace.md) - - [ContributorCountResponseDto](doc//ContributorCountResponseDto.md) - - [CreateAlbumDto](doc//CreateAlbumDto.md) - - [CreateLibraryDto](doc//CreateLibraryDto.md) - - [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md) - - [CropParameters](doc//CropParameters.md) - - [DatabaseBackupConfig](doc//DatabaseBackupConfig.md) - - [DatabaseBackupDeleteDto](doc//DatabaseBackupDeleteDto.md) - - [DatabaseBackupDto](doc//DatabaseBackupDto.md) - - [DatabaseBackupListResponseDto](doc//DatabaseBackupListResponseDto.md) - - [DownloadArchiveDto](doc//DownloadArchiveDto.md) - - [DownloadArchiveInfo](doc//DownloadArchiveInfo.md) - - [DownloadInfoDto](doc//DownloadInfoDto.md) - - [DownloadResponse](doc//DownloadResponse.md) - - [DownloadResponseDto](doc//DownloadResponseDto.md) - - [DownloadUpdate](doc//DownloadUpdate.md) - - [DuplicateDetectionConfig](doc//DuplicateDetectionConfig.md) - - [DuplicateResolveDto](doc//DuplicateResolveDto.md) - - [DuplicateResolveGroupDto](doc//DuplicateResolveGroupDto.md) - - [DuplicateResponseDto](doc//DuplicateResponseDto.md) - - [EmailNotificationsResponse](doc//EmailNotificationsResponse.md) - - [EmailNotificationsUpdate](doc//EmailNotificationsUpdate.md) - - [ExifResponseDto](doc//ExifResponseDto.md) - - [FaceDto](doc//FaceDto.md) - - [FacialRecognitionConfig](doc//FacialRecognitionConfig.md) - - [FoldersResponse](doc//FoldersResponse.md) - - [FoldersUpdate](doc//FoldersUpdate.md) - - [HlsVideoResolution](doc//HlsVideoResolution.md) - - [ImageFormat](doc//ImageFormat.md) - - [IntegrityReport](doc//IntegrityReport.md) - - [IntegrityReportResponseDto](doc//IntegrityReportResponseDto.md) - - [IntegrityReportResponseDtoItemsInner](doc//IntegrityReportResponseDtoItemsInner.md) - - [IntegrityReportSummaryResponseDto](doc//IntegrityReportSummaryResponseDto.md) - - [JobCreateDto](doc//JobCreateDto.md) - - [JobName](doc//JobName.md) - - [JobSettingsDto](doc//JobSettingsDto.md) - - [LibraryResponseDto](doc//LibraryResponseDto.md) - - [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md) - - [LicenseKeyDto](doc//LicenseKeyDto.md) - - [LogLevel](doc//LogLevel.md) - - [LoginCredentialDto](doc//LoginCredentialDto.md) - - [LoginResponseDto](doc//LoginResponseDto.md) - - [LogoutResponseDto](doc//LogoutResponseDto.md) - - [MachineLearningAvailabilityChecksDto](doc//MachineLearningAvailabilityChecksDto.md) - - [MaintenanceAction](doc//MaintenanceAction.md) - - [MaintenanceAuthDto](doc//MaintenanceAuthDto.md) - - [MaintenanceDetectInstallResponseDto](doc//MaintenanceDetectInstallResponseDto.md) - - [MaintenanceDetectInstallStorageFolderDto](doc//MaintenanceDetectInstallStorageFolderDto.md) - - [MaintenanceLoginDto](doc//MaintenanceLoginDto.md) - - [MaintenanceStatusResponseDto](doc//MaintenanceStatusResponseDto.md) - - [ManualJobName](doc//ManualJobName.md) - - [MapMarkerResponseDto](doc//MapMarkerResponseDto.md) - - [MapReverseGeocodeResponseDto](doc//MapReverseGeocodeResponseDto.md) - - [MemoriesResponse](doc//MemoriesResponse.md) - - [MemoriesUpdate](doc//MemoriesUpdate.md) - - [MemoryCreateDto](doc//MemoryCreateDto.md) - - [MemoryResponseDto](doc//MemoryResponseDto.md) - - [MemorySearchOrder](doc//MemorySearchOrder.md) - - [MemoryStatisticsResponseDto](doc//MemoryStatisticsResponseDto.md) - - [MemoryType](doc//MemoryType.md) - - [MemoryUpdateDto](doc//MemoryUpdateDto.md) - - [MergePersonDto](doc//MergePersonDto.md) - - [MetadataSearchDto](doc//MetadataSearchDto.md) - - [MirrorAxis](doc//MirrorAxis.md) - - [MirrorParameters](doc//MirrorParameters.md) - - [NotificationCreateDto](doc//NotificationCreateDto.md) - - [NotificationDeleteAllDto](doc//NotificationDeleteAllDto.md) - - [NotificationDto](doc//NotificationDto.md) - - [NotificationLevel](doc//NotificationLevel.md) - - [NotificationType](doc//NotificationType.md) - - [NotificationUpdateAllDto](doc//NotificationUpdateAllDto.md) - - [NotificationUpdateDto](doc//NotificationUpdateDto.md) - - [OAuthAuthorizeResponseDto](doc//OAuthAuthorizeResponseDto.md) - - [OAuthCallbackDto](doc//OAuthCallbackDto.md) - - [OAuthConfigDto](doc//OAuthConfigDto.md) - - [OAuthTokenEndpointAuthMethod](doc//OAuthTokenEndpointAuthMethod.md) - - [OcrConfig](doc//OcrConfig.md) - - [OnThisDayDto](doc//OnThisDayDto.md) - - [OnboardingDto](doc//OnboardingDto.md) - - [OnboardingResponseDto](doc//OnboardingResponseDto.md) - - [PartnerCreateDto](doc//PartnerCreateDto.md) - - [PartnerDirection](doc//PartnerDirection.md) - - [PartnerResponseDto](doc//PartnerResponseDto.md) - - [PartnerUpdateDto](doc//PartnerUpdateDto.md) - - [PeopleResponse](doc//PeopleResponse.md) - - [PeopleResponseDto](doc//PeopleResponseDto.md) - - [PeopleUpdate](doc//PeopleUpdate.md) - - [PeopleUpdateDto](doc//PeopleUpdateDto.md) - - [PeopleUpdateItem](doc//PeopleUpdateItem.md) - - [Permission](doc//Permission.md) - - [PersonCreateDto](doc//PersonCreateDto.md) - - [PersonResponseDto](doc//PersonResponseDto.md) - - [PersonStatisticsResponseDto](doc//PersonStatisticsResponseDto.md) - - [PersonUpdateDto](doc//PersonUpdateDto.md) - - [PinCodeChangeDto](doc//PinCodeChangeDto.md) - - [PinCodeResetDto](doc//PinCodeResetDto.md) - - [PinCodeSetupDto](doc//PinCodeSetupDto.md) - - [PlacesResponseDto](doc//PlacesResponseDto.md) - - [PluginMethodResponseDto](doc//PluginMethodResponseDto.md) - - [PluginResponseDto](doc//PluginResponseDto.md) - - [PluginTemplateResponseDto](doc//PluginTemplateResponseDto.md) - - [PluginTemplateStepResponseDto](doc//PluginTemplateStepResponseDto.md) - - [PurchaseResponse](doc//PurchaseResponse.md) - - [PurchaseUpdate](doc//PurchaseUpdate.md) - - [QueueCommand](doc//QueueCommand.md) - - [QueueCommandDto](doc//QueueCommandDto.md) - - [QueueDeleteDto](doc//QueueDeleteDto.md) - - [QueueJobResponseDto](doc//QueueJobResponseDto.md) - - [QueueJobStatus](doc//QueueJobStatus.md) - - [QueueName](doc//QueueName.md) - - [QueueResponseDto](doc//QueueResponseDto.md) - - [QueueResponseLegacyDto](doc//QueueResponseLegacyDto.md) - - [QueueStatisticsDto](doc//QueueStatisticsDto.md) - - [QueueStatusLegacyDto](doc//QueueStatusLegacyDto.md) - - [QueueUpdateDto](doc//QueueUpdateDto.md) - - [QueuesResponseLegacyDto](doc//QueuesResponseLegacyDto.md) - - [RandomSearchDto](doc//RandomSearchDto.md) - - [RatingsResponse](doc//RatingsResponse.md) - - [RatingsUpdate](doc//RatingsUpdate.md) - - [ReactionLevel](doc//ReactionLevel.md) - - [ReactionType](doc//ReactionType.md) - - [RecentlyAddedResponse](doc//RecentlyAddedResponse.md) - - [RecentlyAddedUpdate](doc//RecentlyAddedUpdate.md) - - [ReleaseChannel](doc//ReleaseChannel.md) - - [ReleaseEventV1](doc//ReleaseEventV1.md) - - [ReleaseType](doc//ReleaseType.md) - - [ReverseGeocodingStateResponseDto](doc//ReverseGeocodingStateResponseDto.md) - - [RotateParameters](doc//RotateParameters.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) - - [SearchStatisticsResponseDto](doc//SearchStatisticsResponseDto.md) - - [SearchSuggestionType](doc//SearchSuggestionType.md) - - [ServerAboutResponseDto](doc//ServerAboutResponseDto.md) - - [ServerApkLinksDto](doc//ServerApkLinksDto.md) - - [ServerConfigDto](doc//ServerConfigDto.md) - - [ServerFeaturesDto](doc//ServerFeaturesDto.md) - - [ServerMediaTypesResponseDto](doc//ServerMediaTypesResponseDto.md) - - [ServerPingResponse](doc//ServerPingResponse.md) - - [ServerStatsResponseDto](doc//ServerStatsResponseDto.md) - - [ServerStorageResponseDto](doc//ServerStorageResponseDto.md) - - [ServerVersionHistoryResponseDto](doc//ServerVersionHistoryResponseDto.md) - - [ServerVersionResponseDto](doc//ServerVersionResponseDto.md) - - [SessionCreateDto](doc//SessionCreateDto.md) - - [SessionCreateResponseDto](doc//SessionCreateResponseDto.md) - - [SessionResponseDto](doc//SessionResponseDto.md) - - [SessionUnlockDto](doc//SessionUnlockDto.md) - - [SessionUpdateDto](doc//SessionUpdateDto.md) - - [SetMaintenanceModeDto](doc//SetMaintenanceModeDto.md) - - [SharedLinkCreateDto](doc//SharedLinkCreateDto.md) - - [SharedLinkEditDto](doc//SharedLinkEditDto.md) - - [SharedLinkLoginDto](doc//SharedLinkLoginDto.md) - - [SharedLinkResponseDto](doc//SharedLinkResponseDto.md) - - [SharedLinkType](doc//SharedLinkType.md) - - [SharedLinksResponse](doc//SharedLinksResponse.md) - - [SharedLinksUpdate](doc//SharedLinksUpdate.md) - - [SignUpDto](doc//SignUpDto.md) - - [SmartSearchDto](doc//SmartSearchDto.md) - - [SourceType](doc//SourceType.md) - - [StackCreateDto](doc//StackCreateDto.md) - - [StackResponseDto](doc//StackResponseDto.md) - - [StackUpdateDto](doc//StackUpdateDto.md) - - [StatisticsSearchDto](doc//StatisticsSearchDto.md) - - [StorageFolder](doc//StorageFolder.md) - - [SyncAckDeleteDto](doc//SyncAckDeleteDto.md) - - [SyncAckDto](doc//SyncAckDto.md) - - [SyncAckSetDto](doc//SyncAckSetDto.md) - - [SyncAlbumDeleteV1](doc//SyncAlbumDeleteV1.md) - - [SyncAlbumToAssetDeleteV1](doc//SyncAlbumToAssetDeleteV1.md) - - [SyncAlbumToAssetV1](doc//SyncAlbumToAssetV1.md) - - [SyncAlbumUserDeleteV1](doc//SyncAlbumUserDeleteV1.md) - - [SyncAlbumUserV1](doc//SyncAlbumUserV1.md) - - [SyncAlbumV1](doc//SyncAlbumV1.md) - - [SyncAlbumV2](doc//SyncAlbumV2.md) - - [SyncAssetDeleteV1](doc//SyncAssetDeleteV1.md) - - [SyncAssetEditDeleteV1](doc//SyncAssetEditDeleteV1.md) - - [SyncAssetEditV1](doc//SyncAssetEditV1.md) - - [SyncAssetExifV1](doc//SyncAssetExifV1.md) - - [SyncAssetFaceDeleteV1](doc//SyncAssetFaceDeleteV1.md) - - [SyncAssetFaceV1](doc//SyncAssetFaceV1.md) - - [SyncAssetFaceV2](doc//SyncAssetFaceV2.md) - - [SyncAssetMetadataDeleteV1](doc//SyncAssetMetadataDeleteV1.md) - - [SyncAssetMetadataV1](doc//SyncAssetMetadataV1.md) - - [SyncAssetOcrDeleteV1](doc//SyncAssetOcrDeleteV1.md) - - [SyncAssetOcrV1](doc//SyncAssetOcrV1.md) - - [SyncAssetV1](doc//SyncAssetV1.md) - - [SyncAssetV2](doc//SyncAssetV2.md) - - [SyncAuthUserV1](doc//SyncAuthUserV1.md) - - [SyncEntityType](doc//SyncEntityType.md) - - [SyncMemoryAssetDeleteV1](doc//SyncMemoryAssetDeleteV1.md) - - [SyncMemoryAssetV1](doc//SyncMemoryAssetV1.md) - - [SyncMemoryDeleteV1](doc//SyncMemoryDeleteV1.md) - - [SyncMemoryV1](doc//SyncMemoryV1.md) - - [SyncPartnerDeleteV1](doc//SyncPartnerDeleteV1.md) - - [SyncPartnerV1](doc//SyncPartnerV1.md) - - [SyncPersonDeleteV1](doc//SyncPersonDeleteV1.md) - - [SyncPersonV1](doc//SyncPersonV1.md) - - [SyncRequestType](doc//SyncRequestType.md) - - [SyncStackDeleteV1](doc//SyncStackDeleteV1.md) - - [SyncStackV1](doc//SyncStackV1.md) - - [SyncStreamDto](doc//SyncStreamDto.md) - - [SyncUserDeleteV1](doc//SyncUserDeleteV1.md) - - [SyncUserMetadataDeleteV1](doc//SyncUserMetadataDeleteV1.md) - - [SyncUserMetadataV1](doc//SyncUserMetadataV1.md) - - [SyncUserV1](doc//SyncUserV1.md) - - [SystemConfigBackupsDto](doc//SystemConfigBackupsDto.md) - - [SystemConfigDto](doc//SystemConfigDto.md) - - [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md) - - [SystemConfigFFmpegRealtimeDto](doc//SystemConfigFFmpegRealtimeDto.md) - - [SystemConfigFacesDto](doc//SystemConfigFacesDto.md) - - [SystemConfigGeneratedFullsizeImageDto](doc//SystemConfigGeneratedFullsizeImageDto.md) - - [SystemConfigGeneratedImageDto](doc//SystemConfigGeneratedImageDto.md) - - [SystemConfigImageDto](doc//SystemConfigImageDto.md) - - [SystemConfigIntegrityChecks](doc//SystemConfigIntegrityChecks.md) - - [SystemConfigIntegrityChecksumJob](doc//SystemConfigIntegrityChecksumJob.md) - - [SystemConfigIntegrityJob](doc//SystemConfigIntegrityJob.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) - - [SystemConfigMetadataDto](doc//SystemConfigMetadataDto.md) - - [SystemConfigNewVersionCheckDto](doc//SystemConfigNewVersionCheckDto.md) - - [SystemConfigNightlyTasksDto](doc//SystemConfigNightlyTasksDto.md) - - [SystemConfigNotificationsDto](doc//SystemConfigNotificationsDto.md) - - [SystemConfigOAuthDto](doc//SystemConfigOAuthDto.md) - - [SystemConfigPasswordLoginDto](doc//SystemConfigPasswordLoginDto.md) - - [SystemConfigReverseGeocodingDto](doc//SystemConfigReverseGeocodingDto.md) - - [SystemConfigServerDto](doc//SystemConfigServerDto.md) - - [SystemConfigSmtpDto](doc//SystemConfigSmtpDto.md) - - [SystemConfigSmtpTransportDto](doc//SystemConfigSmtpTransportDto.md) - - [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md) - - [SystemConfigTemplateEmailsDto](doc//SystemConfigTemplateEmailsDto.md) - - [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md) - - [SystemConfigTemplatesDto](doc//SystemConfigTemplatesDto.md) - - [SystemConfigThemeDto](doc//SystemConfigThemeDto.md) - - [SystemConfigTrashDto](doc//SystemConfigTrashDto.md) - - [SystemConfigUserDto](doc//SystemConfigUserDto.md) - - [TagBulkAssetsDto](doc//TagBulkAssetsDto.md) - - [TagBulkAssetsResponseDto](doc//TagBulkAssetsResponseDto.md) - - [TagCreateDto](doc//TagCreateDto.md) - - [TagResponseDto](doc//TagResponseDto.md) - - [TagUpdateDto](doc//TagUpdateDto.md) - - [TagUpsertDto](doc//TagUpsertDto.md) - - [TagsResponse](doc//TagsResponse.md) - - [TagsUpdate](doc//TagsUpdate.md) - - [TemplateDto](doc//TemplateDto.md) - - [TemplateResponseDto](doc//TemplateResponseDto.md) - - [TestEmailResponseDto](doc//TestEmailResponseDto.md) - - [TimeBucketAssetResponseDto](doc//TimeBucketAssetResponseDto.md) - - [TimeBucketsResponseDto](doc//TimeBucketsResponseDto.md) - - [ToneMapping](doc//ToneMapping.md) - - [TranscodeHWAccel](doc//TranscodeHWAccel.md) - - [TranscodePolicy](doc//TranscodePolicy.md) - - [TrashResponseDto](doc//TrashResponseDto.md) - - [UpdateAlbumDto](doc//UpdateAlbumDto.md) - - [UpdateAlbumUserDto](doc//UpdateAlbumUserDto.md) - - [UpdateAssetDto](doc//UpdateAssetDto.md) - - [UpdateLibraryDto](doc//UpdateLibraryDto.md) - - [UsageByUserDto](doc//UsageByUserDto.md) - - [UserAdminCreateDto](doc//UserAdminCreateDto.md) - - [UserAdminDeleteDto](doc//UserAdminDeleteDto.md) - - [UserAdminResponseDto](doc//UserAdminResponseDto.md) - - [UserAdminUpdateDto](doc//UserAdminUpdateDto.md) - - [UserAvatarColor](doc//UserAvatarColor.md) - - [UserLicense](doc//UserLicense.md) - - [UserMetadataKey](doc//UserMetadataKey.md) - - [UserPreferencesResponseDto](doc//UserPreferencesResponseDto.md) - - [UserPreferencesUpdateDto](doc//UserPreferencesUpdateDto.md) - - [UserResponseDto](doc//UserResponseDto.md) - - [UserStatus](doc//UserStatus.md) - - [UserUpdateMeDto](doc//UserUpdateMeDto.md) - - [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md) - - [ValidateLibraryDto](doc//ValidateLibraryDto.md) - - [ValidateLibraryImportPathResponseDto](doc//ValidateLibraryImportPathResponseDto.md) - - [ValidateLibraryResponseDto](doc//ValidateLibraryResponseDto.md) - - [VersionCheckStateResponseDto](doc//VersionCheckStateResponseDto.md) - - [VideoCodec](doc//VideoCodec.md) - - [VideoContainer](doc//VideoContainer.md) - - [WorkflowCreateDto](doc//WorkflowCreateDto.md) - - [WorkflowResponseDto](doc//WorkflowResponseDto.md) - - [WorkflowShareResponseDto](doc//WorkflowShareResponseDto.md) - - [WorkflowShareStepDto](doc//WorkflowShareStepDto.md) - - [WorkflowStepDto](doc//WorkflowStepDto.md) - - [WorkflowTrigger](doc//WorkflowTrigger.md) - - [WorkflowTriggerResponseDto](doc//WorkflowTriggerResponseDto.md) - - [WorkflowType](doc//WorkflowType.md) - - [WorkflowUpdateDto](doc//WorkflowUpdateDto.md) - - -## Documentation For Authorization - - -Authentication schemes defined for the API: -### bearer - -- **Type**: HTTP Bearer authentication - -### 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/openapi/git_push.sh b/mobile/openapi/git_push.sh deleted file mode 100644 index f53a75d4fa..0000000000 --- a/mobile/openapi/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/mobile/openapi/lib/api.dart b/mobile/openapi/lib/api.dart deleted file mode 100644 index 47425b56fe..0000000000 --- a/mobile/openapi/lib/api.dart +++ /dev/null @@ -1,457 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -library openapi.api; - -import 'dart:async'; -import 'dart:convert'; -import 'dart:io'; - -import 'package:collection/collection.dart'; -import 'package:flutter/foundation.dart'; -import 'package:immich_mobile/utils/openapi_patching.dart'; -import 'package:http/http.dart'; -import 'package:intl/intl.dart'; -import 'package:meta/meta.dart'; - -part 'api_client.dart'; -part 'api_helper.dart'; -part 'api_exception.dart'; -part 'auth/authentication.dart'; -part 'auth/api_key_auth.dart'; -part 'auth/oauth.dart'; -part 'auth/http_basic_auth.dart'; -part 'auth/http_bearer_auth.dart'; -part 'optional.dart'; - -part 'api/api_keys_api.dart'; -part 'api/activities_api.dart'; -part 'api/albums_api.dart'; -part 'api/assets_api.dart'; -part 'api/authentication_api.dart'; -part 'api/authentication_admin_api.dart'; -part 'api/database_backups_admin_api.dart'; -part 'api/deprecated_api.dart'; -part 'api/download_api.dart'; -part 'api/duplicates_api.dart'; -part 'api/faces_api.dart'; -part 'api/jobs_api.dart'; -part 'api/libraries_api.dart'; -part 'api/maintenance_admin_api.dart'; -part 'api/map_api.dart'; -part 'api/memories_api.dart'; -part 'api/notifications_api.dart'; -part 'api/notifications_admin_api.dart'; -part 'api/partners_api.dart'; -part 'api/people_api.dart'; -part 'api/plugins_api.dart'; -part 'api/queues_api.dart'; -part 'api/search_api.dart'; -part 'api/server_api.dart'; -part 'api/sessions_api.dart'; -part 'api/shared_links_api.dart'; -part 'api/stacks_api.dart'; -part 'api/sync_api.dart'; -part 'api/system_config_api.dart'; -part 'api/system_metadata_api.dart'; -part 'api/tags_api.dart'; -part 'api/timeline_api.dart'; -part 'api/trash_api.dart'; -part 'api/users_api.dart'; -part 'api/users_admin_api.dart'; -part 'api/views_api.dart'; -part 'api/workflows_api.dart'; - -part 'model/activity_create_dto.dart'; -part 'model/activity_response_dto.dart'; -part 'model/activity_statistics_response_dto.dart'; -part 'model/add_users_dto.dart'; -part 'model/admin_onboarding_update_dto.dart'; -part 'model/album_response_dto.dart'; -part 'model/album_statistics_response_dto.dart'; -part 'model/album_user_add_dto.dart'; -part 'model/album_user_create_dto.dart'; -part 'model/album_user_response_dto.dart'; -part 'model/album_user_role.dart'; -part 'model/albums_add_assets_dto.dart'; -part 'model/albums_add_assets_response_dto.dart'; -part 'model/albums_response.dart'; -part 'model/albums_update.dart'; -part 'model/api_key_create_dto.dart'; -part 'model/api_key_create_response_dto.dart'; -part 'model/api_key_response_dto.dart'; -part 'model/api_key_update_dto.dart'; -part 'model/asset_bulk_delete_dto.dart'; -part 'model/asset_bulk_update_dto.dart'; -part 'model/asset_bulk_upload_check_dto.dart'; -part 'model/asset_bulk_upload_check_item.dart'; -part 'model/asset_bulk_upload_check_response_dto.dart'; -part 'model/asset_bulk_upload_check_result.dart'; -part 'model/asset_copy_dto.dart'; -part 'model/asset_edit_action.dart'; -part 'model/asset_edit_action_item_dto.dart'; -part 'model/asset_edit_action_item_dto_parameters.dart'; -part 'model/asset_edit_action_item_response_dto.dart'; -part 'model/asset_edits_create_dto.dart'; -part 'model/asset_edits_response_dto.dart'; -part 'model/asset_face_create_dto.dart'; -part 'model/asset_face_delete_dto.dart'; -part 'model/asset_face_response_dto.dart'; -part 'model/asset_face_update_dto.dart'; -part 'model/asset_face_update_item.dart'; -part 'model/asset_id_error_reason.dart'; -part 'model/asset_ids_dto.dart'; -part 'model/asset_ids_response_dto.dart'; -part 'model/asset_job_name.dart'; -part 'model/asset_jobs_dto.dart'; -part 'model/asset_media_response_dto.dart'; -part 'model/asset_media_size.dart'; -part 'model/asset_media_status.dart'; -part 'model/asset_metadata_bulk_delete_dto.dart'; -part 'model/asset_metadata_bulk_delete_item_dto.dart'; -part 'model/asset_metadata_bulk_response_dto.dart'; -part 'model/asset_metadata_bulk_upsert_dto.dart'; -part 'model/asset_metadata_bulk_upsert_item_dto.dart'; -part 'model/asset_metadata_response_dto.dart'; -part 'model/asset_metadata_upsert_dto.dart'; -part 'model/asset_metadata_upsert_item_dto.dart'; -part 'model/asset_ocr_response_dto.dart'; -part 'model/asset_order.dart'; -part 'model/asset_order_by.dart'; -part 'model/asset_reject_reason.dart'; -part 'model/asset_response_dto.dart'; -part 'model/asset_stack_response_dto.dart'; -part 'model/asset_stats_response_dto.dart'; -part 'model/asset_type_enum.dart'; -part 'model/asset_upload_action.dart'; -part 'model/asset_visibility.dart'; -part 'model/audio_codec.dart'; -part 'model/auth_status_response_dto.dart'; -part 'model/avatar_update.dart'; -part 'model/bulk_id_error_reason.dart'; -part 'model/bulk_id_response_dto.dart'; -part 'model/bulk_ids_dto.dart'; -part 'model/clip_config.dart'; -part 'model/cq_mode.dart'; -part 'model/calendar_heatmap_response_dto.dart'; -part 'model/calendar_heatmap_response_dto_series_inner.dart'; -part 'model/calendar_heatmap_type.dart'; -part 'model/cast_response.dart'; -part 'model/cast_update.dart'; -part 'model/change_password_dto.dart'; -part 'model/colorspace.dart'; -part 'model/contributor_count_response_dto.dart'; -part 'model/create_album_dto.dart'; -part 'model/create_library_dto.dart'; -part 'model/create_profile_image_response_dto.dart'; -part 'model/crop_parameters.dart'; -part 'model/database_backup_config.dart'; -part 'model/database_backup_delete_dto.dart'; -part 'model/database_backup_dto.dart'; -part 'model/database_backup_list_response_dto.dart'; -part 'model/download_archive_dto.dart'; -part 'model/download_archive_info.dart'; -part 'model/download_info_dto.dart'; -part 'model/download_response.dart'; -part 'model/download_response_dto.dart'; -part 'model/download_update.dart'; -part 'model/duplicate_detection_config.dart'; -part 'model/duplicate_resolve_dto.dart'; -part 'model/duplicate_resolve_group_dto.dart'; -part 'model/duplicate_response_dto.dart'; -part 'model/email_notifications_response.dart'; -part 'model/email_notifications_update.dart'; -part 'model/exif_response_dto.dart'; -part 'model/face_dto.dart'; -part 'model/facial_recognition_config.dart'; -part 'model/folders_response.dart'; -part 'model/folders_update.dart'; -part 'model/hls_video_resolution.dart'; -part 'model/image_format.dart'; -part 'model/integrity_report.dart'; -part 'model/integrity_report_response_dto.dart'; -part 'model/integrity_report_response_dto_items_inner.dart'; -part 'model/integrity_report_summary_response_dto.dart'; -part 'model/job_create_dto.dart'; -part 'model/job_name.dart'; -part 'model/job_settings_dto.dart'; -part 'model/library_response_dto.dart'; -part 'model/library_stats_response_dto.dart'; -part 'model/license_key_dto.dart'; -part 'model/log_level.dart'; -part 'model/login_credential_dto.dart'; -part 'model/login_response_dto.dart'; -part 'model/logout_response_dto.dart'; -part 'model/machine_learning_availability_checks_dto.dart'; -part 'model/maintenance_action.dart'; -part 'model/maintenance_auth_dto.dart'; -part 'model/maintenance_detect_install_response_dto.dart'; -part 'model/maintenance_detect_install_storage_folder_dto.dart'; -part 'model/maintenance_login_dto.dart'; -part 'model/maintenance_status_response_dto.dart'; -part 'model/manual_job_name.dart'; -part 'model/map_marker_response_dto.dart'; -part 'model/map_reverse_geocode_response_dto.dart'; -part 'model/memories_response.dart'; -part 'model/memories_update.dart'; -part 'model/memory_create_dto.dart'; -part 'model/memory_response_dto.dart'; -part 'model/memory_search_order.dart'; -part 'model/memory_statistics_response_dto.dart'; -part 'model/memory_type.dart'; -part 'model/memory_update_dto.dart'; -part 'model/merge_person_dto.dart'; -part 'model/metadata_search_dto.dart'; -part 'model/mirror_axis.dart'; -part 'model/mirror_parameters.dart'; -part 'model/notification_create_dto.dart'; -part 'model/notification_delete_all_dto.dart'; -part 'model/notification_dto.dart'; -part 'model/notification_level.dart'; -part 'model/notification_type.dart'; -part 'model/notification_update_all_dto.dart'; -part 'model/notification_update_dto.dart'; -part 'model/o_auth_authorize_response_dto.dart'; -part 'model/o_auth_callback_dto.dart'; -part 'model/o_auth_config_dto.dart'; -part 'model/o_auth_token_endpoint_auth_method.dart'; -part 'model/ocr_config.dart'; -part 'model/on_this_day_dto.dart'; -part 'model/onboarding_dto.dart'; -part 'model/onboarding_response_dto.dart'; -part 'model/partner_create_dto.dart'; -part 'model/partner_direction.dart'; -part 'model/partner_response_dto.dart'; -part 'model/partner_update_dto.dart'; -part 'model/people_response.dart'; -part 'model/people_response_dto.dart'; -part 'model/people_update.dart'; -part 'model/people_update_dto.dart'; -part 'model/people_update_item.dart'; -part 'model/permission.dart'; -part 'model/person_create_dto.dart'; -part 'model/person_response_dto.dart'; -part 'model/person_statistics_response_dto.dart'; -part 'model/person_update_dto.dart'; -part 'model/pin_code_change_dto.dart'; -part 'model/pin_code_reset_dto.dart'; -part 'model/pin_code_setup_dto.dart'; -part 'model/places_response_dto.dart'; -part 'model/plugin_method_response_dto.dart'; -part 'model/plugin_response_dto.dart'; -part 'model/plugin_template_response_dto.dart'; -part 'model/plugin_template_step_response_dto.dart'; -part 'model/purchase_response.dart'; -part 'model/purchase_update.dart'; -part 'model/queue_command.dart'; -part 'model/queue_command_dto.dart'; -part 'model/queue_delete_dto.dart'; -part 'model/queue_job_response_dto.dart'; -part 'model/queue_job_status.dart'; -part 'model/queue_name.dart'; -part 'model/queue_response_dto.dart'; -part 'model/queue_response_legacy_dto.dart'; -part 'model/queue_statistics_dto.dart'; -part 'model/queue_status_legacy_dto.dart'; -part 'model/queue_update_dto.dart'; -part 'model/queues_response_legacy_dto.dart'; -part 'model/random_search_dto.dart'; -part 'model/ratings_response.dart'; -part 'model/ratings_update.dart'; -part 'model/reaction_level.dart'; -part 'model/reaction_type.dart'; -part 'model/recently_added_response.dart'; -part 'model/recently_added_update.dart'; -part 'model/release_channel.dart'; -part 'model/release_event_v1.dart'; -part 'model/release_type.dart'; -part 'model/reverse_geocoding_state_response_dto.dart'; -part 'model/rotate_parameters.dart'; -part 'model/search_album_response_dto.dart'; -part 'model/search_asset_response_dto.dart'; -part 'model/search_explore_item.dart'; -part 'model/search_explore_response_dto.dart'; -part 'model/search_facet_count_response_dto.dart'; -part 'model/search_facet_response_dto.dart'; -part 'model/search_response_dto.dart'; -part 'model/search_statistics_response_dto.dart'; -part 'model/search_suggestion_type.dart'; -part 'model/server_about_response_dto.dart'; -part 'model/server_apk_links_dto.dart'; -part 'model/server_config_dto.dart'; -part 'model/server_features_dto.dart'; -part 'model/server_media_types_response_dto.dart'; -part 'model/server_ping_response.dart'; -part 'model/server_stats_response_dto.dart'; -part 'model/server_storage_response_dto.dart'; -part 'model/server_version_history_response_dto.dart'; -part 'model/server_version_response_dto.dart'; -part 'model/session_create_dto.dart'; -part 'model/session_create_response_dto.dart'; -part 'model/session_response_dto.dart'; -part 'model/session_unlock_dto.dart'; -part 'model/session_update_dto.dart'; -part 'model/set_maintenance_mode_dto.dart'; -part 'model/shared_link_create_dto.dart'; -part 'model/shared_link_edit_dto.dart'; -part 'model/shared_link_login_dto.dart'; -part 'model/shared_link_response_dto.dart'; -part 'model/shared_link_type.dart'; -part 'model/shared_links_response.dart'; -part 'model/shared_links_update.dart'; -part 'model/sign_up_dto.dart'; -part 'model/smart_search_dto.dart'; -part 'model/source_type.dart'; -part 'model/stack_create_dto.dart'; -part 'model/stack_response_dto.dart'; -part 'model/stack_update_dto.dart'; -part 'model/statistics_search_dto.dart'; -part 'model/storage_folder.dart'; -part 'model/sync_ack_delete_dto.dart'; -part 'model/sync_ack_dto.dart'; -part 'model/sync_ack_set_dto.dart'; -part 'model/sync_album_delete_v1.dart'; -part 'model/sync_album_to_asset_delete_v1.dart'; -part 'model/sync_album_to_asset_v1.dart'; -part 'model/sync_album_user_delete_v1.dart'; -part 'model/sync_album_user_v1.dart'; -part 'model/sync_album_v1.dart'; -part 'model/sync_album_v2.dart'; -part 'model/sync_asset_delete_v1.dart'; -part 'model/sync_asset_edit_delete_v1.dart'; -part 'model/sync_asset_edit_v1.dart'; -part 'model/sync_asset_exif_v1.dart'; -part 'model/sync_asset_face_delete_v1.dart'; -part 'model/sync_asset_face_v1.dart'; -part 'model/sync_asset_face_v2.dart'; -part 'model/sync_asset_metadata_delete_v1.dart'; -part 'model/sync_asset_metadata_v1.dart'; -part 'model/sync_asset_ocr_delete_v1.dart'; -part 'model/sync_asset_ocr_v1.dart'; -part 'model/sync_asset_v1.dart'; -part 'model/sync_asset_v2.dart'; -part 'model/sync_auth_user_v1.dart'; -part 'model/sync_entity_type.dart'; -part 'model/sync_memory_asset_delete_v1.dart'; -part 'model/sync_memory_asset_v1.dart'; -part 'model/sync_memory_delete_v1.dart'; -part 'model/sync_memory_v1.dart'; -part 'model/sync_partner_delete_v1.dart'; -part 'model/sync_partner_v1.dart'; -part 'model/sync_person_delete_v1.dart'; -part 'model/sync_person_v1.dart'; -part 'model/sync_request_type.dart'; -part 'model/sync_stack_delete_v1.dart'; -part 'model/sync_stack_v1.dart'; -part 'model/sync_stream_dto.dart'; -part 'model/sync_user_delete_v1.dart'; -part 'model/sync_user_metadata_delete_v1.dart'; -part 'model/sync_user_metadata_v1.dart'; -part 'model/sync_user_v1.dart'; -part 'model/system_config_backups_dto.dart'; -part 'model/system_config_dto.dart'; -part 'model/system_config_f_fmpeg_dto.dart'; -part 'model/system_config_f_fmpeg_realtime_dto.dart'; -part 'model/system_config_faces_dto.dart'; -part 'model/system_config_generated_fullsize_image_dto.dart'; -part 'model/system_config_generated_image_dto.dart'; -part 'model/system_config_image_dto.dart'; -part 'model/system_config_integrity_checks.dart'; -part 'model/system_config_integrity_checksum_job.dart'; -part 'model/system_config_integrity_job.dart'; -part 'model/system_config_job_dto.dart'; -part 'model/system_config_library_dto.dart'; -part 'model/system_config_library_scan_dto.dart'; -part 'model/system_config_library_watch_dto.dart'; -part 'model/system_config_logging_dto.dart'; -part 'model/system_config_machine_learning_dto.dart'; -part 'model/system_config_map_dto.dart'; -part 'model/system_config_metadata_dto.dart'; -part 'model/system_config_new_version_check_dto.dart'; -part 'model/system_config_nightly_tasks_dto.dart'; -part 'model/system_config_notifications_dto.dart'; -part 'model/system_config_o_auth_dto.dart'; -part 'model/system_config_password_login_dto.dart'; -part 'model/system_config_reverse_geocoding_dto.dart'; -part 'model/system_config_server_dto.dart'; -part 'model/system_config_smtp_dto.dart'; -part 'model/system_config_smtp_transport_dto.dart'; -part 'model/system_config_storage_template_dto.dart'; -part 'model/system_config_template_emails_dto.dart'; -part 'model/system_config_template_storage_option_dto.dart'; -part 'model/system_config_templates_dto.dart'; -part 'model/system_config_theme_dto.dart'; -part 'model/system_config_trash_dto.dart'; -part 'model/system_config_user_dto.dart'; -part 'model/tag_bulk_assets_dto.dart'; -part 'model/tag_bulk_assets_response_dto.dart'; -part 'model/tag_create_dto.dart'; -part 'model/tag_response_dto.dart'; -part 'model/tag_update_dto.dart'; -part 'model/tag_upsert_dto.dart'; -part 'model/tags_response.dart'; -part 'model/tags_update.dart'; -part 'model/template_dto.dart'; -part 'model/template_response_dto.dart'; -part 'model/test_email_response_dto.dart'; -part 'model/time_bucket_asset_response_dto.dart'; -part 'model/time_buckets_response_dto.dart'; -part 'model/tone_mapping.dart'; -part 'model/transcode_hw_accel.dart'; -part 'model/transcode_policy.dart'; -part 'model/trash_response_dto.dart'; -part 'model/update_album_dto.dart'; -part 'model/update_album_user_dto.dart'; -part 'model/update_asset_dto.dart'; -part 'model/update_library_dto.dart'; -part 'model/usage_by_user_dto.dart'; -part 'model/user_admin_create_dto.dart'; -part 'model/user_admin_delete_dto.dart'; -part 'model/user_admin_response_dto.dart'; -part 'model/user_admin_update_dto.dart'; -part 'model/user_avatar_color.dart'; -part 'model/user_license.dart'; -part 'model/user_metadata_key.dart'; -part 'model/user_preferences_response_dto.dart'; -part 'model/user_preferences_update_dto.dart'; -part 'model/user_response_dto.dart'; -part 'model/user_status.dart'; -part 'model/user_update_me_dto.dart'; -part 'model/validate_access_token_response_dto.dart'; -part 'model/validate_library_dto.dart'; -part 'model/validate_library_import_path_response_dto.dart'; -part 'model/validate_library_response_dto.dart'; -part 'model/version_check_state_response_dto.dart'; -part 'model/video_codec.dart'; -part 'model/video_container.dart'; -part 'model/workflow_create_dto.dart'; -part 'model/workflow_response_dto.dart'; -part 'model/workflow_share_response_dto.dart'; -part 'model/workflow_share_step_dto.dart'; -part 'model/workflow_step_dto.dart'; -part 'model/workflow_trigger.dart'; -part 'model/workflow_trigger_response_dto.dart'; -part 'model/workflow_type.dart'; -part 'model/workflow_update_dto.dart'; - - -/// An [ApiClient] instance that uses the default values obtained from -/// the OpenAPI specification file. -var defaultApiClient = ApiClient(); - -const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'}; -const _dateEpochMarker = 'epoch'; -const _deepEquality = DeepCollectionEquality(); -final _dateFormatter = DateFormat('yyyy-MM-dd'); -final _regList = RegExp(r'^List<(.*)>$'); -final _regSet = RegExp(r'^Set<(.*)>$'); -final _regMap = RegExp(r'^Map$'); - -bool _isEpochMarker(String? pattern) => pattern == _dateEpochMarker || pattern == '/$_dateEpochMarker/'; diff --git a/mobile/openapi/lib/api/activities_api.dart b/mobile/openapi/lib/api/activities_api.dart deleted file mode 100644 index 490c418785..0000000000 --- a/mobile/openapi/lib/api/activities_api.dart +++ /dev/null @@ -1,291 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ActivitiesApi { - ActivitiesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create an activity - /// - /// Create a like or a comment for an album, or an asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivityWithHttpInfo(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody = activityCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an activity - /// - /// Create a like or a comment for an album, or an asset in an album. - /// - /// Parameters: - /// - /// * [ActivityCreateDto] activityCreateDto (required): - Future createActivity(ActivityCreateDto activityCreateDto, { Future? abortTrigger, }) async { - final response = await createActivityWithHttpInfo(activityCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityResponseDto',) as ActivityResponseDto; - - } - return null; - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivityWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an activity - /// - /// Removes a like or comment from a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteActivity(String id, { Future? abortTrigger, }) async { - final response = await deleteActivityWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// List all activities - /// - /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future getActivitiesWithHttpInfo(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all activities - /// - /// Returns a list of activities for the selected asset or album. The activities are returned in sorted order, with the oldest activities appearing first. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - /// - /// * [ReactionLevel] level: - /// - /// * [ReactionType] type: - /// - /// * [String] userId: - /// Filter by user ID - Future?> getActivities(String albumId, { String? assetId, ReactionLevel? level, ReactionType? type, String? userId, Future? abortTrigger, }) async { - final response = await getActivitiesWithHttpInfo(albumId, assetId: assetId, level: level, type: type, userId: userId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve activity statistics - /// - /// Returns the number of likes and comments for a given album or asset in an album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatisticsWithHttpInfo(String albumId, { String? assetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/activities/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'albumId', albumId)); - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve activity statistics - /// - /// Returns the number of likes and comments for a given album or asset in an album. - /// - /// Parameters: - /// - /// * [String] albumId (required): - /// Album ID - /// - /// * [String] assetId: - /// Asset ID (if activity is for an asset) - Future getActivityStatistics(String albumId, { String? assetId, Future? abortTrigger, }) async { - final response = await getActivityStatisticsWithHttpInfo(albumId, assetId: assetId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ActivityStatisticsResponseDto',) as ActivityStatisticsResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/albums_api.dart b/mobile/openapi/lib/api/albums_api.dart deleted file mode 100644 index 6ac978f701..0000000000 --- a/mobile/openapi/lib/api/albums_api.dart +++ /dev/null @@ -1,858 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AlbumsApi { - AlbumsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addAssetsToAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to an album - /// - /// Add multiple assets to a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addAssetsToAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Add assets to albums - /// - /// Send a list of asset IDs and album IDs to add each asset to each album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbumsWithHttpInfo(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/assets'; - - // ignore: prefer_final_locals - Object? postBody = albumsAddAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to albums - /// - /// Send a list of asset IDs and album IDs to add each asset to each album. - /// - /// Parameters: - /// - /// * [AlbumsAddAssetsDto] albumsAddAssetsDto (required): - Future addAssetsToAlbums(AlbumsAddAssetsDto albumsAddAssetsDto, { Future? abortTrigger, }) async { - final response = await addAssetsToAlbumsWithHttpInfo(albumsAddAssetsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumsAddAssetsResponseDto',) as AlbumsAddAssetsResponseDto; - - } - return null; - } - - /// Share album with users - /// - /// Share an album with multiple users. Each user can be given a specific role in the album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbumWithHttpInfo(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/users' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = addUsersDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Share album with users - /// - /// Share an album with multiple users. Each user can be given a specific role in the album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AddUsersDto] addUsersDto (required): - Future addUsersToAlbum(String id, AddUsersDto addUsersDto, { Future? abortTrigger, }) async { - final response = await addUsersToAlbumWithHttpInfo(id, addUsersDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Create an album - /// - /// Create a new album. The album can also be created with initial users and assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody = createAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an album - /// - /// Create a new album. The album can also be created with initial users and assets. - /// - /// Parameters: - /// - /// * [CreateAlbumDto] createAlbumDto (required): - Future createAlbum(CreateAlbumDto createAlbumDto, { Future? abortTrigger, }) async { - final response = await createAlbumWithHttpInfo(createAlbumDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Delete an album - /// - /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteAlbumWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an album - /// - /// Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteAlbum(String id, { Future? abortTrigger, }) async { - final response = await deleteAlbumWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an album - /// - /// Retrieve information about a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAlbumMapMarkersWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/map-markers' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album map markers - /// - /// Retrieve map marker information for a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future?> getAlbumMapMarkers(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAlbumMapMarkersWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAlbumStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve album statistics - /// - /// Returns statistics about the albums available to the authenticated user. - Future getAlbumStatistics({ Future? abortTrigger, }) async { - final response = await getAlbumStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumStatisticsResponseDto',) as AlbumStatisticsResponseDto; - - } - return null; - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future getAllAlbumsWithHttpInfo({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (assetId != null) { - queryParams.addAll(_queryParams('', 'assetId', assetId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (isOwned != null) { - queryParams.addAll(_queryParams('', 'isOwned', isOwned)); - } - if (isShared != null) { - queryParams.addAll(_queryParams('', 'isShared', isShared)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all albums - /// - /// Retrieve a list of albums available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] assetId: - /// Filter albums containing this asset ID (ignores other parameters) - /// - /// * [String] id: - /// Album ID - /// - /// * [bool] isOwned: - /// Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter - /// - /// * [bool] isShared: - /// Filter by shared status: true = only shared, false = not shared, undefined = no filter - /// - /// * [String] name: - /// Album name (exact match) - Future?> getAllAlbums({ String? assetId, String? id, bool? isOwned, bool? isShared, String? name, Future? abortTrigger, }) async { - final response = await getAllAlbumsWithHttpInfo(assetId: assetId, id: id, isOwned: isOwned, isShared: isShared, name: name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeAssetFromAlbumWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from an album - /// - /// Remove multiple assets from a specific album by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeAssetFromAlbum(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeAssetFromAlbumWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove user from album - /// - /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - Future removeUserFromAlbumWithHttpInfo(String id, String userId, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove user from album - /// - /// Remove a user from an album. Use an ID of \"me\" to leave a shared album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - Future removeUserFromAlbum(String id, String userId, { Future? abortTrigger, }) async { - final response = await removeUserFromAlbumWithHttpInfo(id, userId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update an album - /// - /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfoWithHttpInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an album - /// - /// Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAlbumDto] updateAlbumDto (required): - Future updateAlbumInfo(String id, UpdateAlbumDto updateAlbumDto, { Future? abortTrigger, }) async { - final response = await updateAlbumInfoWithHttpInfo(id, updateAlbumDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto; - - } - return null; - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUserWithHttpInfo(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/albums/{id}/user/{userId}' - .replaceAll('{id}', id) - .replaceAll('{userId}', userId); - - // ignore: prefer_final_locals - Object? postBody = updateAlbumUserDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user role - /// - /// Change the role for a specific user in a specific album. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Album ID - /// - /// * [String] userId (required): - /// Album user ID, or \"me\" to reference the current user. - /// - /// * [UpdateAlbumUserDto] updateAlbumUserDto (required): - Future updateAlbumUser(String id, String userId, UpdateAlbumUserDto updateAlbumUserDto, { Future? abortTrigger, }) async { - final response = await updateAlbumUserWithHttpInfo(id, userId, updateAlbumUserDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/api_keys_api.dart b/mobile/openapi/lib/api/api_keys_api.dart deleted file mode 100644 index c26ddc263d..0000000000 --- a/mobile/openapi/lib/api/api_keys_api.dart +++ /dev/null @@ -1,346 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class APIKeysApi { - APIKeysApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKeyWithHttpInfo(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // ignore: prefer_final_locals - Object? postBody = apiKeyCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create an API key - /// - /// Creates a new API key. It will be limited to the permissions specified. - /// - /// Parameters: - /// - /// * [ApiKeyCreateDto] apiKeyCreateDto (required): - Future createApiKey(ApiKeyCreateDto apiKeyCreateDto, { Future? abortTrigger, }) async { - final response = await createApiKeyWithHttpInfo(apiKeyCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyCreateResponseDto',) as ApiKeyCreateResponseDto; - - } - return null; - } - - /// Delete an API key - /// - /// Deletes an API key identified by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete an API key - /// - /// Deletes an API key identified by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteApiKey(String id, { Future? abortTrigger, }) async { - final response = await deleteApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve an API key - /// - /// Retrieve an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKeyWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an API key - /// - /// Retrieve an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getApiKey(String id, { Future? abortTrigger, }) async { - final response = await getApiKeyWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getApiKeysWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all API keys - /// - /// Retrieve all API keys of the current user. - Future?> getApiKeys({ Future? abortTrigger, }) async { - final response = await getApiKeysWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve the current API key - /// - /// Retrieve the API key that is used to access this endpoint. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyApiKeyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve the current API key - /// - /// Retrieve the API key that is used to access this endpoint. - Future getMyApiKey({ Future? abortTrigger, }) async { - final response = await getMyApiKeyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/assets_api.dart b/mobile/openapi/lib/api/assets_api.dart deleted file mode 100644 index fa49d382b9..0000000000 --- a/mobile/openapi/lib/api/assets_api.dart +++ /dev/null @@ -1,1834 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AssetsApi { - AssetsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUploadWithHttpInfo(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/bulk-upload-check'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUploadCheckDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Check bulk upload - /// - /// Determine which assets have already been uploaded to the server based on their SHA1 checksums. - /// - /// Parameters: - /// - /// * [AssetBulkUploadCheckDto] assetBulkUploadCheckDto (required): - Future checkBulkUpload(AssetBulkUploadCheckDto assetBulkUploadCheckDto, { Future? abortTrigger, }) async { - final response = await checkBulkUploadWithHttpInfo(assetBulkUploadCheckDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetBulkUploadCheckResponseDto',) as AssetBulkUploadCheckResponseDto; - - } - return null; - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAssetWithHttpInfo(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/copy'; - - // ignore: prefer_final_locals - Object? postBody = assetCopyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Copy asset - /// - /// Copy asset information like albums, tags, etc. from one asset to another. - /// - /// Parameters: - /// - /// * [AssetCopyDto] assetCopyDto (required): - Future copyAsset(AssetCopyDto assetCopyDto, { Future? abortTrigger, }) async { - final response = await copyAssetWithHttpInfo(assetCopyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadataWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata by key - /// - /// Delete a specific metadata key-value pair associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future deleteAssetMetadata(String id, String key, { Future? abortTrigger, }) async { - final response = await deleteAssetMetadataWithHttpInfo(id, key, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssetsWithHttpInfo(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete assets - /// - /// Deletes multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkDeleteDto] assetBulkDeleteDto (required): - Future deleteAssets(AssetBulkDeleteDto assetBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteAssetsWithHttpInfo(assetBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadataWithHttpInfo(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete asset metadata - /// - /// Delete metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkDeleteDto] assetMetadataBulkDeleteDto (required): - Future deleteBulkAssetMetadata(AssetMetadataBulkDeleteDto assetMetadataBulkDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteBulkAssetMetadataWithHttpInfo(assetMetadataBulkDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAssetWithHttpInfo(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/original' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download original asset - /// - /// Downloads the original file of the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadAsset(String id, { bool? edited, String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadAssetWithHttpInfo(id, edited: edited, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAssetWithHttpInfo(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetEditsCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Apply edits to an existing asset - /// - /// Apply a series of edit actions (crop, rotate, mirror) to the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetEditsCreateDto] assetEditsCreateDto (required): - Future editAsset(String id, AssetEditsCreateDto assetEditsCreateDto, { Future? abortTrigger, }) async { - final response = await editAssetWithHttpInfo(id, assetEditsCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSessionWithHttpInfo(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// End HLS streaming session - /// - /// Releases server resources for the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future endSession(String id, String sessionId, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await endSessionWithHttpInfo(id, sessionId, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve edits for an existing asset - /// - /// Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await getAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetEditsResponseDto',) as AssetEditsResponseDto; - - } - return null; - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve an asset - /// - /// Retrieve detailed information about a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getAssetInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getAssetInfoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetMetadataWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get asset metadata - /// - /// Retrieve all metadata key-value pairs associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetMetadata(String id, { Future? abortTrigger, }) async { - final response = await getAssetMetadataWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve asset metadata by key - /// - /// Retrieve the value of a specific metadata key associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKeyWithHttpInfo(String id, String key, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata/{key}' - .replaceAll('{id}', id) - .replaceAll('{key}', key); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset metadata by key - /// - /// Retrieve the value of a specific metadata key associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Asset ID - /// - /// * [String] key (required): - /// Metadata key - Future getAssetMetadataByKey(String id, String key, { Future? abortTrigger, }) async { - final response = await getAssetMetadataByKeyWithHttpInfo(id, key, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetMetadataResponseDto',) as AssetMetadataResponseDto; - - } - return null; - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getAssetOcrWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/ocr' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve asset OCR data - /// - /// Retrieve all OCR (Optical Character Recognition) data associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getAssetOcr(String id, { Future? abortTrigger, }) async { - final response = await getAssetOcrWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Get asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatisticsWithHttpInfo({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get asset statistics - /// - /// Retrieve various statistics about the assets owned by the authenticated user. - /// - /// Parameters: - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getAssetStatistics({ bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getAssetStatisticsWithHttpInfo(isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylistWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/main.m3u8' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS main playlist - /// - /// Returns an HLS main playlist with all available variants for the asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMainPlaylist(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMainPlaylistWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - - } - return null; - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylistWithHttpInfo(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8' - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsPos != null) { - headerParams[r'x-immich-hls-pos'] = parameterToString(xImmichHlsPos); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS media playlist - /// - /// Returns an HLS media playlist for one variant of the streaming session. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [num] xImmichHlsPos: - Future getMediaPlaylist(String id, String sessionId, int variantIndex, { String? key, String? slug, num? xImmichHlsPos, Future? abortTrigger, }) async { - final response = await getMediaPlaylistWithHttpInfo(id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsPos: xImmichHlsPos, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'String',) as String; - - } - return null; - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegmentWithHttpInfo(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename}' - .replaceAll('{filename}', filename) - .replaceAll('{id}', id) - .replaceAll('{sessionId}', sessionId) - .replaceAll('{variantIndex}', variantIndex.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichHlsMsn != null) { - headerParams[r'x-immich-hls-msn'] = parameterToString(xImmichHlsMsn); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get HLS segment or init file - /// - /// Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s). - /// - /// Parameters: - /// - /// * [String] filename (required): - /// - /// * [String] id (required): - /// - /// * [String] sessionId (required): - /// - /// * [int] variantIndex (required): - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [int] xImmichHlsMsn: - Future getSegment(String filename, String id, String sessionId, int variantIndex, { String? key, String? slug, int? xImmichHlsMsn, Future? abortTrigger, }) async { - final response = await getSegmentWithHttpInfo(filename, id, sessionId, variantIndex, key: key, slug: slug, xImmichHlsMsn: xImmichHlsMsn, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Play asset video - /// - /// Streams the video file for the specified asset. This endpoint also supports byte range requests. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideoWithHttpInfo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/video/playback' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Play asset video - /// - /// Streams the video file for the specified asset. This endpoint also supports byte range requests. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future playAssetVideo(String id, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await playAssetVideoWithHttpInfo(id, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEditsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/edits' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove edits from an existing asset - /// - /// Removes all edit actions (crop, rotate, mirror) associated with the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeAssetEdits(String id, { Future? abortTrigger, }) async { - final response = await removeAssetEditsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Run an asset job - /// - /// Run a specific job on a set of assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetJobsDto] assetJobsDto (required): - Future runAssetJobsWithHttpInfo(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/jobs'; - - // ignore: prefer_final_locals - Object? postBody = assetJobsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run an asset job - /// - /// Run a specific job on a set of assets. - /// - /// Parameters: - /// - /// * [AssetJobsDto] assetJobsDto (required): - Future runAssetJobs(AssetJobsDto assetJobsDto, { Future? abortTrigger, }) async { - final response = await runAssetJobsWithHttpInfo(assetJobsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future updateAssetMetadataWithHttpInfo(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/metadata' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetMetadataUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update asset metadata - /// - /// Update or add metadata key-value pairs for the specified asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetMetadataUpsertDto] assetMetadataUpsertDto (required): - Future?> updateAssetMetadata(String id, AssetMetadataUpsertDto assetMetadataUpsertDto, { Future? abortTrigger, }) async { - final response = await updateAssetMetadataWithHttpInfo(id, assetMetadataUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future updateBulkAssetMetadataWithHttpInfo(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/metadata'; - - // ignore: prefer_final_locals - Object? postBody = assetMetadataBulkUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert asset metadata - /// - /// Upsert metadata key-value pairs for multiple assets. - /// - /// Parameters: - /// - /// * [AssetMetadataBulkUpsertDto] assetMetadataBulkUpsertDto (required): - Future?> updateBulkAssetMetadata(AssetMetadataBulkUpsertDto assetMetadataBulkUpsertDto, { Future? abortTrigger, }) async { - final response = await updateBulkAssetMetadataWithHttpInfo(assetMetadataBulkUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAssetWithHttpInfo(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - if (xImmichChecksum != null) { - headerParams[r'x-immich-checksum'] = parameterToString(xImmichChecksum); - } - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (assetData != null) { - hasFields = true; - mp.fields[r'assetData'] = assetData.field; - mp.files.add(assetData); - } - if (duration != null) { - hasFields = true; - mp.fields[r'duration'] = parameterToString(duration); - } - if (fileCreatedAt != null) { - hasFields = true; - mp.fields[r'fileCreatedAt'] = parameterToString(fileCreatedAt); - } - if (fileModifiedAt != null) { - hasFields = true; - mp.fields[r'fileModifiedAt'] = parameterToString(fileModifiedAt); - } - if (filename != null) { - hasFields = true; - mp.fields[r'filename'] = parameterToString(filename); - } - if (isFavorite != null) { - hasFields = true; - mp.fields[r'isFavorite'] = parameterToString(isFavorite); - } - if (livePhotoVideoId != null) { - hasFields = true; - mp.fields[r'livePhotoVideoId'] = parameterToString(livePhotoVideoId); - } - if (metadata != null) { - hasFields = true; - mp.fields[r'metadata'] = parameterToString(metadata); - } - if (sidecarData != null) { - hasFields = true; - mp.fields[r'sidecarData'] = sidecarData.field; - mp.files.add(sidecarData); - } - if (visibility != null) { - hasFields = true; - mp.fields[r'visibility'] = parameterToString(visibility); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload asset - /// - /// Uploads a new asset to the server. - /// - /// Parameters: - /// - /// * [MultipartFile] assetData (required): - /// Asset file data - /// - /// * [DateTime] fileCreatedAt (required): - /// File creation date - /// - /// * [DateTime] fileModifiedAt (required): - /// File modification date - /// - /// * [String] key: - /// - /// * [String] slug: - /// - /// * [String] xImmichChecksum: - /// sha1 checksum that can be used for duplicate detection before the file is uploaded - /// - /// * [int] duration: - /// Duration in milliseconds (for videos) - /// - /// * [String] filename: - /// Filename - /// - /// * [bool] isFavorite: - /// Mark as favorite - /// - /// * [String] livePhotoVideoId: - /// Live photo video ID - /// - /// * [List] metadata: - /// Asset metadata items - /// - /// * [MultipartFile] sidecarData: - /// Sidecar file data - /// - /// * [AssetVisibility] visibility: - Future uploadAsset(MultipartFile assetData, DateTime fileCreatedAt, DateTime fileModifiedAt, { String? key, String? slug, String? xImmichChecksum, int? duration, String? filename, bool? isFavorite, String? livePhotoVideoId, List? metadata, MultipartFile? sidecarData, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await uploadAssetWithHttpInfo(assetData, fileCreatedAt, fileModifiedAt, key: key, slug: slug, xImmichChecksum: xImmichChecksum, duration: duration, filename: filename, isFavorite: isFavorite, livePhotoVideoId: livePhotoVideoId, metadata: metadata, sidecarData: sidecarData, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetMediaResponseDto',) as AssetMediaResponseDto; - - } - return null; - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAssetWithHttpInfo(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}/thumbnail' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (edited != null) { - queryParams.addAll(_queryParams('', 'edited', edited)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// View asset thumbnail - /// - /// Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] edited: - /// Return edited asset if available - /// - /// * [String] key: - /// - /// * [AssetMediaSize] size: - /// - /// * [String] slug: - Future viewAsset(String id, { bool? edited, String? key, AssetMediaSize? size, String? slug, Future? abortTrigger, }) async { - final response = await viewAssetWithHttpInfo(id, edited: edited, key: key, size: size, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/authentication_admin_api.dart b/mobile/openapi/lib/api/authentication_admin_api.dart deleted file mode 100644 index 2c107891b3..0000000000 --- a/mobile/openapi/lib/api/authentication_admin_api.dart +++ /dev/null @@ -1,59 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AuthenticationAdminApi { - AuthenticationAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - /// - /// Note: This method returns the HTTP [Response]. - Future unlinkAllOAuthAccountsAdminWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/auth/unlink-all'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlink all OAuth accounts - /// - /// Unlinks all OAuth accounts associated with user accounts in the system. - Future unlinkAllOAuthAccountsAdmin({ Future? abortTrigger, }) async { - final response = await unlinkAllOAuthAccountsAdminWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/authentication_api.dart b/mobile/openapi/lib/api/authentication_api.dart deleted file mode 100644 index 8e088d040b..0000000000 --- a/mobile/openapi/lib/api/authentication_api.dart +++ /dev/null @@ -1,888 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class AuthenticationApi { - AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Change password - /// - /// Change the password of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePasswordWithHttpInfo(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/change-password'; - - // ignore: prefer_final_locals - Object? postBody = changePasswordDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change password - /// - /// Change the password of the current user. - /// - /// Parameters: - /// - /// * [ChangePasswordDto] changePasswordDto (required): - Future changePassword(ChangePasswordDto changePasswordDto, { Future? abortTrigger, }) async { - final response = await changePasswordWithHttpInfo(changePasswordDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCodeWithHttpInfo(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeChangeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Change pin code - /// - /// Change the pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeChangeDto] pinCodeChangeDto (required): - Future changePinCode(PinCodeChangeDto pinCodeChangeDto, { Future? abortTrigger, }) async { - final response = await changePinCodeWithHttpInfo(pinCodeChangeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Finish OAuth - /// - /// Complete the OAuth authorization process by exchanging the authorization code for a session token. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuthWithHttpInfo(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/callback'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Finish OAuth - /// - /// Complete the OAuth authorization process by exchanging the authorization code for a session token. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future finishOAuth(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await finishOAuthWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Retrieve auth status - /// - /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. - /// - /// Note: This method returns the HTTP [Response]. - Future getAuthStatusWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/status'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve auth status - /// - /// Get information about the current session, including whether the user has a password, and if the session can access locked assets. - Future getAuthStatus({ Future? abortTrigger, }) async { - final response = await getAuthStatusWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AuthStatusResponseDto',) as AuthStatusResponseDto; - - } - return null; - } - - /// Link OAuth account - /// - /// Link an OAuth account to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccountWithHttpInfo(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/link'; - - // ignore: prefer_final_locals - Object? postBody = oAuthCallbackDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Link OAuth account - /// - /// Link an OAuth account to the authenticated user. - /// - /// Parameters: - /// - /// * [OAuthCallbackDto] oAuthCallbackDto (required): - Future linkOAuthAccount(OAuthCallbackDto oAuthCallbackDto, { Future? abortTrigger, }) async { - final response = await linkOAuthAccountWithHttpInfo(oAuthCallbackDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Lock auth session - /// - /// Remove elevated access to locked assets from the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future lockAuthSessionWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/lock'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Lock auth session - /// - /// Remove elevated access to locked assets from the current session. - Future lockAuthSession({ Future? abortTrigger, }) async { - final response = await lockAuthSessionWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future loginWithHttpInfo(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/login'; - - // ignore: prefer_final_locals - Object? postBody = loginCredentialDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Login - /// - /// Login with username and password and receive a session token. - /// - /// Parameters: - /// - /// * [LoginCredentialDto] loginCredentialDto (required): - Future login(LoginCredentialDto loginCredentialDto, { Future? abortTrigger, }) async { - final response = await loginWithHttpInfo(loginCredentialDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto; - - } - return null; - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - /// - /// Note: This method returns the HTTP [Response]. - Future logoutWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/logout'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Logout - /// - /// Logout the current user and invalidate the session token. - Future logout({ Future? abortTrigger, }) async { - final response = await logoutWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LogoutResponseDto',) as LogoutResponseDto; - - } - return null; - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuthWithHttpInfo(String logoutToken, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/backchannel-logout'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/x-www-form-urlencoded']; - - if (logoutToken != null) { - formParams[r'logout_token'] = parameterToString(logoutToken); - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Backchannel OAuth logout - /// - /// Logout the OAuth account and invalidate the session specified by the sid claim or all sessions if the sid claim is not present. - /// - /// Parameters: - /// - /// * [String] logoutToken (required): - /// OAuth logout token - Future logoutOAuth(String logoutToken, { Future? abortTrigger, }) async { - final response = await logoutOAuthWithHttpInfo(logoutToken, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Redirect OAuth to mobile - /// - /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. - /// - /// Note: This method returns the HTTP [Response]. - Future redirectOAuthToMobileWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/mobile-redirect'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Redirect OAuth to mobile - /// - /// Requests to this URL are automatically forwarded to the mobile app, and is used in some cases for OAuth redirecting. - Future redirectOAuthToMobile({ Future? abortTrigger, }) async { - final response = await redirectOAuthToMobileWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Reset pin code - /// - /// Reset the pin code for the current user by providing the account password - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCodeWithHttpInfo(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeResetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reset pin code - /// - /// Reset the pin code for the current user by providing the account password - /// - /// Parameters: - /// - /// * [PinCodeResetDto] pinCodeResetDto (required): - Future resetPinCode(PinCodeResetDto pinCodeResetDto, { Future? abortTrigger, }) async { - final response = await resetPinCodeWithHttpInfo(pinCodeResetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCodeWithHttpInfo(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/pin-code'; - - // ignore: prefer_final_locals - Object? postBody = pinCodeSetupDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Setup pin code - /// - /// Setup a new pin code for the current user. - /// - /// Parameters: - /// - /// * [PinCodeSetupDto] pinCodeSetupDto (required): - Future setupPinCode(PinCodeSetupDto pinCodeSetupDto, { Future? abortTrigger, }) async { - final response = await setupPinCodeWithHttpInfo(pinCodeSetupDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdminWithHttpInfo(SignUpDto signUpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/admin-sign-up'; - - // ignore: prefer_final_locals - Object? postBody = signUpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Register admin - /// - /// Create the first admin user in the system. - /// - /// Parameters: - /// - /// * [SignUpDto] signUpDto (required): - Future signUpAdmin(SignUpDto signUpDto, { Future? abortTrigger, }) async { - final response = await signUpAdminWithHttpInfo(signUpDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuthWithHttpInfo(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/authorize'; - - // ignore: prefer_final_locals - Object? postBody = oAuthConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Start OAuth - /// - /// Initiate the OAuth authorization process. - /// - /// Parameters: - /// - /// * [OAuthConfigDto] oAuthConfigDto (required): - Future startOAuth(OAuthConfigDto oAuthConfigDto, { Future? abortTrigger, }) async { - final response = await startOAuthWithHttpInfo(oAuthConfigDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OAuthAuthorizeResponseDto',) as OAuthAuthorizeResponseDto; - - } - return null; - } - - /// Unlink OAuth account - /// - /// Unlink the OAuth account from the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future unlinkOAuthAccountWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/oauth/unlink'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlink OAuth account - /// - /// Unlink the OAuth account from the authenticated user. - Future unlinkOAuthAccount({ Future? abortTrigger, }) async { - final response = await unlinkOAuthAccountWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Unlock auth session - /// - /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SessionUnlockDto] sessionUnlockDto (required): - Future unlockAuthSessionWithHttpInfo(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/session/unlock'; - - // ignore: prefer_final_locals - Object? postBody = sessionUnlockDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Unlock auth session - /// - /// Temporarily grant the session elevated access to locked assets by providing the correct PIN code. - /// - /// Parameters: - /// - /// * [SessionUnlockDto] sessionUnlockDto (required): - Future unlockAuthSession(SessionUnlockDto sessionUnlockDto, { Future? abortTrigger, }) async { - final response = await unlockAuthSessionWithHttpInfo(sessionUnlockDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - /// - /// Note: This method returns the HTTP [Response]. - Future validateAccessTokenWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/auth/validateToken'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Validate access token - /// - /// Validate the current authorization method is still valid. - Future validateAccessToken({ Future? abortTrigger, }) async { - final response = await validateAccessTokenWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateAccessTokenResponseDto',) as ValidateAccessTokenResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/database_backups_admin_api.dart b/mobile/openapi/lib/api/database_backups_admin_api.dart deleted file mode 100644 index ba393833b5..0000000000 --- a/mobile/openapi/lib/api/database_backups_admin_api.dart +++ /dev/null @@ -1,276 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DatabaseBackupsAdminApi { - DatabaseBackupsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackupWithHttpInfo(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // ignore: prefer_final_locals - Object? postBody = databaseBackupDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete database backup - /// - /// Delete a backup by its filename - /// - /// Parameters: - /// - /// * [DatabaseBackupDeleteDto] databaseBackupDeleteDto (required): - Future deleteDatabaseBackup(DatabaseBackupDeleteDto databaseBackupDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteDatabaseBackupWithHttpInfo(databaseBackupDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackupWithHttpInfo(String filename, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/{filename}' - .replaceAll('{filename}', filename); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download database backup - /// - /// Downloads the database backup file - /// - /// Parameters: - /// - /// * [String] filename (required): - Future downloadDatabaseBackup(String filename, { Future? abortTrigger, }) async { - final response = await downloadDatabaseBackupWithHttpInfo(filename, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - /// - /// Note: This method returns the HTTP [Response]. - Future listDatabaseBackupsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List database backups - /// - /// Get the list of the successful and failed backups - Future listDatabaseBackups({ Future? abortTrigger, }) async { - final response = await listDatabaseBackupsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DatabaseBackupListResponseDto',) as DatabaseBackupListResponseDto; - - } - return null; - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - /// - /// Note: This method returns the HTTP [Response]. - Future startDatabaseRestoreFlowWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/start-restore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Start database backup restore flow - /// - /// Put Immich into maintenance mode to restore a backup (Immich must not be configured) - Future startDatabaseRestoreFlow({ Future? abortTrigger, }) async { - final response = await startDatabaseRestoreFlowWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackupWithHttpInfo({ MultipartFile? file, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/database-backups/upload'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upload database backup - /// - /// Uploads .sql/.sql.gz file to restore backup from - /// - /// Parameters: - /// - /// * [MultipartFile] file: - /// Database backup file - Future uploadDatabaseBackup({ MultipartFile? file, Future? abortTrigger, }) async { - final response = await uploadDatabaseBackupWithHttpInfo(file: file, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/deprecated_api.dart b/mobile/openapi/lib/api/deprecated_api.dart deleted file mode 100644 index 9b4472676c..0000000000 --- a/mobile/openapi/lib/api/deprecated_api.dart +++ /dev/null @@ -1,1032 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DeprecatedApi { - DeprecatedApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKeyWithHttpInfo(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/api-keys/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = apiKeyUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an API key - /// - /// Updates the name and permissions of an API key by its ID. The current user must own this API key. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ApiKeyUpdateDto] apiKeyUpdateDto (required): - Future updateApiKey(String id, ApiKeyUpdateDto apiKeyUpdateDto, { Future? abortTrigger, }) async { - final response = await updateApiKeyWithHttpInfo(id, apiKeyUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ApiKeyResponseDto',) as ApiKeyResponseDto; - - } - return null; - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAssetWithHttpInfo(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateAssetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update an asset - /// - /// Update information of a specific asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateAssetDto] updateAssetDto (required): - Future updateAsset(String id, UpdateAssetDto updateAssetDto, { Future? abortTrigger, }) async { - final response = await updateAssetWithHttpInfo(id, updateAssetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto; - - } - return null; - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssetsWithHttpInfo(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/assets'; - - // ignore: prefer_final_locals - Object? postBody = assetBulkUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update assets - /// - /// Updates multiple assets at the same time. - /// - /// Parameters: - /// - /// * [AssetBulkUpdateDto] assetBulkUpdateDto (required): - Future updateAssets(AssetBulkUpdateDto assetBulkUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAssetsWithHttpInfo(assetBulkUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/download_api.dart b/mobile/openapi/lib/api/download_api.dart deleted file mode 100644 index ac26259277..0000000000 --- a/mobile/openapi/lib/api/download_api.dart +++ /dev/null @@ -1,162 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DownloadApi { - DownloadApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Download asset archive - /// - /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchiveWithHttpInfo(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/archive'; - - // ignore: prefer_final_locals - Object? postBody = downloadArchiveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download asset archive - /// - /// Download a ZIP archive containing the specified assets. The assets must have been previously requested via the \"getDownloadInfo\" endpoint. - /// - /// Parameters: - /// - /// * [DownloadArchiveDto] downloadArchiveDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future downloadArchive(DownloadArchiveDto downloadArchiveDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await downloadArchiveWithHttpInfo(downloadArchiveDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Retrieve download information - /// - /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfoWithHttpInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/download/info'; - - // ignore: prefer_final_locals - Object? postBody = downloadInfoDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve download information - /// - /// Retrieve information about how to request a download for the specified assets or album. The response includes groups of assets that can be downloaded together. - /// - /// Parameters: - /// - /// * [DownloadInfoDto] downloadInfoDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future getDownloadInfo(DownloadInfoDto downloadInfoDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await getDownloadInfoWithHttpInfo(downloadInfoDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DownloadResponseDto',) as DownloadResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/duplicates_api.dart b/mobile/openapi/lib/api/duplicates_api.dart deleted file mode 100644 index 357947b889..0000000000 --- a/mobile/openapi/lib/api/duplicates_api.dart +++ /dev/null @@ -1,229 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class DuplicatesApi { - DuplicatesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicateWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Dismiss a duplicate group - /// - /// Dismiss a duplicate group by its ID, unlinking all assets in the group without deleting them. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteDuplicate(String id, { Future? abortTrigger, }) async { - final response = await deleteDuplicateWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicatesWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete duplicates - /// - /// Delete multiple duplicate assets specified by their IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteDuplicates(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteDuplicatesWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - Future getAssetDuplicatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve duplicates - /// - /// Retrieve a list of duplicate assets available to the authenticated user. - Future?> getAssetDuplicates({ Future? abortTrigger, }) async { - final response = await getAssetDuplicatesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future resolveDuplicatesWithHttpInfo(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/duplicates/resolve'; - - // ignore: prefer_final_locals - Object? postBody = duplicateResolveDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Resolve duplicate groups - /// - /// Resolve duplicate groups by synchronizing metadata across assets and deleting/trashing duplicates. - /// - /// Parameters: - /// - /// * [DuplicateResolveDto] duplicateResolveDto (required): - Future?> resolveDuplicates(DuplicateResolveDto duplicateResolveDto, { Future? abortTrigger, }) async { - final response = await resolveDuplicatesWithHttpInfo(duplicateResolveDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/faces_api.dart b/mobile/openapi/lib/api/faces_api.dart deleted file mode 100644 index 2a71bbbaca..0000000000 --- a/mobile/openapi/lib/api/faces_api.dart +++ /dev/null @@ -1,247 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class FacesApi { - FacesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a face - /// - /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFaceWithHttpInfo(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody = assetFaceCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a face - /// - /// Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face. - /// - /// Parameters: - /// - /// * [AssetFaceCreateDto] assetFaceCreateDto (required): - Future createFace(AssetFaceCreateDto assetFaceCreateDto, { Future? abortTrigger, }) async { - final response = await createFaceWithHttpInfo(assetFaceCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFaceWithHttpInfo(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a face - /// - /// Delete a face identified by the id. Optionally can be force deleted. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceDeleteDto] assetFaceDeleteDto (required): - Future deleteFace(String id, AssetFaceDeleteDto assetFaceDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteFaceWithHttpInfo(id, assetFaceDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future getFacesWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'id', id)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve faces for asset - /// - /// Retrieve all faces belonging to an asset. - /// - /// Parameters: - /// - /// * [String] id (required): - /// Face ID - Future?> getFaces(String id, { Future? abortTrigger, }) async { - final response = await getFacesWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Re-assign a face to another person - /// - /// Re-assign the face provided in the body to the person identified by the id in the path parameter. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesByIdWithHttpInfo(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/faces/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = faceDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Re-assign a face to another person - /// - /// Re-assign the face provided in the body to the person identified by the id in the path parameter. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [FaceDto] faceDto (required): - Future reassignFacesById(String id, FaceDto faceDto, { Future? abortTrigger, }) async { - final response = await reassignFacesByIdWithHttpInfo(id, faceDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/jobs_api.dart b/mobile/openapi/lib/api/jobs_api.dart deleted file mode 100644 index 287432ad9a..0000000000 --- a/mobile/openapi/lib/api/jobs_api.dart +++ /dev/null @@ -1,178 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class JobsApi { - JobsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a manual job - /// - /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJobWithHttpInfo(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody = jobCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a manual job - /// - /// Run a specific job. Most jobs are queued automatically, but this endpoint allows for manual creation of a handful of jobs, including various cleanup tasks, as well as creating a new database backup. - /// - /// Parameters: - /// - /// * [JobCreateDto] jobCreateDto (required): - Future createJob(JobCreateDto jobCreateDto, { Future? abortTrigger, }) async { - final response = await createJobWithHttpInfo(jobCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesLegacyWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue counts and status - /// - /// Retrieve the counts of the current queue, as well as the current status. - Future getQueuesLegacy({ Future? abortTrigger, }) async { - final response = await getQueuesLegacyWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueuesResponseLegacyDto',) as QueuesResponseLegacyDto; - - } - return null; - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacyWithHttpInfo(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/jobs/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueCommandDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Run jobs - /// - /// Queue all assets for a specific job type. Defaults to only queueing assets that have not yet been processed, but the force command can be used to re-process all assets. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueCommandDto] queueCommandDto (required): - Future runQueueCommandLegacy(QueueName name, QueueCommandDto queueCommandDto, { Future? abortTrigger, }) async { - final response = await runQueueCommandLegacyWithHttpInfo(name, queueCommandDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseLegacyDto',) as QueueResponseLegacyDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/libraries_api.dart b/mobile/openapi/lib/api/libraries_api.dart deleted file mode 100644 index a3b3086994..0000000000 --- a/mobile/openapi/lib/api/libraries_api.dart +++ /dev/null @@ -1,467 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class LibrariesApi { - LibrariesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a library - /// - /// Create a new external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibraryWithHttpInfo(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // ignore: prefer_final_locals - Object? postBody = createLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a library - /// - /// Create a new external library. - /// - /// Parameters: - /// - /// * [CreateLibraryDto] createLibraryDto (required): - Future createLibrary(CreateLibraryDto createLibraryDto, { Future? abortTrigger, }) async { - final response = await createLibraryWithHttpInfo(createLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a library - /// - /// Delete an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteLibrary(String id, { Future? abortTrigger, }) async { - final response = await deleteLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllLibrariesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve libraries - /// - /// Retrieve a list of external libraries. - Future?> getAllLibraries({ Future? abortTrigger, }) async { - final response = await getAllLibrariesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a library - /// - /// Retrieve an external library by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibrary(String id, { Future? abortTrigger, }) async { - final response = await getLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Retrieve library statistics - /// - /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve library statistics - /// - /// Retrieve statistics for a specific external library, including number of videos, images, and storage usage. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getLibraryStatistics(String id, { Future? abortTrigger, }) async { - final response = await getLibraryStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryStatsResponseDto',) as LibraryStatsResponseDto; - - } - return null; - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibraryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/scan' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Scan a library - /// - /// Queue a scan for the external library to find and import new assets. - /// - /// Parameters: - /// - /// * [String] id (required): - Future scanLibrary(String id, { Future? abortTrigger, }) async { - final response = await scanLibraryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibraryWithHttpInfo(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = updateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a library - /// - /// Update an existing external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UpdateLibraryDto] updateLibraryDto (required): - Future updateLibrary(String id, UpdateLibraryDto updateLibraryDto, { Future? abortTrigger, }) async { - final response = await updateLibraryWithHttpInfo(id, updateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LibraryResponseDto',) as LibraryResponseDto; - - } - return null; - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validateWithHttpInfo(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/libraries/{id}/validate' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = validateLibraryDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Validate library settings - /// - /// Validate the settings of an external library. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [ValidateLibraryDto] validateLibraryDto (required): - Future validate(String id, ValidateLibraryDto validateLibraryDto, { Future? abortTrigger, }) async { - final response = await validateWithHttpInfo(id, validateLibraryDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateLibraryResponseDto',) as ValidateLibraryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/maintenance_admin_api.dart b/mobile/openapi/lib/api/maintenance_admin_api.dart deleted file mode 100644 index 3e43f6d51a..0000000000 --- a/mobile/openapi/lib/api/maintenance_admin_api.dart +++ /dev/null @@ -1,514 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MaintenanceAdminApi { - MaintenanceAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReportWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete integrity report item - /// - /// Delete a given report item and perform corresponding deletion (e.g. trash asset, delete file) - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteIntegrityReport(String id, { Future? abortTrigger, }) async { - final response = await deleteIntegrityReportWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - /// - /// Note: This method returns the HTTP [Response]. - Future detectPriorInstallWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/detect-install'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Detect existing install - /// - /// Collect integrity checks and other heuristics about local data. - Future detectPriorInstall({ Future? abortTrigger, }) async { - final response = await detectPriorInstallWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceDetectInstallResponseDto',) as MaintenanceDetectInstallResponseDto; - - } - return null; - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReportWithHttpInfo(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (cursor != null) { - queryParams.addAll(_queryParams('', 'cursor', cursor)); - } - if (limit != null) { - queryParams.addAll(_queryParams('', 'limit', limit)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report by type - /// - /// Get all flagged items by integrity report type - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - /// - /// * [String] cursor: - /// Cursor for pagination - /// - /// * [int] limit: - /// Number of items per page - Future getIntegrityReport(IntegrityReport type, { String? cursor, int? limit, Future? abortTrigger, }) async { - final response = await getIntegrityReportWithHttpInfo(type, cursor: cursor, limit: limit, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'IntegrityReportResponseDto',) as IntegrityReportResponseDto; - - } - return null; - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsvWithHttpInfo(IntegrityReport type, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{type}/csv' - .replaceAll('{type}', type.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Export integrity report by type as CSV - /// - /// Get all integrity report entries for a given type as a CSV - /// - /// Parameters: - /// - /// * [IntegrityReport] type (required): - Future getIntegrityReportCsv(IntegrityReport type, { Future? abortTrigger, }) async { - final response = await getIntegrityReportCsvWithHttpInfo(type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFileWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/report/{id}/file' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Download flagged file - /// - /// Download the untracked/broken file if one exists - /// - /// Parameters: - /// - /// * [String] id (required): - Future getIntegrityReportFile(String id, { Future? abortTrigger, }) async { - final response = await getIntegrityReportFileWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - /// - /// Note: This method returns the HTTP [Response]. - Future getIntegrityReportSummaryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/integrity/summary'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get integrity report summary - /// - /// Get a count of the items flagged in each integrity report - Future getIntegrityReportSummary({ Future? abortTrigger, }) async { - final response = await getIntegrityReportSummaryWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'IntegrityReportSummaryResponseDto',) as IntegrityReportSummaryResponseDto; - - } - return null; - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - /// - /// Note: This method returns the HTTP [Response]. - Future getMaintenanceStatusWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/status'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get maintenance mode status - /// - /// Fetch information about the currently running maintenance action. - Future getMaintenanceStatus({ Future? abortTrigger, }) async { - final response = await getMaintenanceStatusWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceStatusResponseDto',) as MaintenanceStatusResponseDto; - - } - return null; - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLoginWithHttpInfo(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance/login'; - - // ignore: prefer_final_locals - Object? postBody = maintenanceLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Log into maintenance mode - /// - /// Login with maintenance token or cookie to receive current information and perform further actions. - /// - /// Parameters: - /// - /// * [MaintenanceLoginDto] maintenanceLoginDto (required): - Future maintenanceLogin(MaintenanceLoginDto maintenanceLoginDto, { Future? abortTrigger, }) async { - final response = await maintenanceLoginWithHttpInfo(maintenanceLoginDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MaintenanceAuthDto',) as MaintenanceAuthDto; - - } - return null; - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceModeWithHttpInfo(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/maintenance'; - - // ignore: prefer_final_locals - Object? postBody = setMaintenanceModeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set maintenance mode - /// - /// Put Immich into or take it out of maintenance mode - /// - /// Parameters: - /// - /// * [SetMaintenanceModeDto] setMaintenanceModeDto (required): - Future setMaintenanceMode(SetMaintenanceModeDto setMaintenanceModeDto, { Future? abortTrigger, }) async { - final response = await setMaintenanceModeWithHttpInfo(setMaintenanceModeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/map_api.dart b/mobile/openapi/lib/api/map_api.dart deleted file mode 100644 index 7e1618a875..0000000000 --- a/mobile/openapi/lib/api/map_api.dart +++ /dev/null @@ -1,200 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MapApi { - MapApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve map markers - /// - /// Retrieve a list of latitude and longitude coordinates for every asset with location data. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future getMapMarkersWithHttpInfo({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/markers'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (fileCreatedAfter != null) { - queryParams.addAll(_queryParams('', 'fileCreatedAfter', fileCreatedAfter)); - } - if (fileCreatedBefore != null) { - queryParams.addAll(_queryParams('', 'fileCreatedBefore', fileCreatedBefore)); - } - if (isArchived != null) { - queryParams.addAll(_queryParams('', 'isArchived', isArchived)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withSharedAlbums != null) { - queryParams.addAll(_queryParams('', 'withSharedAlbums', withSharedAlbums)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve map markers - /// - /// Retrieve a list of latitude and longitude coordinates for every asset with location data. - /// - /// Parameters: - /// - /// * [DateTime] fileCreatedAfter: - /// Filter assets created after this date - /// - /// * [DateTime] fileCreatedBefore: - /// Filter assets created before this date - /// - /// * [bool] isArchived: - /// Filter by archived status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] withPartners: - /// Include partner assets - /// - /// * [bool] withSharedAlbums: - /// Include shared album assets - Future?> getMapMarkers({ DateTime? fileCreatedAfter, DateTime? fileCreatedBefore, bool? isArchived, bool? isFavorite, bool? withPartners, bool? withSharedAlbums, Future? abortTrigger, }) async { - final response = await getMapMarkersWithHttpInfo(fileCreatedAfter: fileCreatedAfter, fileCreatedBefore: fileCreatedBefore, isArchived: isArchived, isFavorite: isFavorite, withPartners: withPartners, withSharedAlbums: withSharedAlbums, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Reverse geocode coordinates - /// - /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [double] lat (required): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future reverseGeocodeWithHttpInfo(double lat, double lon, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/map/reverse-geocode'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'lat', lat)); - queryParams.addAll(_queryParams('', 'lon', lon)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reverse geocode coordinates - /// - /// Retrieve location information (e.g., city, country) for given latitude and longitude coordinates. - /// - /// Parameters: - /// - /// * [double] lat (required): - /// Latitude (-90 to 90) - /// - /// * [double] lon (required): - /// Longitude (-180 to 180) - Future?> reverseGeocode(double lat, double lon, { Future? abortTrigger, }) async { - final response = await reverseGeocodeWithHttpInfo(lat, lon, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/memories_api.dart b/mobile/openapi/lib/api/memories_api.dart deleted file mode 100644 index f5c653765a..0000000000 --- a/mobile/openapi/lib/api/memories_api.dart +++ /dev/null @@ -1,586 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class MemoriesApi { - MemoriesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future addMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to a memory - /// - /// Add a list of asset IDs to a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> addMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await addMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Create a memory - /// - /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemoryWithHttpInfo(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody = memoryCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a memory - /// - /// Create a new memory by providing a name, description, and a list of asset IDs to include in the memory. - /// - /// Parameters: - /// - /// * [MemoryCreateDto] memoryCreateDto (required): - Future createMemory(MemoryCreateDto memoryCreateDto, { Future? abortTrigger, }) async { - final response = await createMemoryWithHttpInfo(memoryCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a memory - /// - /// Delete a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteMemory(String id, { Future? abortTrigger, }) async { - final response = await deleteMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemoryWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a memory - /// - /// Retrieve a specific memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getMemory(String id, { Future? abortTrigger, }) async { - final response = await getMemoryWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatisticsWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve memories statistics - /// - /// Retrieve statistics about memories, such as total count and other relevant metrics. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future memoriesStatistics({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await memoriesStatisticsWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryStatisticsResponseDto',) as MemoryStatisticsResponseDto; - - } - return null; - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future removeMemoryAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from a memory - /// - /// Remove a list of asset IDs from a specific memory. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> removeMemoryAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await removeMemoryAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve memories - /// - /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future searchMemoriesWithHttpInfo({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (for_ != null) { - queryParams.addAll(_queryParams('', 'for', for_)); - } - if (isSaved != null) { - queryParams.addAll(_queryParams('', 'isSaved', isSaved)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve memories - /// - /// Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly. - /// - /// Parameters: - /// - /// * [DateTime] for_: - /// Filter by date - /// - /// * [bool] isSaved: - /// Filter by saved status - /// - /// * [bool] isTrashed: - /// Include trashed memories - /// - /// * [MemorySearchOrder] order: - /// - /// * [int] size: - /// Number of memories to return - /// - /// * [MemoryType] type: - Future?> searchMemories({ DateTime? for_, bool? isSaved, bool? isTrashed, MemorySearchOrder? order, int? size, MemoryType? type, Future? abortTrigger, }) async { - final response = await searchMemoriesWithHttpInfo(for_: for_, isSaved: isSaved, isTrashed: isTrashed, order: order, size: size, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemoryWithHttpInfo(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/memories/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = memoryUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a memory - /// - /// Update an existing memory by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MemoryUpdateDto] memoryUpdateDto (required): - Future updateMemory(String id, MemoryUpdateDto memoryUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMemoryWithHttpInfo(id, memoryUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MemoryResponseDto',) as MemoryResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_admin_api.dart b/mobile/openapi/lib/api/notifications_admin_api.dart deleted file mode 100644 index e9e18e791e..0000000000 --- a/mobile/openapi/lib/api/notifications_admin_api.dart +++ /dev/null @@ -1,194 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class NotificationsAdminApi { - NotificationsAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotificationWithHttpInfo(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a notification - /// - /// Create a new notification for a specific user. - /// - /// Parameters: - /// - /// * [NotificationCreateDto] notificationCreateDto (required): - Future createNotification(NotificationCreateDto notificationCreateDto, { Future? abortTrigger, }) async { - final response = await createNotificationWithHttpInfo(notificationCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdminWithHttpInfo(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/templates/{name}' - .replaceAll('{name}', name); - - // ignore: prefer_final_locals - Object? postBody = templateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Render email template - /// - /// Retrieve a preview of the provided email template. - /// - /// Parameters: - /// - /// * [String] name (required): - /// - /// * [TemplateDto] templateDto (required): - Future getNotificationTemplateAdmin(String name, TemplateDto templateDto, { Future? abortTrigger, }) async { - final response = await getNotificationTemplateAdminWithHttpInfo(name, templateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TemplateResponseDto',) as TemplateResponseDto; - - } - return null; - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdminWithHttpInfo(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/notifications/test-email'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigSmtpDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Send test email - /// - /// Send a test email using the provided SMTP configuration. - /// - /// Parameters: - /// - /// * [SystemConfigSmtpDto] systemConfigSmtpDto (required): - Future sendTestEmailAdmin(SystemConfigSmtpDto systemConfigSmtpDto, { Future? abortTrigger, }) async { - final response = await sendTestEmailAdminWithHttpInfo(systemConfigSmtpDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TestEmailResponseDto',) as TestEmailResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/notifications_api.dart b/mobile/openapi/lib/api/notifications_api.dart deleted file mode 100644 index 6b4f213bcd..0000000000 --- a/mobile/openapi/lib/api/notifications_api.dart +++ /dev/null @@ -1,375 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class NotificationsApi { - NotificationsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a notification - /// - /// Delete a specific notification. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteNotification(String id, { Future? abortTrigger, }) async { - final response = await deleteNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotificationsWithHttpInfo(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationDeleteAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete notifications - /// - /// Delete a list of notifications at once. - /// - /// Parameters: - /// - /// * [NotificationDeleteAllDto] notificationDeleteAllDto (required): - Future deleteNotifications(NotificationDeleteAllDto notificationDeleteAllDto, { Future? abortTrigger, }) async { - final response = await deleteNotificationsWithHttpInfo(notificationDeleteAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotificationWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get a notification - /// - /// Retrieve a specific notification identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getNotification(String id, { Future? abortTrigger, }) async { - final response = await getNotificationWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future getNotificationsWithHttpInfo({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (level != null) { - queryParams.addAll(_queryParams('', 'level', level)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (unread != null) { - queryParams.addAll(_queryParams('', 'unread', unread)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve notifications - /// - /// Retrieve a list of notifications. - /// - /// Parameters: - /// - /// * [String] id: - /// Filter by notification ID - /// - /// * [NotificationLevel] level: - /// - /// * [NotificationType] type: - /// - /// * [bool] unread: - /// Filter by unread status - Future?> getNotifications({ String? id, NotificationLevel? level, NotificationType? type, bool? unread, Future? abortTrigger, }) async { - final response = await getNotificationsWithHttpInfo(id: id, level: level, type: type, unread: unread, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotificationWithHttpInfo(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a notification - /// - /// Update a specific notification to set its read status. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [NotificationUpdateDto] notificationUpdateDto (required): - Future updateNotification(String id, NotificationUpdateDto notificationUpdateDto, { Future? abortTrigger, }) async { - final response = await updateNotificationWithHttpInfo(id, notificationUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'NotificationDto',) as NotificationDto; - - } - return null; - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotificationsWithHttpInfo(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/notifications'; - - // ignore: prefer_final_locals - Object? postBody = notificationUpdateAllDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update notifications - /// - /// Update a list of notifications. Allows to bulk-set the read status of notifications. - /// - /// Parameters: - /// - /// * [NotificationUpdateAllDto] notificationUpdateAllDto (required): - Future updateNotifications(NotificationUpdateAllDto notificationUpdateAllDto, { Future? abortTrigger, }) async { - final response = await updateNotificationsWithHttpInfo(notificationUpdateAllDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/partners_api.dart b/mobile/openapi/lib/api/partners_api.dart deleted file mode 100644 index 45bcdcd085..0000000000 --- a/mobile/openapi/lib/api/partners_api.dart +++ /dev/null @@ -1,307 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PartnersApi { - PartnersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartnerWithHttpInfo(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody = partnerCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [PartnerCreateDto] partnerCreateDto (required): - Future createPartner(PartnerCreateDto partnerCreateDto, { Future? abortTrigger, }) async { - final response = await createPartnerWithHttpInfo(partnerCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecatedWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a partner - /// - /// Create a new partner to share assets with. - /// - /// Parameters: - /// - /// * [String] id (required): - Future createPartnerDeprecated(String id, { Future? abortTrigger, }) async { - final response = await createPartnerDeprecatedWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future getPartnersWithHttpInfo(PartnerDirection direction, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'direction', direction)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve partners - /// - /// Retrieve a list of partners with whom assets are shared. - /// - /// Parameters: - /// - /// * [PartnerDirection] direction (required): - Future?> getPartners(PartnerDirection direction, { Future? abortTrigger, }) async { - final response = await getPartnersWithHttpInfo(direction, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartnerWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove a partner - /// - /// Stop sharing assets with a partner. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removePartner(String id, { Future? abortTrigger, }) async { - final response = await removePartnerWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartnerWithHttpInfo(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/partners/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = partnerUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a partner - /// - /// Specify whether a partner's assets should appear in the user's timeline. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PartnerUpdateDto] partnerUpdateDto (required): - Future updatePartner(String id, PartnerUpdateDto partnerUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePartnerWithHttpInfo(id, partnerUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PartnerResponseDto',) as PartnerResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/people_api.dart b/mobile/openapi/lib/api/people_api.dart deleted file mode 100644 index c35491e110..0000000000 --- a/mobile/openapi/lib/api/people_api.dart +++ /dev/null @@ -1,699 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PeopleApi { - PeopleApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPersonWithHttpInfo(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = personCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a person - /// - /// Create a new person that can have multiple faces assigned to them. - /// - /// Parameters: - /// - /// * [PersonCreateDto] personCreateDto (required): - Future createPerson(PersonCreateDto personCreateDto, { Future? abortTrigger, }) async { - final response = await createPersonWithHttpInfo(personCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeopleWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete people - /// - /// Bulk delete a list of people at once. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deletePeople(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deletePeopleWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete person - /// - /// Delete an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deletePerson(String id, { Future? abortTrigger, }) async { - final response = await deletePersonWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeopleWithHttpInfo({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (closestAssetId != null) { - queryParams.addAll(_queryParams('', 'closestAssetId', closestAssetId)); - } - if (closestPersonId != null) { - queryParams.addAll(_queryParams('', 'closestPersonId', closestPersonId)); - } - if (page != null) { - queryParams.addAll(_queryParams('', 'page', page)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get all people - /// - /// Retrieve a list of all people. - /// - /// Parameters: - /// - /// * [String] closestAssetId: - /// Closest asset ID for similarity search - /// - /// * [String] closestPersonId: - /// Closest person ID for similarity search - /// - /// * [int] page: - /// Page number for pagination - /// - /// * [int] size: - /// Number of items per page - /// - /// * [bool] withHidden: - /// Include hidden people - Future getAllPeople({ String? closestAssetId, String? closestPersonId, int? page, int? size, bool? withHidden, Future? abortTrigger, }) async { - final response = await getAllPeopleWithHttpInfo(closestAssetId: closestAssetId, closestPersonId: closestPersonId, page: page, size: size, withHidden: withHidden, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PeopleResponseDto',) as PeopleResponseDto; - - } - return null; - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get a person - /// - /// Retrieve a person by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPerson(String id, { Future? abortTrigger, }) async { - final response = await getPersonWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatisticsWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get person statistics - /// - /// Retrieve statistics about a specific person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonStatistics(String id, { Future? abortTrigger, }) async { - final response = await getPersonStatisticsWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonStatisticsResponseDto',) as PersonStatisticsResponseDto; - - } - return null; - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnailWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/thumbnail' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get person thumbnail - /// - /// Retrieve the thumbnail file for a person. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPersonThumbnail(String id, { Future? abortTrigger, }) async { - final response = await getPersonThumbnailWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future mergePersonWithHttpInfo(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/merge' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = mergePersonDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Merge people - /// - /// Merge a list of people into the person specified in the path parameter. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [MergePersonDto] mergePersonDto (required): - Future?> mergePerson(String id, MergePersonDto mergePersonDto, { Future? abortTrigger, }) async { - final response = await mergePersonWithHttpInfo(id, mergePersonDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future reassignFacesWithHttpInfo(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}/reassign' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetFaceUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Reassign faces - /// - /// Bulk reassign a list of faces to a different person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetFaceUpdateDto] assetFaceUpdateDto (required): - Future?> reassignFaces(String id, AssetFaceUpdateDto assetFaceUpdateDto, { Future? abortTrigger, }) async { - final response = await reassignFacesWithHttpInfo(id, assetFaceUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future updatePeopleWithHttpInfo(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people'; - - // ignore: prefer_final_locals - Object? postBody = peopleUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update people - /// - /// Bulk update multiple people at once. - /// - /// Parameters: - /// - /// * [PeopleUpdateDto] peopleUpdateDto (required): - Future?> updatePeople(PeopleUpdateDto peopleUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePeopleWithHttpInfo(peopleUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update person - /// - /// Update an individual person. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePersonWithHttpInfo(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/people/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = personUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update person - /// - /// Update an individual person. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [PersonUpdateDto] personUpdateDto (required): - Future updatePerson(String id, PersonUpdateDto personUpdateDto, { Future? abortTrigger, }) async { - final response = await updatePersonWithHttpInfo(id, personUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/plugins_api.dart b/mobile/openapi/lib/api/plugins_api.dart deleted file mode 100644 index 40892b8a67..0000000000 --- a/mobile/openapi/lib/api/plugins_api.dart +++ /dev/null @@ -1,363 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class PluginsApi { - PluginsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPluginWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a plugin - /// - /// Retrieve information about a specific plugin by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getPlugin(String id, { Future? abortTrigger, }) async { - final response = await getPluginWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PluginResponseDto',) as PluginResponseDto; - - } - return null; - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future searchPluginMethodsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/methods'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (pluginName != null) { - queryParams.addAll(_queryParams('', 'pluginName', pluginName)); - } - if (pluginVersion != null) { - queryParams.addAll(_queryParams('', 'pluginVersion', pluginVersion)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve plugin methods - /// - /// Retrieve a list of plugin methods - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin method is enabled - /// - /// * [String] id: - /// Plugin method ID - /// - /// * [String] name: - /// - /// * [String] pluginName: - /// Plugin name - /// - /// * [String] pluginVersion: - /// Plugin version - /// - /// * [String] title: - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger - /// - /// * [WorkflowType] type: - /// Workflow types - Future?> searchPluginMethods({ String? description, bool? enabled, String? id, String? name, String? pluginName, String? pluginVersion, String? title, WorkflowTrigger? trigger, WorkflowType? type, Future? abortTrigger, }) async { - final response = await searchPluginMethodsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, pluginName: pluginName, pluginVersion: pluginVersion, title: title, trigger: trigger, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - /// - /// Note: This method returns the HTTP [Response]. - Future searchPluginTemplatesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins/templates'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve workflow templates - /// - /// Retrieve workflow templates provided by installed plugins - Future?> searchPluginTemplates({ Future? abortTrigger, }) async { - final response = await searchPluginTemplatesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future searchPluginsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/plugins'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (title != null) { - queryParams.addAll(_queryParams('', 'title', title)); - } - if (version != null) { - queryParams.addAll(_queryParams('', 'version', version)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all plugins - /// - /// Retrieve a list of plugins available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// - /// * [bool] enabled: - /// Whether the plugin is enabled - /// - /// * [String] id: - /// Plugin ID - /// - /// * [String] name: - /// - /// * [String] title: - /// - /// * [String] version: - Future?> searchPlugins({ String? description, bool? enabled, String? id, String? name, String? title, String? version, Future? abortTrigger, }) async { - final response = await searchPluginsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, title: title, version: version, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/queues_api.dart b/mobile/openapi/lib/api/queues_api.dart deleted file mode 100644 index 39386c23f9..0000000000 --- a/mobile/openapi/lib/api/queues_api.dart +++ /dev/null @@ -1,315 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class QueuesApi { - QueuesApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueueWithHttpInfo(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Empty a queue - /// - /// Removes all jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueDeleteDto] queueDeleteDto (required): - Future emptyQueue(QueueName name, QueueDeleteDto queueDeleteDto, { Future? abortTrigger, }) async { - final response = await emptyQueueWithHttpInfo(name, queueDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueueWithHttpInfo(QueueName name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a queue - /// - /// Retrieves a specific queue by its name. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - Future getQueue(QueueName name, { Future? abortTrigger, }) async { - final response = await getQueueWithHttpInfo(name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future getQueueJobsWithHttpInfo(QueueName name, { List? status, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}/jobs' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (status != null) { - queryParams.addAll(_queryParams('multi', 'status', status)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve queue jobs - /// - /// Retrieves a list of queue jobs from the specified queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [List] status: - /// Filter jobs by status - Future?> getQueueJobs(QueueName name, { List? status, Future? abortTrigger, }) async { - final response = await getQueueJobsWithHttpInfo(name, status: status, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all queues - /// - /// Retrieves a list of queues. - /// - /// Note: This method returns the HTTP [Response]. - Future getQueuesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all queues - /// - /// Retrieves a list of queues. - Future?> getQueues({ Future? abortTrigger, }) async { - final response = await getQueuesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueueWithHttpInfo(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/queues/{name}' - .replaceAll('{name}', name.toString()); - - // ignore: prefer_final_locals - Object? postBody = queueUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a queue - /// - /// Change the paused status of a specific queue. - /// - /// Parameters: - /// - /// * [QueueName] name (required): - /// - /// * [QueueUpdateDto] queueUpdateDto (required): - Future updateQueue(QueueName name, QueueUpdateDto queueUpdateDto, { Future? abortTrigger, }) async { - final response = await updateQueueWithHttpInfo(name, queueUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'QueueResponseDto',) as QueueResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/search_api.dart b/mobile/openapi/lib/api/search_api.dart deleted file mode 100644 index 9957949812..0000000000 --- a/mobile/openapi/lib/api/search_api.dart +++ /dev/null @@ -1,953 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SearchApi { - SearchApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve assets by city - /// - /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. - /// - /// Note: This method returns the HTTP [Response]. - Future getAssetsByCityWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/cities'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve assets by city - /// - /// Retrieve a list of assets with each asset belonging to a different city. This endpoint is used on the places pages to show a single thumbnail for each city the user has assets in. - Future?> getAssetsByCity({ Future? abortTrigger, }) async { - final response = await getAssetsByCityWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - /// - /// Note: This method returns the HTTP [Response]. - Future getExploreDataWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/explore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve explore data - /// - /// Retrieve data for the explore section, such as popular people and places. - Future?> getExploreData({ Future? abortTrigger, }) async { - final response = await getExploreDataWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve search suggestions - /// - /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future getSearchSuggestionsWithHttpInfo(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/suggestions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (includeNull != null) { - queryParams.addAll(_queryParams('', 'includeNull', includeNull)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - queryParams.addAll(_queryParams('', 'type', type)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve search suggestions - /// - /// Retrieve search suggestions based on partial input. This endpoint is used for typeahead search features. - /// - /// Parameters: - /// - /// * [SearchSuggestionType] type (required): - /// - /// * [String] country: - /// Filter by country - /// - /// * [bool] includeNull: - /// Include null values in suggestions - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] state: - /// Filter by state/province - Future?> getSearchSuggestions(SearchSuggestionType type, { String? country, bool? includeNull, String? lensModel, String? make, String? model, String? state, Future? abortTrigger, }) async { - final response = await getSearchSuggestionsWithHttpInfo(type, country: country, includeNull: includeNull, lensModel: lensModel, make: make, model: model, state: state, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search asset statistics - /// - /// Retrieve statistical data about assets based on search criteria, such as the total matching count. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatisticsWithHttpInfo(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/statistics'; - - // ignore: prefer_final_locals - Object? postBody = statisticsSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search asset statistics - /// - /// Retrieve statistical data about assets based on search criteria, such as the total matching count. - /// - /// Parameters: - /// - /// * [StatisticsSearchDto] statisticsSearchDto (required): - Future searchAssetStatistics(StatisticsSearchDto statisticsSearchDto, { Future? abortTrigger, }) async { - final response = await searchAssetStatisticsWithHttpInfo(statisticsSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchStatisticsResponseDto',) as SearchStatisticsResponseDto; - - } - return null; - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future searchAssetsWithHttpInfo(MetadataSearchDto metadataSearchDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/metadata'; - - // ignore: prefer_final_locals - Object? postBody = metadataSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search assets by metadata - /// - /// Search for assets based on various metadata criteria. - /// - /// Parameters: - /// - /// * [MetadataSearchDto] metadataSearchDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future searchAssets(MetadataSearchDto metadataSearchDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await searchAssetsWithHttpInfo(metadataSearchDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future searchLargeAssetsWithHttpInfo({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/large-assets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumIds != null) { - queryParams.addAll(_queryParams('multi', 'albumIds', albumIds)); - } - if (city != null) { - queryParams.addAll(_queryParams('', 'city', city)); - } - if (country != null) { - queryParams.addAll(_queryParams('', 'country', country)); - } - if (createdAfter != null) { - queryParams.addAll(_queryParams('', 'createdAfter', createdAfter)); - } - if (createdBefore != null) { - queryParams.addAll(_queryParams('', 'createdBefore', createdBefore)); - } - if (isEncoded != null) { - queryParams.addAll(_queryParams('', 'isEncoded', isEncoded)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isMotion != null) { - queryParams.addAll(_queryParams('', 'isMotion', isMotion)); - } - if (isNotInAlbum != null) { - queryParams.addAll(_queryParams('', 'isNotInAlbum', isNotInAlbum)); - } - if (isOffline != null) { - queryParams.addAll(_queryParams('', 'isOffline', isOffline)); - } - if (lensModel != null) { - queryParams.addAll(_queryParams('', 'lensModel', lensModel)); - } - if (libraryId != null) { - queryParams.addAll(_queryParams('', 'libraryId', libraryId)); - } - if (make != null) { - queryParams.addAll(_queryParams('', 'make', make)); - } - if (minFileSize != null) { - queryParams.addAll(_queryParams('', 'minFileSize', minFileSize)); - } - if (model != null) { - queryParams.addAll(_queryParams('', 'model', model)); - } - if (ocr != null) { - queryParams.addAll(_queryParams('', 'ocr', ocr)); - } - if (personIds != null) { - queryParams.addAll(_queryParams('multi', 'personIds', personIds)); - } - if (rating != null) { - queryParams.addAll(_queryParams('', 'rating', rating)); - } - if (size != null) { - queryParams.addAll(_queryParams('', 'size', size)); - } - if (state != null) { - queryParams.addAll(_queryParams('', 'state', state)); - } - if (tagIds != null) { - queryParams.addAll(_queryParams('multi', 'tagIds', tagIds)); - } - if (takenAfter != null) { - queryParams.addAll(_queryParams('', 'takenAfter', takenAfter)); - } - if (takenBefore != null) { - queryParams.addAll(_queryParams('', 'takenBefore', takenBefore)); - } - if (trashedAfter != null) { - queryParams.addAll(_queryParams('', 'trashedAfter', trashedAfter)); - } - if (trashedBefore != null) { - queryParams.addAll(_queryParams('', 'trashedBefore', trashedBefore)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - if (updatedAfter != null) { - queryParams.addAll(_queryParams('', 'updatedAfter', updatedAfter)); - } - if (updatedBefore != null) { - queryParams.addAll(_queryParams('', 'updatedBefore', updatedBefore)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - if (withExif != null) { - queryParams.addAll(_queryParams('', 'withExif', withExif)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search large assets - /// - /// Search for assets that are considered large based on specified criteria. - /// - /// Parameters: - /// - /// * [List] albumIds: - /// Filter by album IDs - /// - /// * [String] city: - /// Filter by city name - /// - /// * [String] country: - /// Filter by country name - /// - /// * [DateTime] createdAfter: - /// Filter by creation date (after) - /// - /// * [DateTime] createdBefore: - /// Filter by creation date (before) - /// - /// * [bool] isEncoded: - /// Filter by encoded status - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isMotion: - /// Filter by motion photo status - /// - /// * [bool] isNotInAlbum: - /// Filter assets not in any album - /// - /// * [bool] isOffline: - /// Filter by offline status - /// - /// * [String] lensModel: - /// Filter by lens model - /// - /// * [String] libraryId: - /// Library ID to filter by - /// - /// * [String] make: - /// Filter by camera make - /// - /// * [int] minFileSize: - /// Minimum file size in bytes - /// - /// * [String] model: - /// Filter by camera model - /// - /// * [String] ocr: - /// Filter by OCR text content - /// - /// * [List] personIds: - /// Filter by person IDs - /// - /// * [int] rating: - /// Filter by rating [1-5], or null for unrated - /// - /// * [int] size: - /// Number of results to return - /// - /// * [String] state: - /// Filter by state/province name - /// - /// * [List] tagIds: - /// Filter by tag IDs - /// - /// * [DateTime] takenAfter: - /// Filter by taken date (after) - /// - /// * [DateTime] takenBefore: - /// Filter by taken date (before) - /// - /// * [DateTime] trashedAfter: - /// Filter by trash date (after) - /// - /// * [DateTime] trashedBefore: - /// Filter by trash date (before) - /// - /// * [AssetTypeEnum] type: - /// - /// * [DateTime] updatedAfter: - /// Filter by update date (after) - /// - /// * [DateTime] updatedBefore: - /// Filter by update date (before) - /// - /// * [AssetVisibility] visibility: - /// - /// * [bool] withDeleted: - /// Include deleted assets - /// - /// * [bool] withExif: - /// Include EXIF data in response - Future?> searchLargeAssets({ List? albumIds, String? city, String? country, DateTime? createdAfter, DateTime? createdBefore, bool? isEncoded, bool? isFavorite, bool? isMotion, bool? isNotInAlbum, bool? isOffline, String? lensModel, String? libraryId, String? make, int? minFileSize, String? model, String? ocr, List? personIds, int? rating, int? size, String? state, List? tagIds, DateTime? takenAfter, DateTime? takenBefore, DateTime? trashedAfter, DateTime? trashedBefore, AssetTypeEnum? type, DateTime? updatedAfter, DateTime? updatedBefore, AssetVisibility? visibility, bool? withDeleted, bool? withExif, Future? abortTrigger, }) async { - final response = await searchLargeAssetsWithHttpInfo(albumIds: albumIds, city: city, country: country, createdAfter: createdAfter, createdBefore: createdBefore, isEncoded: isEncoded, isFavorite: isFavorite, isMotion: isMotion, isNotInAlbum: isNotInAlbum, isOffline: isOffline, lensModel: lensModel, libraryId: libraryId, make: make, minFileSize: minFileSize, model: model, ocr: ocr, personIds: personIds, rating: rating, size: size, state: state, tagIds: tagIds, takenAfter: takenAfter, takenBefore: takenBefore, trashedAfter: trashedAfter, trashedBefore: trashedBefore, type: type, updatedAfter: updatedAfter, updatedBefore: updatedBefore, visibility: visibility, withDeleted: withDeleted, withExif: withExif, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search people - /// - /// Search for people by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future searchPersonWithHttpInfo(String name, { bool? withHidden, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/person'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - if (withHidden != null) { - queryParams.addAll(_queryParams('', 'withHidden', withHidden)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search people - /// - /// Search for people by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Person name to search for - /// - /// * [bool] withHidden: - /// Include hidden people - Future?> searchPerson(String name, { bool? withHidden, Future? abortTrigger, }) async { - final response = await searchPersonWithHttpInfo(name, withHidden: withHidden, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search places - /// - /// Search for places by name. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future searchPlacesWithHttpInfo(String name, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/places'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'name', name)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search places - /// - /// Search for places by name. - /// - /// Parameters: - /// - /// * [String] name (required): - /// Place name to search for - Future?> searchPlaces(String name, { Future? abortTrigger, }) async { - final response = await searchPlacesWithHttpInfo(name, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future searchRandomWithHttpInfo(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/random'; - - // ignore: prefer_final_locals - Object? postBody = randomSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search random assets - /// - /// Retrieve a random selection of assets based on the provided criteria. - /// - /// Parameters: - /// - /// * [RandomSearchDto] randomSearchDto (required): - Future?> searchRandom(RandomSearchDto randomSearchDto, { Future? abortTrigger, }) async { - final response = await searchRandomWithHttpInfo(randomSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmartWithHttpInfo(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/search/smart'; - - // ignore: prefer_final_locals - Object? postBody = smartSearchDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Smart asset search - /// - /// Perform a smart search for assets by using machine learning vectors to determine relevance. - /// - /// Parameters: - /// - /// * [SmartSearchDto] smartSearchDto (required): - Future searchSmart(SmartSearchDto smartSearchDto, { Future? abortTrigger, }) async { - final response = await searchSmartWithHttpInfo(smartSearchDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SearchResponseDto',) as SearchResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/server_api.dart b/mobile/openapi/lib/api/server_api.dart deleted file mode 100644 index 1a46a86188..0000000000 --- a/mobile/openapi/lib/api/server_api.dart +++ /dev/null @@ -1,707 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ServerApi { - ServerApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete server product key - /// - /// Delete the currently set server product key. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete server product key - /// - /// Delete the currently set server product key. - Future deleteServerLicense({ Future? abortTrigger, }) async { - final response = await deleteServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getAboutInfoWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/about'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get server information - /// - /// Retrieve a list of information about the server. - Future getAboutInfo({ Future? abortTrigger, }) async { - final response = await getAboutInfoWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerAboutResponseDto',) as ServerAboutResponseDto; - - } - return null; - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - /// - /// Note: This method returns the HTTP [Response]. - Future getApkLinksWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/apk-links'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get APK links - /// - /// Retrieve links to the APKs for the current server version. - Future getApkLinks({ Future? abortTrigger, }) async { - final response = await getApkLinksWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerApkLinksDto',) as ServerApkLinksDto; - - } - return null; - } - - /// Get config - /// - /// Retrieve the current server configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/config'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get config - /// - /// Retrieve the current server configuration. - Future getServerConfig({ Future? abortTrigger, }) async { - final response = await getServerConfigWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerConfigDto',) as ServerConfigDto; - - } - return null; - } - - /// Get features - /// - /// Retrieve available features supported by this server. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerFeaturesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/features'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get features - /// - /// Retrieve available features supported by this server. - Future getServerFeatures({ Future? abortTrigger, }) async { - final response = await getServerFeaturesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerFeaturesDto',) as ServerFeaturesDto; - - } - return null; - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get product key - /// - /// Retrieve information about whether the server currently has a product key registered. - Future getServerLicense({ Future? abortTrigger, }) async { - final response = await getServerLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerStatisticsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/statistics'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get statistics - /// - /// Retrieve statistics about the entire Immich instance such as asset counts. - Future getServerStatistics({ Future? abortTrigger, }) async { - final response = await getServerStatisticsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStatsResponseDto',) as ServerStatsResponseDto; - - } - return null; - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - /// - /// Note: This method returns the HTTP [Response]. - Future getServerVersionWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get server version - /// - /// Retrieve the current server version in semantic versioning (semver) format. - Future getServerVersion({ Future? abortTrigger, }) async { - final response = await getServerVersionWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionResponseDto',) as ServerVersionResponseDto; - - } - return null; - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/storage'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get storage - /// - /// Retrieve the current storage utilization information of the server. - Future getStorage({ Future? abortTrigger, }) async { - final response = await getStorageWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerStorageResponseDto',) as ServerStorageResponseDto; - - } - return null; - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - /// - /// Note: This method returns the HTTP [Response]. - Future getSupportedMediaTypesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/media-types'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get supported media types - /// - /// Retrieve all media types supported by the server. - Future getSupportedMediaTypes({ Future? abortTrigger, }) async { - final response = await getSupportedMediaTypesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerMediaTypesResponseDto',) as ServerMediaTypesResponseDto; - - } - return null; - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-check'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get version check status - /// - /// Retrieve information about the last time the version check ran. - Future getVersionCheck({ Future? abortTrigger, }) async { - final response = await getVersionCheckWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionHistoryWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/version-history'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get version history - /// - /// Retrieve a list of past versions the server has been on. - Future?> getVersionHistory({ Future? abortTrigger, }) async { - final response = await getVersionHistoryWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Ping - /// - /// Pong - /// - /// Note: This method returns the HTTP [Response]. - Future pingServerWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/ping'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Ping - /// - /// Pong - Future pingServer({ Future? abortTrigger, }) async { - final response = await pingServerWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse; - - } - return null; - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/server/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set server product key - /// - /// Validate and set the server product key if successful. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setServerLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setServerLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sessions_api.dart b/mobile/openapi/lib/api/sessions_api.dart deleted file mode 100644 index fdd6c09266..0000000000 --- a/mobile/openapi/lib/api/sessions_api.dart +++ /dev/null @@ -1,330 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SessionsApi { - SessionsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a session - /// - /// Create a session as a child to the current session. This endpoint is used for casting. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSessionWithHttpInfo(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody = sessionCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a session - /// - /// Create a session as a child to the current session. This endpoint is used for casting. - /// - /// Parameters: - /// - /// * [SessionCreateDto] sessionCreateDto (required): - Future createSession(SessionCreateDto sessionCreateDto, { Future? abortTrigger, }) async { - final response = await createSessionWithHttpInfo(sessionCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionCreateResponseDto',) as SessionCreateResponseDto; - - } - return null; - } - - /// Delete all sessions - /// - /// Delete all sessions for the user. This will not delete the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteAllSessionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete all sessions - /// - /// Delete all sessions for the user. This will not delete the current session. - Future deleteAllSessions({ Future? abortTrigger, }) async { - final response = await deleteAllSessionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a session - /// - /// Delete a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteSession(String id, { Future? abortTrigger, }) async { - final response = await deleteSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - /// - /// Note: This method returns the HTTP [Response]. - Future getSessionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve sessions - /// - /// Retrieve a list of sessions for the user. - Future?> getSessions({ Future? abortTrigger, }) async { - final response = await getSessionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSessionWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}/lock' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Lock a session - /// - /// Lock a specific session by id. - /// - /// Parameters: - /// - /// * [String] id (required): - Future lockSession(String id, { Future? abortTrigger, }) async { - final response = await lockSessionWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSessionWithHttpInfo(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sessions/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sessionUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a session - /// - /// Update a specific session identified by id. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SessionUpdateDto] sessionUpdateDto (required): - Future updateSession(String id, SessionUpdateDto sessionUpdateDto, { Future? abortTrigger, }) async { - final response = await updateSessionWithHttpInfo(id, sessionUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SessionResponseDto',) as SessionResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/shared_links_api.dart b/mobile/openapi/lib/api/shared_links_api.dart deleted file mode 100644 index 5bd548d7d2..0000000000 --- a/mobile/openapi/lib/api/shared_links_api.dart +++ /dev/null @@ -1,590 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SharedLinksApi { - SharedLinksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Add assets to a shared link - /// - /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future addSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Add assets to a shared link - /// - /// Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> addSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await addSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLinkWithHttpInfo(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a shared link - /// - /// Create a new shared link. - /// - /// Parameters: - /// - /// * [SharedLinkCreateDto] sharedLinkCreateDto (required): - Future createSharedLink(SharedLinkCreateDto sharedLinkCreateDto, { Future? abortTrigger, }) async { - final response = await createSharedLinkWithHttpInfo(sharedLinkCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future getAllSharedLinksWithHttpInfo({ String? albumId, String? id, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve all shared links - /// - /// Retrieve a list of all shared links. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter by album ID - /// - /// * [String] id: - /// Filter by shared link ID - Future?> getAllSharedLinks({ String? albumId, String? id, Future? abortTrigger, }) async { - final response = await getAllSharedLinksWithHttpInfo(albumId: albumId, id: id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLinkWithHttpInfo({ String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve current shared link - /// - /// Retrieve the current shared link associated with authentication method. - /// - /// Parameters: - /// - /// * [String] key: - /// - /// * [String] slug: - Future getMySharedLink({ String? key, String? slug, Future? abortTrigger, }) async { - final response = await getMySharedLinkWithHttpInfo(key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a shared link - /// - /// Retrieve a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getSharedLinkById(String id, { Future? abortTrigger, }) async { - final response = await getSharedLinkByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLinkWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a shared link - /// - /// Delete a specific shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future removeSharedLink(String id, { Future? abortTrigger, }) async { - final response = await removeSharedLinkWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Remove assets from a shared link - /// - /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future removeSharedLinkAssetsWithHttpInfo(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = assetIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove assets from a shared link - /// - /// Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [AssetIdsDto] assetIdsDto (required): - Future?> removeSharedLinkAssets(String id, AssetIdsDto assetIdsDto, { Future? abortTrigger, }) async { - final response = await removeSharedLinkAssetsWithHttpInfo(id, assetIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLoginWithHttpInfo(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/login'; - - // ignore: prefer_final_locals - Object? postBody = sharedLinkLoginDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Shared link login - /// - /// Login to a password protected shared link - /// - /// Parameters: - /// - /// * [SharedLinkLoginDto] sharedLinkLoginDto (required): - /// - /// * [String] key: - /// - /// * [String] slug: - Future sharedLinkLogin(SharedLinkLoginDto sharedLinkLoginDto, { String? key, String? slug, Future? abortTrigger, }) async { - final response = await sharedLinkLoginWithHttpInfo(sharedLinkLoginDto, key: key, slug: slug, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLinkWithHttpInfo(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/shared-links/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = sharedLinkEditDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PATCH', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a shared link - /// - /// Update an existing shared link by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [SharedLinkEditDto] sharedLinkEditDto (required): - Future updateSharedLink(String id, SharedLinkEditDto sharedLinkEditDto, { Future? abortTrigger, }) async { - final response = await updateSharedLinkWithHttpInfo(id, sharedLinkEditDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SharedLinkResponseDto',) as SharedLinkResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/stacks_api.dart b/mobile/openapi/lib/api/stacks_api.dart deleted file mode 100644 index a99ebe0600..0000000000 --- a/mobile/openapi/lib/api/stacks_api.dart +++ /dev/null @@ -1,415 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class StacksApi { - StacksApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a stack - /// - /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStackWithHttpInfo(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = stackCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a stack - /// - /// Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack. - /// - /// Parameters: - /// - /// * [StackCreateDto] stackCreateDto (required): - Future createStack(StackCreateDto stackCreateDto, { Future? abortTrigger, }) async { - final response = await createStackWithHttpInfo(stackCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a stack - /// - /// Delete a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteStack(String id, { Future? abortTrigger, }) async { - final response = await deleteStackWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacksWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete stacks - /// - /// Delete multiple stacks by providing a list of stack IDs. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future deleteStacks(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await deleteStacksWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStackWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a stack - /// - /// Retrieve a specific stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getStack(String id, { Future? abortTrigger, }) async { - final response = await getStackWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } - - /// Remove an asset from a stack - /// - /// Remove a specific asset from a stack by providing the stack ID and asset ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStackWithHttpInfo(String assetId, String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}/assets/{assetId}' - .replaceAll('{assetId}', assetId) - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Remove an asset from a stack - /// - /// Remove a specific asset from a stack by providing the stack ID and asset ID. - /// - /// Parameters: - /// - /// * [String] assetId (required): - /// - /// * [String] id (required): - Future removeAssetFromStack(String assetId, String id, { Future? abortTrigger, }) async { - final response = await removeAssetFromStackWithHttpInfo(assetId, id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future searchStacksWithHttpInfo({ String? primaryAssetId, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (primaryAssetId != null) { - queryParams.addAll(_queryParams('', 'primaryAssetId', primaryAssetId)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve stacks - /// - /// Retrieve a list of stacks. - /// - /// Parameters: - /// - /// * [String] primaryAssetId: - /// Filter by primary asset ID - Future?> searchStacks({ String? primaryAssetId, Future? abortTrigger, }) async { - final response = await searchStacksWithHttpInfo(primaryAssetId: primaryAssetId, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStackWithHttpInfo(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/stacks/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = stackUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a stack - /// - /// Update an existing stack by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [StackUpdateDto] stackUpdateDto (required): - Future updateStack(String id, StackUpdateDto stackUpdateDto, { Future? abortTrigger, }) async { - final response = await updateStackWithHttpInfo(id, stackUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'StackResponseDto',) as StackResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/sync_api.dart b/mobile/openapi/lib/api/sync_api.dart deleted file mode 100644 index c2a57c3395..0000000000 --- a/mobile/openapi/lib/api/sync_api.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SyncApi { - SyncApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAckWithHttpInfo(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete acknowledgements - /// - /// Delete specific synchronization acknowledgments. - /// - /// Parameters: - /// - /// * [SyncAckDeleteDto] syncAckDeleteDto (required): - Future deleteSyncAck(SyncAckDeleteDto syncAckDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteSyncAckWithHttpInfo(syncAckDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - /// - /// Note: This method returns the HTTP [Response]. - Future getSyncAckWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve acknowledgements - /// - /// Retrieve the synchronization acknowledgments for the current session. - Future?> getSyncAck({ Future? abortTrigger, }) async { - final response = await getSyncAckWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Stream sync changes - /// - /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStreamWithHttpInfo(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/stream'; - - // ignore: prefer_final_locals - Object? postBody = syncStreamDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Stream sync changes - /// - /// Retrieve a JSON lines streamed response of changes for synchronization. This endpoint is used by the mobile app to efficiently stay up to date with changes. - /// - /// Parameters: - /// - /// * [SyncStreamDto] syncStreamDto (required): - Future getSyncStream(SyncStreamDto syncStreamDto, { Future? abortTrigger, }) async { - final response = await getSyncStreamWithHttpInfo(syncStreamDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAckWithHttpInfo(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/sync/ack'; - - // ignore: prefer_final_locals - Object? postBody = syncAckSetDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Acknowledge changes - /// - /// Send a list of synchronization acknowledgements to confirm that the latest changes have been received. - /// - /// Parameters: - /// - /// * [SyncAckSetDto] syncAckSetDto (required): - Future sendSyncAck(SyncAckSetDto syncAckSetDto, { Future? abortTrigger, }) async { - final response = await sendSyncAckWithHttpInfo(syncAckSetDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/system_config_api.dart b/mobile/openapi/lib/api/system_config_api.dart deleted file mode 100644 index ba5b82263a..0000000000 --- a/mobile/openapi/lib/api/system_config_api.dart +++ /dev/null @@ -1,222 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SystemConfigApi { - SystemConfigApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get system configuration - /// - /// Retrieve the current system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration - /// - /// Retrieve the current system configuration. - Future getConfig({ Future? abortTrigger, }) async { - final response = await getConfigWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - /// - /// Note: This method returns the HTTP [Response]. - Future getConfigDefaultsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/defaults'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get system configuration defaults - /// - /// Retrieve the default values for the system configuration. - Future getConfigDefaults({ Future? abortTrigger, }) async { - final response = await getConfigDefaultsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - /// - /// Note: This method returns the HTTP [Response]. - Future getStorageTemplateOptionsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config/storage-template-options'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get storage template options - /// - /// Retrieve exemplary storage template options. - Future getStorageTemplateOptions({ Future? abortTrigger, }) async { - final response = await getStorageTemplateOptionsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigTemplateStorageOptionDto',) as SystemConfigTemplateStorageOptionDto; - - } - return null; - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfigWithHttpInfo(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-config'; - - // ignore: prefer_final_locals - Object? postBody = systemConfigDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update system configuration - /// - /// Update the system configuration with a new system configuration. - /// - /// Parameters: - /// - /// * [SystemConfigDto] systemConfigDto (required): - Future updateConfig(SystemConfigDto systemConfigDto, { Future? abortTrigger, }) async { - final response = await updateConfigWithHttpInfo(systemConfigDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'SystemConfigDto',) as SystemConfigDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/system_metadata_api.dart b/mobile/openapi/lib/api/system_metadata_api.dart deleted file mode 100644 index a1429b54b0..0000000000 --- a/mobile/openapi/lib/api/system_metadata_api.dart +++ /dev/null @@ -1,214 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class SystemMetadataApi { - SystemMetadataApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - Future getAdminOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve admin onboarding - /// - /// Retrieve the current admin onboarding status. - Future getAdminOnboarding({ Future? abortTrigger, }) async { - final response = await getAdminOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AdminOnboardingUpdateDto',) as AdminOnboardingUpdateDto; - - } - return null; - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - /// - /// Note: This method returns the HTTP [Response]. - Future getReverseGeocodingStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/reverse-geocoding-state'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve reverse geocoding state - /// - /// Retrieve the current state of the reverse geocoding import. - Future getReverseGeocodingState({ Future? abortTrigger, }) async { - final response = await getReverseGeocodingStateWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ReverseGeocodingStateResponseDto',) as ReverseGeocodingStateResponseDto; - - } - return null; - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - /// - /// Note: This method returns the HTTP [Response]. - Future getVersionCheckStateWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/version-check-state'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve version check state - /// - /// Retrieve the current state of the version check process. - Future getVersionCheckState({ Future? abortTrigger, }) async { - final response = await getVersionCheckStateWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'VersionCheckStateResponseDto',) as VersionCheckStateResponseDto; - - } - return null; - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboardingWithHttpInfo(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/system-metadata/admin-onboarding'; - - // ignore: prefer_final_locals - Object? postBody = adminOnboardingUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update admin onboarding - /// - /// Update the admin onboarding status. - /// - /// Parameters: - /// - /// * [AdminOnboardingUpdateDto] adminOnboardingUpdateDto (required): - Future updateAdminOnboarding(AdminOnboardingUpdateDto adminOnboardingUpdateDto, { Future? abortTrigger, }) async { - final response = await updateAdminOnboardingWithHttpInfo(adminOnboardingUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } -} diff --git a/mobile/openapi/lib/api/tags_api.dart b/mobile/openapi/lib/api/tags_api.dart deleted file mode 100644 index c3cf9f545c..0000000000 --- a/mobile/openapi/lib/api/tags_api.dart +++ /dev/null @@ -1,544 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TagsApi { - TagsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssetsWithHttpInfo(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/assets'; - - // ignore: prefer_final_locals - Object? postBody = tagBulkAssetsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add multiple tags to multiple assets in a single request. - /// - /// Parameters: - /// - /// * [TagBulkAssetsDto] tagBulkAssetsDto (required): - Future bulkTagAssets(TagBulkAssetsDto tagBulkAssetsDto, { Future? abortTrigger, }) async { - final response = await bulkTagAssetsWithHttpInfo(tagBulkAssetsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagBulkAssetsResponseDto',) as TagBulkAssetsResponseDto; - - } - return null; - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTagWithHttpInfo(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a tag - /// - /// Create a new tag by providing a name and optional color. - /// - /// Parameters: - /// - /// * [TagCreateDto] tagCreateDto (required): - Future createTag(TagCreateDto tagCreateDto, { Future? abortTrigger, }) async { - final response = await createTagWithHttpInfo(tagCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTagWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a tag - /// - /// Delete a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteTag(String id, { Future? abortTrigger, }) async { - final response = await deleteTagWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - /// - /// Note: This method returns the HTTP [Response]. - Future getAllTagsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve tags - /// - /// Retrieve a list of all tags. - Future?> getAllTags({ Future? abortTrigger, }) async { - final response = await getAllTagsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagByIdWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a tag - /// - /// Retrieve a specific tag by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getTagById(String id, { Future? abortTrigger, }) async { - final response = await getTagByIdWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future tagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Tag assets - /// - /// Add a tag to all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> tagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await tagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future untagAssetsWithHttpInfo(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}/assets' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Untag assets - /// - /// Remove a tag from all the specified assets. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future?> untagAssets(String id, BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await untagAssetsWithHttpInfo(id, bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTagWithHttpInfo(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = tagUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a tag - /// - /// Update an existing tag identified by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [TagUpdateDto] tagUpdateDto (required): - Future updateTag(String id, TagUpdateDto tagUpdateDto, { Future? abortTrigger, }) async { - final response = await updateTagWithHttpInfo(id, tagUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TagResponseDto',) as TagResponseDto; - - } - return null; - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future upsertTagsWithHttpInfo(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/tags'; - - // ignore: prefer_final_locals - Object? postBody = tagUpsertDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Upsert tags - /// - /// Create or update multiple tags in a single request. - /// - /// Parameters: - /// - /// * [TagUpsertDto] tagUpsertDto (required): - Future?> upsertTags(TagUpsertDto tagUpsertDto, { Future? abortTrigger, }) async { - final response = await upsertTagsWithHttpInfo(tagUpsertDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/timeline_api.dart b/mobile/openapi/lib/api/timeline_api.dart deleted file mode 100644 index a85aee2d7a..0000000000 --- a/mobile/openapi/lib/api/timeline_api.dart +++ /dev/null @@ -1,398 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TimelineApi { - TimelineApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketWithHttpInfo(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/bucket'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - queryParams.addAll(_queryParams('', 'timeBucket', timeBucket)); - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time bucket - /// - /// Retrieve a string of all asset ids in a given time bucket. - /// - /// Parameters: - /// - /// * [String] timeBucket (required): - /// Time bucket identifier in YYYY-MM-DD format - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucket(String timeBucket, { String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketWithHttpInfo(timeBucket, albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TimeBucketAssetResponseDto',) as TimeBucketAssetResponseDto; - - } - return null; - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future getTimeBucketsWithHttpInfo({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/timeline/buckets'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (albumId != null) { - queryParams.addAll(_queryParams('', 'albumId', albumId)); - } - if (bbox != null) { - queryParams.addAll(_queryParams('', 'bbox', bbox)); - } - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (key != null) { - queryParams.addAll(_queryParams('', 'key', key)); - } - if (order != null) { - queryParams.addAll(_queryParams('', 'order', order)); - } - if (orderBy != null) { - queryParams.addAll(_queryParams('', 'orderBy', orderBy)); - } - if (personId != null) { - queryParams.addAll(_queryParams('', 'personId', personId)); - } - if (slug != null) { - queryParams.addAll(_queryParams('', 'slug', slug)); - } - if (tagId != null) { - queryParams.addAll(_queryParams('', 'tagId', tagId)); - } - if (userId != null) { - queryParams.addAll(_queryParams('', 'userId', userId)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - if (withCoordinates != null) { - queryParams.addAll(_queryParams('', 'withCoordinates', withCoordinates)); - } - if (withPartners != null) { - queryParams.addAll(_queryParams('', 'withPartners', withPartners)); - } - if (withStacked != null) { - queryParams.addAll(_queryParams('', 'withStacked', withStacked)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get time buckets - /// - /// Retrieve a list of all minimal time buckets. - /// - /// Parameters: - /// - /// * [String] albumId: - /// Filter assets belonging to a specific album - /// - /// * [String] bbox: - /// Bounding box coordinates as west,south,east,north (WGS84) - /// - /// * [bool] isFavorite: - /// Filter by favorite status (true for favorites only, false for non-favorites only) - /// - /// * [bool] isTrashed: - /// Filter by trash status (true for trashed assets only, false for non-trashed only) - /// - /// * [String] key: - /// - /// * [AssetOrder] order: - /// Sort order for assets within time buckets (ASC for oldest first, DESC for newest first) - /// - /// * [AssetOrderBy] orderBy: - /// Date to group and order assets by (takenAt for date taken, createdAt for date added to Immich) - /// - /// * [String] personId: - /// Filter assets containing a specific person (face recognition) - /// - /// * [String] slug: - /// - /// * [String] tagId: - /// Filter assets with a specific tag - /// - /// * [String] userId: - /// Filter assets by specific user ID - /// - /// * [AssetVisibility] visibility: - /// Filter by asset visibility status (ARCHIVE, TIMELINE, HIDDEN, LOCKED) - /// - /// * [bool] withCoordinates: - /// Include location data in the response - /// - /// * [bool] withPartners: - /// Include assets shared by partners - /// - /// * [bool] withStacked: - /// Include stacked assets in the response. When true, only primary assets from stacks are returned. - Future?> getTimeBuckets({ String? albumId, String? bbox, bool? isFavorite, bool? isTrashed, String? key, AssetOrder? order, AssetOrderBy? orderBy, String? personId, String? slug, String? tagId, String? userId, AssetVisibility? visibility, bool? withCoordinates, bool? withPartners, bool? withStacked, Future? abortTrigger, }) async { - final response = await getTimeBucketsWithHttpInfo(albumId: albumId, bbox: bbox, isFavorite: isFavorite, isTrashed: isTrashed, key: key, order: order, orderBy: orderBy, personId: personId, slug: slug, tagId: tagId, userId: userId, visibility: visibility, withCoordinates: withCoordinates, withPartners: withPartners, withStacked: withStacked, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/trash_api.dart b/mobile/openapi/lib/api/trash_api.dart deleted file mode 100644 index 7b593e5111..0000000000 --- a/mobile/openapi/lib/api/trash_api.dart +++ /dev/null @@ -1,173 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class TrashApi { - TrashApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Empty trash - /// - /// Permanently delete all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future emptyTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/empty'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Empty trash - /// - /// Permanently delete all items in the trash. - Future emptyTrash({ Future? abortTrigger, }) async { - final response = await emptyTrashWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssetsWithHttpInfo(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore/assets'; - - // ignore: prefer_final_locals - Object? postBody = bulkIdsDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore assets - /// - /// Restore specific assets from the trash. - /// - /// Parameters: - /// - /// * [BulkIdsDto] bulkIdsDto (required): - Future restoreAssets(BulkIdsDto bulkIdsDto, { Future? abortTrigger, }) async { - final response = await restoreAssetsWithHttpInfo(bulkIdsDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } - - /// Restore trash - /// - /// Restore all items in the trash. - /// - /// Note: This method returns the HTTP [Response]. - Future restoreTrashWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/trash/restore'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore trash - /// - /// Restore all items in the trash. - Future restoreTrash({ Future? abortTrigger, }) async { - final response = await restoreTrashWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'TrashResponseDto',) as TrashResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_admin_api.dart b/mobile/openapi/lib/api/users_admin_api.dart deleted file mode 100644 index ef695e2f33..0000000000 --- a/mobile/openapi/lib/api/users_admin_api.dart +++ /dev/null @@ -1,739 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class UsersAdminApi { - UsersAdminApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a user - /// - /// Create a new user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdminWithHttpInfo(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody = userAdminCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a user - /// - /// Create a new user. - /// - /// Parameters: - /// - /// * [UserAdminCreateDto] userAdminCreateDto (required): - Future createUserAdmin(UserAdminCreateDto userAdminCreateDto, { Future? abortTrigger, }) async { - final response = await createUserAdminWithHttpInfo(userAdminCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdminWithHttpInfo(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminDeleteDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a user - /// - /// Delete a user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminDeleteDto] userAdminDeleteDto (required): - Future deleteUserAdmin(String id, UserAdminDeleteDto userAdminDeleteDto, { Future? abortTrigger, }) async { - final response = await deleteUserAdminWithHttpInfo(id, userAdminDeleteDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdminWithHttpInfo(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/calendar-heatmap' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getUserCalendarHeatmapAdmin(String id, { DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getUserCalendarHeatmapAdminWithHttpInfo(id, from: from, to: to, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user preferences - /// - /// Retrieve the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserPreferencesAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserPreferencesAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserSessionsAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/sessions' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user sessions - /// - /// Retrieve all sessions for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future?> getUserSessionsAdmin(String id, { Future? abortTrigger, }) async { - final response = await getUserSessionsAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdminWithHttpInfo(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/statistics' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (isFavorite != null) { - queryParams.addAll(_queryParams('', 'isFavorite', isFavorite)); - } - if (isTrashed != null) { - queryParams.addAll(_queryParams('', 'isTrashed', isTrashed)); - } - if (visibility != null) { - queryParams.addAll(_queryParams('', 'visibility', visibility)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user statistics - /// - /// Retrieve asset statistics for a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [bool] isFavorite: - /// Filter by favorite status - /// - /// * [bool] isTrashed: - /// Filter by trash status - /// - /// * [AssetVisibility] visibility: - Future getUserStatisticsAdmin(String id, { bool? isFavorite, bool? isTrashed, AssetVisibility? visibility, Future? abortTrigger, }) async { - final response = await getUserStatisticsAdminWithHttpInfo(id, isFavorite: isFavorite, isTrashed: isTrashed, visibility: visibility, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetStatsResponseDto',) as AssetStatsResponseDto; - - } - return null; - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdminWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/restore' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Restore a deleted user - /// - /// Restore a previously deleted user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future restoreUserAdmin(String id, { Future? abortTrigger, }) async { - final response = await restoreUserAdminWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Search users - /// - /// Search for users. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future searchUsersAdminWithHttpInfo({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (withDeleted != null) { - queryParams.addAll(_queryParams('', 'withDeleted', withDeleted)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Search users - /// - /// Search for users. - /// - /// Parameters: - /// - /// * [String] id: - /// User ID filter - /// - /// * [bool] withDeleted: - /// Include deleted users - Future?> searchUsersAdmin({ String? id, bool? withDeleted, Future? abortTrigger, }) async { - final response = await searchUsersAdminWithHttpInfo(id: id, withDeleted: withDeleted, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdminWithHttpInfo(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userAdminUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a user - /// - /// Update an existing user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserAdminUpdateDto] userAdminUpdateDto (required): - Future updateUserAdmin(String id, UserAdminUpdateDto userAdminUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserAdminWithHttpInfo(id, userAdminUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdminWithHttpInfo(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/admin/users/{id}/preferences' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user preferences - /// - /// Update the preferences of a specific user. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateUserPreferencesAdmin(String id, UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateUserPreferencesAdminWithHttpInfo(id, userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/users_api.dart b/mobile/openapi/lib/api/users_api.dart deleted file mode 100644 index f768e7c92b..0000000000 --- a/mobile/openapi/lib/api/users_api.dart +++ /dev/null @@ -1,881 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class UsersApi { - UsersApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImageWithHttpInfo(MultipartFile file, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['multipart/form-data']; - - bool hasFields = false; - final mp = MultipartRequest('POST', Uri.parse(apiPath)); - if (file != null) { - hasFields = true; - mp.fields[r'file'] = file.field; - mp.files.add(file); - } - if (hasFields) { - postBody = mp; - } - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create user profile image - /// - /// Upload and set a new profile image for the current user. - /// - /// Parameters: - /// - /// * [MultipartFile] file (required): - /// Profile image file - Future createProfileImage(MultipartFile file, { Future? abortTrigger, }) async { - final response = await createProfileImageWithHttpInfo(file, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CreateProfileImageResponseDto',) as CreateProfileImageResponseDto; - - } - return null; - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteProfileImageWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/profile-image'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user profile image - /// - /// Delete the profile image of the current user. - Future deleteProfileImage({ Future? abortTrigger, }) async { - final response = await deleteProfileImageWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user product key - /// - /// Delete the registered product key for the current user. - Future deleteUserLicense({ Future? abortTrigger, }) async { - final response = await deleteUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future deleteUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete user onboarding - /// - /// Delete the onboarding status of the current user. - Future deleteUserOnboarding({ Future? abortTrigger, }) async { - final response = await deleteUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmapWithHttpInfo({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/calendar-heatmap'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (from != null) { - queryParams.addAll(_queryParams('', 'from', from)); - } - if (to != null) { - queryParams.addAll(_queryParams('', 'to', to)); - } - if (type != null) { - queryParams.addAll(_queryParams('', 'type', type)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve calendar heatmap activity - /// - /// Retrieve activity counts for a specified period, in a calendar heatmap format. - /// - /// Parameters: - /// - /// * [DateTime] from: - /// Start date in UTC - /// - /// * [DateTime] to: - /// End date in UTC - /// - /// * [CalendarHeatmapType] type: - Future getMyCalendarHeatmap({ DateTime? from, DateTime? to, CalendarHeatmapType? type, Future? abortTrigger, }) async { - final response = await getMyCalendarHeatmapWithHttpInfo(from: from, to: to, type: type, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CalendarHeatmapResponseDto',) as CalendarHeatmapResponseDto; - - } - return null; - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyPreferencesWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get my preferences - /// - /// Retrieve the preferences for the current user. - Future getMyPreferences({ Future? abortTrigger, }) async { - final response = await getMyPreferencesWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - Future getMyUserWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get current user - /// - /// Retrieve information about the user making the API request. - Future getMyUser({ Future? abortTrigger, }) async { - final response = await getMyUserWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImageWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}/profile-image' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user profile image - /// - /// Retrieve the profile image file for a user. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getProfileImage(String id, { Future? abortTrigger, }) async { - final response = await getProfileImageWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'MultipartFile',) as MultipartFile; - - } - return null; - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUserWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a user - /// - /// Retrieve a specific user by their ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getUser(String id, { Future? abortTrigger, }) async { - final response = await getUserWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserResponseDto',) as UserResponseDto; - - } - return null; - } - - /// Retrieve user product key - /// - /// Retrieve information about whether the current user has a registered product key. - /// - /// Note: This method returns the HTTP [Response]. - Future getUserLicenseWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user product key - /// - /// Retrieve information about whether the current user has a registered product key. - Future getUserLicense({ Future? abortTrigger, }) async { - final response = await getUserLicenseWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - Future getUserOnboardingWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve user onboarding - /// - /// Retrieve the onboarding status of the current user. - Future getUserOnboarding({ Future? abortTrigger, }) async { - final response = await getUserOnboardingWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - /// - /// Note: This method returns the HTTP [Response]. - Future searchUsersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Get all users - /// - /// Retrieve a list of all users on the server. - Future?> searchUsers({ Future? abortTrigger, }) async { - final response = await searchUsersWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicenseWithHttpInfo(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/license'; - - // ignore: prefer_final_locals - Object? postBody = licenseKeyDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Set user product key - /// - /// Register a product key for the current user. - /// - /// Parameters: - /// - /// * [LicenseKeyDto] licenseKeyDto (required): - Future setUserLicense(LicenseKeyDto licenseKeyDto, { Future? abortTrigger, }) async { - final response = await setUserLicenseWithHttpInfo(licenseKeyDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserLicense',) as UserLicense; - - } - return null; - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboardingWithHttpInfo(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/onboarding'; - - // ignore: prefer_final_locals - Object? postBody = onboardingDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update user onboarding - /// - /// Update the onboarding status of the current user. - /// - /// Parameters: - /// - /// * [OnboardingDto] onboardingDto (required): - Future setUserOnboarding(OnboardingDto onboardingDto, { Future? abortTrigger, }) async { - final response = await setUserOnboardingWithHttpInfo(onboardingDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'OnboardingResponseDto',) as OnboardingResponseDto; - - } - return null; - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferencesWithHttpInfo(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me/preferences'; - - // ignore: prefer_final_locals - Object? postBody = userPreferencesUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update my preferences - /// - /// Update the preferences of the current user. - /// - /// Parameters: - /// - /// * [UserPreferencesUpdateDto] userPreferencesUpdateDto (required): - Future updateMyPreferences(UserPreferencesUpdateDto userPreferencesUpdateDto, { Future? abortTrigger, }) async { - final response = await updateMyPreferencesWithHttpInfo(userPreferencesUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserPreferencesResponseDto',) as UserPreferencesResponseDto; - - } - return null; - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUserWithHttpInfo(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/users/me'; - - // ignore: prefer_final_locals - Object? postBody = userUpdateMeDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update current user - /// - /// Update the current user making the API request. - /// - /// Parameters: - /// - /// * [UserUpdateMeDto] userUpdateMeDto (required): - Future updateMyUser(UserUpdateMeDto userUpdateMeDto, { Future? abortTrigger, }) async { - final response = await updateMyUserWithHttpInfo(userUpdateMeDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserAdminResponseDto',) as UserAdminResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/views_api.dart b/mobile/openapi/lib/api/views_api.dart deleted file mode 100644 index 3ccbacb650..0000000000 --- a/mobile/openapi/lib/api/views_api.dart +++ /dev/null @@ -1,132 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class ViewsApi { - ViewsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Retrieve assets by original path - /// - /// Retrieve assets that are children of a specific folder. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] path (required): - Future getAssetsByOriginalPathWithHttpInfo(String path, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - queryParams.addAll(_queryParams('', 'path', path)); - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve assets by original path - /// - /// Retrieve assets that are children of a specific folder. - /// - /// Parameters: - /// - /// * [String] path (required): - Future?> getAssetsByOriginalPath(String path, { Future? abortTrigger, }) async { - final response = await getAssetsByOriginalPathWithHttpInfo(path, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - /// - /// Note: This method returns the HTTP [Response]. - Future getUniqueOriginalPathsWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/view/folder/unique-paths'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve unique paths - /// - /// Retrieve a list of unique folder paths from asset original paths. - Future?> getUniqueOriginalPaths({ Future? abortTrigger, }) async { - final response = await getUniqueOriginalPathsWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } -} diff --git a/mobile/openapi/lib/api/workflows_api.dart b/mobile/openapi/lib/api/workflows_api.dart deleted file mode 100644 index 4b27acd624..0000000000 --- a/mobile/openapi/lib/api/workflows_api.dart +++ /dev/null @@ -1,457 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -class WorkflowsApi { - WorkflowsApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient; - - final ApiClient apiClient; - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflowWithHttpInfo(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody = workflowCreateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'POST', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Create a workflow - /// - /// Create a new workflow, the workflow can also be created with empty filters and actions. - /// - /// Parameters: - /// - /// * [WorkflowCreateDto] workflowCreateDto (required): - Future createWorkflow(WorkflowCreateDto workflowCreateDto, { Future? abortTrigger, }) async { - final response = await createWorkflowWithHttpInfo(workflowCreateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'DELETE', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Delete a workflow - /// - /// Delete a workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future deleteWorkflow(String id, { Future? abortTrigger, }) async { - final response = await deleteWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve information about a specific workflow by its ID. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflow(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShareWithHttpInfo(String id, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}/share' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Retrieve a workflow - /// - /// Retrieve a workflow details without ids, default values, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - Future getWorkflowForShare(String id, { Future? abortTrigger, }) async { - final response = await getWorkflowForShareWithHttpInfo(id, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowShareResponseDto',) as WorkflowShareResponseDto; - - } - return null; - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - /// - /// Note: This method returns the HTTP [Response]. - Future getWorkflowTriggersWithHttpInfo({ Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/triggers'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all workflow triggers - /// - /// Retrieve a list of all available workflow triggers. - Future?> getWorkflowTriggers({ Future? abortTrigger, }) async { - final response = await getWorkflowTriggersWithHttpInfo(abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future searchWorkflowsWithHttpInfo({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows'; - - // ignore: prefer_final_locals - Object? postBody; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - if (description != null) { - queryParams.addAll(_queryParams('', 'description', description)); - } - if (enabled != null) { - queryParams.addAll(_queryParams('', 'enabled', enabled)); - } - if (id != null) { - queryParams.addAll(_queryParams('', 'id', id)); - } - if (name != null) { - queryParams.addAll(_queryParams('', 'name', name)); - } - if (trigger != null) { - queryParams.addAll(_queryParams('', 'trigger', trigger)); - } - - const contentTypes = []; - - - return apiClient.invokeAPI( - apiPath, - 'GET', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// List all workflows - /// - /// Retrieve a list of workflows available to the authenticated user. - /// - /// Parameters: - /// - /// * [String] description: - /// Workflow description - /// - /// * [bool] enabled: - /// Workflow enabled - /// - /// * [String] id: - /// Workflow ID - /// - /// * [String] name: - /// Workflow name - /// - /// * [WorkflowTrigger] trigger: - /// Workflow trigger type - Future?> searchWorkflows({ String? description, bool? enabled, String? id, String? name, WorkflowTrigger? trigger, Future? abortTrigger, }) async { - final response = await searchWorkflowsWithHttpInfo(description: description, enabled: enabled, id: id, name: name, trigger: trigger, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - final responseBody = await _decodeBodyBytes(response); - return (await apiClient.deserializeAsync(responseBody, 'List') as List) - .cast() - .toList(growable: false); - - } - return null; - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Note: This method returns the HTTP [Response]. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflowWithHttpInfo(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - // ignore: prefer_const_declarations - final apiPath = r'/workflows/{id}' - .replaceAll('{id}', id); - - // ignore: prefer_final_locals - Object? postBody = workflowUpdateDto; - - final queryParams = []; - final headerParams = {}; - final formParams = {}; - - const contentTypes = ['application/json']; - - - return apiClient.invokeAPI( - apiPath, - 'PUT', - queryParams, - postBody, - headerParams, - formParams, - contentTypes.isEmpty ? null : contentTypes.first, - abortTrigger: abortTrigger, - ); - } - - /// Update a workflow - /// - /// Update the information of a specific workflow by its ID. This endpoint can be used to update the workflow name, description, trigger type, filters and actions order, etc. - /// - /// Parameters: - /// - /// * [String] id (required): - /// - /// * [WorkflowUpdateDto] workflowUpdateDto (required): - Future updateWorkflow(String id, WorkflowUpdateDto workflowUpdateDto, { Future? abortTrigger, }) async { - final response = await updateWorkflowWithHttpInfo(id, workflowUpdateDto, abortTrigger: abortTrigger,); - if (response.statusCode >= HttpStatus.badRequest) { - throw ApiException(response.statusCode, await _decodeBodyBytes(response)); - } - // When a remote server returns no body with a status of 204, we shall not decode it. - // At the time of writing this, `dart:convert` will throw an "Unexpected end of input" - // FormatException when trying to decode an empty string. - if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) { - return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'WorkflowResponseDto',) as WorkflowResponseDto; - - } - return null; - } -} diff --git a/mobile/openapi/lib/api_client.dart b/mobile/openapi/lib/api_client.dart deleted file mode 100644 index 4c6c1b5c72..0000000000 --- a/mobile/openapi/lib/api_client.dart +++ /dev/null @@ -1,999 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiClient { - ApiClient({this.basePath = '/api', this.authentication,}); - - String basePath; - final Authentication? authentication; - - var _client = Client(); - final _defaultHeaderMap = {}; - - /// Returns the current HTTP [Client] instance to use in this class. - /// - /// The return value is guaranteed to never be null. - Client get client => _client; - - /// Requests to use a new HTTP [Client] in this class. - set client(Client newClient) { - _client = newClient; - } - - Map get defaultHeaderMap => _defaultHeaderMap; - - void addDefaultHeader(String key, String value) { - _defaultHeaderMap[key] = value; - } - - // We don't use a Map for queryParams. - // If collectionFormat is 'multi', a key might appear multiple times. - Future invokeAPI( - String path, - String method, - List queryParams, - Object? body, - Map headerParams, - Map formParams, - String? contentType, { - Future? abortTrigger, - }) async { - await authentication?.applyToParams(queryParams, headerParams); - - headerParams.addAll(_defaultHeaderMap); - if (contentType != null) { - headerParams['Content-Type'] = contentType; - } - - final urlEncodedQueryParams = queryParams.map((param) => '$param'); - final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : ''; - final uri = Uri.parse('$basePath$path$queryString'); - - try { - // Special case for uploading a single file which isn't a 'multipart/form-data'. - if ( - body is MultipartFile && (contentType == null || - !contentType.toLowerCase().startsWith('multipart/form-data')) - ) { - final request = AbortableStreamedRequest(method, uri, abortTrigger: abortTrigger); - request.headers.addAll(headerParams); - request.contentLength = body.length; - body.finalize().listen( - request.sink.add, - onDone: request.sink.close, - // ignore: avoid_types_on_closure_parameters - onError: (Object error, StackTrace trace) => request.sink.close(), - cancelOnError: true, - ); - final response = await _client.send(request); - return Response.fromStream(response); - } - - if (body is MultipartRequest) { - final request = AbortableMultipartRequest(method, uri, abortTrigger: abortTrigger); - request.fields.addAll(body.fields); - request.files.addAll(body.files); - request.headers.addAll(body.headers); - request.headers.addAll(headerParams); - final response = await _client.send(request); - return Response.fromStream(response); - } - - final msgBody = contentType == 'application/x-www-form-urlencoded' - ? formParams - : await serializeAsync(body); - final nullableHeaderParams = headerParams.isEmpty ? null : headerParams; - - final request = AbortableRequest(method, uri, abortTrigger: abortTrigger); - if (nullableHeaderParams != null) { - request.headers.addAll(nullableHeaderParams); - } - if (msgBody is String && msgBody.isNotEmpty) { - request.body = msgBody; - } else if (msgBody is List && msgBody.isNotEmpty) { - request.bodyBytes = msgBody; - } else if (msgBody is Map) { - request.bodyFields = msgBody; - } - final response = await _client.send(request); - return Response.fromStream(response); - } on SocketException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Socket operation failed: $method $path', - error, - trace, - ); - } on TlsException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'TLS/SSL communication failed: $method $path', - error, - trace, - ); - } on IOException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'I/O operation failed: $method $path', - error, - trace, - ); - } on ClientException catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'HTTP connection failed: $method $path', - error, - trace, - ); - } on Exception catch (error, trace) { - throw ApiException.withInner( - HttpStatus.badRequest, - 'Exception occurred: $method $path', - error, - trace, - ); - } - } - - Future deserializeAsync(String value, String targetType, {bool growable = false,}) => - // ignore: deprecated_member_use_from_same_package - deserialize(value, targetType, growable: growable); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.') - Future deserialize(String value, String targetType, {bool growable = false,}) async { - // Remove all spaces. Necessary for regular expressions as well. - targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? value - : fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable); - } - - // ignore: deprecated_member_use_from_same_package - Future serializeAsync(Object? value) async => serialize(value); - - @Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.') - String serialize(Object? value) => value == null ? '' : json.encode(value); - - /// Returns a native instance of an OpenAPI class matching the [specified type][targetType]. - static dynamic fromJson(dynamic value, String targetType, {bool growable = false,}) { - try { - switch (targetType) { - case 'String': - return value is String ? value : value.toString(); - case 'int': - return value is int ? value : int.parse('$value'); - case 'double': - return value is double ? value : double.parse('$value'); - case 'bool': - if (value is bool) { - return value; - } - final valueString = '$value'.toLowerCase(); - return valueString == 'true' || valueString == '1'; - case 'DateTime': - return value is DateTime ? value : DateTime.tryParse(value); - case 'ActivityCreateDto': - return ActivityCreateDto.fromJson(value); - case 'ActivityResponseDto': - return ActivityResponseDto.fromJson(value); - case 'ActivityStatisticsResponseDto': - return ActivityStatisticsResponseDto.fromJson(value); - case 'AddUsersDto': - return AddUsersDto.fromJson(value); - case 'AdminOnboardingUpdateDto': - return AdminOnboardingUpdateDto.fromJson(value); - case 'AlbumResponseDto': - return AlbumResponseDto.fromJson(value); - case 'AlbumStatisticsResponseDto': - return AlbumStatisticsResponseDto.fromJson(value); - case 'AlbumUserAddDto': - return AlbumUserAddDto.fromJson(value); - case 'AlbumUserCreateDto': - return AlbumUserCreateDto.fromJson(value); - case 'AlbumUserResponseDto': - return AlbumUserResponseDto.fromJson(value); - case 'AlbumUserRole': - return AlbumUserRoleTypeTransformer().decode(value); - case 'AlbumsAddAssetsDto': - return AlbumsAddAssetsDto.fromJson(value); - case 'AlbumsAddAssetsResponseDto': - return AlbumsAddAssetsResponseDto.fromJson(value); - case 'AlbumsResponse': - return AlbumsResponse.fromJson(value); - case 'AlbumsUpdate': - return AlbumsUpdate.fromJson(value); - case 'ApiKeyCreateDto': - return ApiKeyCreateDto.fromJson(value); - case 'ApiKeyCreateResponseDto': - return ApiKeyCreateResponseDto.fromJson(value); - case 'ApiKeyResponseDto': - return ApiKeyResponseDto.fromJson(value); - case 'ApiKeyUpdateDto': - return ApiKeyUpdateDto.fromJson(value); - case 'AssetBulkDeleteDto': - return AssetBulkDeleteDto.fromJson(value); - case 'AssetBulkUpdateDto': - return AssetBulkUpdateDto.fromJson(value); - case 'AssetBulkUploadCheckDto': - return AssetBulkUploadCheckDto.fromJson(value); - case 'AssetBulkUploadCheckItem': - return AssetBulkUploadCheckItem.fromJson(value); - case 'AssetBulkUploadCheckResponseDto': - return AssetBulkUploadCheckResponseDto.fromJson(value); - case 'AssetBulkUploadCheckResult': - return AssetBulkUploadCheckResult.fromJson(value); - case 'AssetCopyDto': - return AssetCopyDto.fromJson(value); - case 'AssetEditAction': - return AssetEditActionTypeTransformer().decode(value); - case 'AssetEditActionItemDto': - return AssetEditActionItemDto.fromJson(value); - case 'AssetEditActionItemDtoParameters': - return AssetEditActionItemDtoParameters.fromJson(value); - case 'AssetEditActionItemResponseDto': - return AssetEditActionItemResponseDto.fromJson(value); - case 'AssetEditsCreateDto': - return AssetEditsCreateDto.fromJson(value); - case 'AssetEditsResponseDto': - return AssetEditsResponseDto.fromJson(value); - case 'AssetFaceCreateDto': - return AssetFaceCreateDto.fromJson(value); - case 'AssetFaceDeleteDto': - return AssetFaceDeleteDto.fromJson(value); - case 'AssetFaceResponseDto': - return AssetFaceResponseDto.fromJson(value); - case 'AssetFaceUpdateDto': - return AssetFaceUpdateDto.fromJson(value); - case 'AssetFaceUpdateItem': - return AssetFaceUpdateItem.fromJson(value); - case 'AssetIdErrorReason': - return AssetIdErrorReasonTypeTransformer().decode(value); - case 'AssetIdsDto': - return AssetIdsDto.fromJson(value); - case 'AssetIdsResponseDto': - return AssetIdsResponseDto.fromJson(value); - case 'AssetJobName': - return AssetJobNameTypeTransformer().decode(value); - case 'AssetJobsDto': - return AssetJobsDto.fromJson(value); - case 'AssetMediaResponseDto': - return AssetMediaResponseDto.fromJson(value); - case 'AssetMediaSize': - return AssetMediaSizeTypeTransformer().decode(value); - case 'AssetMediaStatus': - return AssetMediaStatusTypeTransformer().decode(value); - case 'AssetMetadataBulkDeleteDto': - return AssetMetadataBulkDeleteDto.fromJson(value); - case 'AssetMetadataBulkDeleteItemDto': - return AssetMetadataBulkDeleteItemDto.fromJson(value); - case 'AssetMetadataBulkResponseDto': - return AssetMetadataBulkResponseDto.fromJson(value); - case 'AssetMetadataBulkUpsertDto': - return AssetMetadataBulkUpsertDto.fromJson(value); - case 'AssetMetadataBulkUpsertItemDto': - return AssetMetadataBulkUpsertItemDto.fromJson(value); - case 'AssetMetadataResponseDto': - return AssetMetadataResponseDto.fromJson(value); - case 'AssetMetadataUpsertDto': - return AssetMetadataUpsertDto.fromJson(value); - case 'AssetMetadataUpsertItemDto': - return AssetMetadataUpsertItemDto.fromJson(value); - case 'AssetOcrResponseDto': - return AssetOcrResponseDto.fromJson(value); - case 'AssetOrder': - return AssetOrderTypeTransformer().decode(value); - case 'AssetOrderBy': - return AssetOrderByTypeTransformer().decode(value); - case 'AssetRejectReason': - return AssetRejectReasonTypeTransformer().decode(value); - case 'AssetResponseDto': - return AssetResponseDto.fromJson(value); - case 'AssetStackResponseDto': - return AssetStackResponseDto.fromJson(value); - case 'AssetStatsResponseDto': - return AssetStatsResponseDto.fromJson(value); - case 'AssetTypeEnum': - return AssetTypeEnumTypeTransformer().decode(value); - case 'AssetUploadAction': - return AssetUploadActionTypeTransformer().decode(value); - case 'AssetVisibility': - return AssetVisibilityTypeTransformer().decode(value); - case 'AudioCodec': - return AudioCodecTypeTransformer().decode(value); - case 'AuthStatusResponseDto': - return AuthStatusResponseDto.fromJson(value); - case 'AvatarUpdate': - return AvatarUpdate.fromJson(value); - case 'BulkIdErrorReason': - return BulkIdErrorReasonTypeTransformer().decode(value); - case 'BulkIdResponseDto': - return BulkIdResponseDto.fromJson(value); - case 'BulkIdsDto': - return BulkIdsDto.fromJson(value); - case 'CLIPConfig': - return CLIPConfig.fromJson(value); - case 'CQMode': - return CQModeTypeTransformer().decode(value); - case 'CalendarHeatmapResponseDto': - return CalendarHeatmapResponseDto.fromJson(value); - case 'CalendarHeatmapResponseDtoSeriesInner': - return CalendarHeatmapResponseDtoSeriesInner.fromJson(value); - case 'CalendarHeatmapType': - return CalendarHeatmapTypeTypeTransformer().decode(value); - case 'CastResponse': - return CastResponse.fromJson(value); - case 'CastUpdate': - return CastUpdate.fromJson(value); - case 'ChangePasswordDto': - return ChangePasswordDto.fromJson(value); - case 'Colorspace': - return ColorspaceTypeTransformer().decode(value); - case 'ContributorCountResponseDto': - return ContributorCountResponseDto.fromJson(value); - case 'CreateAlbumDto': - return CreateAlbumDto.fromJson(value); - case 'CreateLibraryDto': - return CreateLibraryDto.fromJson(value); - case 'CreateProfileImageResponseDto': - return CreateProfileImageResponseDto.fromJson(value); - case 'CropParameters': - return CropParameters.fromJson(value); - case 'DatabaseBackupConfig': - return DatabaseBackupConfig.fromJson(value); - case 'DatabaseBackupDeleteDto': - return DatabaseBackupDeleteDto.fromJson(value); - case 'DatabaseBackupDto': - return DatabaseBackupDto.fromJson(value); - case 'DatabaseBackupListResponseDto': - return DatabaseBackupListResponseDto.fromJson(value); - case 'DownloadArchiveDto': - return DownloadArchiveDto.fromJson(value); - case 'DownloadArchiveInfo': - return DownloadArchiveInfo.fromJson(value); - case 'DownloadInfoDto': - return DownloadInfoDto.fromJson(value); - case 'DownloadResponse': - return DownloadResponse.fromJson(value); - case 'DownloadResponseDto': - return DownloadResponseDto.fromJson(value); - case 'DownloadUpdate': - return DownloadUpdate.fromJson(value); - case 'DuplicateDetectionConfig': - return DuplicateDetectionConfig.fromJson(value); - case 'DuplicateResolveDto': - return DuplicateResolveDto.fromJson(value); - case 'DuplicateResolveGroupDto': - return DuplicateResolveGroupDto.fromJson(value); - case 'DuplicateResponseDto': - return DuplicateResponseDto.fromJson(value); - case 'EmailNotificationsResponse': - return EmailNotificationsResponse.fromJson(value); - case 'EmailNotificationsUpdate': - return EmailNotificationsUpdate.fromJson(value); - case 'ExifResponseDto': - return ExifResponseDto.fromJson(value); - case 'FaceDto': - return FaceDto.fromJson(value); - case 'FacialRecognitionConfig': - return FacialRecognitionConfig.fromJson(value); - case 'FoldersResponse': - return FoldersResponse.fromJson(value); - case 'FoldersUpdate': - return FoldersUpdate.fromJson(value); - case 'HlsVideoResolution': - return HlsVideoResolutionTypeTransformer().decode(value); - case 'ImageFormat': - return ImageFormatTypeTransformer().decode(value); - case 'IntegrityReport': - return IntegrityReportTypeTransformer().decode(value); - case 'IntegrityReportResponseDto': - return IntegrityReportResponseDto.fromJson(value); - case 'IntegrityReportResponseDtoItemsInner': - return IntegrityReportResponseDtoItemsInner.fromJson(value); - case 'IntegrityReportSummaryResponseDto': - return IntegrityReportSummaryResponseDto.fromJson(value); - case 'JobCreateDto': - return JobCreateDto.fromJson(value); - case 'JobName': - return JobNameTypeTransformer().decode(value); - case 'JobSettingsDto': - return JobSettingsDto.fromJson(value); - case 'LibraryResponseDto': - return LibraryResponseDto.fromJson(value); - case 'LibraryStatsResponseDto': - return LibraryStatsResponseDto.fromJson(value); - case 'LicenseKeyDto': - return LicenseKeyDto.fromJson(value); - case 'LogLevel': - return LogLevelTypeTransformer().decode(value); - case 'LoginCredentialDto': - return LoginCredentialDto.fromJson(value); - case 'LoginResponseDto': - return LoginResponseDto.fromJson(value); - case 'LogoutResponseDto': - return LogoutResponseDto.fromJson(value); - case 'MachineLearningAvailabilityChecksDto': - return MachineLearningAvailabilityChecksDto.fromJson(value); - case 'MaintenanceAction': - return MaintenanceActionTypeTransformer().decode(value); - case 'MaintenanceAuthDto': - return MaintenanceAuthDto.fromJson(value); - case 'MaintenanceDetectInstallResponseDto': - return MaintenanceDetectInstallResponseDto.fromJson(value); - case 'MaintenanceDetectInstallStorageFolderDto': - return MaintenanceDetectInstallStorageFolderDto.fromJson(value); - case 'MaintenanceLoginDto': - return MaintenanceLoginDto.fromJson(value); - case 'MaintenanceStatusResponseDto': - return MaintenanceStatusResponseDto.fromJson(value); - case 'ManualJobName': - return ManualJobNameTypeTransformer().decode(value); - case 'MapMarkerResponseDto': - return MapMarkerResponseDto.fromJson(value); - case 'MapReverseGeocodeResponseDto': - return MapReverseGeocodeResponseDto.fromJson(value); - case 'MemoriesResponse': - return MemoriesResponse.fromJson(value); - case 'MemoriesUpdate': - return MemoriesUpdate.fromJson(value); - case 'MemoryCreateDto': - return MemoryCreateDto.fromJson(value); - case 'MemoryResponseDto': - return MemoryResponseDto.fromJson(value); - case 'MemorySearchOrder': - return MemorySearchOrderTypeTransformer().decode(value); - case 'MemoryStatisticsResponseDto': - return MemoryStatisticsResponseDto.fromJson(value); - case 'MemoryType': - return MemoryTypeTypeTransformer().decode(value); - case 'MemoryUpdateDto': - return MemoryUpdateDto.fromJson(value); - case 'MergePersonDto': - return MergePersonDto.fromJson(value); - case 'MetadataSearchDto': - return MetadataSearchDto.fromJson(value); - case 'MirrorAxis': - return MirrorAxisTypeTransformer().decode(value); - case 'MirrorParameters': - return MirrorParameters.fromJson(value); - case 'NotificationCreateDto': - return NotificationCreateDto.fromJson(value); - case 'NotificationDeleteAllDto': - return NotificationDeleteAllDto.fromJson(value); - case 'NotificationDto': - return NotificationDto.fromJson(value); - case 'NotificationLevel': - return NotificationLevelTypeTransformer().decode(value); - case 'NotificationType': - return NotificationTypeTypeTransformer().decode(value); - case 'NotificationUpdateAllDto': - return NotificationUpdateAllDto.fromJson(value); - case 'NotificationUpdateDto': - return NotificationUpdateDto.fromJson(value); - case 'OAuthAuthorizeResponseDto': - return OAuthAuthorizeResponseDto.fromJson(value); - case 'OAuthCallbackDto': - return OAuthCallbackDto.fromJson(value); - case 'OAuthConfigDto': - return OAuthConfigDto.fromJson(value); - case 'OAuthTokenEndpointAuthMethod': - return OAuthTokenEndpointAuthMethodTypeTransformer().decode(value); - case 'OcrConfig': - return OcrConfig.fromJson(value); - case 'OnThisDayDto': - return OnThisDayDto.fromJson(value); - case 'OnboardingDto': - return OnboardingDto.fromJson(value); - case 'OnboardingResponseDto': - return OnboardingResponseDto.fromJson(value); - case 'PartnerCreateDto': - return PartnerCreateDto.fromJson(value); - case 'PartnerDirection': - return PartnerDirectionTypeTransformer().decode(value); - case 'PartnerResponseDto': - return PartnerResponseDto.fromJson(value); - case 'PartnerUpdateDto': - return PartnerUpdateDto.fromJson(value); - case 'PeopleResponse': - return PeopleResponse.fromJson(value); - case 'PeopleResponseDto': - return PeopleResponseDto.fromJson(value); - case 'PeopleUpdate': - return PeopleUpdate.fromJson(value); - case 'PeopleUpdateDto': - return PeopleUpdateDto.fromJson(value); - case 'PeopleUpdateItem': - return PeopleUpdateItem.fromJson(value); - case 'Permission': - return PermissionTypeTransformer().decode(value); - case 'PersonCreateDto': - return PersonCreateDto.fromJson(value); - case 'PersonResponseDto': - return PersonResponseDto.fromJson(value); - case 'PersonStatisticsResponseDto': - return PersonStatisticsResponseDto.fromJson(value); - case 'PersonUpdateDto': - return PersonUpdateDto.fromJson(value); - case 'PinCodeChangeDto': - return PinCodeChangeDto.fromJson(value); - case 'PinCodeResetDto': - return PinCodeResetDto.fromJson(value); - case 'PinCodeSetupDto': - return PinCodeSetupDto.fromJson(value); - case 'PlacesResponseDto': - return PlacesResponseDto.fromJson(value); - case 'PluginMethodResponseDto': - return PluginMethodResponseDto.fromJson(value); - case 'PluginResponseDto': - return PluginResponseDto.fromJson(value); - case 'PluginTemplateResponseDto': - return PluginTemplateResponseDto.fromJson(value); - case 'PluginTemplateStepResponseDto': - return PluginTemplateStepResponseDto.fromJson(value); - case 'PurchaseResponse': - return PurchaseResponse.fromJson(value); - case 'PurchaseUpdate': - return PurchaseUpdate.fromJson(value); - case 'QueueCommand': - return QueueCommandTypeTransformer().decode(value); - case 'QueueCommandDto': - return QueueCommandDto.fromJson(value); - case 'QueueDeleteDto': - return QueueDeleteDto.fromJson(value); - case 'QueueJobResponseDto': - return QueueJobResponseDto.fromJson(value); - case 'QueueJobStatus': - return QueueJobStatusTypeTransformer().decode(value); - case 'QueueName': - return QueueNameTypeTransformer().decode(value); - case 'QueueResponseDto': - return QueueResponseDto.fromJson(value); - case 'QueueResponseLegacyDto': - return QueueResponseLegacyDto.fromJson(value); - case 'QueueStatisticsDto': - return QueueStatisticsDto.fromJson(value); - case 'QueueStatusLegacyDto': - return QueueStatusLegacyDto.fromJson(value); - case 'QueueUpdateDto': - return QueueUpdateDto.fromJson(value); - case 'QueuesResponseLegacyDto': - return QueuesResponseLegacyDto.fromJson(value); - case 'RandomSearchDto': - return RandomSearchDto.fromJson(value); - case 'RatingsResponse': - return RatingsResponse.fromJson(value); - case 'RatingsUpdate': - return RatingsUpdate.fromJson(value); - case 'ReactionLevel': - return ReactionLevelTypeTransformer().decode(value); - case 'ReactionType': - return ReactionTypeTypeTransformer().decode(value); - case 'RecentlyAddedResponse': - return RecentlyAddedResponse.fromJson(value); - case 'RecentlyAddedUpdate': - return RecentlyAddedUpdate.fromJson(value); - case 'ReleaseChannel': - return ReleaseChannelTypeTransformer().decode(value); - case 'ReleaseEventV1': - return ReleaseEventV1.fromJson(value); - case 'ReleaseType': - return ReleaseTypeTypeTransformer().decode(value); - case 'ReverseGeocodingStateResponseDto': - return ReverseGeocodingStateResponseDto.fromJson(value); - case 'RotateParameters': - return RotateParameters.fromJson(value); - case 'SearchAlbumResponseDto': - return SearchAlbumResponseDto.fromJson(value); - case 'SearchAssetResponseDto': - return SearchAssetResponseDto.fromJson(value); - case 'SearchExploreItem': - return SearchExploreItem.fromJson(value); - case 'SearchExploreResponseDto': - return SearchExploreResponseDto.fromJson(value); - case 'SearchFacetCountResponseDto': - return SearchFacetCountResponseDto.fromJson(value); - case 'SearchFacetResponseDto': - return SearchFacetResponseDto.fromJson(value); - case 'SearchResponseDto': - return SearchResponseDto.fromJson(value); - case 'SearchStatisticsResponseDto': - return SearchStatisticsResponseDto.fromJson(value); - case 'SearchSuggestionType': - return SearchSuggestionTypeTypeTransformer().decode(value); - case 'ServerAboutResponseDto': - return ServerAboutResponseDto.fromJson(value); - case 'ServerApkLinksDto': - return ServerApkLinksDto.fromJson(value); - case 'ServerConfigDto': - return ServerConfigDto.fromJson(value); - case 'ServerFeaturesDto': - return ServerFeaturesDto.fromJson(value); - case 'ServerMediaTypesResponseDto': - return ServerMediaTypesResponseDto.fromJson(value); - case 'ServerPingResponse': - return ServerPingResponse.fromJson(value); - case 'ServerStatsResponseDto': - return ServerStatsResponseDto.fromJson(value); - case 'ServerStorageResponseDto': - return ServerStorageResponseDto.fromJson(value); - case 'ServerVersionHistoryResponseDto': - return ServerVersionHistoryResponseDto.fromJson(value); - case 'ServerVersionResponseDto': - return ServerVersionResponseDto.fromJson(value); - case 'SessionCreateDto': - return SessionCreateDto.fromJson(value); - case 'SessionCreateResponseDto': - return SessionCreateResponseDto.fromJson(value); - case 'SessionResponseDto': - return SessionResponseDto.fromJson(value); - case 'SessionUnlockDto': - return SessionUnlockDto.fromJson(value); - case 'SessionUpdateDto': - return SessionUpdateDto.fromJson(value); - case 'SetMaintenanceModeDto': - return SetMaintenanceModeDto.fromJson(value); - case 'SharedLinkCreateDto': - return SharedLinkCreateDto.fromJson(value); - case 'SharedLinkEditDto': - return SharedLinkEditDto.fromJson(value); - case 'SharedLinkLoginDto': - return SharedLinkLoginDto.fromJson(value); - case 'SharedLinkResponseDto': - return SharedLinkResponseDto.fromJson(value); - case 'SharedLinkType': - return SharedLinkTypeTypeTransformer().decode(value); - case 'SharedLinksResponse': - return SharedLinksResponse.fromJson(value); - case 'SharedLinksUpdate': - return SharedLinksUpdate.fromJson(value); - case 'SignUpDto': - return SignUpDto.fromJson(value); - case 'SmartSearchDto': - return SmartSearchDto.fromJson(value); - case 'SourceType': - return SourceTypeTypeTransformer().decode(value); - case 'StackCreateDto': - return StackCreateDto.fromJson(value); - case 'StackResponseDto': - return StackResponseDto.fromJson(value); - case 'StackUpdateDto': - return StackUpdateDto.fromJson(value); - case 'StatisticsSearchDto': - return StatisticsSearchDto.fromJson(value); - case 'StorageFolder': - return StorageFolderTypeTransformer().decode(value); - case 'SyncAckDeleteDto': - return SyncAckDeleteDto.fromJson(value); - case 'SyncAckDto': - return SyncAckDto.fromJson(value); - case 'SyncAckSetDto': - return SyncAckSetDto.fromJson(value); - case 'SyncAlbumDeleteV1': - return SyncAlbumDeleteV1.fromJson(value); - case 'SyncAlbumToAssetDeleteV1': - return SyncAlbumToAssetDeleteV1.fromJson(value); - case 'SyncAlbumToAssetV1': - return SyncAlbumToAssetV1.fromJson(value); - case 'SyncAlbumUserDeleteV1': - return SyncAlbumUserDeleteV1.fromJson(value); - case 'SyncAlbumUserV1': - return SyncAlbumUserV1.fromJson(value); - case 'SyncAlbumV1': - return SyncAlbumV1.fromJson(value); - case 'SyncAlbumV2': - return SyncAlbumV2.fromJson(value); - case 'SyncAssetDeleteV1': - return SyncAssetDeleteV1.fromJson(value); - case 'SyncAssetEditDeleteV1': - return SyncAssetEditDeleteV1.fromJson(value); - case 'SyncAssetEditV1': - return SyncAssetEditV1.fromJson(value); - case 'SyncAssetExifV1': - return SyncAssetExifV1.fromJson(value); - case 'SyncAssetFaceDeleteV1': - return SyncAssetFaceDeleteV1.fromJson(value); - case 'SyncAssetFaceV1': - return SyncAssetFaceV1.fromJson(value); - case 'SyncAssetFaceV2': - return SyncAssetFaceV2.fromJson(value); - case 'SyncAssetMetadataDeleteV1': - return SyncAssetMetadataDeleteV1.fromJson(value); - case 'SyncAssetMetadataV1': - return SyncAssetMetadataV1.fromJson(value); - case 'SyncAssetOcrDeleteV1': - return SyncAssetOcrDeleteV1.fromJson(value); - case 'SyncAssetOcrV1': - return SyncAssetOcrV1.fromJson(value); - case 'SyncAssetV1': - return SyncAssetV1.fromJson(value); - case 'SyncAssetV2': - return SyncAssetV2.fromJson(value); - case 'SyncAuthUserV1': - return SyncAuthUserV1.fromJson(value); - case 'SyncEntityType': - return SyncEntityTypeTypeTransformer().decode(value); - case 'SyncMemoryAssetDeleteV1': - return SyncMemoryAssetDeleteV1.fromJson(value); - case 'SyncMemoryAssetV1': - return SyncMemoryAssetV1.fromJson(value); - case 'SyncMemoryDeleteV1': - return SyncMemoryDeleteV1.fromJson(value); - case 'SyncMemoryV1': - return SyncMemoryV1.fromJson(value); - case 'SyncPartnerDeleteV1': - return SyncPartnerDeleteV1.fromJson(value); - case 'SyncPartnerV1': - return SyncPartnerV1.fromJson(value); - case 'SyncPersonDeleteV1': - return SyncPersonDeleteV1.fromJson(value); - case 'SyncPersonV1': - return SyncPersonV1.fromJson(value); - case 'SyncRequestType': - return SyncRequestTypeTypeTransformer().decode(value); - case 'SyncStackDeleteV1': - return SyncStackDeleteV1.fromJson(value); - case 'SyncStackV1': - return SyncStackV1.fromJson(value); - case 'SyncStreamDto': - return SyncStreamDto.fromJson(value); - case 'SyncUserDeleteV1': - return SyncUserDeleteV1.fromJson(value); - case 'SyncUserMetadataDeleteV1': - return SyncUserMetadataDeleteV1.fromJson(value); - case 'SyncUserMetadataV1': - return SyncUserMetadataV1.fromJson(value); - case 'SyncUserV1': - return SyncUserV1.fromJson(value); - case 'SystemConfigBackupsDto': - return SystemConfigBackupsDto.fromJson(value); - case 'SystemConfigDto': - return SystemConfigDto.fromJson(value); - case 'SystemConfigFFmpegDto': - return SystemConfigFFmpegDto.fromJson(value); - case 'SystemConfigFFmpegRealtimeDto': - return SystemConfigFFmpegRealtimeDto.fromJson(value); - case 'SystemConfigFacesDto': - return SystemConfigFacesDto.fromJson(value); - case 'SystemConfigGeneratedFullsizeImageDto': - return SystemConfigGeneratedFullsizeImageDto.fromJson(value); - case 'SystemConfigGeneratedImageDto': - return SystemConfigGeneratedImageDto.fromJson(value); - case 'SystemConfigImageDto': - return SystemConfigImageDto.fromJson(value); - case 'SystemConfigIntegrityChecks': - return SystemConfigIntegrityChecks.fromJson(value); - case 'SystemConfigIntegrityChecksumJob': - return SystemConfigIntegrityChecksumJob.fromJson(value); - case 'SystemConfigIntegrityJob': - return SystemConfigIntegrityJob.fromJson(value); - case 'SystemConfigJobDto': - return SystemConfigJobDto.fromJson(value); - case 'SystemConfigLibraryDto': - return SystemConfigLibraryDto.fromJson(value); - case 'SystemConfigLibraryScanDto': - return SystemConfigLibraryScanDto.fromJson(value); - case 'SystemConfigLibraryWatchDto': - return SystemConfigLibraryWatchDto.fromJson(value); - case 'SystemConfigLoggingDto': - return SystemConfigLoggingDto.fromJson(value); - case 'SystemConfigMachineLearningDto': - return SystemConfigMachineLearningDto.fromJson(value); - case 'SystemConfigMapDto': - return SystemConfigMapDto.fromJson(value); - case 'SystemConfigMetadataDto': - return SystemConfigMetadataDto.fromJson(value); - case 'SystemConfigNewVersionCheckDto': - return SystemConfigNewVersionCheckDto.fromJson(value); - case 'SystemConfigNightlyTasksDto': - return SystemConfigNightlyTasksDto.fromJson(value); - case 'SystemConfigNotificationsDto': - return SystemConfigNotificationsDto.fromJson(value); - case 'SystemConfigOAuthDto': - return SystemConfigOAuthDto.fromJson(value); - case 'SystemConfigPasswordLoginDto': - return SystemConfigPasswordLoginDto.fromJson(value); - case 'SystemConfigReverseGeocodingDto': - return SystemConfigReverseGeocodingDto.fromJson(value); - case 'SystemConfigServerDto': - return SystemConfigServerDto.fromJson(value); - case 'SystemConfigSmtpDto': - return SystemConfigSmtpDto.fromJson(value); - case 'SystemConfigSmtpTransportDto': - return SystemConfigSmtpTransportDto.fromJson(value); - case 'SystemConfigStorageTemplateDto': - return SystemConfigStorageTemplateDto.fromJson(value); - case 'SystemConfigTemplateEmailsDto': - return SystemConfigTemplateEmailsDto.fromJson(value); - case 'SystemConfigTemplateStorageOptionDto': - return SystemConfigTemplateStorageOptionDto.fromJson(value); - case 'SystemConfigTemplatesDto': - return SystemConfigTemplatesDto.fromJson(value); - case 'SystemConfigThemeDto': - return SystemConfigThemeDto.fromJson(value); - case 'SystemConfigTrashDto': - return SystemConfigTrashDto.fromJson(value); - case 'SystemConfigUserDto': - return SystemConfigUserDto.fromJson(value); - case 'TagBulkAssetsDto': - return TagBulkAssetsDto.fromJson(value); - case 'TagBulkAssetsResponseDto': - return TagBulkAssetsResponseDto.fromJson(value); - case 'TagCreateDto': - return TagCreateDto.fromJson(value); - case 'TagResponseDto': - return TagResponseDto.fromJson(value); - case 'TagUpdateDto': - return TagUpdateDto.fromJson(value); - case 'TagUpsertDto': - return TagUpsertDto.fromJson(value); - case 'TagsResponse': - return TagsResponse.fromJson(value); - case 'TagsUpdate': - return TagsUpdate.fromJson(value); - case 'TemplateDto': - return TemplateDto.fromJson(value); - case 'TemplateResponseDto': - return TemplateResponseDto.fromJson(value); - case 'TestEmailResponseDto': - return TestEmailResponseDto.fromJson(value); - case 'TimeBucketAssetResponseDto': - return TimeBucketAssetResponseDto.fromJson(value); - case 'TimeBucketsResponseDto': - return TimeBucketsResponseDto.fromJson(value); - case 'ToneMapping': - return ToneMappingTypeTransformer().decode(value); - case 'TranscodeHWAccel': - return TranscodeHWAccelTypeTransformer().decode(value); - case 'TranscodePolicy': - return TranscodePolicyTypeTransformer().decode(value); - case 'TrashResponseDto': - return TrashResponseDto.fromJson(value); - case 'UpdateAlbumDto': - return UpdateAlbumDto.fromJson(value); - case 'UpdateAlbumUserDto': - return UpdateAlbumUserDto.fromJson(value); - case 'UpdateAssetDto': - return UpdateAssetDto.fromJson(value); - case 'UpdateLibraryDto': - return UpdateLibraryDto.fromJson(value); - case 'UsageByUserDto': - return UsageByUserDto.fromJson(value); - case 'UserAdminCreateDto': - return UserAdminCreateDto.fromJson(value); - case 'UserAdminDeleteDto': - return UserAdminDeleteDto.fromJson(value); - case 'UserAdminResponseDto': - return UserAdminResponseDto.fromJson(value); - case 'UserAdminUpdateDto': - return UserAdminUpdateDto.fromJson(value); - case 'UserAvatarColor': - return UserAvatarColorTypeTransformer().decode(value); - case 'UserLicense': - return UserLicense.fromJson(value); - case 'UserMetadataKey': - return UserMetadataKeyTypeTransformer().decode(value); - case 'UserPreferencesResponseDto': - return UserPreferencesResponseDto.fromJson(value); - case 'UserPreferencesUpdateDto': - return UserPreferencesUpdateDto.fromJson(value); - case 'UserResponseDto': - return UserResponseDto.fromJson(value); - case 'UserStatus': - return UserStatusTypeTransformer().decode(value); - case 'UserUpdateMeDto': - return UserUpdateMeDto.fromJson(value); - case 'ValidateAccessTokenResponseDto': - return ValidateAccessTokenResponseDto.fromJson(value); - case 'ValidateLibraryDto': - return ValidateLibraryDto.fromJson(value); - case 'ValidateLibraryImportPathResponseDto': - return ValidateLibraryImportPathResponseDto.fromJson(value); - case 'ValidateLibraryResponseDto': - return ValidateLibraryResponseDto.fromJson(value); - case 'VersionCheckStateResponseDto': - return VersionCheckStateResponseDto.fromJson(value); - case 'VideoCodec': - return VideoCodecTypeTransformer().decode(value); - case 'VideoContainer': - return VideoContainerTypeTransformer().decode(value); - case 'WorkflowCreateDto': - return WorkflowCreateDto.fromJson(value); - case 'WorkflowResponseDto': - return WorkflowResponseDto.fromJson(value); - case 'WorkflowShareResponseDto': - return WorkflowShareResponseDto.fromJson(value); - case 'WorkflowShareStepDto': - return WorkflowShareStepDto.fromJson(value); - case 'WorkflowStepDto': - return WorkflowStepDto.fromJson(value); - case 'WorkflowTrigger': - return WorkflowTriggerTypeTransformer().decode(value); - case 'WorkflowTriggerResponseDto': - return WorkflowTriggerResponseDto.fromJson(value); - case 'WorkflowType': - return WorkflowTypeTypeTransformer().decode(value); - case 'WorkflowUpdateDto': - return WorkflowUpdateDto.fromJson(value); - default: - dynamic match; - if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toList(growable: growable); - } - if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) { - return value - .map((dynamic v) => fromJson(v, match, growable: growable,)) - .toSet(); - } - if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) { - return Map.fromIterables( - value.keys.cast(), - value.values.map((dynamic v) => fromJson(v, match, growable: growable,)), - ); - } - } - } on Exception catch (error, trace) { - throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,); - } - throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',); - } -} - -/// Primarily intended for use in an isolate. -class DeserializationMessage { - const DeserializationMessage({ - required this.json, - required this.targetType, - this.growable = false, - }); - - /// The JSON value to deserialize. - final String json; - - /// Target type to deserialize to. - final String targetType; - - /// Whether to make deserialized lists or maps growable. - final bool growable; -} - -/// Primarily intended for use in an isolate. -Future decodeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : json.decode(message.json); -} - -/// Primarily intended for use in an isolate. -Future deserializeAsync(DeserializationMessage message) async { - // Remove all spaces. Necessary for regular expressions as well. - final targetType = message.targetType.replaceAll(' ', ''); - - // If the expected target type is String, nothing to do... - return targetType == 'String' - ? message.json - : ApiClient.fromJson( - json.decode(message.json), - targetType, - growable: message.growable, - ); -} - -/// Primarily intended for use in an isolate. -Future serializeAsync(Object? value) async => value == null ? '' : json.encode(value); diff --git a/mobile/openapi/lib/api_exception.dart b/mobile/openapi/lib/api_exception.dart deleted file mode 100644 index 53077d686d..0000000000 --- a/mobile/openapi/lib/api_exception.dart +++ /dev/null @@ -1,33 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiException implements Exception { - ApiException(this.code, this.message); - - ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace); - - int code = 0; - String? message; - Exception? innerException; - StackTrace? stackTrace; - - @override - String toString() { - if (message == null) { - return 'ApiException'; - } - if (innerException == null) { - return 'ApiException $code: $message'; - } - return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace'; - } -} diff --git a/mobile/openapi/lib/api_helper.dart b/mobile/openapi/lib/api_helper.dart deleted file mode 100644 index c8efcb5466..0000000000 --- a/mobile/openapi/lib/api_helper.dart +++ /dev/null @@ -1,269 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueryParam { - const QueryParam(this.name, this.value); - - final String name; - final String value; - - @override - String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}'; -} - -// Ported from the Java version. -Iterable _queryParams(String collectionFormat, String name, dynamic value,) { - // Assertions to run in debug mode only. - assert(name.isNotEmpty, 'Parameter cannot be an empty string.'); - - final params = []; - - if (value is List) { - if (collectionFormat == 'multi') { - return value.map((dynamic v) => QueryParam(name, parameterToString(v)),); - } - - // Default collection format is 'csv'. - if (collectionFormat.isEmpty) { - collectionFormat = 'csv'; // ignore: parameter_assignments - } - - final delimiter = _delimiters[collectionFormat] ?? ','; - - params.add(QueryParam(name, value.map(parameterToString).join(delimiter),)); - } else if (value != null) { - params.add(QueryParam(name, parameterToString(value))); - } - - return params; -} - -/// Format the given parameter object into a [String]. -String parameterToString(dynamic value) { - if (value == null) { - return ''; - } - if (value is DateTime) { - return value.toUtc().toIso8601String(); - } - if (value is AlbumUserRole) { - return AlbumUserRoleTypeTransformer().encode(value).toString(); - } - if (value is AssetEditAction) { - return AssetEditActionTypeTransformer().encode(value).toString(); - } - if (value is AssetIdErrorReason) { - return AssetIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetJobName) { - return AssetJobNameTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaSize) { - return AssetMediaSizeTypeTransformer().encode(value).toString(); - } - if (value is AssetMediaStatus) { - return AssetMediaStatusTypeTransformer().encode(value).toString(); - } - if (value is AssetOrder) { - return AssetOrderTypeTransformer().encode(value).toString(); - } - if (value is AssetOrderBy) { - return AssetOrderByTypeTransformer().encode(value).toString(); - } - if (value is AssetRejectReason) { - return AssetRejectReasonTypeTransformer().encode(value).toString(); - } - if (value is AssetTypeEnum) { - return AssetTypeEnumTypeTransformer().encode(value).toString(); - } - if (value is AssetUploadAction) { - return AssetUploadActionTypeTransformer().encode(value).toString(); - } - if (value is AssetVisibility) { - return AssetVisibilityTypeTransformer().encode(value).toString(); - } - if (value is AudioCodec) { - return AudioCodecTypeTransformer().encode(value).toString(); - } - if (value is BulkIdErrorReason) { - return BulkIdErrorReasonTypeTransformer().encode(value).toString(); - } - if (value is CQMode) { - return CQModeTypeTransformer().encode(value).toString(); - } - if (value is CalendarHeatmapType) { - return CalendarHeatmapTypeTypeTransformer().encode(value).toString(); - } - if (value is Colorspace) { - return ColorspaceTypeTransformer().encode(value).toString(); - } - if (value is HlsVideoResolution) { - return HlsVideoResolutionTypeTransformer().encode(value).toString(); - } - if (value is ImageFormat) { - return ImageFormatTypeTransformer().encode(value).toString(); - } - if (value is IntegrityReport) { - return IntegrityReportTypeTransformer().encode(value).toString(); - } - if (value is JobName) { - return JobNameTypeTransformer().encode(value).toString(); - } - if (value is LogLevel) { - return LogLevelTypeTransformer().encode(value).toString(); - } - if (value is MaintenanceAction) { - return MaintenanceActionTypeTransformer().encode(value).toString(); - } - if (value is ManualJobName) { - return ManualJobNameTypeTransformer().encode(value).toString(); - } - if (value is MemorySearchOrder) { - return MemorySearchOrderTypeTransformer().encode(value).toString(); - } - if (value is MemoryType) { - return MemoryTypeTypeTransformer().encode(value).toString(); - } - if (value is MirrorAxis) { - return MirrorAxisTypeTransformer().encode(value).toString(); - } - if (value is NotificationLevel) { - return NotificationLevelTypeTransformer().encode(value).toString(); - } - if (value is NotificationType) { - return NotificationTypeTypeTransformer().encode(value).toString(); - } - if (value is OAuthTokenEndpointAuthMethod) { - return OAuthTokenEndpointAuthMethodTypeTransformer().encode(value).toString(); - } - if (value is PartnerDirection) { - return PartnerDirectionTypeTransformer().encode(value).toString(); - } - if (value is Permission) { - return PermissionTypeTransformer().encode(value).toString(); - } - if (value is QueueCommand) { - return QueueCommandTypeTransformer().encode(value).toString(); - } - if (value is QueueJobStatus) { - return QueueJobStatusTypeTransformer().encode(value).toString(); - } - if (value is QueueName) { - return QueueNameTypeTransformer().encode(value).toString(); - } - if (value is ReactionLevel) { - return ReactionLevelTypeTransformer().encode(value).toString(); - } - if (value is ReactionType) { - return ReactionTypeTypeTransformer().encode(value).toString(); - } - if (value is ReleaseChannel) { - return ReleaseChannelTypeTransformer().encode(value).toString(); - } - if (value is ReleaseType) { - return ReleaseTypeTypeTransformer().encode(value).toString(); - } - if (value is SearchSuggestionType) { - return SearchSuggestionTypeTypeTransformer().encode(value).toString(); - } - if (value is SharedLinkType) { - return SharedLinkTypeTypeTransformer().encode(value).toString(); - } - if (value is SourceType) { - return SourceTypeTypeTransformer().encode(value).toString(); - } - if (value is StorageFolder) { - return StorageFolderTypeTransformer().encode(value).toString(); - } - if (value is SyncEntityType) { - return SyncEntityTypeTypeTransformer().encode(value).toString(); - } - if (value is SyncRequestType) { - return SyncRequestTypeTypeTransformer().encode(value).toString(); - } - if (value is ToneMapping) { - return ToneMappingTypeTransformer().encode(value).toString(); - } - if (value is TranscodeHWAccel) { - return TranscodeHWAccelTypeTransformer().encode(value).toString(); - } - if (value is TranscodePolicy) { - return TranscodePolicyTypeTransformer().encode(value).toString(); - } - if (value is UserAvatarColor) { - return UserAvatarColorTypeTransformer().encode(value).toString(); - } - if (value is UserMetadataKey) { - return UserMetadataKeyTypeTransformer().encode(value).toString(); - } - if (value is UserStatus) { - return UserStatusTypeTransformer().encode(value).toString(); - } - if (value is VideoCodec) { - return VideoCodecTypeTransformer().encode(value).toString(); - } - if (value is VideoContainer) { - return VideoContainerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowTrigger) { - return WorkflowTriggerTypeTransformer().encode(value).toString(); - } - if (value is WorkflowType) { - return WorkflowTypeTypeTransformer().encode(value).toString(); - } - return value.toString(); -} - -/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json' -/// content type. Otherwise, returns the decoded body as decoded by dart:http package. -Future _decodeBodyBytes(Response response) async { - final contentType = response.headers['content-type']; - return contentType != null && contentType.toLowerCase().startsWith('application/json') - ? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes) - : response.body; -} - -/// Returns a valid [T] value found at the specified Map [key], null otherwise. -T? mapValueOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - if (T == double && value is int) { - return value.toDouble() as T; - } - return value is T ? value : null; -} - -/// Returns a valid Map found at the specified Map [key], null otherwise. -Map? mapCastOfType(dynamic map, String key) { - final dynamic value = map is Map ? map[key] : null; - return value is Map ? value.cast() : null; -} - -/// Returns a valid [DateTime] found at the specified Map [key], null otherwise. -DateTime? mapDateTime(dynamic map, String key, [String? pattern]) { - final dynamic value = map is Map ? map[key] : null; - if (value != null) { - int? millis; - if (value is int) { - millis = value; - } else if (value is String) { - if (_isEpochMarker(pattern)) { - millis = int.tryParse(value); - } else { - return DateTime.tryParse(value); - } - } - if (millis != null) { - return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true); - } - } - return null; -} diff --git a/mobile/openapi/lib/auth/api_key_auth.dart b/mobile/openapi/lib/auth/api_key_auth.dart deleted file mode 100644 index 6c5621798f..0000000000 --- a/mobile/openapi/lib/auth/api_key_auth.dart +++ /dev/null @@ -1,40 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyAuth implements Authentication { - ApiKeyAuth(this.location, this.paramName); - - final String location; - final String paramName; - - String apiKeyPrefix = ''; - String apiKey = ''; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey'; - - if (paramValue.isNotEmpty) { - if (location == 'query') { - queryParams.add(QueryParam(paramName, paramValue)); - } else if (location == 'header') { - headerParams[paramName] = paramValue; - } else if (location == 'cookie') { - headerParams.update( - 'Cookie', - (existingCookie) => '$existingCookie; $paramName=$paramValue', - ifAbsent: () => '$paramName=$paramValue', - ); - } - } - } -} diff --git a/mobile/openapi/lib/auth/authentication.dart b/mobile/openapi/lib/auth/authentication.dart deleted file mode 100644 index 5377fb6f34..0000000000 --- a/mobile/openapi/lib/auth/authentication.dart +++ /dev/null @@ -1,17 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -// ignore: one_member_abstracts -abstract class Authentication { - /// Apply authentication settings to header and query params. - Future applyToParams(List queryParams, Map headerParams); -} diff --git a/mobile/openapi/lib/auth/http_basic_auth.dart b/mobile/openapi/lib/auth/http_basic_auth.dart deleted file mode 100644 index 5e8b1c4147..0000000000 --- a/mobile/openapi/lib/auth/http_basic_auth.dart +++ /dev/null @@ -1,26 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class HttpBasicAuth implements Authentication { - HttpBasicAuth({this.username = '', this.password = ''}); - - String username; - String password; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (username.isNotEmpty && password.isNotEmpty) { - final credentials = '$username:$password'; - headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}'; - } - } -} diff --git a/mobile/openapi/lib/auth/http_bearer_auth.dart b/mobile/openapi/lib/auth/http_bearer_auth.dart deleted file mode 100644 index 847dc056e1..0000000000 --- a/mobile/openapi/lib/auth/http_bearer_auth.dart +++ /dev/null @@ -1,49 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -typedef HttpBearerAuthProvider = String Function(); - -class HttpBearerAuth implements Authentication { - HttpBearerAuth(); - - dynamic _accessToken; - - dynamic get accessToken => _accessToken; - - set accessToken(dynamic accessToken) { - if (accessToken is! String && accessToken is! HttpBearerAuthProvider) { - throw ArgumentError('accessToken value must be either a String or a String Function().'); - } - _accessToken = accessToken; - } - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (_accessToken == null) { - return; - } - - String accessToken; - - if (_accessToken is String) { - accessToken = _accessToken; - } else if (_accessToken is HttpBearerAuthProvider) { - accessToken = _accessToken!(); - } else { - return; - } - - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/auth/oauth.dart b/mobile/openapi/lib/auth/oauth.dart deleted file mode 100644 index 73fd8202dc..0000000000 --- a/mobile/openapi/lib/auth/oauth.dart +++ /dev/null @@ -1,24 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuth implements Authentication { - OAuth({this.accessToken = ''}); - - String accessToken; - - @override - Future applyToParams(List queryParams, Map headerParams,) async { - if (accessToken.isNotEmpty) { - headerParams['Authorization'] = 'Bearer $accessToken'; - } - } -} diff --git a/mobile/openapi/lib/model/activity_create_dto.dart b/mobile/openapi/lib/model/activity_create_dto.dart deleted file mode 100644 index 7dbea342c9..0000000000 --- a/mobile/openapi/lib/model/activity_create_dto.dart +++ /dev/null @@ -1,142 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityCreateDto { - /// Returns a new [ActivityCreateDto] instance. - ActivityCreateDto({ - required this.albumId, - this.assetId = const Optional.absent(), - this.comment = const Optional.absent(), - required this.type, - }); - - /// Album ID - String albumId; - - /// Asset ID (if activity is for an asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional assetId; - - /// Comment text (required if type is comment) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional comment; - - ReactionType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityCreateDto && - other.albumId == albumId && - other.assetId == assetId && - other.comment == comment && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (type.hashCode); - - @override - String toString() => 'ActivityCreateDto[albumId=$albumId, assetId=$assetId, comment=$comment, type=$type]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ActivityCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityCreateDto( - albumId: mapValueOfType(json, r'albumId')!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - type: ReactionType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/activity_response_dto.dart b/mobile/openapi/lib/model/activity_response_dto.dart deleted file mode 100644 index 15d22e56cd..0000000000 --- a/mobile/openapi/lib/model/activity_response_dto.dart +++ /dev/null @@ -1,151 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityResponseDto { - /// Returns a new [ActivityResponseDto] instance. - ActivityResponseDto({ - required this.assetId, - this.comment = const Optional.absent(), - required this.createdAt, - required this.id, - required this.type, - required this.user, - }); - - /// Asset ID (if activity is for an asset) - String? assetId; - - /// Comment text (for comment activities) - Optional comment; - - /// Creation date - DateTime createdAt; - - /// Activity ID - String id; - - ReactionType type; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityResponseDto && - other.assetId == assetId && - other.comment == comment && - other.createdAt == createdAt && - other.id == id && - other.type == type && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId == null ? 0 : assetId!.hashCode) + - (comment == null ? 0 : comment!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (type.hashCode) + - (user.hashCode); - - @override - String toString() => 'ActivityResponseDto[assetId=$assetId, comment=$comment, createdAt=$createdAt, id=$id, type=$type, user=$user]'; - - Map toJson() { - final json = {}; - if (this.assetId != null) { - json[r'assetId'] = this.assetId; - } else { - json[r'assetId'] = null; - } - if (this.comment.isPresent) { - final value = this.comment.value; - json[r'comment'] = value; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'type'] = this.type; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [ActivityResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityResponseDto( - assetId: mapValueOfType(json, r'assetId'), - comment: json.containsKey(r'comment') ? Optional.present(mapValueOfType(json, r'comment')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - type: ReactionType.fromJson(json[r'type'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'createdAt', - 'id', - 'type', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/activity_statistics_response_dto.dart b/mobile/openapi/lib/model/activity_statistics_response_dto.dart deleted file mode 100644 index d9ac019ee2..0000000000 --- a/mobile/openapi/lib/model/activity_statistics_response_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ActivityStatisticsResponseDto { - /// Returns a new [ActivityStatisticsResponseDto] instance. - ActivityStatisticsResponseDto({ - required this.comments, - required this.likes, - }); - - /// Number of comments - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int comments; - - /// Number of likes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int likes; - - @override - bool operator ==(Object other) => identical(this, other) || other is ActivityStatisticsResponseDto && - other.comments == comments && - other.likes == likes; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (comments.hashCode) + - (likes.hashCode); - - @override - String toString() => 'ActivityStatisticsResponseDto[comments=$comments, likes=$likes]'; - - Map toJson() { - final json = {}; - json[r'comments'] = this.comments; - json[r'likes'] = this.likes; - return json; - } - - /// Returns a new [ActivityStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ActivityStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ActivityStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ActivityStatisticsResponseDto( - comments: mapValueOfType(json, r'comments')!, - likes: mapValueOfType(json, r'likes')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ActivityStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ActivityStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ActivityStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ActivityStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'comments', - 'likes', - }; -} - diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart deleted file mode 100644 index 1dad234811..0000000000 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AddUsersDto { - /// Returns a new [AddUsersDto] instance. - AddUsersDto({ - this.albumUsers = const [], - }); - - /// Album users to add - List albumUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is AddUsersDto && - _deepEquality.equals(other.albumUsers, albumUsers); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumUsers.hashCode); - - @override - String toString() => 'AddUsersDto[albumUsers=$albumUsers]'; - - Map toJson() { - final json = {}; - json[r'albumUsers'] = this.albumUsers; - return json; - } - - /// Returns a new [AddUsersDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AddUsersDto? fromJson(dynamic value) { - upgradeDto(value, "AddUsersDto"); - if (value is Map) { - final json = value.cast(); - - return AddUsersDto( - albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AddUsersDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AddUsersDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AddUsersDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumUsers', - }; -} - diff --git a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart b/mobile/openapi/lib/model/admin_onboarding_update_dto.dart deleted file mode 100644 index 6daba2a796..0000000000 --- a/mobile/openapi/lib/model/admin_onboarding_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AdminOnboardingUpdateDto { - /// Returns a new [AdminOnboardingUpdateDto] instance. - AdminOnboardingUpdateDto({ - required this.isOnboarded, - }); - - /// Is admin onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is AdminOnboardingUpdateDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'AdminOnboardingUpdateDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [AdminOnboardingUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AdminOnboardingUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AdminOnboardingUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AdminOnboardingUpdateDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AdminOnboardingUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AdminOnboardingUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AdminOnboardingUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AdminOnboardingUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart deleted file mode 100644 index a7e350fd53..0000000000 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ /dev/null @@ -1,274 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumResponseDto { - /// Returns a new [AlbumResponseDto] instance. - AlbumResponseDto({ - required this.albumName, - required this.albumThumbnailAssetId, - this.albumUsers = const [], - required this.assetCount, - this.contributorCounts = const Optional.present(const []), - required this.createdAt, - required this.description, - this.endDate = const Optional.absent(), - required this.hasSharedLink, - required this.id, - required this.isActivityEnabled, - this.lastModifiedAssetTimestamp = const Optional.absent(), - this.order = const Optional.absent(), - required this.shared, - this.startDate = const Optional.absent(), - required this.updatedAt, - }); - - /// Album name - String albumName; - - /// Thumbnail asset ID - String? albumThumbnailAssetId; - - /// First entry is always the album owner. Second entry is the auth user, if it differs from the owner. The rest are ordered alphabetically. - List albumUsers; - - /// Number of assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - Optional?> contributorCounts; - - /// Creation date - DateTime createdAt; - - /// Album description - String description; - - /// End date (latest asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional endDate; - - /// Has shared link - bool hasSharedLink; - - /// Album ID - String id; - - /// Activity feed enabled - bool isActivityEnabled; - - /// Last modified asset timestamp - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional lastModifiedAssetTimestamp; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - /// Is shared album - bool shared; - - /// Start date (earliest asset) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional startDate; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - _deepEquality.equals(other.albumUsers, albumUsers) && - other.assetCount == assetCount && - _deepEquality.equals(other.contributorCounts, contributorCounts) && - other.createdAt == createdAt && - other.description == description && - other.endDate == endDate && - other.hasSharedLink == hasSharedLink && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.lastModifiedAssetTimestamp == lastModifiedAssetTimestamp && - other.order == order && - other.shared == shared && - other.startDate == startDate && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (albumUsers.hashCode) + - (assetCount.hashCode) + - (contributorCounts.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (endDate == null ? 0 : endDate!.hashCode) + - (hasSharedLink.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (lastModifiedAssetTimestamp == null ? 0 : lastModifiedAssetTimestamp!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (shared.hashCode) + - (startDate == null ? 0 : startDate!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, albumUsers=$albumUsers, assetCount=$assetCount, contributorCounts=$contributorCounts, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, shared=$shared, startDate=$startDate, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumThumbnailAssetId != null) { - json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; - } else { - json[r'albumThumbnailAssetId'] = null; - } - json[r'albumUsers'] = this.albumUsers; - json[r'assetCount'] = this.assetCount; - if (this.contributorCounts.isPresent) { - final value = this.contributorCounts.value; - json[r'contributorCounts'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - if (this.endDate.isPresent) { - final value = this.endDate.value; - json[r'endDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'hasSharedLink'] = this.hasSharedLink; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - if (this.lastModifiedAssetTimestamp.isPresent) { - final value = this.lastModifiedAssetTimestamp.value; - json[r'lastModifiedAssetTimestamp'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - json[r'shared'] = this.shared; - if (this.startDate.isPresent) { - final value = this.startDate.value; - json[r'startDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [AlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumResponseDto( - albumName: mapValueOfType(json, r'albumName')!, - albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), - albumUsers: AlbumUserResponseDto.listFromJson(json[r'albumUsers']), - assetCount: mapValueOfType(json, r'assetCount')!, - contributorCounts: json.containsKey(r'contributorCounts') ? Optional.present(ContributorCountResponseDto.listFromJson(json[r'contributorCounts'])) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - description: mapValueOfType(json, r'description')!, - endDate: json.containsKey(r'endDate') ? Optional.present(mapDateTime(json, r'endDate', r'')) : const Optional.absent(), - hasSharedLink: mapValueOfType(json, r'hasSharedLink')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - lastModifiedAssetTimestamp: json.containsKey(r'lastModifiedAssetTimestamp') ? Optional.present(mapDateTime(json, r'lastModifiedAssetTimestamp', r'')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - shared: mapValueOfType(json, r'shared')!, - startDate: json.containsKey(r'startDate') ? Optional.present(mapDateTime(json, r'startDate', r'')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - 'albumThumbnailAssetId', - 'albumUsers', - 'assetCount', - 'createdAt', - 'description', - 'hasSharedLink', - 'id', - 'isActivityEnabled', - 'shared', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/album_statistics_response_dto.dart b/mobile/openapi/lib/model/album_statistics_response_dto.dart deleted file mode 100644 index 0f440d572d..0000000000 --- a/mobile/openapi/lib/model/album_statistics_response_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumStatisticsResponseDto { - /// Returns a new [AlbumStatisticsResponseDto] instance. - AlbumStatisticsResponseDto({ - required this.notShared, - required this.owned, - required this.shared, - }); - - /// Number of non-shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int notShared; - - /// Number of owned albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int owned; - - /// Number of shared albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int shared; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumStatisticsResponseDto && - other.notShared == notShared && - other.owned == owned && - other.shared == shared; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (notShared.hashCode) + - (owned.hashCode) + - (shared.hashCode); - - @override - String toString() => 'AlbumStatisticsResponseDto[notShared=$notShared, owned=$owned, shared=$shared]'; - - Map toJson() { - final json = {}; - json[r'notShared'] = this.notShared; - json[r'owned'] = this.owned; - json[r'shared'] = this.shared; - return json; - } - - /// Returns a new [AlbumStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumStatisticsResponseDto( - notShared: mapValueOfType(json, r'notShared')!, - owned: mapValueOfType(json, r'owned')!, - shared: mapValueOfType(json, r'shared')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'notShared', - 'owned', - 'shared', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_add_dto.dart b/mobile/openapi/lib/model/album_user_add_dto.dart deleted file mode 100644 index e47ffc421c..0000000000 --- a/mobile/openapi/lib/model/album_user_add_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserAddDto { - /// Returns a new [AlbumUserAddDto] instance. - AlbumUserAddDto({ - this.role = const Optional.absent(), - required this.userId, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserAddDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role == null ? 0 : role!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserAddDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.role.isPresent) { - final value = this.role.value; - json[r'role'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserAddDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserAddDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserAddDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserAddDto( - role: json.containsKey(r'role') ? Optional.present(AlbumUserRole.fromJson(json[r'role'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserAddDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserAddDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserAddDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserAddDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_create_dto.dart b/mobile/openapi/lib/model/album_user_create_dto.dart deleted file mode 100644 index 26aa35ae78..0000000000 --- a/mobile/openapi/lib/model/album_user_create_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserCreateDto { - /// Returns a new [AlbumUserCreateDto] instance. - AlbumUserCreateDto({ - required this.role, - required this.userId, - }); - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserCreateDto && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'AlbumUserCreateDto[role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [AlbumUserCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserCreateDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_response_dto.dart b/mobile/openapi/lib/model/album_user_response_dto.dart deleted file mode 100644 index bbae03fba7..0000000000 --- a/mobile/openapi/lib/model/album_user_response_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumUserResponseDto { - /// Returns a new [AlbumUserResponseDto] instance. - AlbumUserResponseDto({ - required this.role, - required this.user, - }); - - AlbumUserRole role; - - UserResponseDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumUserResponseDto && - other.role == role && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode) + - (user.hashCode); - - @override - String toString() => 'AlbumUserResponseDto[role=$role, user=$user]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [AlbumUserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumUserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumUserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumUserResponseDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - user: UserResponseDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumUserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumUserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumUserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/album_user_role.dart b/mobile/openapi/lib/model/album_user_role.dart deleted file mode 100644 index b296cd950d..0000000000 --- a/mobile/openapi/lib/model/album_user_role.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Album user role -enum AlbumUserRole { - editor._(r'editor'), - owner._(r'owner'), - viewer._(r'viewer'), - ; - - /// Instantiate a new enum with the provided value. - const AlbumUserRole._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AlbumUserRole] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AlbumUserRole? fromJson(dynamic value) => AlbumUserRoleTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AlbumUserRole] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumUserRole.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AlbumUserRole] to String, -/// and [decode] dynamic data back to [AlbumUserRole]. -class AlbumUserRoleTypeTransformer { - factory AlbumUserRoleTypeTransformer() => _instance ??= const AlbumUserRoleTypeTransformer._(); - - const AlbumUserRoleTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AlbumUserRole data) => data._value; - - /// Returns the instance of [AlbumUserRole] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AlbumUserRole? decode(dynamic data, {bool allowNull = true}) { - if (data is AlbumUserRole) { - return data; - } - if (data != null) { - switch (data) { - case r'editor': return AlbumUserRole.editor; - case r'owner': return AlbumUserRole.owner; - case r'viewer': return AlbumUserRole.viewer; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AlbumUserRoleTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_dto.dart b/mobile/openapi/lib/model/albums_add_assets_dto.dart deleted file mode 100644 index d6aa3db1c1..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_dto.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsAddAssetsDto { - /// Returns a new [AlbumsAddAssetsDto] instance. - AlbumsAddAssetsDto({ - this.albumIds = const [], - this.assetIds = const [], - }); - - /// Album IDs - List albumIds; - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsDto && - _deepEquality.equals(other.albumIds, albumIds) && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (assetIds.hashCode); - - @override - String toString() => 'AlbumsAddAssetsDto[albumIds=$albumIds, assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'albumIds'] = this.albumIds; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AlbumsAddAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsDto( - albumIds: json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const [], - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumIds', - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart b/mobile/openapi/lib/model/albums_add_assets_response_dto.dart deleted file mode 100644 index 943bd30bc5..0000000000 --- a/mobile/openapi/lib/model/albums_add_assets_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsAddAssetsResponseDto { - /// Returns a new [AlbumsAddAssetsResponseDto] instance. - AlbumsAddAssetsResponseDto({ - this.error = const Optional.absent(), - required this.success, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Operation success - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsAddAssetsResponseDto && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AlbumsAddAssetsResponseDto[error=$error, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AlbumsAddAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsAddAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AlbumsAddAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AlbumsAddAssetsResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsAddAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsAddAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsAddAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsAddAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/albums_response.dart b/mobile/openapi/lib/model/albums_response.dart deleted file mode 100644 index def205de90..0000000000 --- a/mobile/openapi/lib/model/albums_response.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsResponse { - /// Returns a new [AlbumsResponse] instance. - AlbumsResponse({ - required this.defaultAssetOrder, - }); - - AssetOrder defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsResponse && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder.hashCode); - - @override - String toString() => 'AlbumsResponse[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - json[r'defaultAssetOrder'] = this.defaultAssetOrder; - return json; - } - - /// Returns a new [AlbumsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsResponse? fromJson(dynamic value) { - upgradeDto(value, "AlbumsResponse"); - if (value is Map) { - final json = value.cast(); - - return AlbumsResponse( - defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'defaultAssetOrder', - }; -} - diff --git a/mobile/openapi/lib/model/albums_update.dart b/mobile/openapi/lib/model/albums_update.dart deleted file mode 100644 index 46bb3ef66d..0000000000 --- a/mobile/openapi/lib/model/albums_update.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AlbumsUpdate { - /// Returns a new [AlbumsUpdate] instance. - AlbumsUpdate({ - this.defaultAssetOrder = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional defaultAssetOrder; - - @override - bool operator ==(Object other) => identical(this, other) || other is AlbumsUpdate && - other.defaultAssetOrder == defaultAssetOrder; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (defaultAssetOrder == null ? 0 : defaultAssetOrder!.hashCode); - - @override - String toString() => 'AlbumsUpdate[defaultAssetOrder=$defaultAssetOrder]'; - - Map toJson() { - final json = {}; - if (this.defaultAssetOrder.isPresent) { - final value = this.defaultAssetOrder.value; - json[r'defaultAssetOrder'] = value; - } - return json; - } - - /// Returns a new [AlbumsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AlbumsUpdate? fromJson(dynamic value) { - upgradeDto(value, "AlbumsUpdate"); - if (value is Map) { - final json = value.cast(); - - return AlbumsUpdate( - defaultAssetOrder: json.containsKey(r'defaultAssetOrder') ? Optional.present(AssetOrder.fromJson(json[r'defaultAssetOrder'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AlbumsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AlbumsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AlbumsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AlbumsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart deleted file mode 100644 index e1a50fecd5..0000000000 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyCreateDto { - /// Returns a new [ApiKeyCreateDto] instance. - ApiKeyCreateDto({ - this.name = const Optional.absent(), - this.permissions = const [], - }); - - /// API key name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// List of permissions - List permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyCreateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'permissions'] = this.permissions; - return json; - } - - /// Returns a new [ApiKeyCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: Permission.listFromJson(json[r'permissions']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'permissions', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_create_response_dto.dart b/mobile/openapi/lib/model/api_key_create_response_dto.dart deleted file mode 100644 index 77b19ebfd2..0000000000 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyCreateResponseDto { - /// Returns a new [ApiKeyCreateResponseDto] instance. - ApiKeyCreateResponseDto({ - required this.apiKey, - required this.secret, - }); - - ApiKeyResponseDto apiKey; - - /// API key secret (only shown once) - String secret; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyCreateResponseDto && - other.apiKey == apiKey && - other.secret == secret; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (apiKey.hashCode) + - (secret.hashCode); - - @override - String toString() => 'ApiKeyCreateResponseDto[apiKey=$apiKey, secret=$secret]'; - - Map toJson() { - final json = {}; - json[r'apiKey'] = this.apiKey; - json[r'secret'] = this.secret; - return json; - } - - /// Returns a new [ApiKeyCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyCreateResponseDto( - apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!, - secret: mapValueOfType(json, r'secret')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'apiKey', - 'secret', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart deleted file mode 100644 index 4005ca9f12..0000000000 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyResponseDto { - /// Returns a new [ApiKeyResponseDto] instance. - ApiKeyResponseDto({ - required this.createdAt, - required this.id, - required this.name, - this.permissions = const [], - required this.updatedAt, - }); - - /// Creation date - DateTime createdAt; - - /// API key ID - String id; - - /// API key name - String name; - - /// List of permissions - List permissions; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyResponseDto && - other.createdAt == createdAt && - other.id == id && - other.name == name && - _deepEquality.equals(other.permissions, permissions) && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (permissions.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'ApiKeyResponseDto[createdAt=$createdAt, id=$id, name=$name, permissions=$permissions, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'permissions'] = this.permissions; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [ApiKeyResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - permissions: Permission.listFromJson(json[r'permissions']), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'permissions', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart deleted file mode 100644 index c6b0b5ed3c..0000000000 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ApiKeyUpdateDto { - /// Returns a new [ApiKeyUpdateDto] instance. - ApiKeyUpdateDto({ - this.name = const Optional.absent(), - this.permissions = const Optional.present(const []), - }); - - /// API key name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// List of permissions - Optional?> permissions; - - @override - bool operator ==(Object other) => identical(this, other) || other is ApiKeyUpdateDto && - other.name == name && - _deepEquality.equals(other.permissions, permissions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name == null ? 0 : name!.hashCode) + - (permissions.hashCode); - - @override - String toString() => 'ApiKeyUpdateDto[name=$name, permissions=$permissions]'; - - Map toJson() { - final json = {}; - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.permissions.isPresent) { - final value = this.permissions.value; - json[r'permissions'] = value; - } - return json; - } - - /// Returns a new [ApiKeyUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ApiKeyUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "ApiKeyUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return ApiKeyUpdateDto( - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - permissions: json.containsKey(r'permissions') ? Optional.present(Permission.listFromJson(json[r'permissions'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ApiKeyUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ApiKeyUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ApiKeyUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ApiKeyUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_bulk_delete_dto.dart deleted file mode 100644 index bfe51e1779..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_delete_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkDeleteDto { - /// Returns a new [AssetBulkDeleteDto] instance. - AssetBulkDeleteDto({ - this.force = const Optional.absent(), - this.ids = const [], - }); - - /// Force delete even if in use - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkDeleteDto && - other.force == force && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode) + - (ids.hashCode); - - @override - String toString() => 'AssetBulkDeleteDto[force=$force, ids=$ids]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [AssetBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_update_dto.dart b/mobile/openapi/lib/model/asset_bulk_update_dto.dart deleted file mode 100644 index fe34c3a14c..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_update_dto.dart +++ /dev/null @@ -1,271 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUpdateDto { - /// Returns a new [AssetBulkUpdateDto] instance. - AssetBulkUpdateDto({ - this.dateTimeOriginal = const Optional.absent(), - this.dateTimeRelative = const Optional.absent(), - this.description = const Optional.absent(), - this.duplicateId = const Optional.absent(), - this.ids = const [], - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.timeZone = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeOriginal; - - /// Relative time offset in minutes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeRelative; - - /// Asset description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Duplicate ID - Optional duplicateId; - - /// Asset IDs to update - List ids; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional latitude; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// Time zone (IANA timezone) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional timeZone; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUpdateDto && - other.dateTimeOriginal == dateTimeOriginal && - other.dateTimeRelative == dateTimeRelative && - other.description == description && - other.duplicateId == duplicateId && - _deepEquality.equals(other.ids, ids) && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.longitude == longitude && - other.rating == rating && - other.timeZone == timeZone && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (dateTimeRelative == null ? 0 : dateTimeRelative!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (ids.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'AssetBulkUpdateDto[dateTimeOriginal=$dateTimeOriginal, dateTimeRelative=$dateTimeRelative, description=$description, duplicateId=$duplicateId, ids=$ids, isFavorite=$isFavorite, latitude=$latitude, longitude=$longitude, rating=$rating, timeZone=$timeZone, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.dateTimeRelative.isPresent) { - final value = this.dateTimeRelative.value; - json[r'dateTimeRelative'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - json[r'ids'] = this.ids; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUpdateDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - dateTimeRelative: json.containsKey(r'dateTimeRelative') ? Optional.present(json[r'dateTimeRelative'] == null ? null : int.parse('${json[r'dateTimeRelative']}')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart deleted file mode 100644 index 66f46795e8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckDto { - /// Returns a new [AssetBulkUploadCheckDto] instance. - AssetBulkUploadCheckDto({ - this.assets = const [], - }); - - /// Assets to check - List assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckDto && - _deepEquality.equals(other.assets, assets); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [AssetBulkUploadCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckDto( - assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart deleted file mode 100644 index a3d928b0d8..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckItem { - /// Returns a new [AssetBulkUploadCheckItem] instance. - AssetBulkUploadCheckItem({ - required this.checksum, - required this.id, - }); - - /// Base64 or hex encoded SHA1 hash - String checksum; - - /// Client-side identifier echoed in the response to match results to inputs (e.g. filename) - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckItem && - other.checksum == checksum && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (id.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckItem[checksum=$checksum, id=$id]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [AssetBulkUploadCheckItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckItem? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckItem"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckItem( - checksum: mapValueOfType(json, r'checksum')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart deleted file mode 100644 index b37bb0de8a..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckResponseDto { - /// Returns a new [AssetBulkUploadCheckResponseDto] instance. - AssetBulkUploadCheckResponseDto({ - this.results = const [], - }); - - /// Upload check results - List results; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResponseDto && - _deepEquality.equals(other.results, results); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (results.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResponseDto[results=$results]'; - - Map toJson() { - final json = {}; - json[r'results'] = this.results; - return json; - } - - /// Returns a new [AssetBulkUploadCheckResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResponseDto( - results: AssetBulkUploadCheckResult.listFromJson(json[r'results']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'results', - }; -} - diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart deleted file mode 100644 index 572c99c11e..0000000000 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetBulkUploadCheckResult { - /// Returns a new [AssetBulkUploadCheckResult] instance. - AssetBulkUploadCheckResult({ - required this.action, - this.assetId = const Optional.absent(), - required this.id, - this.isTrashed = const Optional.absent(), - this.reason = const Optional.absent(), - }); - - AssetUploadAction action; - - /// Existing asset ID if duplicate - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional assetId; - - /// Client-side identifier echoed from the request to match results to inputs - String id; - - /// Whether existing asset is trashed - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isTrashed; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional reason; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetBulkUploadCheckResult && - other.action == action && - other.assetId == assetId && - other.id == id && - other.isTrashed == isTrashed && - other.reason == reason; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId == null ? 0 : assetId!.hashCode) + - (id.hashCode) + - (isTrashed == null ? 0 : isTrashed!.hashCode) + - (reason == null ? 0 : reason!.hashCode); - - @override - String toString() => 'AssetBulkUploadCheckResult[action=$action, assetId=$assetId, id=$id, isTrashed=$isTrashed, reason=$reason]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.assetId.isPresent) { - final value = this.assetId.value; - json[r'assetId'] = value; - } - json[r'id'] = this.id; - if (this.isTrashed.isPresent) { - final value = this.isTrashed.value; - json[r'isTrashed'] = value; - } - if (this.reason.isPresent) { - final value = this.reason.value; - json[r'reason'] = value; - } - return json; - } - - /// Returns a new [AssetBulkUploadCheckResult] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetBulkUploadCheckResult? fromJson(dynamic value) { - upgradeDto(value, "AssetBulkUploadCheckResult"); - if (value is Map) { - final json = value.cast(); - - return AssetBulkUploadCheckResult( - action: AssetUploadAction.fromJson(json[r'action'])!, - assetId: json.containsKey(r'assetId') ? Optional.present(mapValueOfType(json, r'assetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isTrashed: json.containsKey(r'isTrashed') ? Optional.present(mapValueOfType(json, r'isTrashed')) : const Optional.absent(), - reason: json.containsKey(r'reason') ? Optional.present(AssetRejectReason.fromJson(json[r'reason'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetBulkUploadCheckResult.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetBulkUploadCheckResult.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetBulkUploadCheckResult-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetBulkUploadCheckResult.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/asset_copy_dto.dart b/mobile/openapi/lib/model/asset_copy_dto.dart deleted file mode 100644 index 577ba9ffa6..0000000000 --- a/mobile/openapi/lib/model/asset_copy_dto.dart +++ /dev/null @@ -1,164 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetCopyDto { - /// Returns a new [AssetCopyDto] instance. - AssetCopyDto({ - this.albums = const Optional.present(true), - this.favorite = const Optional.present(true), - this.sharedLinks = const Optional.present(true), - this.sidecar = const Optional.present(true), - required this.sourceId, - this.stack = const Optional.present(true), - required this.targetId, - }); - - /// Copy album associations - Optional albums; - - /// Copy favorite status - Optional favorite; - - /// Copy shared links - Optional sharedLinks; - - /// Copy sidecar file - Optional sidecar; - - /// Source asset ID - String sourceId; - - /// Copy stack association - Optional stack; - - /// Target asset ID - String targetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetCopyDto && - other.albums == albums && - other.favorite == favorite && - other.sharedLinks == sharedLinks && - other.sidecar == sidecar && - other.sourceId == sourceId && - other.stack == stack && - other.targetId == targetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (favorite.hashCode) + - (sharedLinks.hashCode) + - (sidecar.hashCode) + - (sourceId.hashCode) + - (stack.hashCode) + - (targetId.hashCode); - - @override - String toString() => 'AssetCopyDto[albums=$albums, favorite=$favorite, sharedLinks=$sharedLinks, sidecar=$sidecar, sourceId=$sourceId, stack=$stack, targetId=$targetId]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.favorite.isPresent) { - final value = this.favorite.value; - json[r'favorite'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.sidecar.isPresent) { - final value = this.sidecar.value; - json[r'sidecar'] = value; - } - json[r'sourceId'] = this.sourceId; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'targetId'] = this.targetId; - return json; - } - - /// Returns a new [AssetCopyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetCopyDto? fromJson(dynamic value) { - upgradeDto(value, "AssetCopyDto"); - if (value is Map) { - final json = value.cast(); - - return AssetCopyDto( - albums: json.containsKey(r'albums') ? Optional.present(mapValueOfType(json, r'albums')) : const Optional.absent(), - favorite: json.containsKey(r'favorite') ? Optional.present(mapValueOfType(json, r'favorite')) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(mapValueOfType(json, r'sharedLinks')) : const Optional.absent(), - sidecar: json.containsKey(r'sidecar') ? Optional.present(mapValueOfType(json, r'sidecar')) : const Optional.absent(), - sourceId: mapValueOfType(json, r'sourceId')!, - stack: json.containsKey(r'stack') ? Optional.present(mapValueOfType(json, r'stack')) : const Optional.absent(), - targetId: mapValueOfType(json, r'targetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetCopyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetCopyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetCopyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetCopyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sourceId', - 'targetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action.dart b/mobile/openapi/lib/model/asset_edit_action.dart deleted file mode 100644 index ffe33e5457..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Type of edit action to perform -enum AssetEditAction { - crop._(r'crop'), - rotate._(r'rotate'), - mirror._(r'mirror'), - ; - - /// Instantiate a new enum with the provided value. - const AssetEditAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetEditAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetEditAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetEditAction] to String, -/// and [decode] dynamic data back to [AssetEditAction]. -class AssetEditActionTypeTransformer { - factory AssetEditActionTypeTransformer() => _instance ??= const AssetEditActionTypeTransformer._(); - - const AssetEditActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetEditAction data) => data._value; - - /// Returns the instance of [AssetEditAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetEditAction? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetEditAction) { - return data; - } - if (data != null) { - switch (data) { - case r'crop': return AssetEditAction.crop; - case r'rotate': return AssetEditAction.rotate; - case r'mirror': return AssetEditAction.mirror; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetEditActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto.dart deleted file mode 100644 index 1b19612bf3..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemDto { - /// Returns a new [AssetEditActionItemDto] instance. - AssetEditActionItemDto({ - required this.action, - required this.parameters, - }); - - AssetEditAction action; - - Map parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDto && - other.action == action && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemDto[action=$action, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDto( - action: AssetEditAction.fromJson(json[r'action'])!, - parameters: json[r'parameters'], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart b/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart deleted file mode 100644 index 6f2811e89d..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_dto_parameters.dart +++ /dev/null @@ -1,156 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemDtoParameters { - /// Returns a new [AssetEditActionItemDtoParameters] instance. - AssetEditActionItemDtoParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - required this.angle, - required this.axis, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - /// Rotation angle in degrees - num angle; - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDtoParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y && - other.angle == angle && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode) + - (angle.hashCode) + - (axis.hashCode); - - @override - String toString() => 'AssetEditActionItemDtoParameters[height=$height, width=$width, x=$x, y=$y, angle=$angle, axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - json[r'angle'] = this.angle; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [AssetEditActionItemDtoParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemDtoParameters? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemDtoParameters"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemDtoParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - angle: num.parse('${json[r'angle']}'), - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemDtoParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemDtoParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemDtoParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemDtoParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - 'angle', - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart b/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart deleted file mode 100644 index 3315fe8579..0000000000 --- a/mobile/openapi/lib/model/asset_edit_action_item_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditActionItemResponseDto { - /// Returns a new [AssetEditActionItemResponseDto] instance. - AssetEditActionItemResponseDto({ - required this.action, - required this.id, - required this.parameters, - }); - - AssetEditAction action; - - /// Asset edit ID - String id; - - AssetEditActionItemDtoParameters parameters; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemResponseDto && - other.action == action && - other.id == id && - other.parameters == parameters; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (id.hashCode) + - (parameters.hashCode); - - @override - String toString() => 'AssetEditActionItemResponseDto[action=$action, id=$id, parameters=$parameters]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - return json; - } - - /// Returns a new [AssetEditActionItemResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditActionItemResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditActionItemResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditActionItemResponseDto( - action: AssetEditAction.fromJson(json[r'action'])!, - id: mapValueOfType(json, r'id')!, - parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditActionItemResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditActionItemResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditActionItemResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditActionItemResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'id', - 'parameters', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_create_dto.dart b/mobile/openapi/lib/model/asset_edits_create_dto.dart deleted file mode 100644 index 9f6fc66904..0000000000 --- a/mobile/openapi/lib/model/asset_edits_create_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditsCreateDto { - /// Returns a new [AssetEditsCreateDto] instance. - AssetEditsCreateDto({ - this.edits = const [], - }); - - /// List of edit actions to apply (crop, rotate, or mirror) - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsCreateDto && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (edits.hashCode); - - @override - String toString() => 'AssetEditsCreateDto[edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsCreateDto( - edits: AssetEditActionItemDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_edits_response_dto.dart b/mobile/openapi/lib/model/asset_edits_response_dto.dart deleted file mode 100644 index 322b4c0a4c..0000000000 --- a/mobile/openapi/lib/model/asset_edits_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetEditsResponseDto { - /// Returns a new [AssetEditsResponseDto] instance. - AssetEditsResponseDto({ - required this.assetId, - this.edits = const [], - }); - - /// Asset ID these edits belong to - String assetId; - - /// List of edit actions applied to the asset - List edits; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetEditsResponseDto && - other.assetId == assetId && - _deepEquality.equals(other.edits, edits); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (edits.hashCode); - - @override - String toString() => 'AssetEditsResponseDto[assetId=$assetId, edits=$edits]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'edits'] = this.edits; - return json; - } - - /// Returns a new [AssetEditsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetEditsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetEditsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetEditsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetEditsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetEditsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetEditsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetEditsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'edits', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_create_dto.dart b/mobile/openapi/lib/model/asset_face_create_dto.dart deleted file mode 100644 index 29c28175cd..0000000000 --- a/mobile/openapi/lib/model/asset_face_create_dto.dart +++ /dev/null @@ -1,181 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceCreateDto { - /// Returns a new [AssetFaceCreateDto] instance. - AssetFaceCreateDto({ - required this.assetId, - required this.height, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.width, - required this.x, - required this.y, - }); - - /// Asset ID - String assetId; - - /// Face bounding box height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int height; - - /// Image height in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String personId; - - /// Face bounding box width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int width; - - /// Face bounding box X coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int x; - - /// Face bounding box Y coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceCreateDto && - other.assetId == assetId && - other.height == height && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (height.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'AssetFaceCreateDto[assetId=$assetId, height=$height, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'height'] = this.height; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'personId'] = this.personId; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [AssetFaceCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceCreateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceCreateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceCreateDto( - assetId: mapValueOfType(json, r'assetId')!, - height: mapValueOfType(json, r'height')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'height', - 'imageHeight', - 'imageWidth', - 'personId', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_delete_dto.dart b/mobile/openapi/lib/model/asset_face_delete_dto.dart deleted file mode 100644 index a1f3731bea..0000000000 --- a/mobile/openapi/lib/model/asset_face_delete_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceDeleteDto { - /// Returns a new [AssetFaceDeleteDto] instance. - AssetFaceDeleteDto({ - required this.force, - }); - - /// Force delete even if person has other faces - bool force; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force.hashCode); - - @override - String toString() => 'AssetFaceDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - json[r'force'] = this.force; - return json; - } - - /// Returns a new [AssetFaceDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceDeleteDto( - force: mapValueOfType(json, r'force')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'force', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_response_dto.dart b/mobile/openapi/lib/model/asset_face_response_dto.dart deleted file mode 100644 index aa7b8b65f0..0000000000 --- a/mobile/openapi/lib/model/asset_face_response_dto.dart +++ /dev/null @@ -1,200 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceResponseDto { - /// Returns a new [AssetFaceResponseDto] instance. - AssetFaceResponseDto({ - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.person, - this.sourceType = const Optional.absent(), - }); - - /// Bounding box X1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 coordinate - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face ID - String id; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int imageWidth; - - PersonResponseDto? person; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceResponseDto && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.person == person && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (person == null ? 0 : person!.hashCode) + - (sourceType == null ? 0 : sourceType!.hashCode); - - @override - String toString() => 'AssetFaceResponseDto[boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, person=$person, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.person != null) { - json[r'person'] = this.person; - } else { - json[r'person'] = null; - } - if (this.sourceType.isPresent) { - final value = this.sourceType.value; - json[r'sourceType'] = value; - } - return json; - } - - /// Returns a new [AssetFaceResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceResponseDto( - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - person: PersonResponseDto.fromJson(json[r'person']), - sourceType: json.containsKey(r'sourceType') ? Optional.present(SourceType.fromJson(json[r'sourceType'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'person', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_dto.dart b/mobile/openapi/lib/model/asset_face_update_dto.dart deleted file mode 100644 index 1027627552..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceUpdateDto { - /// Returns a new [AssetFaceUpdateDto] instance. - AssetFaceUpdateDto({ - this.data = const [], - }); - - /// Face update items - List data; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateDto && - _deepEquality.equals(other.data, data); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode); - - @override - String toString() => 'AssetFaceUpdateDto[data=$data]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - return json; - } - - /// Returns a new [AssetFaceUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateDto( - data: AssetFaceUpdateItem.listFromJson(json[r'data']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - }; -} - diff --git a/mobile/openapi/lib/model/asset_face_update_item.dart b/mobile/openapi/lib/model/asset_face_update_item.dart deleted file mode 100644 index a81b21e139..0000000000 --- a/mobile/openapi/lib/model/asset_face_update_item.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetFaceUpdateItem { - /// Returns a new [AssetFaceUpdateItem] instance. - AssetFaceUpdateItem({ - required this.assetId, - required this.personId, - }); - - /// Asset ID - String assetId; - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetFaceUpdateItem && - other.assetId == assetId && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (personId.hashCode); - - @override - String toString() => 'AssetFaceUpdateItem[assetId=$assetId, personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [AssetFaceUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetFaceUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "AssetFaceUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return AssetFaceUpdateItem( - assetId: mapValueOfType(json, r'assetId')!, - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetFaceUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetFaceUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetFaceUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetFaceUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_id_error_reason.dart b/mobile/openapi/lib/model/asset_id_error_reason.dart deleted file mode 100644 index 26ee546e32..0000000000 --- a/mobile/openapi/lib/model/asset_id_error_reason.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Error reason if failed -enum AssetIdErrorReason { - duplicate._(r'duplicate'), - noPermission._(r'no_permission'), - notFound._(r'not_found'), - ; - - /// Instantiate a new enum with the provided value. - const AssetIdErrorReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetIdErrorReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetIdErrorReason? fromJson(dynamic value) => AssetIdErrorReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetIdErrorReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetIdErrorReason] to String, -/// and [decode] dynamic data back to [AssetIdErrorReason]. -class AssetIdErrorReasonTypeTransformer { - factory AssetIdErrorReasonTypeTransformer() => _instance ??= const AssetIdErrorReasonTypeTransformer._(); - - const AssetIdErrorReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetIdErrorReason data) => data._value; - - /// Returns the instance of [AssetIdErrorReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetIdErrorReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return AssetIdErrorReason.duplicate; - case r'no_permission': return AssetIdErrorReason.noPermission; - case r'not_found': return AssetIdErrorReason.notFound; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_ids_dto.dart b/mobile/openapi/lib/model/asset_ids_dto.dart deleted file mode 100644 index 85e5cc3aee..0000000000 --- a/mobile/openapi/lib/model/asset_ids_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetIdsDto { - /// Returns a new [AssetIdsDto] instance. - AssetIdsDto({ - this.assetIds = const [], - }); - - /// Asset IDs - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'AssetIdsDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [AssetIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ids_response_dto.dart b/mobile/openapi/lib/model/asset_ids_response_dto.dart deleted file mode 100644 index 6d8076952e..0000000000 --- a/mobile/openapi/lib/model/asset_ids_response_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetIdsResponseDto { - /// Returns a new [AssetIdsResponseDto] instance. - AssetIdsResponseDto({ - required this.assetId, - this.error = const Optional.absent(), - required this.success, - }); - - /// Asset ID - String assetId; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetIdsResponseDto && - other.assetId == assetId && - other.error == error && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (error == null ? 0 : error!.hashCode) + - (success.hashCode); - - @override - String toString() => 'AssetIdsResponseDto[assetId=$assetId, error=$error, success=$success]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - json[r'success'] = this.success; - return json; - } - - /// Returns a new [AssetIdsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetIdsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetIdsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetIdsResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - error: json.containsKey(r'error') ? Optional.present(AssetIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetIdsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetIdsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetIdsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetIdsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/asset_job_name.dart b/mobile/openapi/lib/model/asset_job_name.dart deleted file mode 100644 index 6c32d6b1e4..0000000000 --- a/mobile/openapi/lib/model/asset_job_name.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Job name -enum AssetJobName { - refreshFaces._(r'refresh-faces'), - refreshMetadata._(r'refresh-metadata'), - regenerateThumbnail._(r'regenerate-thumbnail'), - transcodeVideo._(r'transcode-video'), - ; - - /// Instantiate a new enum with the provided value. - const AssetJobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetJobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetJobName? fromJson(dynamic value) => AssetJobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetJobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetJobName] to String, -/// and [decode] dynamic data back to [AssetJobName]. -class AssetJobNameTypeTransformer { - factory AssetJobNameTypeTransformer() => _instance ??= const AssetJobNameTypeTransformer._(); - - const AssetJobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetJobName data) => data._value; - - /// Returns the instance of [AssetJobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetJobName? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetJobName) { - return data; - } - if (data != null) { - switch (data) { - case r'refresh-faces': return AssetJobName.refreshFaces; - case r'refresh-metadata': return AssetJobName.refreshMetadata; - case r'regenerate-thumbnail': return AssetJobName.regenerateThumbnail; - case r'transcode-video': return AssetJobName.transcodeVideo; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_jobs_dto.dart b/mobile/openapi/lib/model/asset_jobs_dto.dart deleted file mode 100644 index 5085e3820c..0000000000 --- a/mobile/openapi/lib/model/asset_jobs_dto.dart +++ /dev/null @@ -1,110 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetJobsDto { - /// Returns a new [AssetJobsDto] instance. - AssetJobsDto({ - this.assetIds = const [], - required this.name, - }); - - /// Asset IDs - List assetIds; - - AssetJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetJobsDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (name.hashCode); - - @override - String toString() => 'AssetJobsDto[assetIds=$assetIds, name=$name]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [AssetJobsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetJobsDto? fromJson(dynamic value) { - upgradeDto(value, "AssetJobsDto"); - if (value is Map) { - final json = value.cast(); - - return AssetJobsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - name: AssetJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetJobsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetJobsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetJobsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetJobsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_response_dto.dart b/mobile/openapi/lib/model/asset_media_response_dto.dart deleted file mode 100644 index 6dc5cd3c92..0000000000 --- a/mobile/openapi/lib/model/asset_media_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMediaResponseDto { - /// Returns a new [AssetMediaResponseDto] instance. - AssetMediaResponseDto({ - required this.id, - required this.status, - }); - - /// Asset media ID - String id; - - AssetMediaStatus status; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMediaResponseDto && - other.id == id && - other.status == status; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (status.hashCode); - - @override - String toString() => 'AssetMediaResponseDto[id=$id, status=$status]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'status'] = this.status; - return json; - } - - /// Returns a new [AssetMediaResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMediaResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMediaResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMediaResponseDto( - id: mapValueOfType(json, r'id')!, - status: AssetMediaStatus.fromJson(json[r'status'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMediaResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMediaResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMediaResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'status', - }; -} - diff --git a/mobile/openapi/lib/model/asset_media_size.dart b/mobile/openapi/lib/model/asset_media_size.dart deleted file mode 100644 index 3c81db4931..0000000000 --- a/mobile/openapi/lib/model/asset_media_size.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset media size -enum AssetMediaSize { - original._(r'original'), - fullsize._(r'fullsize'), - preview._(r'preview'), - thumbnail._(r'thumbnail'), - ; - - /// Instantiate a new enum with the provided value. - const AssetMediaSize._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetMediaSize] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetMediaSize? fromJson(dynamic value) => AssetMediaSizeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetMediaSize] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaSize.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaSize] to String, -/// and [decode] dynamic data back to [AssetMediaSize]. -class AssetMediaSizeTypeTransformer { - factory AssetMediaSizeTypeTransformer() => _instance ??= const AssetMediaSizeTypeTransformer._(); - - const AssetMediaSizeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetMediaSize data) => data._value; - - /// Returns the instance of [AssetMediaSize] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetMediaSize? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetMediaSize) { - return data; - } - if (data != null) { - switch (data) { - case r'original': return AssetMediaSize.original; - case r'fullsize': return AssetMediaSize.fullsize; - case r'preview': return AssetMediaSize.preview; - case r'thumbnail': return AssetMediaSize.thumbnail; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetMediaSizeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_media_status.dart b/mobile/openapi/lib/model/asset_media_status.dart deleted file mode 100644 index b727daad2d..0000000000 --- a/mobile/openapi/lib/model/asset_media_status.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Upload status -enum AssetMediaStatus { - created._(r'created'), - duplicate._(r'duplicate'), - ; - - /// Instantiate a new enum with the provided value. - const AssetMediaStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetMediaStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetMediaStatus? fromJson(dynamic value) => AssetMediaStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetMediaStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMediaStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetMediaStatus] to String, -/// and [decode] dynamic data back to [AssetMediaStatus]. -class AssetMediaStatusTypeTransformer { - factory AssetMediaStatusTypeTransformer() => _instance ??= const AssetMediaStatusTypeTransformer._(); - - const AssetMediaStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetMediaStatus data) => data._value; - - /// Returns the instance of [AssetMediaStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetMediaStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetMediaStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'created': return AssetMediaStatus.created; - case r'duplicate': return AssetMediaStatus.duplicate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetMediaStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart deleted file mode 100644 index 6376ebc531..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkDeleteDto { - /// Returns a new [AssetMetadataBulkDeleteDto] instance. - AssetMetadataBulkDeleteDto({ - this.items = const [], - }); - - /// Metadata items to delete - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteDto( - items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart deleted file mode 100644 index 90417b79e0..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_delete_item_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkDeleteItemDto { - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance. - AssetMetadataBulkDeleteItemDto({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteItemDto && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'AssetMetadataBulkDeleteItemDto[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [AssetMetadataBulkDeleteItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkDeleteItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkDeleteItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkDeleteItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkDeleteItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkDeleteItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart deleted file mode 100644 index 9afb8dda3f..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_response_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkResponseDto { - /// Returns a new [AssetMetadataBulkResponseDto] instance. - AssetMetadataBulkResponseDto({ - required this.assetId, - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkResponseDto && - other.assetId == assetId && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkResponseDto[assetId=$assetId, key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart deleted file mode 100644 index a5e770b02a..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkUpsertDto { - /// Returns a new [AssetMetadataBulkUpsertDto] instance. - AssetMetadataBulkUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertDto( - items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart deleted file mode 100644 index e4eab08bf1..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_bulk_upsert_item_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataBulkUpsertItemDto { - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance. - AssetMetadataBulkUpsertItemDto({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertItemDto && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataBulkUpsertItemDto[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataBulkUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataBulkUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataBulkUpsertItemDto( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataBulkUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataBulkUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataBulkUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_response_dto.dart b/mobile/openapi/lib/model/asset_metadata_response_dto.dart deleted file mode 100644 index 6b6a255ae4..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataResponseDto { - /// Returns a new [AssetMetadataResponseDto] instance. - AssetMetadataResponseDto({ - required this.key, - required this.updatedAt, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Last update date - DateTime updatedAt; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataResponseDto && - other.key == key && - other.updatedAt == updatedAt && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataResponseDto[key=$key, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataResponseDto( - key: mapValueOfType(json, r'key')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart deleted file mode 100644 index b1473d4826..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataUpsertDto { - /// Returns a new [AssetMetadataUpsertDto] instance. - AssetMetadataUpsertDto({ - this.items = const [], - }); - - /// Metadata items to upsert - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertDto && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode); - - @override - String toString() => 'AssetMetadataUpsertDto[items=$items]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [AssetMetadataUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertDto( - items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart b/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart deleted file mode 100644 index 70de1941f3..0000000000 --- a/mobile/openapi/lib/model/asset_metadata_upsert_item_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetMetadataUpsertItemDto { - /// Returns a new [AssetMetadataUpsertItemDto] instance. - AssetMetadataUpsertItemDto({ - required this.key, - this.value = const {}, - }); - - /// Metadata key - String key; - - /// Metadata value (object) - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetMetadataUpsertItemDto && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'AssetMetadataUpsertItemDto[key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [AssetMetadataUpsertItemDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetMetadataUpsertItemDto? fromJson(dynamic value) { - upgradeDto(value, "AssetMetadataUpsertItemDto"); - if (value is Map) { - final json = value.cast(); - - return AssetMetadataUpsertItemDto( - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetMetadataUpsertItemDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetMetadataUpsertItemDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetMetadataUpsertItemDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetMetadataUpsertItemDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/asset_ocr_response_dto.dart b/mobile/openapi/lib/model/asset_ocr_response_dto.dart deleted file mode 100644 index 23c51f054c..0000000000 --- a/mobile/openapi/lib/model/asset_ocr_response_dto.dart +++ /dev/null @@ -1,206 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetOcrResponseDto { - /// Returns a new [AssetOcrResponseDto] instance. - AssetOcrResponseDto({ - required this.assetId, - required this.boxScore, - required this.id, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - String assetId; - - /// Confidence score for text detection box - double boxScore; - - String id; - - /// Recognized text - String text; - - /// Confidence score for text recognition - double textScore; - - /// Normalized x coordinate of box corner 1 (0-1) - double x1; - - /// Normalized x coordinate of box corner 2 (0-1) - double x2; - - /// Normalized x coordinate of box corner 3 (0-1) - double x3; - - /// Normalized x coordinate of box corner 4 (0-1) - double x4; - - /// Normalized y coordinate of box corner 1 (0-1) - double y1; - - /// Normalized y coordinate of box corner 2 (0-1) - double y2; - - /// Normalized y coordinate of box corner 3 (0-1) - double y3; - - /// Normalized y coordinate of box corner 4 (0-1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetOcrResponseDto && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'AssetOcrResponseDto[assetId=$assetId, boxScore=$boxScore, id=$id, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [AssetOcrResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetOcrResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetOcrResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetOcrResponseDto( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOcrResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetOcrResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetOcrResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetOcrResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/asset_order.dart b/mobile/openapi/lib/model/asset_order.dart deleted file mode 100644 index a0d8af0823..0000000000 --- a/mobile/openapi/lib/model/asset_order.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset sort order -enum AssetOrder { - asc._(r'asc'), - desc._(r'desc'), - ; - - /// Instantiate a new enum with the provided value. - const AssetOrder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetOrder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetOrder? fromJson(dynamic value) => AssetOrderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetOrder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOrder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrder] to String, -/// and [decode] dynamic data back to [AssetOrder]. -class AssetOrderTypeTransformer { - factory AssetOrderTypeTransformer() => _instance ??= const AssetOrderTypeTransformer._(); - - const AssetOrderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetOrder data) => data._value; - - /// Returns the instance of [AssetOrder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetOrder? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetOrder) { - return data; - } - if (data != null) { - switch (data) { - case r'asc': return AssetOrder.asc; - case r'desc': return AssetOrder.desc; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetOrderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_order_by.dart b/mobile/openapi/lib/model/asset_order_by.dart deleted file mode 100644 index 4c00003d3e..0000000000 --- a/mobile/openapi/lib/model/asset_order_by.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset sorting property -enum AssetOrderBy { - takenAt._(r'takenAt'), - createdAt._(r'createdAt'), - ; - - /// Instantiate a new enum with the provided value. - const AssetOrderBy._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetOrderBy] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetOrderBy? fromJson(dynamic value) => AssetOrderByTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetOrderBy] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetOrderBy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetOrderBy] to String, -/// and [decode] dynamic data back to [AssetOrderBy]. -class AssetOrderByTypeTransformer { - factory AssetOrderByTypeTransformer() => _instance ??= const AssetOrderByTypeTransformer._(); - - const AssetOrderByTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetOrderBy data) => data._value; - - /// Returns the instance of [AssetOrderBy] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetOrderBy? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetOrderBy) { - return data; - } - if (data != null) { - switch (data) { - case r'takenAt': return AssetOrderBy.takenAt; - case r'createdAt': return AssetOrderBy.createdAt; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetOrderByTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_reject_reason.dart b/mobile/openapi/lib/model/asset_reject_reason.dart deleted file mode 100644 index 885f5b7218..0000000000 --- a/mobile/openapi/lib/model/asset_reject_reason.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Rejection reason if rejected -enum AssetRejectReason { - duplicate._(r'duplicate'), - unsupportedFormat._(r'unsupported-format'), - ; - - /// Instantiate a new enum with the provided value. - const AssetRejectReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetRejectReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetRejectReason? fromJson(dynamic value) => AssetRejectReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetRejectReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetRejectReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetRejectReason] to String, -/// and [decode] dynamic data back to [AssetRejectReason]. -class AssetRejectReasonTypeTransformer { - factory AssetRejectReasonTypeTransformer() => _instance ??= const AssetRejectReasonTypeTransformer._(); - - const AssetRejectReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetRejectReason data) => data._value; - - /// Returns the instance of [AssetRejectReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetRejectReason? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetRejectReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return AssetRejectReason.duplicate; - case r'unsupported-format': return AssetRejectReason.unsupportedFormat; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetRejectReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart deleted file mode 100644 index 3c09de3f15..0000000000 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ /dev/null @@ -1,441 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetResponseDto { - /// Returns a new [AssetResponseDto] instance. - AssetResponseDto({ - required this.checksum, - required this.createdAt, - this.duplicateId = const Optional.absent(), - required this.duration, - this.exifInfo = const Optional.absent(), - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.hasMetadata, - required this.height, - required this.id, - required this.isArchived, - required this.isEdited, - required this.isFavorite, - required this.isOffline, - required this.isTrashed, - this.libraryId = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - required this.localDateTime, - required this.originalFileName, - this.originalMimeType = const Optional.absent(), - required this.originalPath, - this.owner = const Optional.absent(), - required this.ownerId, - this.people = const Optional.present(const []), - this.resized = const Optional.absent(), - this.stack = const Optional.absent(), - this.tags = const Optional.present(const []), - required this.thumbhash, - required this.type, - required this.updatedAt, - required this.visibility, - required this.width, - }); - - /// Base64 encoded SHA1 hash - String checksum; - - /// The UTC timestamp when the asset was originally uploaded to Immich. - DateTime createdAt; - - /// Duplicate group ID - Optional duplicateId; - - /// Video/gif duration in milliseconds (null for static images) - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - int? duration; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional exifInfo; - - /// The actual UTC timestamp when the file was created/captured, preserving timezone information. This is the authoritative timestamp for chronological sorting within timeline groups. Combined with timezone data, this can be used to determine the exact moment the photo was taken. - DateTime fileCreatedAt; - - /// The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken. - DateTime fileModifiedAt; - - /// Whether asset has metadata - bool hasMetadata; - - /// Asset height - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is archived - bool isArchived; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Is offline - bool isOffline; - - /// Is trashed - bool isTrashed; - - /// Library ID - Optional libraryId; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months. - DateTime localDateTime; - - /// Original file name - String originalFileName; - - /// Original MIME type - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalMimeType; - - /// Original file path - String originalPath; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional owner; - - /// Owner user ID - String ownerId; - - Optional?> people; - - /// Is resized - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional resized; - - Optional stack; - - Optional?> tags; - - /// Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting. - String? thumbhash; - - AssetTypeEnum type; - - /// The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified. - DateTime updatedAt; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto && - other.checksum == checksum && - other.createdAt == createdAt && - other.duplicateId == duplicateId && - other.duration == duration && - other.exifInfo == exifInfo && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.hasMetadata == hasMetadata && - other.height == height && - other.id == id && - other.isArchived == isArchived && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.isOffline == isOffline && - other.isTrashed == isTrashed && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.originalMimeType == originalMimeType && - other.originalPath == originalPath && - other.owner == owner && - other.ownerId == ownerId && - _deepEquality.equals(other.people, people) && - other.resized == resized && - other.stack == stack && - _deepEquality.equals(other.tags, tags) && - other.thumbhash == thumbhash && - other.type == type && - other.updatedAt == updatedAt && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt.hashCode) + - (duplicateId == null ? 0 : duplicateId!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (exifInfo == null ? 0 : exifInfo!.hashCode) + - (fileCreatedAt.hashCode) + - (fileModifiedAt.hashCode) + - (hasMetadata.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isArchived.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (isOffline.hashCode) + - (isTrashed.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime.hashCode) + - (originalFileName.hashCode) + - (originalMimeType == null ? 0 : originalMimeType!.hashCode) + - (originalPath.hashCode) + - (owner == null ? 0 : owner!.hashCode) + - (ownerId.hashCode) + - (people.hashCode) + - (resized == null ? 0 : resized!.hashCode) + - (stack == null ? 0 : stack!.hashCode) + - (tags.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, height=$height, id=$id, isArchived=$isArchived, isEdited=$isEdited, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - if (this.duplicateId.isPresent) { - final value = this.duplicateId.value; - json[r'duplicateId'] = value; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.exifInfo.isPresent) { - final value = this.exifInfo.value; - json[r'exifInfo'] = value; - } - json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String(); - json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String(); - json[r'hasMetadata'] = this.hasMetadata; - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isArchived'] = this.isArchived; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - json[r'isOffline'] = this.isOffline; - json[r'isTrashed'] = this.isTrashed; - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String(); - json[r'originalFileName'] = this.originalFileName; - if (this.originalMimeType.isPresent) { - final value = this.originalMimeType.value; - json[r'originalMimeType'] = value; - } - json[r'originalPath'] = this.originalPath; - if (this.owner.isPresent) { - final value = this.owner.value; - json[r'owner'] = value; - } - json[r'ownerId'] = this.ownerId; - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.resized.isPresent) { - final value = this.resized.value; - json[r'resized'] = value; - } - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [AssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetResponseDto( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'')!, - duplicateId: json.containsKey(r'duplicateId') ? Optional.present(mapValueOfType(json, r'duplicateId')) : const Optional.absent(), - duration: mapValueOfType(json, r'duration'), - exifInfo: json.containsKey(r'exifInfo') ? Optional.present(ExifResponseDto.fromJson(json[r'exifInfo'])) : const Optional.absent(), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!, - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!, - hasMetadata: mapValueOfType(json, r'hasMetadata')!, - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isArchived: mapValueOfType(json, r'isArchived')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isOffline: mapValueOfType(json, r'isOffline')!, - isTrashed: mapValueOfType(json, r'isTrashed')!, - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - localDateTime: mapDateTime(json, r'localDateTime', r'')!, - originalFileName: mapValueOfType(json, r'originalFileName')!, - originalMimeType: json.containsKey(r'originalMimeType') ? Optional.present(mapValueOfType(json, r'originalMimeType')) : const Optional.absent(), - originalPath: mapValueOfType(json, r'originalPath')!, - owner: json.containsKey(r'owner') ? Optional.present(UserResponseDto.fromJson(json[r'owner'])) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - people: json.containsKey(r'people') ? Optional.present(PersonResponseDto.listFromJson(json[r'people'])) : const Optional.absent(), - resized: json.containsKey(r'resized') ? Optional.present(mapValueOfType(json, r'resized')) : const Optional.absent(), - stack: json.containsKey(r'stack') ? Optional.present(AssetStackResponseDto.fromJson(json[r'stack'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagResponseDto.listFromJson(json[r'tags'])) : const Optional.absent(), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'hasMetadata', - 'height', - 'id', - 'isArchived', - 'isEdited', - 'isFavorite', - 'isOffline', - 'isTrashed', - 'localDateTime', - 'originalFileName', - 'originalPath', - 'ownerId', - 'thumbhash', - 'type', - 'updatedAt', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stack_response_dto.dart b/mobile/openapi/lib/model/asset_stack_response_dto.dart deleted file mode 100644 index 96fd66a392..0000000000 --- a/mobile/openapi/lib/model/asset_stack_response_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetStackResponseDto { - /// Returns a new [AssetStackResponseDto] instance. - AssetStackResponseDto({ - required this.assetCount, - required this.id, - required this.primaryAssetId, - }); - - /// Number of assets in stack - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStackResponseDto && - other.assetCount == assetCount && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'AssetStackResponseDto[assetCount=$assetCount, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [AssetStackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStackResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/asset_stats_response_dto.dart b/mobile/openapi/lib/model/asset_stats_response_dto.dart deleted file mode 100644 index df2762a2f3..0000000000 --- a/mobile/openapi/lib/model/asset_stats_response_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AssetStatsResponseDto { - /// Returns a new [AssetStatsResponseDto] instance. - AssetStatsResponseDto({ - required this.images, - required this.total, - required this.videos, - }); - - /// Number of images - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int images; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is AssetStatsResponseDto && - other.images == images && - other.total == total && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (images.hashCode) + - (total.hashCode) + - (videos.hashCode); - - @override - String toString() => 'AssetStatsResponseDto[images=$images, total=$total, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'images'] = this.images; - json[r'total'] = this.total; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [AssetStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AssetStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AssetStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AssetStatsResponseDto( - images: mapValueOfType(json, r'images')!, - total: mapValueOfType(json, r'total')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AssetStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AssetStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AssetStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'images', - 'total', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/asset_type_enum.dart b/mobile/openapi/lib/model/asset_type_enum.dart deleted file mode 100644 index 615d7fb692..0000000000 --- a/mobile/openapi/lib/model/asset_type_enum.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset type -enum AssetTypeEnum { - IMAGE._(r'IMAGE'), - VIDEO._(r'VIDEO'), - AUDIO._(r'AUDIO'), - OTHER._(r'OTHER'), - ; - - /// Instantiate a new enum with the provided value. - const AssetTypeEnum._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetTypeEnum] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetTypeEnum] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetTypeEnum.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetTypeEnum] to String, -/// and [decode] dynamic data back to [AssetTypeEnum]. -class AssetTypeEnumTypeTransformer { - factory AssetTypeEnumTypeTransformer() => _instance ??= const AssetTypeEnumTypeTransformer._(); - - const AssetTypeEnumTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetTypeEnum data) => data._value; - - /// Returns the instance of [AssetTypeEnum] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetTypeEnum? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetTypeEnum) { - return data; - } - if (data != null) { - switch (data) { - case r'IMAGE': return AssetTypeEnum.IMAGE; - case r'VIDEO': return AssetTypeEnum.VIDEO; - case r'AUDIO': return AssetTypeEnum.AUDIO; - case r'OTHER': return AssetTypeEnum.OTHER; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetTypeEnumTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_upload_action.dart b/mobile/openapi/lib/model/asset_upload_action.dart deleted file mode 100644 index 806292d31b..0000000000 --- a/mobile/openapi/lib/model/asset_upload_action.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Upload action -enum AssetUploadAction { - accept._(r'accept'), - reject._(r'reject'), - ; - - /// Instantiate a new enum with the provided value. - const AssetUploadAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetUploadAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetUploadAction? fromJson(dynamic value) => AssetUploadActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetUploadAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetUploadAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetUploadAction] to String, -/// and [decode] dynamic data back to [AssetUploadAction]. -class AssetUploadActionTypeTransformer { - factory AssetUploadActionTypeTransformer() => _instance ??= const AssetUploadActionTypeTransformer._(); - - const AssetUploadActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetUploadAction data) => data._value; - - /// Returns the instance of [AssetUploadAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetUploadAction? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetUploadAction) { - return data; - } - if (data != null) { - switch (data) { - case r'accept': return AssetUploadAction.accept; - case r'reject': return AssetUploadAction.reject; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetUploadActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/asset_visibility.dart b/mobile/openapi/lib/model/asset_visibility.dart deleted file mode 100644 index 5ff5e865b8..0000000000 --- a/mobile/openapi/lib/model/asset_visibility.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Asset visibility -enum AssetVisibility { - archive._(r'archive'), - timeline._(r'timeline'), - hidden._(r'hidden'), - locked._(r'locked'), - ; - - /// Instantiate a new enum with the provided value. - const AssetVisibility._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AssetVisibility] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AssetVisibility? fromJson(dynamic value) => AssetVisibilityTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AssetVisibility] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AssetVisibility.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AssetVisibility] to String, -/// and [decode] dynamic data back to [AssetVisibility]. -class AssetVisibilityTypeTransformer { - factory AssetVisibilityTypeTransformer() => _instance ??= const AssetVisibilityTypeTransformer._(); - - const AssetVisibilityTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AssetVisibility data) => data._value; - - /// Returns the instance of [AssetVisibility] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AssetVisibility? decode(dynamic data, {bool allowNull = true}) { - if (data is AssetVisibility) { - return data; - } - if (data != null) { - switch (data) { - case r'archive': return AssetVisibility.archive; - case r'timeline': return AssetVisibility.timeline; - case r'hidden': return AssetVisibility.hidden; - case r'locked': return AssetVisibility.locked; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AssetVisibilityTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/audio_codec.dart b/mobile/openapi/lib/model/audio_codec.dart deleted file mode 100644 index 7860208dcc..0000000000 --- a/mobile/openapi/lib/model/audio_codec.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Target audio codec -enum AudioCodec { - mp3._(r'mp3'), - aac._(r'aac'), - opus._(r'opus'), - pcmS16le._(r'pcm_s16le'), - ; - - /// Instantiate a new enum with the provided value. - const AudioCodec._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [AudioCodec] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static AudioCodec? fromJson(dynamic value) => AudioCodecTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [AudioCodec] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AudioCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [AudioCodec] to String, -/// and [decode] dynamic data back to [AudioCodec]. -class AudioCodecTypeTransformer { - factory AudioCodecTypeTransformer() => _instance ??= const AudioCodecTypeTransformer._(); - - const AudioCodecTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(AudioCodec data) => data._value; - - /// Returns the instance of [AudioCodec] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - AudioCodec? decode(dynamic data, {bool allowNull = true}) { - if (data is AudioCodec) { - return data; - } - if (data != null) { - switch (data) { - case r'mp3': return AudioCodec.mp3; - case r'aac': return AudioCodec.aac; - case r'opus': return AudioCodec.opus; - case r'pcm_s16le': return AudioCodec.pcmS16le; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static AudioCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/auth_status_response_dto.dart b/mobile/openapi/lib/model/auth_status_response_dto.dart deleted file mode 100644 index f0dc61215e..0000000000 --- a/mobile/openapi/lib/model/auth_status_response_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AuthStatusResponseDto { - /// Returns a new [AuthStatusResponseDto] instance. - AuthStatusResponseDto({ - this.expiresAt = const Optional.absent(), - required this.isElevated, - required this.password, - required this.pinCode, - this.pinExpiresAt = const Optional.absent(), - }); - - /// Session expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Is elevated session - bool isElevated; - - /// Has password set - bool password; - - /// Has PIN code set - bool pinCode; - - /// PIN expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinExpiresAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is AuthStatusResponseDto && - other.expiresAt == expiresAt && - other.isElevated == isElevated && - other.password == password && - other.pinCode == pinCode && - other.pinExpiresAt == pinExpiresAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (isElevated.hashCode) + - (password.hashCode) + - (pinCode.hashCode) + - (pinExpiresAt == null ? 0 : pinExpiresAt!.hashCode); - - @override - String toString() => 'AuthStatusResponseDto[expiresAt=$expiresAt, isElevated=$isElevated, password=$password, pinCode=$pinCode, pinExpiresAt=$pinExpiresAt]'; - - Map toJson() { - final json = {}; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'isElevated'] = this.isElevated; - json[r'password'] = this.password; - json[r'pinCode'] = this.pinCode; - if (this.pinExpiresAt.isPresent) { - final value = this.pinExpiresAt.value; - json[r'pinExpiresAt'] = value; - } - return json; - } - - /// Returns a new [AuthStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AuthStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "AuthStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return AuthStatusResponseDto( - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - isElevated: mapValueOfType(json, r'isElevated')!, - password: mapValueOfType(json, r'password')!, - pinCode: mapValueOfType(json, r'pinCode')!, - pinExpiresAt: json.containsKey(r'pinExpiresAt') ? Optional.present(mapValueOfType(json, r'pinExpiresAt')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AuthStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AuthStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AuthStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AuthStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isElevated', - 'password', - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/avatar_update.dart b/mobile/openapi/lib/model/avatar_update.dart deleted file mode 100644 index 1075f0df46..0000000000 --- a/mobile/openapi/lib/model/avatar_update.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class AvatarUpdate { - /// Returns a new [AvatarUpdate] instance. - AvatarUpdate({ - this.color = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is AvatarUpdate && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'AvatarUpdate[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [AvatarUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static AvatarUpdate? fromJson(dynamic value) { - upgradeDto(value, "AvatarUpdate"); - if (value is Map) { - final json = value.cast(); - - return AvatarUpdate( - color: json.containsKey(r'color') ? Optional.present(UserAvatarColor.fromJson(json[r'color'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = AvatarUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = AvatarUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of AvatarUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = AvatarUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/bulk_id_error_reason.dart b/mobile/openapi/lib/model/bulk_id_error_reason.dart deleted file mode 100644 index 81d040316b..0000000000 --- a/mobile/openapi/lib/model/bulk_id_error_reason.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Error reason -enum BulkIdErrorReason { - duplicate._(r'duplicate'), - noPermission._(r'no_permission'), - notFound._(r'not_found'), - unknown._(r'unknown'), - validation._(r'validation'), - ; - - /// Instantiate a new enum with the provided value. - const BulkIdErrorReason._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [BulkIdErrorReason] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [BulkIdErrorReason] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdErrorReason.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [BulkIdErrorReason] to String, -/// and [decode] dynamic data back to [BulkIdErrorReason]. -class BulkIdErrorReasonTypeTransformer { - factory BulkIdErrorReasonTypeTransformer() => _instance ??= const BulkIdErrorReasonTypeTransformer._(); - - const BulkIdErrorReasonTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(BulkIdErrorReason data) => data._value; - - /// Returns the instance of [BulkIdErrorReason] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - BulkIdErrorReason? decode(dynamic data, {bool allowNull = true}) { - if (data is BulkIdErrorReason) { - return data; - } - if (data != null) { - switch (data) { - case r'duplicate': return BulkIdErrorReason.duplicate; - case r'no_permission': return BulkIdErrorReason.noPermission; - case r'not_found': return BulkIdErrorReason.notFound; - case r'unknown': return BulkIdErrorReason.unknown; - case r'validation': return BulkIdErrorReason.validation; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static BulkIdErrorReasonTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/bulk_id_response_dto.dart b/mobile/openapi/lib/model/bulk_id_response_dto.dart deleted file mode 100644 index 301400fa5e..0000000000 --- a/mobile/openapi/lib/model/bulk_id_response_dto.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class BulkIdResponseDto { - /// Returns a new [BulkIdResponseDto] instance. - BulkIdResponseDto({ - this.error = const Optional.absent(), - this.errorMessage = const Optional.absent(), - required this.id, - required this.success, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional errorMessage; - - /// ID - String id; - - /// Whether operation succeeded - bool success; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdResponseDto && - other.error == error && - other.errorMessage == errorMessage && - other.id == id && - other.success == success; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (error == null ? 0 : error!.hashCode) + - (errorMessage == null ? 0 : errorMessage!.hashCode) + - (id.hashCode) + - (success.hashCode); - - @override - String toString() => 'BulkIdResponseDto[error=$error, errorMessage=$errorMessage, id=$id, success=$success]'; - - Map toJson() { - final json = {}; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.errorMessage.isPresent) { - final value = this.errorMessage.value; - json[r'errorMessage'] = value; - } - json[r'id'] = this.id; - json[r'success'] = this.success; - return json; - } - - /// Returns a new [BulkIdResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdResponseDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdResponseDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdResponseDto( - error: json.containsKey(r'error') ? Optional.present(BulkIdErrorReason.fromJson(json[r'error'])) : const Optional.absent(), - errorMessage: json.containsKey(r'errorMessage') ? Optional.present(mapValueOfType(json, r'errorMessage')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - success: mapValueOfType(json, r'success')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'success', - }; -} - diff --git a/mobile/openapi/lib/model/bulk_ids_dto.dart b/mobile/openapi/lib/model/bulk_ids_dto.dart deleted file mode 100644 index 7e7864a285..0000000000 --- a/mobile/openapi/lib/model/bulk_ids_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class BulkIdsDto { - /// Returns a new [BulkIdsDto] instance. - BulkIdsDto({ - this.ids = const [], - }); - - /// IDs to process - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is BulkIdsDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'BulkIdsDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [BulkIdsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static BulkIdsDto? fromJson(dynamic value) { - upgradeDto(value, "BulkIdsDto"); - if (value is Map) { - final json = value.cast(); - - return BulkIdsDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = BulkIdsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = BulkIdsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of BulkIdsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = BulkIdsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart deleted file mode 100644 index 2da9c411d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CalendarHeatmapResponseDto { - /// Returns a new [CalendarHeatmapResponseDto] instance. - CalendarHeatmapResponseDto({ - required this.from, - this.series = const [], - required this.to, - required this.totalCount, - }); - - /// Start date in UTC - String from; - - List series; - - /// End date in UTC - String to; - - /// Total activity count over the period - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int totalCount; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDto && - other.from == from && - _deepEquality.equals(other.series, series) && - other.to == to && - other.totalCount == totalCount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (from.hashCode) + - (series.hashCode) + - (to.hashCode) + - (totalCount.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDto[from=$from, series=$series, to=$to, totalCount=$totalCount]'; - - Map toJson() { - final json = {}; - json[r'from'] = this.from; - json[r'series'] = this.series; - json[r'to'] = this.to; - json[r'totalCount'] = this.totalCount; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDto( - from: mapValueOfType(json, r'from')!, - series: CalendarHeatmapResponseDtoSeriesInner.listFromJson(json[r'series']), - to: mapValueOfType(json, r'to')!, - totalCount: mapValueOfType(json, r'totalCount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'from', - 'series', - 'to', - 'totalCount', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart b/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart deleted file mode 100644 index d1bdd467d4..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_response_dto_series_inner.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CalendarHeatmapResponseDtoSeriesInner { - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance. - CalendarHeatmapResponseDtoSeriesInner({ - required this.count, - required this.date, - }); - - /// Activity count - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Date in UTC - String date; - - @override - bool operator ==(Object other) => identical(this, other) || other is CalendarHeatmapResponseDtoSeriesInner && - other.count == count && - other.date == date; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (date.hashCode); - - @override - String toString() => 'CalendarHeatmapResponseDtoSeriesInner[count=$count, date=$date]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'date'] = this.date; - return json; - } - - /// Returns a new [CalendarHeatmapResponseDtoSeriesInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CalendarHeatmapResponseDtoSeriesInner? fromJson(dynamic value) { - upgradeDto(value, "CalendarHeatmapResponseDtoSeriesInner"); - if (value is Map) { - final json = value.cast(); - - return CalendarHeatmapResponseDtoSeriesInner( - count: mapValueOfType(json, r'count')!, - date: mapValueOfType(json, r'date')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CalendarHeatmapResponseDtoSeriesInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CalendarHeatmapResponseDtoSeriesInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CalendarHeatmapResponseDtoSeriesInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'date', - }; -} - diff --git a/mobile/openapi/lib/model/calendar_heatmap_type.dart b/mobile/openapi/lib/model/calendar_heatmap_type.dart deleted file mode 100644 index d34bc8d699..0000000000 --- a/mobile/openapi/lib/model/calendar_heatmap_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Type of calendar heatmap -enum CalendarHeatmapType { - upload._(r'Upload'), - taken._(r'Taken'), - ; - - /// Instantiate a new enum with the provided value. - const CalendarHeatmapType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [CalendarHeatmapType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static CalendarHeatmapType? fromJson(dynamic value) => CalendarHeatmapTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [CalendarHeatmapType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CalendarHeatmapType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CalendarHeatmapType] to String, -/// and [decode] dynamic data back to [CalendarHeatmapType]. -class CalendarHeatmapTypeTypeTransformer { - factory CalendarHeatmapTypeTypeTransformer() => _instance ??= const CalendarHeatmapTypeTypeTransformer._(); - - const CalendarHeatmapTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(CalendarHeatmapType data) => data._value; - - /// Returns the instance of [CalendarHeatmapType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - CalendarHeatmapType? decode(dynamic data, {bool allowNull = true}) { - if (data is CalendarHeatmapType) { - return data; - } - if (data != null) { - switch (data) { - case r'Upload': return CalendarHeatmapType.upload; - case r'Taken': return CalendarHeatmapType.taken; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static CalendarHeatmapTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/cast_response.dart b/mobile/openapi/lib/model/cast_response.dart deleted file mode 100644 index 796138b0bf..0000000000 --- a/mobile/openapi/lib/model/cast_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CastResponse { - /// Returns a new [CastResponse] instance. - CastResponse({ - required this.gCastEnabled, - }); - - /// Whether Google Cast is enabled - bool gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastResponse && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled.hashCode); - - @override - String toString() => 'CastResponse[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - json[r'gCastEnabled'] = this.gCastEnabled; - return json; - } - - /// Returns a new [CastResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastResponse? fromJson(dynamic value) { - upgradeDto(value, "CastResponse"); - if (value is Map) { - final json = value.cast(); - - return CastResponse( - gCastEnabled: mapValueOfType(json, r'gCastEnabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'gCastEnabled', - }; -} - diff --git a/mobile/openapi/lib/model/cast_update.dart b/mobile/openapi/lib/model/cast_update.dart deleted file mode 100644 index f9eb5be382..0000000000 --- a/mobile/openapi/lib/model/cast_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CastUpdate { - /// Returns a new [CastUpdate] instance. - CastUpdate({ - this.gCastEnabled = const Optional.absent(), - }); - - /// Whether Google Cast is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional gCastEnabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is CastUpdate && - other.gCastEnabled == gCastEnabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (gCastEnabled == null ? 0 : gCastEnabled!.hashCode); - - @override - String toString() => 'CastUpdate[gCastEnabled=$gCastEnabled]'; - - Map toJson() { - final json = {}; - if (this.gCastEnabled.isPresent) { - final value = this.gCastEnabled.value; - json[r'gCastEnabled'] = value; - } - return json; - } - - /// Returns a new [CastUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CastUpdate? fromJson(dynamic value) { - upgradeDto(value, "CastUpdate"); - if (value is Map) { - final json = value.cast(); - - return CastUpdate( - gCastEnabled: json.containsKey(r'gCastEnabled') ? Optional.present(mapValueOfType(json, r'gCastEnabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CastUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CastUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CastUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CastUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart deleted file mode 100644 index 369e960dac..0000000000 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ChangePasswordDto { - /// Returns a new [ChangePasswordDto] instance. - ChangePasswordDto({ - this.invalidateSessions = const Optional.present(false), - required this.newPassword, - required this.password, - }); - - /// Invalidate all other sessions - Optional invalidateSessions; - - /// New password (min 8 characters) - String newPassword; - - /// Current password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is ChangePasswordDto && - other.invalidateSessions == invalidateSessions && - other.newPassword == newPassword && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (invalidateSessions.hashCode) + - (newPassword.hashCode) + - (password.hashCode); - - @override - String toString() => 'ChangePasswordDto[invalidateSessions=$invalidateSessions, newPassword=$newPassword, password=$password]'; - - Map toJson() { - final json = {}; - if (this.invalidateSessions.isPresent) { - final value = this.invalidateSessions.value; - json[r'invalidateSessions'] = value; - } - json[r'newPassword'] = this.newPassword; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [ChangePasswordDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ChangePasswordDto? fromJson(dynamic value) { - upgradeDto(value, "ChangePasswordDto"); - if (value is Map) { - final json = value.cast(); - - return ChangePasswordDto( - invalidateSessions: json.containsKey(r'invalidateSessions') ? Optional.present(mapValueOfType(json, r'invalidateSessions')) : const Optional.absent(), - newPassword: mapValueOfType(json, r'newPassword')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ChangePasswordDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ChangePasswordDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ChangePasswordDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ChangePasswordDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPassword', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/clip_config.dart b/mobile/openapi/lib/model/clip_config.dart deleted file mode 100644 index 915e4975ed..0000000000 --- a/mobile/openapi/lib/model/clip_config.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CLIPConfig { - /// Returns a new [CLIPConfig] instance. - CLIPConfig({ - required this.enabled, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is CLIPConfig && - other.enabled == enabled && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'CLIPConfig[enabled=$enabled, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [CLIPConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CLIPConfig? fromJson(dynamic value) { - upgradeDto(value, "CLIPConfig"); - if (value is Map) { - final json = value.cast(); - - return CLIPConfig( - enabled: mapValueOfType(json, r'enabled')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CLIPConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CLIPConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CLIPConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CLIPConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/colorspace.dart b/mobile/openapi/lib/model/colorspace.dart deleted file mode 100644 index c97da27dda..0000000000 --- a/mobile/openapi/lib/model/colorspace.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Colorspace -enum Colorspace { - srgb._(r'srgb'), - p3._(r'p3'), - ; - - /// Instantiate a new enum with the provided value. - const Colorspace._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [Colorspace] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static Colorspace? fromJson(dynamic value) => ColorspaceTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [Colorspace] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = Colorspace.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Colorspace] to String, -/// and [decode] dynamic data back to [Colorspace]. -class ColorspaceTypeTransformer { - factory ColorspaceTypeTransformer() => _instance ??= const ColorspaceTypeTransformer._(); - - const ColorspaceTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(Colorspace data) => data._value; - - /// Returns the instance of [Colorspace] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - Colorspace? decode(dynamic data, {bool allowNull = true}) { - if (data is Colorspace) { - return data; - } - if (data != null) { - switch (data) { - case r'srgb': return Colorspace.srgb; - case r'p3': return Colorspace.p3; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ColorspaceTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/contributor_count_response_dto.dart b/mobile/openapi/lib/model/contributor_count_response_dto.dart deleted file mode 100644 index af5b2cbf68..0000000000 --- a/mobile/openapi/lib/model/contributor_count_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ContributorCountResponseDto { - /// Returns a new [ContributorCountResponseDto] instance. - ContributorCountResponseDto({ - required this.assetCount, - required this.userId, - }); - - /// Number of assets contributed - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int assetCount; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is ContributorCountResponseDto && - other.assetCount == assetCount && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (userId.hashCode); - - @override - String toString() => 'ContributorCountResponseDto[assetCount=$assetCount, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [ContributorCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ContributorCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ContributorCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ContributorCountResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ContributorCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ContributorCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ContributorCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ContributorCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/cq_mode.dart b/mobile/openapi/lib/model/cq_mode.dart deleted file mode 100644 index 906657aced..0000000000 --- a/mobile/openapi/lib/model/cq_mode.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// CQ mode -enum CQMode { - auto._(r'auto'), - cqp._(r'cqp'), - icq._(r'icq'), - ; - - /// Instantiate a new enum with the provided value. - const CQMode._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [CQMode] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static CQMode? fromJson(dynamic value) => CQModeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [CQMode] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CQMode.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [CQMode] to String, -/// and [decode] dynamic data back to [CQMode]. -class CQModeTypeTransformer { - factory CQModeTypeTransformer() => _instance ??= const CQModeTypeTransformer._(); - - const CQModeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(CQMode data) => data._value; - - /// Returns the instance of [CQMode] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - CQMode? decode(dynamic data, {bool allowNull = true}) { - if (data is CQMode) { - return data; - } - if (data != null) { - switch (data) { - case r'auto': return CQMode.auto; - case r'cqp': return CQMode.cqp; - case r'icq': return CQMode.icq; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static CQModeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart deleted file mode 100644 index a028146964..0000000000 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ /dev/null @@ -1,141 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateAlbumDto { - /// Returns a new [CreateAlbumDto] instance. - CreateAlbumDto({ - required this.albumName, - this.albumUsers = const Optional.present(const []), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - }); - - /// Album name - String albumName; - - /// Album users - Optional?> albumUsers; - - /// Initial asset IDs - Optional?> assetIds; - - /// Album description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto && - other.albumName == albumName && - _deepEquality.equals(other.albumUsers, albumUsers) && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName.hashCode) + - (albumUsers.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode); - - @override - String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]'; - - Map toJson() { - final json = {}; - json[r'albumName'] = this.albumName; - if (this.albumUsers.isPresent) { - final value = this.albumUsers.value; - json[r'albumUsers'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - return json; - } - - /// Returns a new [CreateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "CreateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return CreateAlbumDto( - albumName: mapValueOfType(json, r'albumName')!, - albumUsers: json.containsKey(r'albumUsers') ? Optional.present(AlbumUserCreateDto.listFromJson(json[r'albumUsers'])) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumName', - }; -} - diff --git a/mobile/openapi/lib/model/create_library_dto.dart b/mobile/openapi/lib/model/create_library_dto.dart deleted file mode 100644 index 61eb9867b8..0000000000 --- a/mobile/openapi/lib/model/create_library_dto.dart +++ /dev/null @@ -1,143 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateLibraryDto { - /// Returns a new [CreateLibraryDto] instance. - CreateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - required this.ownerId, - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// Owner user ID - String ownerId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode) + - (ownerId.hashCode); - - @override - String toString() => 'CreateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name, ownerId=$ownerId]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - json[r'ownerId'] = this.ownerId; - return json; - } - - /// Returns a new [CreateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "CreateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return CreateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ownerId: mapValueOfType(json, r'ownerId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ownerId', - }; -} - diff --git a/mobile/openapi/lib/model/create_profile_image_response_dto.dart b/mobile/openapi/lib/model/create_profile_image_response_dto.dart deleted file mode 100644 index 68700400e4..0000000000 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CreateProfileImageResponseDto { - /// Returns a new [CreateProfileImageResponseDto] instance. - CreateProfileImageResponseDto({ - required this.profileChangedAt, - required this.profileImagePath, - required this.userId, - }); - - /// Profile image change date - DateTime profileChangedAt; - - /// Profile image file path - String profileImagePath; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is CreateProfileImageResponseDto && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (userId.hashCode); - - @override - String toString() => 'CreateProfileImageResponseDto[profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [CreateProfileImageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CreateProfileImageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "CreateProfileImageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return CreateProfileImageResponseDto( - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CreateProfileImageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CreateProfileImageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CreateProfileImageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'profileChangedAt', - 'profileImagePath', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/crop_parameters.dart b/mobile/openapi/lib/model/crop_parameters.dart deleted file mode 100644 index d19c23562b..0000000000 --- a/mobile/openapi/lib/model/crop_parameters.dart +++ /dev/null @@ -1,139 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class CropParameters { - /// Returns a new [CropParameters] instance. - CropParameters({ - required this.height, - required this.width, - required this.x, - required this.y, - }); - - /// Height of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int height; - - /// Width of the crop - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int width; - - /// Top-Left X coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int x; - - /// Top-Left Y coordinate of crop - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int y; - - @override - bool operator ==(Object other) => identical(this, other) || other is CropParameters && - other.height == height && - other.width == width && - other.x == x && - other.y == y; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (height.hashCode) + - (width.hashCode) + - (x.hashCode) + - (y.hashCode); - - @override - String toString() => 'CropParameters[height=$height, width=$width, x=$x, y=$y]'; - - Map toJson() { - final json = {}; - json[r'height'] = this.height; - json[r'width'] = this.width; - json[r'x'] = this.x; - json[r'y'] = this.y; - return json; - } - - /// Returns a new [CropParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static CropParameters? fromJson(dynamic value) { - upgradeDto(value, "CropParameters"); - if (value is Map) { - final json = value.cast(); - - return CropParameters( - height: mapValueOfType(json, r'height')!, - width: mapValueOfType(json, r'width')!, - x: mapValueOfType(json, r'x')!, - y: mapValueOfType(json, r'y')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = CropParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = CropParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of CropParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = CropParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'height', - 'width', - 'x', - 'y', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_config.dart b/mobile/openapi/lib/model/database_backup_config.dart deleted file mode 100644 index 4beb32849e..0000000000 --- a/mobile/openapi/lib/model/database_backup_config.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupConfig { - /// Returns a new [DatabaseBackupConfig] instance. - DatabaseBackupConfig({ - required this.cronExpression, - required this.enabled, - required this.keepLastAmount, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - /// Keep last amount - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int keepLastAmount; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupConfig && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.keepLastAmount == keepLastAmount; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (keepLastAmount.hashCode); - - @override - String toString() => 'DatabaseBackupConfig[cronExpression=$cronExpression, enabled=$enabled, keepLastAmount=$keepLastAmount]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'keepLastAmount'] = this.keepLastAmount; - return json; - } - - /// Returns a new [DatabaseBackupConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupConfig? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupConfig"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupConfig( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - keepLastAmount: mapValueOfType(json, r'keepLastAmount')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'keepLastAmount', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_delete_dto.dart b/mobile/openapi/lib/model/database_backup_delete_dto.dart deleted file mode 100644 index c336270b84..0000000000 --- a/mobile/openapi/lib/model/database_backup_delete_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupDeleteDto { - /// Returns a new [DatabaseBackupDeleteDto] instance. - DatabaseBackupDeleteDto({ - this.backups = const [], - }); - - /// Backup filenames to delete - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDeleteDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupDeleteDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDeleteDto( - backups: json[r'backups'] is Iterable - ? (json[r'backups'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_dto.dart b/mobile/openapi/lib/model/database_backup_dto.dart deleted file mode 100644 index 5a2590da40..0000000000 --- a/mobile/openapi/lib/model/database_backup_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupDto { - /// Returns a new [DatabaseBackupDto] instance. - DatabaseBackupDto({ - required this.filename, - required this.filesize, - required this.timezone, - }); - - /// Backup filename - String filename; - - /// Backup file size - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int filesize; - - /// Backup timezone - String timezone; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDto && - other.filename == filename && - other.filesize == filesize && - other.timezone == timezone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (filename.hashCode) + - (filesize.hashCode) + - (timezone.hashCode); - - @override - String toString() => 'DatabaseBackupDto[filename=$filename, filesize=$filesize, timezone=$timezone]'; - - Map toJson() { - final json = {}; - json[r'filename'] = this.filename; - json[r'filesize'] = this.filesize; - json[r'timezone'] = this.timezone; - return json; - } - - /// Returns a new [DatabaseBackupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupDto( - filename: mapValueOfType(json, r'filename')!, - filesize: mapValueOfType(json, r'filesize')!, - timezone: mapValueOfType(json, r'timezone')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'filename', - 'filesize', - 'timezone', - }; -} - diff --git a/mobile/openapi/lib/model/database_backup_list_response_dto.dart b/mobile/openapi/lib/model/database_backup_list_response_dto.dart deleted file mode 100644 index de7bf78d5a..0000000000 --- a/mobile/openapi/lib/model/database_backup_list_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DatabaseBackupListResponseDto { - /// Returns a new [DatabaseBackupListResponseDto] instance. - DatabaseBackupListResponseDto({ - this.backups = const [], - }); - - /// List of backups - List backups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupListResponseDto && - _deepEquality.equals(other.backups, backups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backups.hashCode); - - @override - String toString() => 'DatabaseBackupListResponseDto[backups=$backups]'; - - Map toJson() { - final json = {}; - json[r'backups'] = this.backups; - return json; - } - - /// Returns a new [DatabaseBackupListResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DatabaseBackupListResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DatabaseBackupListResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DatabaseBackupListResponseDto( - backups: DatabaseBackupDto.listFromJson(json[r'backups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DatabaseBackupListResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DatabaseBackupListResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DatabaseBackupListResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DatabaseBackupListResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backups', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_dto.dart b/mobile/openapi/lib/model/download_archive_dto.dart deleted file mode 100644 index f89ac8c867..0000000000 --- a/mobile/openapi/lib/model/download_archive_dto.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadArchiveDto { - /// Returns a new [DownloadArchiveDto] instance. - DownloadArchiveDto({ - this.assetIds = const [], - this.edited = const Optional.absent(), - }); - - /// Asset IDs - List assetIds; - - /// Download edited asset if available - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional edited; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.edited == edited; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (edited == null ? 0 : edited!.hashCode); - - @override - String toString() => 'DownloadArchiveDto[assetIds=$assetIds, edited=$edited]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - if (this.edited.isPresent) { - final value = this.edited.value; - json[r'edited'] = value; - } - return json; - } - - /// Returns a new [DownloadArchiveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - edited: json.containsKey(r'edited') ? Optional.present(mapValueOfType(json, r'edited')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/download_archive_info.dart b/mobile/openapi/lib/model/download_archive_info.dart deleted file mode 100644 index dcb1258457..0000000000 --- a/mobile/openapi/lib/model/download_archive_info.dart +++ /dev/null @@ -1,114 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadArchiveInfo { - /// Returns a new [DownloadArchiveInfo] instance. - DownloadArchiveInfo({ - this.assetIds = const [], - required this.size, - }); - - /// Asset IDs in this archive - List assetIds; - - /// Archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveInfo && - _deepEquality.equals(other.assetIds, assetIds) && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (size.hashCode); - - @override - String toString() => 'DownloadArchiveInfo[assetIds=$assetIds, size=$size]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [DownloadArchiveInfo] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadArchiveInfo? fromJson(dynamic value) { - upgradeDto(value, "DownloadArchiveInfo"); - if (value is Map) { - final json = value.cast(); - - return DownloadArchiveInfo( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadArchiveInfo.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadArchiveInfo.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadArchiveInfo-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadArchiveInfo.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/download_info_dto.dart b/mobile/openapi/lib/model/download_info_dto.dart deleted file mode 100644 index 47e09de05a..0000000000 --- a/mobile/openapi/lib/model/download_info_dto.dart +++ /dev/null @@ -1,158 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadInfoDto { - /// Returns a new [DownloadInfoDto] instance. - DownloadInfoDto({ - this.albumId = const Optional.absent(), - this.archiveSize = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.userId = const Optional.absent(), - }); - - /// Album ID to download - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumId; - - /// Archive size limit in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional archiveSize; - - /// Asset IDs to download - Optional?> assetIds; - - /// User ID to download assets from - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadInfoDto && - other.albumId == albumId && - other.archiveSize == archiveSize && - _deepEquality.equals(other.assetIds, assetIds) && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (assetIds.hashCode) + - (userId == null ? 0 : userId!.hashCode); - - @override - String toString() => 'DownloadInfoDto[albumId=$albumId, archiveSize=$archiveSize, assetIds=$assetIds, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.userId.isPresent) { - final value = this.userId.value; - json[r'userId'] = value; - } - return json; - } - - /// Returns a new [DownloadInfoDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadInfoDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadInfoDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadInfoDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - userId: json.containsKey(r'userId') ? Optional.present(mapValueOfType(json, r'userId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadInfoDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadInfoDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadInfoDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadInfoDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/download_response.dart b/mobile/openapi/lib/model/download_response.dart deleted file mode 100644 index bc1d7b4047..0000000000 --- a/mobile/openapi/lib/model/download_response.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadResponse { - /// Returns a new [DownloadResponse] instance. - DownloadResponse({ - required this.archiveSize, - required this.includeEmbeddedVideos, - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int archiveSize; - - /// Whether to include embedded videos in downloads - bool includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponse && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize.hashCode) + - (includeEmbeddedVideos.hashCode); - - @override - String toString() => 'DownloadResponse[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - json[r'archiveSize'] = this.archiveSize; - json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos; - return json; - } - - /// Returns a new [DownloadResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponse? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponse"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponse( - archiveSize: mapValueOfType(json, r'archiveSize')!, - includeEmbeddedVideos: mapValueOfType(json, r'includeEmbeddedVideos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archiveSize', - 'includeEmbeddedVideos', - }; -} - diff --git a/mobile/openapi/lib/model/download_response_dto.dart b/mobile/openapi/lib/model/download_response_dto.dart deleted file mode 100644 index bfe32307fa..0000000000 --- a/mobile/openapi/lib/model/download_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadResponseDto { - /// Returns a new [DownloadResponseDto] instance. - DownloadResponseDto({ - this.archives = const [], - required this.totalSize, - }); - - /// Archive information - List archives; - - /// Total size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int totalSize; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadResponseDto && - _deepEquality.equals(other.archives, archives) && - other.totalSize == totalSize; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archives.hashCode) + - (totalSize.hashCode); - - @override - String toString() => 'DownloadResponseDto[archives=$archives, totalSize=$totalSize]'; - - Map toJson() { - final json = {}; - json[r'archives'] = this.archives; - json[r'totalSize'] = this.totalSize; - return json; - } - - /// Returns a new [DownloadResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DownloadResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DownloadResponseDto( - archives: DownloadArchiveInfo.listFromJson(json[r'archives']), - totalSize: mapValueOfType(json, r'totalSize')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'archives', - 'totalSize', - }; -} - diff --git a/mobile/openapi/lib/model/download_update.dart b/mobile/openapi/lib/model/download_update.dart deleted file mode 100644 index 08369ef0fb..0000000000 --- a/mobile/openapi/lib/model/download_update.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DownloadUpdate { - /// Returns a new [DownloadUpdate] instance. - DownloadUpdate({ - this.archiveSize = const Optional.absent(), - this.includeEmbeddedVideos = const Optional.absent(), - }); - - /// Maximum archive size in bytes - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional archiveSize; - - /// Whether to include embedded videos in downloads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional includeEmbeddedVideos; - - @override - bool operator ==(Object other) => identical(this, other) || other is DownloadUpdate && - other.archiveSize == archiveSize && - other.includeEmbeddedVideos == includeEmbeddedVideos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (archiveSize == null ? 0 : archiveSize!.hashCode) + - (includeEmbeddedVideos == null ? 0 : includeEmbeddedVideos!.hashCode); - - @override - String toString() => 'DownloadUpdate[archiveSize=$archiveSize, includeEmbeddedVideos=$includeEmbeddedVideos]'; - - Map toJson() { - final json = {}; - if (this.archiveSize.isPresent) { - final value = this.archiveSize.value; - json[r'archiveSize'] = value; - } - if (this.includeEmbeddedVideos.isPresent) { - final value = this.includeEmbeddedVideos.value; - json[r'includeEmbeddedVideos'] = value; - } - return json; - } - - /// Returns a new [DownloadUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DownloadUpdate? fromJson(dynamic value) { - upgradeDto(value, "DownloadUpdate"); - if (value is Map) { - final json = value.cast(); - - return DownloadUpdate( - archiveSize: json.containsKey(r'archiveSize') ? Optional.present(json[r'archiveSize'] == null ? null : int.parse('${json[r'archiveSize']}')) : const Optional.absent(), - includeEmbeddedVideos: json.containsKey(r'includeEmbeddedVideos') ? Optional.present(mapValueOfType(json, r'includeEmbeddedVideos')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DownloadUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DownloadUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DownloadUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DownloadUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_detection_config.dart b/mobile/openapi/lib/model/duplicate_detection_config.dart deleted file mode 100644 index d0f016a4f3..0000000000 --- a/mobile/openapi/lib/model/duplicate_detection_config.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateDetectionConfig { - /// Returns a new [DuplicateDetectionConfig] instance. - DuplicateDetectionConfig({ - required this.enabled, - required this.maxDistance, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for duplicate detection - /// - /// Minimum value: 0.001 - /// Maximum value: 0.1 - double maxDistance; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateDetectionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode); - - @override - String toString() => 'DuplicateDetectionConfig[enabled=$enabled, maxDistance=$maxDistance]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - return json; - } - - /// Returns a new [DuplicateDetectionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateDetectionConfig? fromJson(dynamic value) { - upgradeDto(value, "DuplicateDetectionConfig"); - if (value is Map) { - final json = value.cast(); - - return DuplicateDetectionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateDetectionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateDetectionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateDetectionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateDetectionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_dto.dart deleted file mode 100644 index 3466d3a620..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResolveDto { - /// Returns a new [DuplicateResolveDto] instance. - DuplicateResolveDto({ - this.groups = const [], - }); - - /// List of duplicate groups to resolve - List groups; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveDto && - _deepEquality.equals(other.groups, groups); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (groups.hashCode); - - @override - String toString() => 'DuplicateResolveDto[groups=$groups]'; - - Map toJson() { - final json = {}; - json[r'groups'] = this.groups; - return json; - } - - /// Returns a new [DuplicateResolveDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveDto( - groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'groups', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart b/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart deleted file mode 100644 index 94ca53eb7d..0000000000 --- a/mobile/openapi/lib/model/duplicate_resolve_group_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResolveGroupDto { - /// Returns a new [DuplicateResolveGroupDto] instance. - DuplicateResolveGroupDto({ - required this.duplicateId, - this.keepAssetIds = const [], - this.trashAssetIds = const [], - }); - - String duplicateId; - - /// Asset IDs to keep - List keepAssetIds; - - /// Asset IDs to trash or delete - List trashAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveGroupDto && - other.duplicateId == duplicateId && - _deepEquality.equals(other.keepAssetIds, keepAssetIds) && - _deepEquality.equals(other.trashAssetIds, trashAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duplicateId.hashCode) + - (keepAssetIds.hashCode) + - (trashAssetIds.hashCode); - - @override - String toString() => 'DuplicateResolveGroupDto[duplicateId=$duplicateId, keepAssetIds=$keepAssetIds, trashAssetIds=$trashAssetIds]'; - - Map toJson() { - final json = {}; - json[r'duplicateId'] = this.duplicateId; - json[r'keepAssetIds'] = this.keepAssetIds; - json[r'trashAssetIds'] = this.trashAssetIds; - return json; - } - - /// Returns a new [DuplicateResolveGroupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResolveGroupDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResolveGroupDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResolveGroupDto( - duplicateId: mapValueOfType(json, r'duplicateId')!, - keepAssetIds: json[r'keepAssetIds'] is Iterable - ? (json[r'keepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - trashAssetIds: json[r'trashAssetIds'] is Iterable - ? (json[r'trashAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResolveGroupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResolveGroupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResolveGroupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResolveGroupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'duplicateId', - 'keepAssetIds', - 'trashAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/duplicate_response_dto.dart b/mobile/openapi/lib/model/duplicate_response_dto.dart deleted file mode 100644 index f0ddbb4fdd..0000000000 --- a/mobile/openapi/lib/model/duplicate_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class DuplicateResponseDto { - /// Returns a new [DuplicateResponseDto] instance. - DuplicateResponseDto({ - this.assets = const [], - required this.duplicateId, - this.suggestedKeepAssetIds = const [], - }); - - /// Duplicate assets - List assets; - - /// Duplicate group ID - String duplicateId; - - /// Suggested asset IDs to keep based on file size and EXIF data - List suggestedKeepAssetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is DuplicateResponseDto && - _deepEquality.equals(other.assets, assets) && - other.duplicateId == duplicateId && - _deepEquality.equals(other.suggestedKeepAssetIds, suggestedKeepAssetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (duplicateId.hashCode) + - (suggestedKeepAssetIds.hashCode); - - @override - String toString() => 'DuplicateResponseDto[assets=$assets, duplicateId=$duplicateId, suggestedKeepAssetIds=$suggestedKeepAssetIds]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'duplicateId'] = this.duplicateId; - json[r'suggestedKeepAssetIds'] = this.suggestedKeepAssetIds; - return json; - } - - /// Returns a new [DuplicateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static DuplicateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "DuplicateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return DuplicateResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - duplicateId: mapValueOfType(json, r'duplicateId')!, - suggestedKeepAssetIds: json[r'suggestedKeepAssetIds'] is Iterable - ? (json[r'suggestedKeepAssetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = DuplicateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = DuplicateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of DuplicateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = DuplicateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'duplicateId', - 'suggestedKeepAssetIds', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_response.dart b/mobile/openapi/lib/model/email_notifications_response.dart deleted file mode 100644 index 08a3d580c6..0000000000 --- a/mobile/openapi/lib/model/email_notifications_response.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class EmailNotificationsResponse { - /// Returns a new [EmailNotificationsResponse] instance. - EmailNotificationsResponse({ - required this.albumInvite, - required this.albumUpdate, - required this.enabled, - }); - - /// Whether to receive email notifications for album invites - bool albumInvite; - - /// Whether to receive email notifications for album updates - bool albumUpdate; - - /// Whether email notifications are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsResponse && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite.hashCode) + - (albumUpdate.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'EmailNotificationsResponse[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'albumInvite'] = this.albumInvite; - json[r'albumUpdate'] = this.albumUpdate; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [EmailNotificationsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsResponse? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsResponse"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsResponse( - albumInvite: mapValueOfType(json, r'albumInvite')!, - albumUpdate: mapValueOfType(json, r'albumUpdate')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInvite', - 'albumUpdate', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/email_notifications_update.dart b/mobile/openapi/lib/model/email_notifications_update.dart deleted file mode 100644 index 89724e0552..0000000000 --- a/mobile/openapi/lib/model/email_notifications_update.dart +++ /dev/null @@ -1,142 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class EmailNotificationsUpdate { - /// Returns a new [EmailNotificationsUpdate] instance. - EmailNotificationsUpdate({ - this.albumInvite = const Optional.absent(), - this.albumUpdate = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Whether to receive email notifications for album invites - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumInvite; - - /// Whether to receive email notifications for album updates - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumUpdate; - - /// Whether email notifications are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is EmailNotificationsUpdate && - other.albumInvite == albumInvite && - other.albumUpdate == albumUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInvite == null ? 0 : albumInvite!.hashCode) + - (albumUpdate == null ? 0 : albumUpdate!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'EmailNotificationsUpdate[albumInvite=$albumInvite, albumUpdate=$albumUpdate, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.albumInvite.isPresent) { - final value = this.albumInvite.value; - json[r'albumInvite'] = value; - } - if (this.albumUpdate.isPresent) { - final value = this.albumUpdate.value; - json[r'albumUpdate'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [EmailNotificationsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static EmailNotificationsUpdate? fromJson(dynamic value) { - upgradeDto(value, "EmailNotificationsUpdate"); - if (value is Map) { - final json = value.cast(); - - return EmailNotificationsUpdate( - albumInvite: json.containsKey(r'albumInvite') ? Optional.present(mapValueOfType(json, r'albumInvite')) : const Optional.absent(), - albumUpdate: json.containsKey(r'albumUpdate') ? Optional.present(mapValueOfType(json, r'albumUpdate')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = EmailNotificationsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = EmailNotificationsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of EmailNotificationsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = EmailNotificationsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart deleted file mode 100644 index 2cec6f5161..0000000000 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ /dev/null @@ -1,348 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ExifResponseDto { - /// Returns a new [ExifResponseDto] instance. - ExifResponseDto({ - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.exifImageHeight = const Optional.absent(), - this.exifImageWidth = const Optional.absent(), - this.exposureTime = const Optional.absent(), - this.fNumber = const Optional.absent(), - this.fileSizeInByte = const Optional.absent(), - this.focalLength = const Optional.absent(), - this.iso = const Optional.absent(), - this.latitude = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.longitude = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.modifyDate = const Optional.absent(), - this.orientation = const Optional.absent(), - this.projectionType = const Optional.absent(), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.timeZone = const Optional.absent(), - }); - - /// City name - Optional city; - - /// Country name - Optional country; - - /// Original date/time - Optional dateTimeOriginal; - - /// Image description - Optional description; - - /// Image height in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageHeight; - - /// Image width in pixels - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional exifImageWidth; - - /// Exposure time - Optional exposureTime; - - /// F-number (aperture) - Optional fNumber; - - /// File size in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional fileSizeInByte; - - /// Focal length in mm - Optional focalLength; - - /// ISO sensitivity - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - Optional iso; - - /// GPS latitude - Optional latitude; - - /// Lens model - Optional lensModel; - - /// GPS longitude - Optional longitude; - - /// Camera make - Optional make; - - /// Camera model - Optional model; - - /// Modification date/time - Optional modifyDate; - - /// Image orientation - Optional orientation; - - /// Projection type - Optional projectionType; - - /// Rating - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// State/province name - Optional state; - - /// Time zone - Optional timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'ExifResponseDto[city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.exifImageHeight.isPresent) { - final value = this.exifImageHeight.value; - json[r'exifImageHeight'] = value; - } - if (this.exifImageWidth.isPresent) { - final value = this.exifImageWidth.value; - json[r'exifImageWidth'] = value; - } - if (this.exposureTime.isPresent) { - final value = this.exposureTime.value; - json[r'exposureTime'] = value; - } - if (this.fNumber.isPresent) { - final value = this.fNumber.value; - json[r'fNumber'] = value; - } - if (this.fileSizeInByte.isPresent) { - final value = this.fileSizeInByte.value; - json[r'fileSizeInByte'] = value; - } - if (this.focalLength.isPresent) { - final value = this.focalLength.value; - json[r'focalLength'] = value; - } - if (this.iso.isPresent) { - final value = this.iso.value; - json[r'iso'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.modifyDate.isPresent) { - final value = this.modifyDate.value; - json[r'modifyDate'] = value == null ? null : value.toUtc().toIso8601String(); - } - if (this.orientation.isPresent) { - final value = this.orientation.value; - json[r'orientation'] = value; - } - if (this.projectionType.isPresent) { - final value = this.projectionType.value; - json[r'projectionType'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.timeZone.isPresent) { - final value = this.timeZone.value; - json[r'timeZone'] = value; - } - return json; - } - - /// Returns a new [ExifResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ExifResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ExifResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ExifResponseDto( - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapDateTime(json, r'dateTimeOriginal', r'')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - exifImageHeight: json.containsKey(r'exifImageHeight') ? Optional.present(json[r'exifImageHeight'] == null ? null : int.parse('${json[r'exifImageHeight']}')) : const Optional.absent(), - exifImageWidth: json.containsKey(r'exifImageWidth') ? Optional.present(json[r'exifImageWidth'] == null ? null : int.parse('${json[r'exifImageWidth']}')) : const Optional.absent(), - exposureTime: json.containsKey(r'exposureTime') ? Optional.present(mapValueOfType(json, r'exposureTime')) : const Optional.absent(), - fNumber: json.containsKey(r'fNumber') ? Optional.present(json[r'fNumber'] == null ? null : num.parse('${json[r'fNumber']}')) : const Optional.absent(), - fileSizeInByte: json.containsKey(r'fileSizeInByte') ? Optional.present(json[r'fileSizeInByte'] == null ? null : int.parse('${json[r'fileSizeInByte']}')) : const Optional.absent(), - focalLength: json.containsKey(r'focalLength') ? Optional.present(json[r'focalLength'] == null ? null : num.parse('${json[r'focalLength']}')) : const Optional.absent(), - iso: json.containsKey(r'iso') ? Optional.present(json[r'iso'] == null ? null : int.parse('${json[r'iso']}')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - modifyDate: json.containsKey(r'modifyDate') ? Optional.present(mapDateTime(json, r'modifyDate', r'')) : const Optional.absent(), - orientation: json.containsKey(r'orientation') ? Optional.present(mapValueOfType(json, r'orientation')) : const Optional.absent(), - projectionType: json.containsKey(r'projectionType') ? Optional.present(mapValueOfType(json, r'projectionType')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - timeZone: json.containsKey(r'timeZone') ? Optional.present(mapValueOfType(json, r'timeZone')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ExifResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ExifResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ExifResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ExifResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/face_dto.dart b/mobile/openapi/lib/model/face_dto.dart deleted file mode 100644 index ec5f5c8a6c..0000000000 --- a/mobile/openapi/lib/model/face_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FaceDto { - /// Returns a new [FaceDto] instance. - FaceDto({ - required this.id, - }); - - /// Face ID - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is FaceDto && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode); - - @override - String toString() => 'FaceDto[id=$id]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - return json; - } - - /// Returns a new [FaceDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FaceDto? fromJson(dynamic value) { - upgradeDto(value, "FaceDto"); - if (value is Map) { - final json = value.cast(); - - return FaceDto( - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FaceDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FaceDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FaceDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FaceDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/facial_recognition_config.dart b/mobile/openapi/lib/model/facial_recognition_config.dart deleted file mode 100644 index c5f477e1d5..0000000000 --- a/mobile/openapi/lib/model/facial_recognition_config.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FacialRecognitionConfig { - /// Returns a new [FacialRecognitionConfig] instance. - FacialRecognitionConfig({ - required this.enabled, - required this.maxDistance, - required this.minFaces, - required this.minScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum distance threshold for face recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 2 - double maxDistance; - - /// Minimum number of faces required for recognition - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int minFaces; - - /// Minimum confidence score for face detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is FacialRecognitionConfig && - other.enabled == enabled && - other.maxDistance == maxDistance && - other.minFaces == minFaces && - other.minScore == minScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxDistance.hashCode) + - (minFaces.hashCode) + - (minScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'FacialRecognitionConfig[enabled=$enabled, maxDistance=$maxDistance, minFaces=$minFaces, minScore=$minScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxDistance'] = this.maxDistance; - json[r'minFaces'] = this.minFaces; - json[r'minScore'] = this.minScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [FacialRecognitionConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FacialRecognitionConfig? fromJson(dynamic value) { - upgradeDto(value, "FacialRecognitionConfig"); - if (value is Map) { - final json = value.cast(); - - return FacialRecognitionConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxDistance: mapValueOfType(json, r'maxDistance')!, - minFaces: mapValueOfType(json, r'minFaces')!, - minScore: mapValueOfType(json, r'minScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FacialRecognitionConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FacialRecognitionConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FacialRecognitionConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FacialRecognitionConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxDistance', - 'minFaces', - 'minScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/folders_response.dart b/mobile/openapi/lib/model/folders_response.dart deleted file mode 100644 index 873404c786..0000000000 --- a/mobile/openapi/lib/model/folders_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FoldersResponse { - /// Returns a new [FoldersResponse] instance. - FoldersResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether folders are enabled - bool enabled; - - /// Whether folders appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'FoldersResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [FoldersResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersResponse? fromJson(dynamic value) { - upgradeDto(value, "FoldersResponse"); - if (value is Map) { - final json = value.cast(); - - return FoldersResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/folders_update.dart b/mobile/openapi/lib/model/folders_update.dart deleted file mode 100644 index 2ce0cde807..0000000000 --- a/mobile/openapi/lib/model/folders_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class FoldersUpdate { - /// Returns a new [FoldersUpdate] instance. - FoldersUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether folders are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether folders appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is FoldersUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'FoldersUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [FoldersUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static FoldersUpdate? fromJson(dynamic value) { - upgradeDto(value, "FoldersUpdate"); - if (value is Map) { - final json = value.cast(); - - return FoldersUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = FoldersUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = FoldersUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of FoldersUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = FoldersUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/hls_video_resolution.dart b/mobile/openapi/lib/model/hls_video_resolution.dart deleted file mode 100644 index 8bab0481ed..0000000000 --- a/mobile/openapi/lib/model/hls_video_resolution.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// HLS video resolution -enum HlsVideoResolution { - number480._(480), - number720._(720), - number1080._(1080), - number1440._(1440), - number2160._(2160), - ; - - /// Instantiate a new enum with the provided value. - const HlsVideoResolution._(this._value); - - /// The underlying value of this enum member. - final int _value; - - @override - String toString() => _value.toString(); - - /// Encodes this enum as a value suitable for JSON. - int toJson() => _value; - - /// Returns the instance of [HlsVideoResolution] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static HlsVideoResolution? fromJson(dynamic value) => HlsVideoResolutionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [HlsVideoResolution] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = HlsVideoResolution.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [HlsVideoResolution] to int, -/// and [decode] dynamic data back to [HlsVideoResolution]. -class HlsVideoResolutionTypeTransformer { - factory HlsVideoResolutionTypeTransformer() => _instance ??= const HlsVideoResolutionTypeTransformer._(); - - const HlsVideoResolutionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - int encode(HlsVideoResolution data) => data._value; - - /// Returns the instance of [HlsVideoResolution] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - HlsVideoResolution? decode(dynamic data, {bool allowNull = true}) { - if (data is HlsVideoResolution) { - return data; - } - if (data != null) { - switch (data) { - case 480: return HlsVideoResolution.number480; - case 720: return HlsVideoResolution.number720; - case 1080: return HlsVideoResolution.number1080; - case 1440: return HlsVideoResolution.number1440; - case 2160: return HlsVideoResolution.number2160; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static HlsVideoResolutionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/image_format.dart b/mobile/openapi/lib/model/image_format.dart deleted file mode 100644 index e20e1cbc8f..0000000000 --- a/mobile/openapi/lib/model/image_format.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Image format -enum ImageFormat { - jpeg._(r'jpeg'), - webp._(r'webp'), - ; - - /// Instantiate a new enum with the provided value. - const ImageFormat._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ImageFormat] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ImageFormat? fromJson(dynamic value) => ImageFormatTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ImageFormat] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ImageFormat.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ImageFormat] to String, -/// and [decode] dynamic data back to [ImageFormat]. -class ImageFormatTypeTransformer { - factory ImageFormatTypeTransformer() => _instance ??= const ImageFormatTypeTransformer._(); - - const ImageFormatTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ImageFormat data) => data._value; - - /// Returns the instance of [ImageFormat] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ImageFormat? decode(dynamic data, {bool allowNull = true}) { - if (data is ImageFormat) { - return data; - } - if (data != null) { - switch (data) { - case r'jpeg': return ImageFormat.jpeg; - case r'webp': return ImageFormat.webp; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ImageFormatTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report.dart b/mobile/openapi/lib/model/integrity_report.dart deleted file mode 100644 index 9e9c4cfa22..0000000000 --- a/mobile/openapi/lib/model/integrity_report.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Integrity report type -enum IntegrityReport { - untrackedFile._(r'untracked_file'), - missingFile._(r'missing_file'), - checksumMismatch._(r'checksum_mismatch'), - ; - - /// Instantiate a new enum with the provided value. - const IntegrityReport._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [IntegrityReport] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static IntegrityReport? fromJson(dynamic value) => IntegrityReportTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [IntegrityReport] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReport.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [IntegrityReport] to String, -/// and [decode] dynamic data back to [IntegrityReport]. -class IntegrityReportTypeTransformer { - factory IntegrityReportTypeTransformer() => _instance ??= const IntegrityReportTypeTransformer._(); - - const IntegrityReportTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(IntegrityReport data) => data._value; - - /// Returns the instance of [IntegrityReport] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - IntegrityReport? decode(dynamic data, {bool allowNull = true}) { - if (data is IntegrityReport) { - return data; - } - if (data != null) { - switch (data) { - case r'untracked_file': return IntegrityReport.untrackedFile; - case r'missing_file': return IntegrityReport.missingFile; - case r'checksum_mismatch': return IntegrityReport.checksumMismatch; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static IntegrityReportTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto.dart b/mobile/openapi/lib/model/integrity_report_response_dto.dart deleted file mode 100644 index e9f8b91cca..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportResponseDto { - /// Returns a new [IntegrityReportResponseDto] instance. - IntegrityReportResponseDto({ - this.items = const [], - this.nextCursor = const Optional.absent(), - }); - - List items; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional nextCursor; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDto && - _deepEquality.equals(other.items, items) && - other.nextCursor == nextCursor; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (items.hashCode) + - (nextCursor == null ? 0 : nextCursor!.hashCode); - - @override - String toString() => 'IntegrityReportResponseDto[items=$items, nextCursor=$nextCursor]'; - - Map toJson() { - final json = {}; - json[r'items'] = this.items; - if (this.nextCursor.isPresent) { - final value = this.nextCursor.value; - json[r'nextCursor'] = value; - } - return json; - } - - /// Returns a new [IntegrityReportResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDto( - items: IntegrityReportResponseDtoItemsInner.listFromJson(json[r'items']), - nextCursor: json.containsKey(r'nextCursor') ? Optional.present(mapValueOfType(json, r'nextCursor')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart b/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart deleted file mode 100644 index db09f698f4..0000000000 --- a/mobile/openapi/lib/model/integrity_report_response_dto_items_inner.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportResponseDtoItemsInner { - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance. - IntegrityReportResponseDtoItemsInner({ - required this.id, - required this.path, - required this.type, - }); - - /// Integrity report item id - String id; - - /// Integrity report item path - String path; - - IntegrityReport type; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportResponseDtoItemsInner && - other.id == id && - other.path == path && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (id.hashCode) + - (path.hashCode) + - (type.hashCode); - - @override - String toString() => 'IntegrityReportResponseDtoItemsInner[id=$id, path=$path, type=$type]'; - - Map toJson() { - final json = {}; - json[r'id'] = this.id; - json[r'path'] = this.path; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [IntegrityReportResponseDtoItemsInner] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportResponseDtoItemsInner? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportResponseDtoItemsInner"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportResponseDtoItemsInner( - id: mapValueOfType(json, r'id')!, - path: mapValueOfType(json, r'path')!, - type: IntegrityReport.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportResponseDtoItemsInner.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportResponseDtoItemsInner-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportResponseDtoItemsInner.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - 'path', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart b/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart deleted file mode 100644 index f95c036d14..0000000000 --- a/mobile/openapi/lib/model/integrity_report_summary_response_dto.dart +++ /dev/null @@ -1,121 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class IntegrityReportSummaryResponseDto { - /// Returns a new [IntegrityReportSummaryResponseDto] instance. - IntegrityReportSummaryResponseDto({ - required this.checksumMismatch, - required this.missingFile, - required this.untrackedFile, - }); - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int checksumMismatch; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int missingFile; - - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int untrackedFile; - - @override - bool operator ==(Object other) => identical(this, other) || other is IntegrityReportSummaryResponseDto && - other.checksumMismatch == checksumMismatch && - other.missingFile == missingFile && - other.untrackedFile == untrackedFile; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumMismatch.hashCode) + - (missingFile.hashCode) + - (untrackedFile.hashCode); - - @override - String toString() => 'IntegrityReportSummaryResponseDto[checksumMismatch=$checksumMismatch, missingFile=$missingFile, untrackedFile=$untrackedFile]'; - - Map toJson() { - final json = {}; - json[r'checksum_mismatch'] = this.checksumMismatch; - json[r'missing_file'] = this.missingFile; - json[r'untracked_file'] = this.untrackedFile; - return json; - } - - /// Returns a new [IntegrityReportSummaryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static IntegrityReportSummaryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "IntegrityReportSummaryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return IntegrityReportSummaryResponseDto( - checksumMismatch: mapValueOfType(json, r'checksum_mismatch')!, - missingFile: mapValueOfType(json, r'missing_file')!, - untrackedFile: mapValueOfType(json, r'untracked_file')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = IntegrityReportSummaryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = IntegrityReportSummaryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of IntegrityReportSummaryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = IntegrityReportSummaryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum_mismatch', - 'missing_file', - 'untracked_file', - }; -} - diff --git a/mobile/openapi/lib/model/job_create_dto.dart b/mobile/openapi/lib/model/job_create_dto.dart deleted file mode 100644 index fe6743cba0..0000000000 --- a/mobile/openapi/lib/model/job_create_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class JobCreateDto { - /// Returns a new [JobCreateDto] instance. - JobCreateDto({ - required this.name, - }); - - ManualJobName name; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobCreateDto && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (name.hashCode); - - @override - String toString() => 'JobCreateDto[name=$name]'; - - Map toJson() { - final json = {}; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [JobCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobCreateDto? fromJson(dynamic value) { - upgradeDto(value, "JobCreateDto"); - if (value is Map) { - final json = value.cast(); - - return JobCreateDto( - name: ManualJobName.fromJson(json[r'name'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/job_name.dart b/mobile/openapi/lib/model/job_name.dart deleted file mode 100644 index 7c97d42052..0000000000 --- a/mobile/openapi/lib/model/job_name.dart +++ /dev/null @@ -1,218 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Job name -enum JobName { - assetDelete._(r'AssetDelete'), - assetDeleteCheck._(r'AssetDeleteCheck'), - assetDetectFacesQueueAll._(r'AssetDetectFacesQueueAll'), - assetDetectFaces._(r'AssetDetectFaces'), - assetDetectDuplicatesQueueAll._(r'AssetDetectDuplicatesQueueAll'), - assetDetectDuplicates._(r'AssetDetectDuplicates'), - assetEditThumbnailGeneration._(r'AssetEditThumbnailGeneration'), - assetEncodeVideoQueueAll._(r'AssetEncodeVideoQueueAll'), - assetEncodeVideo._(r'AssetEncodeVideo'), - assetEmptyTrash._(r'AssetEmptyTrash'), - assetExtractMetadataQueueAll._(r'AssetExtractMetadataQueueAll'), - assetExtractMetadata._(r'AssetExtractMetadata'), - assetFileMigration._(r'AssetFileMigration'), - assetGenerateThumbnailsQueueAll._(r'AssetGenerateThumbnailsQueueAll'), - assetGenerateThumbnails._(r'AssetGenerateThumbnails'), - auditTableCleanup._(r'AuditTableCleanup'), - databaseBackup._(r'DatabaseBackup'), - facialRecognitionQueueAll._(r'FacialRecognitionQueueAll'), - facialRecognition._(r'FacialRecognition'), - fileDelete._(r'FileDelete'), - fileMigrationQueueAll._(r'FileMigrationQueueAll'), - libraryDeleteCheck._(r'LibraryDeleteCheck'), - libraryDelete._(r'LibraryDelete'), - libraryRemoveAsset._(r'LibraryRemoveAsset'), - libraryScanAssetsQueueAll._(r'LibraryScanAssetsQueueAll'), - librarySyncAssets._(r'LibrarySyncAssets'), - librarySyncFilesQueueAll._(r'LibrarySyncFilesQueueAll'), - librarySyncFiles._(r'LibrarySyncFiles'), - libraryScanQueueAll._(r'LibraryScanQueueAll'), - hlsSessionCleanup._(r'HlsSessionCleanup'), - memoryCleanup._(r'MemoryCleanup'), - memoryGenerate._(r'MemoryGenerate'), - notificationsCleanup._(r'NotificationsCleanup'), - notifyUserSignup._(r'NotifyUserSignup'), - notifyAlbumInvite._(r'NotifyAlbumInvite'), - notifyAlbumUpdate._(r'NotifyAlbumUpdate'), - userDelete._(r'UserDelete'), - userDeleteCheck._(r'UserDeleteCheck'), - userSyncUsage._(r'UserSyncUsage'), - personCleanup._(r'PersonCleanup'), - personFileMigration._(r'PersonFileMigration'), - personGenerateThumbnail._(r'PersonGenerateThumbnail'), - sessionCleanup._(r'SessionCleanup'), - sendMail._(r'SendMail'), - sidecarQueueAll._(r'SidecarQueueAll'), - sidecarCheck._(r'SidecarCheck'), - sidecarWrite._(r'SidecarWrite'), - smartSearchQueueAll._(r'SmartSearchQueueAll'), - smartSearch._(r'SmartSearch'), - storageTemplateMigration._(r'StorageTemplateMigration'), - storageTemplateMigrationSingle._(r'StorageTemplateMigrationSingle'), - tagCleanup._(r'TagCleanup'), - versionCheck._(r'VersionCheck'), - ocrQueueAll._(r'OcrQueueAll'), - ocr._(r'Ocr'), - workflowAssetTrigger._(r'WorkflowAssetTrigger'), - integrityUntrackedFilesQueueAll._(r'IntegrityUntrackedFilesQueueAll'), - integrityUntrackedFiles._(r'IntegrityUntrackedFiles'), - integrityUntrackedRefresh._(r'IntegrityUntrackedRefresh'), - integrityMissingFilesQueueAll._(r'IntegrityMissingFilesQueueAll'), - integrityMissingFiles._(r'IntegrityMissingFiles'), - integrityMissingFilesRefresh._(r'IntegrityMissingFilesRefresh'), - integrityChecksumFiles._(r'IntegrityChecksumFiles'), - integrityChecksumFilesRefresh._(r'IntegrityChecksumFilesRefresh'), - integrityDeleteReportType._(r'IntegrityDeleteReportType'), - integrityDeleteReports._(r'IntegrityDeleteReports'), - ; - - /// Instantiate a new enum with the provided value. - const JobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [JobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static JobName? fromJson(dynamic value) => JobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [JobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [JobName] to String, -/// and [decode] dynamic data back to [JobName]. -class JobNameTypeTransformer { - factory JobNameTypeTransformer() => _instance ??= const JobNameTypeTransformer._(); - - const JobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(JobName data) => data._value; - - /// Returns the instance of [JobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - JobName? decode(dynamic data, {bool allowNull = true}) { - if (data is JobName) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetDelete': return JobName.assetDelete; - case r'AssetDeleteCheck': return JobName.assetDeleteCheck; - case r'AssetDetectFacesQueueAll': return JobName.assetDetectFacesQueueAll; - case r'AssetDetectFaces': return JobName.assetDetectFaces; - case r'AssetDetectDuplicatesQueueAll': return JobName.assetDetectDuplicatesQueueAll; - case r'AssetDetectDuplicates': return JobName.assetDetectDuplicates; - case r'AssetEditThumbnailGeneration': return JobName.assetEditThumbnailGeneration; - case r'AssetEncodeVideoQueueAll': return JobName.assetEncodeVideoQueueAll; - case r'AssetEncodeVideo': return JobName.assetEncodeVideo; - case r'AssetEmptyTrash': return JobName.assetEmptyTrash; - case r'AssetExtractMetadataQueueAll': return JobName.assetExtractMetadataQueueAll; - case r'AssetExtractMetadata': return JobName.assetExtractMetadata; - case r'AssetFileMigration': return JobName.assetFileMigration; - case r'AssetGenerateThumbnailsQueueAll': return JobName.assetGenerateThumbnailsQueueAll; - case r'AssetGenerateThumbnails': return JobName.assetGenerateThumbnails; - case r'AuditTableCleanup': return JobName.auditTableCleanup; - case r'DatabaseBackup': return JobName.databaseBackup; - case r'FacialRecognitionQueueAll': return JobName.facialRecognitionQueueAll; - case r'FacialRecognition': return JobName.facialRecognition; - case r'FileDelete': return JobName.fileDelete; - case r'FileMigrationQueueAll': return JobName.fileMigrationQueueAll; - case r'LibraryDeleteCheck': return JobName.libraryDeleteCheck; - case r'LibraryDelete': return JobName.libraryDelete; - case r'LibraryRemoveAsset': return JobName.libraryRemoveAsset; - case r'LibraryScanAssetsQueueAll': return JobName.libraryScanAssetsQueueAll; - case r'LibrarySyncAssets': return JobName.librarySyncAssets; - case r'LibrarySyncFilesQueueAll': return JobName.librarySyncFilesQueueAll; - case r'LibrarySyncFiles': return JobName.librarySyncFiles; - case r'LibraryScanQueueAll': return JobName.libraryScanQueueAll; - case r'HlsSessionCleanup': return JobName.hlsSessionCleanup; - case r'MemoryCleanup': return JobName.memoryCleanup; - case r'MemoryGenerate': return JobName.memoryGenerate; - case r'NotificationsCleanup': return JobName.notificationsCleanup; - case r'NotifyUserSignup': return JobName.notifyUserSignup; - case r'NotifyAlbumInvite': return JobName.notifyAlbumInvite; - case r'NotifyAlbumUpdate': return JobName.notifyAlbumUpdate; - case r'UserDelete': return JobName.userDelete; - case r'UserDeleteCheck': return JobName.userDeleteCheck; - case r'UserSyncUsage': return JobName.userSyncUsage; - case r'PersonCleanup': return JobName.personCleanup; - case r'PersonFileMigration': return JobName.personFileMigration; - case r'PersonGenerateThumbnail': return JobName.personGenerateThumbnail; - case r'SessionCleanup': return JobName.sessionCleanup; - case r'SendMail': return JobName.sendMail; - case r'SidecarQueueAll': return JobName.sidecarQueueAll; - case r'SidecarCheck': return JobName.sidecarCheck; - case r'SidecarWrite': return JobName.sidecarWrite; - case r'SmartSearchQueueAll': return JobName.smartSearchQueueAll; - case r'SmartSearch': return JobName.smartSearch; - case r'StorageTemplateMigration': return JobName.storageTemplateMigration; - case r'StorageTemplateMigrationSingle': return JobName.storageTemplateMigrationSingle; - case r'TagCleanup': return JobName.tagCleanup; - case r'VersionCheck': return JobName.versionCheck; - case r'OcrQueueAll': return JobName.ocrQueueAll; - case r'Ocr': return JobName.ocr; - case r'WorkflowAssetTrigger': return JobName.workflowAssetTrigger; - case r'IntegrityUntrackedFilesQueueAll': return JobName.integrityUntrackedFilesQueueAll; - case r'IntegrityUntrackedFiles': return JobName.integrityUntrackedFiles; - case r'IntegrityUntrackedRefresh': return JobName.integrityUntrackedRefresh; - case r'IntegrityMissingFilesQueueAll': return JobName.integrityMissingFilesQueueAll; - case r'IntegrityMissingFiles': return JobName.integrityMissingFiles; - case r'IntegrityMissingFilesRefresh': return JobName.integrityMissingFilesRefresh; - case r'IntegrityChecksumFiles': return JobName.integrityChecksumFiles; - case r'IntegrityChecksumFilesRefresh': return JobName.integrityChecksumFilesRefresh; - case r'IntegrityDeleteReportType': return JobName.integrityDeleteReportType; - case r'IntegrityDeleteReports': return JobName.integrityDeleteReports; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static JobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/job_settings_dto.dart b/mobile/openapi/lib/model/job_settings_dto.dart deleted file mode 100644 index 98fe3d3536..0000000000 --- a/mobile/openapi/lib/model/job_settings_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class JobSettingsDto { - /// Returns a new [JobSettingsDto] instance. - JobSettingsDto({ - required this.concurrency, - }); - - /// Concurrency - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int concurrency; - - @override - bool operator ==(Object other) => identical(this, other) || other is JobSettingsDto && - other.concurrency == concurrency; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (concurrency.hashCode); - - @override - String toString() => 'JobSettingsDto[concurrency=$concurrency]'; - - Map toJson() { - final json = {}; - json[r'concurrency'] = this.concurrency; - return json; - } - - /// Returns a new [JobSettingsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static JobSettingsDto? fromJson(dynamic value) { - upgradeDto(value, "JobSettingsDto"); - if (value is Map) { - final json = value.cast(); - - return JobSettingsDto( - concurrency: mapValueOfType(json, r'concurrency')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = JobSettingsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = JobSettingsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of JobSettingsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = JobSettingsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'concurrency', - }; -} - diff --git a/mobile/openapi/lib/model/library_response_dto.dart b/mobile/openapi/lib/model/library_response_dto.dart deleted file mode 100644 index 128469839a..0000000000 --- a/mobile/openapi/lib/model/library_response_dto.dart +++ /dev/null @@ -1,189 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LibraryResponseDto { - /// Returns a new [LibraryResponseDto] instance. - LibraryResponseDto({ - required this.assetCount, - required this.createdAt, - this.exclusionPatterns = const [], - required this.id, - this.importPaths = const [], - required this.name, - required this.ownerId, - required this.refreshedAt, - required this.updatedAt, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assetCount; - - /// Creation date - DateTime createdAt; - - /// Exclusion patterns - List exclusionPatterns; - - /// Library ID - String id; - - /// Import paths - List importPaths; - - /// Library name - String name; - - /// Owner user ID - String ownerId; - - /// Last refresh date - DateTime? refreshedAt; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryResponseDto && - other.assetCount == assetCount && - other.createdAt == createdAt && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - other.id == id && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name && - other.ownerId == ownerId && - other.refreshedAt == refreshedAt && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetCount.hashCode) + - (createdAt.hashCode) + - (exclusionPatterns.hashCode) + - (id.hashCode) + - (importPaths.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (refreshedAt == null ? 0 : refreshedAt!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'LibraryResponseDto[assetCount=$assetCount, createdAt=$createdAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, name=$name, ownerId=$ownerId, refreshedAt=$refreshedAt, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assetCount'] = this.assetCount; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'exclusionPatterns'] = this.exclusionPatterns; - json[r'id'] = this.id; - json[r'importPaths'] = this.importPaths; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - if (this.refreshedAt != null) { - json[r'refreshedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.refreshedAt!.millisecondsSinceEpoch - : this.refreshedAt!.toUtc().toIso8601String(); - } else { - json[r'refreshedAt'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [LibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryResponseDto( - assetCount: mapValueOfType(json, r'assetCount')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - exclusionPatterns: json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const [], - id: mapValueOfType(json, r'id')!, - importPaths: json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const [], - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - refreshedAt: mapDateTime(json, r'refreshedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetCount', - 'createdAt', - 'exclusionPatterns', - 'id', - 'importPaths', - 'name', - 'ownerId', - 'refreshedAt', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/library_stats_response_dto.dart b/mobile/openapi/lib/model/library_stats_response_dto.dart deleted file mode 100644 index 55adbc2b49..0000000000 --- a/mobile/openapi/lib/model/library_stats_response_dto.dart +++ /dev/null @@ -1,139 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LibraryStatsResponseDto { - /// Returns a new [LibraryStatsResponseDto] instance. - LibraryStatsResponseDto({ - required this.photos, - required this.total, - required this.usage, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - /// Storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is LibraryStatsResponseDto && - other.photos == photos && - other.total == total && - other.usage == usage && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (total.hashCode) + - (usage.hashCode) + - (videos.hashCode); - - @override - String toString() => 'LibraryStatsResponseDto[photos=$photos, total=$total, usage=$usage, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'total'] = this.total; - json[r'usage'] = this.usage; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [LibraryStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LibraryStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LibraryStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LibraryStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - total: mapValueOfType(json, r'total')!, - usage: mapValueOfType(json, r'usage')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LibraryStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LibraryStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LibraryStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LibraryStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'total', - 'usage', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/license_key_dto.dart b/mobile/openapi/lib/model/license_key_dto.dart deleted file mode 100644 index d1818a2a43..0000000000 --- a/mobile/openapi/lib/model/license_key_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LicenseKeyDto { - /// Returns a new [LicenseKeyDto] instance. - LicenseKeyDto({ - required this.activationKey, - required this.licenseKey, - }); - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is LicenseKeyDto && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'LicenseKeyDto[activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [LicenseKeyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LicenseKeyDto? fromJson(dynamic value) { - upgradeDto(value, "LicenseKeyDto"); - if (value is Map) { - final json = value.cast(); - - return LicenseKeyDto( - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LicenseKeyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LicenseKeyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LicenseKeyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LicenseKeyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/log_level.dart b/mobile/openapi/lib/model/log_level.dart deleted file mode 100644 index 8e43b09d16..0000000000 --- a/mobile/openapi/lib/model/log_level.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Log level -enum LogLevel { - verbose._(r'verbose'), - debug._(r'debug'), - log._(r'log'), - warn._(r'warn'), - error._(r'error'), - fatal._(r'fatal'), - ; - - /// Instantiate a new enum with the provided value. - const LogLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [LogLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static LogLevel? fromJson(dynamic value) => LogLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [LogLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LogLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [LogLevel] to String, -/// and [decode] dynamic data back to [LogLevel]. -class LogLevelTypeTransformer { - factory LogLevelTypeTransformer() => _instance ??= const LogLevelTypeTransformer._(); - - const LogLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(LogLevel data) => data._value; - - /// Returns the instance of [LogLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - LogLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is LogLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'verbose': return LogLevel.verbose; - case r'debug': return LogLevel.debug; - case r'log': return LogLevel.log; - case r'warn': return LogLevel.warn; - case r'error': return LogLevel.error; - case r'fatal': return LogLevel.fatal; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static LogLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart deleted file mode 100644 index 1fdfdc3d40..0000000000 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LoginCredentialDto { - /// Returns a new [LoginCredentialDto] instance. - LoginCredentialDto({ - required this.email, - required this.password, - }); - - /// User email - String email; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginCredentialDto && - other.email == email && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (password.hashCode); - - @override - String toString() => 'LoginCredentialDto[email=$email, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [LoginCredentialDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginCredentialDto? fromJson(dynamic value) { - upgradeDto(value, "LoginCredentialDto"); - if (value is Map) { - final json = value.cast(); - - return LoginCredentialDto( - email: mapValueOfType(json, r'email')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginCredentialDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginCredentialDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginCredentialDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginCredentialDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart deleted file mode 100644 index c6938c2393..0000000000 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LoginResponseDto { - /// Returns a new [LoginResponseDto] instance. - LoginResponseDto({ - required this.accessToken, - required this.isAdmin, - required this.isOnboarded, - required this.name, - required this.profileImagePath, - required this.shouldChangePassword, - required this.userEmail, - required this.userId, - }); - - /// Access token - String accessToken; - - /// Is admin user - bool isAdmin; - - /// Is onboarded - bool isOnboarded; - - /// User name - String name; - - /// Profile image path - String profileImagePath; - - /// Should change password - bool shouldChangePassword; - - /// User email - String userEmail; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is LoginResponseDto && - other.accessToken == accessToken && - other.isAdmin == isAdmin && - other.isOnboarded == isOnboarded && - other.name == name && - other.profileImagePath == profileImagePath && - other.shouldChangePassword == shouldChangePassword && - other.userEmail == userEmail && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accessToken.hashCode) + - (isAdmin.hashCode) + - (isOnboarded.hashCode) + - (name.hashCode) + - (profileImagePath.hashCode) + - (shouldChangePassword.hashCode) + - (userEmail.hashCode) + - (userId.hashCode); - - @override - String toString() => 'LoginResponseDto[accessToken=$accessToken, isAdmin=$isAdmin, isOnboarded=$isOnboarded, name=$name, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, userEmail=$userEmail, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'accessToken'] = this.accessToken; - json[r'isAdmin'] = this.isAdmin; - json[r'isOnboarded'] = this.isOnboarded; - json[r'name'] = this.name; - json[r'profileImagePath'] = this.profileImagePath; - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'userEmail'] = this.userEmail; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [LoginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LoginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LoginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LoginResponseDto( - accessToken: mapValueOfType(json, r'accessToken')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - name: mapValueOfType(json, r'name')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - userEmail: mapValueOfType(json, r'userEmail')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LoginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LoginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LoginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LoginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accessToken', - 'isAdmin', - 'isOnboarded', - 'name', - 'profileImagePath', - 'shouldChangePassword', - 'userEmail', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart deleted file mode 100644 index b50db2c28b..0000000000 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class LogoutResponseDto { - /// Returns a new [LogoutResponseDto] instance. - LogoutResponseDto({ - required this.redirectUri, - required this.successful, - }); - - /// Redirect URI - String redirectUri; - - /// Logout successful - bool successful; - - @override - bool operator ==(Object other) => identical(this, other) || other is LogoutResponseDto && - other.redirectUri == redirectUri && - other.successful == successful; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (redirectUri.hashCode) + - (successful.hashCode); - - @override - String toString() => 'LogoutResponseDto[redirectUri=$redirectUri, successful=$successful]'; - - Map toJson() { - final json = {}; - json[r'redirectUri'] = this.redirectUri; - json[r'successful'] = this.successful; - return json; - } - - /// Returns a new [LogoutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static LogoutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "LogoutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return LogoutResponseDto( - redirectUri: mapValueOfType(json, r'redirectUri')!, - successful: mapValueOfType(json, r'successful')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = LogoutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = LogoutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of LogoutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = LogoutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - 'successful', - }; -} - diff --git a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart b/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart deleted file mode 100644 index a9b8608ac1..0000000000 --- a/mobile/openapi/lib/model/machine_learning_availability_checks_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MachineLearningAvailabilityChecksDto { - /// Returns a new [MachineLearningAvailabilityChecksDto] instance. - MachineLearningAvailabilityChecksDto({ - required this.enabled, - required this.interval, - required this.timeout, - }); - - /// Enabled - bool enabled; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int interval; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timeout; - - @override - bool operator ==(Object other) => identical(this, other) || other is MachineLearningAvailabilityChecksDto && - other.enabled == enabled && - other.interval == interval && - other.timeout == timeout; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (interval.hashCode) + - (timeout.hashCode); - - @override - String toString() => 'MachineLearningAvailabilityChecksDto[enabled=$enabled, interval=$interval, timeout=$timeout]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'interval'] = this.interval; - json[r'timeout'] = this.timeout; - return json; - } - - /// Returns a new [MachineLearningAvailabilityChecksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MachineLearningAvailabilityChecksDto? fromJson(dynamic value) { - upgradeDto(value, "MachineLearningAvailabilityChecksDto"); - if (value is Map) { - final json = value.cast(); - - return MachineLearningAvailabilityChecksDto( - enabled: mapValueOfType(json, r'enabled')!, - interval: mapValueOfType(json, r'interval')!, - timeout: mapValueOfType(json, r'timeout')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MachineLearningAvailabilityChecksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MachineLearningAvailabilityChecksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MachineLearningAvailabilityChecksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MachineLearningAvailabilityChecksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'interval', - 'timeout', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_action.dart b/mobile/openapi/lib/model/maintenance_action.dart deleted file mode 100644 index d8dd6b8846..0000000000 --- a/mobile/openapi/lib/model/maintenance_action.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Maintenance action -enum MaintenanceAction { - start._(r'start'), - end._(r'end'), - selectDatabaseRestore._(r'select_database_restore'), - restoreDatabase._(r'restore_database'), - ; - - /// Instantiate a new enum with the provided value. - const MaintenanceAction._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MaintenanceAction] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MaintenanceAction? fromJson(dynamic value) => MaintenanceActionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MaintenanceAction] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceAction.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MaintenanceAction] to String, -/// and [decode] dynamic data back to [MaintenanceAction]. -class MaintenanceActionTypeTransformer { - factory MaintenanceActionTypeTransformer() => _instance ??= const MaintenanceActionTypeTransformer._(); - - const MaintenanceActionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MaintenanceAction data) => data._value; - - /// Returns the instance of [MaintenanceAction] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MaintenanceAction? decode(dynamic data, {bool allowNull = true}) { - if (data is MaintenanceAction) { - return data; - } - if (data != null) { - switch (data) { - case r'start': return MaintenanceAction.start; - case r'end': return MaintenanceAction.end; - case r'select_database_restore': return MaintenanceAction.selectDatabaseRestore; - case r'restore_database': return MaintenanceAction.restoreDatabase; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MaintenanceActionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/maintenance_auth_dto.dart b/mobile/openapi/lib/model/maintenance_auth_dto.dart deleted file mode 100644 index f9511bdd2b..0000000000 --- a/mobile/openapi/lib/model/maintenance_auth_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceAuthDto { - /// Returns a new [MaintenanceAuthDto] instance. - MaintenanceAuthDto({ - required this.username, - }); - - /// Maintenance username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceAuthDto && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (username.hashCode); - - @override - String toString() => 'MaintenanceAuthDto[username=$username]'; - - Map toJson() { - final json = {}; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [MaintenanceAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceAuthDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceAuthDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceAuthDto( - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart deleted file mode 100644 index 1c364a6fdc..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_response_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceDetectInstallResponseDto { - /// Returns a new [MaintenanceDetectInstallResponseDto] instance. - MaintenanceDetectInstallResponseDto({ - this.storage = const [], - }); - - List storage; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallResponseDto && - _deepEquality.equals(other.storage, storage); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (storage.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallResponseDto[storage=$storage]'; - - Map toJson() { - final json = {}; - json[r'storage'] = this.storage; - return json; - } - - /// Returns a new [MaintenanceDetectInstallResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallResponseDto( - storage: MaintenanceDetectInstallStorageFolderDto.listFromJson(json[r'storage']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'storage', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart b/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart deleted file mode 100644 index 83182f53d7..0000000000 --- a/mobile/openapi/lib/model/maintenance_detect_install_storage_folder_dto.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceDetectInstallStorageFolderDto { - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance. - MaintenanceDetectInstallStorageFolderDto({ - required this.files, - required this.folder, - required this.readable, - required this.writable, - }); - - /// Number of files in the folder - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int files; - - StorageFolder folder; - - /// Whether the folder is readable - bool readable; - - /// Whether the folder is writable - bool writable; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceDetectInstallStorageFolderDto && - other.files == files && - other.folder == folder && - other.readable == readable && - other.writable == writable; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (files.hashCode) + - (folder.hashCode) + - (readable.hashCode) + - (writable.hashCode); - - @override - String toString() => 'MaintenanceDetectInstallStorageFolderDto[files=$files, folder=$folder, readable=$readable, writable=$writable]'; - - Map toJson() { - final json = {}; - json[r'files'] = this.files; - json[r'folder'] = this.folder; - json[r'readable'] = this.readable; - json[r'writable'] = this.writable; - return json; - } - - /// Returns a new [MaintenanceDetectInstallStorageFolderDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceDetectInstallStorageFolderDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceDetectInstallStorageFolderDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceDetectInstallStorageFolderDto( - files: mapValueOfType(json, r'files')!, - folder: StorageFolder.fromJson(json[r'folder'])!, - readable: mapValueOfType(json, r'readable')!, - writable: mapValueOfType(json, r'writable')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceDetectInstallStorageFolderDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceDetectInstallStorageFolderDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceDetectInstallStorageFolderDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'files', - 'folder', - 'readable', - 'writable', - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_login_dto.dart b/mobile/openapi/lib/model/maintenance_login_dto.dart deleted file mode 100644 index eaa91ae738..0000000000 --- a/mobile/openapi/lib/model/maintenance_login_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceLoginDto { - /// Returns a new [MaintenanceLoginDto] instance. - MaintenanceLoginDto({ - this.token = const Optional.absent(), - }); - - /// Maintenance token - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional token; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceLoginDto && - other.token == token; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (token == null ? 0 : token!.hashCode); - - @override - String toString() => 'MaintenanceLoginDto[token=$token]'; - - Map toJson() { - final json = {}; - if (this.token.isPresent) { - final value = this.token.value; - json[r'token'] = value; - } - return json; - } - - /// Returns a new [MaintenanceLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceLoginDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceLoginDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceLoginDto( - token: json.containsKey(r'token') ? Optional.present(mapValueOfType(json, r'token')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/maintenance_status_response_dto.dart b/mobile/openapi/lib/model/maintenance_status_response_dto.dart deleted file mode 100644 index 82ad12d340..0000000000 --- a/mobile/openapi/lib/model/maintenance_status_response_dto.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MaintenanceStatusResponseDto { - /// Returns a new [MaintenanceStatusResponseDto] instance. - MaintenanceStatusResponseDto({ - required this.action, - required this.active, - this.error = const Optional.absent(), - this.progress = const Optional.absent(), - this.task = const Optional.absent(), - }); - - MaintenanceAction action; - - bool active; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional error; - - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progress; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional task; - - @override - bool operator ==(Object other) => identical(this, other) || other is MaintenanceStatusResponseDto && - other.action == action && - other.active == active && - other.error == error && - other.progress == progress && - other.task == task; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (active.hashCode) + - (error == null ? 0 : error!.hashCode) + - (progress == null ? 0 : progress!.hashCode) + - (task == null ? 0 : task!.hashCode); - - @override - String toString() => 'MaintenanceStatusResponseDto[action=$action, active=$active, error=$error, progress=$progress, task=$task]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'active'] = this.active; - if (this.error.isPresent) { - final value = this.error.value; - json[r'error'] = value; - } - if (this.progress.isPresent) { - final value = this.progress.value; - json[r'progress'] = value; - } - if (this.task.isPresent) { - final value = this.task.value; - json[r'task'] = value; - } - return json; - } - - /// Returns a new [MaintenanceStatusResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MaintenanceStatusResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MaintenanceStatusResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MaintenanceStatusResponseDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - active: mapValueOfType(json, r'active')!, - error: json.containsKey(r'error') ? Optional.present(mapValueOfType(json, r'error')) : const Optional.absent(), - progress: json.containsKey(r'progress') ? Optional.present(json[r'progress'] == null ? null : int.parse('${json[r'progress']}')) : const Optional.absent(), - task: json.containsKey(r'task') ? Optional.present(mapValueOfType(json, r'task')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MaintenanceStatusResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MaintenanceStatusResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MaintenanceStatusResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MaintenanceStatusResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'active', - }; -} - diff --git a/mobile/openapi/lib/model/manual_job_name.dart b/mobile/openapi/lib/model/manual_job_name.dart deleted file mode 100644 index 313b50494d..0000000000 --- a/mobile/openapi/lib/model/manual_job_name.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Manual job name -enum ManualJobName { - personCleanup._(r'person-cleanup'), - tagCleanup._(r'tag-cleanup'), - userCleanup._(r'user-cleanup'), - memoryCleanup._(r'memory-cleanup'), - memoryCreate._(r'memory-create'), - backupDatabase._(r'backup-database'), - integrityMissingFiles._(r'integrity-missing-files'), - integrityUntrackedFiles._(r'integrity-untracked-files'), - integrityChecksumMismatch._(r'integrity-checksum-mismatch'), - integrityMissingFilesRefresh._(r'integrity-missing-files-refresh'), - integrityUntrackedFilesRefresh._(r'integrity-untracked-files-refresh'), - integrityChecksumMismatchRefresh._(r'integrity-checksum-mismatch-refresh'), - integrityMissingFilesDeleteAll._(r'integrity-missing-files-delete-all'), - integrityUntrackedFilesDeleteAll._(r'integrity-untracked-files-delete-all'), - integrityChecksumMismatchDeleteAll._(r'integrity-checksum-mismatch-delete-all'), - ; - - /// Instantiate a new enum with the provided value. - const ManualJobName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ManualJobName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ManualJobName? fromJson(dynamic value) => ManualJobNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ManualJobName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ManualJobName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ManualJobName] to String, -/// and [decode] dynamic data back to [ManualJobName]. -class ManualJobNameTypeTransformer { - factory ManualJobNameTypeTransformer() => _instance ??= const ManualJobNameTypeTransformer._(); - - const ManualJobNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ManualJobName data) => data._value; - - /// Returns the instance of [ManualJobName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ManualJobName? decode(dynamic data, {bool allowNull = true}) { - if (data is ManualJobName) { - return data; - } - if (data != null) { - switch (data) { - case r'person-cleanup': return ManualJobName.personCleanup; - case r'tag-cleanup': return ManualJobName.tagCleanup; - case r'user-cleanup': return ManualJobName.userCleanup; - case r'memory-cleanup': return ManualJobName.memoryCleanup; - case r'memory-create': return ManualJobName.memoryCreate; - case r'backup-database': return ManualJobName.backupDatabase; - case r'integrity-missing-files': return ManualJobName.integrityMissingFiles; - case r'integrity-untracked-files': return ManualJobName.integrityUntrackedFiles; - case r'integrity-checksum-mismatch': return ManualJobName.integrityChecksumMismatch; - case r'integrity-missing-files-refresh': return ManualJobName.integrityMissingFilesRefresh; - case r'integrity-untracked-files-refresh': return ManualJobName.integrityUntrackedFilesRefresh; - case r'integrity-checksum-mismatch-refresh': return ManualJobName.integrityChecksumMismatchRefresh; - case r'integrity-missing-files-delete-all': return ManualJobName.integrityMissingFilesDeleteAll; - case r'integrity-untracked-files-delete-all': return ManualJobName.integrityUntrackedFilesDeleteAll; - case r'integrity-checksum-mismatch-delete-all': return ManualJobName.integrityChecksumMismatchDeleteAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ManualJobNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/map_marker_response_dto.dart b/mobile/openapi/lib/model/map_marker_response_dto.dart deleted file mode 100644 index 3f19c21b6b..0000000000 --- a/mobile/openapi/lib/model/map_marker_response_dto.dart +++ /dev/null @@ -1,157 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapMarkerResponseDto { - /// Returns a new [MapMarkerResponseDto] instance. - MapMarkerResponseDto({ - required this.city, - required this.country, - required this.id, - required this.lat, - required this.lon, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// Asset ID - String id; - - /// Latitude - double lat; - - /// Longitude - double lon; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapMarkerResponseDto && - other.city == city && - other.country == country && - other.id == id && - other.lat == lat && - other.lon == lon && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (id.hashCode) + - (lat.hashCode) + - (lon.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapMarkerResponseDto[city=$city, country=$country, id=$id, lat=$lat, lon=$lon, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - json[r'id'] = this.id; - json[r'lat'] = this.lat; - json[r'lon'] = this.lon; - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapMarkerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapMarkerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapMarkerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapMarkerResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - id: mapValueOfType(json, r'id')!, - lat: mapValueOfType(json, r'lat')!, - lon: mapValueOfType(json, r'lon')!, - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapMarkerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapMarkerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapMarkerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapMarkerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'id', - 'lat', - 'lon', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart b/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart deleted file mode 100644 index 0fc30f2b88..0000000000 --- a/mobile/openapi/lib/model/map_reverse_geocode_response_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MapReverseGeocodeResponseDto { - /// Returns a new [MapReverseGeocodeResponseDto] instance. - MapReverseGeocodeResponseDto({ - required this.city, - required this.country, - required this.state, - }); - - /// City name - String? city; - - /// Country name - String? country; - - /// State/Province name - String? state; - - @override - bool operator ==(Object other) => identical(this, other) || other is MapReverseGeocodeResponseDto && - other.city == city && - other.country == country && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'MapReverseGeocodeResponseDto[city=$city, country=$country, state=$state]'; - - Map toJson() { - final json = {}; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - return json; - } - - /// Returns a new [MapReverseGeocodeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MapReverseGeocodeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MapReverseGeocodeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MapReverseGeocodeResponseDto( - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - state: mapValueOfType(json, r'state'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MapReverseGeocodeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MapReverseGeocodeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MapReverseGeocodeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MapReverseGeocodeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'city', - 'country', - 'state', - }; -} - diff --git a/mobile/openapi/lib/model/memories_response.dart b/mobile/openapi/lib/model/memories_response.dart deleted file mode 100644 index 250e214a60..0000000000 --- a/mobile/openapi/lib/model/memories_response.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoriesResponse { - /// Returns a new [MemoriesResponse] instance. - MemoriesResponse({ - required this.duration, - required this.enabled, - }); - - /// Memory duration in seconds - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int duration; - - /// Whether memories are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoriesResponse && - other.duration == duration && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duration.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'MemoriesResponse[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'duration'] = this.duration; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [MemoriesResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesResponse? fromJson(dynamic value) { - upgradeDto(value, "MemoriesResponse"); - if (value is Map) { - final json = value.cast(); - - return MemoriesResponse( - duration: mapValueOfType(json, r'duration')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'duration', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/memories_update.dart b/mobile/openapi/lib/model/memories_update.dart deleted file mode 100644 index 350cf19182..0000000000 --- a/mobile/openapi/lib/model/memories_update.dart +++ /dev/null @@ -1,128 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoriesUpdate { - /// Returns a new [MemoriesUpdate] instance. - MemoriesUpdate({ - this.duration = const Optional.absent(), - this.enabled = const Optional.absent(), - }); - - /// Memory duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional duration; - - /// Whether memories are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoriesUpdate && - other.duration == duration && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (duration == null ? 0 : duration!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'MemoriesUpdate[duration=$duration, enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [MemoriesUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoriesUpdate? fromJson(dynamic value) { - upgradeDto(value, "MemoriesUpdate"); - if (value is Map) { - final json = value.cast(); - - return MemoriesUpdate( - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoriesUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoriesUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoriesUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoriesUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/memory_create_dto.dart b/mobile/openapi/lib/model/memory_create_dto.dart deleted file mode 100644 index d032ff0c38..0000000000 --- a/mobile/openapi/lib/model/memory_create_dto.dart +++ /dev/null @@ -1,205 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryCreateDto { - /// Returns a new [MemoryCreateDto] instance. - MemoryCreateDto({ - this.assetIds = const Optional.present(const []), - required this.data, - this.hideAt = const Optional.absent(), - this.isSaved = const Optional.absent(), - required this.memoryAt, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - }); - - /// Asset IDs to associate with memory - Optional?> assetIds; - - OnThisDayDto data; - - /// Date when memory should be hidden - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideAt; - - /// Is memory saved - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isSaved; - - /// Memory date - DateTime memoryAt; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showAt; - - MemoryType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryCreateDto && - _deepEquality.equals(other.assetIds, assetIds) && - other.data == data && - other.hideAt == hideAt && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (data.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode); - - @override - String toString() => 'MemoryCreateDto[assetIds=$assetIds, data=$data, hideAt=$hideAt, isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt, showAt=$showAt, type=$type]'; - - Map toJson() { - final json = {}; - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - json[r'data'] = this.data; - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [MemoryCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryCreateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryCreateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryCreateDto( - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - data: OnThisDayDto.fromJson(json[r'data'])!, - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'memoryAt', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/memory_response_dto.dart b/mobile/openapi/lib/model/memory_response_dto.dart deleted file mode 100644 index 41a522c773..0000000000 --- a/mobile/openapi/lib/model/memory_response_dto.dart +++ /dev/null @@ -1,251 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryResponseDto { - /// Returns a new [MemoryResponseDto] instance. - MemoryResponseDto({ - this.assets = const [], - required this.createdAt, - required this.data, - this.deletedAt = const Optional.absent(), - this.hideAt = const Optional.absent(), - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - this.seenAt = const Optional.absent(), - this.showAt = const Optional.absent(), - required this.type, - required this.updatedAt, - }); - - List assets; - - /// Creation date - DateTime createdAt; - - OnThisDayDto data; - - /// Deletion date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deletedAt; - - /// Date when memory should be hidden - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideAt; - - /// Memory ID - String id; - - /// Is memory saved - bool isSaved; - - /// Memory date - DateTime memoryAt; - - /// Owner user ID - String ownerId; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - /// Date when memory should be shown - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showAt; - - MemoryType type; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryResponseDto && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.data == data && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'MemoryResponseDto[assets=$assets, createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt.isPresent) { - final value = this.deletedAt.value; - json[r'deletedAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.hideAt.isPresent) { - final value = this.hideAt.value; - json[r'hideAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.showAt.isPresent) { - final value = this.showAt.value; - json[r'showAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [MemoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: OnThisDayDto.fromJson(json[r'data'])!, - deletedAt: json.containsKey(r'deletedAt') ? Optional.present(mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - hideAt: json.containsKey(r'hideAt') ? Optional.present(mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - showAt: json.containsKey(r'showAt') ? Optional.present(mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'createdAt', - 'data', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/memory_search_order.dart b/mobile/openapi/lib/model/memory_search_order.dart deleted file mode 100644 index 6aa250459f..0000000000 --- a/mobile/openapi/lib/model/memory_search_order.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sort order -enum MemorySearchOrder { - asc._(r'asc'), - desc._(r'desc'), - random._(r'random'), - ; - - /// Instantiate a new enum with the provided value. - const MemorySearchOrder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MemorySearchOrder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MemorySearchOrder? fromJson(dynamic value) => MemorySearchOrderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MemorySearchOrder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemorySearchOrder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MemorySearchOrder] to String, -/// and [decode] dynamic data back to [MemorySearchOrder]. -class MemorySearchOrderTypeTransformer { - factory MemorySearchOrderTypeTransformer() => _instance ??= const MemorySearchOrderTypeTransformer._(); - - const MemorySearchOrderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MemorySearchOrder data) => data._value; - - /// Returns the instance of [MemorySearchOrder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MemorySearchOrder? decode(dynamic data, {bool allowNull = true}) { - if (data is MemorySearchOrder) { - return data; - } - if (data != null) { - switch (data) { - case r'asc': return MemorySearchOrder.asc; - case r'desc': return MemorySearchOrder.desc; - case r'random': return MemorySearchOrder.random; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MemorySearchOrderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/memory_statistics_response_dto.dart b/mobile/openapi/lib/model/memory_statistics_response_dto.dart deleted file mode 100644 index ae542870d9..0000000000 --- a/mobile/openapi/lib/model/memory_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryStatisticsResponseDto { - /// Returns a new [MemoryStatisticsResponseDto] instance. - MemoryStatisticsResponseDto({ - required this.total, - }); - - /// Total number of memories - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'MemoryStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [MemoryStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/memory_type.dart b/mobile/openapi/lib/model/memory_type.dart deleted file mode 100644 index 4059008fff..0000000000 --- a/mobile/openapi/lib/model/memory_type.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Memory type -enum MemoryType { - onThisDay._(r'on_this_day'), - ; - - /// Instantiate a new enum with the provided value. - const MemoryType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MemoryType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MemoryType? fromJson(dynamic value) => MemoryTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MemoryType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MemoryType] to String, -/// and [decode] dynamic data back to [MemoryType]. -class MemoryTypeTypeTransformer { - factory MemoryTypeTypeTransformer() => _instance ??= const MemoryTypeTypeTransformer._(); - - const MemoryTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MemoryType data) => data._value; - - /// Returns the instance of [MemoryType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MemoryType? decode(dynamic data, {bool allowNull = true}) { - if (data is MemoryType) { - return data; - } - if (data != null) { - switch (data) { - case r'on_this_day': return MemoryType.onThisDay; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MemoryTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/memory_update_dto.dart b/mobile/openapi/lib/model/memory_update_dto.dart deleted file mode 100644 index 43e879745c..0000000000 --- a/mobile/openapi/lib/model/memory_update_dto.dart +++ /dev/null @@ -1,146 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MemoryUpdateDto { - /// Returns a new [MemoryUpdateDto] instance. - MemoryUpdateDto({ - this.isSaved = const Optional.absent(), - this.memoryAt = const Optional.absent(), - this.seenAt = const Optional.absent(), - }); - - /// Is memory saved - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isSaved; - - /// Memory date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional memoryAt; - - /// Date when memory was seen - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional seenAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is MemoryUpdateDto && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.seenAt == seenAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isSaved == null ? 0 : isSaved!.hashCode) + - (memoryAt == null ? 0 : memoryAt!.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode); - - @override - String toString() => 'MemoryUpdateDto[isSaved=$isSaved, memoryAt=$memoryAt, seenAt=$seenAt]'; - - Map toJson() { - final json = {}; - if (this.isSaved.isPresent) { - final value = this.isSaved.value; - json[r'isSaved'] = value; - } - if (this.memoryAt.isPresent) { - final value = this.memoryAt.value; - json[r'memoryAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.seenAt.isPresent) { - final value = this.seenAt.value; - json[r'seenAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [MemoryUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MemoryUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "MemoryUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return MemoryUpdateDto( - isSaved: json.containsKey(r'isSaved') ? Optional.present(mapValueOfType(json, r'isSaved')) : const Optional.absent(), - memoryAt: json.containsKey(r'memoryAt') ? Optional.present(mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - seenAt: json.containsKey(r'seenAt') ? Optional.present(mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MemoryUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MemoryUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MemoryUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MemoryUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/merge_person_dto.dart b/mobile/openapi/lib/model/merge_person_dto.dart deleted file mode 100644 index 8a647890c3..0000000000 --- a/mobile/openapi/lib/model/merge_person_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MergePersonDto { - /// Returns a new [MergePersonDto] instance. - MergePersonDto({ - this.ids = const [], - }); - - /// Person IDs to merge - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is MergePersonDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'MergePersonDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [MergePersonDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MergePersonDto? fromJson(dynamic value) { - upgradeDto(value, "MergePersonDto"); - if (value is Map) { - final json = value.cast(); - - return MergePersonDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MergePersonDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MergePersonDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MergePersonDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MergePersonDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/metadata_search_dto.dart b/mobile/openapi/lib/model/metadata_search_dto.dart deleted file mode 100644 index b0afd292ee..0000000000 --- a/mobile/openapi/lib/model/metadata_search_dto.dart +++ /dev/null @@ -1,767 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MetadataSearchDto { - /// Returns a new [MetadataSearchDto] instance. - MetadataSearchDto({ - this.albumIds = const Optional.present(const []), - this.checksum = const Optional.absent(), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.encodedVideoPath = const Optional.absent(), - this.id = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.order = const Optional.absent(), - this.originalFileName = const Optional.absent(), - this.originalPath = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.previewPath = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.thumbnailPath = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by file checksum - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional checksum; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Filter by encoded video file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional encodedVideoPath; - - /// Filter by asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional id; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - /// Filter by original file name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalFileName; - - /// Filter by original file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional originalPath; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by preview file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional previewPath; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by thumbnail file path - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thumbnailPath; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - /// Include people data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is MetadataSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.checksum == checksum && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.encodedVideoPath == encodedVideoPath && - other.id == id && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.order == order && - other.originalFileName == originalFileName && - other.originalPath == originalPath && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.previewPath == previewPath && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.thumbnailPath == thumbnailPath && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (checksum == null ? 0 : checksum!.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) + - (id == null ? 0 : id!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (order == null ? 0 : order!.hashCode) + - (originalFileName == null ? 0 : originalFileName!.hashCode) + - (originalPath == null ? 0 : originalPath!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (previewPath == null ? 0 : previewPath!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (thumbnailPath == null ? 0 : thumbnailPath!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'MetadataSearchDto[albumIds=$albumIds, checksum=$checksum, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, encodedVideoPath=$encodedVideoPath, id=$id, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, order=$order, originalFileName=$originalFileName, originalPath=$originalPath, page=$page, personIds=$personIds, previewPath=$previewPath, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, thumbnailPath=$thumbnailPath, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.checksum.isPresent) { - final value = this.checksum.value; - json[r'checksum'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.encodedVideoPath.isPresent) { - final value = this.encodedVideoPath.value; - json[r'encodedVideoPath'] = value; - } - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - if (this.originalFileName.isPresent) { - final value = this.originalFileName.value; - json[r'originalFileName'] = value; - } - if (this.originalPath.isPresent) { - final value = this.originalPath.value; - json[r'originalPath'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.previewPath.isPresent) { - final value = this.previewPath.value; - json[r'previewPath'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.thumbnailPath.isPresent) { - final value = this.thumbnailPath.value; - json[r'thumbnailPath'] = value; - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [MetadataSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MetadataSearchDto? fromJson(dynamic value) { - upgradeDto(value, "MetadataSearchDto"); - if (value is Map) { - final json = value.cast(); - - return MetadataSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - checksum: json.containsKey(r'checksum') ? Optional.present(mapValueOfType(json, r'checksum')) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - encodedVideoPath: json.containsKey(r'encodedVideoPath') ? Optional.present(mapValueOfType(json, r'encodedVideoPath')) : const Optional.absent(), - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - originalFileName: json.containsKey(r'originalFileName') ? Optional.present(mapValueOfType(json, r'originalFileName')) : const Optional.absent(), - originalPath: json.containsKey(r'originalPath') ? Optional.present(mapValueOfType(json, r'originalPath')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - previewPath: json.containsKey(r'previewPath') ? Optional.present(mapValueOfType(json, r'previewPath')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - thumbnailPath: json.containsKey(r'thumbnailPath') ? Optional.present(mapValueOfType(json, r'thumbnailPath')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MetadataSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MetadataSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MetadataSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MetadataSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/mirror_axis.dart b/mobile/openapi/lib/model/mirror_axis.dart deleted file mode 100644 index 38fc28adde..0000000000 --- a/mobile/openapi/lib/model/mirror_axis.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Axis to mirror along -enum MirrorAxis { - horizontal._(r'horizontal'), - vertical._(r'vertical'), - ; - - /// Instantiate a new enum with the provided value. - const MirrorAxis._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [MirrorAxis] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static MirrorAxis? fromJson(dynamic value) => MirrorAxisTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [MirrorAxis] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MirrorAxis.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [MirrorAxis] to String, -/// and [decode] dynamic data back to [MirrorAxis]. -class MirrorAxisTypeTransformer { - factory MirrorAxisTypeTransformer() => _instance ??= const MirrorAxisTypeTransformer._(); - - const MirrorAxisTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(MirrorAxis data) => data._value; - - /// Returns the instance of [MirrorAxis] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - MirrorAxis? decode(dynamic data, {bool allowNull = true}) { - if (data is MirrorAxis) { - return data; - } - if (data != null) { - switch (data) { - case r'horizontal': return MirrorAxis.horizontal; - case r'vertical': return MirrorAxis.vertical; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static MirrorAxisTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/mirror_parameters.dart b/mobile/openapi/lib/model/mirror_parameters.dart deleted file mode 100644 index 78c3da786c..0000000000 --- a/mobile/openapi/lib/model/mirror_parameters.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class MirrorParameters { - /// Returns a new [MirrorParameters] instance. - MirrorParameters({ - required this.axis, - }); - - MirrorAxis axis; - - @override - bool operator ==(Object other) => identical(this, other) || other is MirrorParameters && - other.axis == axis; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (axis.hashCode); - - @override - String toString() => 'MirrorParameters[axis=$axis]'; - - Map toJson() { - final json = {}; - json[r'axis'] = this.axis; - return json; - } - - /// Returns a new [MirrorParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static MirrorParameters? fromJson(dynamic value) { - upgradeDto(value, "MirrorParameters"); - if (value is Map) { - final json = value.cast(); - - return MirrorParameters( - axis: MirrorAxis.fromJson(json[r'axis'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = MirrorParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = MirrorParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of MirrorParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = MirrorParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'axis', - }; -} - diff --git a/mobile/openapi/lib/model/notification_create_dto.dart b/mobile/openapi/lib/model/notification_create_dto.dart deleted file mode 100644 index b7f3528156..0000000000 --- a/mobile/openapi/lib/model/notification_create_dto.dart +++ /dev/null @@ -1,176 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationCreateDto { - /// Returns a new [NotificationCreateDto] instance. - NotificationCreateDto({ - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - this.level = const Optional.absent(), - this.readAt = const Optional.absent(), - required this.title, - this.type = const Optional.absent(), - required this.userId, - }); - - /// Additional notification data - Optional?> data; - - /// Notification description - Optional description; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional level; - - /// Date when notification was read - Optional readAt; - - /// Notification title - String title; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// User ID to send notification to - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationCreateDto && - _deepEquality.equals(other.data, data) && - other.description == description && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (level == null ? 0 : level!.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type == null ? 0 : type!.hashCode) + - (userId.hashCode); - - @override - String toString() => 'NotificationCreateDto[data=$data, description=$description, level=$level, readAt=$readAt, title=$title, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.level.isPresent) { - final value = this.level.value; - json[r'level'] = value; - } - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [NotificationCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationCreateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationCreateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationCreateDto( - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - level: json.containsKey(r'level') ? Optional.present(NotificationLevel.fromJson(json[r'level'])) : const Optional.absent(), - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: json.containsKey(r'type') ? Optional.present(NotificationType.fromJson(json[r'type'])) : const Optional.absent(), - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'title', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/notification_delete_all_dto.dart b/mobile/openapi/lib/model/notification_delete_all_dto.dart deleted file mode 100644 index 1b398a4f33..0000000000 --- a/mobile/openapi/lib/model/notification_delete_all_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationDeleteAllDto { - /// Returns a new [NotificationDeleteAllDto] instance. - NotificationDeleteAllDto({ - this.ids = const [], - }); - - /// Notification IDs to delete - List ids; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDeleteAllDto && - _deepEquality.equals(other.ids, ids); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode); - - @override - String toString() => 'NotificationDeleteAllDto[ids=$ids]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - return json; - } - - /// Returns a new [NotificationDeleteAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDeleteAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDeleteAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDeleteAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDeleteAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDeleteAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDeleteAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDeleteAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_dto.dart b/mobile/openapi/lib/model/notification_dto.dart deleted file mode 100644 index 7609a6a021..0000000000 --- a/mobile/openapi/lib/model/notification_dto.dart +++ /dev/null @@ -1,183 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationDto { - /// Returns a new [NotificationDto] instance. - NotificationDto({ - required this.createdAt, - this.data = const Optional.present(const {}), - this.description = const Optional.absent(), - required this.id, - required this.level, - this.readAt = const Optional.absent(), - required this.title, - required this.type, - }); - - /// Creation date - DateTime createdAt; - - /// Additional notification data - Optional?> data; - - /// Notification description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Notification ID - String id; - - NotificationLevel level; - - /// Date when notification was read - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional readAt; - - /// Notification title - String title; - - NotificationType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationDto && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.description == description && - other.id == id && - other.level == level && - other.readAt == readAt && - other.title == title && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (description == null ? 0 : description!.hashCode) + - (id.hashCode) + - (level.hashCode) + - (readAt == null ? 0 : readAt!.hashCode) + - (title.hashCode) + - (type.hashCode); - - @override - String toString() => 'NotificationDto[createdAt=$createdAt, data=$data, description=$description, id=$id, level=$level, readAt=$readAt, title=$title, type=$type]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.data.isPresent) { - final value = this.data.value; - json[r'data'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - json[r'id'] = this.id; - json[r'level'] = this.level; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - json[r'title'] = this.title; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [NotificationDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: json.containsKey(r'data') ? Optional.present(mapCastOfType(json, r'data')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - level: NotificationLevel.fromJson(json[r'level'])!, - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - type: NotificationType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'level', - 'title', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/notification_level.dart b/mobile/openapi/lib/model/notification_level.dart deleted file mode 100644 index e0e8c91b02..0000000000 --- a/mobile/openapi/lib/model/notification_level.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Notification level -enum NotificationLevel { - success._(r'success'), - error._(r'error'), - warning._(r'warning'), - info._(r'info'), - ; - - /// Instantiate a new enum with the provided value. - const NotificationLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [NotificationLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static NotificationLevel? fromJson(dynamic value) => NotificationLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [NotificationLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationLevel] to String, -/// and [decode] dynamic data back to [NotificationLevel]. -class NotificationLevelTypeTransformer { - factory NotificationLevelTypeTransformer() => _instance ??= const NotificationLevelTypeTransformer._(); - - const NotificationLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(NotificationLevel data) => data._value; - - /// Returns the instance of [NotificationLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - NotificationLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is NotificationLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'success': return NotificationLevel.success; - case r'error': return NotificationLevel.error; - case r'warning': return NotificationLevel.warning; - case r'info': return NotificationLevel.info; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static NotificationLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_type.dart b/mobile/openapi/lib/model/notification_type.dart deleted file mode 100644 index 5ff7aecbb5..0000000000 --- a/mobile/openapi/lib/model/notification_type.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Notification type -enum NotificationType { - jobFailed._(r'JobFailed'), - backupFailed._(r'BackupFailed'), - systemMessage._(r'SystemMessage'), - albumInvite._(r'AlbumInvite'), - albumUpdate._(r'AlbumUpdate'), - custom._(r'Custom'), - ; - - /// Instantiate a new enum with the provided value. - const NotificationType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [NotificationType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static NotificationType? fromJson(dynamic value) => NotificationTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [NotificationType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [NotificationType] to String, -/// and [decode] dynamic data back to [NotificationType]. -class NotificationTypeTypeTransformer { - factory NotificationTypeTypeTransformer() => _instance ??= const NotificationTypeTypeTransformer._(); - - const NotificationTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(NotificationType data) => data._value; - - /// Returns the instance of [NotificationType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - NotificationType? decode(dynamic data, {bool allowNull = true}) { - if (data is NotificationType) { - return data; - } - if (data != null) { - switch (data) { - case r'JobFailed': return NotificationType.jobFailed; - case r'BackupFailed': return NotificationType.backupFailed; - case r'SystemMessage': return NotificationType.systemMessage; - case r'AlbumInvite': return NotificationType.albumInvite; - case r'AlbumUpdate': return NotificationType.albumUpdate; - case r'Custom': return NotificationType.custom; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static NotificationTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/notification_update_all_dto.dart b/mobile/openapi/lib/model/notification_update_all_dto.dart deleted file mode 100644 index e3d15c5519..0000000000 --- a/mobile/openapi/lib/model/notification_update_all_dto.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationUpdateAllDto { - /// Returns a new [NotificationUpdateAllDto] instance. - NotificationUpdateAllDto({ - this.ids = const [], - this.readAt = const Optional.absent(), - }); - - /// Notification IDs to update - List ids; - - /// Date when notifications were read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateAllDto && - _deepEquality.equals(other.ids, ids) && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ids.hashCode) + - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateAllDto[ids=$ids, readAt=$readAt]'; - - Map toJson() { - final json = {}; - json[r'ids'] = this.ids; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateAllDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateAllDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateAllDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateAllDto( - ids: json[r'ids'] is Iterable - ? (json[r'ids'] as Iterable).cast().toList(growable: false) - : const [], - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateAllDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateAllDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateAllDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateAllDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ids', - }; -} - diff --git a/mobile/openapi/lib/model/notification_update_dto.dart b/mobile/openapi/lib/model/notification_update_dto.dart deleted file mode 100644 index 73a14ec7cd..0000000000 --- a/mobile/openapi/lib/model/notification_update_dto.dart +++ /dev/null @@ -1,104 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class NotificationUpdateDto { - /// Returns a new [NotificationUpdateDto] instance. - NotificationUpdateDto({ - this.readAt = const Optional.absent(), - }); - - /// Date when notification was read - Optional readAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is NotificationUpdateDto && - other.readAt == readAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (readAt == null ? 0 : readAt!.hashCode); - - @override - String toString() => 'NotificationUpdateDto[readAt=$readAt]'; - - Map toJson() { - final json = {}; - if (this.readAt.isPresent) { - final value = this.readAt.value; - json[r'readAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - return json; - } - - /// Returns a new [NotificationUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static NotificationUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "NotificationUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return NotificationUpdateDto( - readAt: json.containsKey(r'readAt') ? Optional.present(mapDateTime(json, r'readAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = NotificationUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = NotificationUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of NotificationUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = NotificationUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart b/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart deleted file mode 100644 index 7eedc45673..0000000000 --- a/mobile/openapi/lib/model/o_auth_authorize_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthAuthorizeResponseDto { - /// Returns a new [OAuthAuthorizeResponseDto] instance. - OAuthAuthorizeResponseDto({ - required this.url, - }); - - /// OAuth authorization URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthAuthorizeResponseDto && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (url.hashCode); - - @override - String toString() => 'OAuthAuthorizeResponseDto[url=$url]'; - - Map toJson() { - final json = {}; - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthAuthorizeResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthAuthorizeResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthAuthorizeResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthAuthorizeResponseDto( - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthAuthorizeResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthAuthorizeResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthAuthorizeResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthAuthorizeResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart deleted file mode 100644 index 61de33e1a6..0000000000 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthCallbackDto { - /// Returns a new [OAuthCallbackDto] instance. - OAuthCallbackDto({ - this.codeVerifier = const Optional.absent(), - this.state = const Optional.absent(), - required this.url, - }); - - /// OAuth code verifier (PKCE) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional codeVerifier; - - /// OAuth state parameter - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional state; - - /// OAuth callback URL - String url; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthCallbackDto && - other.codeVerifier == codeVerifier && - other.state == state && - other.url == url; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeVerifier == null ? 0 : codeVerifier!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (url.hashCode); - - @override - String toString() => 'OAuthCallbackDto[codeVerifier=$codeVerifier, state=$state, url=$url]'; - - Map toJson() { - final json = {}; - if (this.codeVerifier.isPresent) { - final value = this.codeVerifier.value; - json[r'codeVerifier'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - json[r'url'] = this.url; - return json; - } - - /// Returns a new [OAuthCallbackDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthCallbackDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthCallbackDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthCallbackDto( - codeVerifier: json.containsKey(r'codeVerifier') ? Optional.present(mapValueOfType(json, r'codeVerifier')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - url: mapValueOfType(json, r'url')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthCallbackDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthCallbackDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthCallbackDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'url', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart deleted file mode 100644 index fb9f95dd92..0000000000 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OAuthConfigDto { - /// Returns a new [OAuthConfigDto] instance. - OAuthConfigDto({ - this.codeChallenge = const Optional.absent(), - required this.redirectUri, - this.state = const Optional.absent(), - }); - - /// OAuth code challenge (PKCE) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional codeChallenge; - - /// OAuth redirect URI - String redirectUri; - - /// OAuth state parameter - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional state; - - @override - bool operator ==(Object other) => identical(this, other) || other is OAuthConfigDto && - other.codeChallenge == codeChallenge && - other.redirectUri == redirectUri && - other.state == state; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (codeChallenge == null ? 0 : codeChallenge!.hashCode) + - (redirectUri.hashCode) + - (state == null ? 0 : state!.hashCode); - - @override - String toString() => 'OAuthConfigDto[codeChallenge=$codeChallenge, redirectUri=$redirectUri, state=$state]'; - - Map toJson() { - final json = {}; - if (this.codeChallenge.isPresent) { - final value = this.codeChallenge.value; - json[r'codeChallenge'] = value; - } - json[r'redirectUri'] = this.redirectUri; - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - return json; - } - - /// Returns a new [OAuthConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OAuthConfigDto? fromJson(dynamic value) { - upgradeDto(value, "OAuthConfigDto"); - if (value is Map) { - final json = value.cast(); - - return OAuthConfigDto( - codeChallenge: json.containsKey(r'codeChallenge') ? Optional.present(mapValueOfType(json, r'codeChallenge')) : const Optional.absent(), - redirectUri: mapValueOfType(json, r'redirectUri')!, - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OAuthConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OAuthConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OAuthConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'redirectUri', - }; -} - diff --git a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart b/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart deleted file mode 100644 index f35eb25277..0000000000 --- a/mobile/openapi/lib/model/o_auth_token_endpoint_auth_method.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// OAuth token endpoint auth method -enum OAuthTokenEndpointAuthMethod { - clientSecretPost._(r'client_secret_post'), - clientSecretBasic._(r'client_secret_basic'), - ; - - /// Instantiate a new enum with the provided value. - const OAuthTokenEndpointAuthMethod._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static OAuthTokenEndpointAuthMethod? fromJson(dynamic value) => OAuthTokenEndpointAuthMethodTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [OAuthTokenEndpointAuthMethod] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OAuthTokenEndpointAuthMethod.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [OAuthTokenEndpointAuthMethod] to String, -/// and [decode] dynamic data back to [OAuthTokenEndpointAuthMethod]. -class OAuthTokenEndpointAuthMethodTypeTransformer { - factory OAuthTokenEndpointAuthMethodTypeTransformer() => _instance ??= const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - const OAuthTokenEndpointAuthMethodTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(OAuthTokenEndpointAuthMethod data) => data._value; - - /// Returns the instance of [OAuthTokenEndpointAuthMethod] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - OAuthTokenEndpointAuthMethod? decode(dynamic data, {bool allowNull = true}) { - if (data is OAuthTokenEndpointAuthMethod) { - return data; - } - if (data != null) { - switch (data) { - case r'client_secret_post': return OAuthTokenEndpointAuthMethod.clientSecretPost; - case r'client_secret_basic': return OAuthTokenEndpointAuthMethod.clientSecretBasic; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static OAuthTokenEndpointAuthMethodTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/ocr_config.dart b/mobile/openapi/lib/model/ocr_config.dart deleted file mode 100644 index d58c8af3ee..0000000000 --- a/mobile/openapi/lib/model/ocr_config.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OcrConfig { - /// Returns a new [OcrConfig] instance. - OcrConfig({ - required this.enabled, - required this.maxResolution, - required this.minDetectionScore, - required this.minRecognitionScore, - required this.modelName, - }); - - /// Whether the task is enabled - bool enabled; - - /// Maximum resolution for OCR processing - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int maxResolution; - - /// Minimum confidence score for text detection - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minDetectionScore; - - /// Minimum confidence score for text recognition - /// - /// Minimum value: 0.1 - /// Maximum value: 1 - double minRecognitionScore; - - /// Name of the model to use - String modelName; - - @override - bool operator ==(Object other) => identical(this, other) || other is OcrConfig && - other.enabled == enabled && - other.maxResolution == maxResolution && - other.minDetectionScore == minDetectionScore && - other.minRecognitionScore == minRecognitionScore && - other.modelName == modelName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (maxResolution.hashCode) + - (minDetectionScore.hashCode) + - (minRecognitionScore.hashCode) + - (modelName.hashCode); - - @override - String toString() => 'OcrConfig[enabled=$enabled, maxResolution=$maxResolution, minDetectionScore=$minDetectionScore, minRecognitionScore=$minRecognitionScore, modelName=$modelName]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'maxResolution'] = this.maxResolution; - json[r'minDetectionScore'] = this.minDetectionScore; - json[r'minRecognitionScore'] = this.minRecognitionScore; - json[r'modelName'] = this.modelName; - return json; - } - - /// Returns a new [OcrConfig] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OcrConfig? fromJson(dynamic value) { - upgradeDto(value, "OcrConfig"); - if (value is Map) { - final json = value.cast(); - - return OcrConfig( - enabled: mapValueOfType(json, r'enabled')!, - maxResolution: mapValueOfType(json, r'maxResolution')!, - minDetectionScore: mapValueOfType(json, r'minDetectionScore')!, - minRecognitionScore: mapValueOfType(json, r'minRecognitionScore')!, - modelName: mapValueOfType(json, r'modelName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OcrConfig.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OcrConfig.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OcrConfig-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OcrConfig.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'maxResolution', - 'minDetectionScore', - 'minRecognitionScore', - 'modelName', - }; -} - diff --git a/mobile/openapi/lib/model/on_this_day_dto.dart b/mobile/openapi/lib/model/on_this_day_dto.dart deleted file mode 100644 index 77ae96532f..0000000000 --- a/mobile/openapi/lib/model/on_this_day_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnThisDayDto { - /// Returns a new [OnThisDayDto] instance. - OnThisDayDto({ - required this.year, - }); - - /// Year for on this day memory - /// - /// Minimum value: 1000 - /// Maximum value: 9999 - int year; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnThisDayDto && - other.year == year; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (year.hashCode); - - @override - String toString() => 'OnThisDayDto[year=$year]'; - - Map toJson() { - final json = {}; - json[r'year'] = this.year; - return json; - } - - /// Returns a new [OnThisDayDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnThisDayDto? fromJson(dynamic value) { - upgradeDto(value, "OnThisDayDto"); - if (value is Map) { - final json = value.cast(); - - return OnThisDayDto( - year: mapValueOfType(json, r'year')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnThisDayDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnThisDayDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnThisDayDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnThisDayDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'year', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_dto.dart b/mobile/openapi/lib/model/onboarding_dto.dart deleted file mode 100644 index 8499bc9b9a..0000000000 --- a/mobile/openapi/lib/model/onboarding_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnboardingDto { - /// Returns a new [OnboardingDto] instance. - OnboardingDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/onboarding_response_dto.dart b/mobile/openapi/lib/model/onboarding_response_dto.dart deleted file mode 100644 index 2b0dbe2b96..0000000000 --- a/mobile/openapi/lib/model/onboarding_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class OnboardingResponseDto { - /// Returns a new [OnboardingResponseDto] instance. - OnboardingResponseDto({ - required this.isOnboarded, - }); - - /// Is user onboarded - bool isOnboarded; - - @override - bool operator ==(Object other) => identical(this, other) || other is OnboardingResponseDto && - other.isOnboarded == isOnboarded; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isOnboarded.hashCode); - - @override - String toString() => 'OnboardingResponseDto[isOnboarded=$isOnboarded]'; - - Map toJson() { - final json = {}; - json[r'isOnboarded'] = this.isOnboarded; - return json; - } - - /// Returns a new [OnboardingResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static OnboardingResponseDto? fromJson(dynamic value) { - upgradeDto(value, "OnboardingResponseDto"); - if (value is Map) { - final json = value.cast(); - - return OnboardingResponseDto( - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = OnboardingResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = OnboardingResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of OnboardingResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = OnboardingResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isOnboarded', - }; -} - diff --git a/mobile/openapi/lib/model/partner_create_dto.dart b/mobile/openapi/lib/model/partner_create_dto.dart deleted file mode 100644 index 30aa96ff30..0000000000 --- a/mobile/openapi/lib/model/partner_create_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerCreateDto { - /// Returns a new [PartnerCreateDto] instance. - PartnerCreateDto({ - required this.sharedWithId, - }); - - /// User ID to share with - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerCreateDto && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedWithId.hashCode); - - @override - String toString() => 'PartnerCreateDto[sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [PartnerCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerCreateDto( - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/partner_direction.dart b/mobile/openapi/lib/model/partner_direction.dart deleted file mode 100644 index 7d8f224863..0000000000 --- a/mobile/openapi/lib/model/partner_direction.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Partner direction -enum PartnerDirection { - sharedBy._(r'shared-by'), - sharedWith._(r'shared-with'), - ; - - /// Instantiate a new enum with the provided value. - const PartnerDirection._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [PartnerDirection] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static PartnerDirection? fromJson(dynamic value) => PartnerDirectionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [PartnerDirection] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerDirection.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [PartnerDirection] to String, -/// and [decode] dynamic data back to [PartnerDirection]. -class PartnerDirectionTypeTransformer { - factory PartnerDirectionTypeTransformer() => _instance ??= const PartnerDirectionTypeTransformer._(); - - const PartnerDirectionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(PartnerDirection data) => data._value; - - /// Returns the instance of [PartnerDirection] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - PartnerDirection? decode(dynamic data, {bool allowNull = true}) { - if (data is PartnerDirection) { - return data; - } - if (data != null) { - switch (data) { - case r'shared-by': return PartnerDirection.sharedBy; - case r'shared-with': return PartnerDirection.sharedWith; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static PartnerDirectionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/partner_response_dto.dart b/mobile/openapi/lib/model/partner_response_dto.dart deleted file mode 100644 index 967c5b930b..0000000000 --- a/mobile/openapi/lib/model/partner_response_dto.dart +++ /dev/null @@ -1,161 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerResponseDto { - /// Returns a new [PartnerResponseDto] instance. - PartnerResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - this.inTimeline = const Optional.absent(), - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// Show in timeline - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional inTimeline; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.inTimeline == inTimeline && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (inTimeline == null ? 0 : inTimeline!.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'PartnerResponseDto[avatarColor=$avatarColor, email=$email, id=$id, inTimeline=$inTimeline, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - if (this.inTimeline.isPresent) { - final value = this.inTimeline.value; - json[r'inTimeline'] = value; - } - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [PartnerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - inTimeline: json.containsKey(r'inTimeline') ? Optional.present(mapValueOfType(json, r'inTimeline')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/partner_update_dto.dart b/mobile/openapi/lib/model/partner_update_dto.dart deleted file mode 100644 index db3516e3a1..0000000000 --- a/mobile/openapi/lib/model/partner_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PartnerUpdateDto { - /// Returns a new [PartnerUpdateDto] instance. - PartnerUpdateDto({ - required this.inTimeline, - }); - - /// Show partner assets in timeline - bool inTimeline; - - @override - bool operator ==(Object other) => identical(this, other) || other is PartnerUpdateDto && - other.inTimeline == inTimeline; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode); - - @override - String toString() => 'PartnerUpdateDto[inTimeline=$inTimeline]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - return json; - } - - /// Returns a new [PartnerUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PartnerUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PartnerUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PartnerUpdateDto( - inTimeline: mapValueOfType(json, r'inTimeline')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PartnerUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PartnerUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PartnerUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PartnerUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - }; -} - diff --git a/mobile/openapi/lib/model/people_response.dart b/mobile/openapi/lib/model/people_response.dart deleted file mode 100644 index 838d1e2324..0000000000 --- a/mobile/openapi/lib/model/people_response.dart +++ /dev/null @@ -1,129 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleResponse { - /// Returns a new [PeopleResponse] instance. - PeopleResponse({ - required this.enabled, - this.minimumFaces = const Optional.absent(), - required this.sidebarWeb, - }); - - /// Whether people are enabled - bool enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponse && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'PeopleResponse[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [PeopleResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponse? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponse"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponse( - enabled: mapValueOfType(json, r'enabled')!, - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/people_response_dto.dart b/mobile/openapi/lib/model/people_response_dto.dart deleted file mode 100644 index f9fc157239..0000000000 --- a/mobile/openapi/lib/model/people_response_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleResponseDto { - /// Returns a new [PeopleResponseDto] instance. - PeopleResponseDto({ - this.hasNextPage = const Optional.absent(), - required this.hidden, - this.people = const [], - required this.total, - }); - - /// Whether there are more pages - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hasNextPage; - - /// Number of hidden people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int hidden; - - List people; - - /// Total number of people - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleResponseDto && - other.hasNextPage == hasNextPage && - other.hidden == hidden && - _deepEquality.equals(other.people, people) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hasNextPage == null ? 0 : hasNextPage!.hashCode) + - (hidden.hashCode) + - (people.hashCode) + - (total.hashCode); - - @override - String toString() => 'PeopleResponseDto[hasNextPage=$hasNextPage, hidden=$hidden, people=$people, total=$total]'; - - Map toJson() { - final json = {}; - if (this.hasNextPage.isPresent) { - final value = this.hasNextPage.value; - json[r'hasNextPage'] = value; - } - json[r'hidden'] = this.hidden; - json[r'people'] = this.people; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [PeopleResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleResponseDto( - hasNextPage: json.containsKey(r'hasNextPage') ? Optional.present(mapValueOfType(json, r'hasNextPage')) : const Optional.absent(), - hidden: mapValueOfType(json, r'hidden')!, - people: PersonResponseDto.listFromJson(json[r'people']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hidden', - 'people', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/people_update.dart b/mobile/openapi/lib/model/people_update.dart deleted file mode 100644 index ea8ae73138..0000000000 --- a/mobile/openapi/lib/model/people_update.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdate { - /// Returns a new [PeopleUpdate] instance. - PeopleUpdate({ - this.enabled = const Optional.absent(), - this.minimumFaces = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether people are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// People face threshold - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional minimumFaces; - - /// Whether people appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdate && - other.enabled == enabled && - other.minimumFaces == minimumFaces && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (minimumFaces == null ? 0 : minimumFaces!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'PeopleUpdate[enabled=$enabled, minimumFaces=$minimumFaces, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.minimumFaces.isPresent) { - final value = this.minimumFaces.value; - json[r'minimumFaces'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdate? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdate"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - minimumFaces: json.containsKey(r'minimumFaces') ? Optional.present(json[r'minimumFaces'] == null ? null : int.parse('${json[r'minimumFaces']}')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/people_update_dto.dart b/mobile/openapi/lib/model/people_update_dto.dart deleted file mode 100644 index c9ce74d659..0000000000 --- a/mobile/openapi/lib/model/people_update_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdateDto { - /// Returns a new [PeopleUpdateDto] instance. - PeopleUpdateDto({ - this.people = const [], - }); - - /// People to update - List people; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateDto && - _deepEquality.equals(other.people, people); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (people.hashCode); - - @override - String toString() => 'PeopleUpdateDto[people=$people]'; - - Map toJson() { - final json = {}; - json[r'people'] = this.people; - return json; - } - - /// Returns a new [PeopleUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateDto( - people: PeopleUpdateItem.listFromJson(json[r'people']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'people', - }; -} - diff --git a/mobile/openapi/lib/model/people_update_item.dart b/mobile/openapi/lib/model/people_update_item.dart deleted file mode 100644 index 9ebbd93e28..0000000000 --- a/mobile/openapi/lib/model/people_update_item.dart +++ /dev/null @@ -1,190 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PeopleUpdateItem { - /// Returns a new [PeopleUpdateItem] instance. - PeopleUpdateItem({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional featureFaceAssetId; - - /// Person ID - String id; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PeopleUpdateItem && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PeopleUpdateItem[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PeopleUpdateItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PeopleUpdateItem? fromJson(dynamic value) { - upgradeDto(value, "PeopleUpdateItem"); - if (value is Map) { - final json = value.cast(); - - return PeopleUpdateItem( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PeopleUpdateItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PeopleUpdateItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PeopleUpdateItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PeopleUpdateItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/permission.dart b/mobile/openapi/lib/model/permission.dart deleted file mode 100644 index 1502dae59f..0000000000 --- a/mobile/openapi/lib/model/permission.dart +++ /dev/null @@ -1,396 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// List of permissions -enum Permission { - all._(r'all'), - activityPeriodCreate._(r'activity.create'), - activityPeriodRead._(r'activity.read'), - activityPeriodUpdate._(r'activity.update'), - activityPeriodDelete._(r'activity.delete'), - activityPeriodStatistics._(r'activity.statistics'), - apiKeyPeriodCreate._(r'apiKey.create'), - apiKeyPeriodRead._(r'apiKey.read'), - apiKeyPeriodUpdate._(r'apiKey.update'), - apiKeyPeriodDelete._(r'apiKey.delete'), - assetPeriodRead._(r'asset.read'), - assetPeriodUpdate._(r'asset.update'), - assetPeriodDelete._(r'asset.delete'), - assetPeriodStatistics._(r'asset.statistics'), - assetPeriodShare._(r'asset.share'), - assetPeriodView._(r'asset.view'), - assetPeriodDownload._(r'asset.download'), - assetPeriodUpload._(r'asset.upload'), - assetPeriodCopy._(r'asset.copy'), - assetPeriodDerive._(r'asset.derive'), - assetPeriodEditPeriodGet._(r'asset.edit.get'), - assetPeriodEditPeriodCreate._(r'asset.edit.create'), - assetPeriodEditPeriodDelete._(r'asset.edit.delete'), - albumPeriodCreate._(r'album.create'), - albumPeriodRead._(r'album.read'), - albumPeriodUpdate._(r'album.update'), - albumPeriodDelete._(r'album.delete'), - albumPeriodStatistics._(r'album.statistics'), - albumPeriodShare._(r'album.share'), - albumPeriodDownload._(r'album.download'), - albumAssetPeriodCreate._(r'albumAsset.create'), - albumAssetPeriodDelete._(r'albumAsset.delete'), - albumUserPeriodCreate._(r'albumUser.create'), - albumUserPeriodUpdate._(r'albumUser.update'), - albumUserPeriodDelete._(r'albumUser.delete'), - authPeriodChangePassword._(r'auth.changePassword'), - authDevicePeriodDelete._(r'authDevice.delete'), - archivePeriodRead._(r'archive.read'), - backupPeriodList._(r'backup.list'), - backupPeriodDownload._(r'backup.download'), - backupPeriodUpload._(r'backup.upload'), - backupPeriodDelete._(r'backup.delete'), - duplicatePeriodRead._(r'duplicate.read'), - duplicatePeriodDelete._(r'duplicate.delete'), - facePeriodCreate._(r'face.create'), - facePeriodRead._(r'face.read'), - facePeriodUpdate._(r'face.update'), - facePeriodDelete._(r'face.delete'), - folderPeriodRead._(r'folder.read'), - jobPeriodCreate._(r'job.create'), - jobPeriodRead._(r'job.read'), - libraryPeriodCreate._(r'library.create'), - libraryPeriodRead._(r'library.read'), - libraryPeriodUpdate._(r'library.update'), - libraryPeriodDelete._(r'library.delete'), - libraryPeriodStatistics._(r'library.statistics'), - timelinePeriodRead._(r'timeline.read'), - timelinePeriodDownload._(r'timeline.download'), - maintenance._(r'maintenance'), - mapPeriodRead._(r'map.read'), - mapPeriodSearch._(r'map.search'), - memoryPeriodCreate._(r'memory.create'), - memoryPeriodRead._(r'memory.read'), - memoryPeriodUpdate._(r'memory.update'), - memoryPeriodDelete._(r'memory.delete'), - memoryPeriodStatistics._(r'memory.statistics'), - memoryAssetPeriodCreate._(r'memoryAsset.create'), - memoryAssetPeriodDelete._(r'memoryAsset.delete'), - notificationPeriodCreate._(r'notification.create'), - notificationPeriodRead._(r'notification.read'), - notificationPeriodUpdate._(r'notification.update'), - notificationPeriodDelete._(r'notification.delete'), - partnerPeriodCreate._(r'partner.create'), - partnerPeriodRead._(r'partner.read'), - partnerPeriodUpdate._(r'partner.update'), - partnerPeriodDelete._(r'partner.delete'), - personPeriodCreate._(r'person.create'), - personPeriodRead._(r'person.read'), - personPeriodUpdate._(r'person.update'), - personPeriodDelete._(r'person.delete'), - personPeriodStatistics._(r'person.statistics'), - personPeriodMerge._(r'person.merge'), - personPeriodReassign._(r'person.reassign'), - pinCodePeriodCreate._(r'pinCode.create'), - pinCodePeriodUpdate._(r'pinCode.update'), - pinCodePeriodDelete._(r'pinCode.delete'), - pluginPeriodCreate._(r'plugin.create'), - pluginPeriodRead._(r'plugin.read'), - pluginPeriodUpdate._(r'plugin.update'), - pluginPeriodDelete._(r'plugin.delete'), - serverPeriodAbout._(r'server.about'), - serverPeriodApkLinks._(r'server.apkLinks'), - serverPeriodStorage._(r'server.storage'), - serverPeriodStatistics._(r'server.statistics'), - serverPeriodVersionCheck._(r'server.versionCheck'), - serverLicensePeriodRead._(r'serverLicense.read'), - serverLicensePeriodUpdate._(r'serverLicense.update'), - serverLicensePeriodDelete._(r'serverLicense.delete'), - sessionPeriodCreate._(r'session.create'), - sessionPeriodRead._(r'session.read'), - sessionPeriodUpdate._(r'session.update'), - sessionPeriodDelete._(r'session.delete'), - sessionPeriodLock._(r'session.lock'), - sharedLinkPeriodCreate._(r'sharedLink.create'), - sharedLinkPeriodRead._(r'sharedLink.read'), - sharedLinkPeriodUpdate._(r'sharedLink.update'), - sharedLinkPeriodDelete._(r'sharedLink.delete'), - stackPeriodCreate._(r'stack.create'), - stackPeriodRead._(r'stack.read'), - stackPeriodUpdate._(r'stack.update'), - stackPeriodDelete._(r'stack.delete'), - syncPeriodStream._(r'sync.stream'), - syncCheckpointPeriodRead._(r'syncCheckpoint.read'), - syncCheckpointPeriodUpdate._(r'syncCheckpoint.update'), - syncCheckpointPeriodDelete._(r'syncCheckpoint.delete'), - systemConfigPeriodRead._(r'systemConfig.read'), - systemConfigPeriodUpdate._(r'systemConfig.update'), - systemMetadataPeriodRead._(r'systemMetadata.read'), - systemMetadataPeriodUpdate._(r'systemMetadata.update'), - tagPeriodCreate._(r'tag.create'), - tagPeriodRead._(r'tag.read'), - tagPeriodUpdate._(r'tag.update'), - tagPeriodDelete._(r'tag.delete'), - tagPeriodAsset._(r'tag.asset'), - userPeriodRead._(r'user.read'), - userPeriodUpdate._(r'user.update'), - userLicensePeriodCreate._(r'userLicense.create'), - userLicensePeriodRead._(r'userLicense.read'), - userLicensePeriodUpdate._(r'userLicense.update'), - userLicensePeriodDelete._(r'userLicense.delete'), - userOnboardingPeriodRead._(r'userOnboarding.read'), - userOnboardingPeriodUpdate._(r'userOnboarding.update'), - userOnboardingPeriodDelete._(r'userOnboarding.delete'), - userPreferencePeriodRead._(r'userPreference.read'), - userPreferencePeriodUpdate._(r'userPreference.update'), - userProfileImagePeriodCreate._(r'userProfileImage.create'), - userProfileImagePeriodRead._(r'userProfileImage.read'), - userProfileImagePeriodUpdate._(r'userProfileImage.update'), - userProfileImagePeriodDelete._(r'userProfileImage.delete'), - queuePeriodRead._(r'queue.read'), - queuePeriodUpdate._(r'queue.update'), - queueJobPeriodCreate._(r'queueJob.create'), - queueJobPeriodRead._(r'queueJob.read'), - queueJobPeriodUpdate._(r'queueJob.update'), - queueJobPeriodDelete._(r'queueJob.delete'), - workflowPeriodCreate._(r'workflow.create'), - workflowPeriodRead._(r'workflow.read'), - workflowPeriodUpdate._(r'workflow.update'), - workflowPeriodDelete._(r'workflow.delete'), - adminUserPeriodCreate._(r'adminUser.create'), - adminUserPeriodRead._(r'adminUser.read'), - adminUserPeriodUpdate._(r'adminUser.update'), - adminUserPeriodDelete._(r'adminUser.delete'), - adminSessionPeriodRead._(r'adminSession.read'), - adminAuthPeriodUnlinkAll._(r'adminAuth.unlinkAll'), - ; - - /// Instantiate a new enum with the provided value. - const Permission._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [Permission] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static Permission? fromJson(dynamic value) => PermissionTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [Permission] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = Permission.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [Permission] to String, -/// and [decode] dynamic data back to [Permission]. -class PermissionTypeTransformer { - factory PermissionTypeTransformer() => _instance ??= const PermissionTypeTransformer._(); - - const PermissionTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(Permission data) => data._value; - - /// Returns the instance of [Permission] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - Permission? decode(dynamic data, {bool allowNull = true}) { - if (data is Permission) { - return data; - } - if (data != null) { - switch (data) { - case r'all': return Permission.all; - case r'activity.create': return Permission.activityPeriodCreate; - case r'activity.read': return Permission.activityPeriodRead; - case r'activity.update': return Permission.activityPeriodUpdate; - case r'activity.delete': return Permission.activityPeriodDelete; - case r'activity.statistics': return Permission.activityPeriodStatistics; - case r'apiKey.create': return Permission.apiKeyPeriodCreate; - case r'apiKey.read': return Permission.apiKeyPeriodRead; - case r'apiKey.update': return Permission.apiKeyPeriodUpdate; - case r'apiKey.delete': return Permission.apiKeyPeriodDelete; - case r'asset.read': return Permission.assetPeriodRead; - case r'asset.update': return Permission.assetPeriodUpdate; - case r'asset.delete': return Permission.assetPeriodDelete; - case r'asset.statistics': return Permission.assetPeriodStatistics; - case r'asset.share': return Permission.assetPeriodShare; - case r'asset.view': return Permission.assetPeriodView; - case r'asset.download': return Permission.assetPeriodDownload; - case r'asset.upload': return Permission.assetPeriodUpload; - case r'asset.copy': return Permission.assetPeriodCopy; - case r'asset.derive': return Permission.assetPeriodDerive; - case r'asset.edit.get': return Permission.assetPeriodEditPeriodGet; - case r'asset.edit.create': return Permission.assetPeriodEditPeriodCreate; - case r'asset.edit.delete': return Permission.assetPeriodEditPeriodDelete; - case r'album.create': return Permission.albumPeriodCreate; - case r'album.read': return Permission.albumPeriodRead; - case r'album.update': return Permission.albumPeriodUpdate; - case r'album.delete': return Permission.albumPeriodDelete; - case r'album.statistics': return Permission.albumPeriodStatistics; - case r'album.share': return Permission.albumPeriodShare; - case r'album.download': return Permission.albumPeriodDownload; - case r'albumAsset.create': return Permission.albumAssetPeriodCreate; - case r'albumAsset.delete': return Permission.albumAssetPeriodDelete; - case r'albumUser.create': return Permission.albumUserPeriodCreate; - case r'albumUser.update': return Permission.albumUserPeriodUpdate; - case r'albumUser.delete': return Permission.albumUserPeriodDelete; - case r'auth.changePassword': return Permission.authPeriodChangePassword; - case r'authDevice.delete': return Permission.authDevicePeriodDelete; - case r'archive.read': return Permission.archivePeriodRead; - case r'backup.list': return Permission.backupPeriodList; - case r'backup.download': return Permission.backupPeriodDownload; - case r'backup.upload': return Permission.backupPeriodUpload; - case r'backup.delete': return Permission.backupPeriodDelete; - case r'duplicate.read': return Permission.duplicatePeriodRead; - case r'duplicate.delete': return Permission.duplicatePeriodDelete; - case r'face.create': return Permission.facePeriodCreate; - case r'face.read': return Permission.facePeriodRead; - case r'face.update': return Permission.facePeriodUpdate; - case r'face.delete': return Permission.facePeriodDelete; - case r'folder.read': return Permission.folderPeriodRead; - case r'job.create': return Permission.jobPeriodCreate; - case r'job.read': return Permission.jobPeriodRead; - case r'library.create': return Permission.libraryPeriodCreate; - case r'library.read': return Permission.libraryPeriodRead; - case r'library.update': return Permission.libraryPeriodUpdate; - case r'library.delete': return Permission.libraryPeriodDelete; - case r'library.statistics': return Permission.libraryPeriodStatistics; - case r'timeline.read': return Permission.timelinePeriodRead; - case r'timeline.download': return Permission.timelinePeriodDownload; - case r'maintenance': return Permission.maintenance; - case r'map.read': return Permission.mapPeriodRead; - case r'map.search': return Permission.mapPeriodSearch; - case r'memory.create': return Permission.memoryPeriodCreate; - case r'memory.read': return Permission.memoryPeriodRead; - case r'memory.update': return Permission.memoryPeriodUpdate; - case r'memory.delete': return Permission.memoryPeriodDelete; - case r'memory.statistics': return Permission.memoryPeriodStatistics; - case r'memoryAsset.create': return Permission.memoryAssetPeriodCreate; - case r'memoryAsset.delete': return Permission.memoryAssetPeriodDelete; - case r'notification.create': return Permission.notificationPeriodCreate; - case r'notification.read': return Permission.notificationPeriodRead; - case r'notification.update': return Permission.notificationPeriodUpdate; - case r'notification.delete': return Permission.notificationPeriodDelete; - case r'partner.create': return Permission.partnerPeriodCreate; - case r'partner.read': return Permission.partnerPeriodRead; - case r'partner.update': return Permission.partnerPeriodUpdate; - case r'partner.delete': return Permission.partnerPeriodDelete; - case r'person.create': return Permission.personPeriodCreate; - case r'person.read': return Permission.personPeriodRead; - case r'person.update': return Permission.personPeriodUpdate; - case r'person.delete': return Permission.personPeriodDelete; - case r'person.statistics': return Permission.personPeriodStatistics; - case r'person.merge': return Permission.personPeriodMerge; - case r'person.reassign': return Permission.personPeriodReassign; - case r'pinCode.create': return Permission.pinCodePeriodCreate; - case r'pinCode.update': return Permission.pinCodePeriodUpdate; - case r'pinCode.delete': return Permission.pinCodePeriodDelete; - case r'plugin.create': return Permission.pluginPeriodCreate; - case r'plugin.read': return Permission.pluginPeriodRead; - case r'plugin.update': return Permission.pluginPeriodUpdate; - case r'plugin.delete': return Permission.pluginPeriodDelete; - case r'server.about': return Permission.serverPeriodAbout; - case r'server.apkLinks': return Permission.serverPeriodApkLinks; - case r'server.storage': return Permission.serverPeriodStorage; - case r'server.statistics': return Permission.serverPeriodStatistics; - case r'server.versionCheck': return Permission.serverPeriodVersionCheck; - case r'serverLicense.read': return Permission.serverLicensePeriodRead; - case r'serverLicense.update': return Permission.serverLicensePeriodUpdate; - case r'serverLicense.delete': return Permission.serverLicensePeriodDelete; - case r'session.create': return Permission.sessionPeriodCreate; - case r'session.read': return Permission.sessionPeriodRead; - case r'session.update': return Permission.sessionPeriodUpdate; - case r'session.delete': return Permission.sessionPeriodDelete; - case r'session.lock': return Permission.sessionPeriodLock; - case r'sharedLink.create': return Permission.sharedLinkPeriodCreate; - case r'sharedLink.read': return Permission.sharedLinkPeriodRead; - case r'sharedLink.update': return Permission.sharedLinkPeriodUpdate; - case r'sharedLink.delete': return Permission.sharedLinkPeriodDelete; - case r'stack.create': return Permission.stackPeriodCreate; - case r'stack.read': return Permission.stackPeriodRead; - case r'stack.update': return Permission.stackPeriodUpdate; - case r'stack.delete': return Permission.stackPeriodDelete; - case r'sync.stream': return Permission.syncPeriodStream; - case r'syncCheckpoint.read': return Permission.syncCheckpointPeriodRead; - case r'syncCheckpoint.update': return Permission.syncCheckpointPeriodUpdate; - case r'syncCheckpoint.delete': return Permission.syncCheckpointPeriodDelete; - case r'systemConfig.read': return Permission.systemConfigPeriodRead; - case r'systemConfig.update': return Permission.systemConfigPeriodUpdate; - case r'systemMetadata.read': return Permission.systemMetadataPeriodRead; - case r'systemMetadata.update': return Permission.systemMetadataPeriodUpdate; - case r'tag.create': return Permission.tagPeriodCreate; - case r'tag.read': return Permission.tagPeriodRead; - case r'tag.update': return Permission.tagPeriodUpdate; - case r'tag.delete': return Permission.tagPeriodDelete; - case r'tag.asset': return Permission.tagPeriodAsset; - case r'user.read': return Permission.userPeriodRead; - case r'user.update': return Permission.userPeriodUpdate; - case r'userLicense.create': return Permission.userLicensePeriodCreate; - case r'userLicense.read': return Permission.userLicensePeriodRead; - case r'userLicense.update': return Permission.userLicensePeriodUpdate; - case r'userLicense.delete': return Permission.userLicensePeriodDelete; - case r'userOnboarding.read': return Permission.userOnboardingPeriodRead; - case r'userOnboarding.update': return Permission.userOnboardingPeriodUpdate; - case r'userOnboarding.delete': return Permission.userOnboardingPeriodDelete; - case r'userPreference.read': return Permission.userPreferencePeriodRead; - case r'userPreference.update': return Permission.userPreferencePeriodUpdate; - case r'userProfileImage.create': return Permission.userProfileImagePeriodCreate; - case r'userProfileImage.read': return Permission.userProfileImagePeriodRead; - case r'userProfileImage.update': return Permission.userProfileImagePeriodUpdate; - case r'userProfileImage.delete': return Permission.userProfileImagePeriodDelete; - case r'queue.read': return Permission.queuePeriodRead; - case r'queue.update': return Permission.queuePeriodUpdate; - case r'queueJob.create': return Permission.queueJobPeriodCreate; - case r'queueJob.read': return Permission.queueJobPeriodRead; - case r'queueJob.update': return Permission.queueJobPeriodUpdate; - case r'queueJob.delete': return Permission.queueJobPeriodDelete; - case r'workflow.create': return Permission.workflowPeriodCreate; - case r'workflow.read': return Permission.workflowPeriodRead; - case r'workflow.update': return Permission.workflowPeriodUpdate; - case r'workflow.delete': return Permission.workflowPeriodDelete; - case r'adminUser.create': return Permission.adminUserPeriodCreate; - case r'adminUser.read': return Permission.adminUserPeriodRead; - case r'adminUser.update': return Permission.adminUserPeriodUpdate; - case r'adminUser.delete': return Permission.adminUserPeriodDelete; - case r'adminSession.read': return Permission.adminSessionPeriodRead; - case r'adminAuth.unlinkAll': return Permission.adminAuthPeriodUnlinkAll; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static PermissionTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/person_create_dto.dart b/mobile/openapi/lib/model/person_create_dto.dart deleted file mode 100644 index 22c9d2fb4c..0000000000 --- a/mobile/openapi/lib/model/person_create_dto.dart +++ /dev/null @@ -1,164 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonCreateDto { - /// Returns a new [PersonCreateDto] instance. - PersonCreateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonCreateDto && - other.birthDate == birthDate && - other.color == color && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonCreateDto[birthDate=$birthDate, color=$color, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonCreateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonCreateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonCreateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/person_response_dto.dart b/mobile/openapi/lib/model/person_response_dto.dart deleted file mode 100644 index a99f465236..0000000000 --- a/mobile/openapi/lib/model/person_response_dto.dart +++ /dev/null @@ -1,191 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonResponseDto { - /// Returns a new [PersonResponseDto] instance. - PersonResponseDto({ - required this.birthDate, - this.color = const Optional.absent(), - required this.id, - this.isFavorite = const Optional.absent(), - required this.isHidden, - required this.name, - required this.thumbnailPath, - this.updatedAt = const Optional.absent(), - }); - - /// Person date of birth - DateTime? birthDate; - - /// Person color (hex) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - /// Person ID - String id; - - /// Is favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Thumbnail path - String thumbnailPath; - - /// Last update date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonResponseDto && - other.birthDate == birthDate && - other.color == color && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.thumbnailPath == thumbnailPath && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (id.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (thumbnailPath.hashCode) + - (updatedAt == null ? 0 : updatedAt!.hashCode); - - @override - String toString() => 'PersonResponseDto[birthDate=$birthDate, color=$color, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _dateFormatter.format(this.birthDate!.toUtc()); - } else { - json[r'birthDate'] = null; - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'id'] = this.id; - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'thumbnailPath'] = this.thumbnailPath; - if (this.updatedAt.isPresent) { - final value = this.updatedAt.value; - json[r'updatedAt'] = value == null ? null : value.toUtc().toIso8601String(); - } - return json; - } - - /// Returns a new [PersonResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonResponseDto( - birthDate: mapDateTime(json, r'birthDate', r''), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - thumbnailPath: mapValueOfType(json, r'thumbnailPath')!, - updatedAt: json.containsKey(r'updatedAt') ? Optional.present(mapDateTime(json, r'updatedAt', r'')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'id', - 'isHidden', - 'name', - 'thumbnailPath', - }; -} - diff --git a/mobile/openapi/lib/model/person_statistics_response_dto.dart b/mobile/openapi/lib/model/person_statistics_response_dto.dart deleted file mode 100644 index aeac16cc8a..0000000000 --- a/mobile/openapi/lib/model/person_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonStatisticsResponseDto { - /// Returns a new [PersonStatisticsResponseDto] instance. - PersonStatisticsResponseDto({ - required this.assets, - }); - - /// Number of assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonStatisticsResponseDto && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode); - - @override - String toString() => 'PersonStatisticsResponseDto[assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [PersonStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PersonStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PersonStatisticsResponseDto( - assets: mapValueOfType(json, r'assets')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/person_update_dto.dart b/mobile/openapi/lib/model/person_update_dto.dart deleted file mode 100644 index 56b99606ee..0000000000 --- a/mobile/openapi/lib/model/person_update_dto.dart +++ /dev/null @@ -1,181 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PersonUpdateDto { - /// Returns a new [PersonUpdateDto] instance. - PersonUpdateDto({ - this.birthDate = const Optional.absent(), - this.color = const Optional.absent(), - this.featureFaceAssetId = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isHidden = const Optional.absent(), - this.name = const Optional.absent(), - }); - - /// Person date of birth - Optional birthDate; - - /// Person color (hex) - Optional color; - - /// Asset ID used for feature face thumbnail - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional featureFaceAssetId; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Person visibility (hidden) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isHidden; - - /// Person name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PersonUpdateDto && - other.birthDate == birthDate && - other.color == color && - other.featureFaceAssetId == featureFaceAssetId && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (featureFaceAssetId == null ? 0 : featureFaceAssetId!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isHidden == null ? 0 : isHidden!.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'PersonUpdateDto[birthDate=$birthDate, color=$color, featureFaceAssetId=$featureFaceAssetId, isFavorite=$isFavorite, isHidden=$isHidden, name=$name]'; - - Map toJson() { - final json = {}; - if (this.birthDate.isPresent) { - final value = this.birthDate.value; - json[r'birthDate'] = value == null ? null : _dateFormatter.format(value.toUtc()); - } - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - if (this.featureFaceAssetId.isPresent) { - final value = this.featureFaceAssetId.value; - json[r'featureFaceAssetId'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isHidden.isPresent) { - final value = this.isHidden.value; - json[r'isHidden'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [PersonUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PersonUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "PersonUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return PersonUpdateDto( - birthDate: json.containsKey(r'birthDate') ? Optional.present(mapDateTime(json, r'birthDate', r'')) : const Optional.absent(), - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - featureFaceAssetId: json.containsKey(r'featureFaceAssetId') ? Optional.present(mapValueOfType(json, r'featureFaceAssetId')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isHidden: json.containsKey(r'isHidden') ? Optional.present(mapValueOfType(json, r'isHidden')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PersonUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PersonUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PersonUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PersonUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_change_dto.dart b/mobile/openapi/lib/model/pin_code_change_dto.dart deleted file mode 100644 index 42c244933f..0000000000 --- a/mobile/openapi/lib/model/pin_code_change_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeChangeDto { - /// Returns a new [PinCodeChangeDto] instance. - PinCodeChangeDto({ - required this.newPinCode, - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// New PIN code (4-6 digits) - String newPinCode; - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeChangeDto && - other.newPinCode == newPinCode && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (newPinCode.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeChangeDto[newPinCode=$newPinCode, password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'newPinCode'] = this.newPinCode; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeChangeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeChangeDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeChangeDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeChangeDto( - newPinCode: mapValueOfType(json, r'newPinCode')!, - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeChangeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeChangeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeChangeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeChangeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'newPinCode', - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_reset_dto.dart b/mobile/openapi/lib/model/pin_code_reset_dto.dart deleted file mode 100644 index 04ad61eeeb..0000000000 --- a/mobile/openapi/lib/model/pin_code_reset_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeResetDto { - /// Returns a new [PinCodeResetDto] instance. - PinCodeResetDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeResetDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'PinCodeResetDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [PinCodeResetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeResetDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeResetDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeResetDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeResetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeResetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeResetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeResetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/pin_code_setup_dto.dart b/mobile/openapi/lib/model/pin_code_setup_dto.dart deleted file mode 100644 index e2f08f102b..0000000000 --- a/mobile/openapi/lib/model/pin_code_setup_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PinCodeSetupDto { - /// Returns a new [PinCodeSetupDto] instance. - PinCodeSetupDto({ - required this.pinCode, - }); - - /// PIN code (4-6 digits) - String pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is PinCodeSetupDto && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (pinCode.hashCode); - - @override - String toString() => 'PinCodeSetupDto[pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - json[r'pinCode'] = this.pinCode; - return json; - } - - /// Returns a new [PinCodeSetupDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PinCodeSetupDto? fromJson(dynamic value) { - upgradeDto(value, "PinCodeSetupDto"); - if (value is Map) { - final json = value.cast(); - - return PinCodeSetupDto( - pinCode: mapValueOfType(json, r'pinCode')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PinCodeSetupDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PinCodeSetupDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PinCodeSetupDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PinCodeSetupDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'pinCode', - }; -} - diff --git a/mobile/openapi/lib/model/places_response_dto.dart b/mobile/openapi/lib/model/places_response_dto.dart deleted file mode 100644 index f222c33dba..0000000000 --- a/mobile/openapi/lib/model/places_response_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PlacesResponseDto { - /// Returns a new [PlacesResponseDto] instance. - PlacesResponseDto({ - this.admin1name = const Optional.absent(), - this.admin2name = const Optional.absent(), - required this.latitude, - required this.longitude, - required this.name, - }); - - /// Administrative level 1 name (state/province) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional admin1name; - - /// Administrative level 2 name (county/district) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional admin2name; - - /// Latitude coordinate - num latitude; - - /// Longitude coordinate - num longitude; - - /// Place name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is PlacesResponseDto && - other.admin1name == admin1name && - other.admin2name == admin2name && - other.latitude == latitude && - other.longitude == longitude && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (admin1name == null ? 0 : admin1name!.hashCode) + - (admin2name == null ? 0 : admin2name!.hashCode) + - (latitude.hashCode) + - (longitude.hashCode) + - (name.hashCode); - - @override - String toString() => 'PlacesResponseDto[admin1name=$admin1name, admin2name=$admin2name, latitude=$latitude, longitude=$longitude, name=$name]'; - - Map toJson() { - final json = {}; - if (this.admin1name.isPresent) { - final value = this.admin1name.value; - json[r'admin1name'] = value; - } - if (this.admin2name.isPresent) { - final value = this.admin2name.value; - json[r'admin2name'] = value; - } - json[r'latitude'] = this.latitude; - json[r'longitude'] = this.longitude; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [PlacesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PlacesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PlacesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PlacesResponseDto( - admin1name: json.containsKey(r'admin1name') ? Optional.present(mapValueOfType(json, r'admin1name')) : const Optional.absent(), - admin2name: json.containsKey(r'admin2name') ? Optional.present(mapValueOfType(json, r'admin2name')) : const Optional.absent(), - latitude: num.parse('${json[r'latitude']}'), - longitude: num.parse('${json[r'longitude']}'), - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PlacesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PlacesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PlacesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PlacesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'latitude', - 'longitude', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_method_response_dto.dart b/mobile/openapi/lib/model/plugin_method_response_dto.dart deleted file mode 100644 index 1d6f9c1331..0000000000 --- a/mobile/openapi/lib/model/plugin_method_response_dto.dart +++ /dev/null @@ -1,171 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginMethodResponseDto { - /// Returns a new [PluginMethodResponseDto] instance. - PluginMethodResponseDto({ - required this.description, - required this.hostFunctions, - required this.key, - required this.name, - this.schema = const Optional.absent(), - required this.title, - this.types = const [], - this.uiHints = const [], - }); - - /// Description - String description; - - bool hostFunctions; - - /// Key - String key; - - /// Name - String name; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional schema; - - /// Title - String title; - - /// Workflow types - List types; - - /// Ui hints - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginMethodResponseDto && - other.description == description && - other.hostFunctions == hostFunctions && - other.key == key && - other.name == name && - other.schema == schema && - other.title == title && - _deepEquality.equals(other.types, types) && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (hostFunctions.hashCode) + - (key.hashCode) + - (name.hashCode) + - (schema == null ? 0 : schema!.hashCode) + - (title.hashCode) + - (types.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginMethodResponseDto[description=$description, hostFunctions=$hostFunctions, key=$key, name=$name, schema=$schema, title=$title, types=$types, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'hostFunctions'] = this.hostFunctions; - json[r'key'] = this.key; - json[r'name'] = this.name; - if (this.schema.isPresent) { - final value = this.schema.value; - json[r'schema'] = value; - } - json[r'title'] = this.title; - json[r'types'] = this.types; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginMethodResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginMethodResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginMethodResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginMethodResponseDto( - description: mapValueOfType(json, r'description')!, - hostFunctions: mapValueOfType(json, r'hostFunctions')!, - key: mapValueOfType(json, r'key')!, - name: mapValueOfType(json, r'name')!, - schema: json.containsKey(r'schema') ? Optional.present(mapValueOfType(json, r'schema')) : const Optional.absent(), - title: mapValueOfType(json, r'title')!, - types: WorkflowType.listFromJson(json[r'types']), - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginMethodResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginMethodResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginMethodResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginMethodResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'hostFunctions', - 'key', - 'name', - 'title', - 'types', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_response_dto.dart b/mobile/openapi/lib/model/plugin_response_dto.dart deleted file mode 100644 index 1bdb366f9e..0000000000 --- a/mobile/openapi/lib/model/plugin_response_dto.dart +++ /dev/null @@ -1,172 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginResponseDto { - /// Returns a new [PluginResponseDto] instance. - PluginResponseDto({ - required this.author, - required this.createdAt, - required this.description, - required this.id, - this.methods = const [], - required this.name, - required this.title, - required this.updatedAt, - required this.version, - }); - - /// Plugin author - String author; - - /// Creation date - String createdAt; - - /// Plugin description - String description; - - /// Plugin ID - String id; - - /// Plugin methods - List methods; - - /// Plugin name - String name; - - /// Plugin title - String title; - - /// Last update date - String updatedAt; - - /// Plugin version - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginResponseDto && - other.author == author && - other.createdAt == createdAt && - other.description == description && - other.id == id && - _deepEquality.equals(other.methods, methods) && - other.name == name && - other.title == title && - other.updatedAt == updatedAt && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (author.hashCode) + - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (methods.hashCode) + - (name.hashCode) + - (title.hashCode) + - (updatedAt.hashCode) + - (version.hashCode); - - @override - String toString() => 'PluginResponseDto[author=$author, createdAt=$createdAt, description=$description, id=$id, methods=$methods, name=$name, title=$title, updatedAt=$updatedAt, version=$version]'; - - Map toJson() { - final json = {}; - json[r'author'] = this.author; - json[r'createdAt'] = this.createdAt; - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'methods'] = this.methods; - json[r'name'] = this.name; - json[r'title'] = this.title; - json[r'updatedAt'] = this.updatedAt; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [PluginResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginResponseDto( - author: mapValueOfType(json, r'author')!, - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - methods: PluginMethodResponseDto.listFromJson(json[r'methods']), - name: mapValueOfType(json, r'name')!, - title: mapValueOfType(json, r'title')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'author', - 'createdAt', - 'description', - 'id', - 'methods', - 'name', - 'title', - 'updatedAt', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_response_dto.dart b/mobile/openapi/lib/model/plugin_template_response_dto.dart deleted file mode 100644 index 9f54753f49..0000000000 --- a/mobile/openapi/lib/model/plugin_template_response_dto.dart +++ /dev/null @@ -1,146 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginTemplateResponseDto { - /// Returns a new [PluginTemplateResponseDto] instance. - PluginTemplateResponseDto({ - required this.description, - required this.key, - this.steps = const [], - required this.title, - required this.trigger, - this.uiHints = const [], - }); - - /// Template description - String description; - - /// Template key (unique across all templates) - String key; - - /// Workflow steps - List steps; - - /// Template title - String title; - - WorkflowTrigger trigger; - - /// Ui hints, for example \"smart-album\" - List uiHints; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateResponseDto && - other.description == description && - other.key == key && - _deepEquality.equals(other.steps, steps) && - other.title == title && - other.trigger == trigger && - _deepEquality.equals(other.uiHints, uiHints); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description.hashCode) + - (key.hashCode) + - (steps.hashCode) + - (title.hashCode) + - (trigger.hashCode) + - (uiHints.hashCode); - - @override - String toString() => 'PluginTemplateResponseDto[description=$description, key=$key, steps=$steps, title=$title, trigger=$trigger, uiHints=$uiHints]'; - - Map toJson() { - final json = {}; - json[r'description'] = this.description; - json[r'key'] = this.key; - json[r'steps'] = this.steps; - json[r'title'] = this.title; - json[r'trigger'] = this.trigger; - json[r'uiHints'] = this.uiHints; - return json; - } - - /// Returns a new [PluginTemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateResponseDto( - description: mapValueOfType(json, r'description')!, - key: mapValueOfType(json, r'key')!, - steps: PluginTemplateStepResponseDto.listFromJson(json[r'steps']), - title: mapValueOfType(json, r'title')!, - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - uiHints: json[r'uiHints'] is Iterable - ? (json[r'uiHints'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'key', - 'steps', - 'title', - 'trigger', - 'uiHints', - }; -} - diff --git a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart b/mobile/openapi/lib/model/plugin_template_step_response_dto.dart deleted file mode 100644 index 3e82c029d2..0000000000 --- a/mobile/openapi/lib/model/plugin_template_step_response_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PluginTemplateStepResponseDto { - /// Returns a new [PluginTemplateStepResponseDto] instance. - PluginTemplateStepResponseDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Whether the step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is PluginTemplateStepResponseDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'PluginTemplateStepResponseDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [PluginTemplateStepResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PluginTemplateStepResponseDto? fromJson(dynamic value) { - upgradeDto(value, "PluginTemplateStepResponseDto"); - if (value is Map) { - final json = value.cast(); - - return PluginTemplateStepResponseDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PluginTemplateStepResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PluginTemplateStepResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PluginTemplateStepResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PluginTemplateStepResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_response.dart b/mobile/openapi/lib/model/purchase_response.dart deleted file mode 100644 index e55c286629..0000000000 --- a/mobile/openapi/lib/model/purchase_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PurchaseResponse { - /// Returns a new [PurchaseResponse] instance. - PurchaseResponse({ - required this.hideBuyButtonUntil, - required this.showSupportBadge, - }); - - /// Date until which to hide buy button - String hideBuyButtonUntil; - - /// Whether to show support badge - bool showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseResponse && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil.hashCode) + - (showSupportBadge.hashCode); - - @override - String toString() => 'PurchaseResponse[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - json[r'hideBuyButtonUntil'] = this.hideBuyButtonUntil; - json[r'showSupportBadge'] = this.showSupportBadge; - return json; - } - - /// Returns a new [PurchaseResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseResponse? fromJson(dynamic value) { - upgradeDto(value, "PurchaseResponse"); - if (value is Map) { - final json = value.cast(); - - return PurchaseResponse( - hideBuyButtonUntil: mapValueOfType(json, r'hideBuyButtonUntil')!, - showSupportBadge: mapValueOfType(json, r'showSupportBadge')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'hideBuyButtonUntil', - 'showSupportBadge', - }; -} - diff --git a/mobile/openapi/lib/model/purchase_update.dart b/mobile/openapi/lib/model/purchase_update.dart deleted file mode 100644 index 8a0fb0d1b6..0000000000 --- a/mobile/openapi/lib/model/purchase_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class PurchaseUpdate { - /// Returns a new [PurchaseUpdate] instance. - PurchaseUpdate({ - this.hideBuyButtonUntil = const Optional.absent(), - this.showSupportBadge = const Optional.absent(), - }); - - /// Date until which to hide buy button - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional hideBuyButtonUntil; - - /// Whether to show support badge - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showSupportBadge; - - @override - bool operator ==(Object other) => identical(this, other) || other is PurchaseUpdate && - other.hideBuyButtonUntil == hideBuyButtonUntil && - other.showSupportBadge == showSupportBadge; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (hideBuyButtonUntil == null ? 0 : hideBuyButtonUntil!.hashCode) + - (showSupportBadge == null ? 0 : showSupportBadge!.hashCode); - - @override - String toString() => 'PurchaseUpdate[hideBuyButtonUntil=$hideBuyButtonUntil, showSupportBadge=$showSupportBadge]'; - - Map toJson() { - final json = {}; - if (this.hideBuyButtonUntil.isPresent) { - final value = this.hideBuyButtonUntil.value; - json[r'hideBuyButtonUntil'] = value; - } - if (this.showSupportBadge.isPresent) { - final value = this.showSupportBadge.value; - json[r'showSupportBadge'] = value; - } - return json; - } - - /// Returns a new [PurchaseUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static PurchaseUpdate? fromJson(dynamic value) { - upgradeDto(value, "PurchaseUpdate"); - if (value is Map) { - final json = value.cast(); - - return PurchaseUpdate( - hideBuyButtonUntil: json.containsKey(r'hideBuyButtonUntil') ? Optional.present(mapValueOfType(json, r'hideBuyButtonUntil')) : const Optional.absent(), - showSupportBadge: json.containsKey(r'showSupportBadge') ? Optional.present(mapValueOfType(json, r'showSupportBadge')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = PurchaseUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = PurchaseUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of PurchaseUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = PurchaseUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_command.dart b/mobile/openapi/lib/model/queue_command.dart deleted file mode 100644 index 131af9758e..0000000000 --- a/mobile/openapi/lib/model/queue_command.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue command to execute -enum QueueCommand { - start._(r'start'), - pause._(r'pause'), - resume._(r'resume'), - empty._(r'empty'), - clearFailed._(r'clear-failed'), - ; - - /// Instantiate a new enum with the provided value. - const QueueCommand._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueCommand] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueCommand? fromJson(dynamic value) => QueueCommandTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueCommand] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueCommand.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueCommand] to String, -/// and [decode] dynamic data back to [QueueCommand]. -class QueueCommandTypeTransformer { - factory QueueCommandTypeTransformer() => _instance ??= const QueueCommandTypeTransformer._(); - - const QueueCommandTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueCommand data) => data._value; - - /// Returns the instance of [QueueCommand] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueCommand? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueCommand) { - return data; - } - if (data != null) { - switch (data) { - case r'start': return QueueCommand.start; - case r'pause': return QueueCommand.pause; - case r'resume': return QueueCommand.resume; - case r'empty': return QueueCommand.empty; - case r'clear-failed': return QueueCommand.clearFailed; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueCommandTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_command_dto.dart b/mobile/openapi/lib/model/queue_command_dto.dart deleted file mode 100644 index e8a600923f..0000000000 --- a/mobile/openapi/lib/model/queue_command_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueCommandDto { - /// Returns a new [QueueCommandDto] instance. - QueueCommandDto({ - required this.command, - this.force = const Optional.absent(), - }); - - QueueCommand command; - - /// Force the command execution (if applicable) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueCommandDto && - other.command == command && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (command.hashCode) + - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'QueueCommandDto[command=$command, force=$force]'; - - Map toJson() { - final json = {}; - json[r'command'] = this.command; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [QueueCommandDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueCommandDto? fromJson(dynamic value) { - upgradeDto(value, "QueueCommandDto"); - if (value is Map) { - final json = value.cast(); - - return QueueCommandDto( - command: QueueCommand.fromJson(json[r'command'])!, - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueCommandDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueCommandDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueCommandDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueCommandDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'command', - }; -} - diff --git a/mobile/openapi/lib/model/queue_delete_dto.dart b/mobile/openapi/lib/model/queue_delete_dto.dart deleted file mode 100644 index 9511313f01..0000000000 --- a/mobile/openapi/lib/model/queue_delete_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueDeleteDto { - /// Returns a new [QueueDeleteDto] instance. - QueueDeleteDto({ - this.failed = const Optional.absent(), - }); - - /// If true, will also remove failed jobs from the queue. - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional failed; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueDeleteDto && - other.failed == failed; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (failed == null ? 0 : failed!.hashCode); - - @override - String toString() => 'QueueDeleteDto[failed=$failed]'; - - Map toJson() { - final json = {}; - if (this.failed.isPresent) { - final value = this.failed.value; - json[r'failed'] = value; - } - return json; - } - - /// Returns a new [QueueDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "QueueDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return QueueDeleteDto( - failed: json.containsKey(r'failed') ? Optional.present(mapValueOfType(json, r'failed')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_response_dto.dart b/mobile/openapi/lib/model/queue_job_response_dto.dart deleted file mode 100644 index ca26361a3e..0000000000 --- a/mobile/openapi/lib/model/queue_job_response_dto.dart +++ /dev/null @@ -1,137 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueJobResponseDto { - /// Returns a new [QueueJobResponseDto] instance. - QueueJobResponseDto({ - this.data = const {}, - this.id = const Optional.absent(), - required this.name, - required this.timestamp, - }); - - /// Job data payload - Map data; - - /// Job ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional id; - - JobName name; - - /// Job creation timestamp - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int timestamp; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueJobResponseDto && - _deepEquality.equals(other.data, data) && - other.id == id && - other.name == name && - other.timestamp == timestamp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (id == null ? 0 : id!.hashCode) + - (name.hashCode) + - (timestamp.hashCode); - - @override - String toString() => 'QueueJobResponseDto[data=$data, id=$id, name=$name, timestamp=$timestamp]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - if (this.id.isPresent) { - final value = this.id.value; - json[r'id'] = value; - } - json[r'name'] = this.name; - json[r'timestamp'] = this.timestamp; - return json; - } - - /// Returns a new [QueueJobResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueJobResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueJobResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueJobResponseDto( - data: mapCastOfType(json, r'data')!, - id: json.containsKey(r'id') ? Optional.present(mapValueOfType(json, r'id')) : const Optional.absent(), - name: JobName.fromJson(json[r'name'])!, - timestamp: mapValueOfType(json, r'timestamp')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueJobResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueJobResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueJobResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueJobResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'name', - 'timestamp', - }; -} - diff --git a/mobile/openapi/lib/model/queue_job_status.dart b/mobile/openapi/lib/model/queue_job_status.dart deleted file mode 100644 index 1daebf18ca..0000000000 --- a/mobile/openapi/lib/model/queue_job_status.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue job status -enum QueueJobStatus { - active._(r'active'), - failed._(r'failed'), - completed._(r'completed'), - delayed._(r'delayed'), - waiting._(r'waiting'), - paused._(r'paused'), - ; - - /// Instantiate a new enum with the provided value. - const QueueJobStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueJobStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueJobStatus? fromJson(dynamic value) => QueueJobStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueJobStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueJobStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueJobStatus] to String, -/// and [decode] dynamic data back to [QueueJobStatus]. -class QueueJobStatusTypeTransformer { - factory QueueJobStatusTypeTransformer() => _instance ??= const QueueJobStatusTypeTransformer._(); - - const QueueJobStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueJobStatus data) => data._value; - - /// Returns the instance of [QueueJobStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueJobStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueJobStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'active': return QueueJobStatus.active; - case r'failed': return QueueJobStatus.failed; - case r'completed': return QueueJobStatus.completed; - case r'delayed': return QueueJobStatus.delayed; - case r'waiting': return QueueJobStatus.waiting; - case r'paused': return QueueJobStatus.paused; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueJobStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_name.dart b/mobile/openapi/lib/model/queue_name.dart deleted file mode 100644 index 910d28c04f..0000000000 --- a/mobile/openapi/lib/model/queue_name.dart +++ /dev/null @@ -1,124 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Queue name -enum QueueName { - thumbnailGeneration._(r'thumbnailGeneration'), - metadataExtraction._(r'metadataExtraction'), - videoConversion._(r'videoConversion'), - faceDetection._(r'faceDetection'), - facialRecognition._(r'facialRecognition'), - smartSearch._(r'smartSearch'), - duplicateDetection._(r'duplicateDetection'), - backgroundTask._(r'backgroundTask'), - storageTemplateMigration._(r'storageTemplateMigration'), - migration._(r'migration'), - search._(r'search'), - sidecar._(r'sidecar'), - library_._(r'library'), - notifications._(r'notifications'), - backupDatabase._(r'backupDatabase'), - ocr._(r'ocr'), - workflow._(r'workflow'), - integrityCheck._(r'integrityCheck'), - editor._(r'editor'), - ; - - /// Instantiate a new enum with the provided value. - const QueueName._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [QueueName] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static QueueName? fromJson(dynamic value) => QueueNameTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [QueueName] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueName.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [QueueName] to String, -/// and [decode] dynamic data back to [QueueName]. -class QueueNameTypeTransformer { - factory QueueNameTypeTransformer() => _instance ??= const QueueNameTypeTransformer._(); - - const QueueNameTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(QueueName data) => data._value; - - /// Returns the instance of [QueueName] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - QueueName? decode(dynamic data, {bool allowNull = true}) { - if (data is QueueName) { - return data; - } - if (data != null) { - switch (data) { - case r'thumbnailGeneration': return QueueName.thumbnailGeneration; - case r'metadataExtraction': return QueueName.metadataExtraction; - case r'videoConversion': return QueueName.videoConversion; - case r'faceDetection': return QueueName.faceDetection; - case r'facialRecognition': return QueueName.facialRecognition; - case r'smartSearch': return QueueName.smartSearch; - case r'duplicateDetection': return QueueName.duplicateDetection; - case r'backgroundTask': return QueueName.backgroundTask; - case r'storageTemplateMigration': return QueueName.storageTemplateMigration; - case r'migration': return QueueName.migration; - case r'search': return QueueName.search; - case r'sidecar': return QueueName.sidecar; - case r'library': return QueueName.library_; - case r'notifications': return QueueName.notifications; - case r'backupDatabase': return QueueName.backupDatabase; - case r'ocr': return QueueName.ocr; - case r'workflow': return QueueName.workflow; - case r'integrityCheck': return QueueName.integrityCheck; - case r'editor': return QueueName.editor; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static QueueNameTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/queue_response_dto.dart b/mobile/openapi/lib/model/queue_response_dto.dart deleted file mode 100644 index c88f9fc195..0000000000 --- a/mobile/openapi/lib/model/queue_response_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueResponseDto { - /// Returns a new [QueueResponseDto] instance. - QueueResponseDto({ - required this.isPaused, - required this.name, - required this.statistics, - }); - - /// Whether the queue is paused - bool isPaused; - - QueueName name; - - QueueStatisticsDto statistics; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseDto && - other.isPaused == isPaused && - other.name == name && - other.statistics == statistics; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused.hashCode) + - (name.hashCode) + - (statistics.hashCode); - - @override - String toString() => 'QueueResponseDto[isPaused=$isPaused, name=$name, statistics=$statistics]'; - - Map toJson() { - final json = {}; - json[r'isPaused'] = this.isPaused; - json[r'name'] = this.name; - json[r'statistics'] = this.statistics; - return json; - } - - /// Returns a new [QueueResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseDto( - isPaused: mapValueOfType(json, r'isPaused')!, - name: QueueName.fromJson(json[r'name'])!, - statistics: QueueStatisticsDto.fromJson(json[r'statistics'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isPaused', - 'name', - 'statistics', - }; -} - diff --git a/mobile/openapi/lib/model/queue_response_legacy_dto.dart b/mobile/openapi/lib/model/queue_response_legacy_dto.dart deleted file mode 100644 index 214b0b31f6..0000000000 --- a/mobile/openapi/lib/model/queue_response_legacy_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueResponseLegacyDto { - /// Returns a new [QueueResponseLegacyDto] instance. - QueueResponseLegacyDto({ - required this.jobCounts, - required this.queueStatus, - }); - - QueueStatisticsDto jobCounts; - - QueueStatusLegacyDto queueStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueResponseLegacyDto && - other.jobCounts == jobCounts && - other.queueStatus == queueStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (jobCounts.hashCode) + - (queueStatus.hashCode); - - @override - String toString() => 'QueueResponseLegacyDto[jobCounts=$jobCounts, queueStatus=$queueStatus]'; - - Map toJson() { - final json = {}; - json[r'jobCounts'] = this.jobCounts; - json[r'queueStatus'] = this.queueStatus; - return json; - } - - /// Returns a new [QueueResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueResponseLegacyDto( - jobCounts: QueueStatisticsDto.fromJson(json[r'jobCounts'])!, - queueStatus: QueueStatusLegacyDto.fromJson(json[r'queueStatus'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'jobCounts', - 'queueStatus', - }; -} - diff --git a/mobile/openapi/lib/model/queue_statistics_dto.dart b/mobile/openapi/lib/model/queue_statistics_dto.dart deleted file mode 100644 index 86c75f8e7c..0000000000 --- a/mobile/openapi/lib/model/queue_statistics_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueStatisticsDto { - /// Returns a new [QueueStatisticsDto] instance. - QueueStatisticsDto({ - required this.active, - required this.completed, - required this.delayed, - required this.failed, - required this.paused, - required this.waiting, - }); - - /// Number of active jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int active; - - /// Number of completed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int completed; - - /// Number of delayed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int delayed; - - /// Number of failed jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int failed; - - /// Number of paused jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int paused; - - /// Number of waiting jobs - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int waiting; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatisticsDto && - other.active == active && - other.completed == completed && - other.delayed == delayed && - other.failed == failed && - other.paused == paused && - other.waiting == waiting; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (active.hashCode) + - (completed.hashCode) + - (delayed.hashCode) + - (failed.hashCode) + - (paused.hashCode) + - (waiting.hashCode); - - @override - String toString() => 'QueueStatisticsDto[active=$active, completed=$completed, delayed=$delayed, failed=$failed, paused=$paused, waiting=$waiting]'; - - Map toJson() { - final json = {}; - json[r'active'] = this.active; - json[r'completed'] = this.completed; - json[r'delayed'] = this.delayed; - json[r'failed'] = this.failed; - json[r'paused'] = this.paused; - json[r'waiting'] = this.waiting; - return json; - } - - /// Returns a new [QueueStatisticsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatisticsDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatisticsDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatisticsDto( - active: mapValueOfType(json, r'active')!, - completed: mapValueOfType(json, r'completed')!, - delayed: mapValueOfType(json, r'delayed')!, - failed: mapValueOfType(json, r'failed')!, - paused: mapValueOfType(json, r'paused')!, - waiting: mapValueOfType(json, r'waiting')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatisticsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatisticsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatisticsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatisticsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'active', - 'completed', - 'delayed', - 'failed', - 'paused', - 'waiting', - }; -} - diff --git a/mobile/openapi/lib/model/queue_status_legacy_dto.dart b/mobile/openapi/lib/model/queue_status_legacy_dto.dart deleted file mode 100644 index de6ce63319..0000000000 --- a/mobile/openapi/lib/model/queue_status_legacy_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueStatusLegacyDto { - /// Returns a new [QueueStatusLegacyDto] instance. - QueueStatusLegacyDto({ - required this.isActive, - required this.isPaused, - }); - - /// Whether the queue is currently active (has running jobs) - bool isActive; - - /// Whether the queue is paused - bool isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueStatusLegacyDto && - other.isActive == isActive && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isActive.hashCode) + - (isPaused.hashCode); - - @override - String toString() => 'QueueStatusLegacyDto[isActive=$isActive, isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - json[r'isActive'] = this.isActive; - json[r'isPaused'] = this.isPaused; - return json; - } - - /// Returns a new [QueueStatusLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueStatusLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueueStatusLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueueStatusLegacyDto( - isActive: mapValueOfType(json, r'isActive')!, - isPaused: mapValueOfType(json, r'isPaused')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueStatusLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueStatusLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueStatusLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueStatusLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'isActive', - 'isPaused', - }; -} - diff --git a/mobile/openapi/lib/model/queue_update_dto.dart b/mobile/openapi/lib/model/queue_update_dto.dart deleted file mode 100644 index 189fc219f1..0000000000 --- a/mobile/openapi/lib/model/queue_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueueUpdateDto { - /// Returns a new [QueueUpdateDto] instance. - QueueUpdateDto({ - this.isPaused = const Optional.absent(), - }); - - /// Whether to pause the queue - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isPaused; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueueUpdateDto && - other.isPaused == isPaused; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPaused == null ? 0 : isPaused!.hashCode); - - @override - String toString() => 'QueueUpdateDto[isPaused=$isPaused]'; - - Map toJson() { - final json = {}; - if (this.isPaused.isPresent) { - final value = this.isPaused.value; - json[r'isPaused'] = value; - } - return json; - } - - /// Returns a new [QueueUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueueUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "QueueUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return QueueUpdateDto( - isPaused: json.containsKey(r'isPaused') ? Optional.present(mapValueOfType(json, r'isPaused')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueueUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueueUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueueUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueueUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/queues_response_legacy_dto.dart b/mobile/openapi/lib/model/queues_response_legacy_dto.dart deleted file mode 100644 index 80e74b9c41..0000000000 --- a/mobile/openapi/lib/model/queues_response_legacy_dto.dart +++ /dev/null @@ -1,243 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class QueuesResponseLegacyDto { - /// Returns a new [QueuesResponseLegacyDto] instance. - QueuesResponseLegacyDto({ - required this.backgroundTask, - required this.backupDatabase, - required this.duplicateDetection, - required this.editor, - required this.faceDetection, - required this.facialRecognition, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.storageTemplateMigration, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - QueueResponseLegacyDto backgroundTask; - - QueueResponseLegacyDto backupDatabase; - - QueueResponseLegacyDto duplicateDetection; - - QueueResponseLegacyDto editor; - - QueueResponseLegacyDto faceDetection; - - QueueResponseLegacyDto facialRecognition; - - QueueResponseLegacyDto integrityCheck; - - QueueResponseLegacyDto library_; - - QueueResponseLegacyDto metadataExtraction; - - QueueResponseLegacyDto migration; - - QueueResponseLegacyDto notifications; - - QueueResponseLegacyDto ocr; - - QueueResponseLegacyDto search; - - QueueResponseLegacyDto sidecar; - - QueueResponseLegacyDto smartSearch; - - QueueResponseLegacyDto storageTemplateMigration; - - QueueResponseLegacyDto thumbnailGeneration; - - QueueResponseLegacyDto videoConversion; - - QueueResponseLegacyDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is QueuesResponseLegacyDto && - other.backgroundTask == backgroundTask && - other.backupDatabase == backupDatabase && - other.duplicateDetection == duplicateDetection && - other.editor == editor && - other.faceDetection == faceDetection && - other.facialRecognition == facialRecognition && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.storageTemplateMigration == storageTemplateMigration && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (backupDatabase.hashCode) + - (duplicateDetection.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (facialRecognition.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (storageTemplateMigration.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'QueuesResponseLegacyDto[backgroundTask=$backgroundTask, backupDatabase=$backupDatabase, duplicateDetection=$duplicateDetection, editor=$editor, faceDetection=$faceDetection, facialRecognition=$facialRecognition, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, storageTemplateMigration=$storageTemplateMigration, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'backupDatabase'] = this.backupDatabase; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'facialRecognition'] = this.facialRecognition; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'storageTemplateMigration'] = this.storageTemplateMigration; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [QueuesResponseLegacyDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static QueuesResponseLegacyDto? fromJson(dynamic value) { - upgradeDto(value, "QueuesResponseLegacyDto"); - if (value is Map) { - final json = value.cast(); - - return QueuesResponseLegacyDto( - backgroundTask: QueueResponseLegacyDto.fromJson(json[r'backgroundTask'])!, - backupDatabase: QueueResponseLegacyDto.fromJson(json[r'backupDatabase'])!, - duplicateDetection: QueueResponseLegacyDto.fromJson(json[r'duplicateDetection'])!, - editor: QueueResponseLegacyDto.fromJson(json[r'editor'])!, - faceDetection: QueueResponseLegacyDto.fromJson(json[r'faceDetection'])!, - facialRecognition: QueueResponseLegacyDto.fromJson(json[r'facialRecognition'])!, - integrityCheck: QueueResponseLegacyDto.fromJson(json[r'integrityCheck'])!, - library_: QueueResponseLegacyDto.fromJson(json[r'library'])!, - metadataExtraction: QueueResponseLegacyDto.fromJson(json[r'metadataExtraction'])!, - migration: QueueResponseLegacyDto.fromJson(json[r'migration'])!, - notifications: QueueResponseLegacyDto.fromJson(json[r'notifications'])!, - ocr: QueueResponseLegacyDto.fromJson(json[r'ocr'])!, - search: QueueResponseLegacyDto.fromJson(json[r'search'])!, - sidecar: QueueResponseLegacyDto.fromJson(json[r'sidecar'])!, - smartSearch: QueueResponseLegacyDto.fromJson(json[r'smartSearch'])!, - storageTemplateMigration: QueueResponseLegacyDto.fromJson(json[r'storageTemplateMigration'])!, - thumbnailGeneration: QueueResponseLegacyDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: QueueResponseLegacyDto.fromJson(json[r'videoConversion'])!, - workflow: QueueResponseLegacyDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = QueuesResponseLegacyDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = QueuesResponseLegacyDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of QueuesResponseLegacyDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = QueuesResponseLegacyDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'backupDatabase', - 'duplicateDetection', - 'editor', - 'faceDetection', - 'facialRecognition', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'storageTemplateMigration', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/random_search_dto.dart b/mobile/openapi/lib/model/random_search_dto.dart deleted file mode 100644 index 7937069578..0000000000 --- a/mobile/openapi/lib/model/random_search_dto.dart +++ /dev/null @@ -1,595 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RandomSearchDto { - /// Returns a new [RandomSearchDto] instance. - RandomSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - this.withPeople = const Optional.absent(), - this.withStacked = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - /// Include people data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withPeople; - - /// Include stacked assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withStacked; - - @override - bool operator ==(Object other) => identical(this, other) || other is RandomSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif && - other.withPeople == withPeople && - other.withStacked == withStacked; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode) + - (withPeople == null ? 0 : withPeople!.hashCode) + - (withStacked == null ? 0 : withStacked!.hashCode); - - @override - String toString() => 'RandomSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif, withPeople=$withPeople, withStacked=$withStacked]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - if (this.withPeople.isPresent) { - final value = this.withPeople.value; - json[r'withPeople'] = value; - } - if (this.withStacked.isPresent) { - final value = this.withStacked.value; - json[r'withStacked'] = value; - } - return json; - } - - /// Returns a new [RandomSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RandomSearchDto? fromJson(dynamic value) { - upgradeDto(value, "RandomSearchDto"); - if (value is Map) { - final json = value.cast(); - - return RandomSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - withPeople: json.containsKey(r'withPeople') ? Optional.present(mapValueOfType(json, r'withPeople')) : const Optional.absent(), - withStacked: json.containsKey(r'withStacked') ? Optional.present(mapValueOfType(json, r'withStacked')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RandomSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RandomSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RandomSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RandomSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/ratings_response.dart b/mobile/openapi/lib/model/ratings_response.dart deleted file mode 100644 index 7b067412bf..0000000000 --- a/mobile/openapi/lib/model/ratings_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RatingsResponse { - /// Returns a new [RatingsResponse] instance. - RatingsResponse({ - required this.enabled, - }); - - /// Whether ratings are enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsResponse && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'RatingsResponse[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [RatingsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsResponse? fromJson(dynamic value) { - upgradeDto(value, "RatingsResponse"); - if (value is Map) { - final json = value.cast(); - - return RatingsResponse( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/ratings_update.dart b/mobile/openapi/lib/model/ratings_update.dart deleted file mode 100644 index 085efd97e6..0000000000 --- a/mobile/openapi/lib/model/ratings_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RatingsUpdate { - /// Returns a new [RatingsUpdate] instance. - RatingsUpdate({ - this.enabled = const Optional.absent(), - }); - - /// Whether ratings are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is RatingsUpdate && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode); - - @override - String toString() => 'RatingsUpdate[enabled=$enabled]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - return json; - } - - /// Returns a new [RatingsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RatingsUpdate? fromJson(dynamic value) { - upgradeDto(value, "RatingsUpdate"); - if (value is Map) { - final json = value.cast(); - - return RatingsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RatingsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RatingsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RatingsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RatingsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/reaction_level.dart b/mobile/openapi/lib/model/reaction_level.dart deleted file mode 100644 index e5cb5cb354..0000000000 --- a/mobile/openapi/lib/model/reaction_level.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Reaction level -enum ReactionLevel { - album._(r'album'), - asset._(r'asset'), - ; - - /// Instantiate a new enum with the provided value. - const ReactionLevel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReactionLevel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReactionLevel? fromJson(dynamic value) => ReactionLevelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReactionLevel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReactionLevel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionLevel] to String, -/// and [decode] dynamic data back to [ReactionLevel]. -class ReactionLevelTypeTransformer { - factory ReactionLevelTypeTransformer() => _instance ??= const ReactionLevelTypeTransformer._(); - - const ReactionLevelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReactionLevel data) => data._value; - - /// Returns the instance of [ReactionLevel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReactionLevel? decode(dynamic data, {bool allowNull = true}) { - if (data is ReactionLevel) { - return data; - } - if (data != null) { - switch (data) { - case r'album': return ReactionLevel.album; - case r'asset': return ReactionLevel.asset; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReactionLevelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reaction_type.dart b/mobile/openapi/lib/model/reaction_type.dart deleted file mode 100644 index 051f993665..0000000000 --- a/mobile/openapi/lib/model/reaction_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Reaction type -enum ReactionType { - comment._(r'comment'), - like._(r'like'), - ; - - /// Instantiate a new enum with the provided value. - const ReactionType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReactionType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReactionType? fromJson(dynamic value) => ReactionTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReactionType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReactionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReactionType] to String, -/// and [decode] dynamic data back to [ReactionType]. -class ReactionTypeTypeTransformer { - factory ReactionTypeTypeTransformer() => _instance ??= const ReactionTypeTypeTransformer._(); - - const ReactionTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReactionType data) => data._value; - - /// Returns the instance of [ReactionType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReactionType? decode(dynamic data, {bool allowNull = true}) { - if (data is ReactionType) { - return data; - } - if (data != null) { - switch (data) { - case r'comment': return ReactionType.comment; - case r'like': return ReactionType.like; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReactionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/recently_added_response.dart b/mobile/openapi/lib/model/recently_added_response.dart deleted file mode 100644 index 11b46f0d0d..0000000000 --- a/mobile/openapi/lib/model/recently_added_response.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RecentlyAddedResponse { - /// Returns a new [RecentlyAddedResponse] instance. - RecentlyAddedResponse({ - required this.sidebarWeb, - }); - - /// Whether the recently added page appears in the web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is RecentlyAddedResponse && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sidebarWeb.hashCode); - - @override - String toString() => 'RecentlyAddedResponse[sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [RecentlyAddedResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RecentlyAddedResponse? fromJson(dynamic value) { - upgradeDto(value, "RecentlyAddedResponse"); - if (value is Map) { - final json = value.cast(); - - return RecentlyAddedResponse( - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RecentlyAddedResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RecentlyAddedResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RecentlyAddedResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RecentlyAddedResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/recently_added_update.dart b/mobile/openapi/lib/model/recently_added_update.dart deleted file mode 100644 index 48714dd19d..0000000000 --- a/mobile/openapi/lib/model/recently_added_update.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RecentlyAddedUpdate { - /// Returns a new [RecentlyAddedUpdate] instance. - RecentlyAddedUpdate({ - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether the recently added page appears in the web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is RecentlyAddedUpdate && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'RecentlyAddedUpdate[sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [RecentlyAddedUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RecentlyAddedUpdate? fromJson(dynamic value) { - upgradeDto(value, "RecentlyAddedUpdate"); - if (value is Map) { - final json = value.cast(); - - return RecentlyAddedUpdate( - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RecentlyAddedUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RecentlyAddedUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RecentlyAddedUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RecentlyAddedUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/release_channel.dart b/mobile/openapi/lib/model/release_channel.dart deleted file mode 100644 index a1820736f6..0000000000 --- a/mobile/openapi/lib/model/release_channel.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Release channel -enum ReleaseChannel { - stable._(r'stable'), - releaseCandidate._(r'releaseCandidate'), - ; - - /// Instantiate a new enum with the provided value. - const ReleaseChannel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReleaseChannel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReleaseChannel? fromJson(dynamic value) => ReleaseChannelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReleaseChannel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseChannel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseChannel] to String, -/// and [decode] dynamic data back to [ReleaseChannel]. -class ReleaseChannelTypeTransformer { - factory ReleaseChannelTypeTransformer() => _instance ??= const ReleaseChannelTypeTransformer._(); - - const ReleaseChannelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReleaseChannel data) => data._value; - - /// Returns the instance of [ReleaseChannel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReleaseChannel? decode(dynamic data, {bool allowNull = true}) { - if (data is ReleaseChannel) { - return data; - } - if (data != null) { - switch (data) { - case r'stable': return ReleaseChannel.stable; - case r'releaseCandidate': return ReleaseChannel.releaseCandidate; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReleaseChannelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/release_event_v1.dart b/mobile/openapi/lib/model/release_event_v1.dart deleted file mode 100644 index f26ae3e96e..0000000000 --- a/mobile/openapi/lib/model/release_event_v1.dart +++ /dev/null @@ -1,133 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ReleaseEventV1 { - /// Returns a new [ReleaseEventV1] instance. - ReleaseEventV1({ - required this.checkedAt, - required this.isAvailable, - required this.releaseVersion, - required this.serverVersion, - required this.type, - }); - - /// When the server last checked for a latest version. As an ISO timestamp - String checkedAt; - - /// Whether a new version is available - bool isAvailable; - - ServerVersionResponseDto releaseVersion; - - ServerVersionResponseDto serverVersion; - - ReleaseType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReleaseEventV1 && - other.checkedAt == checkedAt && - other.isAvailable == isAvailable && - other.releaseVersion == releaseVersion && - other.serverVersion == serverVersion && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt.hashCode) + - (isAvailable.hashCode) + - (releaseVersion.hashCode) + - (serverVersion.hashCode) + - (type.hashCode); - - @override - String toString() => 'ReleaseEventV1[checkedAt=$checkedAt, isAvailable=$isAvailable, releaseVersion=$releaseVersion, serverVersion=$serverVersion, type=$type]'; - - Map toJson() { - final json = {}; - json[r'checkedAt'] = this.checkedAt; - json[r'isAvailable'] = this.isAvailable; - json[r'releaseVersion'] = this.releaseVersion; - json[r'serverVersion'] = this.serverVersion; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [ReleaseEventV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReleaseEventV1? fromJson(dynamic value) { - upgradeDto(value, "ReleaseEventV1"); - if (value is Map) { - final json = value.cast(); - - return ReleaseEventV1( - checkedAt: mapValueOfType(json, r'checkedAt')!, - isAvailable: mapValueOfType(json, r'isAvailable')!, - releaseVersion: ServerVersionResponseDto.fromJson(json[r'releaseVersion'])!, - serverVersion: ServerVersionResponseDto.fromJson(json[r'serverVersion'])!, - type: ReleaseType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseEventV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReleaseEventV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReleaseEventV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReleaseEventV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'isAvailable', - 'releaseVersion', - 'serverVersion', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/release_type.dart b/mobile/openapi/lib/model/release_type.dart deleted file mode 100644 index aa1a962701..0000000000 --- a/mobile/openapi/lib/model/release_type.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - - -enum ReleaseType { - major._(r'major'), - premajor._(r'premajor'), - minor._(r'minor'), - preminor._(r'preminor'), - patch_._(r'patch'), - prepatch._(r'prepatch'), - prerelease._(r'prerelease'), - ; - - /// Instantiate a new enum with the provided value. - const ReleaseType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ReleaseType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ReleaseType? fromJson(dynamic value) => ReleaseTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ReleaseType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReleaseType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ReleaseType] to String, -/// and [decode] dynamic data back to [ReleaseType]. -class ReleaseTypeTypeTransformer { - factory ReleaseTypeTypeTransformer() => _instance ??= const ReleaseTypeTypeTransformer._(); - - const ReleaseTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ReleaseType data) => data._value; - - /// Returns the instance of [ReleaseType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ReleaseType? decode(dynamic data, {bool allowNull = true}) { - if (data is ReleaseType) { - return data; - } - if (data != null) { - switch (data) { - case r'major': return ReleaseType.major; - case r'premajor': return ReleaseType.premajor; - case r'minor': return ReleaseType.minor; - case r'preminor': return ReleaseType.preminor; - case r'patch': return ReleaseType.patch_; - case r'prepatch': return ReleaseType.prepatch; - case r'prerelease': return ReleaseType.prerelease; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ReleaseTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart b/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart deleted file mode 100644 index 07bb226ac0..0000000000 --- a/mobile/openapi/lib/model/reverse_geocoding_state_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ReverseGeocodingStateResponseDto { - /// Returns a new [ReverseGeocodingStateResponseDto] instance. - ReverseGeocodingStateResponseDto({ - required this.lastImportFileName, - required this.lastUpdate, - }); - - /// Last import file name - String? lastImportFileName; - - /// Last update timestamp - String? lastUpdate; - - @override - bool operator ==(Object other) => identical(this, other) || other is ReverseGeocodingStateResponseDto && - other.lastImportFileName == lastImportFileName && - other.lastUpdate == lastUpdate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (lastImportFileName == null ? 0 : lastImportFileName!.hashCode) + - (lastUpdate == null ? 0 : lastUpdate!.hashCode); - - @override - String toString() => 'ReverseGeocodingStateResponseDto[lastImportFileName=$lastImportFileName, lastUpdate=$lastUpdate]'; - - Map toJson() { - final json = {}; - if (this.lastImportFileName != null) { - json[r'lastImportFileName'] = this.lastImportFileName; - } else { - json[r'lastImportFileName'] = null; - } - if (this.lastUpdate != null) { - json[r'lastUpdate'] = this.lastUpdate; - } else { - json[r'lastUpdate'] = null; - } - return json; - } - - /// Returns a new [ReverseGeocodingStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ReverseGeocodingStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ReverseGeocodingStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ReverseGeocodingStateResponseDto( - lastImportFileName: mapValueOfType(json, r'lastImportFileName'), - lastUpdate: mapValueOfType(json, r'lastUpdate'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ReverseGeocodingStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ReverseGeocodingStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ReverseGeocodingStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ReverseGeocodingStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'lastImportFileName', - 'lastUpdate', - }; -} - diff --git a/mobile/openapi/lib/model/rotate_parameters.dart b/mobile/openapi/lib/model/rotate_parameters.dart deleted file mode 100644 index 33609e83e5..0000000000 --- a/mobile/openapi/lib/model/rotate_parameters.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class RotateParameters { - /// Returns a new [RotateParameters] instance. - RotateParameters({ - required this.angle, - }); - - /// Rotation angle in degrees - num angle; - - @override - bool operator ==(Object other) => identical(this, other) || other is RotateParameters && - other.angle == angle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (angle.hashCode); - - @override - String toString() => 'RotateParameters[angle=$angle]'; - - Map toJson() { - final json = {}; - json[r'angle'] = this.angle; - return json; - } - - /// Returns a new [RotateParameters] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static RotateParameters? fromJson(dynamic value) { - upgradeDto(value, "RotateParameters"); - if (value is Map) { - final json = value.cast(); - - return RotateParameters( - angle: num.parse('${json[r'angle']}'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = RotateParameters.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = RotateParameters.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of RotateParameters-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = RotateParameters.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'angle', - }; -} - diff --git a/mobile/openapi/lib/model/search_album_response_dto.dart b/mobile/openapi/lib/model/search_album_response_dto.dart deleted file mode 100644 index c21113ee6d..0000000000 --- a/mobile/openapi/lib/model/search_album_response_dto.dart +++ /dev/null @@ -1,131 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchAlbumResponseDto { - /// Returns a new [SearchAlbumResponseDto] instance. - SearchAlbumResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.total, - }); - - /// Number of albums in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Total number of matching albums - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAlbumResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAlbumResponseDto[count=$count, facets=$facets, items=$items, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAlbumResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAlbumResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAlbumResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAlbumResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AlbumResponseDto.listFromJson(json[r'items']), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAlbumResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAlbumResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAlbumResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart deleted file mode 100644 index 82971c3c49..0000000000 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ /dev/null @@ -1,144 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchAssetResponseDto { - /// Returns a new [SearchAssetResponseDto] instance. - SearchAssetResponseDto({ - required this.count, - this.facets = const [], - this.items = const [], - required this.nextPage, - required this.total, - }); - - /// Number of assets in this page - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - List facets; - - List items; - - /// Next page token - String? nextPage; - - /// Total number of matching assets - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchAssetResponseDto && - other.count == count && - _deepEquality.equals(other.facets, facets) && - _deepEquality.equals(other.items, items) && - other.nextPage == nextPage && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (facets.hashCode) + - (items.hashCode) + - (nextPage == null ? 0 : nextPage!.hashCode) + - (total.hashCode); - - @override - String toString() => 'SearchAssetResponseDto[count=$count, facets=$facets, items=$items, nextPage=$nextPage, total=$total]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'facets'] = this.facets; - json[r'items'] = this.items; - if (this.nextPage != null) { - json[r'nextPage'] = this.nextPage; - } else { - json[r'nextPage'] = null; - } - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchAssetResponseDto( - count: mapValueOfType(json, r'count')!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets']), - items: AssetResponseDto.listFromJson(json[r'items']), - nextPage: mapValueOfType(json, r'nextPage'), - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'facets', - 'items', - 'nextPage', - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_item.dart b/mobile/openapi/lib/model/search_explore_item.dart deleted file mode 100644 index 4089011879..0000000000 --- a/mobile/openapi/lib/model/search_explore_item.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchExploreItem { - /// Returns a new [SearchExploreItem] instance. - SearchExploreItem({ - required this.data, - required this.value, - }); - - AssetResponseDto data; - - /// Explore value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreItem && - other.data == data && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (data.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchExploreItem[data=$data, value=$value]'; - - Map toJson() { - final json = {}; - json[r'data'] = this.data; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchExploreItem] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreItem? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreItem"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreItem( - data: AssetResponseDto.fromJson(json[r'data'])!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreItem.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreItem.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreItem-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreItem.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'data', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_explore_response_dto.dart b/mobile/openapi/lib/model/search_explore_response_dto.dart deleted file mode 100644 index 07ce26c9b8..0000000000 --- a/mobile/openapi/lib/model/search_explore_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchExploreResponseDto { - /// Returns a new [SearchExploreResponseDto] instance. - SearchExploreResponseDto({ - required this.fieldName, - this.items = const [], - }); - - /// Explore field name - String fieldName; - - List items; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchExploreResponseDto && - other.fieldName == fieldName && - _deepEquality.equals(other.items, items); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (fieldName.hashCode) + - (items.hashCode); - - @override - String toString() => 'SearchExploreResponseDto[fieldName=$fieldName, items=$items]'; - - Map toJson() { - final json = {}; - json[r'fieldName'] = this.fieldName; - json[r'items'] = this.items; - return json; - } - - /// Returns a new [SearchExploreResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchExploreResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchExploreResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchExploreResponseDto( - fieldName: mapValueOfType(json, r'fieldName')!, - items: SearchExploreItem.listFromJson(json[r'items']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchExploreResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchExploreResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchExploreResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'fieldName', - 'items', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_count_response_dto.dart b/mobile/openapi/lib/model/search_facet_count_response_dto.dart deleted file mode 100644 index 62adfaa74a..0000000000 --- a/mobile/openapi/lib/model/search_facet_count_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchFacetCountResponseDto { - /// Returns a new [SearchFacetCountResponseDto] instance. - SearchFacetCountResponseDto({ - required this.count, - required this.value, - }); - - /// Number of assets with this facet value - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int count; - - /// Facet value - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetCountResponseDto && - other.count == count && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (value.hashCode); - - @override - String toString() => 'SearchFacetCountResponseDto[count=$count, value=$value]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SearchFacetCountResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetCountResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetCountResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetCountResponseDto( - count: mapValueOfType(json, r'count')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetCountResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetCountResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetCountResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/search_facet_response_dto.dart b/mobile/openapi/lib/model/search_facet_response_dto.dart deleted file mode 100644 index 51124ef1cf..0000000000 --- a/mobile/openapi/lib/model/search_facet_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchFacetResponseDto { - /// Returns a new [SearchFacetResponseDto] instance. - SearchFacetResponseDto({ - this.counts = const [], - required this.fieldName, - }); - - List counts; - - /// Facet field name - String fieldName; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchFacetResponseDto && - _deepEquality.equals(other.counts, counts) && - other.fieldName == fieldName; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (counts.hashCode) + - (fieldName.hashCode); - - @override - String toString() => 'SearchFacetResponseDto[counts=$counts, fieldName=$fieldName]'; - - Map toJson() { - final json = {}; - json[r'counts'] = this.counts; - json[r'fieldName'] = this.fieldName; - return json; - } - - /// Returns a new [SearchFacetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchFacetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchFacetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchFacetResponseDto( - counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']), - fieldName: mapValueOfType(json, r'fieldName')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchFacetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchFacetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchFacetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'counts', - 'fieldName', - }; -} - diff --git a/mobile/openapi/lib/model/search_response_dto.dart b/mobile/openapi/lib/model/search_response_dto.dart deleted file mode 100644 index ca742ae35c..0000000000 --- a/mobile/openapi/lib/model/search_response_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchResponseDto { - /// Returns a new [SearchResponseDto] instance. - SearchResponseDto({ - required this.albums, - required this.assets, - }); - - SearchAlbumResponseDto albums; - - SearchAssetResponseDto assets; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchResponseDto && - other.albums == albums && - other.assets == assets; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (assets.hashCode); - - @override - String toString() => 'SearchResponseDto[albums=$albums, assets=$assets]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'assets'] = this.assets; - return json; - } - - /// Returns a new [SearchResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchResponseDto( - albums: SearchAlbumResponseDto.fromJson(json[r'albums'])!, - assets: SearchAssetResponseDto.fromJson(json[r'assets'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'assets', - }; -} - diff --git a/mobile/openapi/lib/model/search_statistics_response_dto.dart b/mobile/openapi/lib/model/search_statistics_response_dto.dart deleted file mode 100644 index c4d893af05..0000000000 --- a/mobile/openapi/lib/model/search_statistics_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SearchStatisticsResponseDto { - /// Returns a new [SearchStatisticsResponseDto] instance. - SearchStatisticsResponseDto({ - required this.total, - }); - - /// Total number of matching assets - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int total; - - @override - bool operator ==(Object other) => identical(this, other) || other is SearchStatisticsResponseDto && - other.total == total; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (total.hashCode); - - @override - String toString() => 'SearchStatisticsResponseDto[total=$total]'; - - Map toJson() { - final json = {}; - json[r'total'] = this.total; - return json; - } - - /// Returns a new [SearchStatisticsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SearchStatisticsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SearchStatisticsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SearchStatisticsResponseDto( - total: mapValueOfType(json, r'total')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchStatisticsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SearchStatisticsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SearchStatisticsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SearchStatisticsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'total', - }; -} - diff --git a/mobile/openapi/lib/model/search_suggestion_type.dart b/mobile/openapi/lib/model/search_suggestion_type.dart deleted file mode 100644 index 8dac2fc025..0000000000 --- a/mobile/openapi/lib/model/search_suggestion_type.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Suggestion type -enum SearchSuggestionType { - country._(r'country'), - state._(r'state'), - city._(r'city'), - cameraMake._(r'camera-make'), - cameraModel._(r'camera-model'), - cameraLensModel._(r'camera-lens-model'), - ; - - /// Instantiate a new enum with the provided value. - const SearchSuggestionType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SearchSuggestionType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SearchSuggestionType? fromJson(dynamic value) => SearchSuggestionTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SearchSuggestionType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SearchSuggestionType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SearchSuggestionType] to String, -/// and [decode] dynamic data back to [SearchSuggestionType]. -class SearchSuggestionTypeTypeTransformer { - factory SearchSuggestionTypeTypeTransformer() => _instance ??= const SearchSuggestionTypeTypeTransformer._(); - - const SearchSuggestionTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SearchSuggestionType data) => data._value; - - /// Returns the instance of [SearchSuggestionType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SearchSuggestionType? decode(dynamic data, {bool allowNull = true}) { - if (data is SearchSuggestionType) { - return data; - } - if (data != null) { - switch (data) { - case r'country': return SearchSuggestionType.country; - case r'state': return SearchSuggestionType.state; - case r'city': return SearchSuggestionType.city; - case r'camera-make': return SearchSuggestionType.cameraMake; - case r'camera-model': return SearchSuggestionType.cameraModel; - case r'camera-lens-model': return SearchSuggestionType.cameraLensModel; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SearchSuggestionTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/server_about_response_dto.dart b/mobile/openapi/lib/model/server_about_response_dto.dart deleted file mode 100644 index dcfb279204..0000000000 --- a/mobile/openapi/lib/model/server_about_response_dto.dart +++ /dev/null @@ -1,424 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerAboutResponseDto { - /// Returns a new [ServerAboutResponseDto] instance. - ServerAboutResponseDto({ - this.build = const Optional.absent(), - this.buildImage = const Optional.absent(), - this.buildImageUrl = const Optional.absent(), - this.buildUrl = const Optional.absent(), - this.exiftool = const Optional.absent(), - this.ffmpeg = const Optional.absent(), - this.imagemagick = const Optional.absent(), - this.libvips = const Optional.absent(), - required this.licensed, - this.nodejs = const Optional.absent(), - this.repository = const Optional.absent(), - this.repositoryUrl = const Optional.absent(), - this.sourceCommit = const Optional.absent(), - this.sourceRef = const Optional.absent(), - this.sourceUrl = const Optional.absent(), - this.thirdPartyBugFeatureUrl = const Optional.absent(), - this.thirdPartyDocumentationUrl = const Optional.absent(), - this.thirdPartySourceUrl = const Optional.absent(), - this.thirdPartySupportUrl = const Optional.absent(), - required this.version, - required this.versionUrl, - }); - - /// Build identifier - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional build; - - /// Build image name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildImage; - - /// Build image URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildImageUrl; - - /// Build URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional buildUrl; - - /// ExifTool version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional exiftool; - - /// FFmpeg version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ffmpeg; - - /// ImageMagick version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional imagemagick; - - /// libvips version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional libvips; - - /// Whether the server is licensed - bool licensed; - - /// Node.js version - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional nodejs; - - /// Repository name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional repository; - - /// Repository URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional repositoryUrl; - - /// Source commit hash - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceCommit; - - /// Source reference (branch/tag) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceRef; - - /// Source URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sourceUrl; - - /// Third-party bug/feature URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartyBugFeatureUrl; - - /// Third-party documentation URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartyDocumentationUrl; - - /// Third-party source URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartySourceUrl; - - /// Third-party support URL - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional thirdPartySupportUrl; - - /// Server version - String version; - - /// URL to version information - String versionUrl; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerAboutResponseDto && - other.build == build && - other.buildImage == buildImage && - other.buildImageUrl == buildImageUrl && - other.buildUrl == buildUrl && - other.exiftool == exiftool && - other.ffmpeg == ffmpeg && - other.imagemagick == imagemagick && - other.libvips == libvips && - other.licensed == licensed && - other.nodejs == nodejs && - other.repository == repository && - other.repositoryUrl == repositoryUrl && - other.sourceCommit == sourceCommit && - other.sourceRef == sourceRef && - other.sourceUrl == sourceUrl && - other.thirdPartyBugFeatureUrl == thirdPartyBugFeatureUrl && - other.thirdPartyDocumentationUrl == thirdPartyDocumentationUrl && - other.thirdPartySourceUrl == thirdPartySourceUrl && - other.thirdPartySupportUrl == thirdPartySupportUrl && - other.version == version && - other.versionUrl == versionUrl; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (build == null ? 0 : build!.hashCode) + - (buildImage == null ? 0 : buildImage!.hashCode) + - (buildImageUrl == null ? 0 : buildImageUrl!.hashCode) + - (buildUrl == null ? 0 : buildUrl!.hashCode) + - (exiftool == null ? 0 : exiftool!.hashCode) + - (ffmpeg == null ? 0 : ffmpeg!.hashCode) + - (imagemagick == null ? 0 : imagemagick!.hashCode) + - (libvips == null ? 0 : libvips!.hashCode) + - (licensed.hashCode) + - (nodejs == null ? 0 : nodejs!.hashCode) + - (repository == null ? 0 : repository!.hashCode) + - (repositoryUrl == null ? 0 : repositoryUrl!.hashCode) + - (sourceCommit == null ? 0 : sourceCommit!.hashCode) + - (sourceRef == null ? 0 : sourceRef!.hashCode) + - (sourceUrl == null ? 0 : sourceUrl!.hashCode) + - (thirdPartyBugFeatureUrl == null ? 0 : thirdPartyBugFeatureUrl!.hashCode) + - (thirdPartyDocumentationUrl == null ? 0 : thirdPartyDocumentationUrl!.hashCode) + - (thirdPartySourceUrl == null ? 0 : thirdPartySourceUrl!.hashCode) + - (thirdPartySupportUrl == null ? 0 : thirdPartySupportUrl!.hashCode) + - (version.hashCode) + - (versionUrl.hashCode); - - @override - String toString() => 'ServerAboutResponseDto[build=$build, buildImage=$buildImage, buildImageUrl=$buildImageUrl, buildUrl=$buildUrl, exiftool=$exiftool, ffmpeg=$ffmpeg, imagemagick=$imagemagick, libvips=$libvips, licensed=$licensed, nodejs=$nodejs, repository=$repository, repositoryUrl=$repositoryUrl, sourceCommit=$sourceCommit, sourceRef=$sourceRef, sourceUrl=$sourceUrl, thirdPartyBugFeatureUrl=$thirdPartyBugFeatureUrl, thirdPartyDocumentationUrl=$thirdPartyDocumentationUrl, thirdPartySourceUrl=$thirdPartySourceUrl, thirdPartySupportUrl=$thirdPartySupportUrl, version=$version, versionUrl=$versionUrl]'; - - Map toJson() { - final json = {}; - if (this.build.isPresent) { - final value = this.build.value; - json[r'build'] = value; - } - if (this.buildImage.isPresent) { - final value = this.buildImage.value; - json[r'buildImage'] = value; - } - if (this.buildImageUrl.isPresent) { - final value = this.buildImageUrl.value; - json[r'buildImageUrl'] = value; - } - if (this.buildUrl.isPresent) { - final value = this.buildUrl.value; - json[r'buildUrl'] = value; - } - if (this.exiftool.isPresent) { - final value = this.exiftool.value; - json[r'exiftool'] = value; - } - if (this.ffmpeg.isPresent) { - final value = this.ffmpeg.value; - json[r'ffmpeg'] = value; - } - if (this.imagemagick.isPresent) { - final value = this.imagemagick.value; - json[r'imagemagick'] = value; - } - if (this.libvips.isPresent) { - final value = this.libvips.value; - json[r'libvips'] = value; - } - json[r'licensed'] = this.licensed; - if (this.nodejs.isPresent) { - final value = this.nodejs.value; - json[r'nodejs'] = value; - } - if (this.repository.isPresent) { - final value = this.repository.value; - json[r'repository'] = value; - } - if (this.repositoryUrl.isPresent) { - final value = this.repositoryUrl.value; - json[r'repositoryUrl'] = value; - } - if (this.sourceCommit.isPresent) { - final value = this.sourceCommit.value; - json[r'sourceCommit'] = value; - } - if (this.sourceRef.isPresent) { - final value = this.sourceRef.value; - json[r'sourceRef'] = value; - } - if (this.sourceUrl.isPresent) { - final value = this.sourceUrl.value; - json[r'sourceUrl'] = value; - } - if (this.thirdPartyBugFeatureUrl.isPresent) { - final value = this.thirdPartyBugFeatureUrl.value; - json[r'thirdPartyBugFeatureUrl'] = value; - } - if (this.thirdPartyDocumentationUrl.isPresent) { - final value = this.thirdPartyDocumentationUrl.value; - json[r'thirdPartyDocumentationUrl'] = value; - } - if (this.thirdPartySourceUrl.isPresent) { - final value = this.thirdPartySourceUrl.value; - json[r'thirdPartySourceUrl'] = value; - } - if (this.thirdPartySupportUrl.isPresent) { - final value = this.thirdPartySupportUrl.value; - json[r'thirdPartySupportUrl'] = value; - } - json[r'version'] = this.version; - json[r'versionUrl'] = this.versionUrl; - return json; - } - - /// Returns a new [ServerAboutResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerAboutResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerAboutResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerAboutResponseDto( - build: json.containsKey(r'build') ? Optional.present(mapValueOfType(json, r'build')) : const Optional.absent(), - buildImage: json.containsKey(r'buildImage') ? Optional.present(mapValueOfType(json, r'buildImage')) : const Optional.absent(), - buildImageUrl: json.containsKey(r'buildImageUrl') ? Optional.present(mapValueOfType(json, r'buildImageUrl')) : const Optional.absent(), - buildUrl: json.containsKey(r'buildUrl') ? Optional.present(mapValueOfType(json, r'buildUrl')) : const Optional.absent(), - exiftool: json.containsKey(r'exiftool') ? Optional.present(mapValueOfType(json, r'exiftool')) : const Optional.absent(), - ffmpeg: json.containsKey(r'ffmpeg') ? Optional.present(mapValueOfType(json, r'ffmpeg')) : const Optional.absent(), - imagemagick: json.containsKey(r'imagemagick') ? Optional.present(mapValueOfType(json, r'imagemagick')) : const Optional.absent(), - libvips: json.containsKey(r'libvips') ? Optional.present(mapValueOfType(json, r'libvips')) : const Optional.absent(), - licensed: mapValueOfType(json, r'licensed')!, - nodejs: json.containsKey(r'nodejs') ? Optional.present(mapValueOfType(json, r'nodejs')) : const Optional.absent(), - repository: json.containsKey(r'repository') ? Optional.present(mapValueOfType(json, r'repository')) : const Optional.absent(), - repositoryUrl: json.containsKey(r'repositoryUrl') ? Optional.present(mapValueOfType(json, r'repositoryUrl')) : const Optional.absent(), - sourceCommit: json.containsKey(r'sourceCommit') ? Optional.present(mapValueOfType(json, r'sourceCommit')) : const Optional.absent(), - sourceRef: json.containsKey(r'sourceRef') ? Optional.present(mapValueOfType(json, r'sourceRef')) : const Optional.absent(), - sourceUrl: json.containsKey(r'sourceUrl') ? Optional.present(mapValueOfType(json, r'sourceUrl')) : const Optional.absent(), - thirdPartyBugFeatureUrl: json.containsKey(r'thirdPartyBugFeatureUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyBugFeatureUrl')) : const Optional.absent(), - thirdPartyDocumentationUrl: json.containsKey(r'thirdPartyDocumentationUrl') ? Optional.present(mapValueOfType(json, r'thirdPartyDocumentationUrl')) : const Optional.absent(), - thirdPartySourceUrl: json.containsKey(r'thirdPartySourceUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySourceUrl')) : const Optional.absent(), - thirdPartySupportUrl: json.containsKey(r'thirdPartySupportUrl') ? Optional.present(mapValueOfType(json, r'thirdPartySupportUrl')) : const Optional.absent(), - version: mapValueOfType(json, r'version')!, - versionUrl: mapValueOfType(json, r'versionUrl')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerAboutResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerAboutResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerAboutResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerAboutResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'licensed', - 'version', - 'versionUrl', - }; -} - diff --git a/mobile/openapi/lib/model/server_apk_links_dto.dart b/mobile/openapi/lib/model/server_apk_links_dto.dart deleted file mode 100644 index 2227018468..0000000000 --- a/mobile/openapi/lib/model/server_apk_links_dto.dart +++ /dev/null @@ -1,127 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerApkLinksDto { - /// Returns a new [ServerApkLinksDto] instance. - ServerApkLinksDto({ - required this.arm64v8a, - required this.armeabiv7a, - required this.universal, - required this.x8664, - }); - - /// APK download link for ARM64 v8a architecture - String arm64v8a; - - /// APK download link for ARM EABI v7a architecture - String armeabiv7a; - - /// APK download link for universal architecture - String universal; - - /// APK download link for x86_64 architecture - String x8664; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerApkLinksDto && - other.arm64v8a == arm64v8a && - other.armeabiv7a == armeabiv7a && - other.universal == universal && - other.x8664 == x8664; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (arm64v8a.hashCode) + - (armeabiv7a.hashCode) + - (universal.hashCode) + - (x8664.hashCode); - - @override - String toString() => 'ServerApkLinksDto[arm64v8a=$arm64v8a, armeabiv7a=$armeabiv7a, universal=$universal, x8664=$x8664]'; - - Map toJson() { - final json = {}; - json[r'arm64v8a'] = this.arm64v8a; - json[r'armeabiv7a'] = this.armeabiv7a; - json[r'universal'] = this.universal; - json[r'x86_64'] = this.x8664; - return json; - } - - /// Returns a new [ServerApkLinksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerApkLinksDto? fromJson(dynamic value) { - upgradeDto(value, "ServerApkLinksDto"); - if (value is Map) { - final json = value.cast(); - - return ServerApkLinksDto( - arm64v8a: mapValueOfType(json, r'arm64v8a')!, - armeabiv7a: mapValueOfType(json, r'armeabiv7a')!, - universal: mapValueOfType(json, r'universal')!, - x8664: mapValueOfType(json, r'x86_64')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerApkLinksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerApkLinksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerApkLinksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerApkLinksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'arm64v8a', - 'armeabiv7a', - 'universal', - 'x86_64', - }; -} - diff --git a/mobile/openapi/lib/model/server_config_dto.dart b/mobile/openapi/lib/model/server_config_dto.dart deleted file mode 100644 index 0eaaec7c7f..0000000000 --- a/mobile/openapi/lib/model/server_config_dto.dart +++ /dev/null @@ -1,208 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerConfigDto { - /// Returns a new [ServerConfigDto] instance. - ServerConfigDto({ - required this.externalDomain, - required this.isInitialized, - required this.isOnboarded, - required this.loginPageMessage, - required this.maintenanceMode, - required this.mapDarkStyleUrl, - required this.mapLightStyleUrl, - required this.minFaces, - required this.oauthButtonText, - required this.publicUsers, - required this.trashDays, - required this.userDeleteDelay, - }); - - /// External domain URL - String externalDomain; - - /// Whether the server has been initialized - bool isInitialized; - - /// Whether the admin has completed onboarding - bool isOnboarded; - - /// Login page message - String loginPageMessage; - - /// Whether maintenance mode is active - bool maintenanceMode; - - /// Map dark style URL - String mapDarkStyleUrl; - - /// Map light style URL - String mapLightStyleUrl; - - /// People min faces server default - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int minFaces; - - /// OAuth button text - String oauthButtonText; - - /// Whether public user registration is enabled - bool publicUsers; - - /// Number of days before trashed assets are permanently deleted - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int trashDays; - - /// Delay in days before deleted users are permanently removed - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int userDeleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerConfigDto && - other.externalDomain == externalDomain && - other.isInitialized == isInitialized && - other.isOnboarded == isOnboarded && - other.loginPageMessage == loginPageMessage && - other.maintenanceMode == maintenanceMode && - other.mapDarkStyleUrl == mapDarkStyleUrl && - other.mapLightStyleUrl == mapLightStyleUrl && - other.minFaces == minFaces && - other.oauthButtonText == oauthButtonText && - other.publicUsers == publicUsers && - other.trashDays == trashDays && - other.userDeleteDelay == userDeleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (isInitialized.hashCode) + - (isOnboarded.hashCode) + - (loginPageMessage.hashCode) + - (maintenanceMode.hashCode) + - (mapDarkStyleUrl.hashCode) + - (mapLightStyleUrl.hashCode) + - (minFaces.hashCode) + - (oauthButtonText.hashCode) + - (publicUsers.hashCode) + - (trashDays.hashCode) + - (userDeleteDelay.hashCode); - - @override - String toString() => 'ServerConfigDto[externalDomain=$externalDomain, isInitialized=$isInitialized, isOnboarded=$isOnboarded, loginPageMessage=$loginPageMessage, maintenanceMode=$maintenanceMode, mapDarkStyleUrl=$mapDarkStyleUrl, mapLightStyleUrl=$mapLightStyleUrl, minFaces=$minFaces, oauthButtonText=$oauthButtonText, publicUsers=$publicUsers, trashDays=$trashDays, userDeleteDelay=$userDeleteDelay]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'isInitialized'] = this.isInitialized; - json[r'isOnboarded'] = this.isOnboarded; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'maintenanceMode'] = this.maintenanceMode; - json[r'mapDarkStyleUrl'] = this.mapDarkStyleUrl; - json[r'mapLightStyleUrl'] = this.mapLightStyleUrl; - json[r'minFaces'] = this.minFaces; - json[r'oauthButtonText'] = this.oauthButtonText; - json[r'publicUsers'] = this.publicUsers; - json[r'trashDays'] = this.trashDays; - json[r'userDeleteDelay'] = this.userDeleteDelay; - return json; - } - - /// Returns a new [ServerConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerConfigDto? fromJson(dynamic value) { - upgradeDto(value, "ServerConfigDto"); - if (value is Map) { - final json = value.cast(); - - return ServerConfigDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - isInitialized: mapValueOfType(json, r'isInitialized')!, - isOnboarded: mapValueOfType(json, r'isOnboarded')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - maintenanceMode: mapValueOfType(json, r'maintenanceMode')!, - mapDarkStyleUrl: mapValueOfType(json, r'mapDarkStyleUrl')!, - mapLightStyleUrl: mapValueOfType(json, r'mapLightStyleUrl')!, - minFaces: mapValueOfType(json, r'minFaces')!, - oauthButtonText: mapValueOfType(json, r'oauthButtonText')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - trashDays: mapValueOfType(json, r'trashDays')!, - userDeleteDelay: mapValueOfType(json, r'userDeleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'isInitialized', - 'isOnboarded', - 'loginPageMessage', - 'maintenanceMode', - 'mapDarkStyleUrl', - 'mapLightStyleUrl', - 'minFaces', - 'oauthButtonText', - 'publicUsers', - 'trashDays', - 'userDeleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/server_features_dto.dart b/mobile/openapi/lib/model/server_features_dto.dart deleted file mode 100644 index 9b75ef2b32..0000000000 --- a/mobile/openapi/lib/model/server_features_dto.dart +++ /dev/null @@ -1,235 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerFeaturesDto { - /// Returns a new [ServerFeaturesDto] instance. - ServerFeaturesDto({ - required this.configFile, - required this.duplicateDetection, - required this.email, - required this.facialRecognition, - required this.importFaces, - required this.map, - required this.oauth, - required this.oauthAutoLaunch, - required this.ocr, - required this.passwordLogin, - required this.realtimeTranscoding, - required this.reverseGeocoding, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.trash, - }); - - /// Whether config file is available - bool configFile; - - /// Whether duplicate detection is enabled - bool duplicateDetection; - - /// Whether email notifications are enabled - bool email; - - /// Whether facial recognition is enabled - bool facialRecognition; - - /// Whether face import is enabled - bool importFaces; - - /// Whether map feature is enabled - bool map; - - /// Whether OAuth is enabled - bool oauth; - - /// Whether OAuth auto-launch is enabled - bool oauthAutoLaunch; - - /// Whether OCR is enabled - bool ocr; - - /// Whether password login is enabled - bool passwordLogin; - - /// Whether real-time transcoding is enabled - bool realtimeTranscoding; - - /// Whether reverse geocoding is enabled - bool reverseGeocoding; - - /// Whether search is enabled - bool search; - - /// Whether sidecar files are supported - bool sidecar; - - /// Whether smart search is enabled - bool smartSearch; - - /// Whether trash feature is enabled - bool trash; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerFeaturesDto && - other.configFile == configFile && - other.duplicateDetection == duplicateDetection && - other.email == email && - other.facialRecognition == facialRecognition && - other.importFaces == importFaces && - other.map == map && - other.oauth == oauth && - other.oauthAutoLaunch == oauthAutoLaunch && - other.ocr == ocr && - other.passwordLogin == passwordLogin && - other.realtimeTranscoding == realtimeTranscoding && - other.reverseGeocoding == reverseGeocoding && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.trash == trash; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (configFile.hashCode) + - (duplicateDetection.hashCode) + - (email.hashCode) + - (facialRecognition.hashCode) + - (importFaces.hashCode) + - (map.hashCode) + - (oauth.hashCode) + - (oauthAutoLaunch.hashCode) + - (ocr.hashCode) + - (passwordLogin.hashCode) + - (realtimeTranscoding.hashCode) + - (reverseGeocoding.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (trash.hashCode); - - @override - String toString() => 'ServerFeaturesDto[configFile=$configFile, duplicateDetection=$duplicateDetection, email=$email, facialRecognition=$facialRecognition, importFaces=$importFaces, map=$map, oauth=$oauth, oauthAutoLaunch=$oauthAutoLaunch, ocr=$ocr, passwordLogin=$passwordLogin, realtimeTranscoding=$realtimeTranscoding, reverseGeocoding=$reverseGeocoding, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, trash=$trash]'; - - Map toJson() { - final json = {}; - json[r'configFile'] = this.configFile; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'email'] = this.email; - json[r'facialRecognition'] = this.facialRecognition; - json[r'importFaces'] = this.importFaces; - json[r'map'] = this.map; - json[r'oauth'] = this.oauth; - json[r'oauthAutoLaunch'] = this.oauthAutoLaunch; - json[r'ocr'] = this.ocr; - json[r'passwordLogin'] = this.passwordLogin; - json[r'realtimeTranscoding'] = this.realtimeTranscoding; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'trash'] = this.trash; - return json; - } - - /// Returns a new [ServerFeaturesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerFeaturesDto? fromJson(dynamic value) { - upgradeDto(value, "ServerFeaturesDto"); - if (value is Map) { - final json = value.cast(); - - return ServerFeaturesDto( - configFile: mapValueOfType(json, r'configFile')!, - duplicateDetection: mapValueOfType(json, r'duplicateDetection')!, - email: mapValueOfType(json, r'email')!, - facialRecognition: mapValueOfType(json, r'facialRecognition')!, - importFaces: mapValueOfType(json, r'importFaces')!, - map: mapValueOfType(json, r'map')!, - oauth: mapValueOfType(json, r'oauth')!, - oauthAutoLaunch: mapValueOfType(json, r'oauthAutoLaunch')!, - ocr: mapValueOfType(json, r'ocr')!, - passwordLogin: mapValueOfType(json, r'passwordLogin')!, - realtimeTranscoding: mapValueOfType(json, r'realtimeTranscoding')!, - reverseGeocoding: mapValueOfType(json, r'reverseGeocoding')!, - search: mapValueOfType(json, r'search')!, - sidecar: mapValueOfType(json, r'sidecar')!, - smartSearch: mapValueOfType(json, r'smartSearch')!, - trash: mapValueOfType(json, r'trash')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerFeaturesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerFeaturesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerFeaturesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerFeaturesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'configFile', - 'duplicateDetection', - 'email', - 'facialRecognition', - 'importFaces', - 'map', - 'oauth', - 'oauthAutoLaunch', - 'ocr', - 'passwordLogin', - 'realtimeTranscoding', - 'reverseGeocoding', - 'search', - 'sidecar', - 'smartSearch', - 'trash', - }; -} - diff --git a/mobile/openapi/lib/model/server_media_types_response_dto.dart b/mobile/openapi/lib/model/server_media_types_response_dto.dart deleted file mode 100644 index 6a2aaeb9e1..0000000000 --- a/mobile/openapi/lib/model/server_media_types_response_dto.dart +++ /dev/null @@ -1,124 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerMediaTypesResponseDto { - /// Returns a new [ServerMediaTypesResponseDto] instance. - ServerMediaTypesResponseDto({ - this.image = const [], - this.sidecar = const [], - this.video = const [], - }); - - /// Supported image MIME types - List image; - - /// Supported sidecar MIME types - List sidecar; - - /// Supported video MIME types - List video; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerMediaTypesResponseDto && - _deepEquality.equals(other.image, image) && - _deepEquality.equals(other.sidecar, sidecar) && - _deepEquality.equals(other.video, video); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (image.hashCode) + - (sidecar.hashCode) + - (video.hashCode); - - @override - String toString() => 'ServerMediaTypesResponseDto[image=$image, sidecar=$sidecar, video=$video]'; - - Map toJson() { - final json = {}; - json[r'image'] = this.image; - json[r'sidecar'] = this.sidecar; - json[r'video'] = this.video; - return json; - } - - /// Returns a new [ServerMediaTypesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerMediaTypesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerMediaTypesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerMediaTypesResponseDto( - image: json[r'image'] is Iterable - ? (json[r'image'] as Iterable).cast().toList(growable: false) - : const [], - sidecar: json[r'sidecar'] is Iterable - ? (json[r'sidecar'] as Iterable).cast().toList(growable: false) - : const [], - video: json[r'video'] is Iterable - ? (json[r'video'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerMediaTypesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerMediaTypesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerMediaTypesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerMediaTypesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'image', - 'sidecar', - 'video', - }; -} - diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart deleted file mode 100644 index 621ebfa294..0000000000 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerPingResponse { - /// Returns a new [ServerPingResponse] instance. - ServerPingResponse({ - required this.res, - }); - - String res; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerPingResponse && - other.res == res; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (res.hashCode); - - @override - String toString() => 'ServerPingResponse[res=$res]'; - - Map toJson() { - final json = {}; - json[r'res'] = this.res; - return json; - } - - /// Returns a new [ServerPingResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerPingResponse? fromJson(dynamic value) { - upgradeDto(value, "ServerPingResponse"); - if (value is Map) { - final json = value.cast(); - - return ServerPingResponse( - res: mapValueOfType(json, r'res')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerPingResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerPingResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerPingResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerPingResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'res', - }; -} - diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart deleted file mode 100644 index 605bd74f41..0000000000 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ /dev/null @@ -1,160 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerStatsResponseDto { - /// Returns a new [ServerStatsResponseDto] instance. - ServerStatsResponseDto({ - required this.photos, - required this.usage, - this.usageByUser = const [], - required this.usagePhotos, - required this.usageVideos, - required this.videos, - }); - - /// Total number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Array of usage for each user - List usageByUser; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// Total number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStatsResponseDto && - other.photos == photos && - other.usage == usage && - _deepEquality.equals(other.usageByUser, usageByUser) && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (usage.hashCode) + - (usageByUser.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (videos.hashCode); - - @override - String toString() => 'ServerStatsResponseDto[photos=$photos, usage=$usage, usageByUser=$usageByUser, usagePhotos=$usagePhotos, usageVideos=$usageVideos, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - json[r'usage'] = this.usage; - json[r'usageByUser'] = this.usageByUser; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [ServerStatsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStatsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStatsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStatsResponseDto( - photos: mapValueOfType(json, r'photos')!, - usage: mapValueOfType(json, r'usage')!, - usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser']), - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStatsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStatsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStatsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'usage', - 'usageByUser', - 'usagePhotos', - 'usageVideos', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/server_storage_response_dto.dart b/mobile/openapi/lib/model/server_storage_response_dto.dart deleted file mode 100644 index f4f77c7f9b..0000000000 --- a/mobile/openapi/lib/model/server_storage_response_dto.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerStorageResponseDto { - /// Returns a new [ServerStorageResponseDto] instance. - ServerStorageResponseDto({ - required this.diskAvailable, - required this.diskAvailableRaw, - required this.diskSize, - required this.diskSizeRaw, - required this.diskUsagePercentage, - required this.diskUse, - required this.diskUseRaw, - }); - - /// Available disk space (human-readable format) - String diskAvailable; - - /// Available disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskAvailableRaw; - - /// Total disk size (human-readable format) - String diskSize; - - /// Total disk size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskSizeRaw; - - /// Disk usage percentage (0-100) - double diskUsagePercentage; - - /// Used disk space (human-readable format) - String diskUse; - - /// Used disk space in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int diskUseRaw; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerStorageResponseDto && - other.diskAvailable == diskAvailable && - other.diskAvailableRaw == diskAvailableRaw && - other.diskSize == diskSize && - other.diskSizeRaw == diskSizeRaw && - other.diskUsagePercentage == diskUsagePercentage && - other.diskUse == diskUse && - other.diskUseRaw == diskUseRaw; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (diskAvailable.hashCode) + - (diskAvailableRaw.hashCode) + - (diskSize.hashCode) + - (diskSizeRaw.hashCode) + - (diskUsagePercentage.hashCode) + - (diskUse.hashCode) + - (diskUseRaw.hashCode); - - @override - String toString() => 'ServerStorageResponseDto[diskAvailable=$diskAvailable, diskAvailableRaw=$diskAvailableRaw, diskSize=$diskSize, diskSizeRaw=$diskSizeRaw, diskUsagePercentage=$diskUsagePercentage, diskUse=$diskUse, diskUseRaw=$diskUseRaw]'; - - Map toJson() { - final json = {}; - json[r'diskAvailable'] = this.diskAvailable; - json[r'diskAvailableRaw'] = this.diskAvailableRaw; - json[r'diskSize'] = this.diskSize; - json[r'diskSizeRaw'] = this.diskSizeRaw; - json[r'diskUsagePercentage'] = this.diskUsagePercentage; - json[r'diskUse'] = this.diskUse; - json[r'diskUseRaw'] = this.diskUseRaw; - return json; - } - - /// Returns a new [ServerStorageResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerStorageResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerStorageResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerStorageResponseDto( - diskAvailable: mapValueOfType(json, r'diskAvailable')!, - diskAvailableRaw: mapValueOfType(json, r'diskAvailableRaw')!, - diskSize: mapValueOfType(json, r'diskSize')!, - diskSizeRaw: mapValueOfType(json, r'diskSizeRaw')!, - diskUsagePercentage: mapValueOfType(json, r'diskUsagePercentage')!, - diskUse: mapValueOfType(json, r'diskUse')!, - diskUseRaw: mapValueOfType(json, r'diskUseRaw')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerStorageResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerStorageResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerStorageResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerStorageResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'diskAvailable', - 'diskAvailableRaw', - 'diskSize', - 'diskSizeRaw', - 'diskUsagePercentage', - 'diskUse', - 'diskUseRaw', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_history_response_dto.dart b/mobile/openapi/lib/model/server_version_history_response_dto.dart deleted file mode 100644 index 4af2933f8d..0000000000 --- a/mobile/openapi/lib/model/server_version_history_response_dto.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerVersionHistoryResponseDto { - /// Returns a new [ServerVersionHistoryResponseDto] instance. - ServerVersionHistoryResponseDto({ - required this.createdAt, - required this.id, - required this.version, - }); - - /// When this version was first seen - DateTime createdAt; - - /// Version history entry ID - String id; - - /// Version string - String version; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionHistoryResponseDto && - other.createdAt == createdAt && - other.id == id && - other.version == version; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (version.hashCode); - - @override - String toString() => 'ServerVersionHistoryResponseDto[createdAt=$createdAt, id=$id, version=$version]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'version'] = this.version; - return json; - } - - /// Returns a new [ServerVersionHistoryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionHistoryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionHistoryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionHistoryResponseDto( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - version: mapValueOfType(json, r'version')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionHistoryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionHistoryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionHistoryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionHistoryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'version', - }; -} - diff --git a/mobile/openapi/lib/model/server_version_response_dto.dart b/mobile/openapi/lib/model/server_version_response_dto.dart deleted file mode 100644 index 8f4a192920..0000000000 --- a/mobile/openapi/lib/model/server_version_response_dto.dart +++ /dev/null @@ -1,143 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ServerVersionResponseDto { - /// Returns a new [ServerVersionResponseDto] instance. - ServerVersionResponseDto({ - required this.major, - required this.minor, - required this.patch_, - required this.prerelease, - }); - - /// Major version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int major; - - /// Minor version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int minor; - - /// Patch version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int patch_; - - /// Pre-release version number - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? prerelease; - - @override - bool operator ==(Object other) => identical(this, other) || other is ServerVersionResponseDto && - other.major == major && - other.minor == minor && - other.patch_ == patch_ && - other.prerelease == prerelease; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (major.hashCode) + - (minor.hashCode) + - (patch_.hashCode) + - (prerelease == null ? 0 : prerelease!.hashCode); - - @override - String toString() => 'ServerVersionResponseDto[major=$major, minor=$minor, patch_=$patch_, prerelease=$prerelease]'; - - Map toJson() { - final json = {}; - json[r'major'] = this.major; - json[r'minor'] = this.minor; - json[r'patch'] = this.patch_; - if (this.prerelease != null) { - json[r'prerelease'] = this.prerelease; - } else { - json[r'prerelease'] = null; - } - return json; - } - - /// Returns a new [ServerVersionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ServerVersionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ServerVersionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ServerVersionResponseDto( - major: mapValueOfType(json, r'major')!, - minor: mapValueOfType(json, r'minor')!, - patch_: mapValueOfType(json, r'patch')!, - prerelease: mapValueOfType(json, r'prerelease'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ServerVersionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ServerVersionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ServerVersionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ServerVersionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'major', - 'minor', - 'patch', - 'prerelease', - }; -} - diff --git a/mobile/openapi/lib/model/session_create_dto.dart b/mobile/openapi/lib/model/session_create_dto.dart deleted file mode 100644 index 8033bb7f71..0000000000 --- a/mobile/openapi/lib/model/session_create_dto.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionCreateDto { - /// Returns a new [SessionCreateDto] instance. - SessionCreateDto({ - this.deviceOS = const Optional.absent(), - this.deviceType = const Optional.absent(), - this.duration = const Optional.absent(), - }); - - /// Device OS - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deviceOS; - - /// Device type - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional deviceType; - - /// Session duration in seconds - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional duration; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateDto && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.duration == duration; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deviceOS == null ? 0 : deviceOS!.hashCode) + - (deviceType == null ? 0 : deviceType!.hashCode) + - (duration == null ? 0 : duration!.hashCode); - - @override - String toString() => 'SessionCreateDto[deviceOS=$deviceOS, deviceType=$deviceType, duration=$duration]'; - - Map toJson() { - final json = {}; - if (this.deviceOS.isPresent) { - final value = this.deviceOS.value; - json[r'deviceOS'] = value; - } - if (this.deviceType.isPresent) { - final value = this.deviceType.value; - json[r'deviceType'] = value; - } - if (this.duration.isPresent) { - final value = this.duration.value; - json[r'duration'] = value; - } - return json; - } - - /// Returns a new [SessionCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateDto( - deviceOS: json.containsKey(r'deviceOS') ? Optional.present(mapValueOfType(json, r'deviceOS')) : const Optional.absent(), - deviceType: json.containsKey(r'deviceType') ? Optional.present(mapValueOfType(json, r'deviceType')) : const Optional.absent(), - duration: json.containsKey(r'duration') ? Optional.present(json[r'duration'] == null ? null : int.parse('${json[r'duration']}')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_create_response_dto.dart b/mobile/openapi/lib/model/session_create_response_dto.dart deleted file mode 100644 index 497da9afe8..0000000000 --- a/mobile/openapi/lib/model/session_create_response_dto.dart +++ /dev/null @@ -1,193 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionCreateResponseDto { - /// Returns a new [SessionCreateResponseDto] instance. - SessionCreateResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.token, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Session token - String token; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionCreateResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.token == token && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (token.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionCreateResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, token=$token, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'token'] = this.token; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionCreateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionCreateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionCreateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionCreateResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - token: mapValueOfType(json, r'token')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionCreateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionCreateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionCreateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionCreateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'token', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_response_dto.dart b/mobile/openapi/lib/model/session_response_dto.dart deleted file mode 100644 index e1e20619cb..0000000000 --- a/mobile/openapi/lib/model/session_response_dto.dart +++ /dev/null @@ -1,184 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionResponseDto { - /// Returns a new [SessionResponseDto] instance. - SessionResponseDto({ - required this.appVersion, - required this.createdAt, - required this.current, - required this.deviceOS, - required this.deviceType, - this.expiresAt = const Optional.absent(), - required this.id, - required this.isPendingSyncReset, - required this.updatedAt, - }); - - /// App version - String? appVersion; - - /// Creation date - String createdAt; - - /// Is current session - bool current; - - /// Device OS - String deviceOS; - - /// Device type - String deviceType; - - /// Expiration date - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional expiresAt; - - /// Session ID - String id; - - /// Is pending sync reset - bool isPendingSyncReset; - - /// Last update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionResponseDto && - other.appVersion == appVersion && - other.createdAt == createdAt && - other.current == current && - other.deviceOS == deviceOS && - other.deviceType == deviceType && - other.expiresAt == expiresAt && - other.id == id && - other.isPendingSyncReset == isPendingSyncReset && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (appVersion == null ? 0 : appVersion!.hashCode) + - (createdAt.hashCode) + - (current.hashCode) + - (deviceOS.hashCode) + - (deviceType.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (isPendingSyncReset.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SessionResponseDto[appVersion=$appVersion, createdAt=$createdAt, current=$current, deviceOS=$deviceOS, deviceType=$deviceType, expiresAt=$expiresAt, id=$id, isPendingSyncReset=$isPendingSyncReset, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.appVersion != null) { - json[r'appVersion'] = this.appVersion; - } else { - json[r'appVersion'] = null; - } - json[r'createdAt'] = this.createdAt; - json[r'current'] = this.current; - json[r'deviceOS'] = this.deviceOS; - json[r'deviceType'] = this.deviceType; - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value; - } - json[r'id'] = this.id; - json[r'isPendingSyncReset'] = this.isPendingSyncReset; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [SessionResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SessionResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SessionResponseDto( - appVersion: mapValueOfType(json, r'appVersion'), - createdAt: mapValueOfType(json, r'createdAt')!, - current: mapValueOfType(json, r'current')!, - deviceOS: mapValueOfType(json, r'deviceOS')!, - deviceType: mapValueOfType(json, r'deviceType')!, - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapValueOfType(json, r'expiresAt')) : const Optional.absent(), - id: mapValueOfType(json, r'id')!, - isPendingSyncReset: mapValueOfType(json, r'isPendingSyncReset')!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'appVersion', - 'createdAt', - 'current', - 'deviceOS', - 'deviceType', - 'id', - 'isPendingSyncReset', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/session_unlock_dto.dart b/mobile/openapi/lib/model/session_unlock_dto.dart deleted file mode 100644 index 960b58acf0..0000000000 --- a/mobile/openapi/lib/model/session_unlock_dto.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionUnlockDto { - /// Returns a new [SessionUnlockDto] instance. - SessionUnlockDto({ - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - }); - - /// User password (required if PIN code is not provided) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// New PIN code (4-6 digits) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional pinCode; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUnlockDto && - other.password == password && - other.pinCode == pinCode; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode); - - @override - String toString() => 'SessionUnlockDto[password=$password, pinCode=$pinCode]'; - - Map toJson() { - final json = {}; - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - return json; - } - - /// Returns a new [SessionUnlockDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUnlockDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUnlockDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUnlockDto( - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUnlockDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUnlockDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUnlockDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUnlockDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/session_update_dto.dart b/mobile/openapi/lib/model/session_update_dto.dart deleted file mode 100644 index 90cbaffaf4..0000000000 --- a/mobile/openapi/lib/model/session_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SessionUpdateDto { - /// Returns a new [SessionUpdateDto] instance. - SessionUpdateDto({ - this.isPendingSyncReset = const Optional.absent(), - }); - - /// Reset pending sync state - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isPendingSyncReset; - - @override - bool operator ==(Object other) => identical(this, other) || other is SessionUpdateDto && - other.isPendingSyncReset == isPendingSyncReset; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (isPendingSyncReset == null ? 0 : isPendingSyncReset!.hashCode); - - @override - String toString() => 'SessionUpdateDto[isPendingSyncReset=$isPendingSyncReset]'; - - Map toJson() { - final json = {}; - if (this.isPendingSyncReset.isPresent) { - final value = this.isPendingSyncReset.value; - json[r'isPendingSyncReset'] = value; - } - return json; - } - - /// Returns a new [SessionUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SessionUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "SessionUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return SessionUpdateDto( - isPendingSyncReset: json.containsKey(r'isPendingSyncReset') ? Optional.present(mapValueOfType(json, r'isPendingSyncReset')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SessionUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SessionUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SessionUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SessionUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart b/mobile/openapi/lib/model/set_maintenance_mode_dto.dart deleted file mode 100644 index 21f123bb84..0000000000 --- a/mobile/openapi/lib/model/set_maintenance_mode_dto.dart +++ /dev/null @@ -1,116 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SetMaintenanceModeDto { - /// Returns a new [SetMaintenanceModeDto] instance. - SetMaintenanceModeDto({ - required this.action, - this.restoreBackupFilename = const Optional.absent(), - }); - - MaintenanceAction action; - - /// Restore backup filename - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional restoreBackupFilename; - - @override - bool operator ==(Object other) => identical(this, other) || other is SetMaintenanceModeDto && - other.action == action && - other.restoreBackupFilename == restoreBackupFilename; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (restoreBackupFilename == null ? 0 : restoreBackupFilename!.hashCode); - - @override - String toString() => 'SetMaintenanceModeDto[action=$action, restoreBackupFilename=$restoreBackupFilename]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - if (this.restoreBackupFilename.isPresent) { - final value = this.restoreBackupFilename.value; - json[r'restoreBackupFilename'] = value; - } - return json; - } - - /// Returns a new [SetMaintenanceModeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SetMaintenanceModeDto? fromJson(dynamic value) { - upgradeDto(value, "SetMaintenanceModeDto"); - if (value is Map) { - final json = value.cast(); - - return SetMaintenanceModeDto( - action: MaintenanceAction.fromJson(json[r'action'])!, - restoreBackupFilename: json.containsKey(r'restoreBackupFilename') ? Optional.present(mapValueOfType(json, r'restoreBackupFilename')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SetMaintenanceModeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SetMaintenanceModeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SetMaintenanceModeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SetMaintenanceModeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_create_dto.dart b/mobile/openapi/lib/model/shared_link_create_dto.dart deleted file mode 100644 index f6c7b66181..0000000000 --- a/mobile/openapi/lib/model/shared_link_create_dto.dart +++ /dev/null @@ -1,214 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkCreateDto { - /// Returns a new [SharedLinkCreateDto] instance. - SharedLinkCreateDto({ - this.albumId = const Optional.absent(), - this.allowDownload = const Optional.present(true), - this.allowUpload = const Optional.absent(), - this.assetIds = const Optional.present(const []), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.present(true), - this.slug = const Optional.absent(), - required this.type, - }); - - /// Album ID (for album sharing) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumId; - - /// Allow downloads - Optional allowDownload; - - /// Allow uploads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowUpload; - - /// Asset IDs (for individual assets) - Optional?> assetIds; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - SharedLinkType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkCreateDto && - other.albumId == albumId && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assetIds, assetIds) && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId == null ? 0 : albumId!.hashCode) + - (allowDownload.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (assetIds.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode); - - @override - String toString() => 'SharedLinkCreateDto[albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assetIds=$assetIds, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type]'; - - Map toJson() { - final json = {}; - if (this.albumId.isPresent) { - final value = this.albumId.value; - json[r'albumId'] = value; - } - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.assetIds.isPresent) { - final value = this.assetIds.value; - json[r'assetIds'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SharedLinkCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkCreateDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkCreateDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkCreateDto( - albumId: json.containsKey(r'albumId') ? Optional.present(mapValueOfType(json, r'albumId')) : const Optional.absent(), - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - assetIds: json.containsKey(r'assetIds') ? Optional.present(json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - type: SharedLinkType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_edit_dto.dart b/mobile/openapi/lib/model/shared_link_edit_dto.dart deleted file mode 100644 index 6cc0353370..0000000000 --- a/mobile/openapi/lib/model/shared_link_edit_dto.dart +++ /dev/null @@ -1,188 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkEditDto { - /// Returns a new [SharedLinkEditDto] instance. - SharedLinkEditDto({ - this.allowDownload = const Optional.absent(), - this.allowUpload = const Optional.absent(), - this.description = const Optional.absent(), - this.expiresAt = const Optional.absent(), - this.password = const Optional.absent(), - this.showMetadata = const Optional.absent(), - this.slug = const Optional.absent(), - }); - - /// Allow downloads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowDownload; - - /// Allow uploads - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional allowUpload; - - /// Link description - Optional description; - - /// Expiration date - Optional expiresAt; - - /// Link password - Optional password; - - /// Show metadata - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional showMetadata; - - /// Custom URL slug - Optional slug; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkEditDto && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - other.description == description && - other.expiresAt == expiresAt && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowDownload == null ? 0 : allowDownload!.hashCode) + - (allowUpload == null ? 0 : allowUpload!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata == null ? 0 : showMetadata!.hashCode) + - (slug == null ? 0 : slug!.hashCode); - - @override - String toString() => 'SharedLinkEditDto[allowDownload=$allowDownload, allowUpload=$allowUpload, description=$description, expiresAt=$expiresAt, password=$password, showMetadata=$showMetadata, slug=$slug]'; - - Map toJson() { - final json = {}; - if (this.allowDownload.isPresent) { - final value = this.allowDownload.value; - json[r'allowDownload'] = value; - } - if (this.allowUpload.isPresent) { - final value = this.allowUpload.value; - json[r'allowUpload'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.expiresAt.isPresent) { - final value = this.expiresAt.value; - json[r'expiresAt'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.showMetadata.isPresent) { - final value = this.showMetadata.value; - json[r'showMetadata'] = value; - } - if (this.slug.isPresent) { - final value = this.slug.value; - json[r'slug'] = value; - } - return json; - } - - /// Returns a new [SharedLinkEditDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkEditDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkEditDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkEditDto( - allowDownload: json.containsKey(r'allowDownload') ? Optional.present(mapValueOfType(json, r'allowDownload')) : const Optional.absent(), - allowUpload: json.containsKey(r'allowUpload') ? Optional.present(mapValueOfType(json, r'allowUpload')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - expiresAt: json.containsKey(r'expiresAt') ? Optional.present(mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - showMetadata: json.containsKey(r'showMetadata') ? Optional.present(mapValueOfType(json, r'showMetadata')) : const Optional.absent(), - slug: json.containsKey(r'slug') ? Optional.present(mapValueOfType(json, r'slug')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkEditDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkEditDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkEditDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkEditDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_login_dto.dart b/mobile/openapi/lib/model/shared_link_login_dto.dart deleted file mode 100644 index 1ab1bc9349..0000000000 --- a/mobile/openapi/lib/model/shared_link_login_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkLoginDto { - /// Returns a new [SharedLinkLoginDto] instance. - SharedLinkLoginDto({ - required this.password, - }); - - /// Shared link password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkLoginDto && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (password.hashCode); - - @override - String toString() => 'SharedLinkLoginDto[password=$password]'; - - Map toJson() { - final json = {}; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SharedLinkLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkLoginDto( - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart deleted file mode 100644 index 2c86b21515..0000000000 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ /dev/null @@ -1,242 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinkResponseDto { - /// Returns a new [SharedLinkResponseDto] instance. - SharedLinkResponseDto({ - this.album = const Optional.absent(), - required this.allowDownload, - required this.allowUpload, - this.assets = const [], - required this.createdAt, - required this.description, - required this.expiresAt, - required this.id, - required this.key, - required this.password, - required this.showMetadata, - required this.slug, - required this.type, - required this.userId, - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional album; - - /// Allow downloads - bool allowDownload; - - /// Allow uploads - bool allowUpload; - - List assets; - - /// Creation date - DateTime createdAt; - - /// Link description - String? description; - - /// Expiration date - DateTime? expiresAt; - - /// Shared link ID - String id; - - /// Encryption key (base64url) - String key; - - /// Has password - String? password; - - /// Show metadata - bool showMetadata; - - /// Custom URL slug - String? slug; - - SharedLinkType type; - - /// Owner user ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinkResponseDto && - other.album == album && - other.allowDownload == allowDownload && - other.allowUpload == allowUpload && - _deepEquality.equals(other.assets, assets) && - other.createdAt == createdAt && - other.description == description && - other.expiresAt == expiresAt && - other.id == id && - other.key == key && - other.password == password && - other.showMetadata == showMetadata && - other.slug == slug && - other.type == type && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (album == null ? 0 : album!.hashCode) + - (allowDownload.hashCode) + - (allowUpload.hashCode) + - (assets.hashCode) + - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (expiresAt == null ? 0 : expiresAt!.hashCode) + - (id.hashCode) + - (key.hashCode) + - (password == null ? 0 : password!.hashCode) + - (showMetadata.hashCode) + - (slug == null ? 0 : slug!.hashCode) + - (type.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SharedLinkResponseDto[album=$album, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, password=$password, showMetadata=$showMetadata, slug=$slug, type=$type, userId=$userId]'; - - Map toJson() { - final json = {}; - if (this.album.isPresent) { - final value = this.album.value; - json[r'album'] = value; - } - json[r'allowDownload'] = this.allowDownload; - json[r'allowUpload'] = this.allowUpload; - json[r'assets'] = this.assets; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.expiresAt != null) { - json[r'expiresAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.expiresAt!.millisecondsSinceEpoch - : this.expiresAt!.toUtc().toIso8601String(); - } else { - json[r'expiresAt'] = null; - } - json[r'id'] = this.id; - json[r'key'] = this.key; - if (this.password != null) { - json[r'password'] = this.password; - } else { - json[r'password'] = null; - } - json[r'showMetadata'] = this.showMetadata; - if (this.slug != null) { - json[r'slug'] = this.slug; - } else { - json[r'slug'] = null; - } - json[r'type'] = this.type; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SharedLinkResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinkResponseDto? fromJson(dynamic value) { - upgradeDto(value, "SharedLinkResponseDto"); - if (value is Map) { - final json = value.cast(); - - return SharedLinkResponseDto( - album: json.containsKey(r'album') ? Optional.present(AlbumResponseDto.fromJson(json[r'album'])) : const Optional.absent(), - allowDownload: mapValueOfType(json, r'allowDownload')!, - allowUpload: mapValueOfType(json, r'allowUpload')!, - assets: AssetResponseDto.listFromJson(json[r'assets']), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description'), - expiresAt: mapDateTime(json, r'expiresAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - key: mapValueOfType(json, r'key')!, - password: mapValueOfType(json, r'password'), - showMetadata: mapValueOfType(json, r'showMetadata')!, - slug: mapValueOfType(json, r'slug'), - type: SharedLinkType.fromJson(json[r'type'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinkResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinkResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowDownload', - 'allowUpload', - 'assets', - 'createdAt', - 'description', - 'expiresAt', - 'id', - 'key', - 'password', - 'showMetadata', - 'slug', - 'type', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/shared_link_type.dart b/mobile/openapi/lib/model/shared_link_type.dart deleted file mode 100644 index ed459cbcce..0000000000 --- a/mobile/openapi/lib/model/shared_link_type.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Shared link type -enum SharedLinkType { - ALBUM._(r'ALBUM'), - INDIVIDUAL._(r'INDIVIDUAL'), - ; - - /// Instantiate a new enum with the provided value. - const SharedLinkType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SharedLinkType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SharedLinkType? fromJson(dynamic value) => SharedLinkTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SharedLinkType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinkType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SharedLinkType] to String, -/// and [decode] dynamic data back to [SharedLinkType]. -class SharedLinkTypeTypeTransformer { - factory SharedLinkTypeTypeTransformer() => _instance ??= const SharedLinkTypeTypeTransformer._(); - - const SharedLinkTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SharedLinkType data) => data._value; - - /// Returns the instance of [SharedLinkType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SharedLinkType? decode(dynamic data, {bool allowNull = true}) { - if (data is SharedLinkType) { - return data; - } - if (data != null) { - switch (data) { - case r'ALBUM': return SharedLinkType.ALBUM; - case r'INDIVIDUAL': return SharedLinkType.INDIVIDUAL; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SharedLinkTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/shared_links_response.dart b/mobile/openapi/lib/model/shared_links_response.dart deleted file mode 100644 index 2b32a57540..0000000000 --- a/mobile/openapi/lib/model/shared_links_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinksResponse { - /// Returns a new [SharedLinksResponse] instance. - SharedLinksResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether shared links are enabled - bool enabled; - - /// Whether shared links appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'SharedLinksResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [SharedLinksResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksResponse? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksResponse"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/shared_links_update.dart b/mobile/openapi/lib/model/shared_links_update.dart deleted file mode 100644 index 7c5761e343..0000000000 --- a/mobile/openapi/lib/model/shared_links_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SharedLinksUpdate { - /// Returns a new [SharedLinksUpdate] instance. - SharedLinksUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether shared links are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether shared links appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is SharedLinksUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'SharedLinksUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [SharedLinksUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SharedLinksUpdate? fromJson(dynamic value) { - upgradeDto(value, "SharedLinksUpdate"); - if (value is Map) { - final json = value.cast(); - - return SharedLinksUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SharedLinksUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SharedLinksUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SharedLinksUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SharedLinksUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart deleted file mode 100644 index 54c8fa07d2..0000000000 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SignUpDto { - /// Returns a new [SignUpDto] instance. - SignUpDto({ - required this.email, - required this.name, - required this.password, - }); - - /// User email - String email; - - /// User name - String name; - - /// User password - String password; - - @override - bool operator ==(Object other) => identical(this, other) || other is SignUpDto && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode) + - (name.hashCode) + - (password.hashCode); - - @override - String toString() => 'SignUpDto[email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - json[r'name'] = this.name; - json[r'password'] = this.password; - return json; - } - - /// Returns a new [SignUpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SignUpDto? fromJson(dynamic value) { - upgradeDto(value, "SignUpDto"); - if (value is Map) { - final json = value.cast(); - - return SignUpDto( - email: mapValueOfType(json, r'email')!, - name: mapValueOfType(json, r'name')!, - password: mapValueOfType(json, r'password')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SignUpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SignUpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SignUpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SignUpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/smart_search_dto.dart b/mobile/openapi/lib/model/smart_search_dto.dart deleted file mode 100644 index 70c9a9354e..0000000000 --- a/mobile/openapi/lib/model/smart_search_dto.dart +++ /dev/null @@ -1,632 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SmartSearchDto { - /// Returns a new [SmartSearchDto] instance. - SmartSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.language = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.page = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.query = const Optional.absent(), - this.queryAssetId = const Optional.absent(), - this.rating = const Optional.absent(), - this.size = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - this.withDeleted = const Optional.absent(), - this.withExif = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Search language code - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional language; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Page number - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional page; - - /// Filter by person IDs - Optional?> personIds; - - /// Natural language search query - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional query; - - /// Asset ID to use as search reference - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional queryAssetId; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Number of results to return - /// - /// Minimum value: 1 - /// Maximum value: 1000 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional size; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - /// Include deleted assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withDeleted; - - /// Include EXIF data in response - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional withExif; - - @override - bool operator ==(Object other) => identical(this, other) || other is SmartSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.language == language && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - other.page == page && - _deepEquality.equals(other.personIds, personIds) && - other.query == query && - other.queryAssetId == queryAssetId && - other.rating == rating && - other.size == size && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility && - other.withDeleted == withDeleted && - other.withExif == withExif; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (language == null ? 0 : language!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (page == null ? 0 : page!.hashCode) + - (personIds.hashCode) + - (query == null ? 0 : query!.hashCode) + - (queryAssetId == null ? 0 : queryAssetId!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (size == null ? 0 : size!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode) + - (withDeleted == null ? 0 : withDeleted!.hashCode) + - (withExif == null ? 0 : withExif!.hashCode); - - @override - String toString() => 'SmartSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, language=$language, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, page=$page, personIds=$personIds, query=$query, queryAssetId=$queryAssetId, rating=$rating, size=$size, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility, withDeleted=$withDeleted, withExif=$withExif]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.language.isPresent) { - final value = this.language.value; - json[r'language'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.page.isPresent) { - final value = this.page.value; - json[r'page'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.query.isPresent) { - final value = this.query.value; - json[r'query'] = value; - } - if (this.queryAssetId.isPresent) { - final value = this.queryAssetId.value; - json[r'queryAssetId'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.size.isPresent) { - final value = this.size.value; - json[r'size'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - if (this.withDeleted.isPresent) { - final value = this.withDeleted.value; - json[r'withDeleted'] = value; - } - if (this.withExif.isPresent) { - final value = this.withExif.value; - json[r'withExif'] = value; - } - return json; - } - - /// Returns a new [SmartSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SmartSearchDto? fromJson(dynamic value) { - upgradeDto(value, "SmartSearchDto"); - if (value is Map) { - final json = value.cast(); - - return SmartSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - language: json.containsKey(r'language') ? Optional.present(mapValueOfType(json, r'language')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - page: json.containsKey(r'page') ? Optional.present(json[r'page'] == null ? null : int.parse('${json[r'page']}')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - query: json.containsKey(r'query') ? Optional.present(mapValueOfType(json, r'query')) : const Optional.absent(), - queryAssetId: json.containsKey(r'queryAssetId') ? Optional.present(mapValueOfType(json, r'queryAssetId')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - size: json.containsKey(r'size') ? Optional.present(json[r'size'] == null ? null : int.parse('${json[r'size']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - withDeleted: json.containsKey(r'withDeleted') ? Optional.present(mapValueOfType(json, r'withDeleted')) : const Optional.absent(), - withExif: json.containsKey(r'withExif') ? Optional.present(mapValueOfType(json, r'withExif')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SmartSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SmartSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SmartSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SmartSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/source_type.dart b/mobile/openapi/lib/model/source_type.dart deleted file mode 100644 index 53fb1cb53d..0000000000 --- a/mobile/openapi/lib/model/source_type.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Face detection source type -enum SourceType { - machineLearning._(r'machine-learning'), - exif._(r'exif'), - manual._(r'manual'), - ; - - /// Instantiate a new enum with the provided value. - const SourceType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SourceType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SourceType? fromJson(dynamic value) => SourceTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SourceType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SourceType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SourceType] to String, -/// and [decode] dynamic data back to [SourceType]. -class SourceTypeTypeTransformer { - factory SourceTypeTypeTransformer() => _instance ??= const SourceTypeTypeTransformer._(); - - const SourceTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SourceType data) => data._value; - - /// Returns the instance of [SourceType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SourceType? decode(dynamic data, {bool allowNull = true}) { - if (data is SourceType) { - return data; - } - if (data != null) { - switch (data) { - case r'machine-learning': return SourceType.machineLearning; - case r'exif': return SourceType.exif; - case r'manual': return SourceType.manual; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SourceTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/stack_create_dto.dart b/mobile/openapi/lib/model/stack_create_dto.dart deleted file mode 100644 index 6b08c83401..0000000000 --- a/mobile/openapi/lib/model/stack_create_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackCreateDto { - /// Returns a new [StackCreateDto] instance. - StackCreateDto({ - this.assetIds = const [], - }); - - /// Asset IDs (first becomes primary, min 2) - List assetIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackCreateDto && - _deepEquality.equals(other.assetIds, assetIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode); - - @override - String toString() => 'StackCreateDto[assetIds=$assetIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - return json; - } - - /// Returns a new [StackCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackCreateDto? fromJson(dynamic value) { - upgradeDto(value, "StackCreateDto"); - if (value is Map) { - final json = value.cast(); - - return StackCreateDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - }; -} - diff --git a/mobile/openapi/lib/model/stack_response_dto.dart b/mobile/openapi/lib/model/stack_response_dto.dart deleted file mode 100644 index 326f83a03d..0000000000 --- a/mobile/openapi/lib/model/stack_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackResponseDto { - /// Returns a new [StackResponseDto] instance. - StackResponseDto({ - this.assets = const [], - required this.id, - required this.primaryAssetId, - }); - - List assets; - - /// Stack ID - String id; - - /// Primary asset ID - String primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackResponseDto && - _deepEquality.equals(other.assets, assets) && - other.id == id && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assets.hashCode) + - (id.hashCode) + - (primaryAssetId.hashCode); - - @override - String toString() => 'StackResponseDto[assets=$assets, id=$id, primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - json[r'assets'] = this.assets; - json[r'id'] = this.id; - json[r'primaryAssetId'] = this.primaryAssetId; - return json; - } - - /// Returns a new [StackResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackResponseDto? fromJson(dynamic value) { - upgradeDto(value, "StackResponseDto"); - if (value is Map) { - final json = value.cast(); - - return StackResponseDto( - assets: AssetResponseDto.listFromJson(json[r'assets']), - id: mapValueOfType(json, r'id')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assets', - 'id', - 'primaryAssetId', - }; -} - diff --git a/mobile/openapi/lib/model/stack_update_dto.dart b/mobile/openapi/lib/model/stack_update_dto.dart deleted file mode 100644 index 98787f3a43..0000000000 --- a/mobile/openapi/lib/model/stack_update_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StackUpdateDto { - /// Returns a new [StackUpdateDto] instance. - StackUpdateDto({ - this.primaryAssetId = const Optional.absent(), - }); - - /// Primary asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional primaryAssetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is StackUpdateDto && - other.primaryAssetId == primaryAssetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (primaryAssetId == null ? 0 : primaryAssetId!.hashCode); - - @override - String toString() => 'StackUpdateDto[primaryAssetId=$primaryAssetId]'; - - Map toJson() { - final json = {}; - if (this.primaryAssetId.isPresent) { - final value = this.primaryAssetId.value; - json[r'primaryAssetId'] = value; - } - return json; - } - - /// Returns a new [StackUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StackUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "StackUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return StackUpdateDto( - primaryAssetId: json.containsKey(r'primaryAssetId') ? Optional.present(mapValueOfType(json, r'primaryAssetId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StackUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StackUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StackUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StackUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/statistics_search_dto.dart b/mobile/openapi/lib/model/statistics_search_dto.dart deleted file mode 100644 index 37328cd7f4..0000000000 --- a/mobile/openapi/lib/model/statistics_search_dto.dart +++ /dev/null @@ -1,524 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class StatisticsSearchDto { - /// Returns a new [StatisticsSearchDto] instance. - StatisticsSearchDto({ - this.albumIds = const Optional.present(const []), - this.city = const Optional.absent(), - this.country = const Optional.absent(), - this.createdAfter = const Optional.absent(), - this.createdBefore = const Optional.absent(), - this.description = const Optional.absent(), - this.isEncoded = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.isMotion = const Optional.absent(), - this.isNotInAlbum = const Optional.absent(), - this.isOffline = const Optional.absent(), - this.lensModel = const Optional.absent(), - this.libraryId = const Optional.absent(), - this.make = const Optional.absent(), - this.model = const Optional.absent(), - this.ocr = const Optional.absent(), - this.personIds = const Optional.present(const []), - this.rating = const Optional.absent(), - this.state = const Optional.absent(), - this.tagIds = const Optional.present(const []), - this.takenAfter = const Optional.absent(), - this.takenBefore = const Optional.absent(), - this.trashedAfter = const Optional.absent(), - this.trashedBefore = const Optional.absent(), - this.type = const Optional.absent(), - this.updatedAfter = const Optional.absent(), - this.updatedBefore = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Filter by album IDs - Optional?> albumIds; - - /// Filter by city name - Optional city; - - /// Filter by country name - Optional country; - - /// Filter by creation date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdAfter; - - /// Filter by creation date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional createdBefore; - - /// Filter by description text - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Filter by encoded status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isEncoded; - - /// Filter by favorite status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Filter by motion photo status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isMotion; - - /// Filter assets not in any album - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isNotInAlbum; - - /// Filter by offline status - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isOffline; - - /// Filter by lens model - Optional lensModel; - - /// Library ID to filter by - Optional libraryId; - - /// Filter by camera make - Optional make; - - /// Filter by camera model - Optional model; - - /// Filter by OCR text content - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ocr; - - /// Filter by person IDs - Optional?> personIds; - - /// Filter by rating [1-5], or null for unrated - /// - /// Minimum value: 1 - /// Maximum value: 5 - Optional rating; - - /// Filter by state/province name - Optional state; - - /// Filter by tag IDs - Optional?> tagIds; - - /// Filter by taken date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenAfter; - - /// Filter by taken date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional takenBefore; - - /// Filter by trash date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedAfter; - - /// Filter by trash date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trashedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional type; - - /// Filter by update date (after) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedAfter; - - /// Filter by update date (before) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional updatedBefore; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is StatisticsSearchDto && - _deepEquality.equals(other.albumIds, albumIds) && - other.city == city && - other.country == country && - other.createdAfter == createdAfter && - other.createdBefore == createdBefore && - other.description == description && - other.isEncoded == isEncoded && - other.isFavorite == isFavorite && - other.isMotion == isMotion && - other.isNotInAlbum == isNotInAlbum && - other.isOffline == isOffline && - other.lensModel == lensModel && - other.libraryId == libraryId && - other.make == make && - other.model == model && - other.ocr == ocr && - _deepEquality.equals(other.personIds, personIds) && - other.rating == rating && - other.state == state && - _deepEquality.equals(other.tagIds, tagIds) && - other.takenAfter == takenAfter && - other.takenBefore == takenBefore && - other.trashedAfter == trashedAfter && - other.trashedBefore == trashedBefore && - other.type == type && - other.updatedAfter == updatedAfter && - other.updatedBefore == updatedBefore && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumIds.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (createdAfter == null ? 0 : createdAfter!.hashCode) + - (createdBefore == null ? 0 : createdBefore!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isEncoded == null ? 0 : isEncoded!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (isMotion == null ? 0 : isMotion!.hashCode) + - (isNotInAlbum == null ? 0 : isNotInAlbum!.hashCode) + - (isOffline == null ? 0 : isOffline!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (ocr == null ? 0 : ocr!.hashCode) + - (personIds.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (tagIds == null ? 0 : tagIds!.hashCode) + - (takenAfter == null ? 0 : takenAfter!.hashCode) + - (takenBefore == null ? 0 : takenBefore!.hashCode) + - (trashedAfter == null ? 0 : trashedAfter!.hashCode) + - (trashedBefore == null ? 0 : trashedBefore!.hashCode) + - (type == null ? 0 : type!.hashCode) + - (updatedAfter == null ? 0 : updatedAfter!.hashCode) + - (updatedBefore == null ? 0 : updatedBefore!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'StatisticsSearchDto[albumIds=$albumIds, city=$city, country=$country, createdAfter=$createdAfter, createdBefore=$createdBefore, description=$description, isEncoded=$isEncoded, isFavorite=$isFavorite, isMotion=$isMotion, isNotInAlbum=$isNotInAlbum, isOffline=$isOffline, lensModel=$lensModel, libraryId=$libraryId, make=$make, model=$model, ocr=$ocr, personIds=$personIds, rating=$rating, state=$state, tagIds=$tagIds, takenAfter=$takenAfter, takenBefore=$takenBefore, trashedAfter=$trashedAfter, trashedBefore=$trashedBefore, type=$type, updatedAfter=$updatedAfter, updatedBefore=$updatedBefore, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.albumIds.isPresent) { - final value = this.albumIds.value; - json[r'albumIds'] = value; - } - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - if (this.createdAfter.isPresent) { - final value = this.createdAfter.value; - json[r'createdAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.createdBefore.isPresent) { - final value = this.createdBefore.value; - json[r'createdBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isEncoded.isPresent) { - final value = this.isEncoded.value; - json[r'isEncoded'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.isMotion.isPresent) { - final value = this.isMotion.value; - json[r'isMotion'] = value; - } - if (this.isNotInAlbum.isPresent) { - final value = this.isNotInAlbum.value; - json[r'isNotInAlbum'] = value; - } - if (this.isOffline.isPresent) { - final value = this.isOffline.value; - json[r'isOffline'] = value; - } - if (this.lensModel.isPresent) { - final value = this.lensModel.value; - json[r'lensModel'] = value; - } - if (this.libraryId.isPresent) { - final value = this.libraryId.value; - json[r'libraryId'] = value; - } - if (this.make.isPresent) { - final value = this.make.value; - json[r'make'] = value; - } - if (this.model.isPresent) { - final value = this.model.value; - json[r'model'] = value; - } - if (this.ocr.isPresent) { - final value = this.ocr.value; - json[r'ocr'] = value; - } - if (this.personIds.isPresent) { - final value = this.personIds.value; - json[r'personIds'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.state.isPresent) { - final value = this.state.value; - json[r'state'] = value; - } - if (this.tagIds.isPresent) { - final value = this.tagIds.value; - json[r'tagIds'] = value; - } - if (this.takenAfter.isPresent) { - final value = this.takenAfter.value; - json[r'takenAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.takenBefore.isPresent) { - final value = this.takenBefore.value; - json[r'takenBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedAfter.isPresent) { - final value = this.trashedAfter.value; - json[r'trashedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.trashedBefore.isPresent) { - final value = this.trashedBefore.value; - json[r'trashedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.type.isPresent) { - final value = this.type.value; - json[r'type'] = value; - } - if (this.updatedAfter.isPresent) { - final value = this.updatedAfter.value; - json[r'updatedAfter'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.updatedBefore.isPresent) { - final value = this.updatedBefore.value; - json[r'updatedBefore'] = value == null ? null : (_isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? value.millisecondsSinceEpoch - : value.toUtc().toIso8601String()); - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [StatisticsSearchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static StatisticsSearchDto? fromJson(dynamic value) { - upgradeDto(value, "StatisticsSearchDto"); - if (value is Map) { - final json = value.cast(); - - return StatisticsSearchDto( - albumIds: json.containsKey(r'albumIds') ? Optional.present(json[r'albumIds'] is Iterable - ? (json[r'albumIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - city: json.containsKey(r'city') ? Optional.present(mapValueOfType(json, r'city')) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(mapValueOfType(json, r'country')) : const Optional.absent(), - createdAfter: json.containsKey(r'createdAfter') ? Optional.present(mapDateTime(json, r'createdAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - createdBefore: json.containsKey(r'createdBefore') ? Optional.present(mapDateTime(json, r'createdBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isEncoded: json.containsKey(r'isEncoded') ? Optional.present(mapValueOfType(json, r'isEncoded')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - isMotion: json.containsKey(r'isMotion') ? Optional.present(mapValueOfType(json, r'isMotion')) : const Optional.absent(), - isNotInAlbum: json.containsKey(r'isNotInAlbum') ? Optional.present(mapValueOfType(json, r'isNotInAlbum')) : const Optional.absent(), - isOffline: json.containsKey(r'isOffline') ? Optional.present(mapValueOfType(json, r'isOffline')) : const Optional.absent(), - lensModel: json.containsKey(r'lensModel') ? Optional.present(mapValueOfType(json, r'lensModel')) : const Optional.absent(), - libraryId: json.containsKey(r'libraryId') ? Optional.present(mapValueOfType(json, r'libraryId')) : const Optional.absent(), - make: json.containsKey(r'make') ? Optional.present(mapValueOfType(json, r'make')) : const Optional.absent(), - model: json.containsKey(r'model') ? Optional.present(mapValueOfType(json, r'model')) : const Optional.absent(), - ocr: json.containsKey(r'ocr') ? Optional.present(mapValueOfType(json, r'ocr')) : const Optional.absent(), - personIds: json.containsKey(r'personIds') ? Optional.present(json[r'personIds'] is Iterable - ? (json[r'personIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - state: json.containsKey(r'state') ? Optional.present(mapValueOfType(json, r'state')) : const Optional.absent(), - tagIds: json.containsKey(r'tagIds') ? Optional.present(json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - takenAfter: json.containsKey(r'takenAfter') ? Optional.present(mapDateTime(json, r'takenAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - takenBefore: json.containsKey(r'takenBefore') ? Optional.present(mapDateTime(json, r'takenBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedAfter: json.containsKey(r'trashedAfter') ? Optional.present(mapDateTime(json, r'trashedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - trashedBefore: json.containsKey(r'trashedBefore') ? Optional.present(mapDateTime(json, r'trashedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - type: json.containsKey(r'type') ? Optional.present(AssetTypeEnum.fromJson(json[r'type'])) : const Optional.absent(), - updatedAfter: json.containsKey(r'updatedAfter') ? Optional.present(mapDateTime(json, r'updatedAfter', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - updatedBefore: json.containsKey(r'updatedBefore') ? Optional.present(mapDateTime(json, r'updatedBefore', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StatisticsSearchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = StatisticsSearchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of StatisticsSearchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = StatisticsSearchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/storage_folder.dart b/mobile/openapi/lib/model/storage_folder.dart deleted file mode 100644 index 34f3fcf9bc..0000000000 --- a/mobile/openapi/lib/model/storage_folder.dart +++ /dev/null @@ -1,98 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Storage folder -enum StorageFolder { - encodedVideo._(r'encoded-video'), - library_._(r'library'), - upload._(r'upload'), - profile._(r'profile'), - thumbs._(r'thumbs'), - backups._(r'backups'), - ; - - /// Instantiate a new enum with the provided value. - const StorageFolder._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [StorageFolder] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static StorageFolder? fromJson(dynamic value) => StorageFolderTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [StorageFolder] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = StorageFolder.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [StorageFolder] to String, -/// and [decode] dynamic data back to [StorageFolder]. -class StorageFolderTypeTransformer { - factory StorageFolderTypeTransformer() => _instance ??= const StorageFolderTypeTransformer._(); - - const StorageFolderTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(StorageFolder data) => data._value; - - /// Returns the instance of [StorageFolder] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - StorageFolder? decode(dynamic data, {bool allowNull = true}) { - if (data is StorageFolder) { - return data; - } - if (data != null) { - switch (data) { - case r'encoded-video': return StorageFolder.encodedVideo; - case r'library': return StorageFolder.library_; - case r'upload': return StorageFolder.upload; - case r'profile': return StorageFolder.profile; - case r'thumbs': return StorageFolder.thumbs; - case r'backups': return StorageFolder.backups; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static StorageFolderTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_ack_delete_dto.dart b/mobile/openapi/lib/model/sync_ack_delete_dto.dart deleted file mode 100644 index 76e2b780a7..0000000000 --- a/mobile/openapi/lib/model/sync_ack_delete_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckDeleteDto { - /// Returns a new [SyncAckDeleteDto] instance. - SyncAckDeleteDto({ - this.types = const Optional.present(const []), - }); - - /// Sync entity types to delete acks for - Optional?> types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDeleteDto && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (types.hashCode); - - @override - String toString() => 'SyncAckDeleteDto[types=$types]'; - - Map toJson() { - final json = {}; - if (this.types.isPresent) { - final value = this.types.value; - json[r'types'] = value; - } - return json; - } - - /// Returns a new [SyncAckDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDeleteDto( - types: json.containsKey(r'types') ? Optional.present(SyncEntityType.listFromJson(json[r'types'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_dto.dart b/mobile/openapi/lib/model/sync_ack_dto.dart deleted file mode 100644 index fa7e20a832..0000000000 --- a/mobile/openapi/lib/model/sync_ack_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckDto { - /// Returns a new [SyncAckDto] instance. - SyncAckDto({ - required this.ack, - required this.type, - }); - - /// Acknowledgment ID - String ack; - - SyncEntityType type; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckDto && - other.ack == ack && - other.type == type; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (ack.hashCode) + - (type.hashCode); - - @override - String toString() => 'SyncAckDto[ack=$ack, type=$type]'; - - Map toJson() { - final json = {}; - json[r'ack'] = this.ack; - json[r'type'] = this.type; - return json; - } - - /// Returns a new [SyncAckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckDto( - ack: mapValueOfType(json, r'ack')!, - type: SyncEntityType.fromJson(json[r'type'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'ack', - 'type', - }; -} - diff --git a/mobile/openapi/lib/model/sync_ack_set_dto.dart b/mobile/openapi/lib/model/sync_ack_set_dto.dart deleted file mode 100644 index 531a9dc763..0000000000 --- a/mobile/openapi/lib/model/sync_ack_set_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAckSetDto { - /// Returns a new [SyncAckSetDto] instance. - SyncAckSetDto({ - this.acks = const [], - }); - - /// Acknowledgment IDs (max 1000) - List acks; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAckSetDto && - _deepEquality.equals(other.acks, acks); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (acks.hashCode); - - @override - String toString() => 'SyncAckSetDto[acks=$acks]'; - - Map toJson() { - final json = {}; - json[r'acks'] = this.acks; - return json; - } - - /// Returns a new [SyncAckSetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAckSetDto? fromJson(dynamic value) { - upgradeDto(value, "SyncAckSetDto"); - if (value is Map) { - final json = value.cast(); - - return SyncAckSetDto( - acks: json[r'acks'] is Iterable - ? (json[r'acks'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAckSetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAckSetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAckSetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAckSetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'acks', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_delete_v1.dart b/mobile/openapi/lib/model/sync_album_delete_v1.dart deleted file mode 100644 index a6fdf5c68c..0000000000 --- a/mobile/openapi/lib/model/sync_album_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumDeleteV1 { - /// Returns a new [SyncAlbumDeleteV1] instance. - SyncAlbumDeleteV1({ - required this.albumId, - }); - - /// Album ID - String albumId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumDeleteV1 && - other.albumId == albumId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode); - - @override - String toString() => 'SyncAlbumDeleteV1[albumId=$albumId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - return json; - } - - /// Returns a new [SyncAlbumDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart deleted file mode 100644 index 08952b90ed..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumToAssetDeleteV1 { - /// Returns a new [SyncAlbumToAssetDeleteV1] instance. - SyncAlbumToAssetDeleteV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetDeleteV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetDeleteV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart b/mobile/openapi/lib/model/sync_album_to_asset_v1.dart deleted file mode 100644 index 5f38b35088..0000000000 --- a/mobile/openapi/lib/model/sync_album_to_asset_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumToAssetV1 { - /// Returns a new [SyncAlbumToAssetV1] instance. - SyncAlbumToAssetV1({ - required this.albumId, - required this.assetId, - }); - - /// Album ID - String albumId; - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumToAssetV1 && - other.albumId == albumId && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (assetId.hashCode); - - @override - String toString() => 'SyncAlbumToAssetV1[albumId=$albumId, assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAlbumToAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumToAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumToAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumToAssetV1( - albumId: mapValueOfType(json, r'albumId')!, - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumToAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumToAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumToAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumToAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart b/mobile/openapi/lib/model/sync_album_user_delete_v1.dart deleted file mode 100644 index 526bcc6b6e..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumUserDeleteV1 { - /// Returns a new [SyncAlbumUserDeleteV1] instance. - SyncAlbumUserDeleteV1({ - required this.albumId, - required this.userId, - }); - - /// Album ID - String albumId; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserDeleteV1 && - other.albumId == albumId && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserDeleteV1[albumId=$albumId, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserDeleteV1( - albumId: mapValueOfType(json, r'albumId')!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_user_v1.dart b/mobile/openapi/lib/model/sync_album_user_v1.dart deleted file mode 100644 index 1efe7da029..0000000000 --- a/mobile/openapi/lib/model/sync_album_user_v1.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumUserV1 { - /// Returns a new [SyncAlbumUserV1] instance. - SyncAlbumUserV1({ - required this.albumId, - required this.role, - required this.userId, - }); - - /// Album ID - String albumId; - - AlbumUserRole role; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumUserV1 && - other.albumId == albumId && - other.role == role && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumId.hashCode) + - (role.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncAlbumUserV1[albumId=$albumId, role=$role, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'albumId'] = this.albumId; - json[r'role'] = this.role; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncAlbumUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumUserV1( - albumId: mapValueOfType(json, r'albumId')!, - role: AlbumUserRole.fromJson(json[r'role'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumId', - 'role', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v1.dart b/mobile/openapi/lib/model/sync_album_v1.dart deleted file mode 100644 index 677795fd58..0000000000 --- a/mobile/openapi/lib/model/sync_album_v1.dart +++ /dev/null @@ -1,179 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumV1 { - /// Returns a new [SyncAlbumV1] instance. - SyncAlbumV1({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.ownerId, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Owner ID - String ownerId; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV1 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.ownerId == ownerId && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (ownerId.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV1[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, ownerId=$ownerId, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - json[r'ownerId'] = this.ownerId; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - ownerId: mapValueOfType(json, r'ownerId')!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'ownerId', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_album_v2.dart b/mobile/openapi/lib/model/sync_album_v2.dart deleted file mode 100644 index 701c0c94ec..0000000000 --- a/mobile/openapi/lib/model/sync_album_v2.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAlbumV2 { - /// Returns a new [SyncAlbumV2] instance. - SyncAlbumV2({ - required this.createdAt, - required this.description, - required this.id, - required this.isActivityEnabled, - required this.name, - required this.order, - required this.thumbnailAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Album description - String description; - - /// Album ID - String id; - - /// Is activity enabled - bool isActivityEnabled; - - /// Album name - String name; - - AssetOrder order; - - /// Thumbnail asset ID - String? thumbnailAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAlbumV2 && - other.createdAt == createdAt && - other.description == description && - other.id == id && - other.isActivityEnabled == isActivityEnabled && - other.name == name && - other.order == order && - other.thumbnailAssetId == thumbnailAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description.hashCode) + - (id.hashCode) + - (isActivityEnabled.hashCode) + - (name.hashCode) + - (order.hashCode) + - (thumbnailAssetId == null ? 0 : thumbnailAssetId!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncAlbumV2[createdAt=$createdAt, description=$description, id=$id, isActivityEnabled=$isActivityEnabled, name=$name, order=$order, thumbnailAssetId=$thumbnailAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'description'] = this.description; - json[r'id'] = this.id; - json[r'isActivityEnabled'] = this.isActivityEnabled; - json[r'name'] = this.name; - json[r'order'] = this.order; - if (this.thumbnailAssetId != null) { - json[r'thumbnailAssetId'] = this.thumbnailAssetId; - } else { - json[r'thumbnailAssetId'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncAlbumV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAlbumV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAlbumV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAlbumV2( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - description: mapValueOfType(json, r'description')!, - id: mapValueOfType(json, r'id')!, - isActivityEnabled: mapValueOfType(json, r'isActivityEnabled')!, - name: mapValueOfType(json, r'name')!, - order: AssetOrder.fromJson(json[r'order'])!, - thumbnailAssetId: mapValueOfType(json, r'thumbnailAssetId'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAlbumV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAlbumV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAlbumV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAlbumV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'id', - 'isActivityEnabled', - 'name', - 'order', - 'thumbnailAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_delete_v1.dart deleted file mode 100644 index 1d5a947774..0000000000 --- a/mobile/openapi/lib/model/sync_asset_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetDeleteV1 { - /// Returns a new [SyncAssetDeleteV1] instance. - SyncAssetDeleteV1({ - required this.assetId, - }); - - /// Asset ID - String assetId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetDeleteV1 && - other.assetId == assetId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode); - - @override - String toString() => 'SyncAssetDeleteV1[assetId=$assetId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - return json; - } - - /// Returns a new [SyncAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart deleted file mode 100644 index e0c98bfef3..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetEditDeleteV1 { - /// Returns a new [SyncAssetEditDeleteV1] instance. - SyncAssetEditDeleteV1({ - required this.editId, - }); - - /// Edit ID - String editId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditDeleteV1 && - other.editId == editId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (editId.hashCode); - - @override - String toString() => 'SyncAssetEditDeleteV1[editId=$editId]'; - - Map toJson() { - final json = {}; - json[r'editId'] = this.editId; - return json; - } - - /// Returns a new [SyncAssetEditDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditDeleteV1( - editId: mapValueOfType(json, r'editId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'editId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_edit_v1.dart b/mobile/openapi/lib/model/sync_asset_edit_v1.dart deleted file mode 100644 index 8acfad5f6a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_edit_v1.dart +++ /dev/null @@ -1,138 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetEditV1 { - /// Returns a new [SyncAssetEditV1] instance. - SyncAssetEditV1({ - required this.action, - required this.assetId, - required this.id, - this.parameters = const {}, - required this.sequence, - }); - - AssetEditAction action; - - /// Asset ID - String assetId; - - /// Edit ID - String id; - - /// Edit parameters - Map parameters; - - /// Edit sequence - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int sequence; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetEditV1 && - other.action == action && - other.assetId == assetId && - other.id == id && - _deepEquality.equals(other.parameters, parameters) && - other.sequence == sequence; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (action.hashCode) + - (assetId.hashCode) + - (id.hashCode) + - (parameters.hashCode) + - (sequence.hashCode); - - @override - String toString() => 'SyncAssetEditV1[action=$action, assetId=$assetId, id=$id, parameters=$parameters, sequence=$sequence]'; - - Map toJson() { - final json = {}; - json[r'action'] = this.action; - json[r'assetId'] = this.assetId; - json[r'id'] = this.id; - json[r'parameters'] = this.parameters; - json[r'sequence'] = this.sequence; - return json; - } - - /// Returns a new [SyncAssetEditV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetEditV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetEditV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetEditV1( - action: AssetEditAction.fromJson(json[r'action'])!, - assetId: mapValueOfType(json, r'assetId')!, - id: mapValueOfType(json, r'id')!, - parameters: mapCastOfType(json, r'parameters')!, - sequence: mapValueOfType(json, r'sequence')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetEditV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetEditV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetEditV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetEditV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'action', - 'assetId', - 'id', - 'parameters', - 'sequence', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_exif_v1.dart b/mobile/openapi/lib/model/sync_asset_exif_v1.dart deleted file mode 100644 index f5bc4d021d..0000000000 --- a/mobile/openapi/lib/model/sync_asset_exif_v1.dart +++ /dev/null @@ -1,431 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetExifV1 { - /// Returns a new [SyncAssetExifV1] instance. - SyncAssetExifV1({ - required this.assetId, - required this.city, - required this.country, - required this.dateTimeOriginal, - required this.description, - required this.exifImageHeight, - required this.exifImageWidth, - required this.exposureTime, - required this.fNumber, - required this.fileSizeInByte, - required this.focalLength, - required this.fps, - required this.iso, - required this.latitude, - required this.lensModel, - required this.longitude, - required this.make, - required this.model, - required this.modifyDate, - required this.orientation, - required this.profileDescription, - required this.projectionType, - required this.rating, - required this.state, - required this.timeZone, - }); - - /// Asset ID - String assetId; - - /// City - String? city; - - /// Country - String? country; - - /// Date time original - DateTime? dateTimeOriginal; - - /// Description - String? description; - - /// Exif image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageHeight; - - /// Exif image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? exifImageWidth; - - /// Exposure time - String? exposureTime; - - /// F number - double? fNumber; - - /// File size in byte - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? fileSizeInByte; - - /// Focal length - double? focalLength; - - /// FPS - double? fps; - - /// ISO - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? iso; - - /// Latitude - double? latitude; - - /// Lens model - String? lensModel; - - /// Longitude - double? longitude; - - /// Make - String? make; - - /// Model - String? model; - - /// Modify date - DateTime? modifyDate; - - /// Orientation - String? orientation; - - /// Profile description - String? profileDescription; - - /// Projection type - String? projectionType; - - /// Rating - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? rating; - - /// State - String? state; - - /// Time zone - String? timeZone; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetExifV1 && - other.assetId == assetId && - other.city == city && - other.country == country && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.exifImageHeight == exifImageHeight && - other.exifImageWidth == exifImageWidth && - other.exposureTime == exposureTime && - other.fNumber == fNumber && - other.fileSizeInByte == fileSizeInByte && - other.focalLength == focalLength && - other.fps == fps && - other.iso == iso && - other.latitude == latitude && - other.lensModel == lensModel && - other.longitude == longitude && - other.make == make && - other.model == model && - other.modifyDate == modifyDate && - other.orientation == orientation && - other.profileDescription == profileDescription && - other.projectionType == projectionType && - other.rating == rating && - other.state == state && - other.timeZone == timeZone; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (city == null ? 0 : city!.hashCode) + - (country == null ? 0 : country!.hashCode) + - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (exifImageHeight == null ? 0 : exifImageHeight!.hashCode) + - (exifImageWidth == null ? 0 : exifImageWidth!.hashCode) + - (exposureTime == null ? 0 : exposureTime!.hashCode) + - (fNumber == null ? 0 : fNumber!.hashCode) + - (fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) + - (focalLength == null ? 0 : focalLength!.hashCode) + - (fps == null ? 0 : fps!.hashCode) + - (iso == null ? 0 : iso!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (lensModel == null ? 0 : lensModel!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (make == null ? 0 : make!.hashCode) + - (model == null ? 0 : model!.hashCode) + - (modifyDate == null ? 0 : modifyDate!.hashCode) + - (orientation == null ? 0 : orientation!.hashCode) + - (profileDescription == null ? 0 : profileDescription!.hashCode) + - (projectionType == null ? 0 : projectionType!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (state == null ? 0 : state!.hashCode) + - (timeZone == null ? 0 : timeZone!.hashCode); - - @override - String toString() => 'SyncAssetExifV1[assetId=$assetId, city=$city, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, rating=$rating, state=$state, timeZone=$timeZone]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - if (this.city != null) { - json[r'city'] = this.city; - } else { - json[r'city'] = null; - } - if (this.country != null) { - json[r'country'] = this.country; - } else { - json[r'country'] = null; - } - if (this.dateTimeOriginal != null) { - json[r'dateTimeOriginal'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.dateTimeOriginal!.millisecondsSinceEpoch - : this.dateTimeOriginal!.toUtc().toIso8601String(); - } else { - json[r'dateTimeOriginal'] = null; - } - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.exifImageHeight != null) { - json[r'exifImageHeight'] = this.exifImageHeight; - } else { - json[r'exifImageHeight'] = null; - } - if (this.exifImageWidth != null) { - json[r'exifImageWidth'] = this.exifImageWidth; - } else { - json[r'exifImageWidth'] = null; - } - if (this.exposureTime != null) { - json[r'exposureTime'] = this.exposureTime; - } else { - json[r'exposureTime'] = null; - } - if (this.fNumber != null) { - json[r'fNumber'] = this.fNumber; - } else { - json[r'fNumber'] = null; - } - if (this.fileSizeInByte != null) { - json[r'fileSizeInByte'] = this.fileSizeInByte; - } else { - json[r'fileSizeInByte'] = null; - } - if (this.focalLength != null) { - json[r'focalLength'] = this.focalLength; - } else { - json[r'focalLength'] = null; - } - if (this.fps != null) { - json[r'fps'] = this.fps; - } else { - json[r'fps'] = null; - } - if (this.iso != null) { - json[r'iso'] = this.iso; - } else { - json[r'iso'] = null; - } - if (this.latitude != null) { - json[r'latitude'] = this.latitude; - } else { - json[r'latitude'] = null; - } - if (this.lensModel != null) { - json[r'lensModel'] = this.lensModel; - } else { - json[r'lensModel'] = null; - } - if (this.longitude != null) { - json[r'longitude'] = this.longitude; - } else { - json[r'longitude'] = null; - } - if (this.make != null) { - json[r'make'] = this.make; - } else { - json[r'make'] = null; - } - if (this.model != null) { - json[r'model'] = this.model; - } else { - json[r'model'] = null; - } - if (this.modifyDate != null) { - json[r'modifyDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.modifyDate!.millisecondsSinceEpoch - : this.modifyDate!.toUtc().toIso8601String(); - } else { - json[r'modifyDate'] = null; - } - if (this.orientation != null) { - json[r'orientation'] = this.orientation; - } else { - json[r'orientation'] = null; - } - if (this.profileDescription != null) { - json[r'profileDescription'] = this.profileDescription; - } else { - json[r'profileDescription'] = null; - } - if (this.projectionType != null) { - json[r'projectionType'] = this.projectionType; - } else { - json[r'projectionType'] = null; - } - if (this.rating != null) { - json[r'rating'] = this.rating; - } else { - json[r'rating'] = null; - } - if (this.state != null) { - json[r'state'] = this.state; - } else { - json[r'state'] = null; - } - if (this.timeZone != null) { - json[r'timeZone'] = this.timeZone; - } else { - json[r'timeZone'] = null; - } - return json; - } - - /// Returns a new [SyncAssetExifV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetExifV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetExifV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetExifV1( - assetId: mapValueOfType(json, r'assetId')!, - city: mapValueOfType(json, r'city'), - country: mapValueOfType(json, r'country'), - dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - description: mapValueOfType(json, r'description'), - exifImageHeight: mapValueOfType(json, r'exifImageHeight'), - exifImageWidth: mapValueOfType(json, r'exifImageWidth'), - exposureTime: mapValueOfType(json, r'exposureTime'), - fNumber: mapValueOfType(json, r'fNumber'), - fileSizeInByte: mapValueOfType(json, r'fileSizeInByte'), - focalLength: mapValueOfType(json, r'focalLength'), - fps: mapValueOfType(json, r'fps'), - iso: mapValueOfType(json, r'iso'), - latitude: mapValueOfType(json, r'latitude'), - lensModel: mapValueOfType(json, r'lensModel'), - longitude: mapValueOfType(json, r'longitude'), - make: mapValueOfType(json, r'make'), - model: mapValueOfType(json, r'model'), - modifyDate: mapDateTime(json, r'modifyDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - orientation: mapValueOfType(json, r'orientation'), - profileDescription: mapValueOfType(json, r'profileDescription'), - projectionType: mapValueOfType(json, r'projectionType'), - rating: mapValueOfType(json, r'rating'), - state: mapValueOfType(json, r'state'), - timeZone: mapValueOfType(json, r'timeZone'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetExifV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetExifV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetExifV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetExifV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'city', - 'country', - 'dateTimeOriginal', - 'description', - 'exifImageHeight', - 'exifImageWidth', - 'exposureTime', - 'fNumber', - 'fileSizeInByte', - 'focalLength', - 'fps', - 'iso', - 'latitude', - 'lensModel', - 'longitude', - 'make', - 'model', - 'modifyDate', - 'orientation', - 'profileDescription', - 'projectionType', - 'rating', - 'state', - 'timeZone', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart deleted file mode 100644 index 9cfb8814a7..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceDeleteV1 { - /// Returns a new [SyncAssetFaceDeleteV1] instance. - SyncAssetFaceDeleteV1({ - required this.assetFaceId, - }); - - /// Asset face ID - String assetFaceId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceDeleteV1 && - other.assetFaceId == assetFaceId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetFaceId.hashCode); - - @override - String toString() => 'SyncAssetFaceDeleteV1[assetFaceId=$assetFaceId]'; - - Map toJson() { - final json = {}; - json[r'assetFaceId'] = this.assetFaceId; - return json; - } - - /// Returns a new [SyncAssetFaceDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceDeleteV1( - assetFaceId: mapValueOfType(json, r'assetFaceId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetFaceId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v1.dart b/mobile/openapi/lib/model/sync_asset_face_v1.dart deleted file mode 100644 index 7ccc455f47..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v1.dart +++ /dev/null @@ -1,203 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceV1 { - /// Returns a new [SyncAssetFaceV1] instance. - SyncAssetFaceV1({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV1 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV1[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV1( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'id', - 'imageHeight', - 'imageWidth', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_face_v2.dart b/mobile/openapi/lib/model/sync_asset_face_v2.dart deleted file mode 100644 index 3b714b7632..0000000000 --- a/mobile/openapi/lib/model/sync_asset_face_v2.dart +++ /dev/null @@ -1,227 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetFaceV2 { - /// Returns a new [SyncAssetFaceV2] instance. - SyncAssetFaceV2({ - required this.assetId, - required this.boundingBoxX1, - required this.boundingBoxX2, - required this.boundingBoxY1, - required this.boundingBoxY2, - required this.deletedAt, - required this.id, - required this.imageHeight, - required this.imageWidth, - required this.isVisible, - required this.personId, - required this.sourceType, - }); - - /// Asset ID - String assetId; - - /// Bounding box X1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX1; - - /// Bounding box X2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxX2; - - /// Bounding box Y1 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY1; - - /// Bounding box Y2 - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int boundingBoxY2; - - /// Face deleted at - DateTime? deletedAt; - - /// Asset face ID - String id; - - /// Image height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageHeight; - - /// Image width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int imageWidth; - - /// Is the face visible in the asset - bool isVisible; - - /// Person ID - String? personId; - - /// Source type - String sourceType; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetFaceV2 && - other.assetId == assetId && - other.boundingBoxX1 == boundingBoxX1 && - other.boundingBoxX2 == boundingBoxX2 && - other.boundingBoxY1 == boundingBoxY1 && - other.boundingBoxY2 == boundingBoxY2 && - other.deletedAt == deletedAt && - other.id == id && - other.imageHeight == imageHeight && - other.imageWidth == imageWidth && - other.isVisible == isVisible && - other.personId == personId && - other.sourceType == sourceType; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boundingBoxX1.hashCode) + - (boundingBoxX2.hashCode) + - (boundingBoxY1.hashCode) + - (boundingBoxY2.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (id.hashCode) + - (imageHeight.hashCode) + - (imageWidth.hashCode) + - (isVisible.hashCode) + - (personId == null ? 0 : personId!.hashCode) + - (sourceType.hashCode); - - @override - String toString() => 'SyncAssetFaceV2[assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, deletedAt=$deletedAt, id=$id, imageHeight=$imageHeight, imageWidth=$imageWidth, isVisible=$isVisible, personId=$personId, sourceType=$sourceType]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boundingBoxX1'] = this.boundingBoxX1; - json[r'boundingBoxX2'] = this.boundingBoxX2; - json[r'boundingBoxY1'] = this.boundingBoxY1; - json[r'boundingBoxY2'] = this.boundingBoxY2; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'id'] = this.id; - json[r'imageHeight'] = this.imageHeight; - json[r'imageWidth'] = this.imageWidth; - json[r'isVisible'] = this.isVisible; - if (this.personId != null) { - json[r'personId'] = this.personId; - } else { - json[r'personId'] = null; - } - json[r'sourceType'] = this.sourceType; - return json; - } - - /// Returns a new [SyncAssetFaceV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetFaceV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetFaceV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetFaceV2( - assetId: mapValueOfType(json, r'assetId')!, - boundingBoxX1: mapValueOfType(json, r'boundingBoxX1')!, - boundingBoxX2: mapValueOfType(json, r'boundingBoxX2')!, - boundingBoxY1: mapValueOfType(json, r'boundingBoxY1')!, - boundingBoxY2: mapValueOfType(json, r'boundingBoxY2')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - imageHeight: mapValueOfType(json, r'imageHeight')!, - imageWidth: mapValueOfType(json, r'imageWidth')!, - isVisible: mapValueOfType(json, r'isVisible')!, - personId: mapValueOfType(json, r'personId'), - sourceType: mapValueOfType(json, r'sourceType')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetFaceV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetFaceV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetFaceV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetFaceV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boundingBoxX1', - 'boundingBoxX2', - 'boundingBoxY1', - 'boundingBoxY2', - 'deletedAt', - 'id', - 'imageHeight', - 'imageWidth', - 'isVisible', - 'personId', - 'sourceType', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart deleted file mode 100644 index 326555ef13..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetMetadataDeleteV1 { - /// Returns a new [SyncAssetMetadataDeleteV1] instance. - SyncAssetMetadataDeleteV1({ - required this.assetId, - required this.key, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataDeleteV1 && - other.assetId == assetId && - other.key == key; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode); - - @override - String toString() => 'SyncAssetMetadataDeleteV1[assetId=$assetId, key=$key]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - return json; - } - - /// Returns a new [SyncAssetMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart b/mobile/openapi/lib/model/sync_asset_metadata_v1.dart deleted file mode 100644 index 08d7eae49b..0000000000 --- a/mobile/openapi/lib/model/sync_asset_metadata_v1.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetMetadataV1 { - /// Returns a new [SyncAssetMetadataV1] instance. - SyncAssetMetadataV1({ - required this.assetId, - required this.key, - this.value = const {}, - }); - - /// Asset ID - String assetId; - - /// Key - String key; - - /// Value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetMetadataV1 && - other.assetId == assetId && - other.key == key && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (key.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncAssetMetadataV1[assetId=$assetId, key=$key, value=$value]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'key'] = this.key; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncAssetMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetMetadataV1( - assetId: mapValueOfType(json, r'assetId')!, - key: mapValueOfType(json, r'key')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'key', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart deleted file mode 100644 index 018c134644..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_delete_v1.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetOcrDeleteV1 { - /// Returns a new [SyncAssetOcrDeleteV1] instance. - SyncAssetOcrDeleteV1({ - required this.assetId, - required this.deletedAt, - required this.id, - }); - - /// Original asset ID of the deleted OCR entry - String assetId; - - /// Timestamp when the OCR entry was deleted - DateTime deletedAt; - - /// Audit row ID of the deleted OCR entry - String id; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrDeleteV1 && - other.assetId == assetId && - other.deletedAt == deletedAt && - other.id == id; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (deletedAt.hashCode) + - (id.hashCode); - - @override - String toString() => 'SyncAssetOcrDeleteV1[assetId=$assetId, deletedAt=$deletedAt, id=$id]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt.millisecondsSinceEpoch - : this.deletedAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - return json; - } - - /// Returns a new [SyncAssetOcrDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'deletedAt', - 'id', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart b/mobile/openapi/lib/model/sync_asset_ocr_v1.dart deleted file mode 100644 index 616583189a..0000000000 --- a/mobile/openapi/lib/model/sync_asset_ocr_v1.dart +++ /dev/null @@ -1,217 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetOcrV1 { - /// Returns a new [SyncAssetOcrV1] instance. - SyncAssetOcrV1({ - required this.assetId, - required this.boxScore, - required this.id, - required this.isVisible, - required this.text, - required this.textScore, - required this.x1, - required this.x2, - required this.x3, - required this.x4, - required this.y1, - required this.y2, - required this.y3, - required this.y4, - }); - - /// Asset ID - String assetId; - - /// Confidence score of the bounding box - double boxScore; - - /// OCR entry ID - String id; - - /// Whether the OCR entry is visible - bool isVisible; - - /// Recognized text content - String text; - - /// Confidence score of the recognized text - double textScore; - - /// Top-left X coordinate (normalized 0–1) - double x1; - - /// Top-right X coordinate (normalized 0–1) - double x2; - - /// Bottom-right X coordinate (normalized 0–1) - double x3; - - /// Bottom-left X coordinate (normalized 0–1) - double x4; - - /// Top-left Y coordinate (normalized 0–1) - double y1; - - /// Top-right Y coordinate (normalized 0–1) - double y2; - - /// Bottom-right Y coordinate (normalized 0–1) - double y3; - - /// Bottom-left Y coordinate (normalized 0–1) - double y4; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetOcrV1 && - other.assetId == assetId && - other.boxScore == boxScore && - other.id == id && - other.isVisible == isVisible && - other.text == text && - other.textScore == textScore && - other.x1 == x1 && - other.x2 == x2 && - other.x3 == x3 && - other.x4 == x4 && - other.y1 == y1 && - other.y2 == y2 && - other.y3 == y3 && - other.y4 == y4; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (boxScore.hashCode) + - (id.hashCode) + - (isVisible.hashCode) + - (text.hashCode) + - (textScore.hashCode) + - (x1.hashCode) + - (x2.hashCode) + - (x3.hashCode) + - (x4.hashCode) + - (y1.hashCode) + - (y2.hashCode) + - (y3.hashCode) + - (y4.hashCode); - - @override - String toString() => 'SyncAssetOcrV1[assetId=$assetId, boxScore=$boxScore, id=$id, isVisible=$isVisible, text=$text, textScore=$textScore, x1=$x1, x2=$x2, x3=$x3, x4=$x4, y1=$y1, y2=$y2, y3=$y3, y4=$y4]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'boxScore'] = this.boxScore; - json[r'id'] = this.id; - json[r'isVisible'] = this.isVisible; - json[r'text'] = this.text; - json[r'textScore'] = this.textScore; - json[r'x1'] = this.x1; - json[r'x2'] = this.x2; - json[r'x3'] = this.x3; - json[r'x4'] = this.x4; - json[r'y1'] = this.y1; - json[r'y2'] = this.y2; - json[r'y3'] = this.y3; - json[r'y4'] = this.y4; - return json; - } - - /// Returns a new [SyncAssetOcrV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetOcrV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetOcrV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetOcrV1( - assetId: mapValueOfType(json, r'assetId')!, - boxScore: mapValueOfType(json, r'boxScore')!, - id: mapValueOfType(json, r'id')!, - isVisible: mapValueOfType(json, r'isVisible')!, - text: mapValueOfType(json, r'text')!, - textScore: mapValueOfType(json, r'textScore')!, - x1: mapValueOfType(json, r'x1')!, - x2: mapValueOfType(json, r'x2')!, - x3: mapValueOfType(json, r'x3')!, - x4: mapValueOfType(json, r'x4')!, - y1: mapValueOfType(json, r'y1')!, - y2: mapValueOfType(json, r'y2')!, - y3: mapValueOfType(json, r'y3')!, - y4: mapValueOfType(json, r'y4')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetOcrV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetOcrV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetOcrV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetOcrV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'boxScore', - 'id', - 'isVisible', - 'text', - 'textScore', - 'x1', - 'x2', - 'x3', - 'x4', - 'y1', - 'y2', - 'y3', - 'y4', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v1.dart b/mobile/openapi/lib/model/sync_asset_v1.dart deleted file mode 100644 index 1bcfadd4e1..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v1.dart +++ /dev/null @@ -1,333 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetV1 { - /// Returns a new [SyncAssetV1] instance. - SyncAssetV1({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - String? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV1 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV1[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV1( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_asset_v2.dart b/mobile/openapi/lib/model/sync_asset_v2.dart deleted file mode 100644 index 37751f9f91..0000000000 --- a/mobile/openapi/lib/model/sync_asset_v2.dart +++ /dev/null @@ -1,336 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAssetV2 { - /// Returns a new [SyncAssetV2] instance. - SyncAssetV2({ - required this.checksum, - required this.createdAt, - required this.deletedAt, - required this.duration, - required this.fileCreatedAt, - required this.fileModifiedAt, - required this.height, - required this.id, - required this.isEdited, - required this.isFavorite, - required this.libraryId, - required this.livePhotoVideoId, - required this.localDateTime, - required this.originalFileName, - required this.ownerId, - required this.stackId, - required this.thumbhash, - required this.type, - required this.visibility, - required this.width, - }); - - /// Checksum - String checksum; - - /// Uploaded to Immich at - DateTime? createdAt; - - /// Deleted at - DateTime? deletedAt; - - /// Duration - /// - /// Minimum value: 0 - /// Maximum value: 2147483647 - int? duration; - - /// File created at - DateTime? fileCreatedAt; - - /// File modified at - DateTime? fileModifiedAt; - - /// Asset height - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? height; - - /// Asset ID - String id; - - /// Is edited - bool isEdited; - - /// Is favorite - bool isFavorite; - - /// Library ID - String? libraryId; - - /// Live photo video ID - String? livePhotoVideoId; - - /// Local date time - DateTime? localDateTime; - - /// Original file name - String originalFileName; - - /// Owner ID - String ownerId; - - /// Stack ID - String? stackId; - - /// Thumbhash - String? thumbhash; - - AssetTypeEnum type; - - AssetVisibility visibility; - - /// Asset width - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? width; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAssetV2 && - other.checksum == checksum && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.duration == duration && - other.fileCreatedAt == fileCreatedAt && - other.fileModifiedAt == fileModifiedAt && - other.height == height && - other.id == id && - other.isEdited == isEdited && - other.isFavorite == isFavorite && - other.libraryId == libraryId && - other.livePhotoVideoId == livePhotoVideoId && - other.localDateTime == localDateTime && - other.originalFileName == originalFileName && - other.ownerId == ownerId && - other.stackId == stackId && - other.thumbhash == thumbhash && - other.type == type && - other.visibility == visibility && - other.width == width; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksum.hashCode) + - (createdAt == null ? 0 : createdAt!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (duration == null ? 0 : duration!.hashCode) + - (fileCreatedAt == null ? 0 : fileCreatedAt!.hashCode) + - (fileModifiedAt == null ? 0 : fileModifiedAt!.hashCode) + - (height == null ? 0 : height!.hashCode) + - (id.hashCode) + - (isEdited.hashCode) + - (isFavorite.hashCode) + - (libraryId == null ? 0 : libraryId!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (localDateTime == null ? 0 : localDateTime!.hashCode) + - (originalFileName.hashCode) + - (ownerId.hashCode) + - (stackId == null ? 0 : stackId!.hashCode) + - (thumbhash == null ? 0 : thumbhash!.hashCode) + - (type.hashCode) + - (visibility.hashCode) + - (width == null ? 0 : width!.hashCode); - - @override - String toString() => 'SyncAssetV2[checksum=$checksum, createdAt=$createdAt, deletedAt=$deletedAt, duration=$duration, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, height=$height, id=$id, isEdited=$isEdited, isFavorite=$isFavorite, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, ownerId=$ownerId, stackId=$stackId, thumbhash=$thumbhash, type=$type, visibility=$visibility, width=$width]'; - - Map toJson() { - final json = {}; - json[r'checksum'] = this.checksum; - if (this.createdAt != null) { - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt!.millisecondsSinceEpoch - : this.createdAt!.toUtc().toIso8601String(); - } else { - json[r'createdAt'] = null; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.duration != null) { - json[r'duration'] = this.duration; - } else { - json[r'duration'] = null; - } - if (this.fileCreatedAt != null) { - json[r'fileCreatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileCreatedAt!.millisecondsSinceEpoch - : this.fileCreatedAt!.toUtc().toIso8601String(); - } else { - json[r'fileCreatedAt'] = null; - } - if (this.fileModifiedAt != null) { - json[r'fileModifiedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.fileModifiedAt!.millisecondsSinceEpoch - : this.fileModifiedAt!.toUtc().toIso8601String(); - } else { - json[r'fileModifiedAt'] = null; - } - if (this.height != null) { - json[r'height'] = this.height; - } else { - json[r'height'] = null; - } - json[r'id'] = this.id; - json[r'isEdited'] = this.isEdited; - json[r'isFavorite'] = this.isFavorite; - if (this.libraryId != null) { - json[r'libraryId'] = this.libraryId; - } else { - json[r'libraryId'] = null; - } - if (this.livePhotoVideoId != null) { - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - } else { - json[r'livePhotoVideoId'] = null; - } - if (this.localDateTime != null) { - json[r'localDateTime'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.localDateTime!.millisecondsSinceEpoch - : this.localDateTime!.toUtc().toIso8601String(); - } else { - json[r'localDateTime'] = null; - } - json[r'originalFileName'] = this.originalFileName; - json[r'ownerId'] = this.ownerId; - if (this.stackId != null) { - json[r'stackId'] = this.stackId; - } else { - json[r'stackId'] = null; - } - if (this.thumbhash != null) { - json[r'thumbhash'] = this.thumbhash; - } else { - json[r'thumbhash'] = null; - } - json[r'type'] = this.type; - json[r'visibility'] = this.visibility; - if (this.width != null) { - json[r'width'] = this.width; - } else { - json[r'width'] = null; - } - return json; - } - - /// Returns a new [SyncAssetV2] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAssetV2? fromJson(dynamic value) { - upgradeDto(value, "SyncAssetV2"); - if (value is Map) { - final json = value.cast(); - - return SyncAssetV2( - checksum: mapValueOfType(json, r'checksum')!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - duration: mapValueOfType(json, r'duration'), - fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - height: mapValueOfType(json, r'height'), - id: mapValueOfType(json, r'id')!, - isEdited: mapValueOfType(json, r'isEdited')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - libraryId: mapValueOfType(json, r'libraryId'), - livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - localDateTime: mapDateTime(json, r'localDateTime', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - originalFileName: mapValueOfType(json, r'originalFileName')!, - ownerId: mapValueOfType(json, r'ownerId')!, - stackId: mapValueOfType(json, r'stackId'), - thumbhash: mapValueOfType(json, r'thumbhash'), - type: AssetTypeEnum.fromJson(json[r'type'])!, - visibility: AssetVisibility.fromJson(json[r'visibility'])!, - width: mapValueOfType(json, r'width'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAssetV2.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAssetV2.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAssetV2-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAssetV2.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksum', - 'createdAt', - 'deletedAt', - 'duration', - 'fileCreatedAt', - 'fileModifiedAt', - 'height', - 'id', - 'isEdited', - 'isFavorite', - 'libraryId', - 'livePhotoVideoId', - 'localDateTime', - 'originalFileName', - 'ownerId', - 'stackId', - 'thumbhash', - 'type', - 'visibility', - 'width', - }; -} - diff --git a/mobile/openapi/lib/model/sync_auth_user_v1.dart b/mobile/openapi/lib/model/sync_auth_user_v1.dart deleted file mode 100644 index 24e8bc897e..0000000000 --- a/mobile/openapi/lib/model/sync_auth_user_v1.dart +++ /dev/null @@ -1,235 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncAuthUserV1 { - /// Returns a new [SyncAuthUserV1] instance. - SyncAuthUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.isAdmin, - required this.name, - required this.oauthId, - required this.pinCode, - required this.profileChangedAt, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.storageLabel, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User is admin - bool isAdmin; - - /// User name - String name; - - /// User OAuth ID - String oauthId; - - /// User pin code - String? pinCode; - - /// User profile changed at - DateTime profileChangedAt; - - /// Quota size in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Quota usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int quotaUsageInBytes; - - /// User storage label - String? storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncAuthUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.isAdmin == isAdmin && - other.name == name && - other.oauthId == oauthId && - other.pinCode == pinCode && - other.profileChangedAt == profileChangedAt && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (profileChangedAt.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'SyncAuthUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, isAdmin=$isAdmin, name=$name, oauthId=$oauthId, pinCode=$pinCode, profileChangedAt=$profileChangedAt, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - if (this.pinCode != null) { - json[r'pinCode'] = this.pinCode; - } else { - json[r'pinCode'] = null; - } - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - return json; - } - - /// Returns a new [SyncAuthUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncAuthUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncAuthUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncAuthUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - pinCode: mapValueOfType(json, r'pinCode'), - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes')!, - storageLabel: mapValueOfType(json, r'storageLabel'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncAuthUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncAuthUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncAuthUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncAuthUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'isAdmin', - 'name', - 'oauthId', - 'pinCode', - 'profileChangedAt', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'storageLabel', - }; -} - diff --git a/mobile/openapi/lib/model/sync_entity_type.dart b/mobile/openapi/lib/model/sync_entity_type.dart deleted file mode 100644 index 7a6a518a9f..0000000000 --- a/mobile/openapi/lib/model/sync_entity_type.dart +++ /dev/null @@ -1,204 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sync entity type -enum SyncEntityType { - authUserV1._(r'AuthUserV1'), - userV1._(r'UserV1'), - userDeleteV1._(r'UserDeleteV1'), - assetV1._(r'AssetV1'), - assetV2._(r'AssetV2'), - assetDeleteV1._(r'AssetDeleteV1'), - assetExifV1._(r'AssetExifV1'), - assetEditV1._(r'AssetEditV1'), - assetEditDeleteV1._(r'AssetEditDeleteV1'), - assetMetadataV1._(r'AssetMetadataV1'), - assetMetadataDeleteV1._(r'AssetMetadataDeleteV1'), - assetOcrV1._(r'AssetOcrV1'), - assetOcrDeleteV1._(r'AssetOcrDeleteV1'), - partnerV1._(r'PartnerV1'), - partnerDeleteV1._(r'PartnerDeleteV1'), - partnerAssetV1._(r'PartnerAssetV1'), - partnerAssetV2._(r'PartnerAssetV2'), - partnerAssetBackfillV1._(r'PartnerAssetBackfillV1'), - partnerAssetBackfillV2._(r'PartnerAssetBackfillV2'), - partnerAssetDeleteV1._(r'PartnerAssetDeleteV1'), - partnerAssetExifV1._(r'PartnerAssetExifV1'), - partnerAssetExifBackfillV1._(r'PartnerAssetExifBackfillV1'), - partnerStackBackfillV1._(r'PartnerStackBackfillV1'), - partnerStackDeleteV1._(r'PartnerStackDeleteV1'), - partnerStackV1._(r'PartnerStackV1'), - albumV1._(r'AlbumV1'), - albumV2._(r'AlbumV2'), - albumDeleteV1._(r'AlbumDeleteV1'), - albumUserV1._(r'AlbumUserV1'), - albumUserBackfillV1._(r'AlbumUserBackfillV1'), - albumUserDeleteV1._(r'AlbumUserDeleteV1'), - albumAssetCreateV1._(r'AlbumAssetCreateV1'), - albumAssetCreateV2._(r'AlbumAssetCreateV2'), - albumAssetUpdateV1._(r'AlbumAssetUpdateV1'), - albumAssetUpdateV2._(r'AlbumAssetUpdateV2'), - albumAssetBackfillV1._(r'AlbumAssetBackfillV1'), - albumAssetBackfillV2._(r'AlbumAssetBackfillV2'), - albumAssetExifCreateV1._(r'AlbumAssetExifCreateV1'), - albumAssetExifUpdateV1._(r'AlbumAssetExifUpdateV1'), - albumAssetExifBackfillV1._(r'AlbumAssetExifBackfillV1'), - albumToAssetV1._(r'AlbumToAssetV1'), - albumToAssetDeleteV1._(r'AlbumToAssetDeleteV1'), - albumToAssetBackfillV1._(r'AlbumToAssetBackfillV1'), - memoryV1._(r'MemoryV1'), - memoryDeleteV1._(r'MemoryDeleteV1'), - memoryToAssetV1._(r'MemoryToAssetV1'), - memoryToAssetDeleteV1._(r'MemoryToAssetDeleteV1'), - stackV1._(r'StackV1'), - stackDeleteV1._(r'StackDeleteV1'), - personV1._(r'PersonV1'), - personDeleteV1._(r'PersonDeleteV1'), - assetFaceV1._(r'AssetFaceV1'), - assetFaceV2._(r'AssetFaceV2'), - assetFaceDeleteV1._(r'AssetFaceDeleteV1'), - userMetadataV1._(r'UserMetadataV1'), - userMetadataDeleteV1._(r'UserMetadataDeleteV1'), - syncAckV1._(r'SyncAckV1'), - syncResetV1._(r'SyncResetV1'), - syncCompleteV1._(r'SyncCompleteV1'), - ; - - /// Instantiate a new enum with the provided value. - const SyncEntityType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SyncEntityType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SyncEntityType? fromJson(dynamic value) => SyncEntityTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SyncEntityType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncEntityType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncEntityType] to String, -/// and [decode] dynamic data back to [SyncEntityType]. -class SyncEntityTypeTypeTransformer { - factory SyncEntityTypeTypeTransformer() => _instance ??= const SyncEntityTypeTypeTransformer._(); - - const SyncEntityTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SyncEntityType data) => data._value; - - /// Returns the instance of [SyncEntityType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SyncEntityType? decode(dynamic data, {bool allowNull = true}) { - if (data is SyncEntityType) { - return data; - } - if (data != null) { - switch (data) { - case r'AuthUserV1': return SyncEntityType.authUserV1; - case r'UserV1': return SyncEntityType.userV1; - case r'UserDeleteV1': return SyncEntityType.userDeleteV1; - case r'AssetV1': return SyncEntityType.assetV1; - case r'AssetV2': return SyncEntityType.assetV2; - case r'AssetDeleteV1': return SyncEntityType.assetDeleteV1; - case r'AssetExifV1': return SyncEntityType.assetExifV1; - case r'AssetEditV1': return SyncEntityType.assetEditV1; - case r'AssetEditDeleteV1': return SyncEntityType.assetEditDeleteV1; - case r'AssetMetadataV1': return SyncEntityType.assetMetadataV1; - case r'AssetMetadataDeleteV1': return SyncEntityType.assetMetadataDeleteV1; - case r'AssetOcrV1': return SyncEntityType.assetOcrV1; - case r'AssetOcrDeleteV1': return SyncEntityType.assetOcrDeleteV1; - case r'PartnerV1': return SyncEntityType.partnerV1; - case r'PartnerDeleteV1': return SyncEntityType.partnerDeleteV1; - case r'PartnerAssetV1': return SyncEntityType.partnerAssetV1; - case r'PartnerAssetV2': return SyncEntityType.partnerAssetV2; - case r'PartnerAssetBackfillV1': return SyncEntityType.partnerAssetBackfillV1; - case r'PartnerAssetBackfillV2': return SyncEntityType.partnerAssetBackfillV2; - case r'PartnerAssetDeleteV1': return SyncEntityType.partnerAssetDeleteV1; - case r'PartnerAssetExifV1': return SyncEntityType.partnerAssetExifV1; - case r'PartnerAssetExifBackfillV1': return SyncEntityType.partnerAssetExifBackfillV1; - case r'PartnerStackBackfillV1': return SyncEntityType.partnerStackBackfillV1; - case r'PartnerStackDeleteV1': return SyncEntityType.partnerStackDeleteV1; - case r'PartnerStackV1': return SyncEntityType.partnerStackV1; - case r'AlbumV1': return SyncEntityType.albumV1; - case r'AlbumV2': return SyncEntityType.albumV2; - case r'AlbumDeleteV1': return SyncEntityType.albumDeleteV1; - case r'AlbumUserV1': return SyncEntityType.albumUserV1; - case r'AlbumUserBackfillV1': return SyncEntityType.albumUserBackfillV1; - case r'AlbumUserDeleteV1': return SyncEntityType.albumUserDeleteV1; - case r'AlbumAssetCreateV1': return SyncEntityType.albumAssetCreateV1; - case r'AlbumAssetCreateV2': return SyncEntityType.albumAssetCreateV2; - case r'AlbumAssetUpdateV1': return SyncEntityType.albumAssetUpdateV1; - case r'AlbumAssetUpdateV2': return SyncEntityType.albumAssetUpdateV2; - case r'AlbumAssetBackfillV1': return SyncEntityType.albumAssetBackfillV1; - case r'AlbumAssetBackfillV2': return SyncEntityType.albumAssetBackfillV2; - case r'AlbumAssetExifCreateV1': return SyncEntityType.albumAssetExifCreateV1; - case r'AlbumAssetExifUpdateV1': return SyncEntityType.albumAssetExifUpdateV1; - case r'AlbumAssetExifBackfillV1': return SyncEntityType.albumAssetExifBackfillV1; - case r'AlbumToAssetV1': return SyncEntityType.albumToAssetV1; - case r'AlbumToAssetDeleteV1': return SyncEntityType.albumToAssetDeleteV1; - case r'AlbumToAssetBackfillV1': return SyncEntityType.albumToAssetBackfillV1; - case r'MemoryV1': return SyncEntityType.memoryV1; - case r'MemoryDeleteV1': return SyncEntityType.memoryDeleteV1; - case r'MemoryToAssetV1': return SyncEntityType.memoryToAssetV1; - case r'MemoryToAssetDeleteV1': return SyncEntityType.memoryToAssetDeleteV1; - case r'StackV1': return SyncEntityType.stackV1; - case r'StackDeleteV1': return SyncEntityType.stackDeleteV1; - case r'PersonV1': return SyncEntityType.personV1; - case r'PersonDeleteV1': return SyncEntityType.personDeleteV1; - case r'AssetFaceV1': return SyncEntityType.assetFaceV1; - case r'AssetFaceV2': return SyncEntityType.assetFaceV2; - case r'AssetFaceDeleteV1': return SyncEntityType.assetFaceDeleteV1; - case r'UserMetadataV1': return SyncEntityType.userMetadataV1; - case r'UserMetadataDeleteV1': return SyncEntityType.userMetadataDeleteV1; - case r'SyncAckV1': return SyncEntityType.syncAckV1; - case r'SyncResetV1': return SyncEntityType.syncResetV1; - case r'SyncCompleteV1': return SyncEntityType.syncCompleteV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SyncEntityTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart deleted file mode 100644 index c37682d02d..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryAssetDeleteV1 { - /// Returns a new [SyncMemoryAssetDeleteV1] instance. - SyncMemoryAssetDeleteV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetDeleteV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetDeleteV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetDeleteV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_asset_v1.dart b/mobile/openapi/lib/model/sync_memory_asset_v1.dart deleted file mode 100644 index 2cfab98afd..0000000000 --- a/mobile/openapi/lib/model/sync_memory_asset_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryAssetV1 { - /// Returns a new [SyncMemoryAssetV1] instance. - SyncMemoryAssetV1({ - required this.assetId, - required this.memoryId, - }); - - /// Asset ID - String assetId; - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryAssetV1 && - other.assetId == assetId && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetId.hashCode) + - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryAssetV1[assetId=$assetId, memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'assetId'] = this.assetId; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryAssetV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryAssetV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryAssetV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryAssetV1( - assetId: mapValueOfType(json, r'assetId')!, - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryAssetV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryAssetV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryAssetV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryAssetV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetId', - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_delete_v1.dart b/mobile/openapi/lib/model/sync_memory_delete_v1.dart deleted file mode 100644 index d5f63ec8fa..0000000000 --- a/mobile/openapi/lib/model/sync_memory_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryDeleteV1 { - /// Returns a new [SyncMemoryDeleteV1] instance. - SyncMemoryDeleteV1({ - required this.memoryId, - }); - - /// Memory ID - String memoryId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryDeleteV1 && - other.memoryId == memoryId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (memoryId.hashCode); - - @override - String toString() => 'SyncMemoryDeleteV1[memoryId=$memoryId]'; - - Map toJson() { - final json = {}; - json[r'memoryId'] = this.memoryId; - return json; - } - - /// Returns a new [SyncMemoryDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryDeleteV1( - memoryId: mapValueOfType(json, r'memoryId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'memoryId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_memory_v1.dart b/mobile/openapi/lib/model/sync_memory_v1.dart deleted file mode 100644 index 95f5751f1f..0000000000 --- a/mobile/openapi/lib/model/sync_memory_v1.dart +++ /dev/null @@ -1,228 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncMemoryV1 { - /// Returns a new [SyncMemoryV1] instance. - SyncMemoryV1({ - required this.createdAt, - this.data = const {}, - required this.deletedAt, - required this.hideAt, - required this.id, - required this.isSaved, - required this.memoryAt, - required this.ownerId, - required this.seenAt, - required this.showAt, - required this.type, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Data - Map data; - - /// Deleted at - DateTime? deletedAt; - - /// Hide at - DateTime? hideAt; - - /// Memory ID - String id; - - /// Is saved - bool isSaved; - - /// Memory at - DateTime memoryAt; - - /// Owner ID - String ownerId; - - /// Seen at - DateTime? seenAt; - - /// Show at - DateTime? showAt; - - MemoryType type; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncMemoryV1 && - other.createdAt == createdAt && - _deepEquality.equals(other.data, data) && - other.deletedAt == deletedAt && - other.hideAt == hideAt && - other.id == id && - other.isSaved == isSaved && - other.memoryAt == memoryAt && - other.ownerId == ownerId && - other.seenAt == seenAt && - other.showAt == showAt && - other.type == type && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (data.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (hideAt == null ? 0 : hideAt!.hashCode) + - (id.hashCode) + - (isSaved.hashCode) + - (memoryAt.hashCode) + - (ownerId.hashCode) + - (seenAt == null ? 0 : seenAt!.hashCode) + - (showAt == null ? 0 : showAt!.hashCode) + - (type.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncMemoryV1[createdAt=$createdAt, data=$data, deletedAt=$deletedAt, hideAt=$hideAt, id=$id, isSaved=$isSaved, memoryAt=$memoryAt, ownerId=$ownerId, seenAt=$seenAt, showAt=$showAt, type=$type, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'data'] = this.data; - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - if (this.hideAt != null) { - json[r'hideAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.hideAt!.millisecondsSinceEpoch - : this.hideAt!.toUtc().toIso8601String(); - } else { - json[r'hideAt'] = null; - } - json[r'id'] = this.id; - json[r'isSaved'] = this.isSaved; - json[r'memoryAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.memoryAt.millisecondsSinceEpoch - : this.memoryAt.toUtc().toIso8601String(); - json[r'ownerId'] = this.ownerId; - if (this.seenAt != null) { - json[r'seenAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.seenAt!.millisecondsSinceEpoch - : this.seenAt!.toUtc().toIso8601String(); - } else { - json[r'seenAt'] = null; - } - if (this.showAt != null) { - json[r'showAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.showAt!.millisecondsSinceEpoch - : this.showAt!.toUtc().toIso8601String(); - } else { - json[r'showAt'] = null; - } - json[r'type'] = this.type; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncMemoryV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncMemoryV1? fromJson(dynamic value) { - upgradeDto(value, "SyncMemoryV1"); - if (value is Map) { - final json = value.cast(); - - return SyncMemoryV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - data: mapCastOfType(json, r'data')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - hideAt: mapDateTime(json, r'hideAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - id: mapValueOfType(json, r'id')!, - isSaved: mapValueOfType(json, r'isSaved')!, - memoryAt: mapDateTime(json, r'memoryAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ownerId: mapValueOfType(json, r'ownerId')!, - seenAt: mapDateTime(json, r'seenAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - showAt: mapDateTime(json, r'showAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - type: MemoryType.fromJson(json[r'type'])!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncMemoryV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncMemoryV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncMemoryV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncMemoryV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'data', - 'deletedAt', - 'hideAt', - 'id', - 'isSaved', - 'memoryAt', - 'ownerId', - 'seenAt', - 'showAt', - 'type', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_delete_v1.dart b/mobile/openapi/lib/model/sync_partner_delete_v1.dart deleted file mode 100644 index 64dfb4eb98..0000000000 --- a/mobile/openapi/lib/model/sync_partner_delete_v1.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPartnerDeleteV1 { - /// Returns a new [SyncPartnerDeleteV1] instance. - SyncPartnerDeleteV1({ - required this.sharedById, - required this.sharedWithId, - }); - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerDeleteV1 && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerDeleteV1[sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerDeleteV1( - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_partner_v1.dart b/mobile/openapi/lib/model/sync_partner_v1.dart deleted file mode 100644 index 9f9c3d14c1..0000000000 --- a/mobile/openapi/lib/model/sync_partner_v1.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPartnerV1 { - /// Returns a new [SyncPartnerV1] instance. - SyncPartnerV1({ - required this.inTimeline, - required this.sharedById, - required this.sharedWithId, - }); - - /// In timeline - bool inTimeline; - - /// Shared by ID - String sharedById; - - /// Shared with ID - String sharedWithId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPartnerV1 && - other.inTimeline == inTimeline && - other.sharedById == sharedById && - other.sharedWithId == sharedWithId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (inTimeline.hashCode) + - (sharedById.hashCode) + - (sharedWithId.hashCode); - - @override - String toString() => 'SyncPartnerV1[inTimeline=$inTimeline, sharedById=$sharedById, sharedWithId=$sharedWithId]'; - - Map toJson() { - final json = {}; - json[r'inTimeline'] = this.inTimeline; - json[r'sharedById'] = this.sharedById; - json[r'sharedWithId'] = this.sharedWithId; - return json; - } - - /// Returns a new [SyncPartnerV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPartnerV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPartnerV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPartnerV1( - inTimeline: mapValueOfType(json, r'inTimeline')!, - sharedById: mapValueOfType(json, r'sharedById')!, - sharedWithId: mapValueOfType(json, r'sharedWithId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPartnerV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPartnerV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPartnerV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPartnerV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'inTimeline', - 'sharedById', - 'sharedWithId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_delete_v1.dart b/mobile/openapi/lib/model/sync_person_delete_v1.dart deleted file mode 100644 index 526bc26187..0000000000 --- a/mobile/openapi/lib/model/sync_person_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPersonDeleteV1 { - /// Returns a new [SyncPersonDeleteV1] instance. - SyncPersonDeleteV1({ - required this.personId, - }); - - /// Person ID - String personId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonDeleteV1 && - other.personId == personId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (personId.hashCode); - - @override - String toString() => 'SyncPersonDeleteV1[personId=$personId]'; - - Map toJson() { - final json = {}; - json[r'personId'] = this.personId; - return json; - } - - /// Returns a new [SyncPersonDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonDeleteV1( - personId: mapValueOfType(json, r'personId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'personId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_person_v1.dart b/mobile/openapi/lib/model/sync_person_v1.dart deleted file mode 100644 index 6a669a0306..0000000000 --- a/mobile/openapi/lib/model/sync_person_v1.dart +++ /dev/null @@ -1,199 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncPersonV1 { - /// Returns a new [SyncPersonV1] instance. - SyncPersonV1({ - required this.birthDate, - required this.color, - required this.createdAt, - required this.faceAssetId, - required this.id, - required this.isFavorite, - required this.isHidden, - required this.name, - required this.ownerId, - required this.updatedAt, - }); - - /// Birth date - DateTime? birthDate; - - /// Color - String? color; - - /// Created at - DateTime createdAt; - - /// Face asset ID - String? faceAssetId; - - /// Person ID - String id; - - /// Is favorite - bool isFavorite; - - /// Is hidden - bool isHidden; - - /// Person name - String name; - - /// Owner ID - String ownerId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncPersonV1 && - other.birthDate == birthDate && - other.color == color && - other.createdAt == createdAt && - other.faceAssetId == faceAssetId && - other.id == id && - other.isFavorite == isFavorite && - other.isHidden == isHidden && - other.name == name && - other.ownerId == ownerId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (birthDate == null ? 0 : birthDate!.hashCode) + - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (faceAssetId == null ? 0 : faceAssetId!.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isHidden.hashCode) + - (name.hashCode) + - (ownerId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncPersonV1[birthDate=$birthDate, color=$color, createdAt=$createdAt, faceAssetId=$faceAssetId, id=$id, isFavorite=$isFavorite, isHidden=$isHidden, name=$name, ownerId=$ownerId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - if (this.birthDate != null) { - json[r'birthDate'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.birthDate!.millisecondsSinceEpoch - : this.birthDate!.toUtc().toIso8601String(); - } else { - json[r'birthDate'] = null; - } - if (this.color != null) { - json[r'color'] = this.color; - } else { - json[r'color'] = null; - } - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.faceAssetId != null) { - json[r'faceAssetId'] = this.faceAssetId; - } else { - json[r'faceAssetId'] = null; - } - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isHidden'] = this.isHidden; - json[r'name'] = this.name; - json[r'ownerId'] = this.ownerId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncPersonV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncPersonV1? fromJson(dynamic value) { - upgradeDto(value, "SyncPersonV1"); - if (value is Map) { - final json = value.cast(); - - return SyncPersonV1( - birthDate: mapDateTime(json, r'birthDate', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - color: mapValueOfType(json, r'color'), - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - faceAssetId: mapValueOfType(json, r'faceAssetId'), - id: mapValueOfType(json, r'id')!, - isFavorite: mapValueOfType(json, r'isFavorite')!, - isHidden: mapValueOfType(json, r'isHidden')!, - name: mapValueOfType(json, r'name')!, - ownerId: mapValueOfType(json, r'ownerId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncPersonV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncPersonV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncPersonV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncPersonV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'birthDate', - 'color', - 'createdAt', - 'faceAssetId', - 'id', - 'isFavorite', - 'isHidden', - 'name', - 'ownerId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_request_type.dart b/mobile/openapi/lib/model/sync_request_type.dart deleted file mode 100644 index f7c964d0e5..0000000000 --- a/mobile/openapi/lib/model/sync_request_type.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Sync request type -enum SyncRequestType { - albumsV1._(r'AlbumsV1'), - albumsV2._(r'AlbumsV2'), - albumUsersV1._(r'AlbumUsersV1'), - albumToAssetsV1._(r'AlbumToAssetsV1'), - albumAssetsV1._(r'AlbumAssetsV1'), - albumAssetsV2._(r'AlbumAssetsV2'), - albumAssetExifsV1._(r'AlbumAssetExifsV1'), - assetsV1._(r'AssetsV1'), - assetsV2._(r'AssetsV2'), - assetExifsV1._(r'AssetExifsV1'), - assetEditsV1._(r'AssetEditsV1'), - assetMetadataV1._(r'AssetMetadataV1'), - assetOcrV1._(r'AssetOcrV1'), - authUsersV1._(r'AuthUsersV1'), - memoriesV1._(r'MemoriesV1'), - memoryToAssetsV1._(r'MemoryToAssetsV1'), - partnersV1._(r'PartnersV1'), - partnerAssetsV1._(r'PartnerAssetsV1'), - partnerAssetsV2._(r'PartnerAssetsV2'), - partnerAssetExifsV1._(r'PartnerAssetExifsV1'), - partnerStacksV1._(r'PartnerStacksV1'), - stacksV1._(r'StacksV1'), - usersV1._(r'UsersV1'), - peopleV1._(r'PeopleV1'), - assetFacesV1._(r'AssetFacesV1'), - assetFacesV2._(r'AssetFacesV2'), - userMetadataV1._(r'UserMetadataV1'), - ; - - /// Instantiate a new enum with the provided value. - const SyncRequestType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [SyncRequestType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static SyncRequestType? fromJson(dynamic value) => SyncRequestTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [SyncRequestType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncRequestType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [SyncRequestType] to String, -/// and [decode] dynamic data back to [SyncRequestType]. -class SyncRequestTypeTypeTransformer { - factory SyncRequestTypeTypeTransformer() => _instance ??= const SyncRequestTypeTypeTransformer._(); - - const SyncRequestTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(SyncRequestType data) => data._value; - - /// Returns the instance of [SyncRequestType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - SyncRequestType? decode(dynamic data, {bool allowNull = true}) { - if (data is SyncRequestType) { - return data; - } - if (data != null) { - switch (data) { - case r'AlbumsV1': return SyncRequestType.albumsV1; - case r'AlbumsV2': return SyncRequestType.albumsV2; - case r'AlbumUsersV1': return SyncRequestType.albumUsersV1; - case r'AlbumToAssetsV1': return SyncRequestType.albumToAssetsV1; - case r'AlbumAssetsV1': return SyncRequestType.albumAssetsV1; - case r'AlbumAssetsV2': return SyncRequestType.albumAssetsV2; - case r'AlbumAssetExifsV1': return SyncRequestType.albumAssetExifsV1; - case r'AssetsV1': return SyncRequestType.assetsV1; - case r'AssetsV2': return SyncRequestType.assetsV2; - case r'AssetExifsV1': return SyncRequestType.assetExifsV1; - case r'AssetEditsV1': return SyncRequestType.assetEditsV1; - case r'AssetMetadataV1': return SyncRequestType.assetMetadataV1; - case r'AssetOcrV1': return SyncRequestType.assetOcrV1; - case r'AuthUsersV1': return SyncRequestType.authUsersV1; - case r'MemoriesV1': return SyncRequestType.memoriesV1; - case r'MemoryToAssetsV1': return SyncRequestType.memoryToAssetsV1; - case r'PartnersV1': return SyncRequestType.partnersV1; - case r'PartnerAssetsV1': return SyncRequestType.partnerAssetsV1; - case r'PartnerAssetsV2': return SyncRequestType.partnerAssetsV2; - case r'PartnerAssetExifsV1': return SyncRequestType.partnerAssetExifsV1; - case r'PartnerStacksV1': return SyncRequestType.partnerStacksV1; - case r'StacksV1': return SyncRequestType.stacksV1; - case r'UsersV1': return SyncRequestType.usersV1; - case r'PeopleV1': return SyncRequestType.peopleV1; - case r'AssetFacesV1': return SyncRequestType.assetFacesV1; - case r'AssetFacesV2': return SyncRequestType.assetFacesV2; - case r'UserMetadataV1': return SyncRequestType.userMetadataV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static SyncRequestTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/sync_stack_delete_v1.dart b/mobile/openapi/lib/model/sync_stack_delete_v1.dart deleted file mode 100644 index 2a7398291a..0000000000 --- a/mobile/openapi/lib/model/sync_stack_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStackDeleteV1 { - /// Returns a new [SyncStackDeleteV1] instance. - SyncStackDeleteV1({ - required this.stackId, - }); - - /// Stack ID - String stackId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackDeleteV1 && - other.stackId == stackId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (stackId.hashCode); - - @override - String toString() => 'SyncStackDeleteV1[stackId=$stackId]'; - - Map toJson() { - final json = {}; - json[r'stackId'] = this.stackId; - return json; - } - - /// Returns a new [SyncStackDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackDeleteV1( - stackId: mapValueOfType(json, r'stackId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'stackId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stack_v1.dart b/mobile/openapi/lib/model/sync_stack_v1.dart deleted file mode 100644 index 6da2243872..0000000000 --- a/mobile/openapi/lib/model/sync_stack_v1.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStackV1 { - /// Returns a new [SyncStackV1] instance. - SyncStackV1({ - required this.createdAt, - required this.id, - required this.ownerId, - required this.primaryAssetId, - required this.updatedAt, - }); - - /// Created at - DateTime createdAt; - - /// Stack ID - String id; - - /// Owner ID - String ownerId; - - /// Primary asset ID - String primaryAssetId; - - /// Updated at - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStackV1 && - other.createdAt == createdAt && - other.id == id && - other.ownerId == ownerId && - other.primaryAssetId == primaryAssetId && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (id.hashCode) + - (ownerId.hashCode) + - (primaryAssetId.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'SyncStackV1[createdAt=$createdAt, id=$id, ownerId=$ownerId, primaryAssetId=$primaryAssetId, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'ownerId'] = this.ownerId; - json[r'primaryAssetId'] = this.primaryAssetId; - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncStackV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStackV1? fromJson(dynamic value) { - upgradeDto(value, "SyncStackV1"); - if (value is Map) { - final json = value.cast(); - - return SyncStackV1( - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - id: mapValueOfType(json, r'id')!, - ownerId: mapValueOfType(json, r'ownerId')!, - primaryAssetId: mapValueOfType(json, r'primaryAssetId')!, - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStackV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStackV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStackV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStackV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'ownerId', - 'primaryAssetId', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/sync_stream_dto.dart b/mobile/openapi/lib/model/sync_stream_dto.dart deleted file mode 100644 index 12dcfb4b84..0000000000 --- a/mobile/openapi/lib/model/sync_stream_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncStreamDto { - /// Returns a new [SyncStreamDto] instance. - SyncStreamDto({ - this.reset = const Optional.absent(), - this.types = const [], - }); - - /// Reset sync state - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional reset; - - /// Sync request types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncStreamDto && - other.reset == reset && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (reset == null ? 0 : reset!.hashCode) + - (types.hashCode); - - @override - String toString() => 'SyncStreamDto[reset=$reset, types=$types]'; - - Map toJson() { - final json = {}; - if (this.reset.isPresent) { - final value = this.reset.value; - json[r'reset'] = value; - } - json[r'types'] = this.types; - return json; - } - - /// Returns a new [SyncStreamDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncStreamDto? fromJson(dynamic value) { - upgradeDto(value, "SyncStreamDto"); - if (value is Map) { - final json = value.cast(); - - return SyncStreamDto( - reset: json.containsKey(r'reset') ? Optional.present(mapValueOfType(json, r'reset')) : const Optional.absent(), - types: SyncRequestType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncStreamDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncStreamDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncStreamDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncStreamDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_delete_v1.dart b/mobile/openapi/lib/model/sync_user_delete_v1.dart deleted file mode 100644 index bbbdc147dd..0000000000 --- a/mobile/openapi/lib/model/sync_user_delete_v1.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserDeleteV1 { - /// Returns a new [SyncUserDeleteV1] instance. - SyncUserDeleteV1({ - required this.userId, - }); - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserDeleteV1 && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (userId.hashCode); - - @override - String toString() => 'SyncUserDeleteV1[userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserDeleteV1( - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart deleted file mode 100644 index 67976108e1..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_delete_v1.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserMetadataDeleteV1 { - /// Returns a new [SyncUserMetadataDeleteV1] instance. - SyncUserMetadataDeleteV1({ - required this.key, - required this.userId, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataDeleteV1 && - other.key == key && - other.userId == userId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode); - - @override - String toString() => 'SyncUserMetadataDeleteV1[key=$key, userId=$userId]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - return json; - } - - /// Returns a new [SyncUserMetadataDeleteV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataDeleteV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataDeleteV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataDeleteV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataDeleteV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataDeleteV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataDeleteV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataDeleteV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_metadata_v1.dart b/mobile/openapi/lib/model/sync_user_metadata_v1.dart deleted file mode 100644 index ddde7c0513..0000000000 --- a/mobile/openapi/lib/model/sync_user_metadata_v1.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserMetadataV1 { - /// Returns a new [SyncUserMetadataV1] instance. - SyncUserMetadataV1({ - required this.key, - required this.userId, - this.value = const {}, - }); - - UserMetadataKey key; - - /// User ID - String userId; - - /// User metadata value - Map value; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserMetadataV1 && - other.key == key && - other.userId == userId && - _deepEquality.equals(other.value, value); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (key.hashCode) + - (userId.hashCode) + - (value.hashCode); - - @override - String toString() => 'SyncUserMetadataV1[key=$key, userId=$userId, value=$value]'; - - Map toJson() { - final json = {}; - json[r'key'] = this.key; - json[r'userId'] = this.userId; - json[r'value'] = this.value; - return json; - } - - /// Returns a new [SyncUserMetadataV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserMetadataV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserMetadataV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserMetadataV1( - key: UserMetadataKey.fromJson(json[r'key'])!, - userId: mapValueOfType(json, r'userId')!, - value: mapCastOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserMetadataV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserMetadataV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserMetadataV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserMetadataV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'key', - 'userId', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/sync_user_v1.dart b/mobile/openapi/lib/model/sync_user_v1.dart deleted file mode 100644 index d86680179e..0000000000 --- a/mobile/openapi/lib/model/sync_user_v1.dart +++ /dev/null @@ -1,163 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SyncUserV1 { - /// Returns a new [SyncUserV1] instance. - SyncUserV1({ - this.avatarColor = const Optional.absent(), - required this.deletedAt, - required this.email, - required this.hasProfileImage, - required this.id, - required this.name, - required this.profileChangedAt, - }); - - Optional avatarColor; - - /// User deleted at - DateTime? deletedAt; - - /// User email - String email; - - /// User has profile image - bool hasProfileImage; - - /// User ID - String id; - - /// User name - String name; - - /// User profile changed at - DateTime profileChangedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is SyncUserV1 && - other.avatarColor == avatarColor && - other.deletedAt == deletedAt && - other.email == email && - other.hasProfileImage == hasProfileImage && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (hasProfileImage.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode); - - @override - String toString() => 'SyncUserV1[avatarColor=$avatarColor, deletedAt=$deletedAt, email=$email, hasProfileImage=$hasProfileImage, id=$id, name=$name, profileChangedAt=$profileChangedAt]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'hasProfileImage'] = this.hasProfileImage; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.profileChangedAt.millisecondsSinceEpoch - : this.profileChangedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [SyncUserV1] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SyncUserV1? fromJson(dynamic value) { - upgradeDto(value, "SyncUserV1"); - if (value is Map) { - final json = value.cast(); - - return SyncUserV1( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - hasProfileImage: mapValueOfType(json, r'hasProfileImage')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SyncUserV1.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SyncUserV1.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SyncUserV1-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SyncUserV1.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deletedAt', - 'email', - 'hasProfileImage', - 'id', - 'name', - 'profileChangedAt', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_backups_dto.dart b/mobile/openapi/lib/model/system_config_backups_dto.dart deleted file mode 100644 index 82cd6e59eb..0000000000 --- a/mobile/openapi/lib/model/system_config_backups_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigBackupsDto { - /// Returns a new [SystemConfigBackupsDto] instance. - SystemConfigBackupsDto({ - required this.database, - }); - - DatabaseBackupConfig database; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigBackupsDto && - other.database == database; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (database.hashCode); - - @override - String toString() => 'SystemConfigBackupsDto[database=$database]'; - - Map toJson() { - final json = {}; - json[r'database'] = this.database; - return json; - } - - /// Returns a new [SystemConfigBackupsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigBackupsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigBackupsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigBackupsDto( - database: DatabaseBackupConfig.fromJson(json[r'database'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigBackupsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigBackupsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigBackupsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigBackupsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'database', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart deleted file mode 100644 index 3a5e15b030..0000000000 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ /dev/null @@ -1,267 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigDto { - /// Returns a new [SystemConfigDto] instance. - SystemConfigDto({ - required this.backup, - required this.ffmpeg, - required this.image, - required this.integrityChecks, - required this.job, - required this.library_, - required this.logging, - required this.machineLearning, - required this.map, - required this.metadata, - required this.newVersionCheck, - required this.nightlyTasks, - required this.notifications, - required this.oauth, - required this.passwordLogin, - required this.reverseGeocoding, - required this.server, - required this.storageTemplate, - required this.templates, - required this.theme, - required this.trash, - required this.user, - }); - - SystemConfigBackupsDto backup; - - SystemConfigFFmpegDto ffmpeg; - - SystemConfigImageDto image; - - SystemConfigIntegrityChecks integrityChecks; - - SystemConfigJobDto job; - - SystemConfigLibraryDto library_; - - SystemConfigLoggingDto logging; - - SystemConfigMachineLearningDto machineLearning; - - SystemConfigMapDto map; - - SystemConfigMetadataDto metadata; - - SystemConfigNewVersionCheckDto newVersionCheck; - - SystemConfigNightlyTasksDto nightlyTasks; - - SystemConfigNotificationsDto notifications; - - SystemConfigOAuthDto oauth; - - SystemConfigPasswordLoginDto passwordLogin; - - SystemConfigReverseGeocodingDto reverseGeocoding; - - SystemConfigServerDto server; - - SystemConfigStorageTemplateDto storageTemplate; - - SystemConfigTemplatesDto templates; - - SystemConfigThemeDto theme; - - SystemConfigTrashDto trash; - - SystemConfigUserDto user; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigDto && - other.backup == backup && - other.ffmpeg == ffmpeg && - other.image == image && - other.integrityChecks == integrityChecks && - other.job == job && - other.library_ == library_ && - other.logging == logging && - other.machineLearning == machineLearning && - other.map == map && - other.metadata == metadata && - other.newVersionCheck == newVersionCheck && - other.nightlyTasks == nightlyTasks && - other.notifications == notifications && - other.oauth == oauth && - other.passwordLogin == passwordLogin && - other.reverseGeocoding == reverseGeocoding && - other.server == server && - other.storageTemplate == storageTemplate && - other.templates == templates && - other.theme == theme && - other.trash == trash && - other.user == user; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backup.hashCode) + - (ffmpeg.hashCode) + - (image.hashCode) + - (integrityChecks.hashCode) + - (job.hashCode) + - (library_.hashCode) + - (logging.hashCode) + - (machineLearning.hashCode) + - (map.hashCode) + - (metadata.hashCode) + - (newVersionCheck.hashCode) + - (nightlyTasks.hashCode) + - (notifications.hashCode) + - (oauth.hashCode) + - (passwordLogin.hashCode) + - (reverseGeocoding.hashCode) + - (server.hashCode) + - (storageTemplate.hashCode) + - (templates.hashCode) + - (theme.hashCode) + - (trash.hashCode) + - (user.hashCode); - - @override - String toString() => 'SystemConfigDto[backup=$backup, ffmpeg=$ffmpeg, image=$image, integrityChecks=$integrityChecks, job=$job, library_=$library_, logging=$logging, machineLearning=$machineLearning, map=$map, metadata=$metadata, newVersionCheck=$newVersionCheck, nightlyTasks=$nightlyTasks, notifications=$notifications, oauth=$oauth, passwordLogin=$passwordLogin, reverseGeocoding=$reverseGeocoding, server=$server, storageTemplate=$storageTemplate, templates=$templates, theme=$theme, trash=$trash, user=$user]'; - - Map toJson() { - final json = {}; - json[r'backup'] = this.backup; - json[r'ffmpeg'] = this.ffmpeg; - json[r'image'] = this.image; - json[r'integrityChecks'] = this.integrityChecks; - json[r'job'] = this.job; - json[r'library'] = this.library_; - json[r'logging'] = this.logging; - json[r'machineLearning'] = this.machineLearning; - json[r'map'] = this.map; - json[r'metadata'] = this.metadata; - json[r'newVersionCheck'] = this.newVersionCheck; - json[r'nightlyTasks'] = this.nightlyTasks; - json[r'notifications'] = this.notifications; - json[r'oauth'] = this.oauth; - json[r'passwordLogin'] = this.passwordLogin; - json[r'reverseGeocoding'] = this.reverseGeocoding; - json[r'server'] = this.server; - json[r'storageTemplate'] = this.storageTemplate; - json[r'templates'] = this.templates; - json[r'theme'] = this.theme; - json[r'trash'] = this.trash; - json[r'user'] = this.user; - return json; - } - - /// Returns a new [SystemConfigDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigDto( - backup: SystemConfigBackupsDto.fromJson(json[r'backup'])!, - ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!, - image: SystemConfigImageDto.fromJson(json[r'image'])!, - integrityChecks: SystemConfigIntegrityChecks.fromJson(json[r'integrityChecks'])!, - job: SystemConfigJobDto.fromJson(json[r'job'])!, - library_: SystemConfigLibraryDto.fromJson(json[r'library'])!, - logging: SystemConfigLoggingDto.fromJson(json[r'logging'])!, - machineLearning: SystemConfigMachineLearningDto.fromJson(json[r'machineLearning'])!, - map: SystemConfigMapDto.fromJson(json[r'map'])!, - metadata: SystemConfigMetadataDto.fromJson(json[r'metadata'])!, - newVersionCheck: SystemConfigNewVersionCheckDto.fromJson(json[r'newVersionCheck'])!, - nightlyTasks: SystemConfigNightlyTasksDto.fromJson(json[r'nightlyTasks'])!, - notifications: SystemConfigNotificationsDto.fromJson(json[r'notifications'])!, - oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!, - passwordLogin: SystemConfigPasswordLoginDto.fromJson(json[r'passwordLogin'])!, - reverseGeocoding: SystemConfigReverseGeocodingDto.fromJson(json[r'reverseGeocoding'])!, - server: SystemConfigServerDto.fromJson(json[r'server'])!, - storageTemplate: SystemConfigStorageTemplateDto.fromJson(json[r'storageTemplate'])!, - templates: SystemConfigTemplatesDto.fromJson(json[r'templates'])!, - theme: SystemConfigThemeDto.fromJson(json[r'theme'])!, - trash: SystemConfigTrashDto.fromJson(json[r'trash'])!, - user: SystemConfigUserDto.fromJson(json[r'user'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backup', - 'ffmpeg', - 'image', - 'integrityChecks', - 'job', - 'library', - 'logging', - 'machineLearning', - 'map', - 'metadata', - 'newVersionCheck', - 'nightlyTasks', - 'notifications', - 'oauth', - 'passwordLogin', - 'reverseGeocoding', - 'server', - 'storageTemplate', - 'templates', - 'theme', - 'trash', - 'user', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart deleted file mode 100644 index 79da8da97f..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ /dev/null @@ -1,297 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFFmpegDto { - /// Returns a new [SystemConfigFFmpegDto] instance. - SystemConfigFFmpegDto({ - required this.accel, - required this.accelDecode, - this.acceptedAudioCodecs = const [], - this.acceptedContainers = const [], - this.acceptedVideoCodecs = const [], - required this.bframes, - required this.cqMode, - required this.crf, - required this.gopSize, - required this.maxBitrate, - required this.preferredHwDevice, - required this.preset, - required this.realtime, - required this.refs, - required this.targetAudioCodec, - required this.targetResolution, - required this.targetVideoCodec, - required this.temporalAQ, - required this.threads, - required this.tonemap, - required this.transcode, - required this.twoPass, - }); - - TranscodeHWAccel accel; - - /// Accelerated decode - bool accelDecode; - - /// Accepted audio codecs - List acceptedAudioCodecs; - - /// Accepted containers - List acceptedContainers; - - /// Accepted video codecs - List acceptedVideoCodecs; - - /// B-frames - /// - /// Minimum value: -1 - /// Maximum value: 16 - int bframes; - - CQMode cqMode; - - /// CRF - /// - /// Minimum value: 0 - /// Maximum value: 51 - int crf; - - /// GOP size - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int gopSize; - - /// Max bitrate - String maxBitrate; - - /// Preferred hardware device - String preferredHwDevice; - - /// Preset - String preset; - - SystemConfigFFmpegRealtimeDto realtime; - - /// References - /// - /// Minimum value: 0 - /// Maximum value: 6 - int refs; - - AudioCodec targetAudioCodec; - - /// Target resolution - String targetResolution; - - VideoCodec targetVideoCodec; - - /// Temporal AQ - bool temporalAQ; - - /// Threads - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int threads; - - ToneMapping tonemap; - - TranscodePolicy transcode; - - /// Two pass - bool twoPass; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto && - other.accel == accel && - other.accelDecode == accelDecode && - _deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) && - _deepEquality.equals(other.acceptedContainers, acceptedContainers) && - _deepEquality.equals(other.acceptedVideoCodecs, acceptedVideoCodecs) && - other.bframes == bframes && - other.cqMode == cqMode && - other.crf == crf && - other.gopSize == gopSize && - other.maxBitrate == maxBitrate && - other.preferredHwDevice == preferredHwDevice && - other.preset == preset && - other.realtime == realtime && - other.refs == refs && - other.targetAudioCodec == targetAudioCodec && - other.targetResolution == targetResolution && - other.targetVideoCodec == targetVideoCodec && - other.temporalAQ == temporalAQ && - other.threads == threads && - other.tonemap == tonemap && - other.transcode == transcode && - other.twoPass == twoPass; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (accel.hashCode) + - (accelDecode.hashCode) + - (acceptedAudioCodecs.hashCode) + - (acceptedContainers.hashCode) + - (acceptedVideoCodecs.hashCode) + - (bframes.hashCode) + - (cqMode.hashCode) + - (crf.hashCode) + - (gopSize.hashCode) + - (maxBitrate.hashCode) + - (preferredHwDevice.hashCode) + - (preset.hashCode) + - (realtime.hashCode) + - (refs.hashCode) + - (targetAudioCodec.hashCode) + - (targetResolution.hashCode) + - (targetVideoCodec.hashCode) + - (temporalAQ.hashCode) + - (threads.hashCode) + - (tonemap.hashCode) + - (transcode.hashCode) + - (twoPass.hashCode); - - @override - String toString() => 'SystemConfigFFmpegDto[accel=$accel, accelDecode=$accelDecode, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedContainers=$acceptedContainers, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, preferredHwDevice=$preferredHwDevice, preset=$preset, realtime=$realtime, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]'; - - Map toJson() { - final json = {}; - json[r'accel'] = this.accel; - json[r'accelDecode'] = this.accelDecode; - json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs; - json[r'acceptedContainers'] = this.acceptedContainers; - json[r'acceptedVideoCodecs'] = this.acceptedVideoCodecs; - json[r'bframes'] = this.bframes; - json[r'cqMode'] = this.cqMode; - json[r'crf'] = this.crf; - json[r'gopSize'] = this.gopSize; - json[r'maxBitrate'] = this.maxBitrate; - json[r'preferredHwDevice'] = this.preferredHwDevice; - json[r'preset'] = this.preset; - json[r'realtime'] = this.realtime; - json[r'refs'] = this.refs; - json[r'targetAudioCodec'] = this.targetAudioCodec; - json[r'targetResolution'] = this.targetResolution; - json[r'targetVideoCodec'] = this.targetVideoCodec; - json[r'temporalAQ'] = this.temporalAQ; - json[r'threads'] = this.threads; - json[r'tonemap'] = this.tonemap; - json[r'transcode'] = this.transcode; - json[r'twoPass'] = this.twoPass; - return json; - } - - /// Returns a new [SystemConfigFFmpegDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegDto( - accel: TranscodeHWAccel.fromJson(json[r'accel'])!, - accelDecode: mapValueOfType(json, r'accelDecode')!, - acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']), - acceptedContainers: VideoContainer.listFromJson(json[r'acceptedContainers']), - acceptedVideoCodecs: VideoCodec.listFromJson(json[r'acceptedVideoCodecs']), - bframes: mapValueOfType(json, r'bframes')!, - cqMode: CQMode.fromJson(json[r'cqMode'])!, - crf: mapValueOfType(json, r'crf')!, - gopSize: mapValueOfType(json, r'gopSize')!, - maxBitrate: mapValueOfType(json, r'maxBitrate')!, - preferredHwDevice: mapValueOfType(json, r'preferredHwDevice')!, - preset: mapValueOfType(json, r'preset')!, - realtime: SystemConfigFFmpegRealtimeDto.fromJson(json[r'realtime'])!, - refs: mapValueOfType(json, r'refs')!, - targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!, - targetResolution: mapValueOfType(json, r'targetResolution')!, - targetVideoCodec: VideoCodec.fromJson(json[r'targetVideoCodec'])!, - temporalAQ: mapValueOfType(json, r'temporalAQ')!, - threads: mapValueOfType(json, r'threads')!, - tonemap: ToneMapping.fromJson(json[r'tonemap'])!, - transcode: TranscodePolicy.fromJson(json[r'transcode'])!, - twoPass: mapValueOfType(json, r'twoPass')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'accel', - 'accelDecode', - 'acceptedAudioCodecs', - 'acceptedContainers', - 'acceptedVideoCodecs', - 'bframes', - 'cqMode', - 'crf', - 'gopSize', - 'maxBitrate', - 'preferredHwDevice', - 'preset', - 'realtime', - 'refs', - 'targetAudioCodec', - 'targetResolution', - 'targetVideoCodec', - 'temporalAQ', - 'threads', - 'tonemap', - 'transcode', - 'twoPass', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart deleted file mode 100644 index e88cd0d5c1..0000000000 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_realtime_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFFmpegRealtimeDto { - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance. - SystemConfigFFmpegRealtimeDto({ - required this.enabled, - this.resolutions = const [], - this.videoCodecs = const [], - }); - - /// Enable real-time HLS transcoding (alpha) - bool enabled; - - /// Resolutions to use for real-time HLS transcoding - List resolutions; - - /// Video codecs to use for real-time HLS transcoding - List videoCodecs; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegRealtimeDto && - other.enabled == enabled && - _deepEquality.equals(other.resolutions, resolutions) && - _deepEquality.equals(other.videoCodecs, videoCodecs); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (resolutions.hashCode) + - (videoCodecs.hashCode); - - @override - String toString() => 'SystemConfigFFmpegRealtimeDto[enabled=$enabled, resolutions=$resolutions, videoCodecs=$videoCodecs]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'resolutions'] = this.resolutions; - json[r'videoCodecs'] = this.videoCodecs; - return json; - } - - /// Returns a new [SystemConfigFFmpegRealtimeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFFmpegRealtimeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFFmpegRealtimeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFFmpegRealtimeDto( - enabled: mapValueOfType(json, r'enabled')!, - resolutions: HlsVideoResolution.listFromJson(json[r'resolutions']), - videoCodecs: VideoCodec.listFromJson(json[r'videoCodecs']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFFmpegRealtimeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFFmpegRealtimeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFFmpegRealtimeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'resolutions', - 'videoCodecs', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_faces_dto.dart b/mobile/openapi/lib/model/system_config_faces_dto.dart deleted file mode 100644 index f57303c310..0000000000 --- a/mobile/openapi/lib/model/system_config_faces_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigFacesDto { - /// Returns a new [SystemConfigFacesDto] instance. - SystemConfigFacesDto({ - required this.import_, - }); - - /// Import - bool import_; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigFacesDto && - other.import_ == import_; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (import_.hashCode); - - @override - String toString() => 'SystemConfigFacesDto[import_=$import_]'; - - Map toJson() { - final json = {}; - json[r'import'] = this.import_; - return json; - } - - /// Returns a new [SystemConfigFacesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigFacesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigFacesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigFacesDto( - import_: mapValueOfType(json, r'import')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigFacesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigFacesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigFacesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigFacesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'import', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart deleted file mode 100644 index f0d27ffa85..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_fullsize_image_dto.dart +++ /dev/null @@ -1,137 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigGeneratedFullsizeImageDto { - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance. - SystemConfigGeneratedFullsizeImageDto({ - required this.enabled, - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - }); - - /// Enabled - bool enabled; - - ImageFormat format; - - /// Progressive - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedFullsizeImageDto && - other.enabled == enabled && - other.format == format && - other.progressive == progressive && - other.quality == quality; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode); - - @override - String toString() => 'SystemConfigGeneratedFullsizeImageDto[enabled=$enabled, format=$format, progressive=$progressive, quality=$quality]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - return json; - } - - /// Returns a new [SystemConfigGeneratedFullsizeImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedFullsizeImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedFullsizeImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedFullsizeImageDto( - enabled: mapValueOfType(json, r'enabled')!, - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedFullsizeImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedFullsizeImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedFullsizeImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'format', - 'quality', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_generated_image_dto.dart b/mobile/openapi/lib/model/system_config_generated_image_dto.dart deleted file mode 100644 index 6aff16322c..0000000000 --- a/mobile/openapi/lib/model/system_config_generated_image_dto.dart +++ /dev/null @@ -1,140 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigGeneratedImageDto { - /// Returns a new [SystemConfigGeneratedImageDto] instance. - SystemConfigGeneratedImageDto({ - required this.format, - this.progressive = const Optional.absent(), - required this.quality, - required this.size, - }); - - ImageFormat format; - - /// Progressive - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional progressive; - - /// Quality - /// - /// Minimum value: 1 - /// Maximum value: 100 - int quality; - - /// Size - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int size; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigGeneratedImageDto && - other.format == format && - other.progressive == progressive && - other.quality == quality && - other.size == size; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (format.hashCode) + - (progressive == null ? 0 : progressive!.hashCode) + - (quality.hashCode) + - (size.hashCode); - - @override - String toString() => 'SystemConfigGeneratedImageDto[format=$format, progressive=$progressive, quality=$quality, size=$size]'; - - Map toJson() { - final json = {}; - json[r'format'] = this.format; - if (this.progressive.isPresent) { - final value = this.progressive.value; - json[r'progressive'] = value; - } - json[r'quality'] = this.quality; - json[r'size'] = this.size; - return json; - } - - /// Returns a new [SystemConfigGeneratedImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigGeneratedImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigGeneratedImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigGeneratedImageDto( - format: ImageFormat.fromJson(json[r'format'])!, - progressive: json.containsKey(r'progressive') ? Optional.present(mapValueOfType(json, r'progressive')) : const Optional.absent(), - quality: mapValueOfType(json, r'quality')!, - size: mapValueOfType(json, r'size')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigGeneratedImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigGeneratedImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigGeneratedImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigGeneratedImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'format', - 'quality', - 'size', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_image_dto.dart b/mobile/openapi/lib/model/system_config_image_dto.dart deleted file mode 100644 index 668b740872..0000000000 --- a/mobile/openapi/lib/model/system_config_image_dto.dart +++ /dev/null @@ -1,132 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigImageDto { - /// Returns a new [SystemConfigImageDto] instance. - SystemConfigImageDto({ - required this.colorspace, - required this.extractEmbedded, - required this.fullsize, - required this.preview, - required this.thumbnail, - }); - - Colorspace colorspace; - - /// Extract embedded - bool extractEmbedded; - - SystemConfigGeneratedFullsizeImageDto fullsize; - - SystemConfigGeneratedImageDto preview; - - SystemConfigGeneratedImageDto thumbnail; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigImageDto && - other.colorspace == colorspace && - other.extractEmbedded == extractEmbedded && - other.fullsize == fullsize && - other.preview == preview && - other.thumbnail == thumbnail; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (colorspace.hashCode) + - (extractEmbedded.hashCode) + - (fullsize.hashCode) + - (preview.hashCode) + - (thumbnail.hashCode); - - @override - String toString() => 'SystemConfigImageDto[colorspace=$colorspace, extractEmbedded=$extractEmbedded, fullsize=$fullsize, preview=$preview, thumbnail=$thumbnail]'; - - Map toJson() { - final json = {}; - json[r'colorspace'] = this.colorspace; - json[r'extractEmbedded'] = this.extractEmbedded; - json[r'fullsize'] = this.fullsize; - json[r'preview'] = this.preview; - json[r'thumbnail'] = this.thumbnail; - return json; - } - - /// Returns a new [SystemConfigImageDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigImageDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigImageDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigImageDto( - colorspace: Colorspace.fromJson(json[r'colorspace'])!, - extractEmbedded: mapValueOfType(json, r'extractEmbedded')!, - fullsize: SystemConfigGeneratedFullsizeImageDto.fromJson(json[r'fullsize'])!, - preview: SystemConfigGeneratedImageDto.fromJson(json[r'preview'])!, - thumbnail: SystemConfigGeneratedImageDto.fromJson(json[r'thumbnail'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigImageDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigImageDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigImageDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigImageDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'colorspace', - 'extractEmbedded', - 'fullsize', - 'preview', - 'thumbnail', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checks.dart b/mobile/openapi/lib/model/system_config_integrity_checks.dart deleted file mode 100644 index ef047e156a..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checks.dart +++ /dev/null @@ -1,115 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityChecks { - /// Returns a new [SystemConfigIntegrityChecks] instance. - SystemConfigIntegrityChecks({ - required this.checksumFiles, - required this.missingFiles, - required this.untrackedFiles, - }); - - SystemConfigIntegrityChecksumJob checksumFiles; - - SystemConfigIntegrityJob missingFiles; - - SystemConfigIntegrityJob untrackedFiles; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecks && - other.checksumFiles == checksumFiles && - other.missingFiles == missingFiles && - other.untrackedFiles == untrackedFiles; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checksumFiles.hashCode) + - (missingFiles.hashCode) + - (untrackedFiles.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecks[checksumFiles=$checksumFiles, missingFiles=$missingFiles, untrackedFiles=$untrackedFiles]'; - - Map toJson() { - final json = {}; - json[r'checksumFiles'] = this.checksumFiles; - json[r'missingFiles'] = this.missingFiles; - json[r'untrackedFiles'] = this.untrackedFiles; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecks] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecks? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecks"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecks( - checksumFiles: SystemConfigIntegrityChecksumJob.fromJson(json[r'checksumFiles'])!, - missingFiles: SystemConfigIntegrityJob.fromJson(json[r'missingFiles'])!, - untrackedFiles: SystemConfigIntegrityJob.fromJson(json[r'untrackedFiles'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecks.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecks.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecks-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecks.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checksumFiles', - 'missingFiles', - 'untrackedFiles', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart b/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart deleted file mode 100644 index 514a52505b..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_checksum_job.dart +++ /dev/null @@ -1,133 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityChecksumJob { - /// Returns a new [SystemConfigIntegrityChecksumJob] instance. - SystemConfigIntegrityChecksumJob({ - required this.cronExpression, - required this.enabled, - required this.percentageLimit, - required this.timeLimit, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - /// Percentage limit of the integrity checksum job - /// - /// Minimum value: 0 - /// Maximum value: 1 - double percentageLimit; - - /// How long the integrity checksum job may run for - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int timeLimit; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityChecksumJob && - other.cronExpression == cronExpression && - other.enabled == enabled && - other.percentageLimit == percentageLimit && - other.timeLimit == timeLimit; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode) + - (percentageLimit.hashCode) + - (timeLimit.hashCode); - - @override - String toString() => 'SystemConfigIntegrityChecksumJob[cronExpression=$cronExpression, enabled=$enabled, percentageLimit=$percentageLimit, timeLimit=$timeLimit]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - json[r'percentageLimit'] = this.percentageLimit; - json[r'timeLimit'] = this.timeLimit; - return json; - } - - /// Returns a new [SystemConfigIntegrityChecksumJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityChecksumJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityChecksumJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityChecksumJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - percentageLimit: mapValueOfType(json, r'percentageLimit')!, - timeLimit: mapValueOfType(json, r'timeLimit')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityChecksumJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityChecksumJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityChecksumJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityChecksumJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - 'percentageLimit', - 'timeLimit', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_integrity_job.dart b/mobile/openapi/lib/model/system_config_integrity_job.dart deleted file mode 100644 index 52afcfa187..0000000000 --- a/mobile/openapi/lib/model/system_config_integrity_job.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigIntegrityJob { - /// Returns a new [SystemConfigIntegrityJob] instance. - SystemConfigIntegrityJob({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression for when the integrity check should run - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigIntegrityJob && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigIntegrityJob[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigIntegrityJob] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigIntegrityJob? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigIntegrityJob"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigIntegrityJob( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigIntegrityJob.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigIntegrityJob.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigIntegrityJob-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigIntegrityJob.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_job_dto.dart b/mobile/openapi/lib/model/system_config_job_dto.dart deleted file mode 100644 index 08b07cc37c..0000000000 --- a/mobile/openapi/lib/model/system_config_job_dto.dart +++ /dev/null @@ -1,211 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigJobDto { - /// Returns a new [SystemConfigJobDto] instance. - SystemConfigJobDto({ - required this.backgroundTask, - required this.editor, - required this.faceDetection, - required this.integrityCheck, - required this.library_, - required this.metadataExtraction, - required this.migration, - required this.notifications, - required this.ocr, - required this.search, - required this.sidecar, - required this.smartSearch, - required this.thumbnailGeneration, - required this.videoConversion, - required this.workflow, - }); - - JobSettingsDto backgroundTask; - - JobSettingsDto editor; - - JobSettingsDto faceDetection; - - JobSettingsDto integrityCheck; - - JobSettingsDto library_; - - JobSettingsDto metadataExtraction; - - JobSettingsDto migration; - - JobSettingsDto notifications; - - JobSettingsDto ocr; - - JobSettingsDto search; - - JobSettingsDto sidecar; - - JobSettingsDto smartSearch; - - JobSettingsDto thumbnailGeneration; - - JobSettingsDto videoConversion; - - JobSettingsDto workflow; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigJobDto && - other.backgroundTask == backgroundTask && - other.editor == editor && - other.faceDetection == faceDetection && - other.integrityCheck == integrityCheck && - other.library_ == library_ && - other.metadataExtraction == metadataExtraction && - other.migration == migration && - other.notifications == notifications && - other.ocr == ocr && - other.search == search && - other.sidecar == sidecar && - other.smartSearch == smartSearch && - other.thumbnailGeneration == thumbnailGeneration && - other.videoConversion == videoConversion && - other.workflow == workflow; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (backgroundTask.hashCode) + - (editor.hashCode) + - (faceDetection.hashCode) + - (integrityCheck.hashCode) + - (library_.hashCode) + - (metadataExtraction.hashCode) + - (migration.hashCode) + - (notifications.hashCode) + - (ocr.hashCode) + - (search.hashCode) + - (sidecar.hashCode) + - (smartSearch.hashCode) + - (thumbnailGeneration.hashCode) + - (videoConversion.hashCode) + - (workflow.hashCode); - - @override - String toString() => 'SystemConfigJobDto[backgroundTask=$backgroundTask, editor=$editor, faceDetection=$faceDetection, integrityCheck=$integrityCheck, library_=$library_, metadataExtraction=$metadataExtraction, migration=$migration, notifications=$notifications, ocr=$ocr, search=$search, sidecar=$sidecar, smartSearch=$smartSearch, thumbnailGeneration=$thumbnailGeneration, videoConversion=$videoConversion, workflow=$workflow]'; - - Map toJson() { - final json = {}; - json[r'backgroundTask'] = this.backgroundTask; - json[r'editor'] = this.editor; - json[r'faceDetection'] = this.faceDetection; - json[r'integrityCheck'] = this.integrityCheck; - json[r'library'] = this.library_; - json[r'metadataExtraction'] = this.metadataExtraction; - json[r'migration'] = this.migration; - json[r'notifications'] = this.notifications; - json[r'ocr'] = this.ocr; - json[r'search'] = this.search; - json[r'sidecar'] = this.sidecar; - json[r'smartSearch'] = this.smartSearch; - json[r'thumbnailGeneration'] = this.thumbnailGeneration; - json[r'videoConversion'] = this.videoConversion; - json[r'workflow'] = this.workflow; - return json; - } - - /// Returns a new [SystemConfigJobDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigJobDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigJobDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigJobDto( - backgroundTask: JobSettingsDto.fromJson(json[r'backgroundTask'])!, - editor: JobSettingsDto.fromJson(json[r'editor'])!, - faceDetection: JobSettingsDto.fromJson(json[r'faceDetection'])!, - integrityCheck: JobSettingsDto.fromJson(json[r'integrityCheck'])!, - library_: JobSettingsDto.fromJson(json[r'library'])!, - metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!, - migration: JobSettingsDto.fromJson(json[r'migration'])!, - notifications: JobSettingsDto.fromJson(json[r'notifications'])!, - ocr: JobSettingsDto.fromJson(json[r'ocr'])!, - search: JobSettingsDto.fromJson(json[r'search'])!, - sidecar: JobSettingsDto.fromJson(json[r'sidecar'])!, - smartSearch: JobSettingsDto.fromJson(json[r'smartSearch'])!, - thumbnailGeneration: JobSettingsDto.fromJson(json[r'thumbnailGeneration'])!, - videoConversion: JobSettingsDto.fromJson(json[r'videoConversion'])!, - workflow: JobSettingsDto.fromJson(json[r'workflow'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigJobDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigJobDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigJobDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigJobDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'backgroundTask', - 'editor', - 'faceDetection', - 'integrityCheck', - 'library', - 'metadataExtraction', - 'migration', - 'notifications', - 'ocr', - 'search', - 'sidecar', - 'smartSearch', - 'thumbnailGeneration', - 'videoConversion', - 'workflow', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_dto.dart b/mobile/openapi/lib/model/system_config_library_dto.dart deleted file mode 100644 index e728b0bf20..0000000000 --- a/mobile/openapi/lib/model/system_config_library_dto.dart +++ /dev/null @@ -1,107 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryDto { - /// Returns a new [SystemConfigLibraryDto] instance. - SystemConfigLibraryDto({ - required this.scan, - required this.watch, - }); - - SystemConfigLibraryScanDto scan; - - SystemConfigLibraryWatchDto watch; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryDto && - other.scan == scan && - other.watch == watch; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (scan.hashCode) + - (watch.hashCode); - - @override - String toString() => 'SystemConfigLibraryDto[scan=$scan, watch=$watch]'; - - Map toJson() { - final json = {}; - json[r'scan'] = this.scan; - json[r'watch'] = this.watch; - return json; - } - - /// Returns a new [SystemConfigLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryDto( - scan: SystemConfigLibraryScanDto.fromJson(json[r'scan'])!, - watch: SystemConfigLibraryWatchDto.fromJson(json[r'watch'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'scan', - 'watch', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_scan_dto.dart b/mobile/openapi/lib/model/system_config_library_scan_dto.dart deleted file mode 100644 index 003000d2ec..0000000000 --- a/mobile/openapi/lib/model/system_config_library_scan_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryScanDto { - /// Returns a new [SystemConfigLibraryScanDto] instance. - SystemConfigLibraryScanDto({ - required this.cronExpression, - required this.enabled, - }); - - /// Cron expression - String cronExpression; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryScanDto && - other.cronExpression == cronExpression && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (cronExpression.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryScanDto[cronExpression=$cronExpression, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'cronExpression'] = this.cronExpression; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryScanDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryScanDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryScanDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryScanDto( - cronExpression: mapValueOfType(json, r'cronExpression')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryScanDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryScanDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryScanDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryScanDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'cronExpression', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_library_watch_dto.dart b/mobile/openapi/lib/model/system_config_library_watch_dto.dart deleted file mode 100644 index b4f171bd25..0000000000 --- a/mobile/openapi/lib/model/system_config_library_watch_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLibraryWatchDto { - /// Returns a new [SystemConfigLibraryWatchDto] instance. - SystemConfigLibraryWatchDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLibraryWatchDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigLibraryWatchDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigLibraryWatchDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLibraryWatchDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLibraryWatchDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLibraryWatchDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLibraryWatchDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLibraryWatchDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLibraryWatchDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLibraryWatchDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_logging_dto.dart b/mobile/openapi/lib/model/system_config_logging_dto.dart deleted file mode 100644 index 54278893db..0000000000 --- a/mobile/openapi/lib/model/system_config_logging_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigLoggingDto { - /// Returns a new [SystemConfigLoggingDto] instance. - SystemConfigLoggingDto({ - required this.enabled, - required this.level, - }); - - /// Enabled - bool enabled; - - LogLevel level; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigLoggingDto && - other.enabled == enabled && - other.level == level; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (level.hashCode); - - @override - String toString() => 'SystemConfigLoggingDto[enabled=$enabled, level=$level]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'level'] = this.level; - return json; - } - - /// Returns a new [SystemConfigLoggingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigLoggingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigLoggingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigLoggingDto( - enabled: mapValueOfType(json, r'enabled')!, - level: LogLevel.fromJson(json[r'level'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigLoggingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigLoggingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigLoggingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigLoggingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'level', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart b/mobile/openapi/lib/model/system_config_machine_learning_dto.dart deleted file mode 100644 index 6162e72b8f..0000000000 --- a/mobile/openapi/lib/model/system_config_machine_learning_dto.dart +++ /dev/null @@ -1,151 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMachineLearningDto { - /// Returns a new [SystemConfigMachineLearningDto] instance. - SystemConfigMachineLearningDto({ - required this.availabilityChecks, - required this.clip, - required this.duplicateDetection, - required this.enabled, - required this.facialRecognition, - required this.ocr, - this.urls = const [], - }); - - MachineLearningAvailabilityChecksDto availabilityChecks; - - CLIPConfig clip; - - DuplicateDetectionConfig duplicateDetection; - - /// Enabled - bool enabled; - - FacialRecognitionConfig facialRecognition; - - OcrConfig ocr; - - /// ML service URLs - List urls; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMachineLearningDto && - other.availabilityChecks == availabilityChecks && - other.clip == clip && - other.duplicateDetection == duplicateDetection && - other.enabled == enabled && - other.facialRecognition == facialRecognition && - other.ocr == ocr && - _deepEquality.equals(other.urls, urls); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (availabilityChecks.hashCode) + - (clip.hashCode) + - (duplicateDetection.hashCode) + - (enabled.hashCode) + - (facialRecognition.hashCode) + - (ocr.hashCode) + - (urls.hashCode); - - @override - String toString() => 'SystemConfigMachineLearningDto[availabilityChecks=$availabilityChecks, clip=$clip, duplicateDetection=$duplicateDetection, enabled=$enabled, facialRecognition=$facialRecognition, ocr=$ocr, urls=$urls]'; - - Map toJson() { - final json = {}; - json[r'availabilityChecks'] = this.availabilityChecks; - json[r'clip'] = this.clip; - json[r'duplicateDetection'] = this.duplicateDetection; - json[r'enabled'] = this.enabled; - json[r'facialRecognition'] = this.facialRecognition; - json[r'ocr'] = this.ocr; - json[r'urls'] = this.urls; - return json; - } - - /// Returns a new [SystemConfigMachineLearningDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMachineLearningDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMachineLearningDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMachineLearningDto( - availabilityChecks: MachineLearningAvailabilityChecksDto.fromJson(json[r'availabilityChecks'])!, - clip: CLIPConfig.fromJson(json[r'clip'])!, - duplicateDetection: DuplicateDetectionConfig.fromJson(json[r'duplicateDetection'])!, - enabled: mapValueOfType(json, r'enabled')!, - facialRecognition: FacialRecognitionConfig.fromJson(json[r'facialRecognition'])!, - ocr: OcrConfig.fromJson(json[r'ocr'])!, - urls: json[r'urls'] is Iterable - ? (json[r'urls'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMachineLearningDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMachineLearningDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMachineLearningDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMachineLearningDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'availabilityChecks', - 'clip', - 'duplicateDetection', - 'enabled', - 'facialRecognition', - 'ocr', - 'urls', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_map_dto.dart b/mobile/openapi/lib/model/system_config_map_dto.dart deleted file mode 100644 index 7a2fbb516b..0000000000 --- a/mobile/openapi/lib/model/system_config_map_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMapDto { - /// Returns a new [SystemConfigMapDto] instance. - SystemConfigMapDto({ - required this.darkStyle, - required this.enabled, - required this.lightStyle, - }); - - /// Dark map style URL - String darkStyle; - - /// Enabled - bool enabled; - - /// Light map style URL - String lightStyle; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMapDto && - other.darkStyle == darkStyle && - other.enabled == enabled && - other.lightStyle == lightStyle; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (darkStyle.hashCode) + - (enabled.hashCode) + - (lightStyle.hashCode); - - @override - String toString() => 'SystemConfigMapDto[darkStyle=$darkStyle, enabled=$enabled, lightStyle=$lightStyle]'; - - Map toJson() { - final json = {}; - json[r'darkStyle'] = this.darkStyle; - json[r'enabled'] = this.enabled; - json[r'lightStyle'] = this.lightStyle; - return json; - } - - /// Returns a new [SystemConfigMapDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMapDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMapDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMapDto( - darkStyle: mapValueOfType(json, r'darkStyle')!, - enabled: mapValueOfType(json, r'enabled')!, - lightStyle: mapValueOfType(json, r'lightStyle')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMapDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMapDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMapDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMapDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'darkStyle', - 'enabled', - 'lightStyle', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_metadata_dto.dart b/mobile/openapi/lib/model/system_config_metadata_dto.dart deleted file mode 100644 index 3c32fc551d..0000000000 --- a/mobile/openapi/lib/model/system_config_metadata_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigMetadataDto { - /// Returns a new [SystemConfigMetadataDto] instance. - SystemConfigMetadataDto({ - required this.faces, - }); - - SystemConfigFacesDto faces; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigMetadataDto && - other.faces == faces; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (faces.hashCode); - - @override - String toString() => 'SystemConfigMetadataDto[faces=$faces]'; - - Map toJson() { - final json = {}; - json[r'faces'] = this.faces; - return json; - } - - /// Returns a new [SystemConfigMetadataDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigMetadataDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigMetadataDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigMetadataDto( - faces: SystemConfigFacesDto.fromJson(json[r'faces'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigMetadataDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigMetadataDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigMetadataDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigMetadataDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'faces', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart b/mobile/openapi/lib/model/system_config_new_version_check_dto.dart deleted file mode 100644 index 17ae9577e8..0000000000 --- a/mobile/openapi/lib/model/system_config_new_version_check_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNewVersionCheckDto { - /// Returns a new [SystemConfigNewVersionCheckDto] instance. - SystemConfigNewVersionCheckDto({ - required this.channel, - required this.enabled, - }); - - ReleaseChannel channel; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNewVersionCheckDto && - other.channel == channel && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (channel.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigNewVersionCheckDto[channel=$channel, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'channel'] = this.channel; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigNewVersionCheckDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNewVersionCheckDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNewVersionCheckDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNewVersionCheckDto( - channel: ReleaseChannel.fromJson(json[r'channel'])!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNewVersionCheckDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNewVersionCheckDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNewVersionCheckDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNewVersionCheckDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'channel', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart b/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart deleted file mode 100644 index 4838c86065..0000000000 --- a/mobile/openapi/lib/model/system_config_nightly_tasks_dto.dart +++ /dev/null @@ -1,145 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNightlyTasksDto { - /// Returns a new [SystemConfigNightlyTasksDto] instance. - SystemConfigNightlyTasksDto({ - required this.clusterNewFaces, - required this.databaseCleanup, - required this.generateMemories, - required this.missingThumbnails, - required this.startTime, - required this.syncQuotaUsage, - }); - - /// Cluster new faces - bool clusterNewFaces; - - /// Database cleanup - bool databaseCleanup; - - /// Generate memories - bool generateMemories; - - /// Missing thumbnails - bool missingThumbnails; - - /// Start time (HH:MM) - String startTime; - - /// Sync quota usage - bool syncQuotaUsage; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNightlyTasksDto && - other.clusterNewFaces == clusterNewFaces && - other.databaseCleanup == databaseCleanup && - other.generateMemories == generateMemories && - other.missingThumbnails == missingThumbnails && - other.startTime == startTime && - other.syncQuotaUsage == syncQuotaUsage; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (clusterNewFaces.hashCode) + - (databaseCleanup.hashCode) + - (generateMemories.hashCode) + - (missingThumbnails.hashCode) + - (startTime.hashCode) + - (syncQuotaUsage.hashCode); - - @override - String toString() => 'SystemConfigNightlyTasksDto[clusterNewFaces=$clusterNewFaces, databaseCleanup=$databaseCleanup, generateMemories=$generateMemories, missingThumbnails=$missingThumbnails, startTime=$startTime, syncQuotaUsage=$syncQuotaUsage]'; - - Map toJson() { - final json = {}; - json[r'clusterNewFaces'] = this.clusterNewFaces; - json[r'databaseCleanup'] = this.databaseCleanup; - json[r'generateMemories'] = this.generateMemories; - json[r'missingThumbnails'] = this.missingThumbnails; - json[r'startTime'] = this.startTime; - json[r'syncQuotaUsage'] = this.syncQuotaUsage; - return json; - } - - /// Returns a new [SystemConfigNightlyTasksDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNightlyTasksDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNightlyTasksDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNightlyTasksDto( - clusterNewFaces: mapValueOfType(json, r'clusterNewFaces')!, - databaseCleanup: mapValueOfType(json, r'databaseCleanup')!, - generateMemories: mapValueOfType(json, r'generateMemories')!, - missingThumbnails: mapValueOfType(json, r'missingThumbnails')!, - startTime: mapValueOfType(json, r'startTime')!, - syncQuotaUsage: mapValueOfType(json, r'syncQuotaUsage')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNightlyTasksDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNightlyTasksDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNightlyTasksDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNightlyTasksDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'clusterNewFaces', - 'databaseCleanup', - 'generateMemories', - 'missingThumbnails', - 'startTime', - 'syncQuotaUsage', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_notifications_dto.dart b/mobile/openapi/lib/model/system_config_notifications_dto.dart deleted file mode 100644 index 35d3d31833..0000000000 --- a/mobile/openapi/lib/model/system_config_notifications_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigNotificationsDto { - /// Returns a new [SystemConfigNotificationsDto] instance. - SystemConfigNotificationsDto({ - required this.smtp, - }); - - SystemConfigSmtpDto smtp; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigNotificationsDto && - other.smtp == smtp; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (smtp.hashCode); - - @override - String toString() => 'SystemConfigNotificationsDto[smtp=$smtp]'; - - Map toJson() { - final json = {}; - json[r'smtp'] = this.smtp; - return json; - } - - /// Returns a new [SystemConfigNotificationsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigNotificationsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigNotificationsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigNotificationsDto( - smtp: SystemConfigSmtpDto.fromJson(json[r'smtp'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigNotificationsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigNotificationsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigNotificationsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigNotificationsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'smtp', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_o_auth_dto.dart b/mobile/openapi/lib/model/system_config_o_auth_dto.dart deleted file mode 100644 index 44eefe605c..0000000000 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ /dev/null @@ -1,289 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigOAuthDto { - /// Returns a new [SystemConfigOAuthDto] instance. - SystemConfigOAuthDto({ - required this.allowInsecureRequests, - required this.autoLaunch, - required this.autoRegister, - required this.buttonText, - required this.clientId, - required this.clientSecret, - required this.defaultStorageQuota, - required this.enabled, - required this.endSessionEndpoint, - required this.issuerUrl, - required this.mobileOverrideEnabled, - required this.mobileRedirectUri, - required this.profileSigningAlgorithm, - required this.prompt, - required this.roleClaim, - required this.scope, - required this.signingAlgorithm, - required this.storageLabelClaim, - required this.storageQuotaClaim, - required this.timeout, - required this.tokenEndpointAuthMethod, - }); - - /// Allow insecure requests - bool allowInsecureRequests; - - /// Auto launch - bool autoLaunch; - - /// Auto register - bool autoRegister; - - /// Button text - String buttonText; - - /// Client ID - String clientId; - - /// Client secret - String clientSecret; - - /// Default storage quota - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? defaultStorageQuota; - - /// Enabled - bool enabled; - - /// End session endpoint - String endSessionEndpoint; - - /// Issuer URL - String issuerUrl; - - /// Mobile override enabled - bool mobileOverrideEnabled; - - /// Mobile redirect URI (set to empty string to disable) - String mobileRedirectUri; - - /// Profile signing algorithm - String profileSigningAlgorithm; - - /// OAuth prompt parameter (e.g. select_account, login, consent) - String prompt; - - /// Role claim - String roleClaim; - - /// Scope - String scope; - - /// Signing algorithm - String signingAlgorithm; - - /// Storage label claim - String storageLabelClaim; - - /// Storage quota claim - String storageQuotaClaim; - - /// Timeout - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int timeout; - - OAuthTokenEndpointAuthMethod tokenEndpointAuthMethod; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigOAuthDto && - other.allowInsecureRequests == allowInsecureRequests && - other.autoLaunch == autoLaunch && - other.autoRegister == autoRegister && - other.buttonText == buttonText && - other.clientId == clientId && - other.clientSecret == clientSecret && - other.defaultStorageQuota == defaultStorageQuota && - other.enabled == enabled && - other.endSessionEndpoint == endSessionEndpoint && - other.issuerUrl == issuerUrl && - other.mobileOverrideEnabled == mobileOverrideEnabled && - other.mobileRedirectUri == mobileRedirectUri && - other.profileSigningAlgorithm == profileSigningAlgorithm && - other.prompt == prompt && - other.roleClaim == roleClaim && - other.scope == scope && - other.signingAlgorithm == signingAlgorithm && - other.storageLabelClaim == storageLabelClaim && - other.storageQuotaClaim == storageQuotaClaim && - other.timeout == timeout && - other.tokenEndpointAuthMethod == tokenEndpointAuthMethod; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (allowInsecureRequests.hashCode) + - (autoLaunch.hashCode) + - (autoRegister.hashCode) + - (buttonText.hashCode) + - (clientId.hashCode) + - (clientSecret.hashCode) + - (defaultStorageQuota == null ? 0 : defaultStorageQuota!.hashCode) + - (enabled.hashCode) + - (endSessionEndpoint.hashCode) + - (issuerUrl.hashCode) + - (mobileOverrideEnabled.hashCode) + - (mobileRedirectUri.hashCode) + - (profileSigningAlgorithm.hashCode) + - (prompt.hashCode) + - (roleClaim.hashCode) + - (scope.hashCode) + - (signingAlgorithm.hashCode) + - (storageLabelClaim.hashCode) + - (storageQuotaClaim.hashCode) + - (timeout.hashCode) + - (tokenEndpointAuthMethod.hashCode); - - @override - String toString() => 'SystemConfigOAuthDto[allowInsecureRequests=$allowInsecureRequests, autoLaunch=$autoLaunch, autoRegister=$autoRegister, buttonText=$buttonText, clientId=$clientId, clientSecret=$clientSecret, defaultStorageQuota=$defaultStorageQuota, enabled=$enabled, endSessionEndpoint=$endSessionEndpoint, issuerUrl=$issuerUrl, mobileOverrideEnabled=$mobileOverrideEnabled, mobileRedirectUri=$mobileRedirectUri, profileSigningAlgorithm=$profileSigningAlgorithm, prompt=$prompt, roleClaim=$roleClaim, scope=$scope, signingAlgorithm=$signingAlgorithm, storageLabelClaim=$storageLabelClaim, storageQuotaClaim=$storageQuotaClaim, timeout=$timeout, tokenEndpointAuthMethod=$tokenEndpointAuthMethod]'; - - Map toJson() { - final json = {}; - json[r'allowInsecureRequests'] = this.allowInsecureRequests; - json[r'autoLaunch'] = this.autoLaunch; - json[r'autoRegister'] = this.autoRegister; - json[r'buttonText'] = this.buttonText; - json[r'clientId'] = this.clientId; - json[r'clientSecret'] = this.clientSecret; - if (this.defaultStorageQuota != null) { - json[r'defaultStorageQuota'] = this.defaultStorageQuota; - } else { - json[r'defaultStorageQuota'] = null; - } - json[r'enabled'] = this.enabled; - json[r'endSessionEndpoint'] = this.endSessionEndpoint; - json[r'issuerUrl'] = this.issuerUrl; - json[r'mobileOverrideEnabled'] = this.mobileOverrideEnabled; - json[r'mobileRedirectUri'] = this.mobileRedirectUri; - json[r'profileSigningAlgorithm'] = this.profileSigningAlgorithm; - json[r'prompt'] = this.prompt; - json[r'roleClaim'] = this.roleClaim; - json[r'scope'] = this.scope; - json[r'signingAlgorithm'] = this.signingAlgorithm; - json[r'storageLabelClaim'] = this.storageLabelClaim; - json[r'storageQuotaClaim'] = this.storageQuotaClaim; - json[r'timeout'] = this.timeout; - json[r'tokenEndpointAuthMethod'] = this.tokenEndpointAuthMethod; - return json; - } - - /// Returns a new [SystemConfigOAuthDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigOAuthDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigOAuthDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigOAuthDto( - allowInsecureRequests: mapValueOfType(json, r'allowInsecureRequests')!, - autoLaunch: mapValueOfType(json, r'autoLaunch')!, - autoRegister: mapValueOfType(json, r'autoRegister')!, - buttonText: mapValueOfType(json, r'buttonText')!, - clientId: mapValueOfType(json, r'clientId')!, - clientSecret: mapValueOfType(json, r'clientSecret')!, - defaultStorageQuota: mapValueOfType(json, r'defaultStorageQuota'), - enabled: mapValueOfType(json, r'enabled')!, - endSessionEndpoint: mapValueOfType(json, r'endSessionEndpoint')!, - issuerUrl: mapValueOfType(json, r'issuerUrl')!, - mobileOverrideEnabled: mapValueOfType(json, r'mobileOverrideEnabled')!, - mobileRedirectUri: mapValueOfType(json, r'mobileRedirectUri')!, - profileSigningAlgorithm: mapValueOfType(json, r'profileSigningAlgorithm')!, - prompt: mapValueOfType(json, r'prompt')!, - roleClaim: mapValueOfType(json, r'roleClaim')!, - scope: mapValueOfType(json, r'scope')!, - signingAlgorithm: mapValueOfType(json, r'signingAlgorithm')!, - storageLabelClaim: mapValueOfType(json, r'storageLabelClaim')!, - storageQuotaClaim: mapValueOfType(json, r'storageQuotaClaim')!, - timeout: mapValueOfType(json, r'timeout')!, - tokenEndpointAuthMethod: OAuthTokenEndpointAuthMethod.fromJson(json[r'tokenEndpointAuthMethod'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigOAuthDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigOAuthDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigOAuthDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'allowInsecureRequests', - 'autoLaunch', - 'autoRegister', - 'buttonText', - 'clientId', - 'clientSecret', - 'defaultStorageQuota', - 'enabled', - 'endSessionEndpoint', - 'issuerUrl', - 'mobileOverrideEnabled', - 'mobileRedirectUri', - 'profileSigningAlgorithm', - 'prompt', - 'roleClaim', - 'scope', - 'signingAlgorithm', - 'storageLabelClaim', - 'storageQuotaClaim', - 'timeout', - 'tokenEndpointAuthMethod', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_password_login_dto.dart b/mobile/openapi/lib/model/system_config_password_login_dto.dart deleted file mode 100644 index 1328a6acaa..0000000000 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigPasswordLoginDto { - /// Returns a new [SystemConfigPasswordLoginDto] instance. - SystemConfigPasswordLoginDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigPasswordLoginDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigPasswordLoginDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigPasswordLoginDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigPasswordLoginDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigPasswordLoginDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigPasswordLoginDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigPasswordLoginDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigPasswordLoginDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigPasswordLoginDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart b/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart deleted file mode 100644 index 0374e19be1..0000000000 --- a/mobile/openapi/lib/model/system_config_reverse_geocoding_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigReverseGeocodingDto { - /// Returns a new [SystemConfigReverseGeocodingDto] instance. - SystemConfigReverseGeocodingDto({ - required this.enabled, - }); - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigReverseGeocodingDto && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode); - - @override - String toString() => 'SystemConfigReverseGeocodingDto[enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigReverseGeocodingDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigReverseGeocodingDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigReverseGeocodingDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigReverseGeocodingDto( - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigReverseGeocodingDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigReverseGeocodingDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigReverseGeocodingDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigReverseGeocodingDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_server_dto.dart b/mobile/openapi/lib/model/system_config_server_dto.dart deleted file mode 100644 index 200f75f7c6..0000000000 --- a/mobile/openapi/lib/model/system_config_server_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigServerDto { - /// Returns a new [SystemConfigServerDto] instance. - SystemConfigServerDto({ - required this.externalDomain, - required this.loginPageMessage, - required this.publicUsers, - }); - - /// External domain - String externalDomain; - - /// Login page message - String loginPageMessage; - - /// Public users - bool publicUsers; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigServerDto && - other.externalDomain == externalDomain && - other.loginPageMessage == loginPageMessage && - other.publicUsers == publicUsers; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (externalDomain.hashCode) + - (loginPageMessage.hashCode) + - (publicUsers.hashCode); - - @override - String toString() => 'SystemConfigServerDto[externalDomain=$externalDomain, loginPageMessage=$loginPageMessage, publicUsers=$publicUsers]'; - - Map toJson() { - final json = {}; - json[r'externalDomain'] = this.externalDomain; - json[r'loginPageMessage'] = this.loginPageMessage; - json[r'publicUsers'] = this.publicUsers; - return json; - } - - /// Returns a new [SystemConfigServerDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigServerDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigServerDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigServerDto( - externalDomain: mapValueOfType(json, r'externalDomain')!, - loginPageMessage: mapValueOfType(json, r'loginPageMessage')!, - publicUsers: mapValueOfType(json, r'publicUsers')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigServerDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigServerDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigServerDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigServerDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'externalDomain', - 'loginPageMessage', - 'publicUsers', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_dto.dart b/mobile/openapi/lib/model/system_config_smtp_dto.dart deleted file mode 100644 index a3d14cda63..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_dto.dart +++ /dev/null @@ -1,126 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigSmtpDto { - /// Returns a new [SystemConfigSmtpDto] instance. - SystemConfigSmtpDto({ - required this.enabled, - required this.from, - required this.replyTo, - required this.transport, - }); - - /// Whether SMTP email notifications are enabled - bool enabled; - - /// Email address to send from - String from; - - /// Email address for replies - String replyTo; - - SystemConfigSmtpTransportDto transport; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpDto && - other.enabled == enabled && - other.from == from && - other.replyTo == replyTo && - other.transport == transport; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (from.hashCode) + - (replyTo.hashCode) + - (transport.hashCode); - - @override - String toString() => 'SystemConfigSmtpDto[enabled=$enabled, from=$from, replyTo=$replyTo, transport=$transport]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'from'] = this.from; - json[r'replyTo'] = this.replyTo; - json[r'transport'] = this.transport; - return json; - } - - /// Returns a new [SystemConfigSmtpDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpDto( - enabled: mapValueOfType(json, r'enabled')!, - from: mapValueOfType(json, r'from')!, - replyTo: mapValueOfType(json, r'replyTo')!, - transport: SystemConfigSmtpTransportDto.fromJson(json[r'transport'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'from', - 'replyTo', - 'transport', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart b/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart deleted file mode 100644 index 266e3f3c86..0000000000 --- a/mobile/openapi/lib/model/system_config_smtp_transport_dto.dart +++ /dev/null @@ -1,148 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigSmtpTransportDto { - /// Returns a new [SystemConfigSmtpTransportDto] instance. - SystemConfigSmtpTransportDto({ - required this.host, - required this.ignoreCert, - required this.password, - required this.port, - required this.secure, - required this.username, - }); - - /// SMTP server hostname - String host; - - /// Whether to ignore SSL certificate errors - bool ignoreCert; - - /// SMTP password - String password; - - /// SMTP server port - /// - /// Minimum value: 0 - /// Maximum value: 65535 - int port; - - /// Whether to use secure connection (TLS/SSL) - bool secure; - - /// SMTP username - String username; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigSmtpTransportDto && - other.host == host && - other.ignoreCert == ignoreCert && - other.password == password && - other.port == port && - other.secure == secure && - other.username == username; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (host.hashCode) + - (ignoreCert.hashCode) + - (password.hashCode) + - (port.hashCode) + - (secure.hashCode) + - (username.hashCode); - - @override - String toString() => 'SystemConfigSmtpTransportDto[host=$host, ignoreCert=$ignoreCert, password=$password, port=$port, secure=$secure, username=$username]'; - - Map toJson() { - final json = {}; - json[r'host'] = this.host; - json[r'ignoreCert'] = this.ignoreCert; - json[r'password'] = this.password; - json[r'port'] = this.port; - json[r'secure'] = this.secure; - json[r'username'] = this.username; - return json; - } - - /// Returns a new [SystemConfigSmtpTransportDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigSmtpTransportDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigSmtpTransportDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigSmtpTransportDto( - host: mapValueOfType(json, r'host')!, - ignoreCert: mapValueOfType(json, r'ignoreCert')!, - password: mapValueOfType(json, r'password')!, - port: mapValueOfType(json, r'port')!, - secure: mapValueOfType(json, r'secure')!, - username: mapValueOfType(json, r'username')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigSmtpTransportDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigSmtpTransportDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigSmtpTransportDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigSmtpTransportDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'host', - 'ignoreCert', - 'password', - 'port', - 'secure', - 'username', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_storage_template_dto.dart b/mobile/openapi/lib/model/system_config_storage_template_dto.dart deleted file mode 100644 index f9f37e48ad..0000000000 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigStorageTemplateDto { - /// Returns a new [SystemConfigStorageTemplateDto] instance. - SystemConfigStorageTemplateDto({ - required this.enabled, - required this.hashVerificationEnabled, - required this.template, - }); - - /// Enabled - bool enabled; - - /// Hash verification enabled - bool hashVerificationEnabled; - - /// Template - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigStorageTemplateDto && - other.enabled == enabled && - other.hashVerificationEnabled == hashVerificationEnabled && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (hashVerificationEnabled.hashCode) + - (template.hashCode); - - @override - String toString() => 'SystemConfigStorageTemplateDto[enabled=$enabled, hashVerificationEnabled=$hashVerificationEnabled, template=$template]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'hashVerificationEnabled'] = this.hashVerificationEnabled; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [SystemConfigStorageTemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigStorageTemplateDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigStorageTemplateDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigStorageTemplateDto( - enabled: mapValueOfType(json, r'enabled')!, - hashVerificationEnabled: mapValueOfType(json, r'hashVerificationEnabled')!, - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigStorageTemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigStorageTemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigStorageTemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'hashVerificationEnabled', - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_emails_dto.dart b/mobile/openapi/lib/model/system_config_template_emails_dto.dart deleted file mode 100644 index d29ca1fac3..0000000000 --- a/mobile/openapi/lib/model/system_config_template_emails_dto.dart +++ /dev/null @@ -1,118 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplateEmailsDto { - /// Returns a new [SystemConfigTemplateEmailsDto] instance. - SystemConfigTemplateEmailsDto({ - required this.albumInviteTemplate, - required this.albumUpdateTemplate, - required this.welcomeTemplate, - }); - - /// Album invite template - String albumInviteTemplate; - - /// Album update template - String albumUpdateTemplate; - - /// Welcome template - String welcomeTemplate; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateEmailsDto && - other.albumInviteTemplate == albumInviteTemplate && - other.albumUpdateTemplate == albumUpdateTemplate && - other.welcomeTemplate == welcomeTemplate; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumInviteTemplate.hashCode) + - (albumUpdateTemplate.hashCode) + - (welcomeTemplate.hashCode); - - @override - String toString() => 'SystemConfigTemplateEmailsDto[albumInviteTemplate=$albumInviteTemplate, albumUpdateTemplate=$albumUpdateTemplate, welcomeTemplate=$welcomeTemplate]'; - - Map toJson() { - final json = {}; - json[r'albumInviteTemplate'] = this.albumInviteTemplate; - json[r'albumUpdateTemplate'] = this.albumUpdateTemplate; - json[r'welcomeTemplate'] = this.welcomeTemplate; - return json; - } - - /// Returns a new [SystemConfigTemplateEmailsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateEmailsDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateEmailsDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateEmailsDto( - albumInviteTemplate: mapValueOfType(json, r'albumInviteTemplate')!, - albumUpdateTemplate: mapValueOfType(json, r'albumUpdateTemplate')!, - welcomeTemplate: mapValueOfType(json, r'welcomeTemplate')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateEmailsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateEmailsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateEmailsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateEmailsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albumInviteTemplate', - 'albumUpdateTemplate', - 'welcomeTemplate', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart b/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart deleted file mode 100644 index 6f81513039..0000000000 --- a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart +++ /dev/null @@ -1,179 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplateStorageOptionDto { - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance. - SystemConfigTemplateStorageOptionDto({ - this.dayOptions = const [], - this.hourOptions = const [], - this.minuteOptions = const [], - this.monthOptions = const [], - this.presetOptions = const [], - this.secondOptions = const [], - this.weekOptions = const [], - this.yearOptions = const [], - }); - - /// Available day format options for storage template - List dayOptions; - - /// Available hour format options for storage template - List hourOptions; - - /// Available minute format options for storage template - List minuteOptions; - - /// Available month format options for storage template - List monthOptions; - - /// Available preset template options - List presetOptions; - - /// Available second format options for storage template - List secondOptions; - - /// Available week format options for storage template - List weekOptions; - - /// Available year format options for storage template - List yearOptions; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplateStorageOptionDto && - _deepEquality.equals(other.dayOptions, dayOptions) && - _deepEquality.equals(other.hourOptions, hourOptions) && - _deepEquality.equals(other.minuteOptions, minuteOptions) && - _deepEquality.equals(other.monthOptions, monthOptions) && - _deepEquality.equals(other.presetOptions, presetOptions) && - _deepEquality.equals(other.secondOptions, secondOptions) && - _deepEquality.equals(other.weekOptions, weekOptions) && - _deepEquality.equals(other.yearOptions, yearOptions); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dayOptions.hashCode) + - (hourOptions.hashCode) + - (minuteOptions.hashCode) + - (monthOptions.hashCode) + - (presetOptions.hashCode) + - (secondOptions.hashCode) + - (weekOptions.hashCode) + - (yearOptions.hashCode); - - @override - String toString() => 'SystemConfigTemplateStorageOptionDto[dayOptions=$dayOptions, hourOptions=$hourOptions, minuteOptions=$minuteOptions, monthOptions=$monthOptions, presetOptions=$presetOptions, secondOptions=$secondOptions, weekOptions=$weekOptions, yearOptions=$yearOptions]'; - - Map toJson() { - final json = {}; - json[r'dayOptions'] = this.dayOptions; - json[r'hourOptions'] = this.hourOptions; - json[r'minuteOptions'] = this.minuteOptions; - json[r'monthOptions'] = this.monthOptions; - json[r'presetOptions'] = this.presetOptions; - json[r'secondOptions'] = this.secondOptions; - json[r'weekOptions'] = this.weekOptions; - json[r'yearOptions'] = this.yearOptions; - return json; - } - - /// Returns a new [SystemConfigTemplateStorageOptionDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplateStorageOptionDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplateStorageOptionDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplateStorageOptionDto( - dayOptions: json[r'dayOptions'] is Iterable - ? (json[r'dayOptions'] as Iterable).cast().toList(growable: false) - : const [], - hourOptions: json[r'hourOptions'] is Iterable - ? (json[r'hourOptions'] as Iterable).cast().toList(growable: false) - : const [], - minuteOptions: json[r'minuteOptions'] is Iterable - ? (json[r'minuteOptions'] as Iterable).cast().toList(growable: false) - : const [], - monthOptions: json[r'monthOptions'] is Iterable - ? (json[r'monthOptions'] as Iterable).cast().toList(growable: false) - : const [], - presetOptions: json[r'presetOptions'] is Iterable - ? (json[r'presetOptions'] as Iterable).cast().toList(growable: false) - : const [], - secondOptions: json[r'secondOptions'] is Iterable - ? (json[r'secondOptions'] as Iterable).cast().toList(growable: false) - : const [], - weekOptions: json[r'weekOptions'] is Iterable - ? (json[r'weekOptions'] as Iterable).cast().toList(growable: false) - : const [], - yearOptions: json[r'yearOptions'] is Iterable - ? (json[r'yearOptions'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplateStorageOptionDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplateStorageOptionDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'dayOptions', - 'hourOptions', - 'minuteOptions', - 'monthOptions', - 'presetOptions', - 'secondOptions', - 'weekOptions', - 'yearOptions', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_templates_dto.dart b/mobile/openapi/lib/model/system_config_templates_dto.dart deleted file mode 100644 index a5e8834978..0000000000 --- a/mobile/openapi/lib/model/system_config_templates_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTemplatesDto { - /// Returns a new [SystemConfigTemplatesDto] instance. - SystemConfigTemplatesDto({ - required this.email, - }); - - SystemConfigTemplateEmailsDto email; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTemplatesDto && - other.email == email; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (email.hashCode); - - @override - String toString() => 'SystemConfigTemplatesDto[email=$email]'; - - Map toJson() { - final json = {}; - json[r'email'] = this.email; - return json; - } - - /// Returns a new [SystemConfigTemplatesDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTemplatesDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTemplatesDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTemplatesDto( - email: SystemConfigTemplateEmailsDto.fromJson(json[r'email'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTemplatesDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTemplatesDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTemplatesDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTemplatesDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_theme_dto.dart b/mobile/openapi/lib/model/system_config_theme_dto.dart deleted file mode 100644 index fca38f71fb..0000000000 --- a/mobile/openapi/lib/model/system_config_theme_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigThemeDto { - /// Returns a new [SystemConfigThemeDto] instance. - SystemConfigThemeDto({ - required this.customCss, - }); - - /// Custom CSS for theming - String customCss; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigThemeDto && - other.customCss == customCss; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (customCss.hashCode); - - @override - String toString() => 'SystemConfigThemeDto[customCss=$customCss]'; - - Map toJson() { - final json = {}; - json[r'customCss'] = this.customCss; - return json; - } - - /// Returns a new [SystemConfigThemeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigThemeDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigThemeDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigThemeDto( - customCss: mapValueOfType(json, r'customCss')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigThemeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigThemeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigThemeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigThemeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'customCss', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_trash_dto.dart b/mobile/openapi/lib/model/system_config_trash_dto.dart deleted file mode 100644 index 790710751f..0000000000 --- a/mobile/openapi/lib/model/system_config_trash_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigTrashDto { - /// Returns a new [SystemConfigTrashDto] instance. - SystemConfigTrashDto({ - required this.days, - required this.enabled, - }); - - /// Days - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int days; - - /// Enabled - bool enabled; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigTrashDto && - other.days == days && - other.enabled == enabled; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (days.hashCode) + - (enabled.hashCode); - - @override - String toString() => 'SystemConfigTrashDto[days=$days, enabled=$enabled]'; - - Map toJson() { - final json = {}; - json[r'days'] = this.days; - json[r'enabled'] = this.enabled; - return json; - } - - /// Returns a new [SystemConfigTrashDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigTrashDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigTrashDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigTrashDto( - days: mapValueOfType(json, r'days')!, - enabled: mapValueOfType(json, r'enabled')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigTrashDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigTrashDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigTrashDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigTrashDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'days', - 'enabled', - }; -} - diff --git a/mobile/openapi/lib/model/system_config_user_dto.dart b/mobile/openapi/lib/model/system_config_user_dto.dart deleted file mode 100644 index dc553e7369..0000000000 --- a/mobile/openapi/lib/model/system_config_user_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class SystemConfigUserDto { - /// Returns a new [SystemConfigUserDto] instance. - SystemConfigUserDto({ - required this.deleteDelay, - }); - - /// Delete delay - /// - /// Minimum value: 1 - /// Maximum value: 9007199254740991 - int deleteDelay; - - @override - bool operator ==(Object other) => identical(this, other) || other is SystemConfigUserDto && - other.deleteDelay == deleteDelay; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (deleteDelay.hashCode); - - @override - String toString() => 'SystemConfigUserDto[deleteDelay=$deleteDelay]'; - - Map toJson() { - final json = {}; - json[r'deleteDelay'] = this.deleteDelay; - return json; - } - - /// Returns a new [SystemConfigUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static SystemConfigUserDto? fromJson(dynamic value) { - upgradeDto(value, "SystemConfigUserDto"); - if (value is Map) { - final json = value.cast(); - - return SystemConfigUserDto( - deleteDelay: mapValueOfType(json, r'deleteDelay')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = SystemConfigUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = SystemConfigUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of SystemConfigUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = SystemConfigUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'deleteDelay', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_dto.dart deleted file mode 100644 index 16abc3bcdc..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_dto.dart +++ /dev/null @@ -1,113 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagBulkAssetsDto { - /// Returns a new [TagBulkAssetsDto] instance. - TagBulkAssetsDto({ - this.assetIds = const [], - this.tagIds = const [], - }); - - /// Asset IDs - List assetIds; - - /// Tag IDs - List tagIds; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsDto && - _deepEquality.equals(other.assetIds, assetIds) && - _deepEquality.equals(other.tagIds, tagIds); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (assetIds.hashCode) + - (tagIds.hashCode); - - @override - String toString() => 'TagBulkAssetsDto[assetIds=$assetIds, tagIds=$tagIds]'; - - Map toJson() { - final json = {}; - json[r'assetIds'] = this.assetIds; - json[r'tagIds'] = this.tagIds; - return json; - } - - /// Returns a new [TagBulkAssetsDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsDto( - assetIds: json[r'assetIds'] is Iterable - ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) - : const [], - tagIds: json[r'tagIds'] is Iterable - ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'assetIds', - 'tagIds', - }; -} - diff --git a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart b/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart deleted file mode 100644 index 4d689f01a1..0000000000 --- a/mobile/openapi/lib/model/tag_bulk_assets_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagBulkAssetsResponseDto { - /// Returns a new [TagBulkAssetsResponseDto] instance. - TagBulkAssetsResponseDto({ - required this.count, - }); - - /// Number of assets tagged - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagBulkAssetsResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TagBulkAssetsResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TagBulkAssetsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagBulkAssetsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagBulkAssetsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagBulkAssetsResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagBulkAssetsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagBulkAssetsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagBulkAssetsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagBulkAssetsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/tag_create_dto.dart b/mobile/openapi/lib/model/tag_create_dto.dart deleted file mode 100644 index e46f3fc8b6..0000000000 --- a/mobile/openapi/lib/model/tag_create_dto.dart +++ /dev/null @@ -1,122 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagCreateDto { - /// Returns a new [TagCreateDto] instance. - TagCreateDto({ - this.color = const Optional.absent(), - required this.name, - this.parentId = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - /// Tag name - String name; - - /// Parent tag ID - Optional parentId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagCreateDto && - other.color == color && - other.name == name && - other.parentId == parentId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode); - - @override - String toString() => 'TagCreateDto[color=$color, name=$name, parentId=$parentId]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - return json; - } - - /// Returns a new [TagCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagCreateDto? fromJson(dynamic value) { - upgradeDto(value, "TagCreateDto"); - if (value is Map) { - final json = value.cast(); - - return TagCreateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart deleted file mode 100644 index 79a89f6d33..0000000000 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagResponseDto { - /// Returns a new [TagResponseDto] instance. - TagResponseDto({ - this.color = const Optional.absent(), - required this.createdAt, - required this.id, - required this.name, - this.parentId = const Optional.absent(), - required this.updatedAt, - required this.value, - }); - - /// Tag color (hex) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional color; - - /// Creation date - DateTime createdAt; - - /// Tag ID - String id; - - /// Tag name - String name; - - /// Parent tag ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional parentId; - - /// Last update date - DateTime updatedAt; - - /// Tag value (full path) - String value; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagResponseDto && - other.color == color && - other.createdAt == createdAt && - other.id == id && - other.name == name && - other.parentId == parentId && - other.updatedAt == updatedAt && - other.value == value; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode) + - (createdAt.hashCode) + - (id.hashCode) + - (name.hashCode) + - (parentId == null ? 0 : parentId!.hashCode) + - (updatedAt.hashCode) + - (value.hashCode); - - @override - String toString() => 'TagResponseDto[color=$color, createdAt=$createdAt, id=$id, name=$name, parentId=$parentId, updatedAt=$updatedAt, value=$value]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - json[r'createdAt'] = this.createdAt.toUtc().toIso8601String(); - json[r'id'] = this.id; - json[r'name'] = this.name; - if (this.parentId.isPresent) { - final value = this.parentId.value; - json[r'parentId'] = value; - } - json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); - json[r'value'] = this.value; - return json; - } - - /// Returns a new [TagResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TagResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TagResponseDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - createdAt: mapDateTime(json, r'createdAt', r'')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - parentId: json.containsKey(r'parentId') ? Optional.present(mapValueOfType(json, r'parentId')) : const Optional.absent(), - updatedAt: mapDateTime(json, r'updatedAt', r'')!, - value: mapValueOfType(json, r'value')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'id', - 'name', - 'updatedAt', - 'value', - }; -} - diff --git a/mobile/openapi/lib/model/tag_update_dto.dart b/mobile/openapi/lib/model/tag_update_dto.dart deleted file mode 100644 index d66bb9097e..0000000000 --- a/mobile/openapi/lib/model/tag_update_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagUpdateDto { - /// Returns a new [TagUpdateDto] instance. - TagUpdateDto({ - this.color = const Optional.absent(), - }); - - /// Tag color (hex) - Optional color; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpdateDto && - other.color == color; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (color == null ? 0 : color!.hashCode); - - @override - String toString() => 'TagUpdateDto[color=$color]'; - - Map toJson() { - final json = {}; - if (this.color.isPresent) { - final value = this.color.value; - json[r'color'] = value; - } - return json; - } - - /// Returns a new [TagUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpdateDto( - color: json.containsKey(r'color') ? Optional.present(mapValueOfType(json, r'color')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/tag_upsert_dto.dart b/mobile/openapi/lib/model/tag_upsert_dto.dart deleted file mode 100644 index 3581ef1e8f..0000000000 --- a/mobile/openapi/lib/model/tag_upsert_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagUpsertDto { - /// Returns a new [TagUpsertDto] instance. - TagUpsertDto({ - this.tags = const [], - }); - - /// Tag names to upsert - List tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagUpsertDto && - _deepEquality.equals(other.tags, tags); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (tags.hashCode); - - @override - String toString() => 'TagUpsertDto[tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [TagUpsertDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagUpsertDto? fromJson(dynamic value) { - upgradeDto(value, "TagUpsertDto"); - if (value is Map) { - final json = value.cast(); - - return TagUpsertDto( - tags: json[r'tags'] is Iterable - ? (json[r'tags'] as Iterable).cast().toList(growable: false) - : const [], - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagUpsertDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagUpsertDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagUpsertDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagUpsertDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/tags_response.dart b/mobile/openapi/lib/model/tags_response.dart deleted file mode 100644 index 8a3ac17474..0000000000 --- a/mobile/openapi/lib/model/tags_response.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagsResponse { - /// Returns a new [TagsResponse] instance. - TagsResponse({ - required this.enabled, - required this.sidebarWeb, - }); - - /// Whether tags are enabled - bool enabled; - - /// Whether tags appear in web sidebar - bool sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsResponse && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled.hashCode) + - (sidebarWeb.hashCode); - - @override - String toString() => 'TagsResponse[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - json[r'enabled'] = this.enabled; - json[r'sidebarWeb'] = this.sidebarWeb; - return json; - } - - /// Returns a new [TagsResponse] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsResponse? fromJson(dynamic value) { - upgradeDto(value, "TagsResponse"); - if (value is Map) { - final json = value.cast(); - - return TagsResponse( - enabled: mapValueOfType(json, r'enabled')!, - sidebarWeb: mapValueOfType(json, r'sidebarWeb')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsResponse.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsResponse.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsResponse-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsResponse.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'enabled', - 'sidebarWeb', - }; -} - diff --git a/mobile/openapi/lib/model/tags_update.dart b/mobile/openapi/lib/model/tags_update.dart deleted file mode 100644 index 9a9e78f1d3..0000000000 --- a/mobile/openapi/lib/model/tags_update.dart +++ /dev/null @@ -1,125 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TagsUpdate { - /// Returns a new [TagsUpdate] instance. - TagsUpdate({ - this.enabled = const Optional.absent(), - this.sidebarWeb = const Optional.absent(), - }); - - /// Whether tags are enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Whether tags appear in web sidebar - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sidebarWeb; - - @override - bool operator ==(Object other) => identical(this, other) || other is TagsUpdate && - other.enabled == enabled && - other.sidebarWeb == sidebarWeb; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (enabled == null ? 0 : enabled!.hashCode) + - (sidebarWeb == null ? 0 : sidebarWeb!.hashCode); - - @override - String toString() => 'TagsUpdate[enabled=$enabled, sidebarWeb=$sidebarWeb]'; - - Map toJson() { - final json = {}; - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.sidebarWeb.isPresent) { - final value = this.sidebarWeb.value; - json[r'sidebarWeb'] = value; - } - return json; - } - - /// Returns a new [TagsUpdate] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TagsUpdate? fromJson(dynamic value) { - upgradeDto(value, "TagsUpdate"); - if (value is Map) { - final json = value.cast(); - - return TagsUpdate( - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - sidebarWeb: json.containsKey(r'sidebarWeb') ? Optional.present(mapValueOfType(json, r'sidebarWeb')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TagsUpdate.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TagsUpdate.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TagsUpdate-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TagsUpdate.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/template_dto.dart b/mobile/openapi/lib/model/template_dto.dart deleted file mode 100644 index b1eab848ed..0000000000 --- a/mobile/openapi/lib/model/template_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TemplateDto { - /// Returns a new [TemplateDto] instance. - TemplateDto({ - required this.template, - }); - - /// Template name - String template; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateDto && - other.template == template; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (template.hashCode); - - @override - String toString() => 'TemplateDto[template=$template]'; - - Map toJson() { - final json = {}; - json[r'template'] = this.template; - return json; - } - - /// Returns a new [TemplateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateDto( - template: mapValueOfType(json, r'template')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'template', - }; -} - diff --git a/mobile/openapi/lib/model/template_response_dto.dart b/mobile/openapi/lib/model/template_response_dto.dart deleted file mode 100644 index f19c1eae7d..0000000000 --- a/mobile/openapi/lib/model/template_response_dto.dart +++ /dev/null @@ -1,109 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TemplateResponseDto { - /// Returns a new [TemplateResponseDto] instance. - TemplateResponseDto({ - required this.html, - required this.name, - }); - - /// Template HTML content - String html; - - /// Template name - String name; - - @override - bool operator ==(Object other) => identical(this, other) || other is TemplateResponseDto && - other.html == html && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (html.hashCode) + - (name.hashCode); - - @override - String toString() => 'TemplateResponseDto[html=$html, name=$name]'; - - Map toJson() { - final json = {}; - json[r'html'] = this.html; - json[r'name'] = this.name; - return json; - } - - /// Returns a new [TemplateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TemplateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TemplateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TemplateResponseDto( - html: mapValueOfType(json, r'html')!, - name: mapValueOfType(json, r'name')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TemplateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TemplateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TemplateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TemplateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'html', - 'name', - }; -} - diff --git a/mobile/openapi/lib/model/test_email_response_dto.dart b/mobile/openapi/lib/model/test_email_response_dto.dart deleted file mode 100644 index e14783f3c4..0000000000 --- a/mobile/openapi/lib/model/test_email_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TestEmailResponseDto { - /// Returns a new [TestEmailResponseDto] instance. - TestEmailResponseDto({ - required this.messageId, - }); - - /// Email message ID - String messageId; - - @override - bool operator ==(Object other) => identical(this, other) || other is TestEmailResponseDto && - other.messageId == messageId; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (messageId.hashCode); - - @override - String toString() => 'TestEmailResponseDto[messageId=$messageId]'; - - Map toJson() { - final json = {}; - json[r'messageId'] = this.messageId; - return json; - } - - /// Returns a new [TestEmailResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TestEmailResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TestEmailResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TestEmailResponseDto( - messageId: mapValueOfType(json, r'messageId')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TestEmailResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TestEmailResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TestEmailResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TestEmailResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'messageId', - }; -} - diff --git a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart b/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart deleted file mode 100644 index 7662724070..0000000000 --- a/mobile/openapi/lib/model/time_bucket_asset_response_dto.dart +++ /dev/null @@ -1,310 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TimeBucketAssetResponseDto { - /// Returns a new [TimeBucketAssetResponseDto] instance. - TimeBucketAssetResponseDto({ - this.city = const Optional.present(const []), - this.country = const Optional.present(const []), - this.createdAt = const [], - this.duration = const [], - this.fileCreatedAt = const [], - this.id = const [], - this.isFavorite = const [], - this.isImage = const [], - this.isTrashed = const [], - this.latitude = const Optional.present(const []), - this.livePhotoVideoId = const [], - this.localOffsetHours = const [], - this.longitude = const Optional.present(const []), - this.ownerId = const [], - this.projectionType = const [], - this.ratio = const [], - this.stack = const Optional.present(const []), - this.thumbhash = const [], - this.visibility = const [], - }); - - /// Array of city names extracted from EXIF GPS data - Optional?> city; - - /// Array of country names extracted from EXIF GPS data - Optional?> country; - - /// Array of UTC timestamps when each asset was originally uploaded to Immich - List createdAt; - - /// Array of video/gif durations in milliseconds (null for static images) - List duration; - - /// Array of file creation timestamps in UTC - List fileCreatedAt; - - /// Array of asset IDs in the time bucket - List id; - - /// Array indicating whether each asset is favorited - List isFavorite; - - /// Array indicating whether each asset is an image (false for videos) - List isImage; - - /// Array indicating whether each asset is in the trash - List isTrashed; - - /// Array of latitude coordinates extracted from EXIF GPS data - Optional?> latitude; - - /// Array of live photo video asset IDs (null for non-live photos) - List livePhotoVideoId; - - /// Array of UTC offset hours at the time each photo was taken. Positive values are east of UTC, negative values are west of UTC. Values may be fractional (e.g., 5.5 for +05:30, -9.75 for -09:45). Applying this offset to 'fileCreatedAt' will give you the time the photo was taken from the photographer's perspective. - List localOffsetHours; - - /// Array of longitude coordinates extracted from EXIF GPS data - Optional?> longitude; - - /// Array of owner IDs for each asset - List ownerId; - - /// Array of projection types for 360° content (e.g., \"EQUIRECTANGULAR\", \"CUBEFACE\", \"CYLINDRICAL\") - List projectionType; - - /// Array of aspect ratios (width/height) for each asset - List ratio; - - /// Array of stack information as [stackId, assetCount] tuples (null for non-stacked assets) - Optional?>?> stack; - - /// Array of BlurHash strings for generating asset previews (base64 encoded) - List thumbhash; - - /// Array of visibility statuses for each asset (e.g., ARCHIVE, TIMELINE, HIDDEN, LOCKED) - List visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketAssetResponseDto && - _deepEquality.equals(other.city, city) && - _deepEquality.equals(other.country, country) && - _deepEquality.equals(other.createdAt, createdAt) && - _deepEquality.equals(other.duration, duration) && - _deepEquality.equals(other.fileCreatedAt, fileCreatedAt) && - _deepEquality.equals(other.id, id) && - _deepEquality.equals(other.isFavorite, isFavorite) && - _deepEquality.equals(other.isImage, isImage) && - _deepEquality.equals(other.isTrashed, isTrashed) && - _deepEquality.equals(other.latitude, latitude) && - _deepEquality.equals(other.livePhotoVideoId, livePhotoVideoId) && - _deepEquality.equals(other.localOffsetHours, localOffsetHours) && - _deepEquality.equals(other.longitude, longitude) && - _deepEquality.equals(other.ownerId, ownerId) && - _deepEquality.equals(other.projectionType, projectionType) && - _deepEquality.equals(other.ratio, ratio) && - _deepEquality.equals(other.stack, stack) && - _deepEquality.equals(other.thumbhash, thumbhash) && - _deepEquality.equals(other.visibility, visibility); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (city.hashCode) + - (country.hashCode) + - (createdAt.hashCode) + - (duration.hashCode) + - (fileCreatedAt.hashCode) + - (id.hashCode) + - (isFavorite.hashCode) + - (isImage.hashCode) + - (isTrashed.hashCode) + - (latitude.hashCode) + - (livePhotoVideoId.hashCode) + - (localOffsetHours.hashCode) + - (longitude.hashCode) + - (ownerId.hashCode) + - (projectionType.hashCode) + - (ratio.hashCode) + - (stack.hashCode) + - (thumbhash.hashCode) + - (visibility.hashCode); - - @override - String toString() => 'TimeBucketAssetResponseDto[city=$city, country=$country, createdAt=$createdAt, duration=$duration, fileCreatedAt=$fileCreatedAt, id=$id, isFavorite=$isFavorite, isImage=$isImage, isTrashed=$isTrashed, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, localOffsetHours=$localOffsetHours, longitude=$longitude, ownerId=$ownerId, projectionType=$projectionType, ratio=$ratio, stack=$stack, thumbhash=$thumbhash, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.city.isPresent) { - final value = this.city.value; - json[r'city'] = value; - } - if (this.country.isPresent) { - final value = this.country.value; - json[r'country'] = value; - } - json[r'createdAt'] = this.createdAt; - json[r'duration'] = this.duration; - json[r'fileCreatedAt'] = this.fileCreatedAt; - json[r'id'] = this.id; - json[r'isFavorite'] = this.isFavorite; - json[r'isImage'] = this.isImage; - json[r'isTrashed'] = this.isTrashed; - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - json[r'livePhotoVideoId'] = this.livePhotoVideoId; - json[r'localOffsetHours'] = this.localOffsetHours; - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - json[r'ownerId'] = this.ownerId; - json[r'projectionType'] = this.projectionType; - json[r'ratio'] = this.ratio; - if (this.stack.isPresent) { - final value = this.stack.value; - json[r'stack'] = value; - } - json[r'thumbhash'] = this.thumbhash; - json[r'visibility'] = this.visibility; - return json; - } - - /// Returns a new [TimeBucketAssetResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketAssetResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketAssetResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketAssetResponseDto( - city: json.containsKey(r'city') ? Optional.present(json[r'city'] is Iterable - ? (json[r'city'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - country: json.containsKey(r'country') ? Optional.present(json[r'country'] is Iterable - ? (json[r'country'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - createdAt: json[r'createdAt'] is Iterable - ? (json[r'createdAt'] as Iterable).cast().toList(growable: false) - : const [], - duration: json[r'duration'] is Iterable - ? (json[r'duration'] as Iterable).cast().toList(growable: false) - : const [], - fileCreatedAt: json[r'fileCreatedAt'] is Iterable - ? (json[r'fileCreatedAt'] as Iterable).cast().toList(growable: false) - : const [], - id: json[r'id'] is Iterable - ? (json[r'id'] as Iterable).cast().toList(growable: false) - : const [], - isFavorite: json[r'isFavorite'] is Iterable - ? (json[r'isFavorite'] as Iterable).cast().toList(growable: false) - : const [], - isImage: json[r'isImage'] is Iterable - ? (json[r'isImage'] as Iterable).cast().toList(growable: false) - : const [], - isTrashed: json[r'isTrashed'] is Iterable - ? (json[r'isTrashed'] as Iterable).cast().toList(growable: false) - : const [], - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] is Iterable - ? (json[r'latitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - livePhotoVideoId: json[r'livePhotoVideoId'] is Iterable - ? (json[r'livePhotoVideoId'] as Iterable).cast().toList(growable: false) - : const [], - localOffsetHours: json[r'localOffsetHours'] is Iterable - ? (json[r'localOffsetHours'] as Iterable).cast().toList(growable: false) - : const [], - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] is Iterable - ? (json[r'longitude'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ownerId: json[r'ownerId'] is Iterable - ? (json[r'ownerId'] as Iterable).cast().toList(growable: false) - : const [], - projectionType: json[r'projectionType'] is Iterable - ? (json[r'projectionType'] as Iterable).cast().toList(growable: false) - : const [], - ratio: json[r'ratio'] is Iterable - ? (json[r'ratio'] as Iterable).cast().toList(growable: false) - : const [], - stack: json.containsKey(r'stack') ? Optional.present(json[r'stack'] is List - ? (json[r'stack'] as List).map((e) => - e == null ? null : (e as List).map((value) => value as String).toList(growable: false) - ).toList() - : const []) : const Optional.absent(), - thumbhash: json[r'thumbhash'] is Iterable - ? (json[r'thumbhash'] as Iterable).cast().toList(growable: false) - : const [], - visibility: AssetVisibility.listFromJson(json[r'visibility']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketAssetResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketAssetResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketAssetResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketAssetResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'duration', - 'fileCreatedAt', - 'id', - 'isFavorite', - 'isImage', - 'isTrashed', - 'livePhotoVideoId', - 'localOffsetHours', - 'ownerId', - 'projectionType', - 'ratio', - 'thumbhash', - 'visibility', - }; -} - diff --git a/mobile/openapi/lib/model/time_buckets_response_dto.dart b/mobile/openapi/lib/model/time_buckets_response_dto.dart deleted file mode 100644 index 8b8da1d37a..0000000000 --- a/mobile/openapi/lib/model/time_buckets_response_dto.dart +++ /dev/null @@ -1,112 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TimeBucketsResponseDto { - /// Returns a new [TimeBucketsResponseDto] instance. - TimeBucketsResponseDto({ - required this.count, - required this.timeBucket, - }); - - /// Number of assets in this time bucket - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - /// Time bucket identifier in YYYY-MM-DD format representing the start of the time period - String timeBucket; - - @override - bool operator ==(Object other) => identical(this, other) || other is TimeBucketsResponseDto && - other.count == count && - other.timeBucket == timeBucket; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode) + - (timeBucket.hashCode); - - @override - String toString() => 'TimeBucketsResponseDto[count=$count, timeBucket=$timeBucket]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - json[r'timeBucket'] = this.timeBucket; - return json; - } - - /// Returns a new [TimeBucketsResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TimeBucketsResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TimeBucketsResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TimeBucketsResponseDto( - count: mapValueOfType(json, r'count')!, - timeBucket: mapValueOfType(json, r'timeBucket')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TimeBucketsResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TimeBucketsResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TimeBucketsResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TimeBucketsResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - 'timeBucket', - }; -} - diff --git a/mobile/openapi/lib/model/tone_mapping.dart b/mobile/openapi/lib/model/tone_mapping.dart deleted file mode 100644 index 73f7773334..0000000000 --- a/mobile/openapi/lib/model/tone_mapping.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Tone mapping -enum ToneMapping { - hable._(r'hable'), - mobius._(r'mobius'), - reinhard._(r'reinhard'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const ToneMapping._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [ToneMapping] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static ToneMapping? fromJson(dynamic value) => ToneMappingTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [ToneMapping] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ToneMapping.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [ToneMapping] to String, -/// and [decode] dynamic data back to [ToneMapping]. -class ToneMappingTypeTransformer { - factory ToneMappingTypeTransformer() => _instance ??= const ToneMappingTypeTransformer._(); - - const ToneMappingTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(ToneMapping data) => data._value; - - /// Returns the instance of [ToneMapping] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - ToneMapping? decode(dynamic data, {bool allowNull = true}) { - if (data is ToneMapping) { - return data; - } - if (data != null) { - switch (data) { - case r'hable': return ToneMapping.hable; - case r'mobius': return ToneMapping.mobius; - case r'reinhard': return ToneMapping.reinhard; - case r'disabled': return ToneMapping.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static ToneMappingTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_hw_accel.dart b/mobile/openapi/lib/model/transcode_hw_accel.dart deleted file mode 100644 index f4b6393d43..0000000000 --- a/mobile/openapi/lib/model/transcode_hw_accel.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Transcode hardware acceleration -enum TranscodeHWAccel { - nvenc._(r'nvenc'), - qsv._(r'qsv'), - vaapi._(r'vaapi'), - rkmpp._(r'rkmpp'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const TranscodeHWAccel._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [TranscodeHWAccel] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static TranscodeHWAccel? fromJson(dynamic value) => TranscodeHWAccelTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [TranscodeHWAccel] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TranscodeHWAccel.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodeHWAccel] to String, -/// and [decode] dynamic data back to [TranscodeHWAccel]. -class TranscodeHWAccelTypeTransformer { - factory TranscodeHWAccelTypeTransformer() => _instance ??= const TranscodeHWAccelTypeTransformer._(); - - const TranscodeHWAccelTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(TranscodeHWAccel data) => data._value; - - /// Returns the instance of [TranscodeHWAccel] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - TranscodeHWAccel? decode(dynamic data, {bool allowNull = true}) { - if (data is TranscodeHWAccel) { - return data; - } - if (data != null) { - switch (data) { - case r'nvenc': return TranscodeHWAccel.nvenc; - case r'qsv': return TranscodeHWAccel.qsv; - case r'vaapi': return TranscodeHWAccel.vaapi; - case r'rkmpp': return TranscodeHWAccel.rkmpp; - case r'disabled': return TranscodeHWAccel.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static TranscodeHWAccelTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/transcode_policy.dart b/mobile/openapi/lib/model/transcode_policy.dart deleted file mode 100644 index 8784ab7bf8..0000000000 --- a/mobile/openapi/lib/model/transcode_policy.dart +++ /dev/null @@ -1,96 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Transcode policy -enum TranscodePolicy { - all._(r'all'), - optimal._(r'optimal'), - bitrate._(r'bitrate'), - required_._(r'required'), - disabled._(r'disabled'), - ; - - /// Instantiate a new enum with the provided value. - const TranscodePolicy._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [TranscodePolicy] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static TranscodePolicy? fromJson(dynamic value) => TranscodePolicyTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [TranscodePolicy] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TranscodePolicy.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [TranscodePolicy] to String, -/// and [decode] dynamic data back to [TranscodePolicy]. -class TranscodePolicyTypeTransformer { - factory TranscodePolicyTypeTransformer() => _instance ??= const TranscodePolicyTypeTransformer._(); - - const TranscodePolicyTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(TranscodePolicy data) => data._value; - - /// Returns the instance of [TranscodePolicy] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - TranscodePolicy? decode(dynamic data, {bool allowNull = true}) { - if (data is TranscodePolicy) { - return data; - } - if (data != null) { - switch (data) { - case r'all': return TranscodePolicy.all; - case r'optimal': return TranscodePolicy.optimal; - case r'bitrate': return TranscodePolicy.bitrate; - case r'required': return TranscodePolicy.required_; - case r'disabled': return TranscodePolicy.disabled; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static TranscodePolicyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/trash_response_dto.dart b/mobile/openapi/lib/model/trash_response_dto.dart deleted file mode 100644 index 7b43d9ceb7..0000000000 --- a/mobile/openapi/lib/model/trash_response_dto.dart +++ /dev/null @@ -1,103 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class TrashResponseDto { - /// Returns a new [TrashResponseDto] instance. - TrashResponseDto({ - required this.count, - }); - - /// Number of items in trash - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int count; - - @override - bool operator ==(Object other) => identical(this, other) || other is TrashResponseDto && - other.count == count; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (count.hashCode); - - @override - String toString() => 'TrashResponseDto[count=$count]'; - - Map toJson() { - final json = {}; - json[r'count'] = this.count; - return json; - } - - /// Returns a new [TrashResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static TrashResponseDto? fromJson(dynamic value) { - upgradeDto(value, "TrashResponseDto"); - if (value is Map) { - final json = value.cast(); - - return TrashResponseDto( - count: mapValueOfType(json, r'count')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = TrashResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = TrashResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of TrashResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = TrashResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'count', - }; -} - diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart deleted file mode 100644 index 8995a69656..0000000000 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ /dev/null @@ -1,175 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAlbumDto { - /// Returns a new [UpdateAlbumDto] instance. - UpdateAlbumDto({ - this.albumName = const Optional.absent(), - this.albumThumbnailAssetId = const Optional.absent(), - this.description = const Optional.absent(), - this.isActivityEnabled = const Optional.absent(), - this.order = const Optional.absent(), - }); - - /// Album name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumName; - - /// Album thumbnail asset ID - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albumThumbnailAssetId; - - /// Album description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Enable activity feed - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isActivityEnabled; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional order; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumDto && - other.albumName == albumName && - other.albumThumbnailAssetId == albumThumbnailAssetId && - other.description == description && - other.isActivityEnabled == isActivityEnabled && - other.order == order; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albumName == null ? 0 : albumName!.hashCode) + - (albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isActivityEnabled == null ? 0 : isActivityEnabled!.hashCode) + - (order == null ? 0 : order!.hashCode); - - @override - String toString() => 'UpdateAlbumDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, description=$description, isActivityEnabled=$isActivityEnabled, order=$order]'; - - Map toJson() { - final json = {}; - if (this.albumName.isPresent) { - final value = this.albumName.value; - json[r'albumName'] = value; - } - if (this.albumThumbnailAssetId.isPresent) { - final value = this.albumThumbnailAssetId.value; - json[r'albumThumbnailAssetId'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isActivityEnabled.isPresent) { - final value = this.isActivityEnabled.value; - json[r'isActivityEnabled'] = value; - } - if (this.order.isPresent) { - final value = this.order.value; - json[r'order'] = value; - } - return json; - } - - /// Returns a new [UpdateAlbumDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumDto( - albumName: json.containsKey(r'albumName') ? Optional.present(mapValueOfType(json, r'albumName')) : const Optional.absent(), - albumThumbnailAssetId: json.containsKey(r'albumThumbnailAssetId') ? Optional.present(mapValueOfType(json, r'albumThumbnailAssetId')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isActivityEnabled: json.containsKey(r'isActivityEnabled') ? Optional.present(mapValueOfType(json, r'isActivityEnabled')) : const Optional.absent(), - order: json.containsKey(r'order') ? Optional.present(AssetOrder.fromJson(json[r'order'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_album_user_dto.dart b/mobile/openapi/lib/model/update_album_user_dto.dart deleted file mode 100644 index 43218cae6e..0000000000 --- a/mobile/openapi/lib/model/update_album_user_dto.dart +++ /dev/null @@ -1,99 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAlbumUserDto { - /// Returns a new [UpdateAlbumUserDto] instance. - UpdateAlbumUserDto({ - required this.role, - }); - - AlbumUserRole role; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumUserDto && - other.role == role; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (role.hashCode); - - @override - String toString() => 'UpdateAlbumUserDto[role=$role]'; - - Map toJson() { - final json = {}; - json[r'role'] = this.role; - return json; - } - - /// Returns a new [UpdateAlbumUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAlbumUserDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAlbumUserDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAlbumUserDto( - role: AlbumUserRole.fromJson(json[r'role'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAlbumUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAlbumUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAlbumUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAlbumUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'role', - }; -} - diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart deleted file mode 100644 index 1958e36963..0000000000 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ /dev/null @@ -1,223 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateAssetDto { - /// Returns a new [UpdateAssetDto] instance. - UpdateAssetDto({ - this.dateTimeOriginal = const Optional.absent(), - this.description = const Optional.absent(), - this.isFavorite = const Optional.absent(), - this.latitude = const Optional.absent(), - this.livePhotoVideoId = const Optional.absent(), - this.longitude = const Optional.absent(), - this.rating = const Optional.absent(), - this.visibility = const Optional.absent(), - }); - - /// Original date and time - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional dateTimeOriginal; - - /// Asset description - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional description; - - /// Mark as favorite - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isFavorite; - - /// Latitude coordinate - /// - /// Minimum value: -90 - /// Maximum value: 90 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional latitude; - - /// Live photo video ID - Optional livePhotoVideoId; - - /// Longitude coordinate - /// - /// Minimum value: -180 - /// Maximum value: 180 - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional longitude; - - /// Rating in range [1-5] (starred), -1 (rejected), or null (unrated) - /// - /// Minimum value: -1 - /// Maximum value: 5 - Optional rating; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional visibility; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateAssetDto && - other.dateTimeOriginal == dateTimeOriginal && - other.description == description && - other.isFavorite == isFavorite && - other.latitude == latitude && - other.livePhotoVideoId == livePhotoVideoId && - other.longitude == longitude && - other.rating == rating && - other.visibility == visibility; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) + - (description == null ? 0 : description!.hashCode) + - (isFavorite == null ? 0 : isFavorite!.hashCode) + - (latitude == null ? 0 : latitude!.hashCode) + - (livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) + - (longitude == null ? 0 : longitude!.hashCode) + - (rating == null ? 0 : rating!.hashCode) + - (visibility == null ? 0 : visibility!.hashCode); - - @override - String toString() => 'UpdateAssetDto[dateTimeOriginal=$dateTimeOriginal, description=$description, isFavorite=$isFavorite, latitude=$latitude, livePhotoVideoId=$livePhotoVideoId, longitude=$longitude, rating=$rating, visibility=$visibility]'; - - Map toJson() { - final json = {}; - if (this.dateTimeOriginal.isPresent) { - final value = this.dateTimeOriginal.value; - json[r'dateTimeOriginal'] = value; - } - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.isFavorite.isPresent) { - final value = this.isFavorite.value; - json[r'isFavorite'] = value; - } - if (this.latitude.isPresent) { - final value = this.latitude.value; - json[r'latitude'] = value; - } - if (this.livePhotoVideoId.isPresent) { - final value = this.livePhotoVideoId.value; - json[r'livePhotoVideoId'] = value; - } - if (this.longitude.isPresent) { - final value = this.longitude.value; - json[r'longitude'] = value; - } - if (this.rating.isPresent) { - final value = this.rating.value; - json[r'rating'] = value; - } - if (this.visibility.isPresent) { - final value = this.visibility.value; - json[r'visibility'] = value; - } - return json; - } - - /// Returns a new [UpdateAssetDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateAssetDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateAssetDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateAssetDto( - dateTimeOriginal: json.containsKey(r'dateTimeOriginal') ? Optional.present(mapValueOfType(json, r'dateTimeOriginal')) : const Optional.absent(), - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - isFavorite: json.containsKey(r'isFavorite') ? Optional.present(mapValueOfType(json, r'isFavorite')) : const Optional.absent(), - latitude: json.containsKey(r'latitude') ? Optional.present(json[r'latitude'] == null ? null : num.parse('${json[r'latitude']}')) : const Optional.absent(), - livePhotoVideoId: json.containsKey(r'livePhotoVideoId') ? Optional.present(mapValueOfType(json, r'livePhotoVideoId')) : const Optional.absent(), - longitude: json.containsKey(r'longitude') ? Optional.present(json[r'longitude'] == null ? null : num.parse('${json[r'longitude']}')) : const Optional.absent(), - rating: json.containsKey(r'rating') ? Optional.present(json[r'rating'] == null ? null : int.parse('${json[r'rating']}')) : const Optional.absent(), - visibility: json.containsKey(r'visibility') ? Optional.present(AssetVisibility.fromJson(json[r'visibility'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateAssetDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateAssetDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateAssetDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateAssetDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/update_library_dto.dart b/mobile/openapi/lib/model/update_library_dto.dart deleted file mode 100644 index 44aa042f35..0000000000 --- a/mobile/openapi/lib/model/update_library_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UpdateLibraryDto { - /// Returns a new [UpdateLibraryDto] instance. - UpdateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - this.name = const Optional.absent(), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths (max 128) - Optional?> importPaths; - - /// Library name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - @override - bool operator ==(Object other) => identical(this, other) || other is UpdateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths) && - other.name == name; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode) + - (name == null ? 0 : name!.hashCode); - - @override - String toString() => 'UpdateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths, name=$name]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - return json; - } - - /// Returns a new [UpdateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UpdateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "UpdateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return UpdateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UpdateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UpdateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UpdateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UpdateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart deleted file mode 100644 index fbf2cc02e4..0000000000 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ /dev/null @@ -1,185 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UsageByUserDto { - /// Returns a new [UsageByUserDto] instance. - UsageByUserDto({ - required this.photos, - required this.quotaSizeInBytes, - required this.usage, - required this.usagePhotos, - required this.usageVideos, - required this.userId, - required this.userName, - required this.videos, - }); - - /// Number of photos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int photos; - - /// User quota size in bytes (null if unlimited) - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Total storage usage in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usage; - - /// Storage usage for photos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usagePhotos; - - /// Storage usage for videos in bytes - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int usageVideos; - - /// User ID - String userId; - - /// User name - String userName; - - /// Number of videos - /// - /// Minimum value: -9007199254740991 - /// Maximum value: 9007199254740991 - int videos; - - @override - bool operator ==(Object other) => identical(this, other) || other is UsageByUserDto && - other.photos == photos && - other.quotaSizeInBytes == quotaSizeInBytes && - other.usage == usage && - other.usagePhotos == usagePhotos && - other.usageVideos == usageVideos && - other.userId == userId && - other.userName == userName && - other.videos == videos; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (photos.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (usage.hashCode) + - (usagePhotos.hashCode) + - (usageVideos.hashCode) + - (userId.hashCode) + - (userName.hashCode) + - (videos.hashCode); - - @override - String toString() => 'UsageByUserDto[photos=$photos, quotaSizeInBytes=$quotaSizeInBytes, usage=$usage, usagePhotos=$usagePhotos, usageVideos=$usageVideos, userId=$userId, userName=$userName, videos=$videos]'; - - Map toJson() { - final json = {}; - json[r'photos'] = this.photos; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - json[r'usage'] = this.usage; - json[r'usagePhotos'] = this.usagePhotos; - json[r'usageVideos'] = this.usageVideos; - json[r'userId'] = this.userId; - json[r'userName'] = this.userName; - json[r'videos'] = this.videos; - return json; - } - - /// Returns a new [UsageByUserDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UsageByUserDto? fromJson(dynamic value) { - upgradeDto(value, "UsageByUserDto"); - if (value is Map) { - final json = value.cast(); - - return UsageByUserDto( - photos: mapValueOfType(json, r'photos')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - usage: mapValueOfType(json, r'usage')!, - usagePhotos: mapValueOfType(json, r'usagePhotos')!, - usageVideos: mapValueOfType(json, r'usageVideos')!, - userId: mapValueOfType(json, r'userId')!, - userName: mapValueOfType(json, r'userName')!, - videos: mapValueOfType(json, r'videos')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UsageByUserDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UsageByUserDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UsageByUserDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UsageByUserDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'photos', - 'quotaSizeInBytes', - 'usage', - 'usagePhotos', - 'usageVideos', - 'userId', - 'userName', - 'videos', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_create_dto.dart b/mobile/openapi/lib/model/user_admin_create_dto.dart deleted file mode 100644 index 8ed867c2cf..0000000000 --- a/mobile/openapi/lib/model/user_admin_create_dto.dart +++ /dev/null @@ -1,215 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminCreateDto { - /// Returns a new [UserAdminCreateDto] instance. - UserAdminCreateDto({ - this.avatarColor = const Optional.absent(), - required this.email, - this.isAdmin = const Optional.absent(), - required this.name, - this.notify = const Optional.absent(), - required this.password, - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - String email; - - /// Grant admin privileges - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isAdmin; - - /// User name - String name; - - /// Send notification email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional notify; - - /// User password - String password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminCreateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.notify == notify && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name.hashCode) + - (notify == null ? 0 : notify!.hashCode) + - (password.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminCreateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, notify=$notify, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - json[r'email'] = this.email; - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - json[r'name'] = this.name; - if (this.notify.isPresent) { - final value = this.notify.value; - json[r'notify'] = value; - } - json[r'password'] = this.password; - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminCreateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminCreateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminCreateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: mapValueOfType(json, r'email')!, - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: mapValueOfType(json, r'name')!, - notify: json.containsKey(r'notify') ? Optional.present(mapValueOfType(json, r'notify')) : const Optional.absent(), - password: mapValueOfType(json, r'password')!, - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'email', - 'name', - 'password', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_delete_dto.dart b/mobile/openapi/lib/model/user_admin_delete_dto.dart deleted file mode 100644 index 8d7ab73076..0000000000 --- a/mobile/openapi/lib/model/user_admin_delete_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminDeleteDto { - /// Returns a new [UserAdminDeleteDto] instance. - UserAdminDeleteDto({ - this.force = const Optional.absent(), - }); - - /// Force delete even if user has assets - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional force; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminDeleteDto && - other.force == force; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (force == null ? 0 : force!.hashCode); - - @override - String toString() => 'UserAdminDeleteDto[force=$force]'; - - Map toJson() { - final json = {}; - if (this.force.isPresent) { - final value = this.force.value; - json[r'force'] = value; - } - return json; - } - - /// Returns a new [UserAdminDeleteDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminDeleteDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminDeleteDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminDeleteDto( - force: json.containsKey(r'force') ? Optional.present(mapValueOfType(json, r'force')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminDeleteDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminDeleteDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminDeleteDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminDeleteDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_response_dto.dart b/mobile/openapi/lib/model/user_admin_response_dto.dart deleted file mode 100644 index c8499ab0dd..0000000000 --- a/mobile/openapi/lib/model/user_admin_response_dto.dart +++ /dev/null @@ -1,273 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminResponseDto { - /// Returns a new [UserAdminResponseDto] instance. - UserAdminResponseDto({ - required this.avatarColor, - required this.createdAt, - required this.deletedAt, - required this.email, - required this.id, - required this.isAdmin, - required this.license, - required this.name, - required this.oauthId, - required this.profileChangedAt, - required this.profileImagePath, - required this.quotaSizeInBytes, - required this.quotaUsageInBytes, - required this.shouldChangePassword, - required this.status, - required this.storageLabel, - required this.updatedAt, - }); - - UserAvatarColor avatarColor; - - /// Creation date - DateTime createdAt; - - /// Deletion date - DateTime? deletedAt; - - /// User email - String email; - - /// User ID - String id; - - /// Is admin user - bool isAdmin; - - UserLicense? license; - - /// User name - String name; - - /// OAuth ID - String oauthId; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaSizeInBytes; - - /// Storage usage in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - int? quotaUsageInBytes; - - /// Require password change on next login - bool shouldChangePassword; - - UserStatus status; - - /// Storage label - String? storageLabel; - - /// Last update date - DateTime updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminResponseDto && - other.avatarColor == avatarColor && - other.createdAt == createdAt && - other.deletedAt == deletedAt && - other.email == email && - other.id == id && - other.isAdmin == isAdmin && - other.license == license && - other.name == name && - other.oauthId == oauthId && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath && - other.quotaSizeInBytes == quotaSizeInBytes && - other.quotaUsageInBytes == quotaUsageInBytes && - other.shouldChangePassword == shouldChangePassword && - other.status == status && - other.storageLabel == storageLabel && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (createdAt.hashCode) + - (deletedAt == null ? 0 : deletedAt!.hashCode) + - (email.hashCode) + - (id.hashCode) + - (isAdmin.hashCode) + - (license == null ? 0 : license!.hashCode) + - (name.hashCode) + - (oauthId.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (quotaUsageInBytes == null ? 0 : quotaUsageInBytes!.hashCode) + - (shouldChangePassword.hashCode) + - (status.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'UserAdminResponseDto[avatarColor=$avatarColor, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, id=$id, isAdmin=$isAdmin, license=$license, name=$name, oauthId=$oauthId, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath, quotaSizeInBytes=$quotaSizeInBytes, quotaUsageInBytes=$quotaUsageInBytes, shouldChangePassword=$shouldChangePassword, status=$status, storageLabel=$storageLabel, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.createdAt.millisecondsSinceEpoch - : this.createdAt.toUtc().toIso8601String(); - if (this.deletedAt != null) { - json[r'deletedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.deletedAt!.millisecondsSinceEpoch - : this.deletedAt!.toUtc().toIso8601String(); - } else { - json[r'deletedAt'] = null; - } - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'isAdmin'] = this.isAdmin; - if (this.license != null) { - json[r'license'] = this.license; - } else { - json[r'license'] = null; - } - json[r'name'] = this.name; - json[r'oauthId'] = this.oauthId; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - if (this.quotaSizeInBytes != null) { - json[r'quotaSizeInBytes'] = this.quotaSizeInBytes; - } else { - json[r'quotaSizeInBytes'] = null; - } - if (this.quotaUsageInBytes != null) { - json[r'quotaUsageInBytes'] = this.quotaUsageInBytes; - } else { - json[r'quotaUsageInBytes'] = null; - } - json[r'shouldChangePassword'] = this.shouldChangePassword; - json[r'status'] = this.status; - if (this.storageLabel != null) { - json[r'storageLabel'] = this.storageLabel; - } else { - json[r'storageLabel'] = null; - } - json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.updatedAt.millisecondsSinceEpoch - : this.updatedAt.toUtc().toIso8601String(); - return json; - } - - /// Returns a new [UserAdminResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - deletedAt: mapDateTime(json, r'deletedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/'), - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - isAdmin: mapValueOfType(json, r'isAdmin')!, - license: UserLicense.fromJson(json[r'license']), - name: mapValueOfType(json, r'name')!, - oauthId: mapValueOfType(json, r'oauthId')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - quotaSizeInBytes: mapValueOfType(json, r'quotaSizeInBytes'), - quotaUsageInBytes: mapValueOfType(json, r'quotaUsageInBytes'), - shouldChangePassword: mapValueOfType(json, r'shouldChangePassword')!, - status: UserStatus.fromJson(json[r'status'])!, - storageLabel: mapValueOfType(json, r'storageLabel'), - updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'createdAt', - 'deletedAt', - 'email', - 'id', - 'isAdmin', - 'license', - 'name', - 'oauthId', - 'profileChangedAt', - 'profileImagePath', - 'quotaSizeInBytes', - 'quotaUsageInBytes', - 'shouldChangePassword', - 'status', - 'storageLabel', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/user_admin_update_dto.dart b/mobile/openapi/lib/model/user_admin_update_dto.dart deleted file mode 100644 index f1b91d8e61..0000000000 --- a/mobile/openapi/lib/model/user_admin_update_dto.dart +++ /dev/null @@ -1,222 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserAdminUpdateDto { - /// Returns a new [UserAdminUpdateDto] instance. - UserAdminUpdateDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.isAdmin = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - this.pinCode = const Optional.absent(), - this.quotaSizeInBytes = const Optional.absent(), - this.shouldChangePassword = const Optional.absent(), - this.storageLabel = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional email; - - /// Grant admin privileges - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional isAdmin; - - /// User name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// User password - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - /// PIN code - Optional pinCode; - - /// Storage quota in bytes - /// - /// Minimum value: 0 - /// Maximum value: 9007199254740991 - Optional quotaSizeInBytes; - - /// Require password change on next login - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional shouldChangePassword; - - /// Storage label - Optional storageLabel; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserAdminUpdateDto && - other.avatarColor == avatarColor && - other.email == email && - other.isAdmin == isAdmin && - other.name == name && - other.password == password && - other.pinCode == pinCode && - other.quotaSizeInBytes == quotaSizeInBytes && - other.shouldChangePassword == shouldChangePassword && - other.storageLabel == storageLabel; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (isAdmin == null ? 0 : isAdmin!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode) + - (pinCode == null ? 0 : pinCode!.hashCode) + - (quotaSizeInBytes == null ? 0 : quotaSizeInBytes!.hashCode) + - (shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) + - (storageLabel == null ? 0 : storageLabel!.hashCode); - - @override - String toString() => 'UserAdminUpdateDto[avatarColor=$avatarColor, email=$email, isAdmin=$isAdmin, name=$name, password=$password, pinCode=$pinCode, quotaSizeInBytes=$quotaSizeInBytes, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.isAdmin.isPresent) { - final value = this.isAdmin.value; - json[r'isAdmin'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - if (this.pinCode.isPresent) { - final value = this.pinCode.value; - json[r'pinCode'] = value; - } - if (this.quotaSizeInBytes.isPresent) { - final value = this.quotaSizeInBytes.value; - json[r'quotaSizeInBytes'] = value; - } - if (this.shouldChangePassword.isPresent) { - final value = this.shouldChangePassword.value; - json[r'shouldChangePassword'] = value; - } - if (this.storageLabel.isPresent) { - final value = this.storageLabel.value; - json[r'storageLabel'] = value; - } - return json; - } - - /// Returns a new [UserAdminUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserAdminUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserAdminUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserAdminUpdateDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - isAdmin: json.containsKey(r'isAdmin') ? Optional.present(mapValueOfType(json, r'isAdmin')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - pinCode: json.containsKey(r'pinCode') ? Optional.present(mapValueOfType(json, r'pinCode')) : const Optional.absent(), - quotaSizeInBytes: json.containsKey(r'quotaSizeInBytes') ? Optional.present(json[r'quotaSizeInBytes'] == null ? null : int.parse('${json[r'quotaSizeInBytes']}')) : const Optional.absent(), - shouldChangePassword: json.containsKey(r'shouldChangePassword') ? Optional.present(mapValueOfType(json, r'shouldChangePassword')) : const Optional.absent(), - storageLabel: json.containsKey(r'storageLabel') ? Optional.present(mapValueOfType(json, r'storageLabel')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAdminUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserAdminUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserAdminUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserAdminUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_avatar_color.dart b/mobile/openapi/lib/model/user_avatar_color.dart deleted file mode 100644 index d79818673f..0000000000 --- a/mobile/openapi/lib/model/user_avatar_color.dart +++ /dev/null @@ -1,106 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User avatar color -enum UserAvatarColor { - primary._(r'primary'), - pink._(r'pink'), - red._(r'red'), - yellow._(r'yellow'), - blue._(r'blue'), - green._(r'green'), - purple._(r'purple'), - orange._(r'orange'), - gray._(r'gray'), - amber._(r'amber'), - ; - - /// Instantiate a new enum with the provided value. - const UserAvatarColor._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserAvatarColor] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserAvatarColor? fromJson(dynamic value) => UserAvatarColorTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserAvatarColor] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserAvatarColor.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserAvatarColor] to String, -/// and [decode] dynamic data back to [UserAvatarColor]. -class UserAvatarColorTypeTransformer { - factory UserAvatarColorTypeTransformer() => _instance ??= const UserAvatarColorTypeTransformer._(); - - const UserAvatarColorTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserAvatarColor data) => data._value; - - /// Returns the instance of [UserAvatarColor] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserAvatarColor? decode(dynamic data, {bool allowNull = true}) { - if (data is UserAvatarColor) { - return data; - } - if (data != null) { - switch (data) { - case r'primary': return UserAvatarColor.primary; - case r'pink': return UserAvatarColor.pink; - case r'red': return UserAvatarColor.red; - case r'yellow': return UserAvatarColor.yellow; - case r'blue': return UserAvatarColor.blue; - case r'green': return UserAvatarColor.green; - case r'purple': return UserAvatarColor.purple; - case r'orange': return UserAvatarColor.orange; - case r'gray': return UserAvatarColor.gray; - case r'amber': return UserAvatarColor.amber; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserAvatarColorTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_license.dart b/mobile/openapi/lib/model/user_license.dart deleted file mode 100644 index 87f5bd74da..0000000000 --- a/mobile/openapi/lib/model/user_license.dart +++ /dev/null @@ -1,120 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserLicense { - /// Returns a new [UserLicense] instance. - UserLicense({ - required this.activatedAt, - required this.activationKey, - required this.licenseKey, - }); - - /// Activation date - DateTime activatedAt; - - /// Activation key - String activationKey; - - /// License key (format: /^IM(SV|CL)(-[\\dA-Za-z]{4}){8}$/) - String licenseKey; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserLicense && - other.activatedAt == activatedAt && - other.activationKey == activationKey && - other.licenseKey == licenseKey; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (activatedAt.hashCode) + - (activationKey.hashCode) + - (licenseKey.hashCode); - - @override - String toString() => 'UserLicense[activatedAt=$activatedAt, activationKey=$activationKey, licenseKey=$licenseKey]'; - - Map toJson() { - final json = {}; - json[r'activatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/') - ? this.activatedAt.millisecondsSinceEpoch - : this.activatedAt.toUtc().toIso8601String(); - json[r'activationKey'] = this.activationKey; - json[r'licenseKey'] = this.licenseKey; - return json; - } - - /// Returns a new [UserLicense] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserLicense? fromJson(dynamic value) { - upgradeDto(value, "UserLicense"); - if (value is Map) { - final json = value.cast(); - - return UserLicense( - activatedAt: mapDateTime(json, r'activatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$/')!, - activationKey: mapValueOfType(json, r'activationKey')!, - licenseKey: mapValueOfType(json, r'licenseKey')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserLicense.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserLicense.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserLicense-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserLicense.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'activatedAt', - 'activationKey', - 'licenseKey', - }; -} - diff --git a/mobile/openapi/lib/model/user_metadata_key.dart b/mobile/openapi/lib/model/user_metadata_key.dart deleted file mode 100644 index 0965fbf73f..0000000000 --- a/mobile/openapi/lib/model/user_metadata_key.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User metadata key -enum UserMetadataKey { - preferences._(r'preferences'), - license._(r'license'), - onboarding._(r'onboarding'), - ; - - /// Instantiate a new enum with the provided value. - const UserMetadataKey._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserMetadataKey] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserMetadataKey? fromJson(dynamic value) => UserMetadataKeyTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserMetadataKey] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserMetadataKey.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserMetadataKey] to String, -/// and [decode] dynamic data back to [UserMetadataKey]. -class UserMetadataKeyTypeTransformer { - factory UserMetadataKeyTypeTransformer() => _instance ??= const UserMetadataKeyTypeTransformer._(); - - const UserMetadataKeyTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserMetadataKey data) => data._value; - - /// Returns the instance of [UserMetadataKey] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserMetadataKey? decode(dynamic data, {bool allowNull = true}) { - if (data is UserMetadataKey) { - return data; - } - if (data != null) { - switch (data) { - case r'preferences': return UserMetadataKey.preferences; - case r'license': return UserMetadataKey.license; - case r'onboarding': return UserMetadataKey.onboarding; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserMetadataKeyTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_preferences_response_dto.dart b/mobile/openapi/lib/model/user_preferences_response_dto.dart deleted file mode 100644 index 25de4fd985..0000000000 --- a/mobile/openapi/lib/model/user_preferences_response_dto.dart +++ /dev/null @@ -1,187 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserPreferencesResponseDto { - /// Returns a new [UserPreferencesResponseDto] instance. - UserPreferencesResponseDto({ - required this.albums, - required this.cast, - required this.download, - required this.emailNotifications, - required this.folders, - required this.memories, - required this.people, - required this.purchase, - required this.ratings, - required this.recentlyAdded, - required this.sharedLinks, - required this.tags, - }); - - AlbumsResponse albums; - - CastResponse cast; - - DownloadResponse download; - - EmailNotificationsResponse emailNotifications; - - FoldersResponse folders; - - MemoriesResponse memories; - - PeopleResponse people; - - PurchaseResponse purchase; - - RatingsResponse ratings; - - RecentlyAddedResponse recentlyAdded; - - SharedLinksResponse sharedLinks; - - TagsResponse tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesResponseDto && - other.albums == albums && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.recentlyAdded == recentlyAdded && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums.hashCode) + - (cast.hashCode) + - (download.hashCode) + - (emailNotifications.hashCode) + - (folders.hashCode) + - (memories.hashCode) + - (people.hashCode) + - (purchase.hashCode) + - (ratings.hashCode) + - (recentlyAdded.hashCode) + - (sharedLinks.hashCode) + - (tags.hashCode); - - @override - String toString() => 'UserPreferencesResponseDto[albums=$albums, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, recentlyAdded=$recentlyAdded, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - json[r'albums'] = this.albums; - json[r'cast'] = this.cast; - json[r'download'] = this.download; - json[r'emailNotifications'] = this.emailNotifications; - json[r'folders'] = this.folders; - json[r'memories'] = this.memories; - json[r'people'] = this.people; - json[r'purchase'] = this.purchase; - json[r'ratings'] = this.ratings; - json[r'recentlyAdded'] = this.recentlyAdded; - json[r'sharedLinks'] = this.sharedLinks; - json[r'tags'] = this.tags; - return json; - } - - /// Returns a new [UserPreferencesResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesResponseDto( - albums: AlbumsResponse.fromJson(json[r'albums'])!, - cast: CastResponse.fromJson(json[r'cast'])!, - download: DownloadResponse.fromJson(json[r'download'])!, - emailNotifications: EmailNotificationsResponse.fromJson(json[r'emailNotifications'])!, - folders: FoldersResponse.fromJson(json[r'folders'])!, - memories: MemoriesResponse.fromJson(json[r'memories'])!, - people: PeopleResponse.fromJson(json[r'people'])!, - purchase: PurchaseResponse.fromJson(json[r'purchase'])!, - ratings: RatingsResponse.fromJson(json[r'ratings'])!, - recentlyAdded: RecentlyAddedResponse.fromJson(json[r'recentlyAdded'])!, - sharedLinks: SharedLinksResponse.fromJson(json[r'sharedLinks'])!, - tags: TagsResponse.fromJson(json[r'tags'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'albums', - 'cast', - 'download', - 'emailNotifications', - 'folders', - 'memories', - 'people', - 'purchase', - 'ratings', - 'recentlyAdded', - 'sharedLinks', - 'tags', - }; -} - diff --git a/mobile/openapi/lib/model/user_preferences_update_dto.dart b/mobile/openapi/lib/model/user_preferences_update_dto.dart deleted file mode 100644 index b1dbd95ae5..0000000000 --- a/mobile/openapi/lib/model/user_preferences_update_dto.dart +++ /dev/null @@ -1,299 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserPreferencesUpdateDto { - /// Returns a new [UserPreferencesUpdateDto] instance. - UserPreferencesUpdateDto({ - this.albums = const Optional.absent(), - this.avatar = const Optional.absent(), - this.cast = const Optional.absent(), - this.download = const Optional.absent(), - this.emailNotifications = const Optional.absent(), - this.folders = const Optional.absent(), - this.memories = const Optional.absent(), - this.people = const Optional.absent(), - this.purchase = const Optional.absent(), - this.ratings = const Optional.absent(), - this.recentlyAdded = const Optional.absent(), - this.sharedLinks = const Optional.absent(), - this.tags = const Optional.absent(), - }); - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional albums; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional avatar; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional cast; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional download; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional emailNotifications; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional folders; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional memories; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional people; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional purchase; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional ratings; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional recentlyAdded; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional sharedLinks; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional tags; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserPreferencesUpdateDto && - other.albums == albums && - other.avatar == avatar && - other.cast == cast && - other.download == download && - other.emailNotifications == emailNotifications && - other.folders == folders && - other.memories == memories && - other.people == people && - other.purchase == purchase && - other.ratings == ratings && - other.recentlyAdded == recentlyAdded && - other.sharedLinks == sharedLinks && - other.tags == tags; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (albums == null ? 0 : albums!.hashCode) + - (avatar == null ? 0 : avatar!.hashCode) + - (cast == null ? 0 : cast!.hashCode) + - (download == null ? 0 : download!.hashCode) + - (emailNotifications == null ? 0 : emailNotifications!.hashCode) + - (folders == null ? 0 : folders!.hashCode) + - (memories == null ? 0 : memories!.hashCode) + - (people == null ? 0 : people!.hashCode) + - (purchase == null ? 0 : purchase!.hashCode) + - (ratings == null ? 0 : ratings!.hashCode) + - (recentlyAdded == null ? 0 : recentlyAdded!.hashCode) + - (sharedLinks == null ? 0 : sharedLinks!.hashCode) + - (tags == null ? 0 : tags!.hashCode); - - @override - String toString() => 'UserPreferencesUpdateDto[albums=$albums, avatar=$avatar, cast=$cast, download=$download, emailNotifications=$emailNotifications, folders=$folders, memories=$memories, people=$people, purchase=$purchase, ratings=$ratings, recentlyAdded=$recentlyAdded, sharedLinks=$sharedLinks, tags=$tags]'; - - Map toJson() { - final json = {}; - if (this.albums.isPresent) { - final value = this.albums.value; - json[r'albums'] = value; - } - if (this.avatar.isPresent) { - final value = this.avatar.value; - json[r'avatar'] = value; - } - if (this.cast.isPresent) { - final value = this.cast.value; - json[r'cast'] = value; - } - if (this.download.isPresent) { - final value = this.download.value; - json[r'download'] = value; - } - if (this.emailNotifications.isPresent) { - final value = this.emailNotifications.value; - json[r'emailNotifications'] = value; - } - if (this.folders.isPresent) { - final value = this.folders.value; - json[r'folders'] = value; - } - if (this.memories.isPresent) { - final value = this.memories.value; - json[r'memories'] = value; - } - if (this.people.isPresent) { - final value = this.people.value; - json[r'people'] = value; - } - if (this.purchase.isPresent) { - final value = this.purchase.value; - json[r'purchase'] = value; - } - if (this.ratings.isPresent) { - final value = this.ratings.value; - json[r'ratings'] = value; - } - if (this.recentlyAdded.isPresent) { - final value = this.recentlyAdded.value; - json[r'recentlyAdded'] = value; - } - if (this.sharedLinks.isPresent) { - final value = this.sharedLinks.value; - json[r'sharedLinks'] = value; - } - if (this.tags.isPresent) { - final value = this.tags.value; - json[r'tags'] = value; - } - return json; - } - - /// Returns a new [UserPreferencesUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserPreferencesUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "UserPreferencesUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return UserPreferencesUpdateDto( - albums: json.containsKey(r'albums') ? Optional.present(AlbumsUpdate.fromJson(json[r'albums'])) : const Optional.absent(), - avatar: json.containsKey(r'avatar') ? Optional.present(AvatarUpdate.fromJson(json[r'avatar'])) : const Optional.absent(), - cast: json.containsKey(r'cast') ? Optional.present(CastUpdate.fromJson(json[r'cast'])) : const Optional.absent(), - download: json.containsKey(r'download') ? Optional.present(DownloadUpdate.fromJson(json[r'download'])) : const Optional.absent(), - emailNotifications: json.containsKey(r'emailNotifications') ? Optional.present(EmailNotificationsUpdate.fromJson(json[r'emailNotifications'])) : const Optional.absent(), - folders: json.containsKey(r'folders') ? Optional.present(FoldersUpdate.fromJson(json[r'folders'])) : const Optional.absent(), - memories: json.containsKey(r'memories') ? Optional.present(MemoriesUpdate.fromJson(json[r'memories'])) : const Optional.absent(), - people: json.containsKey(r'people') ? Optional.present(PeopleUpdate.fromJson(json[r'people'])) : const Optional.absent(), - purchase: json.containsKey(r'purchase') ? Optional.present(PurchaseUpdate.fromJson(json[r'purchase'])) : const Optional.absent(), - ratings: json.containsKey(r'ratings') ? Optional.present(RatingsUpdate.fromJson(json[r'ratings'])) : const Optional.absent(), - recentlyAdded: json.containsKey(r'recentlyAdded') ? Optional.present(RecentlyAddedUpdate.fromJson(json[r'recentlyAdded'])) : const Optional.absent(), - sharedLinks: json.containsKey(r'sharedLinks') ? Optional.present(SharedLinksUpdate.fromJson(json[r'sharedLinks'])) : const Optional.absent(), - tags: json.containsKey(r'tags') ? Optional.present(TagsUpdate.fromJson(json[r'tags'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserPreferencesUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserPreferencesUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserPreferencesUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserPreferencesUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart deleted file mode 100644 index f671072c72..0000000000 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ /dev/null @@ -1,144 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserResponseDto { - /// Returns a new [UserResponseDto] instance. - UserResponseDto({ - required this.avatarColor, - required this.email, - required this.id, - required this.name, - required this.profileChangedAt, - required this.profileImagePath, - }); - - UserAvatarColor avatarColor; - - /// User email - String email; - - /// User ID - String id; - - /// User name - String name; - - /// Profile change date - DateTime profileChangedAt; - - /// Profile image path - String profileImagePath; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserResponseDto && - other.avatarColor == avatarColor && - other.email == email && - other.id == id && - other.name == name && - other.profileChangedAt == profileChangedAt && - other.profileImagePath == profileImagePath; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor.hashCode) + - (email.hashCode) + - (id.hashCode) + - (name.hashCode) + - (profileChangedAt.hashCode) + - (profileImagePath.hashCode); - - @override - String toString() => 'UserResponseDto[avatarColor=$avatarColor, email=$email, id=$id, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]'; - - Map toJson() { - final json = {}; - json[r'avatarColor'] = this.avatarColor; - json[r'email'] = this.email; - json[r'id'] = this.id; - json[r'name'] = this.name; - json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String(); - json[r'profileImagePath'] = this.profileImagePath; - return json; - } - - /// Returns a new [UserResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserResponseDto? fromJson(dynamic value) { - upgradeDto(value, "UserResponseDto"); - if (value is Map) { - final json = value.cast(); - - return UserResponseDto( - avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!, - email: mapValueOfType(json, r'email')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name')!, - profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!, - profileImagePath: mapValueOfType(json, r'profileImagePath')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'avatarColor', - 'email', - 'id', - 'name', - 'profileChangedAt', - 'profileImagePath', - }; -} - diff --git a/mobile/openapi/lib/model/user_status.dart b/mobile/openapi/lib/model/user_status.dart deleted file mode 100644 index 9def2adfe0..0000000000 --- a/mobile/openapi/lib/model/user_status.dart +++ /dev/null @@ -1,92 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// User status -enum UserStatus { - active._(r'active'), - removing._(r'removing'), - deleted._(r'deleted'), - ; - - /// Instantiate a new enum with the provided value. - const UserStatus._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [UserStatus] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static UserStatus? fromJson(dynamic value) => UserStatusTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [UserStatus] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserStatus.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [UserStatus] to String, -/// and [decode] dynamic data back to [UserStatus]. -class UserStatusTypeTransformer { - factory UserStatusTypeTransformer() => _instance ??= const UserStatusTypeTransformer._(); - - const UserStatusTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(UserStatus data) => data._value; - - /// Returns the instance of [UserStatus] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - UserStatus? decode(dynamic data, {bool allowNull = true}) { - if (data is UserStatus) { - return data; - } - if (data != null) { - switch (data) { - case r'active': return UserStatus.active; - case r'removing': return UserStatus.removing; - case r'deleted': return UserStatus.deleted; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static UserStatusTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/user_update_me_dto.dart b/mobile/openapi/lib/model/user_update_me_dto.dart deleted file mode 100644 index c4859747a6..0000000000 --- a/mobile/openapi/lib/model/user_update_me_dto.dart +++ /dev/null @@ -1,152 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class UserUpdateMeDto { - /// Returns a new [UserUpdateMeDto] instance. - UserUpdateMeDto({ - this.avatarColor = const Optional.absent(), - this.email = const Optional.absent(), - this.name = const Optional.absent(), - this.password = const Optional.absent(), - }); - - Optional avatarColor; - - /// User email - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional email; - - /// User name - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional name; - - /// User password (deprecated, use change password endpoint) - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional password; - - @override - bool operator ==(Object other) => identical(this, other) || other is UserUpdateMeDto && - other.avatarColor == avatarColor && - other.email == email && - other.name == name && - other.password == password; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (avatarColor == null ? 0 : avatarColor!.hashCode) + - (email == null ? 0 : email!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (password == null ? 0 : password!.hashCode); - - @override - String toString() => 'UserUpdateMeDto[avatarColor=$avatarColor, email=$email, name=$name, password=$password]'; - - Map toJson() { - final json = {}; - if (this.avatarColor.isPresent) { - final value = this.avatarColor.value; - json[r'avatarColor'] = value; - } - if (this.email.isPresent) { - final value = this.email.value; - json[r'email'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.password.isPresent) { - final value = this.password.value; - json[r'password'] = value; - } - return json; - } - - /// Returns a new [UserUpdateMeDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static UserUpdateMeDto? fromJson(dynamic value) { - upgradeDto(value, "UserUpdateMeDto"); - if (value is Map) { - final json = value.cast(); - - return UserUpdateMeDto( - avatarColor: json.containsKey(r'avatarColor') ? Optional.present(UserAvatarColor.fromJson(json[r'avatarColor'])) : const Optional.absent(), - email: json.containsKey(r'email') ? Optional.present(mapValueOfType(json, r'email')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - password: json.containsKey(r'password') ? Optional.present(mapValueOfType(json, r'password')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = UserUpdateMeDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = UserUpdateMeDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of UserUpdateMeDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = UserUpdateMeDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_access_token_response_dto.dart b/mobile/openapi/lib/model/validate_access_token_response_dto.dart deleted file mode 100644 index 16b9d0f925..0000000000 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ /dev/null @@ -1,100 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateAccessTokenResponseDto { - /// Returns a new [ValidateAccessTokenResponseDto] instance. - ValidateAccessTokenResponseDto({ - required this.authStatus, - }); - - /// Authentication status - bool authStatus; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateAccessTokenResponseDto && - other.authStatus == authStatus; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (authStatus.hashCode); - - @override - String toString() => 'ValidateAccessTokenResponseDto[authStatus=$authStatus]'; - - Map toJson() { - final json = {}; - json[r'authStatus'] = this.authStatus; - return json; - } - - /// Returns a new [ValidateAccessTokenResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateAccessTokenResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateAccessTokenResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateAccessTokenResponseDto( - authStatus: mapValueOfType(json, r'authStatus')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateAccessTokenResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateAccessTokenResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateAccessTokenResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'authStatus', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_dto.dart b/mobile/openapi/lib/model/validate_library_dto.dart deleted file mode 100644 index 6d85712191..0000000000 --- a/mobile/openapi/lib/model/validate_library_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryDto { - /// Returns a new [ValidateLibraryDto] instance. - ValidateLibraryDto({ - this.exclusionPatterns = const Optional.present(const []), - this.importPaths = const Optional.present(const []), - }); - - /// Exclusion patterns (max 128) - Optional?> exclusionPatterns; - - /// Import paths to validate (max 128) - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryDto && - _deepEquality.equals(other.exclusionPatterns, exclusionPatterns) && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (exclusionPatterns.hashCode) + - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryDto[exclusionPatterns=$exclusionPatterns, importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.exclusionPatterns.isPresent) { - final value = this.exclusionPatterns.value; - json[r'exclusionPatterns'] = value; - } - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryDto( - exclusionPatterns: json.containsKey(r'exclusionPatterns') ? Optional.present(json[r'exclusionPatterns'] is Iterable - ? (json[r'exclusionPatterns'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - importPaths: json.containsKey(r'importPaths') ? Optional.present(json[r'importPaths'] is Iterable - ? (json[r'importPaths'] as Iterable).cast().toList(growable: false) - : const []) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart b/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart deleted file mode 100644 index 3c8d7c58cd..0000000000 --- a/mobile/openapi/lib/model/validate_library_import_path_response_dto.dart +++ /dev/null @@ -1,126 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryImportPathResponseDto { - /// Returns a new [ValidateLibraryImportPathResponseDto] instance. - ValidateLibraryImportPathResponseDto({ - required this.importPath, - required this.isValid, - this.message = const Optional.absent(), - }); - - /// Import path - String importPath; - - /// Is valid - bool isValid; - - /// Validation message - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional message; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryImportPathResponseDto && - other.importPath == importPath && - other.isValid == isValid && - other.message == message; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPath.hashCode) + - (isValid.hashCode) + - (message == null ? 0 : message!.hashCode); - - @override - String toString() => 'ValidateLibraryImportPathResponseDto[importPath=$importPath, isValid=$isValid, message=$message]'; - - Map toJson() { - final json = {}; - json[r'importPath'] = this.importPath; - json[r'isValid'] = this.isValid; - if (this.message.isPresent) { - final value = this.message.value; - json[r'message'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryImportPathResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryImportPathResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryImportPathResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryImportPathResponseDto( - importPath: mapValueOfType(json, r'importPath')!, - isValid: mapValueOfType(json, r'isValid')!, - message: json.containsKey(r'message') ? Optional.present(mapValueOfType(json, r'message')) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryImportPathResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryImportPathResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryImportPathResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryImportPathResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'importPath', - 'isValid', - }; -} - diff --git a/mobile/openapi/lib/model/validate_library_response_dto.dart b/mobile/openapi/lib/model/validate_library_response_dto.dart deleted file mode 100644 index 5106b93ca8..0000000000 --- a/mobile/openapi/lib/model/validate_library_response_dto.dart +++ /dev/null @@ -1,102 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class ValidateLibraryResponseDto { - /// Returns a new [ValidateLibraryResponseDto] instance. - ValidateLibraryResponseDto({ - this.importPaths = const Optional.present(const []), - }); - - /// Validation results for import paths - Optional?> importPaths; - - @override - bool operator ==(Object other) => identical(this, other) || other is ValidateLibraryResponseDto && - _deepEquality.equals(other.importPaths, importPaths); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (importPaths.hashCode); - - @override - String toString() => 'ValidateLibraryResponseDto[importPaths=$importPaths]'; - - Map toJson() { - final json = {}; - if (this.importPaths.isPresent) { - final value = this.importPaths.value; - json[r'importPaths'] = value; - } - return json; - } - - /// Returns a new [ValidateLibraryResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static ValidateLibraryResponseDto? fromJson(dynamic value) { - upgradeDto(value, "ValidateLibraryResponseDto"); - if (value is Map) { - final json = value.cast(); - - return ValidateLibraryResponseDto( - importPaths: json.containsKey(r'importPaths') ? Optional.present(ValidateLibraryImportPathResponseDto.listFromJson(json[r'importPaths'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = ValidateLibraryResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = ValidateLibraryResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of ValidateLibraryResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = ValidateLibraryResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/model/version_check_state_response_dto.dart b/mobile/openapi/lib/model/version_check_state_response_dto.dart deleted file mode 100644 index 4ad9458a1b..0000000000 --- a/mobile/openapi/lib/model/version_check_state_response_dto.dart +++ /dev/null @@ -1,117 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class VersionCheckStateResponseDto { - /// Returns a new [VersionCheckStateResponseDto] instance. - VersionCheckStateResponseDto({ - required this.checkedAt, - required this.releaseVersion, - }); - - /// Last check timestamp - String? checkedAt; - - /// Release version - String? releaseVersion; - - @override - bool operator ==(Object other) => identical(this, other) || other is VersionCheckStateResponseDto && - other.checkedAt == checkedAt && - other.releaseVersion == releaseVersion; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (checkedAt == null ? 0 : checkedAt!.hashCode) + - (releaseVersion == null ? 0 : releaseVersion!.hashCode); - - @override - String toString() => 'VersionCheckStateResponseDto[checkedAt=$checkedAt, releaseVersion=$releaseVersion]'; - - Map toJson() { - final json = {}; - if (this.checkedAt != null) { - json[r'checkedAt'] = this.checkedAt; - } else { - json[r'checkedAt'] = null; - } - if (this.releaseVersion != null) { - json[r'releaseVersion'] = this.releaseVersion; - } else { - json[r'releaseVersion'] = null; - } - return json; - } - - /// Returns a new [VersionCheckStateResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static VersionCheckStateResponseDto? fromJson(dynamic value) { - upgradeDto(value, "VersionCheckStateResponseDto"); - if (value is Map) { - final json = value.cast(); - - return VersionCheckStateResponseDto( - checkedAt: mapValueOfType(json, r'checkedAt'), - releaseVersion: mapValueOfType(json, r'releaseVersion'), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VersionCheckStateResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = VersionCheckStateResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of VersionCheckStateResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = VersionCheckStateResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'checkedAt', - 'releaseVersion', - }; -} - diff --git a/mobile/openapi/lib/model/video_codec.dart b/mobile/openapi/lib/model/video_codec.dart deleted file mode 100644 index c725a1db41..0000000000 --- a/mobile/openapi/lib/model/video_codec.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Target video codec -enum VideoCodec { - h264._(r'h264'), - hevc._(r'hevc'), - vp9._(r'vp9'), - av1._(r'av1'), - ; - - /// Instantiate a new enum with the provided value. - const VideoCodec._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [VideoCodec] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static VideoCodec? fromJson(dynamic value) => VideoCodecTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [VideoCodec] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VideoCodec.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoCodec] to String, -/// and [decode] dynamic data back to [VideoCodec]. -class VideoCodecTypeTransformer { - factory VideoCodecTypeTransformer() => _instance ??= const VideoCodecTypeTransformer._(); - - const VideoCodecTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(VideoCodec data) => data._value; - - /// Returns the instance of [VideoCodec] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - VideoCodec? decode(dynamic data, {bool allowNull = true}) { - if (data is VideoCodec) { - return data; - } - if (data != null) { - switch (data) { - case r'h264': return VideoCodec.h264; - case r'hevc': return VideoCodec.hevc; - case r'vp9': return VideoCodec.vp9; - case r'av1': return VideoCodec.av1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static VideoCodecTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/video_container.dart b/mobile/openapi/lib/model/video_container.dart deleted file mode 100644 index 9d1898a7e4..0000000000 --- a/mobile/openapi/lib/model/video_container.dart +++ /dev/null @@ -1,94 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Accepted video containers -enum VideoContainer { - mov._(r'mov'), - mp4._(r'mp4'), - ogg._(r'ogg'), - webm._(r'webm'), - ; - - /// Instantiate a new enum with the provided value. - const VideoContainer._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [VideoContainer] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static VideoContainer? fromJson(dynamic value) => VideoContainerTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [VideoContainer] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = VideoContainer.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [VideoContainer] to String, -/// and [decode] dynamic data back to [VideoContainer]. -class VideoContainerTypeTransformer { - factory VideoContainerTypeTransformer() => _instance ??= const VideoContainerTypeTransformer._(); - - const VideoContainerTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(VideoContainer data) => data._value; - - /// Returns the instance of [VideoContainer] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - VideoContainer? decode(dynamic data, {bool allowNull = true}) { - if (data is VideoContainer) { - return data; - } - if (data != null) { - switch (data) { - case r'mov': return VideoContainer.mov; - case r'mp4': return VideoContainer.mp4; - case r'ogg': return VideoContainer.ogg; - case r'webm': return VideoContainer.webm; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static VideoContainerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_create_dto.dart b/mobile/openapi/lib/model/workflow_create_dto.dart deleted file mode 100644 index e84554e8c9..0000000000 --- a/mobile/openapi/lib/model/workflow_create_dto.dart +++ /dev/null @@ -1,148 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowCreateDto { - /// Returns a new [WorkflowCreateDto] instance. - WorkflowCreateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - required this.trigger, - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowCreateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowCreateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowCreateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowCreateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowCreateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowCreateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowCreateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowCreateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowCreateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowCreateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_response_dto.dart b/mobile/openapi/lib/model/workflow_response_dto.dart deleted file mode 100644 index b2b5586601..0000000000 --- a/mobile/openapi/lib/model/workflow_response_dto.dart +++ /dev/null @@ -1,170 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowResponseDto { - /// Returns a new [WorkflowResponseDto] instance. - WorkflowResponseDto({ - required this.createdAt, - required this.description, - required this.enabled, - required this.id, - required this.name, - this.steps = const [], - required this.trigger, - required this.updatedAt, - }); - - /// Creation date - String createdAt; - - /// Workflow description - String? description; - - /// Workflow enabled - bool enabled; - - /// Workflow ID - String id; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - /// Update date - String updatedAt; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowResponseDto && - other.createdAt == createdAt && - other.description == description && - other.enabled == enabled && - other.id == id && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger && - other.updatedAt == updatedAt; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (createdAt.hashCode) + - (description == null ? 0 : description!.hashCode) + - (enabled.hashCode) + - (id.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode) + - (updatedAt.hashCode); - - @override - String toString() => 'WorkflowResponseDto[createdAt=$createdAt, description=$description, enabled=$enabled, id=$id, name=$name, steps=$steps, trigger=$trigger, updatedAt=$updatedAt]'; - - Map toJson() { - final json = {}; - json[r'createdAt'] = this.createdAt; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - json[r'enabled'] = this.enabled; - json[r'id'] = this.id; - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - json[r'updatedAt'] = this.updatedAt; - return json; - } - - /// Returns a new [WorkflowResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowResponseDto( - createdAt: mapValueOfType(json, r'createdAt')!, - description: mapValueOfType(json, r'description'), - enabled: mapValueOfType(json, r'enabled')!, - id: mapValueOfType(json, r'id')!, - name: mapValueOfType(json, r'name'), - steps: WorkflowStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - updatedAt: mapValueOfType(json, r'updatedAt')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'createdAt', - 'description', - 'enabled', - 'id', - 'name', - 'steps', - 'trigger', - 'updatedAt', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_response_dto.dart b/mobile/openapi/lib/model/workflow_share_response_dto.dart deleted file mode 100644 index d7e90085c2..0000000000 --- a/mobile/openapi/lib/model/workflow_share_response_dto.dart +++ /dev/null @@ -1,134 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowShareResponseDto { - /// Returns a new [WorkflowShareResponseDto] instance. - WorkflowShareResponseDto({ - required this.description, - required this.name, - this.steps = const [], - required this.trigger, - }); - - /// Workflow description - String? description; - - /// Workflow name - String? name; - - /// Workflow steps - List steps; - - WorkflowTrigger trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareResponseDto && - other.description == description && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger.hashCode); - - @override - String toString() => 'WorkflowShareResponseDto[description=$description, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description != null) { - json[r'description'] = this.description; - } else { - json[r'description'] = null; - } - if (this.name != null) { - json[r'name'] = this.name; - } else { - json[r'name'] = null; - } - json[r'steps'] = this.steps; - json[r'trigger'] = this.trigger; - return json; - } - - /// Returns a new [WorkflowShareResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareResponseDto( - description: mapValueOfType(json, r'description'), - name: mapValueOfType(json, r'name'), - steps: WorkflowShareStepDto.listFromJson(json[r'steps']), - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'description', - 'name', - 'steps', - 'trigger', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_share_step_dto.dart b/mobile/openapi/lib/model/workflow_share_step_dto.dart deleted file mode 100644 index eeb6ba4e51..0000000000 --- a/mobile/openapi/lib/model/workflow_share_step_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowShareStepDto { - /// Returns a new [WorkflowShareStepDto] instance. - WorkflowShareStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowShareStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowShareStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowShareStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowShareStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowShareStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowShareStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowShareStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowShareStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowShareStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowShareStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_step_dto.dart b/mobile/openapi/lib/model/workflow_step_dto.dart deleted file mode 100644 index c01e8e6b44..0000000000 --- a/mobile/openapi/lib/model/workflow_step_dto.dart +++ /dev/null @@ -1,130 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowStepDto { - /// Returns a new [WorkflowStepDto] instance. - WorkflowStepDto({ - this.config = const {}, - this.enabled = const Optional.absent(), - required this.method, - }); - - /// Step configuration - Map? config; - - /// Step is enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Step plugin method - String method; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowStepDto && - _deepEquality.equals(other.config, config) && - other.enabled == enabled && - other.method == method; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (config == null ? 0 : config!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (method.hashCode); - - @override - String toString() => 'WorkflowStepDto[config=$config, enabled=$enabled, method=$method]'; - - Map toJson() { - final json = {}; - if (this.config != null) { - json[r'config'] = this.config; - } else { - json[r'config'] = null; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - json[r'method'] = this.method; - return json; - } - - /// Returns a new [WorkflowStepDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowStepDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowStepDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowStepDto( - config: mapCastOfType(json, r'config'), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - method: mapValueOfType(json, r'method')!, - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowStepDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowStepDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowStepDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowStepDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'config', - 'method', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger.dart b/mobile/openapi/lib/model/workflow_trigger.dart deleted file mode 100644 index 2780b909b6..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger.dart +++ /dev/null @@ -1,90 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Plugin trigger type -enum WorkflowTrigger { - assetCreate._(r'AssetCreate'), - assetMetadataExtraction._(r'AssetMetadataExtraction'), - ; - - /// Instantiate a new enum with the provided value. - const WorkflowTrigger._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [WorkflowTrigger] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static WorkflowTrigger? fromJson(dynamic value) => WorkflowTriggerTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [WorkflowTrigger] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowTrigger.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowTrigger] to String, -/// and [decode] dynamic data back to [WorkflowTrigger]. -class WorkflowTriggerTypeTransformer { - factory WorkflowTriggerTypeTransformer() => _instance ??= const WorkflowTriggerTypeTransformer._(); - - const WorkflowTriggerTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(WorkflowTrigger data) => data._value; - - /// Returns the instance of [WorkflowTrigger] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - WorkflowTrigger? decode(dynamic data, {bool allowNull = true}) { - if (data is WorkflowTrigger) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetCreate': return WorkflowTrigger.assetCreate; - case r'AssetMetadataExtraction': return WorkflowTrigger.assetMetadataExtraction; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static WorkflowTriggerTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart b/mobile/openapi/lib/model/workflow_trigger_response_dto.dart deleted file mode 100644 index 6e24e1559a..0000000000 --- a/mobile/openapi/lib/model/workflow_trigger_response_dto.dart +++ /dev/null @@ -1,108 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowTriggerResponseDto { - /// Returns a new [WorkflowTriggerResponseDto] instance. - WorkflowTriggerResponseDto({ - required this.trigger, - this.types = const [], - }); - - WorkflowTrigger trigger; - - /// Workflow types - List types; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowTriggerResponseDto && - other.trigger == trigger && - _deepEquality.equals(other.types, types); - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (trigger.hashCode) + - (types.hashCode); - - @override - String toString() => 'WorkflowTriggerResponseDto[trigger=$trigger, types=$types]'; - - Map toJson() { - final json = {}; - json[r'trigger'] = this.trigger; - json[r'types'] = this.types; - return json; - } - - /// Returns a new [WorkflowTriggerResponseDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowTriggerResponseDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowTriggerResponseDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowTriggerResponseDto( - trigger: WorkflowTrigger.fromJson(json[r'trigger'])!, - types: WorkflowType.listFromJson(json[r'types']), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowTriggerResponseDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowTriggerResponseDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowTriggerResponseDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowTriggerResponseDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - 'trigger', - 'types', - }; -} - diff --git a/mobile/openapi/lib/model/workflow_type.dart b/mobile/openapi/lib/model/workflow_type.dart deleted file mode 100644 index 598b8feb1b..0000000000 --- a/mobile/openapi/lib/model/workflow_type.dart +++ /dev/null @@ -1,88 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Workflow type -enum WorkflowType { - assetV1._(r'AssetV1'), - ; - - /// Instantiate a new enum with the provided value. - const WorkflowType._(this._value); - - /// The underlying value of this enum member. - final String _value; - - @override - String toString() => _value; - - /// Encodes this enum as a value suitable for JSON. - String toJson() => _value; - - /// Returns the instance of [WorkflowType] that was successfully decoded - /// from the passed [value] on success, null otherwise. - static WorkflowType? fromJson(dynamic value) => WorkflowTypeTypeTransformer().decode(value); - - /// Returns a [List] containing instances of [WorkflowType] - /// that were successfully decoded from the passed [JSON][json]. - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowType.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } -} - -/// Transformation class that can [encode] an instance of [WorkflowType] to String, -/// and [decode] dynamic data back to [WorkflowType]. -class WorkflowTypeTypeTransformer { - factory WorkflowTypeTypeTransformer() => _instance ??= const WorkflowTypeTypeTransformer._(); - - const WorkflowTypeTypeTransformer._(); - - /// Encodes this enum as a value suitable for JSON. - String encode(WorkflowType data) => data._value; - - /// Returns the instance of [WorkflowType] that was successfully decoded - /// from the passed [data] value on success, null otherwise. - /// - /// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully, - /// then null is returned. However, if [allowNull] is false and the [dynamic value][data] - /// cannot be decoded successfully, then an [UnimplementedError] is thrown. - /// - /// The [allowNull] is very handy when an API changes and a new enum value is added or removed, - /// and users are still using an old app with the old code. - WorkflowType? decode(dynamic data, {bool allowNull = true}) { - if (data is WorkflowType) { - return data; - } - if (data != null) { - switch (data) { - case r'AssetV1': return WorkflowType.assetV1; - default: - if (!allowNull) { - throw ArgumentError('Unknown enum value to decode: $data'); - } - } - } - return null; - } - - /// The singleton instance of this transformer. - static WorkflowTypeTypeTransformer? _instance; -} - diff --git a/mobile/openapi/lib/model/workflow_update_dto.dart b/mobile/openapi/lib/model/workflow_update_dto.dart deleted file mode 100644 index 32759b6395..0000000000 --- a/mobile/openapi/lib/model/workflow_update_dto.dart +++ /dev/null @@ -1,156 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -class WorkflowUpdateDto { - /// Returns a new [WorkflowUpdateDto] instance. - WorkflowUpdateDto({ - this.description = const Optional.absent(), - this.enabled = const Optional.absent(), - this.name = const Optional.absent(), - this.steps = const Optional.present(const []), - this.trigger = const Optional.absent(), - }); - - /// Workflow description - Optional description; - - /// Workflow enabled - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional enabled; - - /// Workflow name - Optional name; - - Optional?> steps; - - /// - /// Please note: This property should have been non-nullable! Since the specification file - /// does not include a default value (using the "default:" property), however, the generated - /// source code must fall back to having a nullable type. - /// Consider adding a "default:" property in the specification file to hide this note. - /// - Optional trigger; - - @override - bool operator ==(Object other) => identical(this, other) || other is WorkflowUpdateDto && - other.description == description && - other.enabled == enabled && - other.name == name && - _deepEquality.equals(other.steps, steps) && - other.trigger == trigger; - - @override - int get hashCode => - // ignore: unnecessary_parenthesis - (description == null ? 0 : description!.hashCode) + - (enabled == null ? 0 : enabled!.hashCode) + - (name == null ? 0 : name!.hashCode) + - (steps.hashCode) + - (trigger == null ? 0 : trigger!.hashCode); - - @override - String toString() => 'WorkflowUpdateDto[description=$description, enabled=$enabled, name=$name, steps=$steps, trigger=$trigger]'; - - Map toJson() { - final json = {}; - if (this.description.isPresent) { - final value = this.description.value; - json[r'description'] = value; - } - if (this.enabled.isPresent) { - final value = this.enabled.value; - json[r'enabled'] = value; - } - if (this.name.isPresent) { - final value = this.name.value; - json[r'name'] = value; - } - if (this.steps.isPresent) { - final value = this.steps.value; - json[r'steps'] = value; - } - if (this.trigger.isPresent) { - final value = this.trigger.value; - json[r'trigger'] = value; - } - return json; - } - - /// Returns a new [WorkflowUpdateDto] instance and imports its values from - /// [value] if it's a [Map], null otherwise. - // ignore: prefer_constructors_over_static_methods - static WorkflowUpdateDto? fromJson(dynamic value) { - upgradeDto(value, "WorkflowUpdateDto"); - if (value is Map) { - final json = value.cast(); - - return WorkflowUpdateDto( - description: json.containsKey(r'description') ? Optional.present(mapValueOfType(json, r'description')) : const Optional.absent(), - enabled: json.containsKey(r'enabled') ? Optional.present(mapValueOfType(json, r'enabled')) : const Optional.absent(), - name: json.containsKey(r'name') ? Optional.present(mapValueOfType(json, r'name')) : const Optional.absent(), - steps: json.containsKey(r'steps') ? Optional.present(WorkflowStepDto.listFromJson(json[r'steps'])) : const Optional.absent(), - trigger: json.containsKey(r'trigger') ? Optional.present(WorkflowTrigger.fromJson(json[r'trigger'])) : const Optional.absent(), - ); - } - return null; - } - - static List listFromJson(dynamic json, {bool growable = false,}) { - final result = []; - if (json is List && json.isNotEmpty) { - for (final row in json) { - final value = WorkflowUpdateDto.fromJson(row); - if (value != null) { - result.add(value); - } - } - } - return result.toList(growable: growable); - } - - static Map mapFromJson(dynamic json) { - final map = {}; - if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments - for (final entry in json.entries) { - final value = WorkflowUpdateDto.fromJson(entry.value); - if (value != null) { - map[entry.key] = value; - } - } - } - return map; - } - - // maps a json object with a list of WorkflowUpdateDto-objects as value to a dart map - static Map> mapListFromJson(dynamic json, {bool growable = false,}) { - final map = >{}; - if (json is Map && json.isNotEmpty) { - // ignore: parameter_assignments - json = json.cast(); - for (final entry in json.entries) { - map[entry.key] = WorkflowUpdateDto.listFromJson(entry.value, growable: growable,); - } - } - return map; - } - - /// The list of required keys that must be present in a JSON. - static const requiredKeys = { - }; -} - diff --git a/mobile/openapi/lib/optional.dart b/mobile/openapi/lib/optional.dart deleted file mode 100644 index f260ec4a84..0000000000 --- a/mobile/openapi/lib/optional.dart +++ /dev/null @@ -1,119 +0,0 @@ -// -// AUTO-GENERATED FILE, DO NOT MODIFY! -// -// @dart=2.18 - -// ignore_for_file: unused_element, unused_import -// ignore_for_file: always_put_required_named_parameters_first -// ignore_for_file: constant_identifier_names -// ignore_for_file: lines_longer_than_80_chars - -part of openapi.api; - -/// Represents an optional value that can be either absent or present. -/// -/// This is used to distinguish between three states in PATCH operations: -/// - Absent: Field is not set (omitted from JSON) -/// - Present with null: Field is explicitly set to null -/// - Present with value: Field has a value -/// -/// Example usage: -/// ```dart -/// // Field absent - not sent in request -/// final patch1 = Model(); -/// -/// // Field explicitly null - sends {"field": null} -/// final patch2 = Model(field: const Optional.present(null)); -/// -/// // Field has value - sends {"field": "value"} -/// final patch3 = Model(field: const Optional.present('value')); -/// ``` -abstract class Optional { - const Optional(); - - /// Creates an Optional with an absent value (not set). - const factory Optional.absent() = Absent; - - /// Creates an Optional with a present value (can be null). - const factory Optional.present(T value) = Present; - - /// Returns true if this Optional has a value (even if that value is null). - bool get isPresent; - - /// Returns true if this Optional does not have a value. - bool get isEmpty => !isPresent; - - /// Returns the value if present, throws if absent. - T get value; - - /// Returns the value if present, otherwise returns [defaultValue]. - T orElse(T defaultValue); - - /// Returns the value if present, otherwise returns the result of calling [defaultValue]. - T orElseGet(T Function() defaultValue); - - /// Maps the value if present using [transform], otherwise returns an absent Optional. - Optional map(R Function(T value) transform); -} - -/// Represents an absent Optional value. -class Absent extends Optional { - const Absent(); - - @override - bool get isPresent => false; - - @override - T get value => throw StateError('No value present'); - - @override - T orElse(T defaultValue) => defaultValue; - - @override - T orElseGet(T Function() defaultValue) => defaultValue(); - - @override - Optional map(R Function(T value) transform) => const Absent(); - - @override - bool operator ==(Object other) => other is Absent; - - @override - int get hashCode => 0; - - @override - String toString() => 'Optional.absent()'; -} - -/// Represents a present Optional value. -class Present extends Optional { - const Present(this._value); - - final T _value; - - @override - bool get isPresent => true; - - @override - T get value => _value; - - @override - T orElse(T defaultValue) => _value; - - @override - T orElseGet(T Function() defaultValue) => _value; - - @override - Optional map(R Function(T value) transform) => Optional.present(transform(_value)); - - @override - bool operator ==(Object other) => - identical(this, other) || - (other is Present && _value == other._value); - - @override - int get hashCode => _value.hashCode; - - @override - String toString() => 'Optional.present($_value)'; -} diff --git a/mobile/openapi/pubspec.yaml b/mobile/openapi/pubspec.yaml deleted file mode 100644 index d541d530bb..0000000000 --- a/mobile/openapi/pubspec.yaml +++ /dev/null @@ -1,17 +0,0 @@ -# -# AUTO-GENERATED FILE, DO NOT MODIFY! -# - -name: 'openapi' -version: '1.0.0' -description: 'OpenAPI API client' -homepage: 'homepage' -environment: - sdk: '>=2.17.0 <4.0.0' -dependencies: - collection: '>=1.17.0 <2.0.0' - http: '>=0.13.0 <2.0.0' - intl: any - meta: '>=1.1.8 <2.0.0' - immich_mobile: - path: ../ diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock index caee4cde22..e0198f2683 100644 --- a/mobile/pubspec.lock +++ b/mobile/pubspec.lock @@ -1186,7 +1186,7 @@ packages: openapi: dependency: "direct main" description: - path: openapi + path: "generated/openapi" relative: true source: path version: "1.0.0" diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml index 811f8fd5bf..a55bcf515b 100644 --- a/mobile/pubspec.yaml +++ b/mobile/pubspec.yaml @@ -52,7 +52,7 @@ dependencies: network_info_plus: ^6.1.4 octo_image: ^2.1.0 openapi: - path: openapi + path: generated/openapi package_info_plus: ^8.3.1 path: ^1.9.1 path_provider: ^2.1.5 @@ -157,4 +157,4 @@ flutter_launcher_icons: analyzer: exclude: - - openapi/** + - generated/** diff --git a/open-api/bin/generate-dart-sdk.sh b/open-api/bin/generate-dart-sdk.sh index dd86970d18..200926afdf 100755 --- a/open-api/bin/generate-dart-sdk.sh +++ b/open-api/bin/generate-dart-sdk.sh @@ -11,15 +11,15 @@ openapi-generator-cli author template -g dart -o "$TEMPLATE_DIR" patch --no-backup-if-mismatch -u "$TEMPLATE_DIR/api.mustache" <./templates/mobile/api.mustache.patch patch --no-backup-if-mismatch -u "$TEMPLATE_DIR/serialization/native/native_class.mustache" <./templates/mobile/serialization/native/native_class.mustache.patch -rm -rf ../mobile/openapi +rm -rf ../mobile/generated/openapi -openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi -t "$TEMPLATE_DIR" --additional-properties=useOptional=true +openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/generated/openapi -t "$TEMPLATE_DIR" --additional-properties=useOptional=true # Post generate patches -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api_client.dart <./patch/api_client.dart.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/api.dart <./patch/api.dart.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch -patch --no-backup-if-mismatch -u ../mobile/openapi/lib/model/asset_edit_action_item_dto.dart <./patch/asset_edit_action_item_dto.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/api_client.dart <./patch/api_client.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/api.dart <./patch/api.dart.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/pubspec.yaml <./patch/pubspec_immich_mobile.yaml.patch +patch --no-backup-if-mismatch -u ../mobile/generated/openapi/lib/model/asset_edit_action_item_dto.dart <./patch/asset_edit_action_item_dto.dart.patch # Don't include analysis_options.yaml for the generated openapi files -# so that language servers can properly exclude the mobile/openapi directory -rm ../mobile/openapi/analysis_options.yaml +# so that language servers can properly exclude the mobile/generated/openapi directory +rm ../mobile/generated/openapi/analysis_options.yaml diff --git a/renovate.json b/renovate.json index 0fdf5a7f69..f6be970701 100644 --- a/renovate.json +++ b/renovate.json @@ -39,7 +39,6 @@ } ], "ignorePaths": [ - "mobile/openapi/pubspec.yaml", "mobile/ios", "mobile/android" ],