🚀
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# See https://dart.dev/guides/libraries/private-files
|
||||
|
||||
# Files and directories created by pub
|
||||
.dart_tool/
|
||||
.buildlog
|
||||
.packages
|
||||
.project
|
||||
.pub/
|
||||
build/
|
||||
**/packages/
|
||||
|
||||
# Files created by dart2js
|
||||
# (Most Dart developers will use pub build to compile Dart, use/modify these
|
||||
# rules if you intend to use dart2js directly
|
||||
# Convention is to use extension '.dart.js' for Dart compiled to Javascript to
|
||||
# differentiate from explicit Javascript files)
|
||||
*.dart.js
|
||||
*.part.js
|
||||
*.js.deps
|
||||
*.js.map
|
||||
*.info.json
|
||||
|
||||
# Directory created by dartdoc
|
||||
doc/api/
|
||||
|
||||
# Don't commit pubspec lock file
|
||||
# (Library packages only! Remove pattern if developing an application package)
|
||||
pubspec.lock
|
||||
|
||||
# Don’t commit files and directories created by other development environments.
|
||||
# For example, if your development environment creates any of the following files,
|
||||
# consider putting them in a global ignore file:
|
||||
|
||||
# IntelliJ
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# Mac
|
||||
.DS_Store
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,221 @@
|
||||
.gitignore
|
||||
.openapi-generator-ignore
|
||||
README.md
|
||||
analysis_options.yaml
|
||||
lib/openapi.dart
|
||||
lib/src/api.dart
|
||||
lib/src/api/activity_api.dart
|
||||
lib/src/api/album_api.dart
|
||||
lib/src/api/api_key_api.dart
|
||||
lib/src/api/asset_api.dart
|
||||
lib/src/api/audit_api.dart
|
||||
lib/src/api/authentication_api.dart
|
||||
lib/src/api/download_api.dart
|
||||
lib/src/api/face_api.dart
|
||||
lib/src/api/file_report_api.dart
|
||||
lib/src/api/job_api.dart
|
||||
lib/src/api/library_api.dart
|
||||
lib/src/api/memory_api.dart
|
||||
lib/src/api/o_auth_api.dart
|
||||
lib/src/api/partner_api.dart
|
||||
lib/src/api/person_api.dart
|
||||
lib/src/api/search_api.dart
|
||||
lib/src/api/server_info_api.dart
|
||||
lib/src/api/sessions_api.dart
|
||||
lib/src/api/shared_link_api.dart
|
||||
lib/src/api/sync_api.dart
|
||||
lib/src/api/system_config_api.dart
|
||||
lib/src/api/system_metadata_api.dart
|
||||
lib/src/api/tag_api.dart
|
||||
lib/src/api/timeline_api.dart
|
||||
lib/src/api/trash_api.dart
|
||||
lib/src/api/user_api.dart
|
||||
lib/src/api_util.dart
|
||||
lib/src/auth/api_key_auth.dart
|
||||
lib/src/auth/auth.dart
|
||||
lib/src/auth/basic_auth.dart
|
||||
lib/src/auth/bearer_auth.dart
|
||||
lib/src/auth/oauth.dart
|
||||
lib/src/date_serializer.dart
|
||||
lib/src/model/activity_create_dto.dart
|
||||
lib/src/model/activity_response_dto.dart
|
||||
lib/src/model/activity_statistics_response_dto.dart
|
||||
lib/src/model/add_users_dto.dart
|
||||
lib/src/model/admin_onboarding_update_dto.dart
|
||||
lib/src/model/album_count_response_dto.dart
|
||||
lib/src/model/album_response_dto.dart
|
||||
lib/src/model/all_job_status_response_dto.dart
|
||||
lib/src/model/api_key_create_dto.dart
|
||||
lib/src/model/api_key_create_response_dto.dart
|
||||
lib/src/model/api_key_response_dto.dart
|
||||
lib/src/model/api_key_update_dto.dart
|
||||
lib/src/model/asset_bulk_delete_dto.dart
|
||||
lib/src/model/asset_bulk_update_dto.dart
|
||||
lib/src/model/asset_bulk_upload_check_dto.dart
|
||||
lib/src/model/asset_bulk_upload_check_item.dart
|
||||
lib/src/model/asset_bulk_upload_check_response_dto.dart
|
||||
lib/src/model/asset_bulk_upload_check_result.dart
|
||||
lib/src/model/asset_delta_sync_response_dto.dart
|
||||
lib/src/model/asset_face_response_dto.dart
|
||||
lib/src/model/asset_face_update_dto.dart
|
||||
lib/src/model/asset_face_update_item.dart
|
||||
lib/src/model/asset_face_without_person_response_dto.dart
|
||||
lib/src/model/asset_file_upload_response_dto.dart
|
||||
lib/src/model/asset_ids_dto.dart
|
||||
lib/src/model/asset_ids_response_dto.dart
|
||||
lib/src/model/asset_job_name.dart
|
||||
lib/src/model/asset_jobs_dto.dart
|
||||
lib/src/model/asset_order.dart
|
||||
lib/src/model/asset_response_dto.dart
|
||||
lib/src/model/asset_stats_response_dto.dart
|
||||
lib/src/model/asset_type_enum.dart
|
||||
lib/src/model/audio_codec.dart
|
||||
lib/src/model/audit_deletes_response_dto.dart
|
||||
lib/src/model/bulk_id_response_dto.dart
|
||||
lib/src/model/bulk_ids_dto.dart
|
||||
lib/src/model/change_password_dto.dart
|
||||
lib/src/model/check_existing_assets_dto.dart
|
||||
lib/src/model/check_existing_assets_response_dto.dart
|
||||
lib/src/model/clip_config.dart
|
||||
lib/src/model/clip_mode.dart
|
||||
lib/src/model/colorspace.dart
|
||||
lib/src/model/cq_mode.dart
|
||||
lib/src/model/create_album_dto.dart
|
||||
lib/src/model/create_asset_dto.dart
|
||||
lib/src/model/create_library_dto.dart
|
||||
lib/src/model/create_profile_image_dto.dart
|
||||
lib/src/model/create_profile_image_response_dto.dart
|
||||
lib/src/model/create_tag_dto.dart
|
||||
lib/src/model/create_user_dto.dart
|
||||
lib/src/model/curated_locations_response_dto.dart
|
||||
lib/src/model/curated_objects_response_dto.dart
|
||||
lib/src/model/date.dart
|
||||
lib/src/model/delete_user_dto.dart
|
||||
lib/src/model/download_archive_info.dart
|
||||
lib/src/model/download_info_dto.dart
|
||||
lib/src/model/download_response_dto.dart
|
||||
lib/src/model/entity_type.dart
|
||||
lib/src/model/exif_response_dto.dart
|
||||
lib/src/model/face_dto.dart
|
||||
lib/src/model/file_checksum_dto.dart
|
||||
lib/src/model/file_checksum_response_dto.dart
|
||||
lib/src/model/file_report_dto.dart
|
||||
lib/src/model/file_report_fix_dto.dart
|
||||
lib/src/model/file_report_item_dto.dart
|
||||
lib/src/model/image_format.dart
|
||||
lib/src/model/job_command.dart
|
||||
lib/src/model/job_command_dto.dart
|
||||
lib/src/model/job_counts_dto.dart
|
||||
lib/src/model/job_name.dart
|
||||
lib/src/model/job_settings_dto.dart
|
||||
lib/src/model/job_status_dto.dart
|
||||
lib/src/model/library_response_dto.dart
|
||||
lib/src/model/library_stats_response_dto.dart
|
||||
lib/src/model/library_type.dart
|
||||
lib/src/model/log_level.dart
|
||||
lib/src/model/login_credential_dto.dart
|
||||
lib/src/model/login_response_dto.dart
|
||||
lib/src/model/logout_response_dto.dart
|
||||
lib/src/model/map_marker_response_dto.dart
|
||||
lib/src/model/map_theme.dart
|
||||
lib/src/model/memory_create_dto.dart
|
||||
lib/src/model/memory_lane_response_dto.dart
|
||||
lib/src/model/memory_response_dto.dart
|
||||
lib/src/model/memory_type.dart
|
||||
lib/src/model/memory_update_dto.dart
|
||||
lib/src/model/merge_person_dto.dart
|
||||
lib/src/model/metadata_search_dto.dart
|
||||
lib/src/model/model_type.dart
|
||||
lib/src/model/o_auth_authorize_response_dto.dart
|
||||
lib/src/model/o_auth_callback_dto.dart
|
||||
lib/src/model/o_auth_config_dto.dart
|
||||
lib/src/model/on_this_day_dto.dart
|
||||
lib/src/model/partner_response_dto.dart
|
||||
lib/src/model/path_entity_type.dart
|
||||
lib/src/model/path_type.dart
|
||||
lib/src/model/people_response_dto.dart
|
||||
lib/src/model/people_update_dto.dart
|
||||
lib/src/model/people_update_item.dart
|
||||
lib/src/model/person_create_dto.dart
|
||||
lib/src/model/person_response_dto.dart
|
||||
lib/src/model/person_statistics_response_dto.dart
|
||||
lib/src/model/person_update_dto.dart
|
||||
lib/src/model/person_with_faces_response_dto.dart
|
||||
lib/src/model/places_response_dto.dart
|
||||
lib/src/model/queue_status_dto.dart
|
||||
lib/src/model/reaction_level.dart
|
||||
lib/src/model/reaction_type.dart
|
||||
lib/src/model/recognition_config.dart
|
||||
lib/src/model/reverse_geocoding_state_response_dto.dart
|
||||
lib/src/model/scan_library_dto.dart
|
||||
lib/src/model/search_album_response_dto.dart
|
||||
lib/src/model/search_asset_response_dto.dart
|
||||
lib/src/model/search_explore_item.dart
|
||||
lib/src/model/search_explore_response_dto.dart
|
||||
lib/src/model/search_facet_count_response_dto.dart
|
||||
lib/src/model/search_facet_response_dto.dart
|
||||
lib/src/model/search_response_dto.dart
|
||||
lib/src/model/search_suggestion_type.dart
|
||||
lib/src/model/server_config_dto.dart
|
||||
lib/src/model/server_features_dto.dart
|
||||
lib/src/model/server_info_response_dto.dart
|
||||
lib/src/model/server_media_types_response_dto.dart
|
||||
lib/src/model/server_ping_response.dart
|
||||
lib/src/model/server_stats_response_dto.dart
|
||||
lib/src/model/server_theme_dto.dart
|
||||
lib/src/model/server_version_response_dto.dart
|
||||
lib/src/model/session_response_dto.dart
|
||||
lib/src/model/shared_link_create_dto.dart
|
||||
lib/src/model/shared_link_edit_dto.dart
|
||||
lib/src/model/shared_link_response_dto.dart
|
||||
lib/src/model/shared_link_type.dart
|
||||
lib/src/model/sign_up_dto.dart
|
||||
lib/src/model/smart_info_response_dto.dart
|
||||
lib/src/model/smart_search_dto.dart
|
||||
lib/src/model/system_config_dto.dart
|
||||
lib/src/model/system_config_f_fmpeg_dto.dart
|
||||
lib/src/model/system_config_image_dto.dart
|
||||
lib/src/model/system_config_job_dto.dart
|
||||
lib/src/model/system_config_library_dto.dart
|
||||
lib/src/model/system_config_library_scan_dto.dart
|
||||
lib/src/model/system_config_library_watch_dto.dart
|
||||
lib/src/model/system_config_logging_dto.dart
|
||||
lib/src/model/system_config_machine_learning_dto.dart
|
||||
lib/src/model/system_config_map_dto.dart
|
||||
lib/src/model/system_config_new_version_check_dto.dart
|
||||
lib/src/model/system_config_o_auth_dto.dart
|
||||
lib/src/model/system_config_password_login_dto.dart
|
||||
lib/src/model/system_config_reverse_geocoding_dto.dart
|
||||
lib/src/model/system_config_server_dto.dart
|
||||
lib/src/model/system_config_storage_template_dto.dart
|
||||
lib/src/model/system_config_template_storage_option_dto.dart
|
||||
lib/src/model/system_config_theme_dto.dart
|
||||
lib/src/model/system_config_trash_dto.dart
|
||||
lib/src/model/system_config_user_dto.dart
|
||||
lib/src/model/tag_response_dto.dart
|
||||
lib/src/model/tag_type_enum.dart
|
||||
lib/src/model/thumbnail_format.dart
|
||||
lib/src/model/time_bucket_response_dto.dart
|
||||
lib/src/model/time_bucket_size.dart
|
||||
lib/src/model/tone_mapping.dart
|
||||
lib/src/model/transcode_hw_accel.dart
|
||||
lib/src/model/transcode_policy.dart
|
||||
lib/src/model/update_album_dto.dart
|
||||
lib/src/model/update_asset_dto.dart
|
||||
lib/src/model/update_library_dto.dart
|
||||
lib/src/model/update_partner_dto.dart
|
||||
lib/src/model/update_stack_parent_dto.dart
|
||||
lib/src/model/update_tag_dto.dart
|
||||
lib/src/model/update_user_dto.dart
|
||||
lib/src/model/usage_by_user_dto.dart
|
||||
lib/src/model/user_avatar_color.dart
|
||||
lib/src/model/user_dto.dart
|
||||
lib/src/model/user_response_dto.dart
|
||||
lib/src/model/user_status.dart
|
||||
lib/src/model/validate_access_token_response_dto.dart
|
||||
lib/src/model/validate_library_dto.dart
|
||||
lib/src/model/validate_library_import_path_response_dto.dart
|
||||
lib/src/model/validate_library_response_dto.dart
|
||||
lib/src/model/video_codec.dart
|
||||
lib/src/serializers.dart
|
||||
pubspec.yaml
|
||||
@@ -0,0 +1 @@
|
||||
7.2.0
|
||||
@@ -0,0 +1,427 @@
|
||||
# openapi (EXPERIMENTAL)
|
||||
Immich API
|
||||
|
||||
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
||||
|
||||
- API version: 1.102.3
|
||||
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen
|
||||
|
||||
## Requirements
|
||||
|
||||
* Dart 2.15.0+ or Flutter 2.8.0+
|
||||
* Dio 5.0.0+ (https://pub.dev/packages/dio)
|
||||
|
||||
## Installation & Usage
|
||||
|
||||
### pub.dev
|
||||
To use the package from [pub.dev](https://pub.dev), please include the following in pubspec.yaml
|
||||
```yaml
|
||||
dependencies:
|
||||
openapi: 1.0.0
|
||||
```
|
||||
|
||||
### Github
|
||||
If this Dart package is published to Github, please include the following in pubspec.yaml
|
||||
```yaml
|
||||
dependencies:
|
||||
openapi:
|
||||
git:
|
||||
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
||||
#ref: main
|
||||
```
|
||||
|
||||
### Local development
|
||||
To use the package from your local drive, please include the following in pubspec.yaml
|
||||
```yaml
|
||||
dependencies:
|
||||
openapi:
|
||||
path: /path/to/openapi
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Please follow the [installation procedure](#installation--usage) and then run the following:
|
||||
|
||||
```dart
|
||||
import 'package:openapi/openapi.dart';
|
||||
|
||||
|
||||
final api = Openapi().getAPIKeyApi();
|
||||
final APIKeyCreateDto aPIKeyCreateDto = ; // APIKeyCreateDto |
|
||||
|
||||
try {
|
||||
final response = await api.createApiKey(aPIKeyCreateDto);
|
||||
print(response);
|
||||
} catch on DioException (e) {
|
||||
print("Exception when calling APIKeyApi->createApiKey: $e\n");
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Documentation for API Endpoints
|
||||
|
||||
All URIs are relative to */api*
|
||||
|
||||
Class | Method | HTTP request | Description
|
||||
------------ | ------------- | ------------- | -------------
|
||||
[*APIKeyApi*](doc/APIKeyApi.md) | [**createApiKey**](doc/APIKeyApi.md#createapikey) | **POST** /api-key |
|
||||
[*APIKeyApi*](doc/APIKeyApi.md) | [**deleteApiKey**](doc/APIKeyApi.md#deleteapikey) | **DELETE** /api-key/{id} |
|
||||
[*APIKeyApi*](doc/APIKeyApi.md) | [**getApiKey**](doc/APIKeyApi.md#getapikey) | **GET** /api-key/{id} |
|
||||
[*APIKeyApi*](doc/APIKeyApi.md) | [**getApiKeys**](doc/APIKeyApi.md#getapikeys) | **GET** /api-key |
|
||||
[*APIKeyApi*](doc/APIKeyApi.md) | [**updateApiKey**](doc/APIKeyApi.md#updateapikey) | **PUT** /api-key/{id} |
|
||||
[*ActivityApi*](doc/ActivityApi.md) | [**createActivity**](doc/ActivityApi.md#createactivity) | **POST** /activity |
|
||||
[*ActivityApi*](doc/ActivityApi.md) | [**deleteActivity**](doc/ActivityApi.md#deleteactivity) | **DELETE** /activity/{id} |
|
||||
[*ActivityApi*](doc/ActivityApi.md) | [**getActivities**](doc/ActivityApi.md#getactivities) | **GET** /activity |
|
||||
[*ActivityApi*](doc/ActivityApi.md) | [**getActivityStatistics**](doc/ActivityApi.md#getactivitystatistics) | **GET** /activity/statistics |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**addAssetsToAlbum**](doc/AlbumApi.md#addassetstoalbum) | **PUT** /album/{id}/assets |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**addUsersToAlbum**](doc/AlbumApi.md#adduserstoalbum) | **PUT** /album/{id}/users |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**createAlbum**](doc/AlbumApi.md#createalbum) | **POST** /album |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**deleteAlbum**](doc/AlbumApi.md#deletealbum) | **DELETE** /album/{id} |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**getAlbumCount**](doc/AlbumApi.md#getalbumcount) | **GET** /album/count |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**getAlbumInfo**](doc/AlbumApi.md#getalbuminfo) | **GET** /album/{id} |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**getAllAlbums**](doc/AlbumApi.md#getallalbums) | **GET** /album |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**removeAssetFromAlbum**](doc/AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{id}/assets |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**removeUserFromAlbum**](doc/AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{id}/user/{userId} |
|
||||
[*AlbumApi*](doc/AlbumApi.md) | [**updateAlbumInfo**](doc/AlbumApi.md#updatealbuminfo) | **PATCH** /album/{id} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**checkBulkUpload**](doc/AssetApi.md#checkbulkupload) | **POST** /asset/bulk-upload-check |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**checkExistingAssets**](doc/AssetApi.md#checkexistingassets) | **POST** /asset/exist |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**deleteAssets**](doc/AssetApi.md#deleteassets) | **DELETE** /asset |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAllAssets**](doc/AssetApi.md#getallassets) | **GET** /asset |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAllUserAssetsByDeviceId**](doc/AssetApi.md#getalluserassetsbydeviceid) | **GET** /asset/device/{deviceId} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAssetInfo**](doc/AssetApi.md#getassetinfo) | **GET** /asset/{id} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAssetSearchTerms**](doc/AssetApi.md#getassetsearchterms) | **GET** /asset/search-terms |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAssetStatistics**](doc/AssetApi.md#getassetstatistics) | **GET** /asset/statistics |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getAssetThumbnail**](doc/AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{id} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getCuratedLocations**](doc/AssetApi.md#getcuratedlocations) | **GET** /asset/curated-locations |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getCuratedObjects**](doc/AssetApi.md#getcuratedobjects) | **GET** /asset/curated-objects |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getMapMarkers**](doc/AssetApi.md#getmapmarkers) | **GET** /asset/map-marker |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getMemoryLane**](doc/AssetApi.md#getmemorylane) | **GET** /asset/memory-lane |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**getRandom**](doc/AssetApi.md#getrandom) | **GET** /asset/random |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**runAssetJobs**](doc/AssetApi.md#runassetjobs) | **POST** /asset/jobs |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**searchAssets**](doc/AssetApi.md#searchassets) | **GET** /assets |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**serveFile**](doc/AssetApi.md#servefile) | **GET** /asset/file/{id} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**updateAsset**](doc/AssetApi.md#updateasset) | **PUT** /asset/{id} |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**updateAssets**](doc/AssetApi.md#updateassets) | **PUT** /asset |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**updateStackParent**](doc/AssetApi.md#updatestackparent) | **PUT** /asset/stack/parent |
|
||||
[*AssetApi*](doc/AssetApi.md) | [**uploadFile**](doc/AssetApi.md#uploadfile) | **POST** /asset/upload |
|
||||
[*AuditApi*](doc/AuditApi.md) | [**getAuditDeletes**](doc/AuditApi.md#getauditdeletes) | **GET** /audit/deletes |
|
||||
[*AuthenticationApi*](doc/AuthenticationApi.md) | [**changePassword**](doc/AuthenticationApi.md#changepassword) | **POST** /auth/change-password |
|
||||
[*AuthenticationApi*](doc/AuthenticationApi.md) | [**login**](doc/AuthenticationApi.md#login) | **POST** /auth/login |
|
||||
[*AuthenticationApi*](doc/AuthenticationApi.md) | [**logout**](doc/AuthenticationApi.md#logout) | **POST** /auth/logout |
|
||||
[*AuthenticationApi*](doc/AuthenticationApi.md) | [**signUpAdmin**](doc/AuthenticationApi.md#signupadmin) | **POST** /auth/admin-sign-up |
|
||||
[*AuthenticationApi*](doc/AuthenticationApi.md) | [**validateAccessToken**](doc/AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
|
||||
[*DownloadApi*](doc/DownloadApi.md) | [**downloadArchive**](doc/DownloadApi.md#downloadarchive) | **POST** /download/archive |
|
||||
[*DownloadApi*](doc/DownloadApi.md) | [**downloadFile**](doc/DownloadApi.md#downloadfile) | **POST** /download/asset/{id} |
|
||||
[*DownloadApi*](doc/DownloadApi.md) | [**getDownloadInfo**](doc/DownloadApi.md#getdownloadinfo) | **POST** /download/info |
|
||||
[*FaceApi*](doc/FaceApi.md) | [**getFaces**](doc/FaceApi.md#getfaces) | **GET** /face |
|
||||
[*FaceApi*](doc/FaceApi.md) | [**reassignFacesById**](doc/FaceApi.md#reassignfacesbyid) | **PUT** /face/{id} |
|
||||
[*FileReportApi*](doc/FileReportApi.md) | [**fixAuditFiles**](doc/FileReportApi.md#fixauditfiles) | **POST** /report/fix |
|
||||
[*FileReportApi*](doc/FileReportApi.md) | [**getAuditFiles**](doc/FileReportApi.md#getauditfiles) | **GET** /report |
|
||||
[*FileReportApi*](doc/FileReportApi.md) | [**getFileChecksums**](doc/FileReportApi.md#getfilechecksums) | **POST** /report/checksum |
|
||||
[*JobApi*](doc/JobApi.md) | [**getAllJobsStatus**](doc/JobApi.md#getalljobsstatus) | **GET** /jobs |
|
||||
[*JobApi*](doc/JobApi.md) | [**sendJobCommand**](doc/JobApi.md#sendjobcommand) | **PUT** /jobs/{id} |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**createLibrary**](doc/LibraryApi.md#createlibrary) | **POST** /library |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**deleteLibrary**](doc/LibraryApi.md#deletelibrary) | **DELETE** /library/{id} |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**getAllLibraries**](doc/LibraryApi.md#getalllibraries) | **GET** /library |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**getLibrary**](doc/LibraryApi.md#getlibrary) | **GET** /library/{id} |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**getLibraryStatistics**](doc/LibraryApi.md#getlibrarystatistics) | **GET** /library/{id}/statistics |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**removeOfflineFiles**](doc/LibraryApi.md#removeofflinefiles) | **POST** /library/{id}/removeOffline |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**scanLibrary**](doc/LibraryApi.md#scanlibrary) | **POST** /library/{id}/scan |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**updateLibrary**](doc/LibraryApi.md#updatelibrary) | **PUT** /library/{id} |
|
||||
[*LibraryApi*](doc/LibraryApi.md) | [**validate**](doc/LibraryApi.md#validate) | **POST** /library/{id}/validate |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**addMemoryAssets**](doc/MemoryApi.md#addmemoryassets) | **PUT** /memories/{id}/assets |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**createMemory**](doc/MemoryApi.md#creatememory) | **POST** /memories |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**deleteMemory**](doc/MemoryApi.md#deletememory) | **DELETE** /memories/{id} |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**getMemory**](doc/MemoryApi.md#getmemory) | **GET** /memories/{id} |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**removeMemoryAssets**](doc/MemoryApi.md#removememoryassets) | **DELETE** /memories/{id}/assets |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**searchMemories**](doc/MemoryApi.md#searchmemories) | **GET** /memories |
|
||||
[*MemoryApi*](doc/MemoryApi.md) | [**updateMemory**](doc/MemoryApi.md#updatememory) | **PUT** /memories/{id} |
|
||||
[*OAuthApi*](doc/OAuthApi.md) | [**finishOAuth**](doc/OAuthApi.md#finishoauth) | **POST** /oauth/callback |
|
||||
[*OAuthApi*](doc/OAuthApi.md) | [**linkOAuthAccount**](doc/OAuthApi.md#linkoauthaccount) | **POST** /oauth/link |
|
||||
[*OAuthApi*](doc/OAuthApi.md) | [**redirectOAuthToMobile**](doc/OAuthApi.md#redirectoauthtomobile) | **GET** /oauth/mobile-redirect |
|
||||
[*OAuthApi*](doc/OAuthApi.md) | [**startOAuth**](doc/OAuthApi.md#startoauth) | **POST** /oauth/authorize |
|
||||
[*OAuthApi*](doc/OAuthApi.md) | [**unlinkOAuthAccount**](doc/OAuthApi.md#unlinkoauthaccount) | **POST** /oauth/unlink |
|
||||
[*PartnerApi*](doc/PartnerApi.md) | [**createPartner**](doc/PartnerApi.md#createpartner) | **POST** /partner/{id} |
|
||||
[*PartnerApi*](doc/PartnerApi.md) | [**getPartners**](doc/PartnerApi.md#getpartners) | **GET** /partner |
|
||||
[*PartnerApi*](doc/PartnerApi.md) | [**removePartner**](doc/PartnerApi.md#removepartner) | **DELETE** /partner/{id} |
|
||||
[*PartnerApi*](doc/PartnerApi.md) | [**updatePartner**](doc/PartnerApi.md#updatepartner) | **PUT** /partner/{id} |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**createPerson**](doc/PersonApi.md#createperson) | **POST** /person |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**getAllPeople**](doc/PersonApi.md#getallpeople) | **GET** /person |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**getPerson**](doc/PersonApi.md#getperson) | **GET** /person/{id} |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**getPersonAssets**](doc/PersonApi.md#getpersonassets) | **GET** /person/{id}/assets |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**getPersonStatistics**](doc/PersonApi.md#getpersonstatistics) | **GET** /person/{id}/statistics |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**getPersonThumbnail**](doc/PersonApi.md#getpersonthumbnail) | **GET** /person/{id}/thumbnail |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**mergePerson**](doc/PersonApi.md#mergeperson) | **POST** /person/{id}/merge |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**reassignFaces**](doc/PersonApi.md#reassignfaces) | **PUT** /person/{id}/reassign |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**updatePeople**](doc/PersonApi.md#updatepeople) | **PUT** /person |
|
||||
[*PersonApi*](doc/PersonApi.md) | [**updatePerson**](doc/PersonApi.md#updateperson) | **PUT** /person/{id} |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**getAssetsByCity**](doc/SearchApi.md#getassetsbycity) | **GET** /search/cities |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**getExploreData**](doc/SearchApi.md#getexploredata) | **GET** /search/explore |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**getSearchSuggestions**](doc/SearchApi.md#getsearchsuggestions) | **GET** /search/suggestions |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**search**](doc/SearchApi.md#search) | **GET** /search |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**searchMetadata**](doc/SearchApi.md#searchmetadata) | **POST** /search/metadata |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**searchPerson**](doc/SearchApi.md#searchperson) | **GET** /search/person |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**searchPlaces**](doc/SearchApi.md#searchplaces) | **GET** /search/places |
|
||||
[*SearchApi*](doc/SearchApi.md) | [**searchSmart**](doc/SearchApi.md#searchsmart) | **POST** /search/smart |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerConfig**](doc/ServerInfoApi.md#getserverconfig) | **GET** /server-info/config |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerFeatures**](doc/ServerInfoApi.md#getserverfeatures) | **GET** /server-info/features |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerInfo**](doc/ServerInfoApi.md#getserverinfo) | **GET** /server-info |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerStatistics**](doc/ServerInfoApi.md#getserverstatistics) | **GET** /server-info/statistics |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getServerVersion**](doc/ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getSupportedMediaTypes**](doc/ServerInfoApi.md#getsupportedmediatypes) | **GET** /server-info/media-types |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**getTheme**](doc/ServerInfoApi.md#gettheme) | **GET** /server-info/theme |
|
||||
[*ServerInfoApi*](doc/ServerInfoApi.md) | [**pingServer**](doc/ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
|
||||
[*SessionsApi*](doc/SessionsApi.md) | [**deleteAllSessions**](doc/SessionsApi.md#deleteallsessions) | **DELETE** /sessions |
|
||||
[*SessionsApi*](doc/SessionsApi.md) | [**deleteSession**](doc/SessionsApi.md#deletesession) | **DELETE** /sessions/{id} |
|
||||
[*SessionsApi*](doc/SessionsApi.md) | [**getSessions**](doc/SessionsApi.md#getsessions) | **GET** /sessions |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**addSharedLinkAssets**](doc/SharedLinkApi.md#addsharedlinkassets) | **PUT** /shared-link/{id}/assets |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**createSharedLink**](doc/SharedLinkApi.md#createsharedlink) | **POST** /shared-link |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getAllSharedLinks**](doc/SharedLinkApi.md#getallsharedlinks) | **GET** /shared-link |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getMySharedLink**](doc/SharedLinkApi.md#getmysharedlink) | **GET** /shared-link/me |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**getSharedLinkById**](doc/SharedLinkApi.md#getsharedlinkbyid) | **GET** /shared-link/{id} |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**removeSharedLink**](doc/SharedLinkApi.md#removesharedlink) | **DELETE** /shared-link/{id} |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**removeSharedLinkAssets**](doc/SharedLinkApi.md#removesharedlinkassets) | **DELETE** /shared-link/{id}/assets |
|
||||
[*SharedLinkApi*](doc/SharedLinkApi.md) | [**updateSharedLink**](doc/SharedLinkApi.md#updatesharedlink) | **PATCH** /shared-link/{id} |
|
||||
[*SyncApi*](doc/SyncApi.md) | [**getAllForUserFullSync**](doc/SyncApi.md#getallforuserfullsync) | **GET** /sync/full-sync |
|
||||
[*SyncApi*](doc/SyncApi.md) | [**getDeltaSync**](doc/SyncApi.md#getdeltasync) | **GET** /sync/delta-sync |
|
||||
[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getConfig**](doc/SystemConfigApi.md#getconfig) | **GET** /system-config |
|
||||
[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getConfigDefaults**](doc/SystemConfigApi.md#getconfigdefaults) | **GET** /system-config/defaults |
|
||||
[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getMapStyle**](doc/SystemConfigApi.md#getmapstyle) | **GET** /system-config/map/style.json |
|
||||
[*SystemConfigApi*](doc/SystemConfigApi.md) | [**getStorageTemplateOptions**](doc/SystemConfigApi.md#getstoragetemplateoptions) | **GET** /system-config/storage-template-options |
|
||||
[*SystemConfigApi*](doc/SystemConfigApi.md) | [**updateConfig**](doc/SystemConfigApi.md#updateconfig) | **PUT** /system-config |
|
||||
[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**getAdminOnboarding**](doc/SystemMetadataApi.md#getadminonboarding) | **GET** /system-metadata/admin-onboarding |
|
||||
[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**getReverseGeocodingState**](doc/SystemMetadataApi.md#getreversegeocodingstate) | **GET** /system-metadata/reverse-geocoding-state |
|
||||
[*SystemMetadataApi*](doc/SystemMetadataApi.md) | [**updateAdminOnboarding**](doc/SystemMetadataApi.md#updateadminonboarding) | **POST** /system-metadata/admin-onboarding |
|
||||
[*TagApi*](doc/TagApi.md) | [**createTag**](doc/TagApi.md#createtag) | **POST** /tag |
|
||||
[*TagApi*](doc/TagApi.md) | [**deleteTag**](doc/TagApi.md#deletetag) | **DELETE** /tag/{id} |
|
||||
[*TagApi*](doc/TagApi.md) | [**getAllTags**](doc/TagApi.md#getalltags) | **GET** /tag |
|
||||
[*TagApi*](doc/TagApi.md) | [**getTagAssets**](doc/TagApi.md#gettagassets) | **GET** /tag/{id}/assets |
|
||||
[*TagApi*](doc/TagApi.md) | [**getTagById**](doc/TagApi.md#gettagbyid) | **GET** /tag/{id} |
|
||||
[*TagApi*](doc/TagApi.md) | [**tagAssets**](doc/TagApi.md#tagassets) | **PUT** /tag/{id}/assets |
|
||||
[*TagApi*](doc/TagApi.md) | [**untagAssets**](doc/TagApi.md#untagassets) | **DELETE** /tag/{id}/assets |
|
||||
[*TagApi*](doc/TagApi.md) | [**updateTag**](doc/TagApi.md#updatetag) | **PATCH** /tag/{id} |
|
||||
[*TimelineApi*](doc/TimelineApi.md) | [**getTimeBucket**](doc/TimelineApi.md#gettimebucket) | **GET** /timeline/bucket |
|
||||
[*TimelineApi*](doc/TimelineApi.md) | [**getTimeBuckets**](doc/TimelineApi.md#gettimebuckets) | **GET** /timeline/buckets |
|
||||
[*TrashApi*](doc/TrashApi.md) | [**emptyTrash**](doc/TrashApi.md#emptytrash) | **POST** /trash/empty |
|
||||
[*TrashApi*](doc/TrashApi.md) | [**restoreAssets**](doc/TrashApi.md#restoreassets) | **POST** /trash/restore/assets |
|
||||
[*TrashApi*](doc/TrashApi.md) | [**restoreTrash**](doc/TrashApi.md#restoretrash) | **POST** /trash/restore |
|
||||
[*UserApi*](doc/UserApi.md) | [**createProfileImage**](doc/UserApi.md#createprofileimage) | **POST** /user/profile-image |
|
||||
[*UserApi*](doc/UserApi.md) | [**createUser**](doc/UserApi.md#createuser) | **POST** /user |
|
||||
[*UserApi*](doc/UserApi.md) | [**deleteProfileImage**](doc/UserApi.md#deleteprofileimage) | **DELETE** /user/profile-image |
|
||||
[*UserApi*](doc/UserApi.md) | [**deleteUser**](doc/UserApi.md#deleteuser) | **DELETE** /user/{id} |
|
||||
[*UserApi*](doc/UserApi.md) | [**getAllUsers**](doc/UserApi.md#getallusers) | **GET** /user |
|
||||
[*UserApi*](doc/UserApi.md) | [**getMyUserInfo**](doc/UserApi.md#getmyuserinfo) | **GET** /user/me |
|
||||
[*UserApi*](doc/UserApi.md) | [**getProfileImage**](doc/UserApi.md#getprofileimage) | **GET** /user/profile-image/{id} |
|
||||
[*UserApi*](doc/UserApi.md) | [**getUserById**](doc/UserApi.md#getuserbyid) | **GET** /user/info/{id} |
|
||||
[*UserApi*](doc/UserApi.md) | [**restoreUser**](doc/UserApi.md#restoreuser) | **POST** /user/{id}/restore |
|
||||
[*UserApi*](doc/UserApi.md) | [**updateUser**](doc/UserApi.md#updateuser) | **PUT** /user |
|
||||
|
||||
|
||||
## Documentation For Models
|
||||
|
||||
- [APIKeyCreateDto](doc/APIKeyCreateDto.md)
|
||||
- [APIKeyCreateResponseDto](doc/APIKeyCreateResponseDto.md)
|
||||
- [APIKeyResponseDto](doc/APIKeyResponseDto.md)
|
||||
- [APIKeyUpdateDto](doc/APIKeyUpdateDto.md)
|
||||
- [ActivityCreateDto](doc/ActivityCreateDto.md)
|
||||
- [ActivityResponseDto](doc/ActivityResponseDto.md)
|
||||
- [ActivityStatisticsResponseDto](doc/ActivityStatisticsResponseDto.md)
|
||||
- [AddUsersDto](doc/AddUsersDto.md)
|
||||
- [AdminOnboardingUpdateDto](doc/AdminOnboardingUpdateDto.md)
|
||||
- [AlbumCountResponseDto](doc/AlbumCountResponseDto.md)
|
||||
- [AlbumResponseDto](doc/AlbumResponseDto.md)
|
||||
- [AllJobStatusResponseDto](doc/AllJobStatusResponseDto.md)
|
||||
- [AssetBulkDeleteDto](doc/AssetBulkDeleteDto.md)
|
||||
- [AssetBulkUpdateDto](doc/AssetBulkUpdateDto.md)
|
||||
- [AssetBulkUploadCheckDto](doc/AssetBulkUploadCheckDto.md)
|
||||
- [AssetBulkUploadCheckItem](doc/AssetBulkUploadCheckItem.md)
|
||||
- [AssetBulkUploadCheckResponseDto](doc/AssetBulkUploadCheckResponseDto.md)
|
||||
- [AssetBulkUploadCheckResult](doc/AssetBulkUploadCheckResult.md)
|
||||
- [AssetDeltaSyncResponseDto](doc/AssetDeltaSyncResponseDto.md)
|
||||
- [AssetFaceResponseDto](doc/AssetFaceResponseDto.md)
|
||||
- [AssetFaceUpdateDto](doc/AssetFaceUpdateDto.md)
|
||||
- [AssetFaceUpdateItem](doc/AssetFaceUpdateItem.md)
|
||||
- [AssetFaceWithoutPersonResponseDto](doc/AssetFaceWithoutPersonResponseDto.md)
|
||||
- [AssetFileUploadResponseDto](doc/AssetFileUploadResponseDto.md)
|
||||
- [AssetIdsDto](doc/AssetIdsDto.md)
|
||||
- [AssetIdsResponseDto](doc/AssetIdsResponseDto.md)
|
||||
- [AssetJobName](doc/AssetJobName.md)
|
||||
- [AssetJobsDto](doc/AssetJobsDto.md)
|
||||
- [AssetOrder](doc/AssetOrder.md)
|
||||
- [AssetResponseDto](doc/AssetResponseDto.md)
|
||||
- [AssetStatsResponseDto](doc/AssetStatsResponseDto.md)
|
||||
- [AssetTypeEnum](doc/AssetTypeEnum.md)
|
||||
- [AudioCodec](doc/AudioCodec.md)
|
||||
- [AuditDeletesResponseDto](doc/AuditDeletesResponseDto.md)
|
||||
- [BulkIdResponseDto](doc/BulkIdResponseDto.md)
|
||||
- [BulkIdsDto](doc/BulkIdsDto.md)
|
||||
- [CLIPConfig](doc/CLIPConfig.md)
|
||||
- [CLIPMode](doc/CLIPMode.md)
|
||||
- [CQMode](doc/CQMode.md)
|
||||
- [ChangePasswordDto](doc/ChangePasswordDto.md)
|
||||
- [CheckExistingAssetsDto](doc/CheckExistingAssetsDto.md)
|
||||
- [CheckExistingAssetsResponseDto](doc/CheckExistingAssetsResponseDto.md)
|
||||
- [Colorspace](doc/Colorspace.md)
|
||||
- [CreateAlbumDto](doc/CreateAlbumDto.md)
|
||||
- [CreateAssetDto](doc/CreateAssetDto.md)
|
||||
- [CreateLibraryDto](doc/CreateLibraryDto.md)
|
||||
- [CreateProfileImageDto](doc/CreateProfileImageDto.md)
|
||||
- [CreateProfileImageResponseDto](doc/CreateProfileImageResponseDto.md)
|
||||
- [CreateTagDto](doc/CreateTagDto.md)
|
||||
- [CreateUserDto](doc/CreateUserDto.md)
|
||||
- [CuratedLocationsResponseDto](doc/CuratedLocationsResponseDto.md)
|
||||
- [CuratedObjectsResponseDto](doc/CuratedObjectsResponseDto.md)
|
||||
- [DeleteUserDto](doc/DeleteUserDto.md)
|
||||
- [DownloadArchiveInfo](doc/DownloadArchiveInfo.md)
|
||||
- [DownloadInfoDto](doc/DownloadInfoDto.md)
|
||||
- [DownloadResponseDto](doc/DownloadResponseDto.md)
|
||||
- [EntityType](doc/EntityType.md)
|
||||
- [ExifResponseDto](doc/ExifResponseDto.md)
|
||||
- [FaceDto](doc/FaceDto.md)
|
||||
- [FileChecksumDto](doc/FileChecksumDto.md)
|
||||
- [FileChecksumResponseDto](doc/FileChecksumResponseDto.md)
|
||||
- [FileReportDto](doc/FileReportDto.md)
|
||||
- [FileReportFixDto](doc/FileReportFixDto.md)
|
||||
- [FileReportItemDto](doc/FileReportItemDto.md)
|
||||
- [ImageFormat](doc/ImageFormat.md)
|
||||
- [JobCommand](doc/JobCommand.md)
|
||||
- [JobCommandDto](doc/JobCommandDto.md)
|
||||
- [JobCountsDto](doc/JobCountsDto.md)
|
||||
- [JobName](doc/JobName.md)
|
||||
- [JobSettingsDto](doc/JobSettingsDto.md)
|
||||
- [JobStatusDto](doc/JobStatusDto.md)
|
||||
- [LibraryResponseDto](doc/LibraryResponseDto.md)
|
||||
- [LibraryStatsResponseDto](doc/LibraryStatsResponseDto.md)
|
||||
- [LibraryType](doc/LibraryType.md)
|
||||
- [LogLevel](doc/LogLevel.md)
|
||||
- [LoginCredentialDto](doc/LoginCredentialDto.md)
|
||||
- [LoginResponseDto](doc/LoginResponseDto.md)
|
||||
- [LogoutResponseDto](doc/LogoutResponseDto.md)
|
||||
- [MapMarkerResponseDto](doc/MapMarkerResponseDto.md)
|
||||
- [MapTheme](doc/MapTheme.md)
|
||||
- [MemoryCreateDto](doc/MemoryCreateDto.md)
|
||||
- [MemoryLaneResponseDto](doc/MemoryLaneResponseDto.md)
|
||||
- [MemoryResponseDto](doc/MemoryResponseDto.md)
|
||||
- [MemoryType](doc/MemoryType.md)
|
||||
- [MemoryUpdateDto](doc/MemoryUpdateDto.md)
|
||||
- [MergePersonDto](doc/MergePersonDto.md)
|
||||
- [MetadataSearchDto](doc/MetadataSearchDto.md)
|
||||
- [ModelType](doc/ModelType.md)
|
||||
- [OAuthAuthorizeResponseDto](doc/OAuthAuthorizeResponseDto.md)
|
||||
- [OAuthCallbackDto](doc/OAuthCallbackDto.md)
|
||||
- [OAuthConfigDto](doc/OAuthConfigDto.md)
|
||||
- [OnThisDayDto](doc/OnThisDayDto.md)
|
||||
- [PartnerResponseDto](doc/PartnerResponseDto.md)
|
||||
- [PathEntityType](doc/PathEntityType.md)
|
||||
- [PathType](doc/PathType.md)
|
||||
- [PeopleResponseDto](doc/PeopleResponseDto.md)
|
||||
- [PeopleUpdateDto](doc/PeopleUpdateDto.md)
|
||||
- [PeopleUpdateItem](doc/PeopleUpdateItem.md)
|
||||
- [PersonCreateDto](doc/PersonCreateDto.md)
|
||||
- [PersonResponseDto](doc/PersonResponseDto.md)
|
||||
- [PersonStatisticsResponseDto](doc/PersonStatisticsResponseDto.md)
|
||||
- [PersonUpdateDto](doc/PersonUpdateDto.md)
|
||||
- [PersonWithFacesResponseDto](doc/PersonWithFacesResponseDto.md)
|
||||
- [PlacesResponseDto](doc/PlacesResponseDto.md)
|
||||
- [QueueStatusDto](doc/QueueStatusDto.md)
|
||||
- [ReactionLevel](doc/ReactionLevel.md)
|
||||
- [ReactionType](doc/ReactionType.md)
|
||||
- [RecognitionConfig](doc/RecognitionConfig.md)
|
||||
- [ReverseGeocodingStateResponseDto](doc/ReverseGeocodingStateResponseDto.md)
|
||||
- [ScanLibraryDto](doc/ScanLibraryDto.md)
|
||||
- [SearchAlbumResponseDto](doc/SearchAlbumResponseDto.md)
|
||||
- [SearchAssetResponseDto](doc/SearchAssetResponseDto.md)
|
||||
- [SearchExploreItem](doc/SearchExploreItem.md)
|
||||
- [SearchExploreResponseDto](doc/SearchExploreResponseDto.md)
|
||||
- [SearchFacetCountResponseDto](doc/SearchFacetCountResponseDto.md)
|
||||
- [SearchFacetResponseDto](doc/SearchFacetResponseDto.md)
|
||||
- [SearchResponseDto](doc/SearchResponseDto.md)
|
||||
- [SearchSuggestionType](doc/SearchSuggestionType.md)
|
||||
- [ServerConfigDto](doc/ServerConfigDto.md)
|
||||
- [ServerFeaturesDto](doc/ServerFeaturesDto.md)
|
||||
- [ServerInfoResponseDto](doc/ServerInfoResponseDto.md)
|
||||
- [ServerMediaTypesResponseDto](doc/ServerMediaTypesResponseDto.md)
|
||||
- [ServerPingResponse](doc/ServerPingResponse.md)
|
||||
- [ServerStatsResponseDto](doc/ServerStatsResponseDto.md)
|
||||
- [ServerThemeDto](doc/ServerThemeDto.md)
|
||||
- [ServerVersionResponseDto](doc/ServerVersionResponseDto.md)
|
||||
- [SessionResponseDto](doc/SessionResponseDto.md)
|
||||
- [SharedLinkCreateDto](doc/SharedLinkCreateDto.md)
|
||||
- [SharedLinkEditDto](doc/SharedLinkEditDto.md)
|
||||
- [SharedLinkResponseDto](doc/SharedLinkResponseDto.md)
|
||||
- [SharedLinkType](doc/SharedLinkType.md)
|
||||
- [SignUpDto](doc/SignUpDto.md)
|
||||
- [SmartInfoResponseDto](doc/SmartInfoResponseDto.md)
|
||||
- [SmartSearchDto](doc/SmartSearchDto.md)
|
||||
- [SystemConfigDto](doc/SystemConfigDto.md)
|
||||
- [SystemConfigFFmpegDto](doc/SystemConfigFFmpegDto.md)
|
||||
- [SystemConfigImageDto](doc/SystemConfigImageDto.md)
|
||||
- [SystemConfigJobDto](doc/SystemConfigJobDto.md)
|
||||
- [SystemConfigLibraryDto](doc/SystemConfigLibraryDto.md)
|
||||
- [SystemConfigLibraryScanDto](doc/SystemConfigLibraryScanDto.md)
|
||||
- [SystemConfigLibraryWatchDto](doc/SystemConfigLibraryWatchDto.md)
|
||||
- [SystemConfigLoggingDto](doc/SystemConfigLoggingDto.md)
|
||||
- [SystemConfigMachineLearningDto](doc/SystemConfigMachineLearningDto.md)
|
||||
- [SystemConfigMapDto](doc/SystemConfigMapDto.md)
|
||||
- [SystemConfigNewVersionCheckDto](doc/SystemConfigNewVersionCheckDto.md)
|
||||
- [SystemConfigOAuthDto](doc/SystemConfigOAuthDto.md)
|
||||
- [SystemConfigPasswordLoginDto](doc/SystemConfigPasswordLoginDto.md)
|
||||
- [SystemConfigReverseGeocodingDto](doc/SystemConfigReverseGeocodingDto.md)
|
||||
- [SystemConfigServerDto](doc/SystemConfigServerDto.md)
|
||||
- [SystemConfigStorageTemplateDto](doc/SystemConfigStorageTemplateDto.md)
|
||||
- [SystemConfigTemplateStorageOptionDto](doc/SystemConfigTemplateStorageOptionDto.md)
|
||||
- [SystemConfigThemeDto](doc/SystemConfigThemeDto.md)
|
||||
- [SystemConfigTrashDto](doc/SystemConfigTrashDto.md)
|
||||
- [SystemConfigUserDto](doc/SystemConfigUserDto.md)
|
||||
- [TagResponseDto](doc/TagResponseDto.md)
|
||||
- [TagTypeEnum](doc/TagTypeEnum.md)
|
||||
- [ThumbnailFormat](doc/ThumbnailFormat.md)
|
||||
- [TimeBucketResponseDto](doc/TimeBucketResponseDto.md)
|
||||
- [TimeBucketSize](doc/TimeBucketSize.md)
|
||||
- [ToneMapping](doc/ToneMapping.md)
|
||||
- [TranscodeHWAccel](doc/TranscodeHWAccel.md)
|
||||
- [TranscodePolicy](doc/TranscodePolicy.md)
|
||||
- [UpdateAlbumDto](doc/UpdateAlbumDto.md)
|
||||
- [UpdateAssetDto](doc/UpdateAssetDto.md)
|
||||
- [UpdateLibraryDto](doc/UpdateLibraryDto.md)
|
||||
- [UpdatePartnerDto](doc/UpdatePartnerDto.md)
|
||||
- [UpdateStackParentDto](doc/UpdateStackParentDto.md)
|
||||
- [UpdateTagDto](doc/UpdateTagDto.md)
|
||||
- [UpdateUserDto](doc/UpdateUserDto.md)
|
||||
- [UsageByUserDto](doc/UsageByUserDto.md)
|
||||
- [UserAvatarColor](doc/UserAvatarColor.md)
|
||||
- [UserDto](doc/UserDto.md)
|
||||
- [UserResponseDto](doc/UserResponseDto.md)
|
||||
- [UserStatus](doc/UserStatus.md)
|
||||
- [ValidateAccessTokenResponseDto](doc/ValidateAccessTokenResponseDto.md)
|
||||
- [ValidateLibraryDto](doc/ValidateLibraryDto.md)
|
||||
- [ValidateLibraryImportPathResponseDto](doc/ValidateLibraryImportPathResponseDto.md)
|
||||
- [ValidateLibraryResponseDto](doc/ValidateLibraryResponseDto.md)
|
||||
- [VideoCodec](doc/VideoCodec.md)
|
||||
|
||||
|
||||
## Documentation For Authorization
|
||||
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
### bearer
|
||||
|
||||
- **Type**: HTTP Bearer Token authentication (JWT)
|
||||
|
||||
### cookie
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: immich_access_token
|
||||
- **Location**:
|
||||
|
||||
### api_key
|
||||
|
||||
- **Type**: API key
|
||||
- **API key parameter name**: x-api-key
|
||||
- **Location**: HTTP header
|
||||
|
||||
|
||||
## Author
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
export 'package:openapi/src/api.dart';
|
||||
export 'package:openapi/src/auth/api_key_auth.dart';
|
||||
export 'package:openapi/src/auth/basic_auth.dart';
|
||||
export 'package:openapi/src/auth/oauth.dart';
|
||||
export 'package:openapi/src/serializers.dart';
|
||||
export 'package:openapi/src/model/date.dart';
|
||||
|
||||
export 'package:openapi/src/api/api_key_api.dart';
|
||||
export 'package:openapi/src/api/activity_api.dart';
|
||||
export 'package:openapi/src/api/album_api.dart';
|
||||
export 'package:openapi/src/api/asset_api.dart';
|
||||
export 'package:openapi/src/api/audit_api.dart';
|
||||
export 'package:openapi/src/api/authentication_api.dart';
|
||||
export 'package:openapi/src/api/download_api.dart';
|
||||
export 'package:openapi/src/api/face_api.dart';
|
||||
export 'package:openapi/src/api/file_report_api.dart';
|
||||
export 'package:openapi/src/api/job_api.dart';
|
||||
export 'package:openapi/src/api/library_api.dart';
|
||||
export 'package:openapi/src/api/memory_api.dart';
|
||||
export 'package:openapi/src/api/o_auth_api.dart';
|
||||
export 'package:openapi/src/api/partner_api.dart';
|
||||
export 'package:openapi/src/api/person_api.dart';
|
||||
export 'package:openapi/src/api/search_api.dart';
|
||||
export 'package:openapi/src/api/server_info_api.dart';
|
||||
export 'package:openapi/src/api/sessions_api.dart';
|
||||
export 'package:openapi/src/api/shared_link_api.dart';
|
||||
export 'package:openapi/src/api/sync_api.dart';
|
||||
export 'package:openapi/src/api/system_config_api.dart';
|
||||
export 'package:openapi/src/api/system_metadata_api.dart';
|
||||
export 'package:openapi/src/api/tag_api.dart';
|
||||
export 'package:openapi/src/api/timeline_api.dart';
|
||||
export 'package:openapi/src/api/trash_api.dart';
|
||||
export 'package:openapi/src/api/user_api.dart';
|
||||
|
||||
export 'package:openapi/src/model/api_key_create_dto.dart';
|
||||
export 'package:openapi/src/model/api_key_create_response_dto.dart';
|
||||
export 'package:openapi/src/model/api_key_response_dto.dart';
|
||||
export 'package:openapi/src/model/api_key_update_dto.dart';
|
||||
export 'package:openapi/src/model/activity_create_dto.dart';
|
||||
export 'package:openapi/src/model/activity_response_dto.dart';
|
||||
export 'package:openapi/src/model/activity_statistics_response_dto.dart';
|
||||
export 'package:openapi/src/model/add_users_dto.dart';
|
||||
export 'package:openapi/src/model/admin_onboarding_update_dto.dart';
|
||||
export 'package:openapi/src/model/album_count_response_dto.dart';
|
||||
export 'package:openapi/src/model/album_response_dto.dart';
|
||||
export 'package:openapi/src/model/all_job_status_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_delete_dto.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_update_dto.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_upload_check_dto.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_upload_check_item.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_upload_check_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_bulk_upload_check_result.dart';
|
||||
export 'package:openapi/src/model/asset_delta_sync_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_face_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_face_update_dto.dart';
|
||||
export 'package:openapi/src/model/asset_face_update_item.dart';
|
||||
export 'package:openapi/src/model/asset_face_without_person_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_file_upload_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_ids_dto.dart';
|
||||
export 'package:openapi/src/model/asset_ids_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_job_name.dart';
|
||||
export 'package:openapi/src/model/asset_jobs_dto.dart';
|
||||
export 'package:openapi/src/model/asset_order.dart';
|
||||
export 'package:openapi/src/model/asset_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_stats_response_dto.dart';
|
||||
export 'package:openapi/src/model/asset_type_enum.dart';
|
||||
export 'package:openapi/src/model/audio_codec.dart';
|
||||
export 'package:openapi/src/model/audit_deletes_response_dto.dart';
|
||||
export 'package:openapi/src/model/bulk_id_response_dto.dart';
|
||||
export 'package:openapi/src/model/bulk_ids_dto.dart';
|
||||
export 'package:openapi/src/model/clip_config.dart';
|
||||
export 'package:openapi/src/model/clip_mode.dart';
|
||||
export 'package:openapi/src/model/cq_mode.dart';
|
||||
export 'package:openapi/src/model/change_password_dto.dart';
|
||||
export 'package:openapi/src/model/check_existing_assets_dto.dart';
|
||||
export 'package:openapi/src/model/check_existing_assets_response_dto.dart';
|
||||
export 'package:openapi/src/model/colorspace.dart';
|
||||
export 'package:openapi/src/model/create_album_dto.dart';
|
||||
export 'package:openapi/src/model/create_asset_dto.dart';
|
||||
export 'package:openapi/src/model/create_library_dto.dart';
|
||||
export 'package:openapi/src/model/create_profile_image_dto.dart';
|
||||
export 'package:openapi/src/model/create_profile_image_response_dto.dart';
|
||||
export 'package:openapi/src/model/create_tag_dto.dart';
|
||||
export 'package:openapi/src/model/create_user_dto.dart';
|
||||
export 'package:openapi/src/model/curated_locations_response_dto.dart';
|
||||
export 'package:openapi/src/model/curated_objects_response_dto.dart';
|
||||
export 'package:openapi/src/model/delete_user_dto.dart';
|
||||
export 'package:openapi/src/model/download_archive_info.dart';
|
||||
export 'package:openapi/src/model/download_info_dto.dart';
|
||||
export 'package:openapi/src/model/download_response_dto.dart';
|
||||
export 'package:openapi/src/model/entity_type.dart';
|
||||
export 'package:openapi/src/model/exif_response_dto.dart';
|
||||
export 'package:openapi/src/model/face_dto.dart';
|
||||
export 'package:openapi/src/model/file_checksum_dto.dart';
|
||||
export 'package:openapi/src/model/file_checksum_response_dto.dart';
|
||||
export 'package:openapi/src/model/file_report_dto.dart';
|
||||
export 'package:openapi/src/model/file_report_fix_dto.dart';
|
||||
export 'package:openapi/src/model/file_report_item_dto.dart';
|
||||
export 'package:openapi/src/model/image_format.dart';
|
||||
export 'package:openapi/src/model/job_command.dart';
|
||||
export 'package:openapi/src/model/job_command_dto.dart';
|
||||
export 'package:openapi/src/model/job_counts_dto.dart';
|
||||
export 'package:openapi/src/model/job_name.dart';
|
||||
export 'package:openapi/src/model/job_settings_dto.dart';
|
||||
export 'package:openapi/src/model/job_status_dto.dart';
|
||||
export 'package:openapi/src/model/library_response_dto.dart';
|
||||
export 'package:openapi/src/model/library_stats_response_dto.dart';
|
||||
export 'package:openapi/src/model/library_type.dart';
|
||||
export 'package:openapi/src/model/log_level.dart';
|
||||
export 'package:openapi/src/model/login_credential_dto.dart';
|
||||
export 'package:openapi/src/model/login_response_dto.dart';
|
||||
export 'package:openapi/src/model/logout_response_dto.dart';
|
||||
export 'package:openapi/src/model/map_marker_response_dto.dart';
|
||||
export 'package:openapi/src/model/map_theme.dart';
|
||||
export 'package:openapi/src/model/memory_create_dto.dart';
|
||||
export 'package:openapi/src/model/memory_lane_response_dto.dart';
|
||||
export 'package:openapi/src/model/memory_response_dto.dart';
|
||||
export 'package:openapi/src/model/memory_type.dart';
|
||||
export 'package:openapi/src/model/memory_update_dto.dart';
|
||||
export 'package:openapi/src/model/merge_person_dto.dart';
|
||||
export 'package:openapi/src/model/metadata_search_dto.dart';
|
||||
export 'package:openapi/src/model/model_type.dart';
|
||||
export 'package:openapi/src/model/o_auth_authorize_response_dto.dart';
|
||||
export 'package:openapi/src/model/o_auth_callback_dto.dart';
|
||||
export 'package:openapi/src/model/o_auth_config_dto.dart';
|
||||
export 'package:openapi/src/model/on_this_day_dto.dart';
|
||||
export 'package:openapi/src/model/partner_response_dto.dart';
|
||||
export 'package:openapi/src/model/path_entity_type.dart';
|
||||
export 'package:openapi/src/model/path_type.dart';
|
||||
export 'package:openapi/src/model/people_response_dto.dart';
|
||||
export 'package:openapi/src/model/people_update_dto.dart';
|
||||
export 'package:openapi/src/model/people_update_item.dart';
|
||||
export 'package:openapi/src/model/person_create_dto.dart';
|
||||
export 'package:openapi/src/model/person_response_dto.dart';
|
||||
export 'package:openapi/src/model/person_statistics_response_dto.dart';
|
||||
export 'package:openapi/src/model/person_update_dto.dart';
|
||||
export 'package:openapi/src/model/person_with_faces_response_dto.dart';
|
||||
export 'package:openapi/src/model/places_response_dto.dart';
|
||||
export 'package:openapi/src/model/queue_status_dto.dart';
|
||||
export 'package:openapi/src/model/reaction_level.dart';
|
||||
export 'package:openapi/src/model/reaction_type.dart';
|
||||
export 'package:openapi/src/model/recognition_config.dart';
|
||||
export 'package:openapi/src/model/reverse_geocoding_state_response_dto.dart';
|
||||
export 'package:openapi/src/model/scan_library_dto.dart';
|
||||
export 'package:openapi/src/model/search_album_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_asset_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_explore_item.dart';
|
||||
export 'package:openapi/src/model/search_explore_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_facet_count_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_facet_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_response_dto.dart';
|
||||
export 'package:openapi/src/model/search_suggestion_type.dart';
|
||||
export 'package:openapi/src/model/server_config_dto.dart';
|
||||
export 'package:openapi/src/model/server_features_dto.dart';
|
||||
export 'package:openapi/src/model/server_info_response_dto.dart';
|
||||
export 'package:openapi/src/model/server_media_types_response_dto.dart';
|
||||
export 'package:openapi/src/model/server_ping_response.dart';
|
||||
export 'package:openapi/src/model/server_stats_response_dto.dart';
|
||||
export 'package:openapi/src/model/server_theme_dto.dart';
|
||||
export 'package:openapi/src/model/server_version_response_dto.dart';
|
||||
export 'package:openapi/src/model/session_response_dto.dart';
|
||||
export 'package:openapi/src/model/shared_link_create_dto.dart';
|
||||
export 'package:openapi/src/model/shared_link_edit_dto.dart';
|
||||
export 'package:openapi/src/model/shared_link_response_dto.dart';
|
||||
export 'package:openapi/src/model/shared_link_type.dart';
|
||||
export 'package:openapi/src/model/sign_up_dto.dart';
|
||||
export 'package:openapi/src/model/smart_info_response_dto.dart';
|
||||
export 'package:openapi/src/model/smart_search_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_f_fmpeg_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_image_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_job_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_library_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_library_scan_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_library_watch_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_logging_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_machine_learning_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_map_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_new_version_check_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_o_auth_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_password_login_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_reverse_geocoding_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_server_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_storage_template_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_template_storage_option_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_theme_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_trash_dto.dart';
|
||||
export 'package:openapi/src/model/system_config_user_dto.dart';
|
||||
export 'package:openapi/src/model/tag_response_dto.dart';
|
||||
export 'package:openapi/src/model/tag_type_enum.dart';
|
||||
export 'package:openapi/src/model/thumbnail_format.dart';
|
||||
export 'package:openapi/src/model/time_bucket_response_dto.dart';
|
||||
export 'package:openapi/src/model/time_bucket_size.dart';
|
||||
export 'package:openapi/src/model/tone_mapping.dart';
|
||||
export 'package:openapi/src/model/transcode_hw_accel.dart';
|
||||
export 'package:openapi/src/model/transcode_policy.dart';
|
||||
export 'package:openapi/src/model/update_album_dto.dart';
|
||||
export 'package:openapi/src/model/update_asset_dto.dart';
|
||||
export 'package:openapi/src/model/update_library_dto.dart';
|
||||
export 'package:openapi/src/model/update_partner_dto.dart';
|
||||
export 'package:openapi/src/model/update_stack_parent_dto.dart';
|
||||
export 'package:openapi/src/model/update_tag_dto.dart';
|
||||
export 'package:openapi/src/model/update_user_dto.dart';
|
||||
export 'package:openapi/src/model/usage_by_user_dto.dart';
|
||||
export 'package:openapi/src/model/user_avatar_color.dart';
|
||||
export 'package:openapi/src/model/user_dto.dart';
|
||||
export 'package:openapi/src/model/user_response_dto.dart';
|
||||
export 'package:openapi/src/model/user_status.dart';
|
||||
export 'package:openapi/src/model/validate_access_token_response_dto.dart';
|
||||
export 'package:openapi/src/model/validate_library_dto.dart';
|
||||
export 'package:openapi/src/model/validate_library_import_path_response_dto.dart';
|
||||
export 'package:openapi/src/model/validate_library_response_dto.dart';
|
||||
export 'package:openapi/src/model/video_codec.dart';
|
||||
export 'package:openapi/src/auth/bearer_auth.dart';
|
||||
@@ -0,0 +1,248 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:openapi/src/serializers.dart';
|
||||
import 'package:openapi/src/auth/api_key_auth.dart';
|
||||
import 'package:openapi/src/auth/basic_auth.dart';
|
||||
import 'package:openapi/src/auth/bearer_auth.dart';
|
||||
import 'package:openapi/src/auth/oauth.dart';
|
||||
import 'package:openapi/src/api/api_key_api.dart';
|
||||
import 'package:openapi/src/api/activity_api.dart';
|
||||
import 'package:openapi/src/api/album_api.dart';
|
||||
import 'package:openapi/src/api/asset_api.dart';
|
||||
import 'package:openapi/src/api/audit_api.dart';
|
||||
import 'package:openapi/src/api/authentication_api.dart';
|
||||
import 'package:openapi/src/api/download_api.dart';
|
||||
import 'package:openapi/src/api/face_api.dart';
|
||||
import 'package:openapi/src/api/file_report_api.dart';
|
||||
import 'package:openapi/src/api/job_api.dart';
|
||||
import 'package:openapi/src/api/library_api.dart';
|
||||
import 'package:openapi/src/api/memory_api.dart';
|
||||
import 'package:openapi/src/api/o_auth_api.dart';
|
||||
import 'package:openapi/src/api/partner_api.dart';
|
||||
import 'package:openapi/src/api/person_api.dart';
|
||||
import 'package:openapi/src/api/search_api.dart';
|
||||
import 'package:openapi/src/api/server_info_api.dart';
|
||||
import 'package:openapi/src/api/sessions_api.dart';
|
||||
import 'package:openapi/src/api/shared_link_api.dart';
|
||||
import 'package:openapi/src/api/sync_api.dart';
|
||||
import 'package:openapi/src/api/system_config_api.dart';
|
||||
import 'package:openapi/src/api/system_metadata_api.dart';
|
||||
import 'package:openapi/src/api/tag_api.dart';
|
||||
import 'package:openapi/src/api/timeline_api.dart';
|
||||
import 'package:openapi/src/api/trash_api.dart';
|
||||
import 'package:openapi/src/api/user_api.dart';
|
||||
|
||||
class Openapi {
|
||||
static const String basePath = r'/api';
|
||||
|
||||
final Dio dio;
|
||||
final Serializers serializers;
|
||||
|
||||
Openapi({
|
||||
Dio? dio,
|
||||
Serializers? serializers,
|
||||
String? basePathOverride,
|
||||
List<Interceptor>? interceptors,
|
||||
}) : this.serializers = serializers ?? standardSerializers,
|
||||
this.dio = dio ??
|
||||
Dio(BaseOptions(
|
||||
baseUrl: basePathOverride ?? basePath,
|
||||
connectTimeout: const Duration(milliseconds: 5000),
|
||||
receiveTimeout: const Duration(milliseconds: 3000),
|
||||
)) {
|
||||
if (interceptors == null) {
|
||||
this.dio.interceptors.addAll([
|
||||
OAuthInterceptor(),
|
||||
BasicAuthInterceptor(),
|
||||
BearerAuthInterceptor(),
|
||||
ApiKeyAuthInterceptor(),
|
||||
]);
|
||||
} else {
|
||||
this.dio.interceptors.addAll(interceptors);
|
||||
}
|
||||
}
|
||||
|
||||
void setOAuthToken(String name, String token) {
|
||||
if (this.dio.interceptors.any((i) => i is OAuthInterceptor)) {
|
||||
(this.dio.interceptors.firstWhere((i) => i is OAuthInterceptor) as OAuthInterceptor).tokens[name] = token;
|
||||
}
|
||||
}
|
||||
|
||||
void setBearerAuth(String name, String token) {
|
||||
if (this.dio.interceptors.any((i) => i is BearerAuthInterceptor)) {
|
||||
(this.dio.interceptors.firstWhere((i) => i is BearerAuthInterceptor) as BearerAuthInterceptor).tokens[name] = token;
|
||||
}
|
||||
}
|
||||
|
||||
void setBasicAuth(String name, String username, String password) {
|
||||
if (this.dio.interceptors.any((i) => i is BasicAuthInterceptor)) {
|
||||
(this.dio.interceptors.firstWhere((i) => i is BasicAuthInterceptor) as BasicAuthInterceptor).authInfo[name] = BasicAuthInfo(username, password);
|
||||
}
|
||||
}
|
||||
|
||||
void setApiKey(String name, String apiKey) {
|
||||
if (this.dio.interceptors.any((i) => i is ApiKeyAuthInterceptor)) {
|
||||
(this.dio.interceptors.firstWhere((element) => element is ApiKeyAuthInterceptor) as ApiKeyAuthInterceptor).apiKeys[name] = apiKey;
|
||||
}
|
||||
}
|
||||
|
||||
/// Get APIKeyApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
APIKeyApi getAPIKeyApi() {
|
||||
return APIKeyApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get ActivityApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
ActivityApi getActivityApi() {
|
||||
return ActivityApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get AlbumApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
AlbumApi getAlbumApi() {
|
||||
return AlbumApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get AssetApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
AssetApi getAssetApi() {
|
||||
return AssetApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get AuditApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
AuditApi getAuditApi() {
|
||||
return AuditApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get AuthenticationApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
AuthenticationApi getAuthenticationApi() {
|
||||
return AuthenticationApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get DownloadApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
DownloadApi getDownloadApi() {
|
||||
return DownloadApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get FaceApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
FaceApi getFaceApi() {
|
||||
return FaceApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get FileReportApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
FileReportApi getFileReportApi() {
|
||||
return FileReportApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get JobApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
JobApi getJobApi() {
|
||||
return JobApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get LibraryApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
LibraryApi getLibraryApi() {
|
||||
return LibraryApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get MemoryApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
MemoryApi getMemoryApi() {
|
||||
return MemoryApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get OAuthApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
OAuthApi getOAuthApi() {
|
||||
return OAuthApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get PartnerApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
PartnerApi getPartnerApi() {
|
||||
return PartnerApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get PersonApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
PersonApi getPersonApi() {
|
||||
return PersonApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SearchApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SearchApi getSearchApi() {
|
||||
return SearchApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get ServerInfoApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
ServerInfoApi getServerInfoApi() {
|
||||
return ServerInfoApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SessionsApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SessionsApi getSessionsApi() {
|
||||
return SessionsApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SharedLinkApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SharedLinkApi getSharedLinkApi() {
|
||||
return SharedLinkApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SyncApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SyncApi getSyncApi() {
|
||||
return SyncApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SystemConfigApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SystemConfigApi getSystemConfigApi() {
|
||||
return SystemConfigApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get SystemMetadataApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
SystemMetadataApi getSystemMetadataApi() {
|
||||
return SystemMetadataApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get TagApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
TagApi getTagApi() {
|
||||
return TagApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get TimelineApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
TimelineApi getTimelineApi() {
|
||||
return TimelineApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get TrashApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
TrashApi getTrashApi() {
|
||||
return TrashApi(dio, serializers);
|
||||
}
|
||||
|
||||
/// Get UserApi instance, base route and serializer can be overridden by a given but be careful,
|
||||
/// by doing that all interceptors will not be executed
|
||||
UserApi getUserApi() {
|
||||
return UserApi(dio, serializers);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,407 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/activity_create_dto.dart';
|
||||
import 'package:openapi/src/model/activity_response_dto.dart';
|
||||
import 'package:openapi/src/model/activity_statistics_response_dto.dart';
|
||||
import 'package:openapi/src/model/reaction_level.dart';
|
||||
import 'package:openapi/src/model/reaction_type.dart';
|
||||
|
||||
class ActivityApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const ActivityApi(this._dio, this._serializers);
|
||||
|
||||
/// createActivity
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [activityCreateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ActivityResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ActivityResponseDto>> createActivity({
|
||||
required ActivityCreateDto activityCreateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/activity';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(ActivityCreateDto);
|
||||
_bodyData = _serializers.serialize(activityCreateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ActivityResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ActivityResponseDto),
|
||||
) as ActivityResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ActivityResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteActivity
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteActivity({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/activity/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getActivities
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [albumId]
|
||||
/// * [assetId]
|
||||
/// * [level]
|
||||
/// * [type]
|
||||
/// * [userId]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<ActivityResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<ActivityResponseDto>>> getActivities({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
ReactionLevel? level,
|
||||
ReactionType? type,
|
||||
String? userId,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/activity';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)),
|
||||
if (assetId != null) r'assetId': encodeQueryParameter(_serializers, assetId, const FullType(String)),
|
||||
if (level != null) r'level': encodeQueryParameter(_serializers, level, const FullType(ReactionLevel)),
|
||||
if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(ReactionType)),
|
||||
if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<ActivityResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(ActivityResponseDto)]),
|
||||
) as BuiltList<ActivityResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<ActivityResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getActivityStatistics
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [albumId]
|
||||
/// * [assetId]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ActivityStatisticsResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ActivityStatisticsResponseDto>> getActivityStatistics({
|
||||
required String albumId,
|
||||
String? assetId,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/activity/statistics';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)),
|
||||
if (assetId != null) r'assetId': encodeQueryParameter(_serializers, assetId, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ActivityStatisticsResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ActivityStatisticsResponseDto),
|
||||
) as ActivityStatisticsResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ActivityStatisticsResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,492 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/api_key_create_dto.dart';
|
||||
import 'package:openapi/src/model/api_key_create_response_dto.dart';
|
||||
import 'package:openapi/src/model/api_key_response_dto.dart';
|
||||
import 'package:openapi/src/model/api_key_update_dto.dart';
|
||||
|
||||
class APIKeyApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const APIKeyApi(this._dio, this._serializers);
|
||||
|
||||
/// createApiKey
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [aPIKeyCreateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [APIKeyCreateResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<APIKeyCreateResponseDto>> createApiKey({
|
||||
required APIKeyCreateDto aPIKeyCreateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/api-key';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(APIKeyCreateDto);
|
||||
_bodyData = _serializers.serialize(aPIKeyCreateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
APIKeyCreateResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(APIKeyCreateResponseDto),
|
||||
) as APIKeyCreateResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<APIKeyCreateResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteApiKey
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteApiKey({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getApiKey
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [APIKeyResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<APIKeyResponseDto>> getApiKey({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
APIKeyResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(APIKeyResponseDto),
|
||||
) as APIKeyResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<APIKeyResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getApiKeys
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<APIKeyResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<APIKeyResponseDto>>> getApiKeys({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/api-key';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<APIKeyResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(APIKeyResponseDto)]),
|
||||
) as BuiltList<APIKeyResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<APIKeyResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateApiKey
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [aPIKeyUpdateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [APIKeyResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<APIKeyResponseDto>> updateApiKey({
|
||||
required String id,
|
||||
required APIKeyUpdateDto aPIKeyUpdateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/api-key/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(APIKeyUpdateDto);
|
||||
_bodyData = _serializers.serialize(aPIKeyUpdateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
APIKeyResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(APIKeyResponseDto),
|
||||
) as APIKeyResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<APIKeyResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/audit_deletes_response_dto.dart';
|
||||
import 'package:openapi/src/model/entity_type.dart';
|
||||
|
||||
class AuditApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const AuditApi(this._dio, this._serializers);
|
||||
|
||||
/// getAuditDeletes
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [after]
|
||||
/// * [entityType]
|
||||
/// * [userId]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [AuditDeletesResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<AuditDeletesResponseDto>> getAuditDeletes({
|
||||
required DateTime after,
|
||||
required EntityType entityType,
|
||||
String? userId,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/audit/deletes';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'after': encodeQueryParameter(_serializers, after, const FullType(DateTime)),
|
||||
r'entityType': encodeQueryParameter(_serializers, entityType, const FullType(EntityType)),
|
||||
if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
AuditDeletesResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(AuditDeletesResponseDto),
|
||||
) as AuditDeletesResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<AuditDeletesResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,505 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/model/change_password_dto.dart';
|
||||
import 'package:openapi/src/model/login_credential_dto.dart';
|
||||
import 'package:openapi/src/model/login_response_dto.dart';
|
||||
import 'package:openapi/src/model/logout_response_dto.dart';
|
||||
import 'package:openapi/src/model/sign_up_dto.dart';
|
||||
import 'package:openapi/src/model/user_response_dto.dart';
|
||||
import 'package:openapi/src/model/validate_access_token_response_dto.dart';
|
||||
|
||||
class AuthenticationApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const AuthenticationApi(this._dio, this._serializers);
|
||||
|
||||
/// changePassword
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [changePasswordDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> changePassword({
|
||||
required ChangePasswordDto changePasswordDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/auth/change-password';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(ChangePasswordDto);
|
||||
_bodyData = _serializers.serialize(changePasswordDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// login
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [loginCredentialDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LoginResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LoginResponseDto>> login({
|
||||
required LoginCredentialDto loginCredentialDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/auth/login';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(LoginCredentialDto);
|
||||
_bodyData = _serializers.serialize(loginCredentialDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LoginResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LoginResponseDto),
|
||||
) as LoginResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LoginResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// logout
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LogoutResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LogoutResponseDto>> logout({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/auth/logout';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LogoutResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LogoutResponseDto),
|
||||
) as LogoutResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LogoutResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// signUpAdmin
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [signUpDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> signUpAdmin({
|
||||
required SignUpDto signUpDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/auth/admin-sign-up';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(SignUpDto);
|
||||
_bodyData = _serializers.serialize(signUpDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// validateAccessToken
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ValidateAccessTokenResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ValidateAccessTokenResponseDto>> validateAccessToken({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/auth/validateToken';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ValidateAccessTokenResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ValidateAccessTokenResponseDto),
|
||||
) as ValidateAccessTokenResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ValidateAccessTokenResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,356 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'dart:typed_data';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_ids_dto.dart';
|
||||
import 'package:openapi/src/model/download_info_dto.dart';
|
||||
import 'package:openapi/src/model/download_response_dto.dart';
|
||||
|
||||
class DownloadApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const DownloadApi(this._dio, this._serializers);
|
||||
|
||||
/// downloadArchive
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [assetIdsDto]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Uint8List] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Uint8List>> downloadArchive({
|
||||
required AssetIdsDto assetIdsDto,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/download/archive';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
responseType: ResponseType.bytes,
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
};
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AssetIdsDto);
|
||||
_bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
Uint8List? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : rawResponse as Uint8List;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<Uint8List>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// downloadFile
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Uint8List] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Uint8List>> downloadFile({
|
||||
required String id,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/download/asset/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
responseType: ResponseType.bytes,
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
Uint8List? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : rawResponse as Uint8List;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<Uint8List>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getDownloadInfo
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [downloadInfoDto]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [DownloadResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<DownloadResponseDto>> getDownloadInfo({
|
||||
required DownloadInfoDto downloadInfoDto,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/download/info';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
};
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(DownloadInfoDto);
|
||||
_bodyData = _serializers.serialize(downloadInfoDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
DownloadResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(DownloadResponseDto),
|
||||
) as DownloadResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<DownloadResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,233 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_face_response_dto.dart';
|
||||
import 'package:openapi/src/model/face_dto.dart';
|
||||
import 'package:openapi/src/model/person_response_dto.dart';
|
||||
|
||||
class FaceApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const FaceApi(this._dio, this._serializers);
|
||||
|
||||
/// getFaces
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetFaceResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetFaceResponseDto>>> getFaces({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/face';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'id': encodeQueryParameter(_serializers, id, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetFaceResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetFaceResponseDto)]),
|
||||
) as BuiltList<AssetFaceResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetFaceResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// reassignFacesById
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [faceDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [PersonResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<PersonResponseDto>> reassignFacesById({
|
||||
required String id,
|
||||
required FaceDto faceDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/face/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(FaceDto);
|
||||
_bodyData = _serializers.serialize(faceDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
PersonResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(PersonResponseDto),
|
||||
) as PersonResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<PersonResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,307 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/file_checksum_dto.dart';
|
||||
import 'package:openapi/src/model/file_checksum_response_dto.dart';
|
||||
import 'package:openapi/src/model/file_report_dto.dart';
|
||||
import 'package:openapi/src/model/file_report_fix_dto.dart';
|
||||
|
||||
class FileReportApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const FileReportApi(this._dio, this._serializers);
|
||||
|
||||
/// fixAuditFiles
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [fileReportFixDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> fixAuditFiles({
|
||||
required FileReportFixDto fileReportFixDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/report/fix';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(FileReportFixDto);
|
||||
_bodyData = _serializers.serialize(fileReportFixDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getAuditFiles
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [FileReportDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<FileReportDto>> getAuditFiles({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/report';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
FileReportDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(FileReportDto),
|
||||
) as FileReportDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<FileReportDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getFileChecksums
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [fileChecksumDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<FileChecksumResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<FileChecksumResponseDto>>> getFileChecksums({
|
||||
required FileChecksumDto fileChecksumDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/report/checksum';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(FileChecksumDto);
|
||||
_bodyData = _serializers.serialize(fileChecksumDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<FileChecksumResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(FileChecksumResponseDto)]),
|
||||
) as BuiltList<FileChecksumResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<FileChecksumResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,226 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/all_job_status_response_dto.dart';
|
||||
import 'package:openapi/src/model/job_command_dto.dart';
|
||||
import 'package:openapi/src/model/job_name.dart';
|
||||
import 'package:openapi/src/model/job_status_dto.dart';
|
||||
|
||||
class JobApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const JobApi(this._dio, this._serializers);
|
||||
|
||||
/// getAllJobsStatus
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [AllJobStatusResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<AllJobStatusResponseDto>> getAllJobsStatus({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/jobs';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
AllJobStatusResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(AllJobStatusResponseDto),
|
||||
) as AllJobStatusResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<AllJobStatusResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// sendJobCommand
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [jobCommandDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [JobStatusDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<JobStatusDto>> sendJobCommand({
|
||||
required JobName id,
|
||||
required JobCommandDto jobCommandDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/jobs/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(JobName)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(JobCommandDto);
|
||||
_bodyData = _serializers.serialize(jobCommandDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
JobStatusDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<JobStatusDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,855 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/create_library_dto.dart';
|
||||
import 'package:openapi/src/model/library_response_dto.dart';
|
||||
import 'package:openapi/src/model/library_stats_response_dto.dart';
|
||||
import 'package:openapi/src/model/library_type.dart';
|
||||
import 'package:openapi/src/model/scan_library_dto.dart';
|
||||
import 'package:openapi/src/model/update_library_dto.dart';
|
||||
import 'package:openapi/src/model/validate_library_dto.dart';
|
||||
import 'package:openapi/src/model/validate_library_response_dto.dart';
|
||||
|
||||
class LibraryApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const LibraryApi(this._dio, this._serializers);
|
||||
|
||||
/// createLibrary
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [createLibraryDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LibraryResponseDto>> createLibrary({
|
||||
required CreateLibraryDto createLibraryDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(CreateLibraryDto);
|
||||
_bodyData = _serializers.serialize(createLibraryDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LibraryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LibraryResponseDto),
|
||||
) as LibraryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LibraryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteLibrary
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteLibrary({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getAllLibraries
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [type]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<LibraryResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<LibraryResponseDto>>> getAllLibraries({
|
||||
LibraryType? type,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(LibraryType)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<LibraryResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(LibraryResponseDto)]),
|
||||
) as BuiltList<LibraryResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<LibraryResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getLibrary
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LibraryResponseDto>> getLibrary({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LibraryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LibraryResponseDto),
|
||||
) as LibraryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LibraryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getLibraryStatistics
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LibraryStatsResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LibraryStatsResponseDto>> getLibraryStatistics({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}/statistics'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LibraryStatsResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LibraryStatsResponseDto),
|
||||
) as LibraryStatsResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LibraryStatsResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// removeOfflineFiles
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> removeOfflineFiles({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}/removeOffline'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// scanLibrary
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [scanLibraryDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> scanLibrary({
|
||||
required String id,
|
||||
required ScanLibraryDto scanLibraryDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}/scan'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(ScanLibraryDto);
|
||||
_bodyData = _serializers.serialize(scanLibraryDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// updateLibrary
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [updateLibraryDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LibraryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LibraryResponseDto>> updateLibrary({
|
||||
required String id,
|
||||
required UpdateLibraryDto updateLibraryDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(UpdateLibraryDto);
|
||||
_bodyData = _serializers.serialize(updateLibraryDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LibraryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LibraryResponseDto),
|
||||
) as LibraryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LibraryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// validate
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [validateLibraryDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ValidateLibraryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ValidateLibraryResponseDto>> validate({
|
||||
required String id,
|
||||
required ValidateLibraryDto validateLibraryDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/library/{id}/validate'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(ValidateLibraryDto);
|
||||
_bodyData = _serializers.serialize(validateLibraryDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ValidateLibraryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ValidateLibraryResponseDto),
|
||||
) as ValidateLibraryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ValidateLibraryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,719 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/bulk_id_response_dto.dart';
|
||||
import 'package:openapi/src/model/bulk_ids_dto.dart';
|
||||
import 'package:openapi/src/model/memory_create_dto.dart';
|
||||
import 'package:openapi/src/model/memory_response_dto.dart';
|
||||
import 'package:openapi/src/model/memory_update_dto.dart';
|
||||
|
||||
class MemoryApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const MemoryApi(this._dio, this._serializers);
|
||||
|
||||
/// addMemoryAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [bulkIdsDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<BulkIdResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<BulkIdResponseDto>>> addMemoryAssets({
|
||||
required String id,
|
||||
required BulkIdsDto bulkIdsDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(BulkIdsDto);
|
||||
_bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<BulkIdResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]),
|
||||
) as BuiltList<BulkIdResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<BulkIdResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// createMemory
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [memoryCreateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<MemoryResponseDto>> createMemory({
|
||||
required MemoryCreateDto memoryCreateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(MemoryCreateDto);
|
||||
_bodyData = _serializers.serialize(memoryCreateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
MemoryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(MemoryResponseDto),
|
||||
) as MemoryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<MemoryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteMemory
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteMemory({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getMemory
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<MemoryResponseDto>> getMemory({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
MemoryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(MemoryResponseDto),
|
||||
) as MemoryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<MemoryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// removeMemoryAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [bulkIdsDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<BulkIdResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<BulkIdResponseDto>>> removeMemoryAssets({
|
||||
required String id,
|
||||
required BulkIdsDto bulkIdsDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(BulkIdsDto);
|
||||
_bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<BulkIdResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(BulkIdResponseDto)]),
|
||||
) as BuiltList<BulkIdResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<BulkIdResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// searchMemories
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<MemoryResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<MemoryResponseDto>>> searchMemories({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<MemoryResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(MemoryResponseDto)]),
|
||||
) as BuiltList<MemoryResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<MemoryResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateMemory
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [memoryUpdateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [MemoryResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<MemoryResponseDto>> updateMemory({
|
||||
required String id,
|
||||
required MemoryUpdateDto memoryUpdateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/memories/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(MemoryUpdateDto);
|
||||
_bodyData = _serializers.serialize(memoryUpdateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
MemoryResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(MemoryResponseDto),
|
||||
) as MemoryResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<MemoryResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,459 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/model/login_response_dto.dart';
|
||||
import 'package:openapi/src/model/o_auth_authorize_response_dto.dart';
|
||||
import 'package:openapi/src/model/o_auth_callback_dto.dart';
|
||||
import 'package:openapi/src/model/o_auth_config_dto.dart';
|
||||
import 'package:openapi/src/model/user_response_dto.dart';
|
||||
|
||||
class OAuthApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const OAuthApi(this._dio, this._serializers);
|
||||
|
||||
/// finishOAuth
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [oAuthCallbackDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [LoginResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<LoginResponseDto>> finishOAuth({
|
||||
required OAuthCallbackDto oAuthCallbackDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/oauth/callback';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(OAuthCallbackDto);
|
||||
_bodyData = _serializers.serialize(oAuthCallbackDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
LoginResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(LoginResponseDto),
|
||||
) as LoginResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<LoginResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// linkOAuthAccount
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [oAuthCallbackDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> linkOAuthAccount({
|
||||
required OAuthCallbackDto oAuthCallbackDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/oauth/link';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(OAuthCallbackDto);
|
||||
_bodyData = _serializers.serialize(oAuthCallbackDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// redirectOAuthToMobile
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> redirectOAuthToMobile({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/oauth/mobile-redirect';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// startOAuth
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [oAuthConfigDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [OAuthAuthorizeResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<OAuthAuthorizeResponseDto>> startOAuth({
|
||||
required OAuthConfigDto oAuthConfigDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/oauth/authorize';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(OAuthConfigDto);
|
||||
_bodyData = _serializers.serialize(oAuthConfigDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
OAuthAuthorizeResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(OAuthAuthorizeResponseDto),
|
||||
) as OAuthAuthorizeResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<OAuthAuthorizeResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// unlinkOAuthAccount
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> unlinkOAuthAccount({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/oauth/unlink';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,386 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/partner_response_dto.dart';
|
||||
import 'package:openapi/src/model/update_partner_dto.dart';
|
||||
|
||||
class PartnerApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const PartnerApi(this._dio, this._serializers);
|
||||
|
||||
/// createPartner
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [PartnerResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<PartnerResponseDto>> createPartner({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
PartnerResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(PartnerResponseDto),
|
||||
) as PartnerResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<PartnerResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getPartners
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [direction]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<PartnerResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<PartnerResponseDto>>> getPartners({
|
||||
required String direction,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/partner';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'direction': encodeQueryParameter(_serializers, direction, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<PartnerResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(PartnerResponseDto)]),
|
||||
) as BuiltList<PartnerResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<PartnerResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// removePartner
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> removePartner({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// updatePartner
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [updatePartnerDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [PartnerResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<PartnerResponseDto>> updatePartner({
|
||||
required String id,
|
||||
required UpdatePartnerDto updatePartnerDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/partner/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(UpdatePartnerDto);
|
||||
_bodyData = _serializers.serialize(updatePartnerDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
PartnerResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(PartnerResponseDto),
|
||||
) as PartnerResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<PartnerResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,856 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
import 'package:openapi/src/model/metadata_search_dto.dart';
|
||||
import 'package:openapi/src/model/person_response_dto.dart';
|
||||
import 'package:openapi/src/model/places_response_dto.dart';
|
||||
import 'package:openapi/src/model/search_explore_response_dto.dart';
|
||||
import 'package:openapi/src/model/search_response_dto.dart';
|
||||
import 'package:openapi/src/model/search_suggestion_type.dart';
|
||||
import 'package:openapi/src/model/smart_search_dto.dart';
|
||||
|
||||
class SearchApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SearchApi(this._dio, this._serializers);
|
||||
|
||||
/// getAssetsByCity
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetResponseDto>>> getAssetsByCity({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/cities';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getExploreData
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<SearchExploreResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<SearchExploreResponseDto>>> getExploreData({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/explore';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<SearchExploreResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(SearchExploreResponseDto)]),
|
||||
) as BuiltList<SearchExploreResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<SearchExploreResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getSearchSuggestions
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [type]
|
||||
/// * [country]
|
||||
/// * [make]
|
||||
/// * [model]
|
||||
/// * [state]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<String>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<String>>> getSearchSuggestions({
|
||||
required SearchSuggestionType type,
|
||||
String? country,
|
||||
String? make,
|
||||
String? model,
|
||||
String? state,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/suggestions';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (country != null) r'country': encodeQueryParameter(_serializers, country, const FullType(String)),
|
||||
if (make != null) r'make': encodeQueryParameter(_serializers, make, const FullType(String)),
|
||||
if (model != null) r'model': encodeQueryParameter(_serializers, model, const FullType(String)),
|
||||
if (state != null) r'state': encodeQueryParameter(_serializers, state, const FullType(String)),
|
||||
r'type': encodeQueryParameter(_serializers, type, const FullType(SearchSuggestionType)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<String>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<String>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// search
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [clip]
|
||||
/// * [motion]
|
||||
/// * [page]
|
||||
/// * [q]
|
||||
/// * [query]
|
||||
/// * [recent]
|
||||
/// * [size]
|
||||
/// * [smart]
|
||||
/// * [type]
|
||||
/// * [withArchived]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
@Deprecated('This operation has been deprecated')
|
||||
Future<Response<SearchResponseDto>> search({
|
||||
@Deprecated('clip is deprecated') bool? clip,
|
||||
bool? motion,
|
||||
num? page,
|
||||
String? q,
|
||||
String? query,
|
||||
bool? recent,
|
||||
num? size,
|
||||
bool? smart,
|
||||
String? type,
|
||||
bool? withArchived,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (clip != null) r'clip': encodeQueryParameter(_serializers, clip, const FullType(bool)),
|
||||
if (motion != null) r'motion': encodeQueryParameter(_serializers, motion, const FullType(bool)),
|
||||
if (page != null) r'page': encodeQueryParameter(_serializers, page, const FullType(num)),
|
||||
if (q != null) r'q': encodeQueryParameter(_serializers, q, const FullType(String)),
|
||||
if (query != null) r'query': encodeQueryParameter(_serializers, query, const FullType(String)),
|
||||
if (recent != null) r'recent': encodeQueryParameter(_serializers, recent, const FullType(bool)),
|
||||
if (size != null) r'size': encodeQueryParameter(_serializers, size, const FullType(num)),
|
||||
if (smart != null) r'smart': encodeQueryParameter(_serializers, smart, const FullType(bool)),
|
||||
if (type != null) r'type': encodeQueryParameter(_serializers, type, const FullType(String)),
|
||||
if (withArchived != null) r'withArchived': encodeQueryParameter(_serializers, withArchived, const FullType(bool)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SearchResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SearchResponseDto),
|
||||
) as SearchResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SearchResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// searchMetadata
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [metadataSearchDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SearchResponseDto>> searchMetadata({
|
||||
required MetadataSearchDto metadataSearchDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/metadata';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(MetadataSearchDto);
|
||||
_bodyData = _serializers.serialize(metadataSearchDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SearchResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SearchResponseDto),
|
||||
) as SearchResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SearchResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// searchPerson
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [name]
|
||||
/// * [withHidden]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<PersonResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<PersonResponseDto>>> searchPerson({
|
||||
required String name,
|
||||
bool? withHidden,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/person';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'name': encodeQueryParameter(_serializers, name, const FullType(String)),
|
||||
if (withHidden != null) r'withHidden': encodeQueryParameter(_serializers, withHidden, const FullType(bool)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<PersonResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(PersonResponseDto)]),
|
||||
) as BuiltList<PersonResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<PersonResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// searchPlaces
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [name]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<PlacesResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<PlacesResponseDto>>> searchPlaces({
|
||||
required String name,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/places';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'name': encodeQueryParameter(_serializers, name, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<PlacesResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(PlacesResponseDto)]),
|
||||
) as BuiltList<PlacesResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<PlacesResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// searchSmart
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [smartSearchDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SearchResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SearchResponseDto>> searchSmart({
|
||||
required SmartSearchDto smartSearchDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/search/smart';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(SmartSearchDto);
|
||||
_bodyData = _serializers.serialize(smartSearchDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SearchResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SearchResponseDto),
|
||||
) as SearchResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SearchResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,643 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/model/server_config_dto.dart';
|
||||
import 'package:openapi/src/model/server_features_dto.dart';
|
||||
import 'package:openapi/src/model/server_info_response_dto.dart';
|
||||
import 'package:openapi/src/model/server_media_types_response_dto.dart';
|
||||
import 'package:openapi/src/model/server_ping_response.dart';
|
||||
import 'package:openapi/src/model/server_stats_response_dto.dart';
|
||||
import 'package:openapi/src/model/server_theme_dto.dart';
|
||||
import 'package:openapi/src/model/server_version_response_dto.dart';
|
||||
|
||||
class ServerInfoApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const ServerInfoApi(this._dio, this._serializers);
|
||||
|
||||
/// getServerConfig
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerConfigDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerConfigDto>> getServerConfig({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/config';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerConfigDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerConfigDto),
|
||||
) as ServerConfigDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerConfigDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getServerFeatures
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerFeaturesDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerFeaturesDto>> getServerFeatures({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/features';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerFeaturesDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerFeaturesDto),
|
||||
) as ServerFeaturesDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerFeaturesDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getServerInfo
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerInfoResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerInfoResponseDto>> getServerInfo({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerInfoResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerInfoResponseDto),
|
||||
) as ServerInfoResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerInfoResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getServerStatistics
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerStatsResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerStatsResponseDto>> getServerStatistics({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/statistics';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerStatsResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerStatsResponseDto),
|
||||
) as ServerStatsResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerStatsResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getServerVersion
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerVersionResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerVersionResponseDto>> getServerVersion({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/version';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerVersionResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerVersionResponseDto),
|
||||
) as ServerVersionResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerVersionResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getSupportedMediaTypes
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerMediaTypesResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerMediaTypesResponseDto>> getSupportedMediaTypes({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/media-types';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerMediaTypesResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerMediaTypesResponseDto),
|
||||
) as ServerMediaTypesResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerMediaTypesResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getTheme
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerThemeDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerThemeDto>> getTheme({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/theme';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerThemeDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerThemeDto),
|
||||
) as ServerThemeDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerThemeDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// pingServer
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ServerPingResponse] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ServerPingResponse>> pingServer({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/server-info/ping';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ServerPingResponse? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ServerPingResponse),
|
||||
) as ServerPingResponse;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ServerPingResponse>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,235 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/session_response_dto.dart';
|
||||
|
||||
class SessionsApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SessionsApi(this._dio, this._serializers);
|
||||
|
||||
/// deleteAllSessions
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteAllSessions({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/sessions';
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// deleteSession
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteSession({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/sessions/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getSessions
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<SessionResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<SessionResponseDto>>> getSessions({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/sessions';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<SessionResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(SessionResponseDto)]),
|
||||
) as BuiltList<SessionResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<SessionResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,837 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_ids_dto.dart';
|
||||
import 'package:openapi/src/model/asset_ids_response_dto.dart';
|
||||
import 'package:openapi/src/model/shared_link_create_dto.dart';
|
||||
import 'package:openapi/src/model/shared_link_edit_dto.dart';
|
||||
import 'package:openapi/src/model/shared_link_response_dto.dart';
|
||||
|
||||
class SharedLinkApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SharedLinkApi(this._dio, this._serializers);
|
||||
|
||||
/// addSharedLinkAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [assetIdsDto]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetIdsResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetIdsResponseDto>>> addSharedLinkAssets({
|
||||
required String id,
|
||||
required AssetIdsDto assetIdsDto,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
};
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AssetIdsDto);
|
||||
_bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetIdsResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]),
|
||||
) as BuiltList<AssetIdsResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetIdsResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// createSharedLink
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [sharedLinkCreateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SharedLinkResponseDto>> createSharedLink({
|
||||
required SharedLinkCreateDto sharedLinkCreateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(SharedLinkCreateDto);
|
||||
_bodyData = _serializers.serialize(sharedLinkCreateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SharedLinkResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SharedLinkResponseDto),
|
||||
) as SharedLinkResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SharedLinkResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getAllSharedLinks
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<SharedLinkResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<SharedLinkResponseDto>>> getAllSharedLinks({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<SharedLinkResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(SharedLinkResponseDto)]),
|
||||
) as BuiltList<SharedLinkResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<SharedLinkResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getMySharedLink
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [key]
|
||||
/// * [password]
|
||||
/// * [token]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SharedLinkResponseDto>> getMySharedLink({
|
||||
String? key,
|
||||
String? password,
|
||||
String? token,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/me';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
if (password != null) r'password': encodeQueryParameter(_serializers, password, const FullType(String)),
|
||||
if (token != null) r'token': encodeQueryParameter(_serializers, token, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SharedLinkResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SharedLinkResponseDto),
|
||||
) as SharedLinkResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SharedLinkResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getSharedLinkById
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SharedLinkResponseDto>> getSharedLinkById({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SharedLinkResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SharedLinkResponseDto),
|
||||
) as SharedLinkResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SharedLinkResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// removeSharedLink
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> removeSharedLink({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// removeSharedLinkAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [assetIdsDto]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetIdsResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetIdsResponseDto>>> removeSharedLinkAssets({
|
||||
required String id,
|
||||
required AssetIdsDto assetIdsDto,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
};
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AssetIdsDto);
|
||||
_bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
queryParameters: _queryParameters,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetIdsResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]),
|
||||
) as BuiltList<AssetIdsResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetIdsResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateSharedLink
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [sharedLinkEditDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SharedLinkResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SharedLinkResponseDto>> updateSharedLink({
|
||||
required String id,
|
||||
required SharedLinkEditDto sharedLinkEditDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/shared-link/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PATCH',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(SharedLinkEditDto);
|
||||
_bodyData = _serializers.serialize(sharedLinkEditDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SharedLinkResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SharedLinkResponseDto),
|
||||
) as SharedLinkResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SharedLinkResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,230 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_delta_sync_response_dto.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
|
||||
class SyncApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SyncApi(this._dio, this._serializers);
|
||||
|
||||
/// getAllForUserFullSync
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [limit]
|
||||
/// * [updatedUntil]
|
||||
/// * [lastCreationDate]
|
||||
/// * [lastId]
|
||||
/// * [userId]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetResponseDto>>> getAllForUserFullSync({
|
||||
required int limit,
|
||||
required DateTime updatedUntil,
|
||||
DateTime? lastCreationDate,
|
||||
String? lastId,
|
||||
String? userId,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/sync/full-sync';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (lastCreationDate != null) r'lastCreationDate': encodeQueryParameter(_serializers, lastCreationDate, const FullType(DateTime)),
|
||||
if (lastId != null) r'lastId': encodeQueryParameter(_serializers, lastId, const FullType(String)),
|
||||
r'limit': encodeQueryParameter(_serializers, limit, const FullType(int)),
|
||||
r'updatedUntil': encodeQueryParameter(_serializers, updatedUntil, const FullType(DateTime)),
|
||||
if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getDeltaSync
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [updatedAfter]
|
||||
/// * [userIds]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [AssetDeltaSyncResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<AssetDeltaSyncResponseDto>> getDeltaSync({
|
||||
required DateTime updatedAfter,
|
||||
required BuiltList<String> userIds,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/sync/delta-sync';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'updatedAfter': encodeQueryParameter(_serializers, updatedAfter, const FullType(DateTime)),
|
||||
r'userIds': encodeCollectionQueryParameter<String>(_serializers, userIds, const FullType(BuiltList, [FullType(String)]), format: ListFormat.multi,),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
AssetDeltaSyncResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(AssetDeltaSyncResponseDto),
|
||||
) as AssetDeltaSyncResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<AssetDeltaSyncResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_value/json_object.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/map_theme.dart';
|
||||
import 'package:openapi/src/model/system_config_dto.dart';
|
||||
import 'package:openapi/src/model/system_config_template_storage_option_dto.dart';
|
||||
|
||||
class SystemConfigApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SystemConfigApi(this._dio, this._serializers);
|
||||
|
||||
/// getConfig
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SystemConfigDto>> getConfig({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-config';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SystemConfigDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SystemConfigDto),
|
||||
) as SystemConfigDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SystemConfigDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getConfigDefaults
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SystemConfigDto>> getConfigDefaults({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-config/defaults';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SystemConfigDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SystemConfigDto),
|
||||
) as SystemConfigDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SystemConfigDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getMapStyle
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [theme]
|
||||
/// * [key]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [JsonObject] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<JsonObject>> getMapStyle({
|
||||
required MapTheme theme,
|
||||
String? key,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-config/map/style.json';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
r'theme': encodeQueryParameter(_serializers, theme, const FullType(MapTheme)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
JsonObject? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(JsonObject),
|
||||
) as JsonObject;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<JsonObject>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getStorageTemplateOptions
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SystemConfigTemplateStorageOptionDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SystemConfigTemplateStorageOptionDto>> getStorageTemplateOptions({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-config/storage-template-options';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SystemConfigTemplateStorageOptionDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SystemConfigTemplateStorageOptionDto),
|
||||
) as SystemConfigTemplateStorageOptionDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SystemConfigTemplateStorageOptionDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateConfig
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [systemConfigDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [SystemConfigDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<SystemConfigDto>> updateConfig({
|
||||
required SystemConfigDto systemConfigDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-config';
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(SystemConfigDto);
|
||||
_bodyData = _serializers.serialize(systemConfigDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
SystemConfigDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(SystemConfigDto),
|
||||
) as SystemConfigDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<SystemConfigDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/model/admin_onboarding_update_dto.dart';
|
||||
import 'package:openapi/src/model/reverse_geocoding_state_response_dto.dart';
|
||||
|
||||
class SystemMetadataApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const SystemMetadataApi(this._dio, this._serializers);
|
||||
|
||||
/// getAdminOnboarding
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [AdminOnboardingUpdateDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<AdminOnboardingUpdateDto>> getAdminOnboarding({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-metadata/admin-onboarding';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
AdminOnboardingUpdateDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(AdminOnboardingUpdateDto),
|
||||
) as AdminOnboardingUpdateDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<AdminOnboardingUpdateDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getReverseGeocodingState
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [ReverseGeocodingStateResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<ReverseGeocodingStateResponseDto>> getReverseGeocodingState({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-metadata/reverse-geocoding-state';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
ReverseGeocodingStateResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(ReverseGeocodingStateResponseDto),
|
||||
) as ReverseGeocodingStateResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<ReverseGeocodingStateResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateAdminOnboarding
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [adminOnboardingUpdateDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> updateAdminOnboarding({
|
||||
required AdminOnboardingUpdateDto adminOnboardingUpdateDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/system-metadata/admin-onboarding';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AdminOnboardingUpdateDto);
|
||||
_bodyData = _serializers.serialize(adminOnboardingUpdateDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,811 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_ids_dto.dart';
|
||||
import 'package:openapi/src/model/asset_ids_response_dto.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
import 'package:openapi/src/model/create_tag_dto.dart';
|
||||
import 'package:openapi/src/model/tag_response_dto.dart';
|
||||
import 'package:openapi/src/model/update_tag_dto.dart';
|
||||
|
||||
class TagApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const TagApi(this._dio, this._serializers);
|
||||
|
||||
/// createTag
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [createTagDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [TagResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<TagResponseDto>> createTag({
|
||||
required CreateTagDto createTagDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(CreateTagDto);
|
||||
_bodyData = _serializers.serialize(createTagDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
TagResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(TagResponseDto),
|
||||
) as TagResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<TagResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteTag
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteTag({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// getAllTags
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<TagResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<TagResponseDto>>> getAllTags({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<TagResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]),
|
||||
) as BuiltList<TagResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<TagResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getTagAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetResponseDto>>> getTagAssets({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getTagById
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [TagResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<TagResponseDto>> getTagById({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
TagResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(TagResponseDto),
|
||||
) as TagResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<TagResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// tagAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [assetIdsDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetIdsResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetIdsResponseDto>>> tagAssets({
|
||||
required String id,
|
||||
required AssetIdsDto assetIdsDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AssetIdsDto);
|
||||
_bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetIdsResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]),
|
||||
) as BuiltList<AssetIdsResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetIdsResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// untagAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [assetIdsDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetIdsResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetIdsResponseDto>>> untagAssets({
|
||||
required String id,
|
||||
required AssetIdsDto assetIdsDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}/assets'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(AssetIdsDto);
|
||||
_bodyData = _serializers.serialize(assetIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetIdsResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetIdsResponseDto)]),
|
||||
) as BuiltList<AssetIdsResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetIdsResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateTag
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [updateTagDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [TagResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<TagResponseDto>> updateTag({
|
||||
required String id,
|
||||
required UpdateTagDto updateTagDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/tag/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'PATCH',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(UpdateTagDto);
|
||||
_bodyData = _serializers.serialize(updateTagDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
TagResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(TagResponseDto),
|
||||
) as TagResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<TagResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,280 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/asset_order.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
import 'package:openapi/src/model/time_bucket_response_dto.dart';
|
||||
import 'package:openapi/src/model/time_bucket_size.dart';
|
||||
|
||||
class TimelineApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const TimelineApi(this._dio, this._serializers);
|
||||
|
||||
/// getTimeBucket
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [size]
|
||||
/// * [timeBucket]
|
||||
/// * [albumId]
|
||||
/// * [isArchived]
|
||||
/// * [isFavorite]
|
||||
/// * [isTrashed]
|
||||
/// * [key]
|
||||
/// * [order]
|
||||
/// * [personId]
|
||||
/// * [userId]
|
||||
/// * [withPartners]
|
||||
/// * [withStacked]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<AssetResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<AssetResponseDto>>> getTimeBucket({
|
||||
required TimeBucketSize size,
|
||||
required String timeBucket,
|
||||
String? albumId,
|
||||
bool? isArchived,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
String? personId,
|
||||
String? userId,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/timeline/bucket';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (albumId != null) r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)),
|
||||
if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)),
|
||||
if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)),
|
||||
if (isTrashed != null) r'isTrashed': encodeQueryParameter(_serializers, isTrashed, const FullType(bool)),
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
if (order != null) r'order': encodeQueryParameter(_serializers, order, const FullType(AssetOrder)),
|
||||
if (personId != null) r'personId': encodeQueryParameter(_serializers, personId, const FullType(String)),
|
||||
r'size': encodeQueryParameter(_serializers, size, const FullType(TimeBucketSize)),
|
||||
r'timeBucket': encodeQueryParameter(_serializers, timeBucket, const FullType(String)),
|
||||
if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)),
|
||||
if (withPartners != null) r'withPartners': encodeQueryParameter(_serializers, withPartners, const FullType(bool)),
|
||||
if (withStacked != null) r'withStacked': encodeQueryParameter(_serializers, withStacked, const FullType(bool)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<AssetResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<AssetResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getTimeBuckets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [size]
|
||||
/// * [albumId]
|
||||
/// * [isArchived]
|
||||
/// * [isFavorite]
|
||||
/// * [isTrashed]
|
||||
/// * [key]
|
||||
/// * [order]
|
||||
/// * [personId]
|
||||
/// * [userId]
|
||||
/// * [withPartners]
|
||||
/// * [withStacked]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<TimeBucketResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<TimeBucketResponseDto>>> getTimeBuckets({
|
||||
required TimeBucketSize size,
|
||||
String? albumId,
|
||||
bool? isArchived,
|
||||
bool? isFavorite,
|
||||
bool? isTrashed,
|
||||
String? key,
|
||||
AssetOrder? order,
|
||||
String? personId,
|
||||
String? userId,
|
||||
bool? withPartners,
|
||||
bool? withStacked,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/timeline/buckets';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
if (albumId != null) r'albumId': encodeQueryParameter(_serializers, albumId, const FullType(String)),
|
||||
if (isArchived != null) r'isArchived': encodeQueryParameter(_serializers, isArchived, const FullType(bool)),
|
||||
if (isFavorite != null) r'isFavorite': encodeQueryParameter(_serializers, isFavorite, const FullType(bool)),
|
||||
if (isTrashed != null) r'isTrashed': encodeQueryParameter(_serializers, isTrashed, const FullType(bool)),
|
||||
if (key != null) r'key': encodeQueryParameter(_serializers, key, const FullType(String)),
|
||||
if (order != null) r'order': encodeQueryParameter(_serializers, order, const FullType(AssetOrder)),
|
||||
if (personId != null) r'personId': encodeQueryParameter(_serializers, personId, const FullType(String)),
|
||||
r'size': encodeQueryParameter(_serializers, size, const FullType(TimeBucketSize)),
|
||||
if (userId != null) r'userId': encodeQueryParameter(_serializers, userId, const FullType(String)),
|
||||
if (withPartners != null) r'withPartners': encodeQueryParameter(_serializers, withPartners, const FullType(bool)),
|
||||
if (withStacked != null) r'withStacked': encodeQueryParameter(_serializers, withStacked, const FullType(bool)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<TimeBucketResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(TimeBucketResponseDto)]),
|
||||
) as BuiltList<TimeBucketResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<TimeBucketResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,225 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'package:openapi/src/model/bulk_ids_dto.dart';
|
||||
|
||||
class TrashApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const TrashApi(this._dio, this._serializers);
|
||||
|
||||
/// emptyTrash
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> emptyTrash({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/trash/empty';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// restoreAssets
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [bulkIdsDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> restoreAssets({
|
||||
required BulkIdsDto bulkIdsDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/trash/restore/assets';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(BulkIdsDto);
|
||||
_bodyData = _serializers.serialize(bulkIdsDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// restoreTrash
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> restoreTrash({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/trash/restore';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,991 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
import 'dart:typed_data';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/api_util.dart';
|
||||
import 'package:openapi/src/model/create_profile_image_response_dto.dart';
|
||||
import 'package:openapi/src/model/create_user_dto.dart';
|
||||
import 'package:openapi/src/model/delete_user_dto.dart';
|
||||
import 'package:openapi/src/model/update_user_dto.dart';
|
||||
import 'package:openapi/src/model/user_response_dto.dart';
|
||||
|
||||
class UserApi {
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
final Serializers _serializers;
|
||||
|
||||
const UserApi(this._dio, this._serializers);
|
||||
|
||||
/// createProfileImage
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [file]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [CreateProfileImageResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<CreateProfileImageResponseDto>> createProfileImage({
|
||||
required MultipartFile file,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/profile-image';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'multipart/form-data',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
_bodyData = FormData.fromMap(<String, dynamic>{
|
||||
r'file': file,
|
||||
});
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
CreateProfileImageResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(CreateProfileImageResponseDto),
|
||||
) as CreateProfileImageResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<CreateProfileImageResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// createUser
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [createUserDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> createUser({
|
||||
required CreateUserDto createUserDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user';
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(CreateUserDto);
|
||||
_bodyData = _serializers.serialize(createUserDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// deleteProfileImage
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future]
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<void>> deleteProfileImage({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/profile-image';
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
return _response;
|
||||
}
|
||||
|
||||
/// deleteUser
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [deleteUserDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> deleteUser({
|
||||
required String id,
|
||||
required DeleteUserDto deleteUserDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'DELETE',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(DeleteUserDto);
|
||||
_bodyData = _serializers.serialize(deleteUserDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getAllUsers
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [isAll]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [BuiltList<UserResponseDto>] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<BuiltList<UserResponseDto>>> getAllUsers({
|
||||
required bool isAll,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _queryParameters = <String, dynamic>{
|
||||
r'isAll': encodeQueryParameter(_serializers, isAll, const FullType(bool)),
|
||||
};
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
queryParameters: _queryParameters,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
BuiltList<UserResponseDto>? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]),
|
||||
) as BuiltList<UserResponseDto>;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<BuiltList<UserResponseDto>>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getMyUserInfo
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> getMyUserInfo({
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/me';
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getProfileImage
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [Uint8List] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<Uint8List>> getProfileImage({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/profile-image/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
responseType: ResponseType.bytes,
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
Uint8List? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : rawResponse as Uint8List;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<Uint8List>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// getUserById
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> getUserById({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/info/{id}'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'GET',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// restoreUser
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [id]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> restoreUser({
|
||||
required String id,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user/{id}/restore'.replaceAll('{' r'id' '}', encodeQueryParameter(_serializers, id, const FullType(String)).toString());
|
||||
final _options = Options(
|
||||
method: r'POST',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
/// updateUser
|
||||
///
|
||||
///
|
||||
/// Parameters:
|
||||
/// * [updateUserDto]
|
||||
/// * [cancelToken] - A [CancelToken] that can be used to cancel the operation
|
||||
/// * [headers] - Can be used to add additional headers to the request
|
||||
/// * [extras] - Can be used to add flags to the request
|
||||
/// * [validateStatus] - A [ValidateStatus] callback that can be used to determine request success based on the HTTP status of the response
|
||||
/// * [onSendProgress] - A [ProgressCallback] that can be used to get the send progress
|
||||
/// * [onReceiveProgress] - A [ProgressCallback] that can be used to get the receive progress
|
||||
///
|
||||
/// Returns a [Future] containing a [Response] with a [UserResponseDto] as data
|
||||
/// Throws [DioException] if API call or serialization fails
|
||||
Future<Response<UserResponseDto>> updateUser({
|
||||
required UpdateUserDto updateUserDto,
|
||||
CancelToken? cancelToken,
|
||||
Map<String, dynamic>? headers,
|
||||
Map<String, dynamic>? extra,
|
||||
ValidateStatus? validateStatus,
|
||||
ProgressCallback? onSendProgress,
|
||||
ProgressCallback? onReceiveProgress,
|
||||
}) async {
|
||||
final _path = r'/user';
|
||||
final _options = Options(
|
||||
method: r'PUT',
|
||||
headers: <String, dynamic>{
|
||||
...?headers,
|
||||
},
|
||||
extra: <String, dynamic>{
|
||||
'secure': <Map<String, String>>[
|
||||
{
|
||||
'type': 'apiKey',
|
||||
'name': 'cookie',
|
||||
'keyName': 'immich_access_token',
|
||||
'where': '',
|
||||
},{
|
||||
'type': 'apiKey',
|
||||
'name': 'api_key',
|
||||
'keyName': 'x-api-key',
|
||||
'where': 'header',
|
||||
},{
|
||||
'type': 'http',
|
||||
'scheme': 'Bearer',
|
||||
'name': 'bearer',
|
||||
},
|
||||
],
|
||||
...?extra,
|
||||
},
|
||||
contentType: 'application/json',
|
||||
validateStatus: validateStatus,
|
||||
);
|
||||
|
||||
dynamic _bodyData;
|
||||
|
||||
try {
|
||||
const _type = FullType(UpdateUserDto);
|
||||
_bodyData = _serializers.serialize(updateUserDto, specifiedType: _type);
|
||||
|
||||
} catch(error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _options.compose(
|
||||
_dio.options,
|
||||
_path,
|
||||
),
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
final _response = await _dio.request<Object>(
|
||||
_path,
|
||||
data: _bodyData,
|
||||
options: _options,
|
||||
cancelToken: cancelToken,
|
||||
onSendProgress: onSendProgress,
|
||||
onReceiveProgress: onReceiveProgress,
|
||||
);
|
||||
|
||||
UserResponseDto? _responseData;
|
||||
|
||||
try {
|
||||
final rawResponse = _response.data;
|
||||
_responseData = rawResponse == null ? null : _serializers.deserialize(
|
||||
rawResponse,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
|
||||
} catch (error, stackTrace) {
|
||||
throw DioException(
|
||||
requestOptions: _response.requestOptions,
|
||||
response: _response,
|
||||
type: DioExceptionType.unknown,
|
||||
error: error,
|
||||
stackTrace: stackTrace,
|
||||
);
|
||||
}
|
||||
|
||||
return Response<UserResponseDto>(
|
||||
data: _responseData,
|
||||
headers: _response.headers,
|
||||
isRedirect: _response.isRedirect,
|
||||
requestOptions: _response.requestOptions,
|
||||
redirects: _response.redirects,
|
||||
statusCode: _response.statusCode,
|
||||
statusMessage: _response.statusMessage,
|
||||
extra: _response.extra,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:typed_data';
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
/// Format the given form parameter object into something that Dio can handle.
|
||||
/// Returns primitive or String.
|
||||
/// Returns List/Map if the value is BuildList/BuiltMap.
|
||||
dynamic encodeFormParameter(Serializers serializers, dynamic value, FullType type) {
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
if (value is String || value is num || value is bool) {
|
||||
return value;
|
||||
}
|
||||
final serialized = serializers.serialize(
|
||||
value as Object,
|
||||
specifiedType: type,
|
||||
);
|
||||
if (serialized is String) {
|
||||
return serialized;
|
||||
}
|
||||
if (value is BuiltList || value is BuiltSet || value is BuiltMap) {
|
||||
return serialized;
|
||||
}
|
||||
return json.encode(serialized);
|
||||
}
|
||||
|
||||
dynamic encodeQueryParameter(
|
||||
Serializers serializers,
|
||||
dynamic value,
|
||||
FullType type,
|
||||
) {
|
||||
if (value == null) {
|
||||
return '';
|
||||
}
|
||||
if (value is String || value is num || value is bool) {
|
||||
return value;
|
||||
}
|
||||
if (value is Uint8List) {
|
||||
// Currently not sure how to serialize this
|
||||
return value;
|
||||
}
|
||||
final serialized = serializers.serialize(
|
||||
value as Object,
|
||||
specifiedType: type,
|
||||
);
|
||||
if (serialized == null) {
|
||||
return '';
|
||||
}
|
||||
if (serialized is String) {
|
||||
return serialized;
|
||||
}
|
||||
return serialized;
|
||||
}
|
||||
|
||||
ListParam<Object?> encodeCollectionQueryParameter<T>(
|
||||
Serializers serializers,
|
||||
dynamic value,
|
||||
FullType type, {
|
||||
ListFormat format = ListFormat.multi,
|
||||
}) {
|
||||
final serialized = serializers.serialize(
|
||||
value as Object,
|
||||
specifiedType: type,
|
||||
);
|
||||
if (value is BuiltList<T> || value is BuiltSet<T>) {
|
||||
return ListParam(List.of((serialized as Iterable<Object?>).cast()), format);
|
||||
}
|
||||
throw ArgumentError('Invalid value passed to encodeCollectionQueryParameter');
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:openapi/src/auth/auth.dart';
|
||||
|
||||
class ApiKeyAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, String> apiKeys = {};
|
||||
|
||||
@override
|
||||
void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
|
||||
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'apiKey');
|
||||
for (final info in authInfo) {
|
||||
final authName = info['name'] as String;
|
||||
final authKeyName = info['keyName'] as String;
|
||||
final authWhere = info['where'] as String;
|
||||
final apiKey = apiKeys[authName];
|
||||
if (apiKey != null) {
|
||||
if (authWhere == 'query') {
|
||||
options.queryParameters[authKeyName] = apiKey;
|
||||
} else {
|
||||
options.headers[authKeyName] = apiKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
|
||||
abstract class AuthInterceptor extends Interceptor {
|
||||
/// Get auth information on given route for the given type.
|
||||
/// Can return an empty list if type is not present on auth data or
|
||||
/// if route doesn't need authentication.
|
||||
List<Map<String, String>> getAuthInfo(RequestOptions route, bool Function(Map<String, String> secure) handles) {
|
||||
if (route.extra.containsKey('secure')) {
|
||||
final auth = route.extra['secure'] as List<Map<String, String>>;
|
||||
return auth.where((secure) => handles(secure)).toList();
|
||||
}
|
||||
return [];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:openapi/src/auth/auth.dart';
|
||||
|
||||
class BasicAuthInfo {
|
||||
final String username;
|
||||
final String password;
|
||||
|
||||
const BasicAuthInfo(this.username, this.password);
|
||||
}
|
||||
|
||||
class BasicAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, BasicAuthInfo> authInfo = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final metadataAuthInfo = getAuthInfo(options, (secure) => (secure['type'] == 'http' && secure['scheme'] == 'basic') || secure['type'] == 'basic');
|
||||
for (final info in metadataAuthInfo) {
|
||||
final authName = info['name'] as String;
|
||||
final basicAuthInfo = authInfo[authName];
|
||||
if (basicAuthInfo != null) {
|
||||
final basicAuth = 'Basic ${base64Encode(utf8.encode('${basicAuthInfo.username}:${basicAuthInfo.password}'))}';
|
||||
options.headers['Authorization'] = basicAuth;
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:openapi/src/auth/auth.dart';
|
||||
|
||||
class BearerAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, String> tokens = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'http' && secure['scheme'] == 'bearer');
|
||||
for (final info in authInfo) {
|
||||
final token = tokens[info['name']];
|
||||
if (token != null) {
|
||||
options.headers['Authorization'] = 'Bearer ${token}';
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:openapi/src/auth/auth.dart';
|
||||
|
||||
class OAuthInterceptor extends AuthInterceptor {
|
||||
final Map<String, String> tokens = {};
|
||||
|
||||
@override
|
||||
void onRequest(
|
||||
RequestOptions options,
|
||||
RequestInterceptorHandler handler,
|
||||
) {
|
||||
final authInfo = getAuthInfo(options, (secure) => secure['type'] == 'oauth' || secure['type'] == 'oauth2');
|
||||
for (final info in authInfo) {
|
||||
final token = tokens[info['name']];
|
||||
if (token != null) {
|
||||
options.headers['Authorization'] = 'Bearer ${token}';
|
||||
break;
|
||||
}
|
||||
}
|
||||
super.onRequest(options, handler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
import 'package:openapi/src/model/date.dart';
|
||||
|
||||
class DateSerializer implements PrimitiveSerializer<Date> {
|
||||
|
||||
const DateSerializer();
|
||||
|
||||
@override
|
||||
Iterable<Type> get types => BuiltList.of([Date]);
|
||||
|
||||
@override
|
||||
String get wireName => 'Date';
|
||||
|
||||
@override
|
||||
Date deserialize(Serializers serializers, Object serialized,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
final parsed = DateTime.parse(serialized as String);
|
||||
return Date(parsed.year, parsed.month, parsed.day);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(Serializers serializers, Date date,
|
||||
{FullType specifiedType = FullType.unspecified}) {
|
||||
return date.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/reaction_type.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'activity_create_dto.g.dart';
|
||||
|
||||
/// ActivityCreateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [albumId]
|
||||
/// * [assetId]
|
||||
/// * [comment]
|
||||
/// * [type]
|
||||
@BuiltValue()
|
||||
abstract class ActivityCreateDto implements Built<ActivityCreateDto, ActivityCreateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'albumId')
|
||||
String get albumId;
|
||||
|
||||
@BuiltValueField(wireName: r'assetId')
|
||||
String? get assetId;
|
||||
|
||||
@BuiltValueField(wireName: r'comment')
|
||||
String? get comment;
|
||||
|
||||
@BuiltValueField(wireName: r'type')
|
||||
ReactionType get type;
|
||||
// enum typeEnum { comment, like, };
|
||||
|
||||
ActivityCreateDto._();
|
||||
|
||||
factory ActivityCreateDto([void updates(ActivityCreateDtoBuilder b)]) = _$ActivityCreateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(ActivityCreateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<ActivityCreateDto> get serializer => _$ActivityCreateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$ActivityCreateDtoSerializer implements PrimitiveSerializer<ActivityCreateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [ActivityCreateDto, _$ActivityCreateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'ActivityCreateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
ActivityCreateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'albumId';
|
||||
yield serializers.serialize(
|
||||
object.albumId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.assetId != null) {
|
||||
yield r'assetId';
|
||||
yield serializers.serialize(
|
||||
object.assetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
if (object.comment != null) {
|
||||
yield r'comment';
|
||||
yield serializers.serialize(
|
||||
object.comment,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
yield r'type';
|
||||
yield serializers.serialize(
|
||||
object.type,
|
||||
specifiedType: const FullType(ReactionType),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
ActivityCreateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required ActivityCreateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'albumId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.albumId = valueDes;
|
||||
break;
|
||||
case r'assetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.assetId = valueDes;
|
||||
break;
|
||||
case r'comment':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.comment = valueDes;
|
||||
break;
|
||||
case r'type':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(ReactionType),
|
||||
) as ReactionType;
|
||||
result.type = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
ActivityCreateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = ActivityCreateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,208 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/user_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'activity_response_dto.g.dart';
|
||||
|
||||
/// ActivityResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetId]
|
||||
/// * [comment]
|
||||
/// * [createdAt]
|
||||
/// * [id]
|
||||
/// * [type]
|
||||
/// * [user]
|
||||
@BuiltValue()
|
||||
abstract class ActivityResponseDto implements Built<ActivityResponseDto, ActivityResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetId')
|
||||
String? get assetId;
|
||||
|
||||
@BuiltValueField(wireName: r'comment')
|
||||
String? get comment;
|
||||
|
||||
@BuiltValueField(wireName: r'createdAt')
|
||||
DateTime get createdAt;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'type')
|
||||
ActivityResponseDtoTypeEnum get type;
|
||||
// enum typeEnum { comment, like, };
|
||||
|
||||
@BuiltValueField(wireName: r'user')
|
||||
UserDto get user;
|
||||
|
||||
ActivityResponseDto._();
|
||||
|
||||
factory ActivityResponseDto([void updates(ActivityResponseDtoBuilder b)]) = _$ActivityResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(ActivityResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<ActivityResponseDto> get serializer => _$ActivityResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$ActivityResponseDtoSerializer implements PrimitiveSerializer<ActivityResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [ActivityResponseDto, _$ActivityResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'ActivityResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
ActivityResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetId';
|
||||
yield object.assetId == null ? null : serializers.serialize(
|
||||
object.assetId,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
if (object.comment != null) {
|
||||
yield r'comment';
|
||||
yield serializers.serialize(
|
||||
object.comment,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
yield r'createdAt';
|
||||
yield serializers.serialize(
|
||||
object.createdAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'type';
|
||||
yield serializers.serialize(
|
||||
object.type,
|
||||
specifiedType: const FullType(ActivityResponseDtoTypeEnum),
|
||||
);
|
||||
yield r'user';
|
||||
yield serializers.serialize(
|
||||
object.user,
|
||||
specifiedType: const FullType(UserDto),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
ActivityResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required ActivityResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.assetId = valueDes;
|
||||
break;
|
||||
case r'comment':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.comment = valueDes;
|
||||
break;
|
||||
case r'createdAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.createdAt = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'type':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(ActivityResponseDtoTypeEnum),
|
||||
) as ActivityResponseDtoTypeEnum;
|
||||
result.type = valueDes;
|
||||
break;
|
||||
case r'user':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(UserDto),
|
||||
) as UserDto;
|
||||
result.user.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
ActivityResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = ActivityResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
class ActivityResponseDtoTypeEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'comment')
|
||||
static const ActivityResponseDtoTypeEnum comment = _$activityResponseDtoTypeEnum_comment;
|
||||
@BuiltValueEnumConst(wireName: r'like')
|
||||
static const ActivityResponseDtoTypeEnum like = _$activityResponseDtoTypeEnum_like;
|
||||
|
||||
static Serializer<ActivityResponseDtoTypeEnum> get serializer => _$activityResponseDtoTypeEnumSerializer;
|
||||
|
||||
const ActivityResponseDtoTypeEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<ActivityResponseDtoTypeEnum> get values => _$activityResponseDtoTypeEnumValues;
|
||||
static ActivityResponseDtoTypeEnum valueOf(String name) => _$activityResponseDtoTypeEnumValueOf(name);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'activity_statistics_response_dto.g.dart';
|
||||
|
||||
/// ActivityStatisticsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [comments]
|
||||
@BuiltValue()
|
||||
abstract class ActivityStatisticsResponseDto implements Built<ActivityStatisticsResponseDto, ActivityStatisticsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'comments')
|
||||
int get comments;
|
||||
|
||||
ActivityStatisticsResponseDto._();
|
||||
|
||||
factory ActivityStatisticsResponseDto([void updates(ActivityStatisticsResponseDtoBuilder b)]) = _$ActivityStatisticsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(ActivityStatisticsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<ActivityStatisticsResponseDto> get serializer => _$ActivityStatisticsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$ActivityStatisticsResponseDtoSerializer implements PrimitiveSerializer<ActivityStatisticsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [ActivityStatisticsResponseDto, _$ActivityStatisticsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'ActivityStatisticsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
ActivityStatisticsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'comments';
|
||||
yield serializers.serialize(
|
||||
object.comments,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
ActivityStatisticsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required ActivityStatisticsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'comments':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.comments = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
ActivityStatisticsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = ActivityStatisticsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'add_users_dto.g.dart';
|
||||
|
||||
/// AddUsersDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [sharedUserIds]
|
||||
@BuiltValue()
|
||||
abstract class AddUsersDto implements Built<AddUsersDto, AddUsersDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'sharedUserIds')
|
||||
BuiltList<String> get sharedUserIds;
|
||||
|
||||
AddUsersDto._();
|
||||
|
||||
factory AddUsersDto([void updates(AddUsersDtoBuilder b)]) = _$AddUsersDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AddUsersDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AddUsersDto> get serializer => _$AddUsersDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AddUsersDtoSerializer implements PrimitiveSerializer<AddUsersDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AddUsersDto, _$AddUsersDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AddUsersDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AddUsersDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'sharedUserIds';
|
||||
yield serializers.serialize(
|
||||
object.sharedUserIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AddUsersDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AddUsersDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'sharedUserIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.sharedUserIds.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AddUsersDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AddUsersDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'admin_onboarding_update_dto.g.dart';
|
||||
|
||||
/// AdminOnboardingUpdateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [isOnboarded]
|
||||
@BuiltValue()
|
||||
abstract class AdminOnboardingUpdateDto implements Built<AdminOnboardingUpdateDto, AdminOnboardingUpdateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'isOnboarded')
|
||||
bool get isOnboarded;
|
||||
|
||||
AdminOnboardingUpdateDto._();
|
||||
|
||||
factory AdminOnboardingUpdateDto([void updates(AdminOnboardingUpdateDtoBuilder b)]) = _$AdminOnboardingUpdateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AdminOnboardingUpdateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AdminOnboardingUpdateDto> get serializer => _$AdminOnboardingUpdateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AdminOnboardingUpdateDtoSerializer implements PrimitiveSerializer<AdminOnboardingUpdateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AdminOnboardingUpdateDto, _$AdminOnboardingUpdateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AdminOnboardingUpdateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AdminOnboardingUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'isOnboarded';
|
||||
yield serializers.serialize(
|
||||
object.isOnboarded,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AdminOnboardingUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AdminOnboardingUpdateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'isOnboarded':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isOnboarded = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AdminOnboardingUpdateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AdminOnboardingUpdateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'album_count_response_dto.g.dart';
|
||||
|
||||
/// AlbumCountResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [notShared]
|
||||
/// * [owned]
|
||||
/// * [shared]
|
||||
@BuiltValue()
|
||||
abstract class AlbumCountResponseDto implements Built<AlbumCountResponseDto, AlbumCountResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'notShared')
|
||||
int get notShared;
|
||||
|
||||
@BuiltValueField(wireName: r'owned')
|
||||
int get owned;
|
||||
|
||||
@BuiltValueField(wireName: r'shared')
|
||||
int get shared;
|
||||
|
||||
AlbumCountResponseDto._();
|
||||
|
||||
factory AlbumCountResponseDto([void updates(AlbumCountResponseDtoBuilder b)]) = _$AlbumCountResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AlbumCountResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AlbumCountResponseDto> get serializer => _$AlbumCountResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AlbumCountResponseDtoSerializer implements PrimitiveSerializer<AlbumCountResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AlbumCountResponseDto, _$AlbumCountResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AlbumCountResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AlbumCountResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'notShared';
|
||||
yield serializers.serialize(
|
||||
object.notShared,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'owned';
|
||||
yield serializers.serialize(
|
||||
object.owned,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'shared';
|
||||
yield serializers.serialize(
|
||||
object.shared,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AlbumCountResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AlbumCountResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'notShared':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.notShared = valueDes;
|
||||
break;
|
||||
case r'owned':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.owned = valueDes;
|
||||
break;
|
||||
case r'shared':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.shared = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AlbumCountResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AlbumCountResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,392 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/asset_order.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
import 'package:openapi/src/model/user_response_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'album_response_dto.g.dart';
|
||||
|
||||
/// AlbumResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [albumName]
|
||||
/// * [albumThumbnailAssetId]
|
||||
/// * [assetCount]
|
||||
/// * [assets]
|
||||
/// * [createdAt]
|
||||
/// * [description]
|
||||
/// * [endDate]
|
||||
/// * [hasSharedLink]
|
||||
/// * [id]
|
||||
/// * [isActivityEnabled]
|
||||
/// * [lastModifiedAssetTimestamp]
|
||||
/// * [order]
|
||||
/// * [owner]
|
||||
/// * [ownerId]
|
||||
/// * [shared]
|
||||
/// * [sharedUsers]
|
||||
/// * [startDate]
|
||||
/// * [updatedAt]
|
||||
@BuiltValue()
|
||||
abstract class AlbumResponseDto implements Built<AlbumResponseDto, AlbumResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'albumName')
|
||||
String get albumName;
|
||||
|
||||
@BuiltValueField(wireName: r'albumThumbnailAssetId')
|
||||
String? get albumThumbnailAssetId;
|
||||
|
||||
@BuiltValueField(wireName: r'assetCount')
|
||||
int get assetCount;
|
||||
|
||||
@BuiltValueField(wireName: r'assets')
|
||||
BuiltList<AssetResponseDto> get assets;
|
||||
|
||||
@BuiltValueField(wireName: r'createdAt')
|
||||
DateTime get createdAt;
|
||||
|
||||
@BuiltValueField(wireName: r'description')
|
||||
String get description;
|
||||
|
||||
@BuiltValueField(wireName: r'endDate')
|
||||
DateTime? get endDate;
|
||||
|
||||
@BuiltValueField(wireName: r'hasSharedLink')
|
||||
bool get hasSharedLink;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'isActivityEnabled')
|
||||
bool get isActivityEnabled;
|
||||
|
||||
@BuiltValueField(wireName: r'lastModifiedAssetTimestamp')
|
||||
DateTime? get lastModifiedAssetTimestamp;
|
||||
|
||||
@BuiltValueField(wireName: r'order')
|
||||
AssetOrder? get order;
|
||||
// enum orderEnum { asc, desc, };
|
||||
|
||||
@BuiltValueField(wireName: r'owner')
|
||||
UserResponseDto get owner;
|
||||
|
||||
@BuiltValueField(wireName: r'ownerId')
|
||||
String get ownerId;
|
||||
|
||||
@BuiltValueField(wireName: r'shared')
|
||||
bool get shared;
|
||||
|
||||
@BuiltValueField(wireName: r'sharedUsers')
|
||||
BuiltList<UserResponseDto> get sharedUsers;
|
||||
|
||||
@BuiltValueField(wireName: r'startDate')
|
||||
DateTime? get startDate;
|
||||
|
||||
@BuiltValueField(wireName: r'updatedAt')
|
||||
DateTime get updatedAt;
|
||||
|
||||
AlbumResponseDto._();
|
||||
|
||||
factory AlbumResponseDto([void updates(AlbumResponseDtoBuilder b)]) = _$AlbumResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AlbumResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AlbumResponseDto> get serializer => _$AlbumResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AlbumResponseDtoSerializer implements PrimitiveSerializer<AlbumResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AlbumResponseDto, _$AlbumResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AlbumResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AlbumResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'albumName';
|
||||
yield serializers.serialize(
|
||||
object.albumName,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'albumThumbnailAssetId';
|
||||
yield object.albumThumbnailAssetId == null ? null : serializers.serialize(
|
||||
object.albumThumbnailAssetId,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
yield r'assetCount';
|
||||
yield serializers.serialize(
|
||||
object.assetCount,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'assets';
|
||||
yield serializers.serialize(
|
||||
object.assets,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
);
|
||||
yield r'createdAt';
|
||||
yield serializers.serialize(
|
||||
object.createdAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'description';
|
||||
yield serializers.serialize(
|
||||
object.description,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.endDate != null) {
|
||||
yield r'endDate';
|
||||
yield serializers.serialize(
|
||||
object.endDate,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
yield r'hasSharedLink';
|
||||
yield serializers.serialize(
|
||||
object.hasSharedLink,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'isActivityEnabled';
|
||||
yield serializers.serialize(
|
||||
object.isActivityEnabled,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
if (object.lastModifiedAssetTimestamp != null) {
|
||||
yield r'lastModifiedAssetTimestamp';
|
||||
yield serializers.serialize(
|
||||
object.lastModifiedAssetTimestamp,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
if (object.order != null) {
|
||||
yield r'order';
|
||||
yield serializers.serialize(
|
||||
object.order,
|
||||
specifiedType: const FullType(AssetOrder),
|
||||
);
|
||||
}
|
||||
yield r'owner';
|
||||
yield serializers.serialize(
|
||||
object.owner,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
);
|
||||
yield r'ownerId';
|
||||
yield serializers.serialize(
|
||||
object.ownerId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'shared';
|
||||
yield serializers.serialize(
|
||||
object.shared,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'sharedUsers';
|
||||
yield serializers.serialize(
|
||||
object.sharedUsers,
|
||||
specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]),
|
||||
);
|
||||
if (object.startDate != null) {
|
||||
yield r'startDate';
|
||||
yield serializers.serialize(
|
||||
object.startDate,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
yield r'updatedAt';
|
||||
yield serializers.serialize(
|
||||
object.updatedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AlbumResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AlbumResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'albumName':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.albumName = valueDes;
|
||||
break;
|
||||
case r'albumThumbnailAssetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.albumThumbnailAssetId = valueDes;
|
||||
break;
|
||||
case r'assetCount':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.assetCount = valueDes;
|
||||
break;
|
||||
case r'assets':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
result.assets.replace(valueDes);
|
||||
break;
|
||||
case r'createdAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.createdAt = valueDes;
|
||||
break;
|
||||
case r'description':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.description = valueDes;
|
||||
break;
|
||||
case r'endDate':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.endDate = valueDes;
|
||||
break;
|
||||
case r'hasSharedLink':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.hasSharedLink = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'isActivityEnabled':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isActivityEnabled = valueDes;
|
||||
break;
|
||||
case r'lastModifiedAssetTimestamp':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.lastModifiedAssetTimestamp = valueDes;
|
||||
break;
|
||||
case r'order':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetOrder),
|
||||
) as AssetOrder;
|
||||
result.order = valueDes;
|
||||
break;
|
||||
case r'owner':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
result.owner.replace(valueDes);
|
||||
break;
|
||||
case r'ownerId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.ownerId = valueDes;
|
||||
break;
|
||||
case r'shared':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.shared = valueDes;
|
||||
break;
|
||||
case r'sharedUsers':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(UserResponseDto)]),
|
||||
) as BuiltList<UserResponseDto>;
|
||||
result.sharedUsers.replace(valueDes);
|
||||
break;
|
||||
case r'startDate':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.startDate = valueDes;
|
||||
break;
|
||||
case r'updatedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.updatedAt = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AlbumResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AlbumResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,283 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/job_status_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'all_job_status_response_dto.g.dart';
|
||||
|
||||
/// AllJobStatusResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [backgroundTask]
|
||||
/// * [faceDetection]
|
||||
/// * [facialRecognition]
|
||||
/// * [library_]
|
||||
/// * [metadataExtraction]
|
||||
/// * [migration]
|
||||
/// * [search]
|
||||
/// * [sidecar]
|
||||
/// * [smartSearch]
|
||||
/// * [storageTemplateMigration]
|
||||
/// * [thumbnailGeneration]
|
||||
/// * [videoConversion]
|
||||
@BuiltValue()
|
||||
abstract class AllJobStatusResponseDto implements Built<AllJobStatusResponseDto, AllJobStatusResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'backgroundTask')
|
||||
JobStatusDto get backgroundTask;
|
||||
|
||||
@BuiltValueField(wireName: r'faceDetection')
|
||||
JobStatusDto get faceDetection;
|
||||
|
||||
@BuiltValueField(wireName: r'facialRecognition')
|
||||
JobStatusDto get facialRecognition;
|
||||
|
||||
@BuiltValueField(wireName: r'library')
|
||||
JobStatusDto get library_;
|
||||
|
||||
@BuiltValueField(wireName: r'metadataExtraction')
|
||||
JobStatusDto get metadataExtraction;
|
||||
|
||||
@BuiltValueField(wireName: r'migration')
|
||||
JobStatusDto get migration;
|
||||
|
||||
@BuiltValueField(wireName: r'search')
|
||||
JobStatusDto get search;
|
||||
|
||||
@BuiltValueField(wireName: r'sidecar')
|
||||
JobStatusDto get sidecar;
|
||||
|
||||
@BuiltValueField(wireName: r'smartSearch')
|
||||
JobStatusDto get smartSearch;
|
||||
|
||||
@BuiltValueField(wireName: r'storageTemplateMigration')
|
||||
JobStatusDto get storageTemplateMigration;
|
||||
|
||||
@BuiltValueField(wireName: r'thumbnailGeneration')
|
||||
JobStatusDto get thumbnailGeneration;
|
||||
|
||||
@BuiltValueField(wireName: r'videoConversion')
|
||||
JobStatusDto get videoConversion;
|
||||
|
||||
AllJobStatusResponseDto._();
|
||||
|
||||
factory AllJobStatusResponseDto([void updates(AllJobStatusResponseDtoBuilder b)]) = _$AllJobStatusResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AllJobStatusResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AllJobStatusResponseDto> get serializer => _$AllJobStatusResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AllJobStatusResponseDtoSerializer implements PrimitiveSerializer<AllJobStatusResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AllJobStatusResponseDto, _$AllJobStatusResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AllJobStatusResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AllJobStatusResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'backgroundTask';
|
||||
yield serializers.serialize(
|
||||
object.backgroundTask,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'faceDetection';
|
||||
yield serializers.serialize(
|
||||
object.faceDetection,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'facialRecognition';
|
||||
yield serializers.serialize(
|
||||
object.facialRecognition,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'library';
|
||||
yield serializers.serialize(
|
||||
object.library_,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'metadataExtraction';
|
||||
yield serializers.serialize(
|
||||
object.metadataExtraction,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'migration';
|
||||
yield serializers.serialize(
|
||||
object.migration,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'search';
|
||||
yield serializers.serialize(
|
||||
object.search,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'sidecar';
|
||||
yield serializers.serialize(
|
||||
object.sidecar,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'smartSearch';
|
||||
yield serializers.serialize(
|
||||
object.smartSearch,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'storageTemplateMigration';
|
||||
yield serializers.serialize(
|
||||
object.storageTemplateMigration,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'thumbnailGeneration';
|
||||
yield serializers.serialize(
|
||||
object.thumbnailGeneration,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
yield r'videoConversion';
|
||||
yield serializers.serialize(
|
||||
object.videoConversion,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AllJobStatusResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AllJobStatusResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'backgroundTask':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.backgroundTask.replace(valueDes);
|
||||
break;
|
||||
case r'faceDetection':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.faceDetection.replace(valueDes);
|
||||
break;
|
||||
case r'facialRecognition':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.facialRecognition.replace(valueDes);
|
||||
break;
|
||||
case r'library':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.library_.replace(valueDes);
|
||||
break;
|
||||
case r'metadataExtraction':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.metadataExtraction.replace(valueDes);
|
||||
break;
|
||||
case r'migration':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.migration.replace(valueDes);
|
||||
break;
|
||||
case r'search':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.search.replace(valueDes);
|
||||
break;
|
||||
case r'sidecar':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.sidecar.replace(valueDes);
|
||||
break;
|
||||
case r'smartSearch':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.smartSearch.replace(valueDes);
|
||||
break;
|
||||
case r'storageTemplateMigration':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.storageTemplateMigration.replace(valueDes);
|
||||
break;
|
||||
case r'thumbnailGeneration':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.thumbnailGeneration.replace(valueDes);
|
||||
break;
|
||||
case r'videoConversion':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(JobStatusDto),
|
||||
) as JobStatusDto;
|
||||
result.videoConversion.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AllJobStatusResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AllJobStatusResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'api_key_create_dto.g.dart';
|
||||
|
||||
/// APIKeyCreateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [name]
|
||||
@BuiltValue()
|
||||
abstract class APIKeyCreateDto implements Built<APIKeyCreateDto, APIKeyCreateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String? get name;
|
||||
|
||||
APIKeyCreateDto._();
|
||||
|
||||
factory APIKeyCreateDto([void updates(APIKeyCreateDtoBuilder b)]) = _$APIKeyCreateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(APIKeyCreateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<APIKeyCreateDto> get serializer => _$APIKeyCreateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$APIKeyCreateDtoSerializer implements PrimitiveSerializer<APIKeyCreateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [APIKeyCreateDto, _$APIKeyCreateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'APIKeyCreateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
APIKeyCreateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.name != null) {
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
APIKeyCreateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required APIKeyCreateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
APIKeyCreateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = APIKeyCreateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/api_key_response_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'api_key_create_response_dto.g.dart';
|
||||
|
||||
/// APIKeyCreateResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [apiKey]
|
||||
/// * [secret]
|
||||
@BuiltValue()
|
||||
abstract class APIKeyCreateResponseDto implements Built<APIKeyCreateResponseDto, APIKeyCreateResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'apiKey')
|
||||
APIKeyResponseDto get apiKey;
|
||||
|
||||
@BuiltValueField(wireName: r'secret')
|
||||
String get secret;
|
||||
|
||||
APIKeyCreateResponseDto._();
|
||||
|
||||
factory APIKeyCreateResponseDto([void updates(APIKeyCreateResponseDtoBuilder b)]) = _$APIKeyCreateResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(APIKeyCreateResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<APIKeyCreateResponseDto> get serializer => _$APIKeyCreateResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$APIKeyCreateResponseDtoSerializer implements PrimitiveSerializer<APIKeyCreateResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [APIKeyCreateResponseDto, _$APIKeyCreateResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'APIKeyCreateResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
APIKeyCreateResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'apiKey';
|
||||
yield serializers.serialize(
|
||||
object.apiKey,
|
||||
specifiedType: const FullType(APIKeyResponseDto),
|
||||
);
|
||||
yield r'secret';
|
||||
yield serializers.serialize(
|
||||
object.secret,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
APIKeyCreateResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required APIKeyCreateResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'apiKey':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(APIKeyResponseDto),
|
||||
) as APIKeyResponseDto;
|
||||
result.apiKey.replace(valueDes);
|
||||
break;
|
||||
case r'secret':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.secret = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
APIKeyCreateResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = APIKeyCreateResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'api_key_response_dto.g.dart';
|
||||
|
||||
/// APIKeyResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [createdAt]
|
||||
/// * [id]
|
||||
/// * [name]
|
||||
/// * [updatedAt]
|
||||
@BuiltValue()
|
||||
abstract class APIKeyResponseDto
|
||||
implements Built<APIKeyResponseDto, APIKeyResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'createdAt')
|
||||
DateTime get createdAt;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
@BuiltValueField(wireName: r'updatedAt')
|
||||
DateTime get updatedAt;
|
||||
|
||||
APIKeyResponseDto._();
|
||||
|
||||
factory APIKeyResponseDto([void updates(APIKeyResponseDtoBuilder b)]) =
|
||||
_$APIKeyResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(APIKeyResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<APIKeyResponseDto> get serializer =>
|
||||
_$APIKeyResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$APIKeyResponseDtoSerializer
|
||||
implements PrimitiveSerializer<APIKeyResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [APIKeyResponseDto, _$APIKeyResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'APIKeyResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
APIKeyResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'createdAt';
|
||||
yield serializers.serialize(
|
||||
object.createdAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'updatedAt';
|
||||
yield serializers.serialize(
|
||||
object.updatedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
APIKeyResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object,
|
||||
specifiedType: specifiedType)
|
||||
.toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required APIKeyResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'createdAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.createdAt = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
case r'updatedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.updatedAt = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
APIKeyResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = APIKeyResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'api_key_update_dto.g.dart';
|
||||
|
||||
/// APIKeyUpdateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [name]
|
||||
@BuiltValue()
|
||||
abstract class APIKeyUpdateDto implements Built<APIKeyUpdateDto, APIKeyUpdateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
APIKeyUpdateDto._();
|
||||
|
||||
factory APIKeyUpdateDto([void updates(APIKeyUpdateDtoBuilder b)]) = _$APIKeyUpdateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(APIKeyUpdateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<APIKeyUpdateDto> get serializer => _$APIKeyUpdateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$APIKeyUpdateDtoSerializer implements PrimitiveSerializer<APIKeyUpdateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [APIKeyUpdateDto, _$APIKeyUpdateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'APIKeyUpdateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
APIKeyUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
APIKeyUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required APIKeyUpdateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
APIKeyUpdateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = APIKeyUpdateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_delete_dto.g.dart';
|
||||
|
||||
/// AssetBulkDeleteDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [force]
|
||||
/// * [ids]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkDeleteDto implements Built<AssetBulkDeleteDto, AssetBulkDeleteDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'force')
|
||||
bool? get force;
|
||||
|
||||
@BuiltValueField(wireName: r'ids')
|
||||
BuiltList<String> get ids;
|
||||
|
||||
AssetBulkDeleteDto._();
|
||||
|
||||
factory AssetBulkDeleteDto([void updates(AssetBulkDeleteDtoBuilder b)]) = _$AssetBulkDeleteDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkDeleteDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkDeleteDto> get serializer => _$AssetBulkDeleteDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkDeleteDtoSerializer implements PrimitiveSerializer<AssetBulkDeleteDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkDeleteDto, _$AssetBulkDeleteDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkDeleteDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkDeleteDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.force != null) {
|
||||
yield r'force';
|
||||
yield serializers.serialize(
|
||||
object.force,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
yield r'ids';
|
||||
yield serializers.serialize(
|
||||
object.ids,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkDeleteDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkDeleteDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'force':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.force = valueDes;
|
||||
break;
|
||||
case r'ids':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.ids.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkDeleteDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkDeleteDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,233 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_update_dto.g.dart';
|
||||
|
||||
/// AssetBulkUpdateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [dateTimeOriginal]
|
||||
/// * [ids]
|
||||
/// * [isArchived]
|
||||
/// * [isFavorite]
|
||||
/// * [latitude]
|
||||
/// * [longitude]
|
||||
/// * [removeParent]
|
||||
/// * [stackParentId]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkUpdateDto implements Built<AssetBulkUpdateDto, AssetBulkUpdateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'dateTimeOriginal')
|
||||
String? get dateTimeOriginal;
|
||||
|
||||
@BuiltValueField(wireName: r'ids')
|
||||
BuiltList<String> get ids;
|
||||
|
||||
@BuiltValueField(wireName: r'isArchived')
|
||||
bool? get isArchived;
|
||||
|
||||
@BuiltValueField(wireName: r'isFavorite')
|
||||
bool? get isFavorite;
|
||||
|
||||
@BuiltValueField(wireName: r'latitude')
|
||||
num? get latitude;
|
||||
|
||||
@BuiltValueField(wireName: r'longitude')
|
||||
num? get longitude;
|
||||
|
||||
@BuiltValueField(wireName: r'removeParent')
|
||||
bool? get removeParent;
|
||||
|
||||
@BuiltValueField(wireName: r'stackParentId')
|
||||
String? get stackParentId;
|
||||
|
||||
AssetBulkUpdateDto._();
|
||||
|
||||
factory AssetBulkUpdateDto([void updates(AssetBulkUpdateDtoBuilder b)]) = _$AssetBulkUpdateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkUpdateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkUpdateDto> get serializer => _$AssetBulkUpdateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkUpdateDtoSerializer implements PrimitiveSerializer<AssetBulkUpdateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkUpdateDto, _$AssetBulkUpdateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkUpdateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.dateTimeOriginal != null) {
|
||||
yield r'dateTimeOriginal';
|
||||
yield serializers.serialize(
|
||||
object.dateTimeOriginal,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
yield r'ids';
|
||||
yield serializers.serialize(
|
||||
object.ids,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
if (object.isArchived != null) {
|
||||
yield r'isArchived';
|
||||
yield serializers.serialize(
|
||||
object.isArchived,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.isFavorite != null) {
|
||||
yield r'isFavorite';
|
||||
yield serializers.serialize(
|
||||
object.isFavorite,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.latitude != null) {
|
||||
yield r'latitude';
|
||||
yield serializers.serialize(
|
||||
object.latitude,
|
||||
specifiedType: const FullType(num),
|
||||
);
|
||||
}
|
||||
if (object.longitude != null) {
|
||||
yield r'longitude';
|
||||
yield serializers.serialize(
|
||||
object.longitude,
|
||||
specifiedType: const FullType(num),
|
||||
);
|
||||
}
|
||||
if (object.removeParent != null) {
|
||||
yield r'removeParent';
|
||||
yield serializers.serialize(
|
||||
object.removeParent,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.stackParentId != null) {
|
||||
yield r'stackParentId';
|
||||
yield serializers.serialize(
|
||||
object.stackParentId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkUpdateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'dateTimeOriginal':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.dateTimeOriginal = valueDes;
|
||||
break;
|
||||
case r'ids':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.ids.replace(valueDes);
|
||||
break;
|
||||
case r'isArchived':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isArchived = valueDes;
|
||||
break;
|
||||
case r'isFavorite':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isFavorite = valueDes;
|
||||
break;
|
||||
case r'latitude':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(num),
|
||||
) as num;
|
||||
result.latitude = valueDes;
|
||||
break;
|
||||
case r'longitude':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(num),
|
||||
) as num;
|
||||
result.longitude = valueDes;
|
||||
break;
|
||||
case r'removeParent':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.removeParent = valueDes;
|
||||
break;
|
||||
case r'stackParentId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.stackParentId = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkUpdateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkUpdateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/asset_bulk_upload_check_item.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_upload_check_dto.g.dart';
|
||||
|
||||
/// AssetBulkUploadCheckDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assets]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkUploadCheckDto implements Built<AssetBulkUploadCheckDto, AssetBulkUploadCheckDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assets')
|
||||
BuiltList<AssetBulkUploadCheckItem> get assets;
|
||||
|
||||
AssetBulkUploadCheckDto._();
|
||||
|
||||
factory AssetBulkUploadCheckDto([void updates(AssetBulkUploadCheckDtoBuilder b)]) = _$AssetBulkUploadCheckDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkUploadCheckDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkUploadCheckDto> get serializer => _$AssetBulkUploadCheckDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkUploadCheckDtoSerializer implements PrimitiveSerializer<AssetBulkUploadCheckDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkUploadCheckDto, _$AssetBulkUploadCheckDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkUploadCheckDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assets';
|
||||
yield serializers.serialize(
|
||||
object.assets,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckItem)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkUploadCheckDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assets':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckItem)]),
|
||||
) as BuiltList<AssetBulkUploadCheckItem>;
|
||||
result.assets.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkUploadCheckDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkUploadCheckDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_upload_check_item.g.dart';
|
||||
|
||||
/// AssetBulkUploadCheckItem
|
||||
///
|
||||
/// Properties:
|
||||
/// * [checksum] - base64 or hex encoded sha1 hash
|
||||
/// * [id]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkUploadCheckItem implements Built<AssetBulkUploadCheckItem, AssetBulkUploadCheckItemBuilder> {
|
||||
/// base64 or hex encoded sha1 hash
|
||||
@BuiltValueField(wireName: r'checksum')
|
||||
String get checksum;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
AssetBulkUploadCheckItem._();
|
||||
|
||||
factory AssetBulkUploadCheckItem([void updates(AssetBulkUploadCheckItemBuilder b)]) = _$AssetBulkUploadCheckItem;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkUploadCheckItemBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkUploadCheckItem> get serializer => _$AssetBulkUploadCheckItemSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkUploadCheckItemSerializer implements PrimitiveSerializer<AssetBulkUploadCheckItem> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkUploadCheckItem, _$AssetBulkUploadCheckItem];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkUploadCheckItem';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckItem object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'checksum';
|
||||
yield serializers.serialize(
|
||||
object.checksum,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckItem object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkUploadCheckItemBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'checksum':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.checksum = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkUploadCheckItem deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkUploadCheckItemBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/asset_bulk_upload_check_result.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_upload_check_response_dto.g.dart';
|
||||
|
||||
/// AssetBulkUploadCheckResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [results]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkUploadCheckResponseDto implements Built<AssetBulkUploadCheckResponseDto, AssetBulkUploadCheckResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'results')
|
||||
BuiltList<AssetBulkUploadCheckResult> get results;
|
||||
|
||||
AssetBulkUploadCheckResponseDto._();
|
||||
|
||||
factory AssetBulkUploadCheckResponseDto([void updates(AssetBulkUploadCheckResponseDtoBuilder b)]) = _$AssetBulkUploadCheckResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkUploadCheckResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkUploadCheckResponseDto> get serializer => _$AssetBulkUploadCheckResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkUploadCheckResponseDtoSerializer implements PrimitiveSerializer<AssetBulkUploadCheckResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkUploadCheckResponseDto, _$AssetBulkUploadCheckResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkUploadCheckResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'results';
|
||||
yield serializers.serialize(
|
||||
object.results,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckResult)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkUploadCheckResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'results':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetBulkUploadCheckResult)]),
|
||||
) as BuiltList<AssetBulkUploadCheckResult>;
|
||||
result.results.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkUploadCheckResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkUploadCheckResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,191 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_bulk_upload_check_result.g.dart';
|
||||
|
||||
/// AssetBulkUploadCheckResult
|
||||
///
|
||||
/// Properties:
|
||||
/// * [action]
|
||||
/// * [assetId]
|
||||
/// * [id]
|
||||
/// * [reason]
|
||||
@BuiltValue()
|
||||
abstract class AssetBulkUploadCheckResult implements Built<AssetBulkUploadCheckResult, AssetBulkUploadCheckResultBuilder> {
|
||||
@BuiltValueField(wireName: r'action')
|
||||
AssetBulkUploadCheckResultActionEnum get action;
|
||||
// enum actionEnum { accept, reject, };
|
||||
|
||||
@BuiltValueField(wireName: r'assetId')
|
||||
String? get assetId;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'reason')
|
||||
AssetBulkUploadCheckResultReasonEnum? get reason;
|
||||
// enum reasonEnum { duplicate, unsupported-format, };
|
||||
|
||||
AssetBulkUploadCheckResult._();
|
||||
|
||||
factory AssetBulkUploadCheckResult([void updates(AssetBulkUploadCheckResultBuilder b)]) = _$AssetBulkUploadCheckResult;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetBulkUploadCheckResultBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetBulkUploadCheckResult> get serializer => _$AssetBulkUploadCheckResultSerializer();
|
||||
}
|
||||
|
||||
class _$AssetBulkUploadCheckResultSerializer implements PrimitiveSerializer<AssetBulkUploadCheckResult> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetBulkUploadCheckResult, _$AssetBulkUploadCheckResult];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetBulkUploadCheckResult';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckResult object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'action';
|
||||
yield serializers.serialize(
|
||||
object.action,
|
||||
specifiedType: const FullType(AssetBulkUploadCheckResultActionEnum),
|
||||
);
|
||||
if (object.assetId != null) {
|
||||
yield r'assetId';
|
||||
yield serializers.serialize(
|
||||
object.assetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.reason != null) {
|
||||
yield r'reason';
|
||||
yield serializers.serialize(
|
||||
object.reason,
|
||||
specifiedType: const FullType(AssetBulkUploadCheckResultReasonEnum),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetBulkUploadCheckResult object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetBulkUploadCheckResultBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'action':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetBulkUploadCheckResultActionEnum),
|
||||
) as AssetBulkUploadCheckResultActionEnum;
|
||||
result.action = valueDes;
|
||||
break;
|
||||
case r'assetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.assetId = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'reason':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetBulkUploadCheckResultReasonEnum),
|
||||
) as AssetBulkUploadCheckResultReasonEnum;
|
||||
result.reason = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetBulkUploadCheckResult deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetBulkUploadCheckResultBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
class AssetBulkUploadCheckResultActionEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'accept')
|
||||
static const AssetBulkUploadCheckResultActionEnum accept = _$assetBulkUploadCheckResultActionEnum_accept;
|
||||
@BuiltValueEnumConst(wireName: r'reject')
|
||||
static const AssetBulkUploadCheckResultActionEnum reject = _$assetBulkUploadCheckResultActionEnum_reject;
|
||||
|
||||
static Serializer<AssetBulkUploadCheckResultActionEnum> get serializer => _$assetBulkUploadCheckResultActionEnumSerializer;
|
||||
|
||||
const AssetBulkUploadCheckResultActionEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetBulkUploadCheckResultActionEnum> get values => _$assetBulkUploadCheckResultActionEnumValues;
|
||||
static AssetBulkUploadCheckResultActionEnum valueOf(String name) => _$assetBulkUploadCheckResultActionEnumValueOf(name);
|
||||
}
|
||||
|
||||
class AssetBulkUploadCheckResultReasonEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'duplicate')
|
||||
static const AssetBulkUploadCheckResultReasonEnum duplicate = _$assetBulkUploadCheckResultReasonEnum_duplicate;
|
||||
@BuiltValueEnumConst(wireName: r'unsupported-format')
|
||||
static const AssetBulkUploadCheckResultReasonEnum unsupportedFormat = _$assetBulkUploadCheckResultReasonEnum_unsupportedFormat;
|
||||
|
||||
static Serializer<AssetBulkUploadCheckResultReasonEnum> get serializer => _$assetBulkUploadCheckResultReasonEnumSerializer;
|
||||
|
||||
const AssetBulkUploadCheckResultReasonEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetBulkUploadCheckResultReasonEnum> get values => _$assetBulkUploadCheckResultReasonEnumValues;
|
||||
static AssetBulkUploadCheckResultReasonEnum valueOf(String name) => _$assetBulkUploadCheckResultReasonEnumValueOf(name);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/asset_response_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_delta_sync_response_dto.g.dart';
|
||||
|
||||
/// AssetDeltaSyncResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [deleted]
|
||||
/// * [needsFullSync]
|
||||
/// * [upserted]
|
||||
@BuiltValue()
|
||||
abstract class AssetDeltaSyncResponseDto implements Built<AssetDeltaSyncResponseDto, AssetDeltaSyncResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'deleted')
|
||||
BuiltList<String> get deleted;
|
||||
|
||||
@BuiltValueField(wireName: r'needsFullSync')
|
||||
bool get needsFullSync;
|
||||
|
||||
@BuiltValueField(wireName: r'upserted')
|
||||
BuiltList<AssetResponseDto> get upserted;
|
||||
|
||||
AssetDeltaSyncResponseDto._();
|
||||
|
||||
factory AssetDeltaSyncResponseDto([void updates(AssetDeltaSyncResponseDtoBuilder b)]) = _$AssetDeltaSyncResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetDeltaSyncResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetDeltaSyncResponseDto> get serializer => _$AssetDeltaSyncResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetDeltaSyncResponseDtoSerializer implements PrimitiveSerializer<AssetDeltaSyncResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetDeltaSyncResponseDto, _$AssetDeltaSyncResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetDeltaSyncResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetDeltaSyncResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'deleted';
|
||||
yield serializers.serialize(
|
||||
object.deleted,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
yield r'needsFullSync';
|
||||
yield serializers.serialize(
|
||||
object.needsFullSync,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'upserted';
|
||||
yield serializers.serialize(
|
||||
object.upserted,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetDeltaSyncResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetDeltaSyncResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'deleted':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.deleted.replace(valueDes);
|
||||
break;
|
||||
case r'needsFullSync':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.needsFullSync = valueDes;
|
||||
break;
|
||||
case r'upserted':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
result.upserted.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetDeltaSyncResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetDeltaSyncResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/person_response_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_face_response_dto.g.dart';
|
||||
|
||||
/// AssetFaceResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [boundingBoxX1]
|
||||
/// * [boundingBoxX2]
|
||||
/// * [boundingBoxY1]
|
||||
/// * [boundingBoxY2]
|
||||
/// * [id]
|
||||
/// * [imageHeight]
|
||||
/// * [imageWidth]
|
||||
/// * [person]
|
||||
@BuiltValue()
|
||||
abstract class AssetFaceResponseDto implements Built<AssetFaceResponseDto, AssetFaceResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'boundingBoxX1')
|
||||
int get boundingBoxX1;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxX2')
|
||||
int get boundingBoxX2;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxY1')
|
||||
int get boundingBoxY1;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxY2')
|
||||
int get boundingBoxY2;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'imageHeight')
|
||||
int get imageHeight;
|
||||
|
||||
@BuiltValueField(wireName: r'imageWidth')
|
||||
int get imageWidth;
|
||||
|
||||
@BuiltValueField(wireName: r'person')
|
||||
PersonResponseDto? get person;
|
||||
|
||||
AssetFaceResponseDto._();
|
||||
|
||||
factory AssetFaceResponseDto([void updates(AssetFaceResponseDtoBuilder b)]) = _$AssetFaceResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetFaceResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetFaceResponseDto> get serializer => _$AssetFaceResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetFaceResponseDtoSerializer implements PrimitiveSerializer<AssetFaceResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetFaceResponseDto, _$AssetFaceResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetFaceResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetFaceResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'boundingBoxX1';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxX1,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxX2';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxX2,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxY1';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxY1,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxY2';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxY2,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'imageHeight';
|
||||
yield serializers.serialize(
|
||||
object.imageHeight,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'imageWidth';
|
||||
yield serializers.serialize(
|
||||
object.imageWidth,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'person';
|
||||
yield object.person == null ? null : serializers.serialize(
|
||||
object.person,
|
||||
specifiedType: const FullType.nullable(PersonResponseDto),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetFaceResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetFaceResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'boundingBoxX1':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxX1 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxX2':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxX2 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxY1':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxY1 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxY2':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxY2 = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'imageHeight':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.imageHeight = valueDes;
|
||||
break;
|
||||
case r'imageWidth':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.imageWidth = valueDes;
|
||||
break;
|
||||
case r'person':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(PersonResponseDto),
|
||||
) as PersonResponseDto?;
|
||||
if (valueDes == null) continue;
|
||||
result.person.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetFaceResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetFaceResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/asset_face_update_item.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_face_update_dto.g.dart';
|
||||
|
||||
/// AssetFaceUpdateDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [data]
|
||||
@BuiltValue()
|
||||
abstract class AssetFaceUpdateDto implements Built<AssetFaceUpdateDto, AssetFaceUpdateDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'data')
|
||||
BuiltList<AssetFaceUpdateItem> get data;
|
||||
|
||||
AssetFaceUpdateDto._();
|
||||
|
||||
factory AssetFaceUpdateDto([void updates(AssetFaceUpdateDtoBuilder b)]) = _$AssetFaceUpdateDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetFaceUpdateDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetFaceUpdateDto> get serializer => _$AssetFaceUpdateDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetFaceUpdateDtoSerializer implements PrimitiveSerializer<AssetFaceUpdateDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetFaceUpdateDto, _$AssetFaceUpdateDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetFaceUpdateDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetFaceUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'data';
|
||||
yield serializers.serialize(
|
||||
object.data,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetFaceUpdateItem)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetFaceUpdateDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetFaceUpdateDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'data':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetFaceUpdateItem)]),
|
||||
) as BuiltList<AssetFaceUpdateItem>;
|
||||
result.data.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetFaceUpdateDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetFaceUpdateDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_face_update_item.g.dart';
|
||||
|
||||
/// AssetFaceUpdateItem
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetId]
|
||||
/// * [personId]
|
||||
@BuiltValue()
|
||||
abstract class AssetFaceUpdateItem implements Built<AssetFaceUpdateItem, AssetFaceUpdateItemBuilder> {
|
||||
@BuiltValueField(wireName: r'assetId')
|
||||
String get assetId;
|
||||
|
||||
@BuiltValueField(wireName: r'personId')
|
||||
String get personId;
|
||||
|
||||
AssetFaceUpdateItem._();
|
||||
|
||||
factory AssetFaceUpdateItem([void updates(AssetFaceUpdateItemBuilder b)]) = _$AssetFaceUpdateItem;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetFaceUpdateItemBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetFaceUpdateItem> get serializer => _$AssetFaceUpdateItemSerializer();
|
||||
}
|
||||
|
||||
class _$AssetFaceUpdateItemSerializer implements PrimitiveSerializer<AssetFaceUpdateItem> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetFaceUpdateItem, _$AssetFaceUpdateItem];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetFaceUpdateItem';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetFaceUpdateItem object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetId';
|
||||
yield serializers.serialize(
|
||||
object.assetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'personId';
|
||||
yield serializers.serialize(
|
||||
object.personId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetFaceUpdateItem object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetFaceUpdateItemBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.assetId = valueDes;
|
||||
break;
|
||||
case r'personId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.personId = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetFaceUpdateItem deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetFaceUpdateItemBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,202 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_face_without_person_response_dto.g.dart';
|
||||
|
||||
/// AssetFaceWithoutPersonResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [boundingBoxX1]
|
||||
/// * [boundingBoxX2]
|
||||
/// * [boundingBoxY1]
|
||||
/// * [boundingBoxY2]
|
||||
/// * [id]
|
||||
/// * [imageHeight]
|
||||
/// * [imageWidth]
|
||||
@BuiltValue()
|
||||
abstract class AssetFaceWithoutPersonResponseDto implements Built<AssetFaceWithoutPersonResponseDto, AssetFaceWithoutPersonResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'boundingBoxX1')
|
||||
int get boundingBoxX1;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxX2')
|
||||
int get boundingBoxX2;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxY1')
|
||||
int get boundingBoxY1;
|
||||
|
||||
@BuiltValueField(wireName: r'boundingBoxY2')
|
||||
int get boundingBoxY2;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'imageHeight')
|
||||
int get imageHeight;
|
||||
|
||||
@BuiltValueField(wireName: r'imageWidth')
|
||||
int get imageWidth;
|
||||
|
||||
AssetFaceWithoutPersonResponseDto._();
|
||||
|
||||
factory AssetFaceWithoutPersonResponseDto([void updates(AssetFaceWithoutPersonResponseDtoBuilder b)]) = _$AssetFaceWithoutPersonResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetFaceWithoutPersonResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetFaceWithoutPersonResponseDto> get serializer => _$AssetFaceWithoutPersonResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetFaceWithoutPersonResponseDtoSerializer implements PrimitiveSerializer<AssetFaceWithoutPersonResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetFaceWithoutPersonResponseDto, _$AssetFaceWithoutPersonResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetFaceWithoutPersonResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetFaceWithoutPersonResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'boundingBoxX1';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxX1,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxX2';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxX2,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxY1';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxY1,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'boundingBoxY2';
|
||||
yield serializers.serialize(
|
||||
object.boundingBoxY2,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'imageHeight';
|
||||
yield serializers.serialize(
|
||||
object.imageHeight,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'imageWidth';
|
||||
yield serializers.serialize(
|
||||
object.imageWidth,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetFaceWithoutPersonResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetFaceWithoutPersonResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'boundingBoxX1':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxX1 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxX2':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxX2 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxY1':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxY1 = valueDes;
|
||||
break;
|
||||
case r'boundingBoxY2':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.boundingBoxY2 = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'imageHeight':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.imageHeight = valueDes;
|
||||
break;
|
||||
case r'imageWidth':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.imageWidth = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetFaceWithoutPersonResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetFaceWithoutPersonResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_file_upload_response_dto.g.dart';
|
||||
|
||||
/// AssetFileUploadResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [duplicate]
|
||||
/// * [id]
|
||||
@BuiltValue()
|
||||
abstract class AssetFileUploadResponseDto implements Built<AssetFileUploadResponseDto, AssetFileUploadResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'duplicate')
|
||||
bool get duplicate;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
AssetFileUploadResponseDto._();
|
||||
|
||||
factory AssetFileUploadResponseDto([void updates(AssetFileUploadResponseDtoBuilder b)]) = _$AssetFileUploadResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetFileUploadResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetFileUploadResponseDto> get serializer => _$AssetFileUploadResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetFileUploadResponseDtoSerializer implements PrimitiveSerializer<AssetFileUploadResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetFileUploadResponseDto, _$AssetFileUploadResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetFileUploadResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetFileUploadResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'duplicate';
|
||||
yield serializers.serialize(
|
||||
object.duplicate,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetFileUploadResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetFileUploadResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'duplicate':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.duplicate = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetFileUploadResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetFileUploadResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_ids_dto.g.dart';
|
||||
|
||||
/// AssetIdsDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetIds]
|
||||
@BuiltValue()
|
||||
abstract class AssetIdsDto implements Built<AssetIdsDto, AssetIdsDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetIds')
|
||||
BuiltList<String> get assetIds;
|
||||
|
||||
AssetIdsDto._();
|
||||
|
||||
factory AssetIdsDto([void updates(AssetIdsDtoBuilder b)]) = _$AssetIdsDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetIdsDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetIdsDto> get serializer => _$AssetIdsDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetIdsDtoSerializer implements PrimitiveSerializer<AssetIdsDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetIdsDto, _$AssetIdsDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetIdsDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetIdsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetIds';
|
||||
yield serializers.serialize(
|
||||
object.assetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetIdsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetIdsDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.assetIds.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetIdsDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetIdsDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_ids_response_dto.g.dart';
|
||||
|
||||
/// AssetIdsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetId]
|
||||
/// * [error]
|
||||
/// * [success]
|
||||
@BuiltValue()
|
||||
abstract class AssetIdsResponseDto implements Built<AssetIdsResponseDto, AssetIdsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetId')
|
||||
String get assetId;
|
||||
|
||||
@BuiltValueField(wireName: r'error')
|
||||
AssetIdsResponseDtoErrorEnum? get error;
|
||||
// enum errorEnum { duplicate, no_permission, not_found, };
|
||||
|
||||
@BuiltValueField(wireName: r'success')
|
||||
bool get success;
|
||||
|
||||
AssetIdsResponseDto._();
|
||||
|
||||
factory AssetIdsResponseDto([void updates(AssetIdsResponseDtoBuilder b)]) = _$AssetIdsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetIdsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetIdsResponseDto> get serializer => _$AssetIdsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetIdsResponseDtoSerializer implements PrimitiveSerializer<AssetIdsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetIdsResponseDto, _$AssetIdsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetIdsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetIdsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetId';
|
||||
yield serializers.serialize(
|
||||
object.assetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.error != null) {
|
||||
yield r'error';
|
||||
yield serializers.serialize(
|
||||
object.error,
|
||||
specifiedType: const FullType(AssetIdsResponseDtoErrorEnum),
|
||||
);
|
||||
}
|
||||
yield r'success';
|
||||
yield serializers.serialize(
|
||||
object.success,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetIdsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetIdsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.assetId = valueDes;
|
||||
break;
|
||||
case r'error':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetIdsResponseDtoErrorEnum),
|
||||
) as AssetIdsResponseDtoErrorEnum;
|
||||
result.error = valueDes;
|
||||
break;
|
||||
case r'success':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.success = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetIdsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetIdsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
class AssetIdsResponseDtoErrorEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'duplicate')
|
||||
static const AssetIdsResponseDtoErrorEnum duplicate = _$assetIdsResponseDtoErrorEnum_duplicate;
|
||||
@BuiltValueEnumConst(wireName: r'no_permission')
|
||||
static const AssetIdsResponseDtoErrorEnum noPermission = _$assetIdsResponseDtoErrorEnum_noPermission;
|
||||
@BuiltValueEnumConst(wireName: r'not_found')
|
||||
static const AssetIdsResponseDtoErrorEnum notFound = _$assetIdsResponseDtoErrorEnum_notFound;
|
||||
|
||||
static Serializer<AssetIdsResponseDtoErrorEnum> get serializer => _$assetIdsResponseDtoErrorEnumSerializer;
|
||||
|
||||
const AssetIdsResponseDtoErrorEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetIdsResponseDtoErrorEnum> get values => _$assetIdsResponseDtoErrorEnumValues;
|
||||
static AssetIdsResponseDtoErrorEnum valueOf(String name) => _$assetIdsResponseDtoErrorEnumValueOf(name);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_job_name.g.dart';
|
||||
|
||||
class AssetJobName extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'regenerate-thumbnail')
|
||||
static const AssetJobName regenerateThumbnail = _$regenerateThumbnail;
|
||||
@BuiltValueEnumConst(wireName: r'refresh-metadata')
|
||||
static const AssetJobName refreshMetadata = _$refreshMetadata;
|
||||
@BuiltValueEnumConst(wireName: r'transcode-video')
|
||||
static const AssetJobName transcodeVideo = _$transcodeVideo;
|
||||
|
||||
static Serializer<AssetJobName> get serializer => _$assetJobNameSerializer;
|
||||
|
||||
const AssetJobName._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetJobName> get values => _$values;
|
||||
static AssetJobName valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class AssetJobNameMixin = Object with _$AssetJobNameMixin;
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/asset_job_name.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_jobs_dto.g.dart';
|
||||
|
||||
/// AssetJobsDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetIds]
|
||||
/// * [name]
|
||||
@BuiltValue()
|
||||
abstract class AssetJobsDto implements Built<AssetJobsDto, AssetJobsDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetIds')
|
||||
BuiltList<String> get assetIds;
|
||||
|
||||
@BuiltValueField(wireName: r'name')
|
||||
AssetJobName get name;
|
||||
// enum nameEnum { regenerate-thumbnail, refresh-metadata, transcode-video, };
|
||||
|
||||
AssetJobsDto._();
|
||||
|
||||
factory AssetJobsDto([void updates(AssetJobsDtoBuilder b)]) = _$AssetJobsDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetJobsDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetJobsDto> get serializer => _$AssetJobsDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetJobsDtoSerializer implements PrimitiveSerializer<AssetJobsDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetJobsDto, _$AssetJobsDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetJobsDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetJobsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetIds';
|
||||
yield serializers.serialize(
|
||||
object.assetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(AssetJobName),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetJobsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetJobsDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.assetIds.replace(valueDes);
|
||||
break;
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetJobName),
|
||||
) as AssetJobName;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetJobsDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetJobsDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_order.g.dart';
|
||||
|
||||
class AssetOrder extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'asc')
|
||||
static const AssetOrder asc = _$asc;
|
||||
@BuiltValueEnumConst(wireName: r'desc')
|
||||
static const AssetOrder desc = _$desc;
|
||||
|
||||
static Serializer<AssetOrder> get serializer => _$assetOrderSerializer;
|
||||
|
||||
const AssetOrder._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetOrder> get values => _$values;
|
||||
static AssetOrder valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class AssetOrderMixin = Object with _$AssetOrderMixin;
|
||||
|
||||
@@ -0,0 +1,631 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/asset_type_enum.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/exif_response_dto.dart';
|
||||
import 'package:openapi/src/model/smart_info_response_dto.dart';
|
||||
import 'package:openapi/src/model/user_response_dto.dart';
|
||||
import 'package:openapi/src/model/tag_response_dto.dart';
|
||||
import 'package:openapi/src/model/person_with_faces_response_dto.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_response_dto.g.dart';
|
||||
|
||||
/// AssetResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [checksum] - base64 encoded sha1 hash
|
||||
/// * [deviceAssetId]
|
||||
/// * [deviceId]
|
||||
/// * [duration]
|
||||
/// * [exifInfo]
|
||||
/// * [fileCreatedAt]
|
||||
/// * [fileModifiedAt]
|
||||
/// * [hasMetadata]
|
||||
/// * [id]
|
||||
/// * [isArchived]
|
||||
/// * [isExternal]
|
||||
/// * [isFavorite]
|
||||
/// * [isOffline]
|
||||
/// * [isReadOnly]
|
||||
/// * [isTrashed]
|
||||
/// * [libraryId]
|
||||
/// * [livePhotoVideoId]
|
||||
/// * [localDateTime]
|
||||
/// * [originalFileName]
|
||||
/// * [originalPath]
|
||||
/// * [owner]
|
||||
/// * [ownerId]
|
||||
/// * [people]
|
||||
/// * [resized]
|
||||
/// * [smartInfo]
|
||||
/// * [stack]
|
||||
/// * [stackCount]
|
||||
/// * [stackParentId]
|
||||
/// * [tags]
|
||||
/// * [thumbhash]
|
||||
/// * [type]
|
||||
/// * [updatedAt]
|
||||
@BuiltValue()
|
||||
abstract class AssetResponseDto implements Built<AssetResponseDto, AssetResponseDtoBuilder> {
|
||||
/// base64 encoded sha1 hash
|
||||
@BuiltValueField(wireName: r'checksum')
|
||||
String get checksum;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceAssetId')
|
||||
String get deviceAssetId;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceId')
|
||||
String get deviceId;
|
||||
|
||||
@BuiltValueField(wireName: r'duration')
|
||||
String get duration;
|
||||
|
||||
@BuiltValueField(wireName: r'exifInfo')
|
||||
ExifResponseDto? get exifInfo;
|
||||
|
||||
@BuiltValueField(wireName: r'fileCreatedAt')
|
||||
DateTime get fileCreatedAt;
|
||||
|
||||
@BuiltValueField(wireName: r'fileModifiedAt')
|
||||
DateTime get fileModifiedAt;
|
||||
|
||||
@BuiltValueField(wireName: r'hasMetadata')
|
||||
bool get hasMetadata;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'isArchived')
|
||||
bool get isArchived;
|
||||
|
||||
@BuiltValueField(wireName: r'isExternal')
|
||||
bool get isExternal;
|
||||
|
||||
@BuiltValueField(wireName: r'isFavorite')
|
||||
bool get isFavorite;
|
||||
|
||||
@BuiltValueField(wireName: r'isOffline')
|
||||
bool get isOffline;
|
||||
|
||||
@BuiltValueField(wireName: r'isReadOnly')
|
||||
bool get isReadOnly;
|
||||
|
||||
@BuiltValueField(wireName: r'isTrashed')
|
||||
bool get isTrashed;
|
||||
|
||||
@BuiltValueField(wireName: r'libraryId')
|
||||
String get libraryId;
|
||||
|
||||
@BuiltValueField(wireName: r'livePhotoVideoId')
|
||||
String? get livePhotoVideoId;
|
||||
|
||||
@BuiltValueField(wireName: r'localDateTime')
|
||||
DateTime get localDateTime;
|
||||
|
||||
@BuiltValueField(wireName: r'originalFileName')
|
||||
String get originalFileName;
|
||||
|
||||
@BuiltValueField(wireName: r'originalPath')
|
||||
String get originalPath;
|
||||
|
||||
@BuiltValueField(wireName: r'owner')
|
||||
UserResponseDto? get owner;
|
||||
|
||||
@BuiltValueField(wireName: r'ownerId')
|
||||
String get ownerId;
|
||||
|
||||
@BuiltValueField(wireName: r'people')
|
||||
BuiltList<PersonWithFacesResponseDto>? get people;
|
||||
|
||||
@BuiltValueField(wireName: r'resized')
|
||||
bool get resized;
|
||||
|
||||
@BuiltValueField(wireName: r'smartInfo')
|
||||
SmartInfoResponseDto? get smartInfo;
|
||||
|
||||
@BuiltValueField(wireName: r'stack')
|
||||
BuiltList<AssetResponseDto>? get stack;
|
||||
|
||||
@BuiltValueField(wireName: r'stackCount')
|
||||
int? get stackCount;
|
||||
|
||||
@BuiltValueField(wireName: r'stackParentId')
|
||||
String? get stackParentId;
|
||||
|
||||
@BuiltValueField(wireName: r'tags')
|
||||
BuiltList<TagResponseDto>? get tags;
|
||||
|
||||
@BuiltValueField(wireName: r'thumbhash')
|
||||
String? get thumbhash;
|
||||
|
||||
@BuiltValueField(wireName: r'type')
|
||||
AssetTypeEnum get type;
|
||||
// enum typeEnum { IMAGE, VIDEO, AUDIO, OTHER, };
|
||||
|
||||
@BuiltValueField(wireName: r'updatedAt')
|
||||
DateTime get updatedAt;
|
||||
|
||||
AssetResponseDto._();
|
||||
|
||||
factory AssetResponseDto([void updates(AssetResponseDtoBuilder b)]) = _$AssetResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetResponseDto> get serializer => _$AssetResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetResponseDtoSerializer implements PrimitiveSerializer<AssetResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetResponseDto, _$AssetResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'checksum';
|
||||
yield serializers.serialize(
|
||||
object.checksum,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceAssetId';
|
||||
yield serializers.serialize(
|
||||
object.deviceAssetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceId';
|
||||
yield serializers.serialize(
|
||||
object.deviceId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'duration';
|
||||
yield serializers.serialize(
|
||||
object.duration,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.exifInfo != null) {
|
||||
yield r'exifInfo';
|
||||
yield serializers.serialize(
|
||||
object.exifInfo,
|
||||
specifiedType: const FullType(ExifResponseDto),
|
||||
);
|
||||
}
|
||||
yield r'fileCreatedAt';
|
||||
yield serializers.serialize(
|
||||
object.fileCreatedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'fileModifiedAt';
|
||||
yield serializers.serialize(
|
||||
object.fileModifiedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'hasMetadata';
|
||||
yield serializers.serialize(
|
||||
object.hasMetadata,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'isArchived';
|
||||
yield serializers.serialize(
|
||||
object.isArchived,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'isExternal';
|
||||
yield serializers.serialize(
|
||||
object.isExternal,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'isFavorite';
|
||||
yield serializers.serialize(
|
||||
object.isFavorite,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'isOffline';
|
||||
yield serializers.serialize(
|
||||
object.isOffline,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'isReadOnly';
|
||||
yield serializers.serialize(
|
||||
object.isReadOnly,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'isTrashed';
|
||||
yield serializers.serialize(
|
||||
object.isTrashed,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
yield r'libraryId';
|
||||
yield serializers.serialize(
|
||||
object.libraryId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.livePhotoVideoId != null) {
|
||||
yield r'livePhotoVideoId';
|
||||
yield serializers.serialize(
|
||||
object.livePhotoVideoId,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
yield r'localDateTime';
|
||||
yield serializers.serialize(
|
||||
object.localDateTime,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'originalFileName';
|
||||
yield serializers.serialize(
|
||||
object.originalFileName,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'originalPath';
|
||||
yield serializers.serialize(
|
||||
object.originalPath,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.owner != null) {
|
||||
yield r'owner';
|
||||
yield serializers.serialize(
|
||||
object.owner,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
);
|
||||
}
|
||||
yield r'ownerId';
|
||||
yield serializers.serialize(
|
||||
object.ownerId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.people != null) {
|
||||
yield r'people';
|
||||
yield serializers.serialize(
|
||||
object.people,
|
||||
specifiedType: const FullType(BuiltList, [FullType(PersonWithFacesResponseDto)]),
|
||||
);
|
||||
}
|
||||
yield r'resized';
|
||||
yield serializers.serialize(
|
||||
object.resized,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
if (object.smartInfo != null) {
|
||||
yield r'smartInfo';
|
||||
yield serializers.serialize(
|
||||
object.smartInfo,
|
||||
specifiedType: const FullType(SmartInfoResponseDto),
|
||||
);
|
||||
}
|
||||
if (object.stack != null) {
|
||||
yield r'stack';
|
||||
yield serializers.serialize(
|
||||
object.stack,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
);
|
||||
}
|
||||
yield r'stackCount';
|
||||
yield object.stackCount == null ? null : serializers.serialize(
|
||||
object.stackCount,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
);
|
||||
if (object.stackParentId != null) {
|
||||
yield r'stackParentId';
|
||||
yield serializers.serialize(
|
||||
object.stackParentId,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.tags != null) {
|
||||
yield r'tags';
|
||||
yield serializers.serialize(
|
||||
object.tags,
|
||||
specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]),
|
||||
);
|
||||
}
|
||||
yield r'thumbhash';
|
||||
yield object.thumbhash == null ? null : serializers.serialize(
|
||||
object.thumbhash,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
yield r'type';
|
||||
yield serializers.serialize(
|
||||
object.type,
|
||||
specifiedType: const FullType(AssetTypeEnum),
|
||||
);
|
||||
yield r'updatedAt';
|
||||
yield serializers.serialize(
|
||||
object.updatedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'checksum':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.checksum = valueDes;
|
||||
break;
|
||||
case r'deviceAssetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceAssetId = valueDes;
|
||||
break;
|
||||
case r'deviceId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceId = valueDes;
|
||||
break;
|
||||
case r'duration':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.duration = valueDes;
|
||||
break;
|
||||
case r'exifInfo':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(ExifResponseDto),
|
||||
) as ExifResponseDto;
|
||||
result.exifInfo.replace(valueDes);
|
||||
break;
|
||||
case r'fileCreatedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.fileCreatedAt = valueDes;
|
||||
break;
|
||||
case r'fileModifiedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.fileModifiedAt = valueDes;
|
||||
break;
|
||||
case r'hasMetadata':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.hasMetadata = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'isArchived':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isArchived = valueDes;
|
||||
break;
|
||||
case r'isExternal':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isExternal = valueDes;
|
||||
break;
|
||||
case r'isFavorite':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isFavorite = valueDes;
|
||||
break;
|
||||
case r'isOffline':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isOffline = valueDes;
|
||||
break;
|
||||
case r'isReadOnly':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isReadOnly = valueDes;
|
||||
break;
|
||||
case r'isTrashed':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isTrashed = valueDes;
|
||||
break;
|
||||
case r'libraryId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.libraryId = valueDes;
|
||||
break;
|
||||
case r'livePhotoVideoId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.livePhotoVideoId = valueDes;
|
||||
break;
|
||||
case r'localDateTime':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.localDateTime = valueDes;
|
||||
break;
|
||||
case r'originalFileName':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.originalFileName = valueDes;
|
||||
break;
|
||||
case r'originalPath':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.originalPath = valueDes;
|
||||
break;
|
||||
case r'owner':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(UserResponseDto),
|
||||
) as UserResponseDto;
|
||||
result.owner.replace(valueDes);
|
||||
break;
|
||||
case r'ownerId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.ownerId = valueDes;
|
||||
break;
|
||||
case r'people':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(PersonWithFacesResponseDto)]),
|
||||
) as BuiltList<PersonWithFacesResponseDto>;
|
||||
result.people.replace(valueDes);
|
||||
break;
|
||||
case r'resized':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.resized = valueDes;
|
||||
break;
|
||||
case r'smartInfo':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(SmartInfoResponseDto),
|
||||
) as SmartInfoResponseDto;
|
||||
result.smartInfo.replace(valueDes);
|
||||
break;
|
||||
case r'stack':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(AssetResponseDto)]),
|
||||
) as BuiltList<AssetResponseDto>;
|
||||
result.stack.replace(valueDes);
|
||||
break;
|
||||
case r'stackCount':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
) as int?;
|
||||
if (valueDes == null) continue;
|
||||
result.stackCount = valueDes;
|
||||
break;
|
||||
case r'stackParentId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.stackParentId = valueDes;
|
||||
break;
|
||||
case r'tags':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(TagResponseDto)]),
|
||||
) as BuiltList<TagResponseDto>;
|
||||
result.tags.replace(valueDes);
|
||||
break;
|
||||
case r'thumbhash':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.thumbhash = valueDes;
|
||||
break;
|
||||
case r'type':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(AssetTypeEnum),
|
||||
) as AssetTypeEnum;
|
||||
result.type = valueDes;
|
||||
break;
|
||||
case r'updatedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.updatedAt = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_stats_response_dto.g.dart';
|
||||
|
||||
/// AssetStatsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [images]
|
||||
/// * [total]
|
||||
/// * [videos]
|
||||
@BuiltValue()
|
||||
abstract class AssetStatsResponseDto implements Built<AssetStatsResponseDto, AssetStatsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'images')
|
||||
int get images;
|
||||
|
||||
@BuiltValueField(wireName: r'total')
|
||||
int get total;
|
||||
|
||||
@BuiltValueField(wireName: r'videos')
|
||||
int get videos;
|
||||
|
||||
AssetStatsResponseDto._();
|
||||
|
||||
factory AssetStatsResponseDto([void updates(AssetStatsResponseDtoBuilder b)]) = _$AssetStatsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AssetStatsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AssetStatsResponseDto> get serializer => _$AssetStatsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AssetStatsResponseDtoSerializer implements PrimitiveSerializer<AssetStatsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AssetStatsResponseDto, _$AssetStatsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AssetStatsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AssetStatsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'images';
|
||||
yield serializers.serialize(
|
||||
object.images,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'total';
|
||||
yield serializers.serialize(
|
||||
object.total,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
yield r'videos';
|
||||
yield serializers.serialize(
|
||||
object.videos,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AssetStatsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AssetStatsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'images':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.images = valueDes;
|
||||
break;
|
||||
case r'total':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.total = valueDes;
|
||||
break;
|
||||
case r'videos':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.videos = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AssetStatsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AssetStatsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'asset_type_enum.g.dart';
|
||||
|
||||
class AssetTypeEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'IMAGE')
|
||||
static const AssetTypeEnum IMAGE = _$IMAGE;
|
||||
@BuiltValueEnumConst(wireName: r'VIDEO')
|
||||
static const AssetTypeEnum VIDEO = _$VIDEO;
|
||||
@BuiltValueEnumConst(wireName: r'AUDIO')
|
||||
static const AssetTypeEnum AUDIO = _$AUDIO;
|
||||
@BuiltValueEnumConst(wireName: r'OTHER')
|
||||
static const AssetTypeEnum OTHER = _$OTHER;
|
||||
|
||||
static Serializer<AssetTypeEnum> get serializer => _$assetTypeEnumSerializer;
|
||||
|
||||
const AssetTypeEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<AssetTypeEnum> get values => _$values;
|
||||
static AssetTypeEnum valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class AssetTypeEnumMixin = Object with _$AssetTypeEnumMixin;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'audio_codec.g.dart';
|
||||
|
||||
class AudioCodec extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'mp3')
|
||||
static const AudioCodec mp3 = _$mp3;
|
||||
@BuiltValueEnumConst(wireName: r'aac')
|
||||
static const AudioCodec aac = _$aac;
|
||||
@BuiltValueEnumConst(wireName: r'libopus')
|
||||
static const AudioCodec libopus = _$libopus;
|
||||
|
||||
static Serializer<AudioCodec> get serializer => _$audioCodecSerializer;
|
||||
|
||||
const AudioCodec._(String name): super(name);
|
||||
|
||||
static BuiltSet<AudioCodec> get values => _$values;
|
||||
static AudioCodec valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class AudioCodecMixin = Object with _$AudioCodecMixin;
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'audit_deletes_response_dto.g.dart';
|
||||
|
||||
/// AuditDeletesResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [ids]
|
||||
/// * [needsFullSync]
|
||||
@BuiltValue()
|
||||
abstract class AuditDeletesResponseDto implements Built<AuditDeletesResponseDto, AuditDeletesResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'ids')
|
||||
BuiltList<String> get ids;
|
||||
|
||||
@BuiltValueField(wireName: r'needsFullSync')
|
||||
bool get needsFullSync;
|
||||
|
||||
AuditDeletesResponseDto._();
|
||||
|
||||
factory AuditDeletesResponseDto([void updates(AuditDeletesResponseDtoBuilder b)]) = _$AuditDeletesResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(AuditDeletesResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<AuditDeletesResponseDto> get serializer => _$AuditDeletesResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$AuditDeletesResponseDtoSerializer implements PrimitiveSerializer<AuditDeletesResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [AuditDeletesResponseDto, _$AuditDeletesResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'AuditDeletesResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
AuditDeletesResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'ids';
|
||||
yield serializers.serialize(
|
||||
object.ids,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
yield r'needsFullSync';
|
||||
yield serializers.serialize(
|
||||
object.needsFullSync,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
AuditDeletesResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required AuditDeletesResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'ids':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.ids.replace(valueDes);
|
||||
break;
|
||||
case r'needsFullSync':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.needsFullSync = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
AuditDeletesResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = AuditDeletesResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'bulk_id_response_dto.g.dart';
|
||||
|
||||
/// BulkIdResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [error]
|
||||
/// * [id]
|
||||
/// * [success]
|
||||
@BuiltValue()
|
||||
abstract class BulkIdResponseDto implements Built<BulkIdResponseDto, BulkIdResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'error')
|
||||
BulkIdResponseDtoErrorEnum? get error;
|
||||
// enum errorEnum { duplicate, no_permission, not_found, unknown, };
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'success')
|
||||
bool get success;
|
||||
|
||||
BulkIdResponseDto._();
|
||||
|
||||
factory BulkIdResponseDto([void updates(BulkIdResponseDtoBuilder b)]) = _$BulkIdResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(BulkIdResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<BulkIdResponseDto> get serializer => _$BulkIdResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$BulkIdResponseDtoSerializer implements PrimitiveSerializer<BulkIdResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [BulkIdResponseDto, _$BulkIdResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'BulkIdResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
BulkIdResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.error != null) {
|
||||
yield r'error';
|
||||
yield serializers.serialize(
|
||||
object.error,
|
||||
specifiedType: const FullType(BulkIdResponseDtoErrorEnum),
|
||||
);
|
||||
}
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'success';
|
||||
yield serializers.serialize(
|
||||
object.success,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
BulkIdResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required BulkIdResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'error':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BulkIdResponseDtoErrorEnum),
|
||||
) as BulkIdResponseDtoErrorEnum;
|
||||
result.error = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'success':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.success = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
BulkIdResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = BulkIdResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
class BulkIdResponseDtoErrorEnum extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'duplicate')
|
||||
static const BulkIdResponseDtoErrorEnum duplicate = _$bulkIdResponseDtoErrorEnum_duplicate;
|
||||
@BuiltValueEnumConst(wireName: r'no_permission')
|
||||
static const BulkIdResponseDtoErrorEnum noPermission = _$bulkIdResponseDtoErrorEnum_noPermission;
|
||||
@BuiltValueEnumConst(wireName: r'not_found')
|
||||
static const BulkIdResponseDtoErrorEnum notFound = _$bulkIdResponseDtoErrorEnum_notFound;
|
||||
@BuiltValueEnumConst(wireName: r'unknown')
|
||||
static const BulkIdResponseDtoErrorEnum unknown = _$bulkIdResponseDtoErrorEnum_unknown;
|
||||
|
||||
static Serializer<BulkIdResponseDtoErrorEnum> get serializer => _$bulkIdResponseDtoErrorEnumSerializer;
|
||||
|
||||
const BulkIdResponseDtoErrorEnum._(String name): super(name);
|
||||
|
||||
static BuiltSet<BulkIdResponseDtoErrorEnum> get values => _$bulkIdResponseDtoErrorEnumValues;
|
||||
static BulkIdResponseDtoErrorEnum valueOf(String name) => _$bulkIdResponseDtoErrorEnumValueOf(name);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'bulk_ids_dto.g.dart';
|
||||
|
||||
/// BulkIdsDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [ids]
|
||||
@BuiltValue()
|
||||
abstract class BulkIdsDto implements Built<BulkIdsDto, BulkIdsDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'ids')
|
||||
BuiltList<String> get ids;
|
||||
|
||||
BulkIdsDto._();
|
||||
|
||||
factory BulkIdsDto([void updates(BulkIdsDtoBuilder b)]) = _$BulkIdsDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(BulkIdsDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<BulkIdsDto> get serializer => _$BulkIdsDtoSerializer();
|
||||
}
|
||||
|
||||
class _$BulkIdsDtoSerializer implements PrimitiveSerializer<BulkIdsDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [BulkIdsDto, _$BulkIdsDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'BulkIdsDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
BulkIdsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'ids';
|
||||
yield serializers.serialize(
|
||||
object.ids,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
BulkIdsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required BulkIdsDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'ids':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.ids.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
BulkIdsDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = BulkIdsDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'change_password_dto.g.dart';
|
||||
|
||||
/// ChangePasswordDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [newPassword]
|
||||
/// * [password]
|
||||
@BuiltValue()
|
||||
abstract class ChangePasswordDto implements Built<ChangePasswordDto, ChangePasswordDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'newPassword')
|
||||
String get newPassword;
|
||||
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
|
||||
ChangePasswordDto._();
|
||||
|
||||
factory ChangePasswordDto([void updates(ChangePasswordDtoBuilder b)]) = _$ChangePasswordDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(ChangePasswordDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<ChangePasswordDto> get serializer => _$ChangePasswordDtoSerializer();
|
||||
}
|
||||
|
||||
class _$ChangePasswordDtoSerializer implements PrimitiveSerializer<ChangePasswordDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [ChangePasswordDto, _$ChangePasswordDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'ChangePasswordDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
ChangePasswordDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'newPassword';
|
||||
yield serializers.serialize(
|
||||
object.newPassword,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'password';
|
||||
yield serializers.serialize(
|
||||
object.password,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
ChangePasswordDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required ChangePasswordDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'newPassword':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.newPassword = valueDes;
|
||||
break;
|
||||
case r'password':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.password = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
ChangePasswordDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = ChangePasswordDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'check_existing_assets_dto.g.dart';
|
||||
|
||||
/// CheckExistingAssetsDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [deviceAssetIds]
|
||||
/// * [deviceId]
|
||||
@BuiltValue()
|
||||
abstract class CheckExistingAssetsDto implements Built<CheckExistingAssetsDto, CheckExistingAssetsDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'deviceAssetIds')
|
||||
BuiltList<String> get deviceAssetIds;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceId')
|
||||
String get deviceId;
|
||||
|
||||
CheckExistingAssetsDto._();
|
||||
|
||||
factory CheckExistingAssetsDto([void updates(CheckExistingAssetsDtoBuilder b)]) = _$CheckExistingAssetsDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CheckExistingAssetsDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CheckExistingAssetsDto> get serializer => _$CheckExistingAssetsDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CheckExistingAssetsDtoSerializer implements PrimitiveSerializer<CheckExistingAssetsDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CheckExistingAssetsDto, _$CheckExistingAssetsDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CheckExistingAssetsDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CheckExistingAssetsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'deviceAssetIds';
|
||||
yield serializers.serialize(
|
||||
object.deviceAssetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
yield r'deviceId';
|
||||
yield serializers.serialize(
|
||||
object.deviceId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CheckExistingAssetsDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CheckExistingAssetsDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'deviceAssetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.deviceAssetIds.replace(valueDes);
|
||||
break;
|
||||
case r'deviceId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceId = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CheckExistingAssetsDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CheckExistingAssetsDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'check_existing_assets_response_dto.g.dart';
|
||||
|
||||
/// CheckExistingAssetsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [existingIds]
|
||||
@BuiltValue()
|
||||
abstract class CheckExistingAssetsResponseDto implements Built<CheckExistingAssetsResponseDto, CheckExistingAssetsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'existingIds')
|
||||
BuiltList<String> get existingIds;
|
||||
|
||||
CheckExistingAssetsResponseDto._();
|
||||
|
||||
factory CheckExistingAssetsResponseDto([void updates(CheckExistingAssetsResponseDtoBuilder b)]) = _$CheckExistingAssetsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CheckExistingAssetsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CheckExistingAssetsResponseDto> get serializer => _$CheckExistingAssetsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CheckExistingAssetsResponseDtoSerializer implements PrimitiveSerializer<CheckExistingAssetsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CheckExistingAssetsResponseDto, _$CheckExistingAssetsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CheckExistingAssetsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CheckExistingAssetsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'existingIds';
|
||||
yield serializers.serialize(
|
||||
object.existingIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CheckExistingAssetsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CheckExistingAssetsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'existingIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.existingIds.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CheckExistingAssetsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CheckExistingAssetsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/model_type.dart';
|
||||
import 'package:openapi/src/model/clip_mode.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'clip_config.g.dart';
|
||||
|
||||
/// CLIPConfig
|
||||
///
|
||||
/// Properties:
|
||||
/// * [enabled]
|
||||
/// * [mode]
|
||||
/// * [modelName]
|
||||
/// * [modelType]
|
||||
@BuiltValue()
|
||||
abstract class CLIPConfig implements Built<CLIPConfig, CLIPConfigBuilder> {
|
||||
@BuiltValueField(wireName: r'enabled')
|
||||
bool get enabled;
|
||||
|
||||
@BuiltValueField(wireName: r'mode')
|
||||
CLIPMode? get mode;
|
||||
// enum modeEnum { vision, text, };
|
||||
|
||||
@BuiltValueField(wireName: r'modelName')
|
||||
String get modelName;
|
||||
|
||||
@BuiltValueField(wireName: r'modelType')
|
||||
ModelType? get modelType;
|
||||
// enum modelTypeEnum { facial-recognition, clip, };
|
||||
|
||||
CLIPConfig._();
|
||||
|
||||
factory CLIPConfig([void updates(CLIPConfigBuilder b)]) = _$CLIPConfig;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CLIPConfigBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CLIPConfig> get serializer => _$CLIPConfigSerializer();
|
||||
}
|
||||
|
||||
class _$CLIPConfigSerializer implements PrimitiveSerializer<CLIPConfig> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CLIPConfig, _$CLIPConfig];
|
||||
|
||||
@override
|
||||
final String wireName = r'CLIPConfig';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CLIPConfig object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'enabled';
|
||||
yield serializers.serialize(
|
||||
object.enabled,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
if (object.mode != null) {
|
||||
yield r'mode';
|
||||
yield serializers.serialize(
|
||||
object.mode,
|
||||
specifiedType: const FullType(CLIPMode),
|
||||
);
|
||||
}
|
||||
yield r'modelName';
|
||||
yield serializers.serialize(
|
||||
object.modelName,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.modelType != null) {
|
||||
yield r'modelType';
|
||||
yield serializers.serialize(
|
||||
object.modelType,
|
||||
specifiedType: const FullType(ModelType),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CLIPConfig object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CLIPConfigBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'enabled':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.enabled = valueDes;
|
||||
break;
|
||||
case r'mode':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(CLIPMode),
|
||||
) as CLIPMode;
|
||||
result.mode = valueDes;
|
||||
break;
|
||||
case r'modelName':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.modelName = valueDes;
|
||||
break;
|
||||
case r'modelType':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(ModelType),
|
||||
) as ModelType;
|
||||
result.modelType = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CLIPConfig deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CLIPConfigBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'clip_mode.g.dart';
|
||||
|
||||
class CLIPMode extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'vision')
|
||||
static const CLIPMode vision = _$vision;
|
||||
@BuiltValueEnumConst(wireName: r'text')
|
||||
static const CLIPMode text = _$text;
|
||||
|
||||
static Serializer<CLIPMode> get serializer => _$cLIPModeSerializer;
|
||||
|
||||
const CLIPMode._(String name): super(name);
|
||||
|
||||
static BuiltSet<CLIPMode> get values => _$values;
|
||||
static CLIPMode valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class CLIPModeMixin = Object with _$CLIPModeMixin;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'colorspace.g.dart';
|
||||
|
||||
class Colorspace extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'srgb')
|
||||
static const Colorspace srgb = _$srgb;
|
||||
@BuiltValueEnumConst(wireName: r'p3')
|
||||
static const Colorspace p3 = _$p3;
|
||||
|
||||
static Serializer<Colorspace> get serializer => _$colorspaceSerializer;
|
||||
|
||||
const Colorspace._(String name): super(name);
|
||||
|
||||
static BuiltSet<Colorspace> get values => _$values;
|
||||
static Colorspace valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class ColorspaceMixin = Object with _$ColorspaceMixin;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'cq_mode.g.dart';
|
||||
|
||||
class CQMode extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'auto')
|
||||
static const CQMode auto = _$auto;
|
||||
@BuiltValueEnumConst(wireName: r'cqp')
|
||||
static const CQMode cqp = _$cqp;
|
||||
@BuiltValueEnumConst(wireName: r'icq')
|
||||
static const CQMode icq = _$icq;
|
||||
|
||||
static Serializer<CQMode> get serializer => _$cQModeSerializer;
|
||||
|
||||
const CQMode._(String name): super(name);
|
||||
|
||||
static BuiltSet<CQMode> get values => _$values;
|
||||
static CQMode valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class CQModeMixin = Object with _$CQModeMixin;
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_album_dto.g.dart';
|
||||
|
||||
/// CreateAlbumDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [albumName]
|
||||
/// * [assetIds]
|
||||
/// * [description]
|
||||
/// * [sharedWithUserIds]
|
||||
@BuiltValue()
|
||||
abstract class CreateAlbumDto implements Built<CreateAlbumDto, CreateAlbumDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'albumName')
|
||||
String get albumName;
|
||||
|
||||
@BuiltValueField(wireName: r'assetIds')
|
||||
BuiltList<String>? get assetIds;
|
||||
|
||||
@BuiltValueField(wireName: r'description')
|
||||
String? get description;
|
||||
|
||||
@BuiltValueField(wireName: r'sharedWithUserIds')
|
||||
BuiltList<String>? get sharedWithUserIds;
|
||||
|
||||
CreateAlbumDto._();
|
||||
|
||||
factory CreateAlbumDto([void updates(CreateAlbumDtoBuilder b)]) = _$CreateAlbumDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateAlbumDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateAlbumDto> get serializer => _$CreateAlbumDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateAlbumDtoSerializer implements PrimitiveSerializer<CreateAlbumDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateAlbumDto, _$CreateAlbumDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateAlbumDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateAlbumDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'albumName';
|
||||
yield serializers.serialize(
|
||||
object.albumName,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.assetIds != null) {
|
||||
yield r'assetIds';
|
||||
yield serializers.serialize(
|
||||
object.assetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
if (object.description != null) {
|
||||
yield r'description';
|
||||
yield serializers.serialize(
|
||||
object.description,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
if (object.sharedWithUserIds != null) {
|
||||
yield r'sharedWithUserIds';
|
||||
yield serializers.serialize(
|
||||
object.sharedWithUserIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateAlbumDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateAlbumDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'albumName':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.albumName = valueDes;
|
||||
break;
|
||||
case r'assetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.assetIds.replace(valueDes);
|
||||
break;
|
||||
case r'description':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.description = valueDes;
|
||||
break;
|
||||
case r'sharedWithUserIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.sharedWithUserIds.replace(valueDes);
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateAlbumDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateAlbumDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,333 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'dart:typed_data';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_asset_dto.g.dart';
|
||||
|
||||
/// CreateAssetDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetData]
|
||||
/// * [deviceAssetId]
|
||||
/// * [deviceId]
|
||||
/// * [duration]
|
||||
/// * [fileCreatedAt]
|
||||
/// * [fileModifiedAt]
|
||||
/// * [isArchived]
|
||||
/// * [isFavorite]
|
||||
/// * [isOffline]
|
||||
/// * [isReadOnly]
|
||||
/// * [isVisible]
|
||||
/// * [libraryId]
|
||||
/// * [livePhotoData]
|
||||
/// * [sidecarData]
|
||||
@BuiltValue()
|
||||
abstract class CreateAssetDto implements Built<CreateAssetDto, CreateAssetDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetData')
|
||||
Uint8List get assetData;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceAssetId')
|
||||
String get deviceAssetId;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceId')
|
||||
String get deviceId;
|
||||
|
||||
@BuiltValueField(wireName: r'duration')
|
||||
String? get duration;
|
||||
|
||||
@BuiltValueField(wireName: r'fileCreatedAt')
|
||||
DateTime get fileCreatedAt;
|
||||
|
||||
@BuiltValueField(wireName: r'fileModifiedAt')
|
||||
DateTime get fileModifiedAt;
|
||||
|
||||
@BuiltValueField(wireName: r'isArchived')
|
||||
bool? get isArchived;
|
||||
|
||||
@BuiltValueField(wireName: r'isFavorite')
|
||||
bool? get isFavorite;
|
||||
|
||||
@BuiltValueField(wireName: r'isOffline')
|
||||
bool? get isOffline;
|
||||
|
||||
@BuiltValueField(wireName: r'isReadOnly')
|
||||
bool? get isReadOnly;
|
||||
|
||||
@BuiltValueField(wireName: r'isVisible')
|
||||
bool? get isVisible;
|
||||
|
||||
@BuiltValueField(wireName: r'libraryId')
|
||||
String? get libraryId;
|
||||
|
||||
@BuiltValueField(wireName: r'livePhotoData')
|
||||
Uint8List? get livePhotoData;
|
||||
|
||||
@BuiltValueField(wireName: r'sidecarData')
|
||||
Uint8List? get sidecarData;
|
||||
|
||||
CreateAssetDto._();
|
||||
|
||||
factory CreateAssetDto([void updates(CreateAssetDtoBuilder b)]) = _$CreateAssetDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateAssetDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateAssetDto> get serializer => _$CreateAssetDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateAssetDtoSerializer implements PrimitiveSerializer<CreateAssetDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateAssetDto, _$CreateAssetDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateAssetDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateAssetDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetData';
|
||||
yield serializers.serialize(
|
||||
object.assetData,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
);
|
||||
yield r'deviceAssetId';
|
||||
yield serializers.serialize(
|
||||
object.deviceAssetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceId';
|
||||
yield serializers.serialize(
|
||||
object.deviceId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.duration != null) {
|
||||
yield r'duration';
|
||||
yield serializers.serialize(
|
||||
object.duration,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
yield r'fileCreatedAt';
|
||||
yield serializers.serialize(
|
||||
object.fileCreatedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
yield r'fileModifiedAt';
|
||||
yield serializers.serialize(
|
||||
object.fileModifiedAt,
|
||||
specifiedType: const FullType(DateTime),
|
||||
);
|
||||
if (object.isArchived != null) {
|
||||
yield r'isArchived';
|
||||
yield serializers.serialize(
|
||||
object.isArchived,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.isFavorite != null) {
|
||||
yield r'isFavorite';
|
||||
yield serializers.serialize(
|
||||
object.isFavorite,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.isOffline != null) {
|
||||
yield r'isOffline';
|
||||
yield serializers.serialize(
|
||||
object.isOffline,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.isReadOnly != null) {
|
||||
yield r'isReadOnly';
|
||||
yield serializers.serialize(
|
||||
object.isReadOnly,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.isVisible != null) {
|
||||
yield r'isVisible';
|
||||
yield serializers.serialize(
|
||||
object.isVisible,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.libraryId != null) {
|
||||
yield r'libraryId';
|
||||
yield serializers.serialize(
|
||||
object.libraryId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
if (object.livePhotoData != null) {
|
||||
yield r'livePhotoData';
|
||||
yield serializers.serialize(
|
||||
object.livePhotoData,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
);
|
||||
}
|
||||
if (object.sidecarData != null) {
|
||||
yield r'sidecarData';
|
||||
yield serializers.serialize(
|
||||
object.sidecarData,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateAssetDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateAssetDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetData':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
) as Uint8List;
|
||||
result.assetData = valueDes;
|
||||
break;
|
||||
case r'deviceAssetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceAssetId = valueDes;
|
||||
break;
|
||||
case r'deviceId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceId = valueDes;
|
||||
break;
|
||||
case r'duration':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.duration = valueDes;
|
||||
break;
|
||||
case r'fileCreatedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.fileCreatedAt = valueDes;
|
||||
break;
|
||||
case r'fileModifiedAt':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(DateTime),
|
||||
) as DateTime;
|
||||
result.fileModifiedAt = valueDes;
|
||||
break;
|
||||
case r'isArchived':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isArchived = valueDes;
|
||||
break;
|
||||
case r'isFavorite':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isFavorite = valueDes;
|
||||
break;
|
||||
case r'isOffline':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isOffline = valueDes;
|
||||
break;
|
||||
case r'isReadOnly':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isReadOnly = valueDes;
|
||||
break;
|
||||
case r'isVisible':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isVisible = valueDes;
|
||||
break;
|
||||
case r'libraryId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.libraryId = valueDes;
|
||||
break;
|
||||
case r'livePhotoData':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
) as Uint8List;
|
||||
result.livePhotoData = valueDes;
|
||||
break;
|
||||
case r'sidecarData':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
) as Uint8List;
|
||||
result.sidecarData = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateAssetDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateAssetDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/library_type.dart';
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_library_dto.g.dart';
|
||||
|
||||
/// CreateLibraryDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [exclusionPatterns]
|
||||
/// * [importPaths]
|
||||
/// * [isVisible]
|
||||
/// * [name]
|
||||
/// * [ownerId]
|
||||
/// * [type]
|
||||
@BuiltValue()
|
||||
abstract class CreateLibraryDto implements Built<CreateLibraryDto, CreateLibraryDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'exclusionPatterns')
|
||||
BuiltList<String>? get exclusionPatterns;
|
||||
|
||||
@BuiltValueField(wireName: r'importPaths')
|
||||
BuiltList<String>? get importPaths;
|
||||
|
||||
@BuiltValueField(wireName: r'isVisible')
|
||||
bool? get isVisible;
|
||||
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String? get name;
|
||||
|
||||
@BuiltValueField(wireName: r'ownerId')
|
||||
String get ownerId;
|
||||
|
||||
@BuiltValueField(wireName: r'type')
|
||||
LibraryType get type;
|
||||
// enum typeEnum { UPLOAD, EXTERNAL, };
|
||||
|
||||
CreateLibraryDto._();
|
||||
|
||||
factory CreateLibraryDto([void updates(CreateLibraryDtoBuilder b)]) = _$CreateLibraryDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateLibraryDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateLibraryDto> get serializer => _$CreateLibraryDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateLibraryDtoSerializer implements PrimitiveSerializer<CreateLibraryDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateLibraryDto, _$CreateLibraryDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateLibraryDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateLibraryDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.exclusionPatterns != null) {
|
||||
yield r'exclusionPatterns';
|
||||
yield serializers.serialize(
|
||||
object.exclusionPatterns,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
if (object.importPaths != null) {
|
||||
yield r'importPaths';
|
||||
yield serializers.serialize(
|
||||
object.importPaths,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
if (object.isVisible != null) {
|
||||
yield r'isVisible';
|
||||
yield serializers.serialize(
|
||||
object.isVisible,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.name != null) {
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
yield r'ownerId';
|
||||
yield serializers.serialize(
|
||||
object.ownerId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'type';
|
||||
yield serializers.serialize(
|
||||
object.type,
|
||||
specifiedType: const FullType(LibraryType),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateLibraryDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateLibraryDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'exclusionPatterns':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.exclusionPatterns.replace(valueDes);
|
||||
break;
|
||||
case r'importPaths':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.importPaths.replace(valueDes);
|
||||
break;
|
||||
case r'isVisible':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.isVisible = valueDes;
|
||||
break;
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
case r'ownerId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.ownerId = valueDes;
|
||||
break;
|
||||
case r'type':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(LibraryType),
|
||||
) as LibraryType;
|
||||
result.type = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateLibraryDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateLibraryDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'dart:typed_data';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_profile_image_dto.g.dart';
|
||||
|
||||
/// CreateProfileImageDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [file]
|
||||
@BuiltValue()
|
||||
abstract class CreateProfileImageDto implements Built<CreateProfileImageDto, CreateProfileImageDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'file')
|
||||
Uint8List get file;
|
||||
|
||||
CreateProfileImageDto._();
|
||||
|
||||
factory CreateProfileImageDto([void updates(CreateProfileImageDtoBuilder b)]) = _$CreateProfileImageDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateProfileImageDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateProfileImageDto> get serializer => _$CreateProfileImageDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateProfileImageDtoSerializer implements PrimitiveSerializer<CreateProfileImageDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateProfileImageDto, _$CreateProfileImageDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateProfileImageDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateProfileImageDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'file';
|
||||
yield serializers.serialize(
|
||||
object.file,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateProfileImageDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateProfileImageDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'file':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(Uint8List),
|
||||
) as Uint8List;
|
||||
result.file = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateProfileImageDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateProfileImageDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_profile_image_response_dto.g.dart';
|
||||
|
||||
/// CreateProfileImageResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [profileImagePath]
|
||||
/// * [userId]
|
||||
@BuiltValue()
|
||||
abstract class CreateProfileImageResponseDto implements Built<CreateProfileImageResponseDto, CreateProfileImageResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'profileImagePath')
|
||||
String get profileImagePath;
|
||||
|
||||
@BuiltValueField(wireName: r'userId')
|
||||
String get userId;
|
||||
|
||||
CreateProfileImageResponseDto._();
|
||||
|
||||
factory CreateProfileImageResponseDto([void updates(CreateProfileImageResponseDtoBuilder b)]) = _$CreateProfileImageResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateProfileImageResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateProfileImageResponseDto> get serializer => _$CreateProfileImageResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateProfileImageResponseDtoSerializer implements PrimitiveSerializer<CreateProfileImageResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateProfileImageResponseDto, _$CreateProfileImageResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateProfileImageResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateProfileImageResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'profileImagePath';
|
||||
yield serializers.serialize(
|
||||
object.profileImagePath,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'userId';
|
||||
yield serializers.serialize(
|
||||
object.userId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateProfileImageResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateProfileImageResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'profileImagePath':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.profileImagePath = valueDes;
|
||||
break;
|
||||
case r'userId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.userId = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateProfileImageResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateProfileImageResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:openapi/src/model/tag_type_enum.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_tag_dto.g.dart';
|
||||
|
||||
/// CreateTagDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [name]
|
||||
/// * [type]
|
||||
@BuiltValue()
|
||||
abstract class CreateTagDto implements Built<CreateTagDto, CreateTagDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
@BuiltValueField(wireName: r'type')
|
||||
TagTypeEnum get type;
|
||||
// enum typeEnum { OBJECT, FACE, CUSTOM, };
|
||||
|
||||
CreateTagDto._();
|
||||
|
||||
factory CreateTagDto([void updates(CreateTagDtoBuilder b)]) = _$CreateTagDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateTagDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateTagDto> get serializer => _$CreateTagDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateTagDtoSerializer implements PrimitiveSerializer<CreateTagDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateTagDto, _$CreateTagDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateTagDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateTagDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'type';
|
||||
yield serializers.serialize(
|
||||
object.type,
|
||||
specifiedType: const FullType(TagTypeEnum),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateTagDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateTagDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
case r'type':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(TagTypeEnum),
|
||||
) as TagTypeEnum;
|
||||
result.type = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateTagDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateTagDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'create_user_dto.g.dart';
|
||||
|
||||
/// CreateUserDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [email]
|
||||
/// * [memoriesEnabled]
|
||||
/// * [name]
|
||||
/// * [password]
|
||||
/// * [quotaSizeInBytes]
|
||||
/// * [shouldChangePassword]
|
||||
/// * [storageLabel]
|
||||
@BuiltValue()
|
||||
abstract class CreateUserDto implements Built<CreateUserDto, CreateUserDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'email')
|
||||
String get email;
|
||||
|
||||
@BuiltValueField(wireName: r'memoriesEnabled')
|
||||
bool? get memoriesEnabled;
|
||||
|
||||
@BuiltValueField(wireName: r'name')
|
||||
String get name;
|
||||
|
||||
@BuiltValueField(wireName: r'password')
|
||||
String get password;
|
||||
|
||||
@BuiltValueField(wireName: r'quotaSizeInBytes')
|
||||
int? get quotaSizeInBytes;
|
||||
|
||||
@BuiltValueField(wireName: r'shouldChangePassword')
|
||||
bool? get shouldChangePassword;
|
||||
|
||||
@BuiltValueField(wireName: r'storageLabel')
|
||||
String? get storageLabel;
|
||||
|
||||
CreateUserDto._();
|
||||
|
||||
factory CreateUserDto([void updates(CreateUserDtoBuilder b)]) = _$CreateUserDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CreateUserDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CreateUserDto> get serializer => _$CreateUserDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CreateUserDtoSerializer implements PrimitiveSerializer<CreateUserDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CreateUserDto, _$CreateUserDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CreateUserDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CreateUserDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'email';
|
||||
yield serializers.serialize(
|
||||
object.email,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.memoriesEnabled != null) {
|
||||
yield r'memoriesEnabled';
|
||||
yield serializers.serialize(
|
||||
object.memoriesEnabled,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
yield r'name';
|
||||
yield serializers.serialize(
|
||||
object.name,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'password';
|
||||
yield serializers.serialize(
|
||||
object.password,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
if (object.quotaSizeInBytes != null) {
|
||||
yield r'quotaSizeInBytes';
|
||||
yield serializers.serialize(
|
||||
object.quotaSizeInBytes,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
);
|
||||
}
|
||||
if (object.shouldChangePassword != null) {
|
||||
yield r'shouldChangePassword';
|
||||
yield serializers.serialize(
|
||||
object.shouldChangePassword,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
if (object.storageLabel != null) {
|
||||
yield r'storageLabel';
|
||||
yield serializers.serialize(
|
||||
object.storageLabel,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CreateUserDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CreateUserDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'email':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.email = valueDes;
|
||||
break;
|
||||
case r'memoriesEnabled':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.memoriesEnabled = valueDes;
|
||||
break;
|
||||
case r'name':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.name = valueDes;
|
||||
break;
|
||||
case r'password':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.password = valueDes;
|
||||
break;
|
||||
case r'quotaSizeInBytes':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
) as int?;
|
||||
if (valueDes == null) continue;
|
||||
result.quotaSizeInBytes = valueDes;
|
||||
break;
|
||||
case r'shouldChangePassword':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.shouldChangePassword = valueDes;
|
||||
break;
|
||||
case r'storageLabel':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.storageLabel = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CreateUserDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CreateUserDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'curated_locations_response_dto.g.dart';
|
||||
|
||||
/// CuratedLocationsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [city]
|
||||
/// * [deviceAssetId]
|
||||
/// * [deviceId]
|
||||
/// * [id]
|
||||
/// * [resizePath]
|
||||
@BuiltValue()
|
||||
abstract class CuratedLocationsResponseDto implements Built<CuratedLocationsResponseDto, CuratedLocationsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'city')
|
||||
String get city;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceAssetId')
|
||||
String get deviceAssetId;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceId')
|
||||
String get deviceId;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'resizePath')
|
||||
String get resizePath;
|
||||
|
||||
CuratedLocationsResponseDto._();
|
||||
|
||||
factory CuratedLocationsResponseDto([void updates(CuratedLocationsResponseDtoBuilder b)]) = _$CuratedLocationsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CuratedLocationsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CuratedLocationsResponseDto> get serializer => _$CuratedLocationsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CuratedLocationsResponseDtoSerializer implements PrimitiveSerializer<CuratedLocationsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CuratedLocationsResponseDto, _$CuratedLocationsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CuratedLocationsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CuratedLocationsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'city';
|
||||
yield serializers.serialize(
|
||||
object.city,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceAssetId';
|
||||
yield serializers.serialize(
|
||||
object.deviceAssetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceId';
|
||||
yield serializers.serialize(
|
||||
object.deviceId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'resizePath';
|
||||
yield serializers.serialize(
|
||||
object.resizePath,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CuratedLocationsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CuratedLocationsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'city':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.city = valueDes;
|
||||
break;
|
||||
case r'deviceAssetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceAssetId = valueDes;
|
||||
break;
|
||||
case r'deviceId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceId = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'resizePath':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.resizePath = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CuratedLocationsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CuratedLocationsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'curated_objects_response_dto.g.dart';
|
||||
|
||||
/// CuratedObjectsResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [deviceAssetId]
|
||||
/// * [deviceId]
|
||||
/// * [id]
|
||||
/// * [object]
|
||||
/// * [resizePath]
|
||||
@BuiltValue()
|
||||
abstract class CuratedObjectsResponseDto implements Built<CuratedObjectsResponseDto, CuratedObjectsResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'deviceAssetId')
|
||||
String get deviceAssetId;
|
||||
|
||||
@BuiltValueField(wireName: r'deviceId')
|
||||
String get deviceId;
|
||||
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
@BuiltValueField(wireName: r'object')
|
||||
String get object;
|
||||
|
||||
@BuiltValueField(wireName: r'resizePath')
|
||||
String get resizePath;
|
||||
|
||||
CuratedObjectsResponseDto._();
|
||||
|
||||
factory CuratedObjectsResponseDto([void updates(CuratedObjectsResponseDtoBuilder b)]) = _$CuratedObjectsResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(CuratedObjectsResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<CuratedObjectsResponseDto> get serializer => _$CuratedObjectsResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$CuratedObjectsResponseDtoSerializer implements PrimitiveSerializer<CuratedObjectsResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [CuratedObjectsResponseDto, _$CuratedObjectsResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'CuratedObjectsResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
CuratedObjectsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'deviceAssetId';
|
||||
yield serializers.serialize(
|
||||
object.deviceAssetId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'deviceId';
|
||||
yield serializers.serialize(
|
||||
object.deviceId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'object';
|
||||
yield serializers.serialize(
|
||||
object.object,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
yield r'resizePath';
|
||||
yield serializers.serialize(
|
||||
object.resizePath,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
CuratedObjectsResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required CuratedObjectsResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'deviceAssetId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceAssetId = valueDes;
|
||||
break;
|
||||
case r'deviceId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.deviceId = valueDes;
|
||||
break;
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
case r'object':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.object = valueDes;
|
||||
break;
|
||||
case r'resizePath':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.resizePath = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
CuratedObjectsResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = CuratedObjectsResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/// A gregorian calendar date generated by
|
||||
/// OpenAPI generator to differentiate
|
||||
/// between [DateTime] and [Date] formats.
|
||||
class Date implements Comparable<Date> {
|
||||
final int year;
|
||||
|
||||
/// January is 1.
|
||||
final int month;
|
||||
|
||||
/// First day is 1.
|
||||
final int day;
|
||||
|
||||
Date(this.year, this.month, this.day);
|
||||
|
||||
/// The current date
|
||||
static Date now({bool utc = false}) {
|
||||
var now = DateTime.now();
|
||||
if (utc) {
|
||||
now = now.toUtc();
|
||||
}
|
||||
return now.toDate();
|
||||
}
|
||||
|
||||
/// Convert to a [DateTime].
|
||||
DateTime toDateTime({bool utc = false}) {
|
||||
if (utc) {
|
||||
return DateTime.utc(year, month, day);
|
||||
} else {
|
||||
return DateTime(year, month, day);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int compareTo(Date other) {
|
||||
int d = year.compareTo(other.year);
|
||||
if (d != 0) {
|
||||
return d;
|
||||
}
|
||||
d = month.compareTo(other.month);
|
||||
if (d != 0) {
|
||||
return d;
|
||||
}
|
||||
return day.compareTo(other.day);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is Date &&
|
||||
runtimeType == other.runtimeType &&
|
||||
year == other.year &&
|
||||
month == other.month &&
|
||||
day == other.day;
|
||||
|
||||
@override
|
||||
int get hashCode => year.hashCode ^ month.hashCode ^ day.hashCode;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
final yyyy = year.toString();
|
||||
final mm = month.toString().padLeft(2, '0');
|
||||
final dd = day.toString().padLeft(2, '0');
|
||||
|
||||
return '$yyyy-$mm-$dd';
|
||||
}
|
||||
}
|
||||
|
||||
extension DateTimeToDate on DateTime {
|
||||
Date toDate() => Date(year, month, day);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'delete_user_dto.g.dart';
|
||||
|
||||
/// DeleteUserDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [force]
|
||||
@BuiltValue()
|
||||
abstract class DeleteUserDto implements Built<DeleteUserDto, DeleteUserDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'force')
|
||||
bool? get force;
|
||||
|
||||
DeleteUserDto._();
|
||||
|
||||
factory DeleteUserDto([void updates(DeleteUserDtoBuilder b)]) = _$DeleteUserDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(DeleteUserDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<DeleteUserDto> get serializer => _$DeleteUserDtoSerializer();
|
||||
}
|
||||
|
||||
class _$DeleteUserDtoSerializer implements PrimitiveSerializer<DeleteUserDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [DeleteUserDto, _$DeleteUserDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'DeleteUserDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
DeleteUserDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.force != null) {
|
||||
yield r'force';
|
||||
yield serializers.serialize(
|
||||
object.force,
|
||||
specifiedType: const FullType(bool),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
DeleteUserDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required DeleteUserDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'force':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(bool),
|
||||
) as bool;
|
||||
result.force = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
DeleteUserDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = DeleteUserDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'download_archive_info.g.dart';
|
||||
|
||||
/// DownloadArchiveInfo
|
||||
///
|
||||
/// Properties:
|
||||
/// * [assetIds]
|
||||
/// * [size]
|
||||
@BuiltValue()
|
||||
abstract class DownloadArchiveInfo implements Built<DownloadArchiveInfo, DownloadArchiveInfoBuilder> {
|
||||
@BuiltValueField(wireName: r'assetIds')
|
||||
BuiltList<String> get assetIds;
|
||||
|
||||
@BuiltValueField(wireName: r'size')
|
||||
int get size;
|
||||
|
||||
DownloadArchiveInfo._();
|
||||
|
||||
factory DownloadArchiveInfo([void updates(DownloadArchiveInfoBuilder b)]) = _$DownloadArchiveInfo;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(DownloadArchiveInfoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<DownloadArchiveInfo> get serializer => _$DownloadArchiveInfoSerializer();
|
||||
}
|
||||
|
||||
class _$DownloadArchiveInfoSerializer implements PrimitiveSerializer<DownloadArchiveInfo> {
|
||||
@override
|
||||
final Iterable<Type> types = const [DownloadArchiveInfo, _$DownloadArchiveInfo];
|
||||
|
||||
@override
|
||||
final String wireName = r'DownloadArchiveInfo';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
DownloadArchiveInfo object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'assetIds';
|
||||
yield serializers.serialize(
|
||||
object.assetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
yield r'size';
|
||||
yield serializers.serialize(
|
||||
object.size,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
DownloadArchiveInfo object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required DownloadArchiveInfoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'assetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.assetIds.replace(valueDes);
|
||||
break;
|
||||
case r'size':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.size = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
DownloadArchiveInfo deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = DownloadArchiveInfoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'download_info_dto.g.dart';
|
||||
|
||||
/// DownloadInfoDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [albumId]
|
||||
/// * [archiveSize]
|
||||
/// * [assetIds]
|
||||
/// * [userId]
|
||||
@BuiltValue()
|
||||
abstract class DownloadInfoDto implements Built<DownloadInfoDto, DownloadInfoDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'albumId')
|
||||
String? get albumId;
|
||||
|
||||
@BuiltValueField(wireName: r'archiveSize')
|
||||
int? get archiveSize;
|
||||
|
||||
@BuiltValueField(wireName: r'assetIds')
|
||||
BuiltList<String>? get assetIds;
|
||||
|
||||
@BuiltValueField(wireName: r'userId')
|
||||
String? get userId;
|
||||
|
||||
DownloadInfoDto._();
|
||||
|
||||
factory DownloadInfoDto([void updates(DownloadInfoDtoBuilder b)]) = _$DownloadInfoDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(DownloadInfoDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<DownloadInfoDto> get serializer => _$DownloadInfoDtoSerializer();
|
||||
}
|
||||
|
||||
class _$DownloadInfoDtoSerializer implements PrimitiveSerializer<DownloadInfoDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [DownloadInfoDto, _$DownloadInfoDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'DownloadInfoDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
DownloadInfoDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.albumId != null) {
|
||||
yield r'albumId';
|
||||
yield serializers.serialize(
|
||||
object.albumId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
if (object.archiveSize != null) {
|
||||
yield r'archiveSize';
|
||||
yield serializers.serialize(
|
||||
object.archiveSize,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
if (object.assetIds != null) {
|
||||
yield r'assetIds';
|
||||
yield serializers.serialize(
|
||||
object.assetIds,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
);
|
||||
}
|
||||
if (object.userId != null) {
|
||||
yield r'userId';
|
||||
yield serializers.serialize(
|
||||
object.userId,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
DownloadInfoDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required DownloadInfoDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'albumId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.albumId = valueDes;
|
||||
break;
|
||||
case r'archiveSize':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.archiveSize = valueDes;
|
||||
break;
|
||||
case r'assetIds':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(String)]),
|
||||
) as BuiltList<String>;
|
||||
result.assetIds.replace(valueDes);
|
||||
break;
|
||||
case r'userId':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.userId = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
DownloadInfoDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = DownloadInfoDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:openapi/src/model/download_archive_info.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'download_response_dto.g.dart';
|
||||
|
||||
/// DownloadResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [archives]
|
||||
/// * [totalSize]
|
||||
@BuiltValue()
|
||||
abstract class DownloadResponseDto implements Built<DownloadResponseDto, DownloadResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'archives')
|
||||
BuiltList<DownloadArchiveInfo> get archives;
|
||||
|
||||
@BuiltValueField(wireName: r'totalSize')
|
||||
int get totalSize;
|
||||
|
||||
DownloadResponseDto._();
|
||||
|
||||
factory DownloadResponseDto([void updates(DownloadResponseDtoBuilder b)]) = _$DownloadResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(DownloadResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<DownloadResponseDto> get serializer => _$DownloadResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$DownloadResponseDtoSerializer implements PrimitiveSerializer<DownloadResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [DownloadResponseDto, _$DownloadResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'DownloadResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
DownloadResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'archives';
|
||||
yield serializers.serialize(
|
||||
object.archives,
|
||||
specifiedType: const FullType(BuiltList, [FullType(DownloadArchiveInfo)]),
|
||||
);
|
||||
yield r'totalSize';
|
||||
yield serializers.serialize(
|
||||
object.totalSize,
|
||||
specifiedType: const FullType(int),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
DownloadResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required DownloadResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'archives':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(BuiltList, [FullType(DownloadArchiveInfo)]),
|
||||
) as BuiltList<DownloadArchiveInfo>;
|
||||
result.archives.replace(valueDes);
|
||||
break;
|
||||
case r'totalSize':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(int),
|
||||
) as int;
|
||||
result.totalSize = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
DownloadResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = DownloadResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_collection/built_collection.dart';
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'entity_type.g.dart';
|
||||
|
||||
class EntityType extends EnumClass {
|
||||
|
||||
@BuiltValueEnumConst(wireName: r'ASSET')
|
||||
static const EntityType ASSET = _$ASSET;
|
||||
@BuiltValueEnumConst(wireName: r'ALBUM')
|
||||
static const EntityType ALBUM = _$ALBUM;
|
||||
|
||||
static Serializer<EntityType> get serializer => _$entityTypeSerializer;
|
||||
|
||||
const EntityType._(String name): super(name);
|
||||
|
||||
static BuiltSet<EntityType> get values => _$values;
|
||||
static EntityType valueOf(String name) => _$valueOf(name);
|
||||
}
|
||||
|
||||
/// Optionally, enum_class can generate a mixin to go with your enum for use
|
||||
/// with Angular. It exposes your enum constants as getters. So, if you mix it
|
||||
/// in to your Dart component class, the values become available to the
|
||||
/// corresponding Angular template.
|
||||
///
|
||||
/// Trigger mixin generation by writing a line like this one next to your enum.
|
||||
abstract class EntityTypeMixin = Object with _$EntityTypeMixin;
|
||||
|
||||
@@ -0,0 +1,489 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'exif_response_dto.g.dart';
|
||||
|
||||
/// ExifResponseDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [city]
|
||||
/// * [country]
|
||||
/// * [dateTimeOriginal]
|
||||
/// * [description]
|
||||
/// * [exifImageHeight]
|
||||
/// * [exifImageWidth]
|
||||
/// * [exposureTime]
|
||||
/// * [fNumber]
|
||||
/// * [fileSizeInByte]
|
||||
/// * [focalLength]
|
||||
/// * [iso]
|
||||
/// * [latitude]
|
||||
/// * [lensModel]
|
||||
/// * [longitude]
|
||||
/// * [make]
|
||||
/// * [model]
|
||||
/// * [modifyDate]
|
||||
/// * [orientation]
|
||||
/// * [projectionType]
|
||||
/// * [state]
|
||||
/// * [timeZone]
|
||||
@BuiltValue()
|
||||
abstract class ExifResponseDto implements Built<ExifResponseDto, ExifResponseDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'city')
|
||||
String? get city;
|
||||
|
||||
@BuiltValueField(wireName: r'country')
|
||||
String? get country;
|
||||
|
||||
@BuiltValueField(wireName: r'dateTimeOriginal')
|
||||
DateTime? get dateTimeOriginal;
|
||||
|
||||
@BuiltValueField(wireName: r'description')
|
||||
String? get description;
|
||||
|
||||
@BuiltValueField(wireName: r'exifImageHeight')
|
||||
num? get exifImageHeight;
|
||||
|
||||
@BuiltValueField(wireName: r'exifImageWidth')
|
||||
num? get exifImageWidth;
|
||||
|
||||
@BuiltValueField(wireName: r'exposureTime')
|
||||
String? get exposureTime;
|
||||
|
||||
@BuiltValueField(wireName: r'fNumber')
|
||||
num? get fNumber;
|
||||
|
||||
@BuiltValueField(wireName: r'fileSizeInByte')
|
||||
int? get fileSizeInByte;
|
||||
|
||||
@BuiltValueField(wireName: r'focalLength')
|
||||
num? get focalLength;
|
||||
|
||||
@BuiltValueField(wireName: r'iso')
|
||||
num? get iso;
|
||||
|
||||
@BuiltValueField(wireName: r'latitude')
|
||||
num? get latitude;
|
||||
|
||||
@BuiltValueField(wireName: r'lensModel')
|
||||
String? get lensModel;
|
||||
|
||||
@BuiltValueField(wireName: r'longitude')
|
||||
num? get longitude;
|
||||
|
||||
@BuiltValueField(wireName: r'make')
|
||||
String? get make;
|
||||
|
||||
@BuiltValueField(wireName: r'model')
|
||||
String? get model;
|
||||
|
||||
@BuiltValueField(wireName: r'modifyDate')
|
||||
DateTime? get modifyDate;
|
||||
|
||||
@BuiltValueField(wireName: r'orientation')
|
||||
String? get orientation;
|
||||
|
||||
@BuiltValueField(wireName: r'projectionType')
|
||||
String? get projectionType;
|
||||
|
||||
@BuiltValueField(wireName: r'state')
|
||||
String? get state;
|
||||
|
||||
@BuiltValueField(wireName: r'timeZone')
|
||||
String? get timeZone;
|
||||
|
||||
ExifResponseDto._();
|
||||
|
||||
factory ExifResponseDto([void updates(ExifResponseDtoBuilder b)]) = _$ExifResponseDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(ExifResponseDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<ExifResponseDto> get serializer => _$ExifResponseDtoSerializer();
|
||||
}
|
||||
|
||||
class _$ExifResponseDtoSerializer implements PrimitiveSerializer<ExifResponseDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [ExifResponseDto, _$ExifResponseDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'ExifResponseDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
ExifResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
if (object.city != null) {
|
||||
yield r'city';
|
||||
yield serializers.serialize(
|
||||
object.city,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.country != null) {
|
||||
yield r'country';
|
||||
yield serializers.serialize(
|
||||
object.country,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.dateTimeOriginal != null) {
|
||||
yield r'dateTimeOriginal';
|
||||
yield serializers.serialize(
|
||||
object.dateTimeOriginal,
|
||||
specifiedType: const FullType.nullable(DateTime),
|
||||
);
|
||||
}
|
||||
if (object.description != null) {
|
||||
yield r'description';
|
||||
yield serializers.serialize(
|
||||
object.description,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.exifImageHeight != null) {
|
||||
yield r'exifImageHeight';
|
||||
yield serializers.serialize(
|
||||
object.exifImageHeight,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.exifImageWidth != null) {
|
||||
yield r'exifImageWidth';
|
||||
yield serializers.serialize(
|
||||
object.exifImageWidth,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.exposureTime != null) {
|
||||
yield r'exposureTime';
|
||||
yield serializers.serialize(
|
||||
object.exposureTime,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.fNumber != null) {
|
||||
yield r'fNumber';
|
||||
yield serializers.serialize(
|
||||
object.fNumber,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.fileSizeInByte != null) {
|
||||
yield r'fileSizeInByte';
|
||||
yield serializers.serialize(
|
||||
object.fileSizeInByte,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
);
|
||||
}
|
||||
if (object.focalLength != null) {
|
||||
yield r'focalLength';
|
||||
yield serializers.serialize(
|
||||
object.focalLength,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.iso != null) {
|
||||
yield r'iso';
|
||||
yield serializers.serialize(
|
||||
object.iso,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.latitude != null) {
|
||||
yield r'latitude';
|
||||
yield serializers.serialize(
|
||||
object.latitude,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.lensModel != null) {
|
||||
yield r'lensModel';
|
||||
yield serializers.serialize(
|
||||
object.lensModel,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.longitude != null) {
|
||||
yield r'longitude';
|
||||
yield serializers.serialize(
|
||||
object.longitude,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
);
|
||||
}
|
||||
if (object.make != null) {
|
||||
yield r'make';
|
||||
yield serializers.serialize(
|
||||
object.make,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.model != null) {
|
||||
yield r'model';
|
||||
yield serializers.serialize(
|
||||
object.model,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.modifyDate != null) {
|
||||
yield r'modifyDate';
|
||||
yield serializers.serialize(
|
||||
object.modifyDate,
|
||||
specifiedType: const FullType.nullable(DateTime),
|
||||
);
|
||||
}
|
||||
if (object.orientation != null) {
|
||||
yield r'orientation';
|
||||
yield serializers.serialize(
|
||||
object.orientation,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.projectionType != null) {
|
||||
yield r'projectionType';
|
||||
yield serializers.serialize(
|
||||
object.projectionType,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.state != null) {
|
||||
yield r'state';
|
||||
yield serializers.serialize(
|
||||
object.state,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
if (object.timeZone != null) {
|
||||
yield r'timeZone';
|
||||
yield serializers.serialize(
|
||||
object.timeZone,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
ExifResponseDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required ExifResponseDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'city':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.city = valueDes;
|
||||
break;
|
||||
case r'country':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.country = valueDes;
|
||||
break;
|
||||
case r'dateTimeOriginal':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(DateTime),
|
||||
) as DateTime?;
|
||||
if (valueDes == null) continue;
|
||||
result.dateTimeOriginal = valueDes;
|
||||
break;
|
||||
case r'description':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.description = valueDes;
|
||||
break;
|
||||
case r'exifImageHeight':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.exifImageHeight = valueDes;
|
||||
break;
|
||||
case r'exifImageWidth':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.exifImageWidth = valueDes;
|
||||
break;
|
||||
case r'exposureTime':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.exposureTime = valueDes;
|
||||
break;
|
||||
case r'fNumber':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.fNumber = valueDes;
|
||||
break;
|
||||
case r'fileSizeInByte':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(int),
|
||||
) as int?;
|
||||
if (valueDes == null) continue;
|
||||
result.fileSizeInByte = valueDes;
|
||||
break;
|
||||
case r'focalLength':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.focalLength = valueDes;
|
||||
break;
|
||||
case r'iso':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.iso = valueDes;
|
||||
break;
|
||||
case r'latitude':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.latitude = valueDes;
|
||||
break;
|
||||
case r'lensModel':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.lensModel = valueDes;
|
||||
break;
|
||||
case r'longitude':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(num),
|
||||
) as num?;
|
||||
if (valueDes == null) continue;
|
||||
result.longitude = valueDes;
|
||||
break;
|
||||
case r'make':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.make = valueDes;
|
||||
break;
|
||||
case r'model':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.model = valueDes;
|
||||
break;
|
||||
case r'modifyDate':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(DateTime),
|
||||
) as DateTime?;
|
||||
if (valueDes == null) continue;
|
||||
result.modifyDate = valueDes;
|
||||
break;
|
||||
case r'orientation':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.orientation = valueDes;
|
||||
break;
|
||||
case r'projectionType':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.projectionType = valueDes;
|
||||
break;
|
||||
case r'state':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.state = valueDes;
|
||||
break;
|
||||
case r'timeZone':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType.nullable(String),
|
||||
) as String?;
|
||||
if (valueDes == null) continue;
|
||||
result.timeZone = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
ExifResponseDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = ExifResponseDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
||||
//
|
||||
|
||||
// ignore_for_file: unused_element
|
||||
import 'package:built_value/built_value.dart';
|
||||
import 'package:built_value/serializer.dart';
|
||||
|
||||
part 'face_dto.g.dart';
|
||||
|
||||
/// FaceDto
|
||||
///
|
||||
/// Properties:
|
||||
/// * [id]
|
||||
@BuiltValue()
|
||||
abstract class FaceDto implements Built<FaceDto, FaceDtoBuilder> {
|
||||
@BuiltValueField(wireName: r'id')
|
||||
String get id;
|
||||
|
||||
FaceDto._();
|
||||
|
||||
factory FaceDto([void updates(FaceDtoBuilder b)]) = _$FaceDto;
|
||||
|
||||
@BuiltValueHook(initializeBuilder: true)
|
||||
static void _defaults(FaceDtoBuilder b) => b;
|
||||
|
||||
@BuiltValueSerializer(custom: true)
|
||||
static Serializer<FaceDto> get serializer => _$FaceDtoSerializer();
|
||||
}
|
||||
|
||||
class _$FaceDtoSerializer implements PrimitiveSerializer<FaceDto> {
|
||||
@override
|
||||
final Iterable<Type> types = const [FaceDto, _$FaceDto];
|
||||
|
||||
@override
|
||||
final String wireName = r'FaceDto';
|
||||
|
||||
Iterable<Object?> _serializeProperties(
|
||||
Serializers serializers,
|
||||
FaceDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) sync* {
|
||||
yield r'id';
|
||||
yield serializers.serialize(
|
||||
object.id,
|
||||
specifiedType: const FullType(String),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Object serialize(
|
||||
Serializers serializers,
|
||||
FaceDto object, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
return _serializeProperties(serializers, object, specifiedType: specifiedType).toList();
|
||||
}
|
||||
|
||||
void _deserializeProperties(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
required List<Object?> serializedList,
|
||||
required FaceDtoBuilder result,
|
||||
required List<Object?> unhandled,
|
||||
}) {
|
||||
for (var i = 0; i < serializedList.length; i += 2) {
|
||||
final key = serializedList[i] as String;
|
||||
final value = serializedList[i + 1];
|
||||
switch (key) {
|
||||
case r'id':
|
||||
final valueDes = serializers.deserialize(
|
||||
value,
|
||||
specifiedType: const FullType(String),
|
||||
) as String;
|
||||
result.id = valueDes;
|
||||
break;
|
||||
default:
|
||||
unhandled.add(key);
|
||||
unhandled.add(value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
FaceDto deserialize(
|
||||
Serializers serializers,
|
||||
Object serialized, {
|
||||
FullType specifiedType = FullType.unspecified,
|
||||
}) {
|
||||
final result = FaceDtoBuilder();
|
||||
final serializedList = (serialized as Iterable<Object?>).toList();
|
||||
final unhandled = <Object?>[];
|
||||
_deserializeProperties(
|
||||
serializers,
|
||||
serialized,
|
||||
specifiedType: specifiedType,
|
||||
serializedList: serializedList,
|
||||
unhandled: unhandled,
|
||||
result: result,
|
||||
);
|
||||
return result.build();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user