1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-08 23:07:06 +02:00

Refactor mobile to use OpenApi generated SDK (#336)

This commit is contained in:
Alex
2022-07-13 07:23:48 -05:00
committed by GitHub
parent d69470e207
commit ae7e582ec8
276 changed files with 14513 additions and 3003 deletions

17
mobile/openapi/.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
# See https://dart.dev/guides/libraries/private-files
.dart_tool/
.packages
build/
pubspec.lock # Except for application packages
doc/api/
# IntelliJ
*.iml
*.ipr
*.iws
.idea/
# Mac
.DS_Store

View File

@ -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

View File

@ -0,0 +1,100 @@
.gitignore
.travis.yml
README.md
analysis_options.yaml
doc/AddAssetsDto.md
doc/AddUsersDto.md
doc/AdminSignupResponseDto.md
doc/AlbumApi.md
doc/AlbumResponseDto.md
doc/AssetApi.md
doc/AssetFileUploadResponseDto.md
doc/AssetResponseDto.md
doc/AssetTypeEnum.md
doc/AuthenticationApi.md
doc/CheckDuplicateAssetDto.md
doc/CheckDuplicateAssetResponseDto.md
doc/CreateAlbumDto.md
doc/CreateDeviceInfoDto.md
doc/CreateProfileImageResponseDto.md
doc/CreateUserDto.md
doc/CuratedLocationsResponseDto.md
doc/CuratedObjectsResponseDto.md
doc/DeleteAssetDto.md
doc/DeleteAssetResponseDto.md
doc/DeleteAssetStatus.md
doc/DeviceInfoApi.md
doc/DeviceInfoResponseDto.md
doc/DeviceTypeEnum.md
doc/ExifResponseDto.md
doc/LoginCredentialDto.md
doc/LoginResponseDto.md
doc/RemoveAssetsDto.md
doc/SearchAssetDto.md
doc/ServerInfoApi.md
doc/ServerInfoResponseDto.md
doc/ServerPingResponse.md
doc/ServerVersionReponseDto.md
doc/SignUpDto.md
doc/SmartInfoResponseDto.md
doc/UpdateAlbumDto.md
doc/UpdateDeviceInfoDto.md
doc/UpdateUserDto.md
doc/UserApi.md
doc/UserCountResponseDto.md
doc/UserResponseDto.md
doc/ValidateAccessTokenResponseDto.md
git_push.sh
lib/api.dart
lib/api/album_api.dart
lib/api/asset_api.dart
lib/api/authentication_api.dart
lib/api/device_info_api.dart
lib/api/server_info_api.dart
lib/api/user_api.dart
lib/api_client.dart
lib/api_exception.dart
lib/api_helper.dart
lib/auth/api_key_auth.dart
lib/auth/authentication.dart
lib/auth/http_basic_auth.dart
lib/auth/http_bearer_auth.dart
lib/auth/oauth.dart
lib/model/add_assets_dto.dart
lib/model/add_users_dto.dart
lib/model/admin_signup_response_dto.dart
lib/model/album_response_dto.dart
lib/model/asset_file_upload_response_dto.dart
lib/model/asset_response_dto.dart
lib/model/asset_type_enum.dart
lib/model/check_duplicate_asset_dto.dart
lib/model/check_duplicate_asset_response_dto.dart
lib/model/create_album_dto.dart
lib/model/create_device_info_dto.dart
lib/model/create_profile_image_response_dto.dart
lib/model/create_user_dto.dart
lib/model/curated_locations_response_dto.dart
lib/model/curated_objects_response_dto.dart
lib/model/delete_asset_dto.dart
lib/model/delete_asset_response_dto.dart
lib/model/delete_asset_status.dart
lib/model/device_info_response_dto.dart
lib/model/device_type_enum.dart
lib/model/exif_response_dto.dart
lib/model/login_credential_dto.dart
lib/model/login_response_dto.dart
lib/model/remove_assets_dto.dart
lib/model/search_asset_dto.dart
lib/model/server_info_response_dto.dart
lib/model/server_ping_response.dart
lib/model/server_version_reponse_dto.dart
lib/model/sign_up_dto.dart
lib/model/smart_info_response_dto.dart
lib/model/update_album_dto.dart
lib/model/update_device_info_dto.dart
lib/model/update_user_dto.dart
lib/model/user_count_response_dto.dart
lib/model/user_response_dto.dart
lib/model/validate_access_token_response_dto.dart
pubspec.yaml
test/validate_access_token_response_dto_test.dart

View File

@ -0,0 +1 @@
6.0.1

View File

@ -0,0 +1,14 @@
#
# AUTO-GENERATED FILE, DO NOT MODIFY!
#
# https://docs.travis-ci.com/user/languages/dart/
#
language: dart
dart:
# Install a specific stable release
- "2.12"
install:
- pub get
script:
- pub run test

158
mobile/openapi/README.md Normal file
View File

@ -0,0 +1,158 @@
# openapi
Immich API
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 1.17.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
## Requirements
Dart 2.12 or later
## Installation & Usage
### Github
If this Dart package is published to Github, add the following dependency to your pubspec.yaml
```
dependencies:
openapi:
git: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
```
### Local
To use the package in your local drive, add the following dependency to your pubspec.yaml
```
dependencies:
openapi:
path: /path/to/openapi
```
## Tests
TODO
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
try {
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
}
```
## Documentation for API Endpoints
All URIs are relative to */api*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AlbumApi* | [**addAssetsToAlbum**](doc//AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
*AlbumApi* | [**addUsersToAlbum**](doc//AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
*AlbumApi* | [**createAlbum**](doc//AlbumApi.md#createalbum) | **POST** /album |
*AlbumApi* | [**deleteAlbum**](doc//AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
*AlbumApi* | [**getAlbumInfo**](doc//AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
*AlbumApi* | [**getAllAlbums**](doc//AlbumApi.md#getallalbums) | **GET** /album |
*AlbumApi* | [**removeAssetFromAlbum**](doc//AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
*AlbumApi* | [**removeUserFromAlbum**](doc//AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
*AlbumApi* | [**updateAlbumInfo**](doc//AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
*AssetApi* | [**checkDuplicateAsset**](doc//AssetApi.md#checkduplicateasset) | **POST** /asset/check |
*AssetApi* | [**deleteAsset**](doc//AssetApi.md#deleteasset) | **DELETE** /asset |
*AssetApi* | [**downloadFile**](doc//AssetApi.md#downloadfile) | **GET** /asset/download |
*AssetApi* | [**getAllAssets**](doc//AssetApi.md#getallassets) | **GET** /asset |
*AssetApi* | [**getAssetById**](doc//AssetApi.md#getassetbyid) | **GET** /asset/assetById/{assetId} |
*AssetApi* | [**getAssetSearchTerms**](doc//AssetApi.md#getassetsearchterms) | **GET** /asset/searchTerm |
*AssetApi* | [**getAssetThumbnail**](doc//AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{assetId} |
*AssetApi* | [**getCuratedLocations**](doc//AssetApi.md#getcuratedlocations) | **GET** /asset/allLocation |
*AssetApi* | [**getCuratedObjects**](doc//AssetApi.md#getcuratedobjects) | **GET** /asset/allObjects |
*AssetApi* | [**getUserAssetsByDeviceId**](doc//AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
*AssetApi* | [**searchAsset**](doc//AssetApi.md#searchasset) | **POST** /asset/search |
*AssetApi* | [**serveFile**](doc//AssetApi.md#servefile) | **GET** /asset/file |
*AssetApi* | [**uploadFile**](doc//AssetApi.md#uploadfile) | **POST** /asset/upload |
*AuthenticationApi* | [**adminSignUp**](doc//AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
*AuthenticationApi* | [**login**](doc//AuthenticationApi.md#login) | **POST** /auth/login |
*AuthenticationApi* | [**validateAccessToken**](doc//AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
*DeviceInfoApi* | [**createDeviceInfo**](doc//DeviceInfoApi.md#createdeviceinfo) | **POST** /device-info |
*DeviceInfoApi* | [**updateDeviceInfo**](doc//DeviceInfoApi.md#updatedeviceinfo) | **PATCH** /device-info |
*ServerInfoApi* | [**getServerInfo**](doc//ServerInfoApi.md#getserverinfo) | **GET** /server-info |
*ServerInfoApi* | [**getServerVersion**](doc//ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
*ServerInfoApi* | [**pingServer**](doc//ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
*UserApi* | [**createProfileImage**](doc//UserApi.md#createprofileimage) | **POST** /user/profile-image |
*UserApi* | [**createUser**](doc//UserApi.md#createuser) | **POST** /user |
*UserApi* | [**getAllUsers**](doc//UserApi.md#getallusers) | **GET** /user |
*UserApi* | [**getMyUserInfo**](doc//UserApi.md#getmyuserinfo) | **GET** /user/me |
*UserApi* | [**getProfileImage**](doc//UserApi.md#getprofileimage) | **GET** /user/profile-image/{userId} |
*UserApi* | [**getUserCount**](doc//UserApi.md#getusercount) | **GET** /user/count |
*UserApi* | [**updateUser**](doc//UserApi.md#updateuser) | **PUT** /user |
## Documentation For Models
- [AddAssetsDto](doc//AddAssetsDto.md)
- [AddUsersDto](doc//AddUsersDto.md)
- [AdminSignupResponseDto](doc//AdminSignupResponseDto.md)
- [AlbumResponseDto](doc//AlbumResponseDto.md)
- [AssetFileUploadResponseDto](doc//AssetFileUploadResponseDto.md)
- [AssetResponseDto](doc//AssetResponseDto.md)
- [AssetTypeEnum](doc//AssetTypeEnum.md)
- [CheckDuplicateAssetDto](doc//CheckDuplicateAssetDto.md)
- [CheckDuplicateAssetResponseDto](doc//CheckDuplicateAssetResponseDto.md)
- [CreateAlbumDto](doc//CreateAlbumDto.md)
- [CreateDeviceInfoDto](doc//CreateDeviceInfoDto.md)
- [CreateProfileImageResponseDto](doc//CreateProfileImageResponseDto.md)
- [CreateUserDto](doc//CreateUserDto.md)
- [CuratedLocationsResponseDto](doc//CuratedLocationsResponseDto.md)
- [CuratedObjectsResponseDto](doc//CuratedObjectsResponseDto.md)
- [DeleteAssetDto](doc//DeleteAssetDto.md)
- [DeleteAssetResponseDto](doc//DeleteAssetResponseDto.md)
- [DeleteAssetStatus](doc//DeleteAssetStatus.md)
- [DeviceInfoResponseDto](doc//DeviceInfoResponseDto.md)
- [DeviceTypeEnum](doc//DeviceTypeEnum.md)
- [ExifResponseDto](doc//ExifResponseDto.md)
- [LoginCredentialDto](doc//LoginCredentialDto.md)
- [LoginResponseDto](doc//LoginResponseDto.md)
- [RemoveAssetsDto](doc//RemoveAssetsDto.md)
- [SearchAssetDto](doc//SearchAssetDto.md)
- [ServerInfoResponseDto](doc//ServerInfoResponseDto.md)
- [ServerPingResponse](doc//ServerPingResponse.md)
- [ServerVersionReponseDto](doc//ServerVersionReponseDto.md)
- [SignUpDto](doc//SignUpDto.md)
- [SmartInfoResponseDto](doc//SmartInfoResponseDto.md)
- [UpdateAlbumDto](doc//UpdateAlbumDto.md)
- [UpdateDeviceInfoDto](doc//UpdateDeviceInfoDto.md)
- [UpdateUserDto](doc//UpdateUserDto.md)
- [UserCountResponseDto](doc//UserCountResponseDto.md)
- [UserResponseDto](doc//UserResponseDto.md)
- [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md)
## Documentation For Authorization
## bearer
- **Type**: HTTP Bearer authentication
## Author

View File

View File

@ -0,0 +1,15 @@
# openapi.model.AddAssetsDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assetIds** | **List<String>** | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.AddUsersDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sharedUserIds** | **List<String>** | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,19 @@
# openapi.model.AdminSignupResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**email** | **String** | |
**firstName** | **String** | |
**lastName** | **String** | |
**createdAt** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,452 @@
# openapi.api.AlbumApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**addAssetsToAlbum**](AlbumApi.md#addassetstoalbum) | **PUT** /album/{albumId}/assets |
[**addUsersToAlbum**](AlbumApi.md#adduserstoalbum) | **PUT** /album/{albumId}/users |
[**createAlbum**](AlbumApi.md#createalbum) | **POST** /album |
[**deleteAlbum**](AlbumApi.md#deletealbum) | **DELETE** /album/{albumId} |
[**getAlbumInfo**](AlbumApi.md#getalbuminfo) | **GET** /album/{albumId} |
[**getAllAlbums**](AlbumApi.md#getallalbums) | **GET** /album |
[**removeAssetFromAlbum**](AlbumApi.md#removeassetfromalbum) | **DELETE** /album/{albumId}/assets |
[**removeUserFromAlbum**](AlbumApi.md#removeuserfromalbum) | **DELETE** /album/{albumId}/user/{userId} |
[**updateAlbumInfo**](AlbumApi.md#updatealbuminfo) | **PATCH** /album/{albumId} |
# **addAssetsToAlbum**
> AlbumResponseDto addAssetsToAlbum(albumId, addAssetsDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final addAssetsDto = AddAssetsDto(); // AddAssetsDto |
try {
final result = api_instance.addAssetsToAlbum(albumId, addAssetsDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addAssetsToAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
**addAssetsDto** | [**AddAssetsDto**](AddAssetsDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **addUsersToAlbum**
> AlbumResponseDto addUsersToAlbum(albumId, addUsersDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final addUsersDto = AddUsersDto(); // AddUsersDto |
try {
final result = api_instance.addUsersToAlbum(albumId, addUsersDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->addUsersToAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
**addUsersDto** | [**AddUsersDto**](AddUsersDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createAlbum**
> AlbumResponseDto createAlbum(createAlbumDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final createAlbumDto = CreateAlbumDto(); // CreateAlbumDto |
try {
final result = api_instance.createAlbum(createAlbumDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->createAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createAlbumDto** | [**CreateAlbumDto**](CreateAlbumDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deleteAlbum**
> deleteAlbum(albumId)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
try {
api_instance.deleteAlbum(albumId);
} catch (e) {
print('Exception when calling AlbumApi->deleteAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
### Return type
void (empty response body)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAlbumInfo**
> AlbumResponseDto getAlbumInfo(albumId)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
try {
final result = api_instance.getAlbumInfo(albumId);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAlbumInfo: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAllAlbums**
> List<AlbumResponseDto> getAllAlbums(shared)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final shared = true; // bool |
try {
final result = api_instance.getAllAlbums(shared);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->getAllAlbums: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**shared** | **bool**| | [optional]
### Return type
[**List<AlbumResponseDto>**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **removeAssetFromAlbum**
> removeAssetFromAlbum(albumId, removeAssetsDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final removeAssetsDto = RemoveAssetsDto(); // RemoveAssetsDto |
try {
api_instance.removeAssetFromAlbum(albumId, removeAssetsDto);
} catch (e) {
print('Exception when calling AlbumApi->removeAssetFromAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
**removeAssetsDto** | [**RemoveAssetsDto**](RemoveAssetsDto.md)| |
### Return type
void (empty response body)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **removeUserFromAlbum**
> removeUserFromAlbum(albumId, userId)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final userId = userId_example; // String |
try {
api_instance.removeUserFromAlbum(albumId, userId);
} catch (e) {
print('Exception when calling AlbumApi->removeUserFromAlbum: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
**userId** | **String**| |
### Return type
void (empty response body)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateAlbumInfo**
> AlbumResponseDto updateAlbumInfo(albumId, updateAlbumDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AlbumApi();
final albumId = albumId_example; // String |
final updateAlbumDto = UpdateAlbumDto(); // UpdateAlbumDto |
try {
final result = api_instance.updateAlbumInfo(albumId, updateAlbumDto);
print(result);
} catch (e) {
print('Exception when calling AlbumApi->updateAlbumInfo: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**albumId** | **String**| |
**updateAlbumDto** | [**UpdateAlbumDto**](UpdateAlbumDto.md)| |
### Return type
[**AlbumResponseDto**](AlbumResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,22 @@
# openapi.model.AlbumResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**ownerId** | **String** | |
**albumName** | **String** | |
**createdAt** | **String** | |
**albumThumbnailAssetId** | **String** | |
**shared** | **bool** | |
**sharedUsers** | [**List<UserResponseDto>**](UserResponseDto.md) | | [default to const []]
**assets** | [**List<AssetResponseDto>**](AssetResponseDto.md) | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,641 @@
# openapi.api.AssetApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**checkDuplicateAsset**](AssetApi.md#checkduplicateasset) | **POST** /asset/check |
[**deleteAsset**](AssetApi.md#deleteasset) | **DELETE** /asset |
[**downloadFile**](AssetApi.md#downloadfile) | **GET** /asset/download |
[**getAllAssets**](AssetApi.md#getallassets) | **GET** /asset |
[**getAssetById**](AssetApi.md#getassetbyid) | **GET** /asset/assetById/{assetId} |
[**getAssetSearchTerms**](AssetApi.md#getassetsearchterms) | **GET** /asset/searchTerm |
[**getAssetThumbnail**](AssetApi.md#getassetthumbnail) | **GET** /asset/thumbnail/{assetId} |
[**getCuratedLocations**](AssetApi.md#getcuratedlocations) | **GET** /asset/allLocation |
[**getCuratedObjects**](AssetApi.md#getcuratedobjects) | **GET** /asset/allObjects |
[**getUserAssetsByDeviceId**](AssetApi.md#getuserassetsbydeviceid) | **GET** /asset/{deviceId} |
[**searchAsset**](AssetApi.md#searchasset) | **POST** /asset/search |
[**serveFile**](AssetApi.md#servefile) | **GET** /asset/file |
[**uploadFile**](AssetApi.md#uploadfile) | **POST** /asset/upload |
# **checkDuplicateAsset**
> CheckDuplicateAssetResponseDto checkDuplicateAsset(checkDuplicateAssetDto)
Check duplicated asset before uploading - for Web upload used
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final checkDuplicateAssetDto = CheckDuplicateAssetDto(); // CheckDuplicateAssetDto |
try {
final result = api_instance.checkDuplicateAsset(checkDuplicateAssetDto);
print(result);
} catch (e) {
print('Exception when calling AssetApi->checkDuplicateAsset: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**checkDuplicateAssetDto** | [**CheckDuplicateAssetDto**](CheckDuplicateAssetDto.md)| |
### Return type
[**CheckDuplicateAssetResponseDto**](CheckDuplicateAssetResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **deleteAsset**
> List<DeleteAssetResponseDto> deleteAsset(deleteAssetDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final deleteAssetDto = DeleteAssetDto(); // DeleteAssetDto |
try {
final result = api_instance.deleteAsset(deleteAssetDto);
print(result);
} catch (e) {
print('Exception when calling AssetApi->deleteAsset: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deleteAssetDto** | [**DeleteAssetDto**](DeleteAssetDto.md)| |
### Return type
[**List<DeleteAssetResponseDto>**](DeleteAssetResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **downloadFile**
> Object downloadFile(aid, did, isThumb, isWeb)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final aid = aid_example; // String |
final did = did_example; // String |
final isThumb = true; // bool |
final isWeb = true; // bool |
try {
final result = api_instance.downloadFile(aid, did, isThumb, isWeb);
print(result);
} catch (e) {
print('Exception when calling AssetApi->downloadFile: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **String**| |
**did** | **String**| |
**isThumb** | **bool**| | [optional]
**isWeb** | **bool**| | [optional]
### Return type
[**Object**](Object.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAllAssets**
> List<AssetResponseDto> getAllAssets()
Get all AssetEntity belong to the user
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
try {
final result = api_instance.getAllAssets();
print(result);
} catch (e) {
print('Exception when calling AssetApi->getAllAssets: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<AssetResponseDto>**](AssetResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAssetById**
> AssetResponseDto getAssetById(assetId)
Get a single asset's information
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final assetId = assetId_example; // String |
try {
final result = api_instance.getAssetById(assetId);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getAssetById: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**assetId** | **String**| |
### Return type
[**AssetResponseDto**](AssetResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAssetSearchTerms**
> List<String> getAssetSearchTerms()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
try {
final result = api_instance.getAssetSearchTerms();
print(result);
} catch (e) {
print('Exception when calling AssetApi->getAssetSearchTerms: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**List<String>**
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAssetThumbnail**
> Object getAssetThumbnail(assetId)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final assetId = assetId_example; // String |
try {
final result = api_instance.getAssetThumbnail(assetId);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getAssetThumbnail: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**assetId** | **String**| |
### Return type
[**Object**](Object.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCuratedLocations**
> List<CuratedLocationsResponseDto> getCuratedLocations()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
try {
final result = api_instance.getCuratedLocations();
print(result);
} catch (e) {
print('Exception when calling AssetApi->getCuratedLocations: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<CuratedLocationsResponseDto>**](CuratedLocationsResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getCuratedObjects**
> List<CuratedObjectsResponseDto> getCuratedObjects()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
try {
final result = api_instance.getCuratedObjects();
print(result);
} catch (e) {
print('Exception when calling AssetApi->getCuratedObjects: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**List<CuratedObjectsResponseDto>**](CuratedObjectsResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getUserAssetsByDeviceId**
> List<String> getUserAssetsByDeviceId(deviceId)
Get all asset of a device that are in the database, ID only.
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final deviceId = deviceId_example; // String |
try {
final result = api_instance.getUserAssetsByDeviceId(deviceId);
print(result);
} catch (e) {
print('Exception when calling AssetApi->getUserAssetsByDeviceId: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**deviceId** | **String**| |
### Return type
**List<String>**
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **searchAsset**
> List<AssetResponseDto> searchAsset(searchAssetDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final searchAssetDto = SearchAssetDto(); // SearchAssetDto |
try {
final result = api_instance.searchAsset(searchAssetDto);
print(result);
} catch (e) {
print('Exception when calling AssetApi->searchAsset: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**searchAssetDto** | [**SearchAssetDto**](SearchAssetDto.md)| |
### Return type
[**List<AssetResponseDto>**](AssetResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **serveFile**
> Object serveFile(aid, did, isThumb, isWeb)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final aid = aid_example; // String |
final did = did_example; // String |
final isThumb = true; // bool |
final isWeb = true; // bool |
try {
final result = api_instance.serveFile(aid, did, isThumb, isWeb);
print(result);
} catch (e) {
print('Exception when calling AssetApi->serveFile: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **String**| |
**did** | **String**| |
**isThumb** | **bool**| | [optional]
**isWeb** | **bool**| | [optional]
### Return type
[**Object**](Object.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **uploadFile**
> AssetFileUploadResponseDto uploadFile(assetData)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AssetApi();
final assetData = BINARY_DATA_HERE; // MultipartFile |
try {
final result = api_instance.uploadFile(assetData);
print(result);
} catch (e) {
print('Exception when calling AssetApi->uploadFile: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**assetData** | **MultipartFile**| |
### Return type
[**AssetFileUploadResponseDto**](AssetFileUploadResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.AssetFileUploadResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,30 @@
# openapi.model.AssetResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | [**AssetTypeEnum**](AssetTypeEnum.md) | |
**id** | **String** | |
**deviceAssetId** | **String** | |
**ownerId** | **String** | |
**deviceId** | **String** | |
**originalPath** | **String** | |
**resizePath** | **String** | |
**createdAt** | **String** | |
**modifiedAt** | **String** | |
**isFavorite** | **bool** | |
**mimeType** | **String** | |
**duration** | **String** | |
**webpPath** | **String** | |
**encodedVideoPath** | **String** | |
**exifInfo** | [**ExifResponseDto**](ExifResponseDto.md) | | [optional]
**smartInfo** | [**SmartInfoResponseDto**](SmartInfoResponseDto.md) | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# openapi.model.AssetTypeEnum
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,141 @@
# openapi.api.AuthenticationApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**adminSignUp**](AuthenticationApi.md#adminsignup) | **POST** /auth/admin-sign-up |
[**login**](AuthenticationApi.md#login) | **POST** /auth/login |
[**validateAccessToken**](AuthenticationApi.md#validateaccesstoken) | **POST** /auth/validateToken |
# **adminSignUp**
> AdminSignupResponseDto adminSignUp(signUpDto)
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = AuthenticationApi();
final signUpDto = SignUpDto(); // SignUpDto |
try {
final result = api_instance.adminSignUp(signUpDto);
print(result);
} catch (e) {
print('Exception when calling AuthenticationApi->adminSignUp: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**signUpDto** | [**SignUpDto**](SignUpDto.md)| |
### Return type
[**AdminSignupResponseDto**](AdminSignupResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **login**
> LoginResponseDto login(loginCredentialDto)
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = AuthenticationApi();
final loginCredentialDto = LoginCredentialDto(); // LoginCredentialDto |
try {
final result = api_instance.login(loginCredentialDto);
print(result);
} catch (e) {
print('Exception when calling AuthenticationApi->login: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**loginCredentialDto** | [**LoginCredentialDto**](LoginCredentialDto.md)| |
### Return type
[**LoginResponseDto**](LoginResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **validateAccessToken**
> ValidateAccessTokenResponseDto validateAccessToken()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = AuthenticationApi();
try {
final result = api_instance.validateAccessToken();
print(result);
} catch (e) {
print('Exception when calling AuthenticationApi->validateAccessToken: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ValidateAccessTokenResponseDto**](ValidateAccessTokenResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# openapi.model.CheckDuplicateAssetDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deviceAssetId** | **String** | |
**deviceId** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.CheckDuplicateAssetResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**isExist** | **bool** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# openapi.model.CreateAlbumDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**albumName** | **String** | |
**sharedWithUserIds** | **List<String>** | | [optional] [default to const []]
**assetIds** | **List<String>** | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# openapi.model.CreateDeviceInfoDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deviceType** | [**DeviceTypeEnum**](DeviceTypeEnum.md) | |
**deviceId** | **String** | |
**isAutoBackup** | **bool** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# openapi.model.CreateProfileImageResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**userId** | **String** | |
**profileImagePath** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,18 @@
# openapi.model.CreateUserDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | |
**password** | **String** | |
**firstName** | **String** | |
**lastName** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,19 @@
# openapi.model.CuratedLocationsResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**city** | **String** | |
**resizePath** | **String** | |
**deviceAssetId** | **String** | |
**deviceId** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,19 @@
# openapi.model.CuratedObjectsResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**object** | **String** | |
**resizePath** | **String** | |
**deviceAssetId** | **String** | |
**deviceId** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.DeleteAssetDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**ids** | **List<String>** | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# openapi.model.DeleteAssetResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**status** | [**DeleteAssetStatus**](DeleteAssetStatus.md) | |
**id** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# openapi.model.DeleteAssetStatus
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,109 @@
# openapi.api.DeviceInfoApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createDeviceInfo**](DeviceInfoApi.md#createdeviceinfo) | **POST** /device-info |
[**updateDeviceInfo**](DeviceInfoApi.md#updatedeviceinfo) | **PATCH** /device-info |
# **createDeviceInfo**
> DeviceInfoResponseDto createDeviceInfo(createDeviceInfoDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = DeviceInfoApi();
final createDeviceInfoDto = CreateDeviceInfoDto(); // CreateDeviceInfoDto |
try {
final result = api_instance.createDeviceInfo(createDeviceInfoDto);
print(result);
} catch (e) {
print('Exception when calling DeviceInfoApi->createDeviceInfo: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createDeviceInfoDto** | [**CreateDeviceInfoDto**](CreateDeviceInfoDto.md)| |
### Return type
[**DeviceInfoResponseDto**](DeviceInfoResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateDeviceInfo**
> DeviceInfoResponseDto updateDeviceInfo(updateDeviceInfoDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = DeviceInfoApi();
final updateDeviceInfoDto = UpdateDeviceInfoDto(); // UpdateDeviceInfoDto |
try {
final result = api_instance.updateDeviceInfo(updateDeviceInfoDto);
print(result);
} catch (e) {
print('Exception when calling DeviceInfoApi->updateDeviceInfo: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**updateDeviceInfoDto** | [**UpdateDeviceInfoDto**](UpdateDeviceInfoDto.md)| |
### Return type
[**DeviceInfoResponseDto**](DeviceInfoResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,20 @@
# openapi.model.DeviceInfoResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | |
**deviceType** | [**DeviceTypeEnum**](DeviceTypeEnum.md) | |
**userId** | **String** | |
**deviceId** | **String** | |
**createdAt** | **String** | |
**isAutoBackup** | **bool** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,14 @@
# openapi.model.DeviceTypeEnum
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,34 @@
# openapi.model.ExifResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**make** | **String** | | [optional]
**model** | **String** | | [optional]
**imageName** | **String** | | [optional]
**exifImageWidth** | **num** | | [optional]
**exifImageHeight** | **num** | | [optional]
**fileSizeInByte** | **num** | | [optional]
**orientation** | **String** | | [optional]
**dateTimeOriginal** | [**DateTime**](DateTime.md) | | [optional]
**modifyDate** | [**DateTime**](DateTime.md) | | [optional]
**lensModel** | **String** | | [optional]
**fNumber** | **num** | | [optional]
**focalLength** | **num** | | [optional]
**iso** | **num** | | [optional]
**exposureTime** | **num** | | [optional]
**latitude** | **num** | | [optional]
**longitude** | **num** | | [optional]
**city** | **String** | | [optional]
**state** | **String** | | [optional]
**country** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# openapi.model.LoginCredentialDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | |
**password** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,22 @@
# openapi.model.LoginResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accessToken** | **String** | | [readonly]
**userId** | **String** | | [readonly]
**userEmail** | **String** | | [readonly]
**firstName** | **String** | | [readonly]
**lastName** | **String** | | [readonly]
**profileImagePath** | **String** | | [readonly]
**isAdmin** | **bool** | | [readonly]
**shouldChangePassword** | **bool** | | [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.RemoveAssetsDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assetIds** | **List<String>** | | [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.SearchAssetDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**searchTerm** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,127 @@
# openapi.api.ServerInfoApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getServerInfo**](ServerInfoApi.md#getserverinfo) | **GET** /server-info |
[**getServerVersion**](ServerInfoApi.md#getserverversion) | **GET** /server-info/version |
[**pingServer**](ServerInfoApi.md#pingserver) | **GET** /server-info/ping |
# **getServerInfo**
> ServerInfoResponseDto getServerInfo()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = ServerInfoApi();
try {
final result = api_instance.getServerInfo();
print(result);
} catch (e) {
print('Exception when calling ServerInfoApi->getServerInfo: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ServerInfoResponseDto**](ServerInfoResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getServerVersion**
> ServerVersionReponseDto getServerVersion()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = ServerInfoApi();
try {
final result = api_instance.getServerVersion();
print(result);
} catch (e) {
print('Exception when calling ServerInfoApi->getServerVersion: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ServerVersionReponseDto**](ServerVersionReponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **pingServer**
> ServerPingResponse pingServer()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = ServerInfoApi();
try {
final result = api_instance.pingServer();
print(result);
} catch (e) {
print('Exception when calling ServerInfoApi->pingServer: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**ServerPingResponse**](ServerPingResponse.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,21 @@
# openapi.model.ServerInfoResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**diskSizeRaw** | **int** | |
**diskUseRaw** | **int** | |
**diskAvailableRaw** | **int** | |
**diskUsagePercentage** | **double** | |
**diskSize** | **String** | |
**diskUse** | **String** | |
**diskAvailable** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.ServerPingResponse
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**res** | **String** | | [readonly]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,18 @@
# openapi.model.ServerVersionReponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**major** | **int** | |
**minor** | **int** | |
**patch_** | **int** | |
**build** | **int** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,18 @@
# openapi.model.SignUpDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**email** | **String** | |
**password** | **String** | |
**firstName** | **String** | |
**lastName** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# openapi.model.SmartInfoResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | | [optional]
**tags** | **List<String>** | | [optional] [default to const []]
**objects** | **List<String>** | | [optional] [default to const []]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,16 @@
# openapi.model.UpdateAlbumDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**albumName** | **String** | |
**ownerId** | **String** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,17 @@
# openapi.model.UpdateDeviceInfoDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**deviceType** | [**DeviceTypeEnum**](DeviceTypeEnum.md) | |
**deviceId** | **String** | |
**isAutoBackup** | **bool** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,21 @@
# openapi.model.UpdateUserDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**password** | **String** | | [optional]
**firstName** | **String** | | [optional]
**lastName** | **String** | | [optional]
**isAdmin** | **bool** | | [optional]
**shouldChangePassword** | **bool** | | [optional]
**profileImagePath** | **String** | | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,329 @@
# openapi.api.UserApi
## Load the API package
```dart
import 'package:openapi/api.dart';
```
All URIs are relative to */api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**createProfileImage**](UserApi.md#createprofileimage) | **POST** /user/profile-image |
[**createUser**](UserApi.md#createuser) | **POST** /user |
[**getAllUsers**](UserApi.md#getallusers) | **GET** /user |
[**getMyUserInfo**](UserApi.md#getmyuserinfo) | **GET** /user/me |
[**getProfileImage**](UserApi.md#getprofileimage) | **GET** /user/profile-image/{userId} |
[**getUserCount**](UserApi.md#getusercount) | **GET** /user/count |
[**updateUser**](UserApi.md#updateuser) | **PUT** /user |
# **createProfileImage**
> CreateProfileImageResponseDto createProfileImage(file)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
final file = BINARY_DATA_HERE; // MultipartFile |
try {
final result = api_instance.createProfileImage(file);
print(result);
} catch (e) {
print('Exception when calling UserApi->createProfileImage: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**file** | **MultipartFile**| |
### Return type
[**CreateProfileImageResponseDto**](CreateProfileImageResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **createUser**
> UserResponseDto createUser(createUserDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
final createUserDto = CreateUserDto(); // CreateUserDto |
try {
final result = api_instance.createUser(createUserDto);
print(result);
} catch (e) {
print('Exception when calling UserApi->createUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**createUserDto** | [**CreateUserDto**](CreateUserDto.md)| |
### Return type
[**UserResponseDto**](UserResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getAllUsers**
> List<UserResponseDto> getAllUsers(isAll)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
final isAll = true; // bool |
try {
final result = api_instance.getAllUsers(isAll);
print(result);
} catch (e) {
print('Exception when calling UserApi->getAllUsers: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**isAll** | **bool**| |
### Return type
[**List<UserResponseDto>**](UserResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getMyUserInfo**
> UserResponseDto getMyUserInfo()
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
try {
final result = api_instance.getMyUserInfo();
print(result);
} catch (e) {
print('Exception when calling UserApi->getMyUserInfo: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**UserResponseDto**](UserResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getProfileImage**
> Object getProfileImage(userId)
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = UserApi();
final userId = userId_example; // String |
try {
final result = api_instance.getProfileImage(userId);
print(result);
} catch (e) {
print('Exception when calling UserApi->getProfileImage: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**userId** | **String**| |
### Return type
[**Object**](Object.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **getUserCount**
> UserCountResponseDto getUserCount()
### Example
```dart
import 'package:openapi/api.dart';
final api_instance = UserApi();
try {
final result = api_instance.getUserCount();
print(result);
} catch (e) {
print('Exception when calling UserApi->getUserCount: $e\n');
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**UserCountResponseDto**](UserCountResponseDto.md)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **updateUser**
> UserResponseDto updateUser(updateUserDto)
### Example
```dart
import 'package:openapi/api.dart';
// TODO Configure HTTP Bearer authorization: bearer
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearer').setAccessToken(yourTokenGeneratorFunction);
final api_instance = UserApi();
final updateUserDto = UpdateUserDto(); // UpdateUserDto |
try {
final result = api_instance.updateUser(updateUserDto);
print(result);
} catch (e) {
print('Exception when calling UserApi->updateUser: $e\n');
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**updateUserDto** | [**UpdateUserDto**](UpdateUserDto.md)| |
### Return type
[**UserResponseDto**](UserResponseDto.md)
### Authorization
[bearer](../README.md#bearer)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.UserCountResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**userCount** | **int** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,22 @@
# openapi.model.UserResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **String** | |
**email** | **String** | |
**firstName** | **String** | |
**lastName** | **String** | |
**createdAt** | **String** | |
**profileImagePath** | **String** | |
**shouldChangePassword** | **bool** | |
**isAdmin** | **bool** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,15 @@
# openapi.model.ValidateAccessTokenResponseDto
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**authStatus** | **bool** | |
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

View File

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

@ -0,0 +1,82 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
library openapi.api;
import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
part 'api_client.dart';
part 'api_helper.dart';
part 'api_exception.dart';
part 'auth/authentication.dart';
part 'auth/api_key_auth.dart';
part 'auth/oauth.dart';
part 'auth/http_basic_auth.dart';
part 'auth/http_bearer_auth.dart';
part 'api/album_api.dart';
part 'api/asset_api.dart';
part 'api/authentication_api.dart';
part 'api/device_info_api.dart';
part 'api/server_info_api.dart';
part 'api/user_api.dart';
part 'model/add_assets_dto.dart';
part 'model/add_users_dto.dart';
part 'model/admin_signup_response_dto.dart';
part 'model/album_response_dto.dart';
part 'model/asset_file_upload_response_dto.dart';
part 'model/asset_response_dto.dart';
part 'model/asset_type_enum.dart';
part 'model/check_duplicate_asset_dto.dart';
part 'model/check_duplicate_asset_response_dto.dart';
part 'model/create_album_dto.dart';
part 'model/create_device_info_dto.dart';
part 'model/create_profile_image_response_dto.dart';
part 'model/create_user_dto.dart';
part 'model/curated_locations_response_dto.dart';
part 'model/curated_objects_response_dto.dart';
part 'model/delete_asset_dto.dart';
part 'model/delete_asset_response_dto.dart';
part 'model/delete_asset_status.dart';
part 'model/device_info_response_dto.dart';
part 'model/device_type_enum.dart';
part 'model/exif_response_dto.dart';
part 'model/login_credential_dto.dart';
part 'model/login_response_dto.dart';
part 'model/remove_assets_dto.dart';
part 'model/search_asset_dto.dart';
part 'model/server_info_response_dto.dart';
part 'model/server_ping_response.dart';
part 'model/server_version_reponse_dto.dart';
part 'model/sign_up_dto.dart';
part 'model/smart_info_response_dto.dart';
part 'model/update_album_dto.dart';
part 'model/update_device_info_dto.dart';
part 'model/update_user_dto.dart';
part 'model/user_count_response_dto.dart';
part 'model/user_response_dto.dart';
part 'model/validate_access_token_response_dto.dart';
const _delimiters = {'csv': ',', 'ssv': ' ', 'tsv': '\t', 'pipes': '|'};
const _dateEpochMarker = 'epoch';
final _dateFormatter = DateFormat('yyyy-MM-dd');
final _regList = RegExp(r'^List<(.*)>$');
final _regSet = RegExp(r'^Set<(.*)>$');
final _regMap = RegExp(r'^Map<String,(.*)>$');
ApiClient defaultApiClient = ApiClient();

View File

@ -0,0 +1,452 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlbumApi {
AlbumApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'PUT /album/{albumId}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [AddAssetsDto] addAssetsDto (required):
Future<Response> addAssetsToAlbumWithHttpInfo(String albumId, AddAssetsDto addAssetsDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}/assets'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody = addAssetsDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [AddAssetsDto] addAssetsDto (required):
Future<AlbumResponseDto?> addAssetsToAlbum(String albumId, AddAssetsDto addAssetsDto,) async {
final response = await addAssetsToAlbumWithHttpInfo(albumId, addAssetsDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
}
return null;
}
/// Performs an HTTP 'PUT /album/{albumId}/users' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [AddUsersDto] addUsersDto (required):
Future<Response> addUsersToAlbumWithHttpInfo(String albumId, AddUsersDto addUsersDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}/users'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody = addUsersDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [AddUsersDto] addUsersDto (required):
Future<AlbumResponseDto?> addUsersToAlbum(String albumId, AddUsersDto addUsersDto,) async {
final response = await addUsersToAlbumWithHttpInfo(albumId, addUsersDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /album' operation and returns the [Response].
/// Parameters:
///
/// * [CreateAlbumDto] createAlbumDto (required):
Future<Response> createAlbumWithHttpInfo(CreateAlbumDto createAlbumDto,) async {
// ignore: prefer_const_declarations
final path = r'/album';
// ignore: prefer_final_locals
Object? postBody = createAlbumDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [CreateAlbumDto] createAlbumDto (required):
Future<AlbumResponseDto?> createAlbum(CreateAlbumDto createAlbumDto,) async {
final response = await createAlbumWithHttpInfo(createAlbumDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
}
return null;
}
/// Performs an HTTP 'DELETE /album/{albumId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
Future<Response> deleteAlbumWithHttpInfo(String albumId,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
Future<void> deleteAlbum(String albumId,) async {
final response = await deleteAlbumWithHttpInfo(albumId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'GET /album/{albumId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
Future<Response> getAlbumInfoWithHttpInfo(String albumId,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
Future<AlbumResponseDto?> getAlbumInfo(String albumId,) async {
final response = await getAlbumInfoWithHttpInfo(albumId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /album' operation and returns the [Response].
/// Parameters:
///
/// * [bool] shared:
Future<Response> getAllAlbumsWithHttpInfo({ bool? shared, }) async {
// ignore: prefer_const_declarations
final path = r'/album';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
if (shared != null) {
queryParams.addAll(_queryParams('', 'shared', shared));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [bool] shared:
Future<List<AlbumResponseDto>?> getAllAlbums({ bool? shared, }) async {
final response = await getAllAlbumsWithHttpInfo( shared: shared, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<AlbumResponseDto>') as List)
.cast<AlbumResponseDto>()
.toList();
}
return null;
}
/// Performs an HTTP 'DELETE /album/{albumId}/assets' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [RemoveAssetsDto] removeAssetsDto (required):
Future<Response> removeAssetFromAlbumWithHttpInfo(String albumId, RemoveAssetsDto removeAssetsDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}/assets'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody = removeAssetsDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [RemoveAssetsDto] removeAssetsDto (required):
Future<void> removeAssetFromAlbum(String albumId, RemoveAssetsDto removeAssetsDto,) async {
final response = await removeAssetFromAlbumWithHttpInfo(albumId, removeAssetsDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'DELETE /album/{albumId}/user/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [String] userId (required):
Future<Response> removeUserFromAlbumWithHttpInfo(String albumId, String userId,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}/user/{userId}'
.replaceAll('{albumId}', albumId)
.replaceAll('{userId}', userId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [String] userId (required):
Future<void> removeUserFromAlbum(String albumId, String userId,) async {
final response = await removeUserFromAlbumWithHttpInfo(albumId, userId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
}
/// Performs an HTTP 'PATCH /album/{albumId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [UpdateAlbumDto] updateAlbumDto (required):
Future<Response> updateAlbumInfoWithHttpInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
// ignore: prefer_const_declarations
final path = r'/album/{albumId}'
.replaceAll('{albumId}', albumId);
// ignore: prefer_final_locals
Object? postBody = updateAlbumDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] albumId (required):
///
/// * [UpdateAlbumDto] updateAlbumDto (required):
Future<AlbumResponseDto?> updateAlbumInfo(String albumId, UpdateAlbumDto updateAlbumDto,) async {
final response = await updateAlbumInfoWithHttpInfo(albumId, updateAlbumDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AlbumResponseDto',) as AlbumResponseDto;
}
return null;
}
}

View File

@ -0,0 +1,715 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetApi {
AssetApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
///
///
/// Check duplicated asset before uploading - for Web upload used
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [CheckDuplicateAssetDto] checkDuplicateAssetDto (required):
Future<Response> checkDuplicateAssetWithHttpInfo(CheckDuplicateAssetDto checkDuplicateAssetDto,) async {
// ignore: prefer_const_declarations
final path = r'/asset/check';
// ignore: prefer_final_locals
Object? postBody = checkDuplicateAssetDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
///
///
/// Check duplicated asset before uploading - for Web upload used
///
/// Parameters:
///
/// * [CheckDuplicateAssetDto] checkDuplicateAssetDto (required):
Future<CheckDuplicateAssetResponseDto?> checkDuplicateAsset(CheckDuplicateAssetDto checkDuplicateAssetDto,) async {
final response = await checkDuplicateAssetWithHttpInfo(checkDuplicateAssetDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CheckDuplicateAssetResponseDto',) as CheckDuplicateAssetResponseDto;
}
return null;
}
/// Performs an HTTP 'DELETE /asset' operation and returns the [Response].
/// Parameters:
///
/// * [DeleteAssetDto] deleteAssetDto (required):
Future<Response> deleteAssetWithHttpInfo(DeleteAssetDto deleteAssetDto,) async {
// ignore: prefer_const_declarations
final path = r'/asset';
// ignore: prefer_final_locals
Object? postBody = deleteAssetDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'DELETE',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [DeleteAssetDto] deleteAssetDto (required):
Future<List<DeleteAssetResponseDto>?> deleteAsset(DeleteAssetDto deleteAssetDto,) async {
final response = await deleteAssetWithHttpInfo(deleteAssetDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<DeleteAssetResponseDto>') as List)
.cast<DeleteAssetResponseDto>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /asset/download' operation and returns the [Response].
/// Parameters:
///
/// * [String] aid (required):
///
/// * [String] did (required):
///
/// * [bool] isThumb:
///
/// * [bool] isWeb:
Future<Response> downloadFileWithHttpInfo(String aid, String did, { bool? isThumb, bool? isWeb, }) async {
// ignore: prefer_const_declarations
final path = r'/asset/download';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'aid', aid));
queryParams.addAll(_queryParams('', 'did', did));
if (isThumb != null) {
queryParams.addAll(_queryParams('', 'isThumb', isThumb));
}
if (isWeb != null) {
queryParams.addAll(_queryParams('', 'isWeb', isWeb));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] aid (required):
///
/// * [String] did (required):
///
/// * [bool] isThumb:
///
/// * [bool] isWeb:
Future<Object?> downloadFile(String aid, String did, { bool? isThumb, bool? isWeb, }) async {
final response = await downloadFileWithHttpInfo(aid, did, isThumb: isThumb, isWeb: isWeb, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
}
return null;
}
///
///
/// Get all AssetEntity belong to the user
///
/// Note: This method returns the HTTP [Response].
Future<Response> getAllAssetsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/asset';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
///
///
/// Get all AssetEntity belong to the user
Future<List<AssetResponseDto>?> getAllAssets() async {
final response = await getAllAssetsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<AssetResponseDto>') as List)
.cast<AssetResponseDto>()
.toList();
}
return null;
}
///
///
/// Get a single asset's information
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] assetId (required):
Future<Response> getAssetByIdWithHttpInfo(String assetId,) async {
// ignore: prefer_const_declarations
final path = r'/asset/assetById/{assetId}'
.replaceAll('{assetId}', assetId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
///
///
/// Get a single asset's information
///
/// Parameters:
///
/// * [String] assetId (required):
Future<AssetResponseDto?> getAssetById(String assetId,) async {
final response = await getAssetByIdWithHttpInfo(assetId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetResponseDto',) as AssetResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /asset/searchTerm' operation and returns the [Response].
Future<Response> getAssetSearchTermsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/asset/searchTerm';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<String>?> getAssetSearchTerms() async {
final response = await getAssetSearchTermsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<String>') as List)
.cast<String>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /asset/thumbnail/{assetId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] assetId (required):
Future<Response> getAssetThumbnailWithHttpInfo(String assetId,) async {
// ignore: prefer_const_declarations
final path = r'/asset/thumbnail/{assetId}'
.replaceAll('{assetId}', assetId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] assetId (required):
Future<Object?> getAssetThumbnail(String assetId,) async {
final response = await getAssetThumbnailWithHttpInfo(assetId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
}
return null;
}
/// Performs an HTTP 'GET /asset/allLocation' operation and returns the [Response].
Future<Response> getCuratedLocationsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/asset/allLocation';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<CuratedLocationsResponseDto>?> getCuratedLocations() async {
final response = await getCuratedLocationsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<CuratedLocationsResponseDto>') as List)
.cast<CuratedLocationsResponseDto>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /asset/allObjects' operation and returns the [Response].
Future<Response> getCuratedObjectsWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/asset/allObjects';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<List<CuratedObjectsResponseDto>?> getCuratedObjects() async {
final response = await getCuratedObjectsWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<CuratedObjectsResponseDto>') as List)
.cast<CuratedObjectsResponseDto>()
.toList();
}
return null;
}
///
///
/// Get all asset of a device that are in the database, ID only.
///
/// Note: This method returns the HTTP [Response].
///
/// Parameters:
///
/// * [String] deviceId (required):
Future<Response> getUserAssetsByDeviceIdWithHttpInfo(String deviceId,) async {
// ignore: prefer_const_declarations
final path = r'/asset/{deviceId}'
.replaceAll('{deviceId}', deviceId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
///
///
/// Get all asset of a device that are in the database, ID only.
///
/// Parameters:
///
/// * [String] deviceId (required):
Future<List<String>?> getUserAssetsByDeviceId(String deviceId,) async {
final response = await getUserAssetsByDeviceIdWithHttpInfo(deviceId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<String>') as List)
.cast<String>()
.toList();
}
return null;
}
/// Performs an HTTP 'POST /asset/search' operation and returns the [Response].
/// Parameters:
///
/// * [SearchAssetDto] searchAssetDto (required):
Future<Response> searchAssetWithHttpInfo(SearchAssetDto searchAssetDto,) async {
// ignore: prefer_const_declarations
final path = r'/asset/search';
// ignore: prefer_final_locals
Object? postBody = searchAssetDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [SearchAssetDto] searchAssetDto (required):
Future<List<AssetResponseDto>?> searchAsset(SearchAssetDto searchAssetDto,) async {
final response = await searchAssetWithHttpInfo(searchAssetDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<AssetResponseDto>') as List)
.cast<AssetResponseDto>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /asset/file' operation and returns the [Response].
/// Parameters:
///
/// * [String] aid (required):
///
/// * [String] did (required):
///
/// * [bool] isThumb:
///
/// * [bool] isWeb:
Future<Response> serveFileWithHttpInfo(String aid, String did, { bool? isThumb, bool? isWeb, }) async {
// ignore: prefer_const_declarations
final path = r'/asset/file';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'aid', aid));
queryParams.addAll(_queryParams('', 'did', did));
if (isThumb != null) {
queryParams.addAll(_queryParams('', 'isThumb', isThumb));
}
if (isWeb != null) {
queryParams.addAll(_queryParams('', 'isWeb', isWeb));
}
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] aid (required):
///
/// * [String] did (required):
///
/// * [bool] isThumb:
///
/// * [bool] isWeb:
Future<Object?> serveFile(String aid, String did, { bool? isThumb, bool? isWeb, }) async {
final response = await serveFileWithHttpInfo(aid, did, isThumb: isThumb, isWeb: isWeb, );
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
}
return null;
}
/// Performs an HTTP 'POST /asset/upload' operation and returns the [Response].
/// Parameters:
///
/// * [MultipartFile] assetData (required):
Future<Response> uploadFileWithHttpInfo(MultipartFile assetData,) async {
// ignore: prefer_const_declarations
final path = r'/asset/upload';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['multipart/form-data'];
bool hasFields = false;
final mp = MultipartRequest('POST', Uri.parse(path));
if (assetData != null) {
hasFields = true;
mp.fields[r'assetData'] = assetData.field;
mp.files.add(assetData);
}
if (hasFields) {
postBody = mp;
}
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [MultipartFile] assetData (required):
Future<AssetFileUploadResponseDto?> uploadFile(MultipartFile assetData,) async {
final response = await uploadFileWithHttpInfo(assetData,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetFileUploadResponseDto',) as AssetFileUploadResponseDto;
}
return null;
}
}

View File

@ -0,0 +1,153 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AuthenticationApi {
AuthenticationApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /auth/admin-sign-up' operation and returns the [Response].
/// Parameters:
///
/// * [SignUpDto] signUpDto (required):
Future<Response> adminSignUpWithHttpInfo(SignUpDto signUpDto,) async {
// ignore: prefer_const_declarations
final path = r'/auth/admin-sign-up';
// ignore: prefer_final_locals
Object? postBody = signUpDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [SignUpDto] signUpDto (required):
Future<AdminSignupResponseDto?> adminSignUp(SignUpDto signUpDto,) async {
final response = await adminSignUpWithHttpInfo(signUpDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AdminSignupResponseDto',) as AdminSignupResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /auth/login' operation and returns the [Response].
/// Parameters:
///
/// * [LoginCredentialDto] loginCredentialDto (required):
Future<Response> loginWithHttpInfo(LoginCredentialDto loginCredentialDto,) async {
// ignore: prefer_const_declarations
final path = r'/auth/login';
// ignore: prefer_final_locals
Object? postBody = loginCredentialDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [LoginCredentialDto] loginCredentialDto (required):
Future<LoginResponseDto?> login(LoginCredentialDto loginCredentialDto,) async {
final response = await loginWithHttpInfo(loginCredentialDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'LoginResponseDto',) as LoginResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /auth/validateToken' operation and returns the [Response].
Future<Response> validateAccessTokenWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/auth/validateToken';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<ValidateAccessTokenResponseDto?> validateAccessToken() async {
final response = await validateAccessTokenWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ValidateAccessTokenResponseDto',) as ValidateAccessTokenResponseDto;
}
return null;
}
}

View File

@ -0,0 +1,112 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeviceInfoApi {
DeviceInfoApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /device-info' operation and returns the [Response].
/// Parameters:
///
/// * [CreateDeviceInfoDto] createDeviceInfoDto (required):
Future<Response> createDeviceInfoWithHttpInfo(CreateDeviceInfoDto createDeviceInfoDto,) async {
// ignore: prefer_const_declarations
final path = r'/device-info';
// ignore: prefer_final_locals
Object? postBody = createDeviceInfoDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [CreateDeviceInfoDto] createDeviceInfoDto (required):
Future<DeviceInfoResponseDto?> createDeviceInfo(CreateDeviceInfoDto createDeviceInfoDto,) async {
final response = await createDeviceInfoWithHttpInfo(createDeviceInfoDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceInfoResponseDto',) as DeviceInfoResponseDto;
}
return null;
}
/// Performs an HTTP 'PATCH /device-info' operation and returns the [Response].
/// Parameters:
///
/// * [UpdateDeviceInfoDto] updateDeviceInfoDto (required):
Future<Response> updateDeviceInfoWithHttpInfo(UpdateDeviceInfoDto updateDeviceInfoDto,) async {
// ignore: prefer_const_declarations
final path = r'/device-info';
// ignore: prefer_final_locals
Object? postBody = updateDeviceInfoDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PATCH',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [UpdateDeviceInfoDto] updateDeviceInfoDto (required):
Future<DeviceInfoResponseDto?> updateDeviceInfo(UpdateDeviceInfoDto updateDeviceInfoDto,) async {
final response = await updateDeviceInfoWithHttpInfo(updateDeviceInfoDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'DeviceInfoResponseDto',) as DeviceInfoResponseDto;
}
return null;
}
}

View File

@ -0,0 +1,141 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ServerInfoApi {
ServerInfoApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'GET /server-info' operation and returns the [Response].
Future<Response> getServerInfoWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<ServerInfoResponseDto?> getServerInfo() async {
final response = await getServerInfoWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerInfoResponseDto',) as ServerInfoResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /server-info/version' operation and returns the [Response].
Future<Response> getServerVersionWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info/version';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<ServerVersionReponseDto?> getServerVersion() async {
final response = await getServerVersionWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerVersionReponseDto',) as ServerVersionReponseDto;
}
return null;
}
/// Performs an HTTP 'GET /server-info/ping' operation and returns the [Response].
Future<Response> pingServerWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/server-info/ping';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<ServerPingResponse?> pingServer() async {
final response = await pingServerWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'ServerPingResponse',) as ServerPingResponse;
}
return null;
}
}

View File

@ -0,0 +1,351 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UserApi {
UserApi([ApiClient? apiClient]) : apiClient = apiClient ?? defaultApiClient;
final ApiClient apiClient;
/// Performs an HTTP 'POST /user/profile-image' operation and returns the [Response].
/// Parameters:
///
/// * [MultipartFile] file (required):
Future<Response> createProfileImageWithHttpInfo(MultipartFile file,) async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['multipart/form-data'];
bool hasFields = false;
final mp = MultipartRequest('POST', Uri.parse(path));
if (file != null) {
hasFields = true;
mp.fields[r'file'] = file.field;
mp.files.add(file);
}
if (hasFields) {
postBody = mp;
}
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [MultipartFile] file (required):
Future<CreateProfileImageResponseDto?> createProfileImage(MultipartFile file,) async {
final response = await createProfileImageWithHttpInfo(file,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'CreateProfileImageResponseDto',) as CreateProfileImageResponseDto;
}
return null;
}
/// Performs an HTTP 'POST /user' operation and returns the [Response].
/// Parameters:
///
/// * [CreateUserDto] createUserDto (required):
Future<Response> createUserWithHttpInfo(CreateUserDto createUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user';
// ignore: prefer_final_locals
Object? postBody = createUserDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'POST',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [CreateUserDto] createUserDto (required):
Future<UserResponseDto?> createUser(CreateUserDto createUserDto,) async {
final response = await createUserWithHttpInfo(createUserDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserResponseDto',) as UserResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /user' operation and returns the [Response].
/// Parameters:
///
/// * [bool] isAll (required):
Future<Response> getAllUsersWithHttpInfo(bool isAll,) async {
// ignore: prefer_const_declarations
final path = r'/user';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
queryParams.addAll(_queryParams('', 'isAll', isAll));
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [bool] isAll (required):
Future<List<UserResponseDto>?> getAllUsers(bool isAll,) async {
final response = await getAllUsersWithHttpInfo(isAll,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
final responseBody = await _decodeBodyBytes(response);
return (await apiClient.deserializeAsync(responseBody, 'List<UserResponseDto>') as List)
.cast<UserResponseDto>()
.toList();
}
return null;
}
/// Performs an HTTP 'GET /user/me' operation and returns the [Response].
Future<Response> getMyUserInfoWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/user/me';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<UserResponseDto?> getMyUserInfo() async {
final response = await getMyUserInfoWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserResponseDto',) as UserResponseDto;
}
return null;
}
/// Performs an HTTP 'GET /user/profile-image/{userId}' operation and returns the [Response].
/// Parameters:
///
/// * [String] userId (required):
Future<Response> getProfileImageWithHttpInfo(String userId,) async {
// ignore: prefer_const_declarations
final path = r'/user/profile-image/{userId}'
.replaceAll('{userId}', userId);
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [String] userId (required):
Future<Object?> getProfileImage(String userId,) async {
final response = await getProfileImageWithHttpInfo(userId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'Object',) as Object;
}
return null;
}
/// Performs an HTTP 'GET /user/count' operation and returns the [Response].
Future<Response> getUserCountWithHttpInfo() async {
// ignore: prefer_const_declarations
final path = r'/user/count';
// ignore: prefer_final_locals
Object? postBody;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>[];
return apiClient.invokeAPI(
path,
'GET',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
Future<UserCountResponseDto?> getUserCount() async {
final response = await getUserCountWithHttpInfo();
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserCountResponseDto',) as UserCountResponseDto;
}
return null;
}
/// Performs an HTTP 'PUT /user' operation and returns the [Response].
/// Parameters:
///
/// * [UpdateUserDto] updateUserDto (required):
Future<Response> updateUserWithHttpInfo(UpdateUserDto updateUserDto,) async {
// ignore: prefer_const_declarations
final path = r'/user';
// ignore: prefer_final_locals
Object? postBody = updateUserDto;
final queryParams = <QueryParam>[];
final headerParams = <String, String>{};
final formParams = <String, String>{};
const contentTypes = <String>['application/json'];
return apiClient.invokeAPI(
path,
'PUT',
queryParams,
postBody,
headerParams,
formParams,
contentTypes.isEmpty ? null : contentTypes.first,
);
}
/// Parameters:
///
/// * [UpdateUserDto] updateUserDto (required):
Future<UserResponseDto?> updateUser(UpdateUserDto updateUserDto,) async {
final response = await updateUserWithHttpInfo(updateUserDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
}
// When a remote server returns no body with a status of 204, we shall not decode it.
// At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
// FormatException when trying to decode an empty string.
if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'UserResponseDto',) as UserResponseDto;
}
return null;
}
}

View File

@ -0,0 +1,327 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ApiClient {
ApiClient({this.basePath = '/api', this.authentication});
final String basePath;
var _client = Client();
/// Returns the current HTTP [Client] instance to use in this class.
///
/// The return value is guaranteed to never be null.
Client get client => _client;
/// Requests to use a new HTTP [Client] in this class.
set client(Client newClient) {
_client = newClient;
}
final _defaultHeaderMap = <String, String>{};
final Authentication? authentication;
void addDefaultHeader(String key, String value) {
_defaultHeaderMap[key] = value;
}
Map<String,String> get defaultHeaderMap => _defaultHeaderMap;
// We don't use a Map<String, String> for queryParams.
// If collectionFormat is 'multi', a key might appear multiple times.
Future<Response> invokeAPI(
String path,
String method,
List<QueryParam> queryParams,
Object? body,
Map<String, String> headerParams,
Map<String, String> formParams,
String? contentType,
) async {
_updateParamsForAuth(queryParams, headerParams);
headerParams.addAll(_defaultHeaderMap);
if (contentType != null) {
headerParams['Content-Type'] = contentType;
}
final urlEncodedQueryParams = queryParams.map((param) => '$param');
final queryString = urlEncodedQueryParams.isNotEmpty ? '?${urlEncodedQueryParams.join('&')}' : '';
final uri = Uri.parse('$basePath$path$queryString');
try {
// Special case for uploading a single file which isn't a 'multipart/form-data'.
if (
body is MultipartFile && (contentType == null ||
!contentType.toLowerCase().startsWith('multipart/form-data'))
) {
final request = StreamedRequest(method, uri);
request.headers.addAll(headerParams);
request.contentLength = body.length;
body.finalize().listen(
request.sink.add,
onDone: request.sink.close,
// ignore: avoid_types_on_closure_parameters
onError: (Object error, StackTrace trace) => request.sink.close(),
cancelOnError: true,
);
final response = await _client.send(request);
return Response.fromStream(response);
}
if (body is MultipartRequest) {
final request = MultipartRequest(method, uri);
request.fields.addAll(body.fields);
request.files.addAll(body.files);
request.headers.addAll(body.headers);
request.headers.addAll(headerParams);
final response = await _client.send(request);
return Response.fromStream(response);
}
final msgBody = contentType == 'application/x-www-form-urlencoded'
? formParams
: await serializeAsync(body);
final nullableHeaderParams = headerParams.isEmpty ? null : headerParams;
switch(method) {
case 'POST': return await _client.post(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PUT': return await _client.put(uri, headers: nullableHeaderParams, body: msgBody,);
case 'DELETE': return await _client.delete(uri, headers: nullableHeaderParams, body: msgBody,);
case 'PATCH': return await _client.patch(uri, headers: nullableHeaderParams, body: msgBody,);
case 'HEAD': return await _client.head(uri, headers: nullableHeaderParams,);
case 'GET': return await _client.get(uri, headers: nullableHeaderParams,);
}
} on SocketException catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
'Socket operation failed: $method $path',
error,
trace,
);
} on TlsException catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
'TLS/SSL communication failed: $method $path',
error,
trace,
);
} on IOException catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
'I/O operation failed: $method $path',
error,
trace,
);
} on ClientException catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
'HTTP connection failed: $method $path',
error,
trace,
);
} on Exception catch (error, trace) {
throw ApiException.withInner(
HttpStatus.badRequest,
'Exception occurred: $method $path',
error,
trace,
);
}
throw ApiException(
HttpStatus.badRequest,
'Invalid HTTP operation: $method $path',
);
}
Future<dynamic> deserializeAsync(String json, String targetType, {bool growable = false,}) async =>
// ignore: deprecated_member_use_from_same_package
deserialize(json, targetType, growable: growable);
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
dynamic deserialize(String json, String targetType, {bool growable = false,}) {
// Remove all spaces. Necessary for regular expressions as well.
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
// If the expected target type is String, nothing to do...
return targetType == 'String'
? json
: _deserialize(jsonDecode(json), targetType, growable: growable);
}
// ignore: deprecated_member_use_from_same_package
Future<String> serializeAsync(Object? value) async => serialize(value);
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use serializeAsync() instead.')
String serialize(Object? value) => value == null ? '' : json.encode(value);
/// Update query and header parameters based on authentication settings.
void _updateParamsForAuth(
List<QueryParam> queryParams,
Map<String, String> headerParams,
) {
if (authentication != null) {
authentication!.applyToParams(queryParams, headerParams);
}
}
static dynamic _deserialize(dynamic value, String targetType, {bool growable = false}) {
try {
switch (targetType) {
case 'String':
return value is String ? value : value.toString();
case 'int':
return value is int ? value : int.parse('$value');
case 'double':
return value is double ? value : double.parse('$value');
case 'bool':
if (value is bool) {
return value;
}
final valueString = '$value'.toLowerCase();
return valueString == 'true' || valueString == '1';
case 'DateTime':
return value is DateTime ? value : DateTime.tryParse(value);
case 'AddAssetsDto':
return AddAssetsDto.fromJson(value);
case 'AddUsersDto':
return AddUsersDto.fromJson(value);
case 'AdminSignupResponseDto':
return AdminSignupResponseDto.fromJson(value);
case 'AlbumResponseDto':
return AlbumResponseDto.fromJson(value);
case 'AssetFileUploadResponseDto':
return AssetFileUploadResponseDto.fromJson(value);
case 'AssetResponseDto':
return AssetResponseDto.fromJson(value);
case 'AssetTypeEnum':
return AssetTypeEnumTypeTransformer().decode(value);
case 'CheckDuplicateAssetDto':
return CheckDuplicateAssetDto.fromJson(value);
case 'CheckDuplicateAssetResponseDto':
return CheckDuplicateAssetResponseDto.fromJson(value);
case 'CreateAlbumDto':
return CreateAlbumDto.fromJson(value);
case 'CreateDeviceInfoDto':
return CreateDeviceInfoDto.fromJson(value);
case 'CreateProfileImageResponseDto':
return CreateProfileImageResponseDto.fromJson(value);
case 'CreateUserDto':
return CreateUserDto.fromJson(value);
case 'CuratedLocationsResponseDto':
return CuratedLocationsResponseDto.fromJson(value);
case 'CuratedObjectsResponseDto':
return CuratedObjectsResponseDto.fromJson(value);
case 'DeleteAssetDto':
return DeleteAssetDto.fromJson(value);
case 'DeleteAssetResponseDto':
return DeleteAssetResponseDto.fromJson(value);
case 'DeleteAssetStatus':
return DeleteAssetStatusTypeTransformer().decode(value);
case 'DeviceInfoResponseDto':
return DeviceInfoResponseDto.fromJson(value);
case 'DeviceTypeEnum':
return DeviceTypeEnumTypeTransformer().decode(value);
case 'ExifResponseDto':
return ExifResponseDto.fromJson(value);
case 'LoginCredentialDto':
return LoginCredentialDto.fromJson(value);
case 'LoginResponseDto':
return LoginResponseDto.fromJson(value);
case 'RemoveAssetsDto':
return RemoveAssetsDto.fromJson(value);
case 'SearchAssetDto':
return SearchAssetDto.fromJson(value);
case 'ServerInfoResponseDto':
return ServerInfoResponseDto.fromJson(value);
case 'ServerPingResponse':
return ServerPingResponse.fromJson(value);
case 'ServerVersionReponseDto':
return ServerVersionReponseDto.fromJson(value);
case 'SignUpDto':
return SignUpDto.fromJson(value);
case 'SmartInfoResponseDto':
return SmartInfoResponseDto.fromJson(value);
case 'UpdateAlbumDto':
return UpdateAlbumDto.fromJson(value);
case 'UpdateDeviceInfoDto':
return UpdateDeviceInfoDto.fromJson(value);
case 'UpdateUserDto':
return UpdateUserDto.fromJson(value);
case 'UserCountResponseDto':
return UserCountResponseDto.fromJson(value);
case 'UserResponseDto':
return UserResponseDto.fromJson(value);
case 'ValidateAccessTokenResponseDto':
return ValidateAccessTokenResponseDto.fromJson(value);
default:
dynamic match;
if (value is List && (match = _regList.firstMatch(targetType)?.group(1)) != null) {
return value
.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,))
.toList(growable: growable);
}
if (value is Set && (match = _regSet.firstMatch(targetType)?.group(1)) != null) {
return value
.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,))
.toSet();
}
if (value is Map && (match = _regMap.firstMatch(targetType)?.group(1)) != null) {
return Map<String, dynamic>.fromIterables(
value.keys.cast<String>(),
value.values.map<dynamic>((dynamic v) => _deserialize(v, match, growable: growable,)),
);
}
}
} on Exception catch (error, trace) {
throw ApiException.withInner(HttpStatus.internalServerError, 'Exception during deserialization.', error, trace,);
}
throw ApiException(HttpStatus.internalServerError, 'Could not find a suitable class for deserialization',);
}
}
/// Primarily intended for use in an isolate.
class DeserializationMessage {
const DeserializationMessage({
required this.json,
required this.targetType,
this.growable = false,
});
/// The JSON value to deserialize.
final String json;
/// Target type to deserialize to.
final String targetType;
/// Whether to make deserialized lists or maps growable.
final bool growable;
}
/// Primarily intended for use in an isolate.
Future<dynamic> deserializeAsync(DeserializationMessage message) async {
// Remove all spaces. Necessary for regular expressions as well.
final targetType = message.targetType.replaceAll(' ', '');
// If the expected target type is String, nothing to do...
return targetType == 'String'
? message.json
: ApiClient._deserialize(
jsonDecode(message.json),
targetType,
growable: message.growable,
);
}
/// Primarily intended for use in an isolate.
Future<String> serializeAsync(Object? value) async => value == null ? '' : json.encode(value);

View File

@ -0,0 +1,33 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ApiException implements Exception {
ApiException(this.code, this.message);
ApiException.withInner(this.code, this.message, this.innerException, this.stackTrace);
int code = 0;
String? message;
Exception? innerException;
StackTrace? stackTrace;
@override
String toString() {
if (message == null) {
return 'ApiException';
}
if (innerException == null) {
return 'ApiException $code: $message';
}
return 'ApiException $code: $message (Inner exception: $innerException)\n\n$stackTrace';
}
}

View File

@ -0,0 +1,110 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class QueryParam {
const QueryParam(this.name, this.value);
final String name;
final String value;
@override
String toString() => '${Uri.encodeQueryComponent(name)}=${Uri.encodeQueryComponent(value)}';
}
// Ported from the Java version.
Iterable<QueryParam> _queryParams(String collectionFormat, String name, dynamic value,) {
// Assertions to run in debug mode only.
assert(name.isNotEmpty, 'Parameter cannot be an empty string.');
final params = <QueryParam>[];
if (value is List) {
if (collectionFormat == 'multi') {
return value.map((dynamic v) => QueryParam(name, parameterToString(v)),);
}
// Default collection format is 'csv'.
if (collectionFormat.isEmpty) {
collectionFormat = 'csv'; // ignore: parameter_assignments
}
final delimiter = _delimiters[collectionFormat] ?? ',';
params.add(QueryParam(name, value.map<dynamic>(parameterToString).join(delimiter),));
} else if (value != null) {
params.add(QueryParam(name, parameterToString(value)));
}
return params;
}
/// Format the given parameter object into a [String].
String parameterToString(dynamic value) {
if (value == null) {
return '';
}
if (value is DateTime) {
return value.toUtc().toIso8601String();
}
if (value is AssetTypeEnum) {
return AssetTypeEnumTypeTransformer().encode(value).toString();
}
if (value is DeleteAssetStatus) {
return DeleteAssetStatusTypeTransformer().encode(value).toString();
}
if (value is DeviceTypeEnum) {
return DeviceTypeEnumTypeTransformer().encode(value).toString();
}
return value.toString();
}
/// Returns the decoded body as UTF-8 if the given headers indicate an 'application/json'
/// content type. Otherwise, returns the decoded body as decoded by dart:http package.
Future<String> _decodeBodyBytes(Response response) async {
final contentType = response.headers['content-type'];
return contentType != null && contentType.toLowerCase().startsWith('application/json')
? response.bodyBytes.isEmpty ? '' : utf8.decode(response.bodyBytes)
: response.body;
}
/// Returns a valid [T] value found at the specified Map [key], null otherwise.
T? mapValueOfType<T>(dynamic map, String key) {
final dynamic value = map is Map ? map[key] : null;
return value is T ? value : null;
}
/// Returns a valid Map<K, V> found at the specified Map [key], null otherwise.
Map<K, V>? mapCastOfType<K, V>(dynamic map, String key) {
final dynamic value = map is Map ? map[key] : null;
return value is Map ? value.cast<K, V>() : null;
}
/// Returns a valid [DateTime] found at the specified Map [key], null otherwise.
DateTime? mapDateTime(dynamic map, String key, [String? pattern]) {
final dynamic value = map is Map ? map[key] : null;
if (value != null) {
int? millis;
if (value is int) {
millis = value;
} else if (value is String) {
if (pattern == _dateEpochMarker) {
millis = int.tryParse(value);
} else {
return DateTime.tryParse(value);
}
}
if (millis != null) {
return DateTime.fromMillisecondsSinceEpoch(millis, isUtc: true);
}
}
return null;
}

View File

@ -0,0 +1,40 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ApiKeyAuth implements Authentication {
ApiKeyAuth(this.location, this.paramName);
final String location;
final String paramName;
String apiKeyPrefix = '';
String apiKey = '';
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
final paramValue = apiKeyPrefix.isEmpty ? apiKey : '$apiKeyPrefix $apiKey';
if (paramValue.isNotEmpty) {
if (location == 'query') {
queryParams.add(QueryParam(paramName, paramValue));
} else if (location == 'header') {
headerParams[paramName] = paramValue;
} else if (location == 'cookie') {
headerParams.update(
'Cookie',
(existingCookie) => '$existingCookie; $paramName=$paramValue',
ifAbsent: () => '$paramName=$paramValue',
);
}
}
}
}

View File

@ -0,0 +1,17 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
// ignore: one_member_abstracts
abstract class Authentication {
/// Apply authentication settings to header and query params.
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams);
}

View File

@ -0,0 +1,26 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class HttpBasicAuth implements Authentication {
HttpBasicAuth({this.username = '', this.password = ''});
String username;
String password;
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
if (username.isNotEmpty && password.isNotEmpty) {
final credentials = '$username:$password';
headerParams['Authorization'] = 'Basic ${base64.encode(utf8.encode(credentials))}';
}
}
}

View File

@ -0,0 +1,49 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
typedef HttpBearerAuthProvider = String Function();
class HttpBearerAuth implements Authentication {
HttpBearerAuth();
dynamic _accessToken;
dynamic get accessToken => _accessToken;
set accessToken(dynamic accessToken) {
if (accessToken is! String && accessToken is! HttpBearerAuthProvider) {
throw ArgumentError('accessToken value must be either a String or a String Function().');
}
_accessToken = accessToken;
}
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
if (_accessToken == null) {
return;
}
String accessToken;
if (_accessToken is String) {
accessToken = _accessToken;
} else if (_accessToken is HttpBearerAuthProvider) {
accessToken = _accessToken!();
} else {
return;
}
if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
}
}

View File

@ -0,0 +1,24 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class OAuth implements Authentication {
OAuth({this.accessToken = ''});
String accessToken;
@override
void applyToParams(List<QueryParam> queryParams, Map<String, String> headerParams) {
if (accessToken.isNotEmpty) {
headerParams['Authorization'] = 'Bearer $accessToken';
}
}
}

View File

@ -0,0 +1,113 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AddAssetsDto {
/// Returns a new [AddAssetsDto] instance.
AddAssetsDto({
this.assetIds = const [],
});
List<String> assetIds;
@override
bool operator ==(Object other) => identical(this, other) || other is AddAssetsDto &&
other.assetIds == assetIds;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetIds.hashCode);
@override
String toString() => 'AddAssetsDto[assetIds=$assetIds]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'assetIds'] = assetIds;
return _json;
}
/// Returns a new [AddAssetsDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AddAssetsDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AddAssetsDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AddAssetsDto[$key]" has a null value in JSON.');
});
return true;
}());
return AddAssetsDto(
assetIds: json[r'assetIds'] is List
? (json[r'assetIds'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<AddAssetsDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AddAssetsDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AddAssetsDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AddAssetsDto> mapFromJson(dynamic json) {
final map = <String, AddAssetsDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AddAssetsDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AddAssetsDto-objects as value to a dart map
static Map<String, List<AddAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AddAssetsDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AddAssetsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetIds',
};
}

View File

@ -0,0 +1,113 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AddUsersDto {
/// Returns a new [AddUsersDto] instance.
AddUsersDto({
this.sharedUserIds = const [],
});
List<String> sharedUserIds;
@override
bool operator ==(Object other) => identical(this, other) || other is AddUsersDto &&
other.sharedUserIds == sharedUserIds;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(sharedUserIds.hashCode);
@override
String toString() => 'AddUsersDto[sharedUserIds=$sharedUserIds]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'sharedUserIds'] = sharedUserIds;
return _json;
}
/// Returns a new [AddUsersDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AddUsersDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AddUsersDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AddUsersDto[$key]" has a null value in JSON.');
});
return true;
}());
return AddUsersDto(
sharedUserIds: json[r'sharedUserIds'] is List
? (json[r'sharedUserIds'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<AddUsersDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AddUsersDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AddUsersDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AddUsersDto> mapFromJson(dynamic json) {
final map = <String, AddUsersDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AddUsersDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AddUsersDto-objects as value to a dart map
static Map<String, List<AddUsersDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AddUsersDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AddUsersDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'sharedUserIds',
};
}

View File

@ -0,0 +1,143 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AdminSignupResponseDto {
/// Returns a new [AdminSignupResponseDto] instance.
AdminSignupResponseDto({
required this.id,
required this.email,
required this.firstName,
required this.lastName,
required this.createdAt,
});
String id;
String email;
String firstName;
String lastName;
String createdAt;
@override
bool operator ==(Object other) => identical(this, other) || other is AdminSignupResponseDto &&
other.id == id &&
other.email == email &&
other.firstName == firstName &&
other.lastName == lastName &&
other.createdAt == createdAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(email.hashCode) +
(firstName.hashCode) +
(lastName.hashCode) +
(createdAt.hashCode);
@override
String toString() => 'AdminSignupResponseDto[id=$id, email=$email, firstName=$firstName, lastName=$lastName, createdAt=$createdAt]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'email'] = email;
_json[r'firstName'] = firstName;
_json[r'lastName'] = lastName;
_json[r'createdAt'] = createdAt;
return _json;
}
/// Returns a new [AdminSignupResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AdminSignupResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AdminSignupResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AdminSignupResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return AdminSignupResponseDto(
id: mapValueOfType<String>(json, r'id')!,
email: mapValueOfType<String>(json, r'email')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
createdAt: mapValueOfType<String>(json, r'createdAt')!,
);
}
return null;
}
static List<AdminSignupResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AdminSignupResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AdminSignupResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AdminSignupResponseDto> mapFromJson(dynamic json) {
final map = <String, AdminSignupResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AdminSignupResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AdminSignupResponseDto-objects as value to a dart map
static Map<String, List<AdminSignupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AdminSignupResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AdminSignupResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'email',
'firstName',
'lastName',
'createdAt',
};
}

View File

@ -0,0 +1,171 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AlbumResponseDto {
/// Returns a new [AlbumResponseDto] instance.
AlbumResponseDto({
required this.id,
required this.ownerId,
required this.albumName,
required this.createdAt,
required this.albumThumbnailAssetId,
required this.shared,
this.sharedUsers = const [],
this.assets = const [],
});
String id;
String ownerId;
String albumName;
String createdAt;
String? albumThumbnailAssetId;
bool shared;
List<UserResponseDto> sharedUsers;
List<AssetResponseDto> assets;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
other.id == id &&
other.ownerId == ownerId &&
other.albumName == albumName &&
other.createdAt == createdAt &&
other.albumThumbnailAssetId == albumThumbnailAssetId &&
other.shared == shared &&
other.sharedUsers == sharedUsers &&
other.assets == assets;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(ownerId.hashCode) +
(albumName.hashCode) +
(createdAt.hashCode) +
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
(shared.hashCode) +
(sharedUsers.hashCode) +
(assets.hashCode);
@override
String toString() => 'AlbumResponseDto[id=$id, ownerId=$ownerId, albumName=$albumName, createdAt=$createdAt, albumThumbnailAssetId=$albumThumbnailAssetId, shared=$shared, sharedUsers=$sharedUsers, assets=$assets]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'ownerId'] = ownerId;
_json[r'albumName'] = albumName;
_json[r'createdAt'] = createdAt;
if (albumThumbnailAssetId != null) {
_json[r'albumThumbnailAssetId'] = albumThumbnailAssetId;
} else {
_json[r'albumThumbnailAssetId'] = null;
}
_json[r'shared'] = shared;
_json[r'sharedUsers'] = sharedUsers;
_json[r'assets'] = assets;
return _json;
}
/// Returns a new [AlbumResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AlbumResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AlbumResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return AlbumResponseDto(
id: mapValueOfType<String>(json, r'id')!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
albumName: mapValueOfType<String>(json, r'albumName')!,
createdAt: mapValueOfType<String>(json, r'createdAt')!,
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
shared: mapValueOfType<bool>(json, r'shared')!,
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers'])!,
assets: AssetResponseDto.listFromJson(json[r'assets'])!,
);
}
return null;
}
static List<AlbumResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumResponseDto> mapFromJson(dynamic json) {
final map = <String, AlbumResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumResponseDto-objects as value to a dart map
static Map<String, List<AlbumResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'ownerId',
'albumName',
'createdAt',
'albumThumbnailAssetId',
'shared',
'sharedUsers',
'assets',
};
}

View File

@ -0,0 +1,111 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetFileUploadResponseDto {
/// Returns a new [AssetFileUploadResponseDto] instance.
AssetFileUploadResponseDto({
required this.id,
});
String id;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetFileUploadResponseDto &&
other.id == id;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode);
@override
String toString() => 'AssetFileUploadResponseDto[id=$id]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
return _json;
}
/// Returns a new [AssetFileUploadResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFileUploadResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AssetFileUploadResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AssetFileUploadResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return AssetFileUploadResponseDto(
id: mapValueOfType<String>(json, r'id')!,
);
}
return null;
}
static List<AssetFileUploadResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetFileUploadResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetFileUploadResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetFileUploadResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetFileUploadResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetFileUploadResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetFileUploadResponseDto-objects as value to a dart map
static Map<String, List<AssetFileUploadResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetFileUploadResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetFileUploadResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
};
}

View File

@ -0,0 +1,265 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetResponseDto {
/// Returns a new [AssetResponseDto] instance.
AssetResponseDto({
required this.type,
required this.id,
required this.deviceAssetId,
required this.ownerId,
required this.deviceId,
required this.originalPath,
required this.resizePath,
required this.createdAt,
required this.modifiedAt,
required this.isFavorite,
required this.mimeType,
required this.duration,
required this.webpPath,
required this.encodedVideoPath,
this.exifInfo,
this.smartInfo,
});
AssetTypeEnum type;
String id;
String deviceAssetId;
String ownerId;
String deviceId;
String originalPath;
String? resizePath;
String createdAt;
String modifiedAt;
bool isFavorite;
String? mimeType;
String duration;
String? webpPath;
String? encodedVideoPath;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
ExifResponseDto? exifInfo;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
SmartInfoResponseDto? smartInfo;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto &&
other.type == type &&
other.id == id &&
other.deviceAssetId == deviceAssetId &&
other.ownerId == ownerId &&
other.deviceId == deviceId &&
other.originalPath == originalPath &&
other.resizePath == resizePath &&
other.createdAt == createdAt &&
other.modifiedAt == modifiedAt &&
other.isFavorite == isFavorite &&
other.mimeType == mimeType &&
other.duration == duration &&
other.webpPath == webpPath &&
other.encodedVideoPath == encodedVideoPath &&
other.exifInfo == exifInfo &&
other.smartInfo == smartInfo;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(type.hashCode) +
(id.hashCode) +
(deviceAssetId.hashCode) +
(ownerId.hashCode) +
(deviceId.hashCode) +
(originalPath.hashCode) +
(resizePath == null ? 0 : resizePath!.hashCode) +
(createdAt.hashCode) +
(modifiedAt.hashCode) +
(isFavorite.hashCode) +
(mimeType == null ? 0 : mimeType!.hashCode) +
(duration.hashCode) +
(webpPath == null ? 0 : webpPath!.hashCode) +
(encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) +
(exifInfo == null ? 0 : exifInfo!.hashCode) +
(smartInfo == null ? 0 : smartInfo!.hashCode);
@override
String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, createdAt=$createdAt, modifiedAt=$modifiedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'type'] = type;
_json[r'id'] = id;
_json[r'deviceAssetId'] = deviceAssetId;
_json[r'ownerId'] = ownerId;
_json[r'deviceId'] = deviceId;
_json[r'originalPath'] = originalPath;
if (resizePath != null) {
_json[r'resizePath'] = resizePath;
} else {
_json[r'resizePath'] = null;
}
_json[r'createdAt'] = createdAt;
_json[r'modifiedAt'] = modifiedAt;
_json[r'isFavorite'] = isFavorite;
if (mimeType != null) {
_json[r'mimeType'] = mimeType;
} else {
_json[r'mimeType'] = null;
}
_json[r'duration'] = duration;
if (webpPath != null) {
_json[r'webpPath'] = webpPath;
} else {
_json[r'webpPath'] = null;
}
if (encodedVideoPath != null) {
_json[r'encodedVideoPath'] = encodedVideoPath;
} else {
_json[r'encodedVideoPath'] = null;
}
if (exifInfo != null) {
_json[r'exifInfo'] = exifInfo;
} else {
_json[r'exifInfo'] = null;
}
if (smartInfo != null) {
_json[r'smartInfo'] = smartInfo;
} else {
_json[r'smartInfo'] = null;
}
return _json;
}
/// Returns a new [AssetResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "AssetResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "AssetResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return AssetResponseDto(
type: AssetTypeEnum.fromJson(json[r'type'])!,
id: mapValueOfType<String>(json, r'id')!,
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
originalPath: mapValueOfType<String>(json, r'originalPath')!,
resizePath: mapValueOfType<String>(json, r'resizePath'),
createdAt: mapValueOfType<String>(json, r'createdAt')!,
modifiedAt: mapValueOfType<String>(json, r'modifiedAt')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
mimeType: mapValueOfType<String>(json, r'mimeType'),
duration: mapValueOfType<String>(json, r'duration')!,
webpPath: mapValueOfType<String>(json, r'webpPath'),
encodedVideoPath: mapValueOfType<String>(json, r'encodedVideoPath'),
exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']),
smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']),
);
}
return null;
}
static List<AssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetResponseDto-objects as value to a dart map
static Map<String, List<AssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'type',
'id',
'deviceAssetId',
'ownerId',
'deviceId',
'originalPath',
'resizePath',
'createdAt',
'modifiedAt',
'isFavorite',
'mimeType',
'duration',
'webpPath',
'encodedVideoPath',
};
}

View File

@ -0,0 +1,91 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetTypeEnum {
/// Instantiate a new enum with the provided [value].
const AssetTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const IMAGE = AssetTypeEnum._(r'IMAGE');
static const VIDEO = AssetTypeEnum._(r'VIDEO');
static const AUDIO = AssetTypeEnum._(r'AUDIO');
static const OTHER = AssetTypeEnum._(r'OTHER');
/// List of all possible values in this [enum][AssetTypeEnum].
static const values = <AssetTypeEnum>[
IMAGE,
VIDEO,
AUDIO,
OTHER,
];
static AssetTypeEnum? fromJson(dynamic value) => AssetTypeEnumTypeTransformer().decode(value);
static List<AssetTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [AssetTypeEnum] to String,
/// and [decode] dynamic data back to [AssetTypeEnum].
class AssetTypeEnumTypeTransformer {
factory AssetTypeEnumTypeTransformer() => _instance ??= const AssetTypeEnumTypeTransformer._();
const AssetTypeEnumTypeTransformer._();
String encode(AssetTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a AssetTypeEnum.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
AssetTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
case r'IMAGE': return AssetTypeEnum.IMAGE;
case r'VIDEO': return AssetTypeEnum.VIDEO;
case r'AUDIO': return AssetTypeEnum.AUDIO;
case r'OTHER': return AssetTypeEnum.OTHER;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [AssetTypeEnumTypeTransformer] instance.
static AssetTypeEnumTypeTransformer? _instance;
}

View File

@ -0,0 +1,119 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CheckDuplicateAssetDto {
/// Returns a new [CheckDuplicateAssetDto] instance.
CheckDuplicateAssetDto({
required this.deviceAssetId,
required this.deviceId,
});
String deviceAssetId;
String deviceId;
@override
bool operator ==(Object other) => identical(this, other) || other is CheckDuplicateAssetDto &&
other.deviceAssetId == deviceAssetId &&
other.deviceId == deviceId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(deviceAssetId.hashCode) +
(deviceId.hashCode);
@override
String toString() => 'CheckDuplicateAssetDto[deviceAssetId=$deviceAssetId, deviceId=$deviceId]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'deviceAssetId'] = deviceAssetId;
_json[r'deviceId'] = deviceId;
return _json;
}
/// Returns a new [CheckDuplicateAssetDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CheckDuplicateAssetDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CheckDuplicateAssetDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CheckDuplicateAssetDto[$key]" has a null value in JSON.');
});
return true;
}());
return CheckDuplicateAssetDto(
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
);
}
return null;
}
static List<CheckDuplicateAssetDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckDuplicateAssetDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CheckDuplicateAssetDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CheckDuplicateAssetDto> mapFromJson(dynamic json) {
final map = <String, CheckDuplicateAssetDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CheckDuplicateAssetDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CheckDuplicateAssetDto-objects as value to a dart map
static Map<String, List<CheckDuplicateAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckDuplicateAssetDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CheckDuplicateAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'deviceAssetId',
'deviceId',
};
}

View File

@ -0,0 +1,111 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CheckDuplicateAssetResponseDto {
/// Returns a new [CheckDuplicateAssetResponseDto] instance.
CheckDuplicateAssetResponseDto({
required this.isExist,
});
bool isExist;
@override
bool operator ==(Object other) => identical(this, other) || other is CheckDuplicateAssetResponseDto &&
other.isExist == isExist;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(isExist.hashCode);
@override
String toString() => 'CheckDuplicateAssetResponseDto[isExist=$isExist]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'isExist'] = isExist;
return _json;
}
/// Returns a new [CheckDuplicateAssetResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CheckDuplicateAssetResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CheckDuplicateAssetResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CheckDuplicateAssetResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return CheckDuplicateAssetResponseDto(
isExist: mapValueOfType<bool>(json, r'isExist')!,
);
}
return null;
}
static List<CheckDuplicateAssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckDuplicateAssetResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CheckDuplicateAssetResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CheckDuplicateAssetResponseDto> mapFromJson(dynamic json) {
final map = <String, CheckDuplicateAssetResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CheckDuplicateAssetResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CheckDuplicateAssetResponseDto-objects as value to a dart map
static Map<String, List<CheckDuplicateAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckDuplicateAssetResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CheckDuplicateAssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'isExist',
};
}

View File

@ -0,0 +1,129 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateAlbumDto {
/// Returns a new [CreateAlbumDto] instance.
CreateAlbumDto({
required this.albumName,
this.sharedWithUserIds = const [],
this.assetIds = const [],
});
String albumName;
List<String> sharedWithUserIds;
List<String> assetIds;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto &&
other.albumName == albumName &&
other.sharedWithUserIds == sharedWithUserIds &&
other.assetIds == assetIds;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumName.hashCode) +
(sharedWithUserIds.hashCode) +
(assetIds.hashCode);
@override
String toString() => 'CreateAlbumDto[albumName=$albumName, sharedWithUserIds=$sharedWithUserIds, assetIds=$assetIds]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'albumName'] = albumName;
_json[r'sharedWithUserIds'] = sharedWithUserIds;
_json[r'assetIds'] = assetIds;
return _json;
}
/// Returns a new [CreateAlbumDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateAlbumDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CreateAlbumDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CreateAlbumDto[$key]" has a null value in JSON.');
});
return true;
}());
return CreateAlbumDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
sharedWithUserIds: json[r'sharedWithUserIds'] is List
? (json[r'sharedWithUserIds'] as List).cast<String>()
: const [],
assetIds: json[r'assetIds'] is List
? (json[r'assetIds'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<CreateAlbumDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateAlbumDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateAlbumDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CreateAlbumDto> mapFromJson(dynamic json) {
final map = <String, CreateAlbumDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateAlbumDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CreateAlbumDto-objects as value to a dart map
static Map<String, List<CreateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateAlbumDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateAlbumDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'albumName',
};
}

View File

@ -0,0 +1,136 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateDeviceInfoDto {
/// Returns a new [CreateDeviceInfoDto] instance.
CreateDeviceInfoDto({
required this.deviceType,
required this.deviceId,
this.isAutoBackup,
});
DeviceTypeEnum deviceType;
String deviceId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isAutoBackup;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateDeviceInfoDto &&
other.deviceType == deviceType &&
other.deviceId == deviceId &&
other.isAutoBackup == isAutoBackup;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(deviceType.hashCode) +
(deviceId.hashCode) +
(isAutoBackup == null ? 0 : isAutoBackup!.hashCode);
@override
String toString() => 'CreateDeviceInfoDto[deviceType=$deviceType, deviceId=$deviceId, isAutoBackup=$isAutoBackup]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'deviceType'] = deviceType;
_json[r'deviceId'] = deviceId;
if (isAutoBackup != null) {
_json[r'isAutoBackup'] = isAutoBackup;
} else {
_json[r'isAutoBackup'] = null;
}
return _json;
}
/// Returns a new [CreateDeviceInfoDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateDeviceInfoDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CreateDeviceInfoDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CreateDeviceInfoDto[$key]" has a null value in JSON.');
});
return true;
}());
return CreateDeviceInfoDto(
deviceType: DeviceTypeEnum.fromJson(json[r'deviceType'])!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
isAutoBackup: mapValueOfType<bool>(json, r'isAutoBackup'),
);
}
return null;
}
static List<CreateDeviceInfoDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateDeviceInfoDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateDeviceInfoDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CreateDeviceInfoDto> mapFromJson(dynamic json) {
final map = <String, CreateDeviceInfoDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateDeviceInfoDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CreateDeviceInfoDto-objects as value to a dart map
static Map<String, List<CreateDeviceInfoDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateDeviceInfoDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateDeviceInfoDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'deviceType',
'deviceId',
};
}

View File

@ -0,0 +1,119 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateProfileImageResponseDto {
/// Returns a new [CreateProfileImageResponseDto] instance.
CreateProfileImageResponseDto({
required this.userId,
required this.profileImagePath,
});
String userId;
String profileImagePath;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateProfileImageResponseDto &&
other.userId == userId &&
other.profileImagePath == profileImagePath;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(userId.hashCode) +
(profileImagePath.hashCode);
@override
String toString() => 'CreateProfileImageResponseDto[userId=$userId, profileImagePath=$profileImagePath]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'userId'] = userId;
_json[r'profileImagePath'] = profileImagePath;
return _json;
}
/// Returns a new [CreateProfileImageResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateProfileImageResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CreateProfileImageResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CreateProfileImageResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return CreateProfileImageResponseDto(
userId: mapValueOfType<String>(json, r'userId')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
);
}
return null;
}
static List<CreateProfileImageResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateProfileImageResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateProfileImageResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CreateProfileImageResponseDto> mapFromJson(dynamic json) {
final map = <String, CreateProfileImageResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateProfileImageResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CreateProfileImageResponseDto-objects as value to a dart map
static Map<String, List<CreateProfileImageResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateProfileImageResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'userId',
'profileImagePath',
};
}

View File

@ -0,0 +1,135 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CreateUserDto {
/// Returns a new [CreateUserDto] instance.
CreateUserDto({
required this.email,
required this.password,
required this.firstName,
required this.lastName,
});
String email;
String password;
String firstName;
String lastName;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateUserDto &&
other.email == email &&
other.password == password &&
other.firstName == firstName &&
other.lastName == lastName;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(email.hashCode) +
(password.hashCode) +
(firstName.hashCode) +
(lastName.hashCode);
@override
String toString() => 'CreateUserDto[email=$email, password=$password, firstName=$firstName, lastName=$lastName]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'email'] = email;
_json[r'password'] = password;
_json[r'firstName'] = firstName;
_json[r'lastName'] = lastName;
return _json;
}
/// Returns a new [CreateUserDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateUserDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CreateUserDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CreateUserDto[$key]" has a null value in JSON.');
});
return true;
}());
return CreateUserDto(
email: mapValueOfType<String>(json, r'email')!,
password: mapValueOfType<String>(json, r'password')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
);
}
return null;
}
static List<CreateUserDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateUserDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CreateUserDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CreateUserDto> mapFromJson(dynamic json) {
final map = <String, CreateUserDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateUserDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CreateUserDto-objects as value to a dart map
static Map<String, List<CreateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateUserDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CreateUserDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'email',
'password',
'firstName',
'lastName',
};
}

View File

@ -0,0 +1,143 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CuratedLocationsResponseDto {
/// Returns a new [CuratedLocationsResponseDto] instance.
CuratedLocationsResponseDto({
required this.id,
required this.city,
required this.resizePath,
required this.deviceAssetId,
required this.deviceId,
});
String id;
String city;
String resizePath;
String deviceAssetId;
String deviceId;
@override
bool operator ==(Object other) => identical(this, other) || other is CuratedLocationsResponseDto &&
other.id == id &&
other.city == city &&
other.resizePath == resizePath &&
other.deviceAssetId == deviceAssetId &&
other.deviceId == deviceId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(city.hashCode) +
(resizePath.hashCode) +
(deviceAssetId.hashCode) +
(deviceId.hashCode);
@override
String toString() => 'CuratedLocationsResponseDto[id=$id, city=$city, resizePath=$resizePath, deviceAssetId=$deviceAssetId, deviceId=$deviceId]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'city'] = city;
_json[r'resizePath'] = resizePath;
_json[r'deviceAssetId'] = deviceAssetId;
_json[r'deviceId'] = deviceId;
return _json;
}
/// Returns a new [CuratedLocationsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CuratedLocationsResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CuratedLocationsResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CuratedLocationsResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return CuratedLocationsResponseDto(
id: mapValueOfType<String>(json, r'id')!,
city: mapValueOfType<String>(json, r'city')!,
resizePath: mapValueOfType<String>(json, r'resizePath')!,
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
);
}
return null;
}
static List<CuratedLocationsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CuratedLocationsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CuratedLocationsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CuratedLocationsResponseDto> mapFromJson(dynamic json) {
final map = <String, CuratedLocationsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CuratedLocationsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CuratedLocationsResponseDto-objects as value to a dart map
static Map<String, List<CuratedLocationsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CuratedLocationsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CuratedLocationsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'city',
'resizePath',
'deviceAssetId',
'deviceId',
};
}

View File

@ -0,0 +1,143 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CuratedObjectsResponseDto {
/// Returns a new [CuratedObjectsResponseDto] instance.
CuratedObjectsResponseDto({
required this.id,
required this.object,
required this.resizePath,
required this.deviceAssetId,
required this.deviceId,
});
String id;
String object;
String resizePath;
String deviceAssetId;
String deviceId;
@override
bool operator ==(Object other) => identical(this, other) || other is CuratedObjectsResponseDto &&
other.id == id &&
other.object == object &&
other.resizePath == resizePath &&
other.deviceAssetId == deviceAssetId &&
other.deviceId == deviceId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(object.hashCode) +
(resizePath.hashCode) +
(deviceAssetId.hashCode) +
(deviceId.hashCode);
@override
String toString() => 'CuratedObjectsResponseDto[id=$id, object=$object, resizePath=$resizePath, deviceAssetId=$deviceAssetId, deviceId=$deviceId]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'object'] = object;
_json[r'resizePath'] = resizePath;
_json[r'deviceAssetId'] = deviceAssetId;
_json[r'deviceId'] = deviceId;
return _json;
}
/// Returns a new [CuratedObjectsResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CuratedObjectsResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "CuratedObjectsResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "CuratedObjectsResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return CuratedObjectsResponseDto(
id: mapValueOfType<String>(json, r'id')!,
object: mapValueOfType<String>(json, r'object')!,
resizePath: mapValueOfType<String>(json, r'resizePath')!,
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
);
}
return null;
}
static List<CuratedObjectsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <CuratedObjectsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CuratedObjectsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CuratedObjectsResponseDto> mapFromJson(dynamic json) {
final map = <String, CuratedObjectsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CuratedObjectsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CuratedObjectsResponseDto-objects as value to a dart map
static Map<String, List<CuratedObjectsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CuratedObjectsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CuratedObjectsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'object',
'resizePath',
'deviceAssetId',
'deviceId',
};
}

View File

@ -0,0 +1,113 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeleteAssetDto {
/// Returns a new [DeleteAssetDto] instance.
DeleteAssetDto({
this.ids = const [],
});
List<String> ids;
@override
bool operator ==(Object other) => identical(this, other) || other is DeleteAssetDto &&
other.ids == ids;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(ids.hashCode);
@override
String toString() => 'DeleteAssetDto[ids=$ids]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'ids'] = ids;
return _json;
}
/// Returns a new [DeleteAssetDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DeleteAssetDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "DeleteAssetDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "DeleteAssetDto[$key]" has a null value in JSON.');
});
return true;
}());
return DeleteAssetDto(
ids: json[r'ids'] is List
? (json[r'ids'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<DeleteAssetDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeleteAssetDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeleteAssetDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DeleteAssetDto> mapFromJson(dynamic json) {
final map = <String, DeleteAssetDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeleteAssetDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DeleteAssetDto-objects as value to a dart map
static Map<String, List<DeleteAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeleteAssetDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeleteAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'ids',
};
}

View File

@ -0,0 +1,119 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeleteAssetResponseDto {
/// Returns a new [DeleteAssetResponseDto] instance.
DeleteAssetResponseDto({
required this.status,
required this.id,
});
DeleteAssetStatus status;
String id;
@override
bool operator ==(Object other) => identical(this, other) || other is DeleteAssetResponseDto &&
other.status == status &&
other.id == id;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(status.hashCode) +
(id.hashCode);
@override
String toString() => 'DeleteAssetResponseDto[status=$status, id=$id]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'status'] = status;
_json[r'id'] = id;
return _json;
}
/// Returns a new [DeleteAssetResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DeleteAssetResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "DeleteAssetResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "DeleteAssetResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return DeleteAssetResponseDto(
status: DeleteAssetStatus.fromJson(json[r'status'])!,
id: mapValueOfType<String>(json, r'id')!,
);
}
return null;
}
static List<DeleteAssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeleteAssetResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeleteAssetResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DeleteAssetResponseDto> mapFromJson(dynamic json) {
final map = <String, DeleteAssetResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeleteAssetResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DeleteAssetResponseDto-objects as value to a dart map
static Map<String, List<DeleteAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeleteAssetResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeleteAssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'status',
'id',
};
}

View File

@ -0,0 +1,85 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeleteAssetStatus {
/// Instantiate a new enum with the provided [value].
const DeleteAssetStatus._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const SUCCESS = DeleteAssetStatus._(r'SUCCESS');
static const FAILED = DeleteAssetStatus._(r'FAILED');
/// List of all possible values in this [enum][DeleteAssetStatus].
static const values = <DeleteAssetStatus>[
SUCCESS,
FAILED,
];
static DeleteAssetStatus? fromJson(dynamic value) => DeleteAssetStatusTypeTransformer().decode(value);
static List<DeleteAssetStatus>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeleteAssetStatus>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeleteAssetStatus.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [DeleteAssetStatus] to String,
/// and [decode] dynamic data back to [DeleteAssetStatus].
class DeleteAssetStatusTypeTransformer {
factory DeleteAssetStatusTypeTransformer() => _instance ??= const DeleteAssetStatusTypeTransformer._();
const DeleteAssetStatusTypeTransformer._();
String encode(DeleteAssetStatus data) => data.value;
/// Decodes a [dynamic value][data] to a DeleteAssetStatus.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
DeleteAssetStatus? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
case r'SUCCESS': return DeleteAssetStatus.SUCCESS;
case r'FAILED': return DeleteAssetStatus.FAILED;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [DeleteAssetStatusTypeTransformer] instance.
static DeleteAssetStatusTypeTransformer? _instance;
}

View File

@ -0,0 +1,151 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeviceInfoResponseDto {
/// Returns a new [DeviceInfoResponseDto] instance.
DeviceInfoResponseDto({
required this.id,
required this.deviceType,
required this.userId,
required this.deviceId,
required this.createdAt,
required this.isAutoBackup,
});
int id;
DeviceTypeEnum deviceType;
String userId;
String deviceId;
String createdAt;
bool isAutoBackup;
@override
bool operator ==(Object other) => identical(this, other) || other is DeviceInfoResponseDto &&
other.id == id &&
other.deviceType == deviceType &&
other.userId == userId &&
other.deviceId == deviceId &&
other.createdAt == createdAt &&
other.isAutoBackup == isAutoBackup;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(deviceType.hashCode) +
(userId.hashCode) +
(deviceId.hashCode) +
(createdAt.hashCode) +
(isAutoBackup.hashCode);
@override
String toString() => 'DeviceInfoResponseDto[id=$id, deviceType=$deviceType, userId=$userId, deviceId=$deviceId, createdAt=$createdAt, isAutoBackup=$isAutoBackup]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'deviceType'] = deviceType;
_json[r'userId'] = userId;
_json[r'deviceId'] = deviceId;
_json[r'createdAt'] = createdAt;
_json[r'isAutoBackup'] = isAutoBackup;
return _json;
}
/// Returns a new [DeviceInfoResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DeviceInfoResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "DeviceInfoResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "DeviceInfoResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return DeviceInfoResponseDto(
id: mapValueOfType<int>(json, r'id')!,
deviceType: DeviceTypeEnum.fromJson(json[r'deviceType'])!,
userId: mapValueOfType<String>(json, r'userId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
createdAt: mapValueOfType<String>(json, r'createdAt')!,
isAutoBackup: mapValueOfType<bool>(json, r'isAutoBackup')!,
);
}
return null;
}
static List<DeviceInfoResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeviceInfoResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeviceInfoResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DeviceInfoResponseDto> mapFromJson(dynamic json) {
final map = <String, DeviceInfoResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeviceInfoResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DeviceInfoResponseDto-objects as value to a dart map
static Map<String, List<DeviceInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeviceInfoResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DeviceInfoResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'deviceType',
'userId',
'deviceId',
'createdAt',
'isAutoBackup',
};
}

View File

@ -0,0 +1,88 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DeviceTypeEnum {
/// Instantiate a new enum with the provided [value].
const DeviceTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const IOS = DeviceTypeEnum._(r'IOS');
static const ANDROID = DeviceTypeEnum._(r'ANDROID');
static const WEB = DeviceTypeEnum._(r'WEB');
/// List of all possible values in this [enum][DeviceTypeEnum].
static const values = <DeviceTypeEnum>[
IOS,
ANDROID,
WEB,
];
static DeviceTypeEnum? fromJson(dynamic value) => DeviceTypeEnumTypeTransformer().decode(value);
static List<DeviceTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeviceTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DeviceTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [DeviceTypeEnum] to String,
/// and [decode] dynamic data back to [DeviceTypeEnum].
class DeviceTypeEnumTypeTransformer {
factory DeviceTypeEnumTypeTransformer() => _instance ??= const DeviceTypeEnumTypeTransformer._();
const DeviceTypeEnumTypeTransformer._();
String encode(DeviceTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a DeviceTypeEnum.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
DeviceTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data.toString()) {
case r'IOS': return DeviceTypeEnum.IOS;
case r'ANDROID': return DeviceTypeEnum.ANDROID;
case r'WEB': return DeviceTypeEnum.WEB;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [DeviceTypeEnumTypeTransformer] instance.
static DeviceTypeEnumTypeTransformer? _instance;
}

View File

@ -0,0 +1,341 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ExifResponseDto {
/// Returns a new [ExifResponseDto] instance.
ExifResponseDto({
this.id,
this.make,
this.model,
this.imageName,
this.exifImageWidth,
this.exifImageHeight,
this.fileSizeInByte,
this.orientation,
this.dateTimeOriginal,
this.modifyDate,
this.lensModel,
this.fNumber,
this.focalLength,
this.iso,
this.exposureTime,
this.latitude,
this.longitude,
this.city,
this.state,
this.country,
});
String? id;
String? make;
String? model;
String? imageName;
num? exifImageWidth;
num? exifImageHeight;
num? fileSizeInByte;
String? orientation;
DateTime? dateTimeOriginal;
DateTime? modifyDate;
String? lensModel;
num? fNumber;
num? focalLength;
num? iso;
num? exposureTime;
num? latitude;
num? longitude;
String? city;
String? state;
String? country;
@override
bool operator ==(Object other) => identical(this, other) || other is ExifResponseDto &&
other.id == id &&
other.make == make &&
other.model == model &&
other.imageName == imageName &&
other.exifImageWidth == exifImageWidth &&
other.exifImageHeight == exifImageHeight &&
other.fileSizeInByte == fileSizeInByte &&
other.orientation == orientation &&
other.dateTimeOriginal == dateTimeOriginal &&
other.modifyDate == modifyDate &&
other.lensModel == lensModel &&
other.fNumber == fNumber &&
other.focalLength == focalLength &&
other.iso == iso &&
other.exposureTime == exposureTime &&
other.latitude == latitude &&
other.longitude == longitude &&
other.city == city &&
other.state == state &&
other.country == country;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(imageName == null ? 0 : imageName!.hashCode) +
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
(orientation == null ? 0 : orientation!.hashCode) +
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
(modifyDate == null ? 0 : modifyDate!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(fNumber == null ? 0 : fNumber!.hashCode) +
(focalLength == null ? 0 : focalLength!.hashCode) +
(iso == null ? 0 : iso!.hashCode) +
(exposureTime == null ? 0 : exposureTime!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(city == null ? 0 : city!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(country == null ? 0 : country!.hashCode);
@override
String toString() => 'ExifResponseDto[id=$id, make=$make, model=$model, imageName=$imageName, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, fileSizeInByte=$fileSizeInByte, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
if (id != null) {
_json[r'id'] = id;
} else {
_json[r'id'] = null;
}
if (make != null) {
_json[r'make'] = make;
} else {
_json[r'make'] = null;
}
if (model != null) {
_json[r'model'] = model;
} else {
_json[r'model'] = null;
}
if (imageName != null) {
_json[r'imageName'] = imageName;
} else {
_json[r'imageName'] = null;
}
if (exifImageWidth != null) {
_json[r'exifImageWidth'] = exifImageWidth;
} else {
_json[r'exifImageWidth'] = null;
}
if (exifImageHeight != null) {
_json[r'exifImageHeight'] = exifImageHeight;
} else {
_json[r'exifImageHeight'] = null;
}
if (fileSizeInByte != null) {
_json[r'fileSizeInByte'] = fileSizeInByte;
} else {
_json[r'fileSizeInByte'] = null;
}
if (orientation != null) {
_json[r'orientation'] = orientation;
} else {
_json[r'orientation'] = null;
}
if (dateTimeOriginal != null) {
_json[r'dateTimeOriginal'] = dateTimeOriginal!.toUtc().toIso8601String();
} else {
_json[r'dateTimeOriginal'] = null;
}
if (modifyDate != null) {
_json[r'modifyDate'] = modifyDate!.toUtc().toIso8601String();
} else {
_json[r'modifyDate'] = null;
}
if (lensModel != null) {
_json[r'lensModel'] = lensModel;
} else {
_json[r'lensModel'] = null;
}
if (fNumber != null) {
_json[r'fNumber'] = fNumber;
} else {
_json[r'fNumber'] = null;
}
if (focalLength != null) {
_json[r'focalLength'] = focalLength;
} else {
_json[r'focalLength'] = null;
}
if (iso != null) {
_json[r'iso'] = iso;
} else {
_json[r'iso'] = null;
}
if (exposureTime != null) {
_json[r'exposureTime'] = exposureTime;
} else {
_json[r'exposureTime'] = null;
}
if (latitude != null) {
_json[r'latitude'] = latitude;
} else {
_json[r'latitude'] = null;
}
if (longitude != null) {
_json[r'longitude'] = longitude;
} else {
_json[r'longitude'] = null;
}
if (city != null) {
_json[r'city'] = city;
} else {
_json[r'city'] = null;
}
if (state != null) {
_json[r'state'] = state;
} else {
_json[r'state'] = null;
}
if (country != null) {
_json[r'country'] = country;
} else {
_json[r'country'] = null;
}
return _json;
}
/// Returns a new [ExifResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ExifResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "ExifResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "ExifResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return ExifResponseDto(
id: mapValueOfType<String>(json, r'id'),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
imageName: mapValueOfType<String>(json, r'imageName'),
exifImageWidth: json[r'exifImageWidth'] == null
? null
: num.parse(json[r'exifImageWidth'].toString()),
exifImageHeight: json[r'exifImageHeight'] == null
? null
: num.parse(json[r'exifImageHeight'].toString()),
fileSizeInByte: json[r'fileSizeInByte'] == null
? null
: num.parse(json[r'fileSizeInByte'].toString()),
orientation: mapValueOfType<String>(json, r'orientation'),
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', ''),
modifyDate: mapDateTime(json, r'modifyDate', ''),
lensModel: mapValueOfType<String>(json, r'lensModel'),
fNumber: json[r'fNumber'] == null
? null
: num.parse(json[r'fNumber'].toString()),
focalLength: json[r'focalLength'] == null
? null
: num.parse(json[r'focalLength'].toString()),
iso: json[r'iso'] == null
? null
: num.parse(json[r'iso'].toString()),
exposureTime: json[r'exposureTime'] == null
? null
: num.parse(json[r'exposureTime'].toString()),
latitude: json[r'latitude'] == null
? null
: num.parse(json[r'latitude'].toString()),
longitude: json[r'longitude'] == null
? null
: num.parse(json[r'longitude'].toString()),
city: mapValueOfType<String>(json, r'city'),
state: mapValueOfType<String>(json, r'state'),
country: mapValueOfType<String>(json, r'country'),
);
}
return null;
}
static List<ExifResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <ExifResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ExifResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ExifResponseDto> mapFromJson(dynamic json) {
final map = <String, ExifResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ExifResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ExifResponseDto-objects as value to a dart map
static Map<String, List<ExifResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ExifResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ExifResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,119 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class LoginCredentialDto {
/// Returns a new [LoginCredentialDto] instance.
LoginCredentialDto({
required this.email,
required this.password,
});
String email;
String password;
@override
bool operator ==(Object other) => identical(this, other) || other is LoginCredentialDto &&
other.email == email &&
other.password == password;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(email.hashCode) +
(password.hashCode);
@override
String toString() => 'LoginCredentialDto[email=$email, password=$password]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'email'] = email;
_json[r'password'] = password;
return _json;
}
/// Returns a new [LoginCredentialDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LoginCredentialDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "LoginCredentialDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "LoginCredentialDto[$key]" has a null value in JSON.');
});
return true;
}());
return LoginCredentialDto(
email: mapValueOfType<String>(json, r'email')!,
password: mapValueOfType<String>(json, r'password')!,
);
}
return null;
}
static List<LoginCredentialDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <LoginCredentialDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LoginCredentialDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, LoginCredentialDto> mapFromJson(dynamic json) {
final map = <String, LoginCredentialDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LoginCredentialDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of LoginCredentialDto-objects as value to a dart map
static Map<String, List<LoginCredentialDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LoginCredentialDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LoginCredentialDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'email',
'password',
};
}

View File

@ -0,0 +1,167 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class LoginResponseDto {
/// Returns a new [LoginResponseDto] instance.
LoginResponseDto({
required this.accessToken,
required this.userId,
required this.userEmail,
required this.firstName,
required this.lastName,
required this.profileImagePath,
required this.isAdmin,
required this.shouldChangePassword,
});
String accessToken;
String userId;
String userEmail;
String firstName;
String lastName;
String profileImagePath;
bool isAdmin;
bool shouldChangePassword;
@override
bool operator ==(Object other) => identical(this, other) || other is LoginResponseDto &&
other.accessToken == accessToken &&
other.userId == userId &&
other.userEmail == userEmail &&
other.firstName == firstName &&
other.lastName == lastName &&
other.profileImagePath == profileImagePath &&
other.isAdmin == isAdmin &&
other.shouldChangePassword == shouldChangePassword;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(accessToken.hashCode) +
(userId.hashCode) +
(userEmail.hashCode) +
(firstName.hashCode) +
(lastName.hashCode) +
(profileImagePath.hashCode) +
(isAdmin.hashCode) +
(shouldChangePassword.hashCode);
@override
String toString() => 'LoginResponseDto[accessToken=$accessToken, userId=$userId, userEmail=$userEmail, firstName=$firstName, lastName=$lastName, profileImagePath=$profileImagePath, isAdmin=$isAdmin, shouldChangePassword=$shouldChangePassword]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'accessToken'] = accessToken;
_json[r'userId'] = userId;
_json[r'userEmail'] = userEmail;
_json[r'firstName'] = firstName;
_json[r'lastName'] = lastName;
_json[r'profileImagePath'] = profileImagePath;
_json[r'isAdmin'] = isAdmin;
_json[r'shouldChangePassword'] = shouldChangePassword;
return _json;
}
/// Returns a new [LoginResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LoginResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "LoginResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "LoginResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return LoginResponseDto(
accessToken: mapValueOfType<String>(json, r'accessToken')!,
userId: mapValueOfType<String>(json, r'userId')!,
userEmail: mapValueOfType<String>(json, r'userEmail')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
);
}
return null;
}
static List<LoginResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <LoginResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LoginResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, LoginResponseDto> mapFromJson(dynamic json) {
final map = <String, LoginResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LoginResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of LoginResponseDto-objects as value to a dart map
static Map<String, List<LoginResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LoginResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LoginResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'accessToken',
'userId',
'userEmail',
'firstName',
'lastName',
'profileImagePath',
'isAdmin',
'shouldChangePassword',
};
}

View File

@ -0,0 +1,113 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class RemoveAssetsDto {
/// Returns a new [RemoveAssetsDto] instance.
RemoveAssetsDto({
this.assetIds = const [],
});
List<String> assetIds;
@override
bool operator ==(Object other) => identical(this, other) || other is RemoveAssetsDto &&
other.assetIds == assetIds;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetIds.hashCode);
@override
String toString() => 'RemoveAssetsDto[assetIds=$assetIds]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'assetIds'] = assetIds;
return _json;
}
/// Returns a new [RemoveAssetsDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static RemoveAssetsDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "RemoveAssetsDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "RemoveAssetsDto[$key]" has a null value in JSON.');
});
return true;
}());
return RemoveAssetsDto(
assetIds: json[r'assetIds'] is List
? (json[r'assetIds'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<RemoveAssetsDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <RemoveAssetsDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = RemoveAssetsDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, RemoveAssetsDto> mapFromJson(dynamic json) {
final map = <String, RemoveAssetsDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RemoveAssetsDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of RemoveAssetsDto-objects as value to a dart map
static Map<String, List<RemoveAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RemoveAssetsDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = RemoveAssetsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetIds',
};
}

View File

@ -0,0 +1,111 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SearchAssetDto {
/// Returns a new [SearchAssetDto] instance.
SearchAssetDto({
required this.searchTerm,
});
String searchTerm;
@override
bool operator ==(Object other) => identical(this, other) || other is SearchAssetDto &&
other.searchTerm == searchTerm;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(searchTerm.hashCode);
@override
String toString() => 'SearchAssetDto[searchTerm=$searchTerm]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'searchTerm'] = searchTerm;
return _json;
}
/// Returns a new [SearchAssetDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SearchAssetDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SearchAssetDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SearchAssetDto[$key]" has a null value in JSON.');
});
return true;
}());
return SearchAssetDto(
searchTerm: mapValueOfType<String>(json, r'searchTerm')!,
);
}
return null;
}
static List<SearchAssetDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchAssetDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SearchAssetDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SearchAssetDto> mapFromJson(dynamic json) {
final map = <String, SearchAssetDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SearchAssetDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SearchAssetDto-objects as value to a dart map
static Map<String, List<SearchAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchAssetDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SearchAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'searchTerm',
};
}

View File

@ -0,0 +1,159 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ServerInfoResponseDto {
/// Returns a new [ServerInfoResponseDto] instance.
ServerInfoResponseDto({
required this.diskSizeRaw,
required this.diskUseRaw,
required this.diskAvailableRaw,
required this.diskUsagePercentage,
required this.diskSize,
required this.diskUse,
required this.diskAvailable,
});
int diskSizeRaw;
int diskUseRaw;
int diskAvailableRaw;
double diskUsagePercentage;
String diskSize;
String diskUse;
String diskAvailable;
@override
bool operator ==(Object other) => identical(this, other) || other is ServerInfoResponseDto &&
other.diskSizeRaw == diskSizeRaw &&
other.diskUseRaw == diskUseRaw &&
other.diskAvailableRaw == diskAvailableRaw &&
other.diskUsagePercentage == diskUsagePercentage &&
other.diskSize == diskSize &&
other.diskUse == diskUse &&
other.diskAvailable == diskAvailable;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(diskSizeRaw.hashCode) +
(diskUseRaw.hashCode) +
(diskAvailableRaw.hashCode) +
(diskUsagePercentage.hashCode) +
(diskSize.hashCode) +
(diskUse.hashCode) +
(diskAvailable.hashCode);
@override
String toString() => 'ServerInfoResponseDto[diskSizeRaw=$diskSizeRaw, diskUseRaw=$diskUseRaw, diskAvailableRaw=$diskAvailableRaw, diskUsagePercentage=$diskUsagePercentage, diskSize=$diskSize, diskUse=$diskUse, diskAvailable=$diskAvailable]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'diskSizeRaw'] = diskSizeRaw;
_json[r'diskUseRaw'] = diskUseRaw;
_json[r'diskAvailableRaw'] = diskAvailableRaw;
_json[r'diskUsagePercentage'] = diskUsagePercentage;
_json[r'diskSize'] = diskSize;
_json[r'diskUse'] = diskUse;
_json[r'diskAvailable'] = diskAvailable;
return _json;
}
/// Returns a new [ServerInfoResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ServerInfoResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "ServerInfoResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "ServerInfoResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return ServerInfoResponseDto(
diskSizeRaw: mapValueOfType<int>(json, r'diskSizeRaw')!,
diskUseRaw: mapValueOfType<int>(json, r'diskUseRaw')!,
diskAvailableRaw: mapValueOfType<int>(json, r'diskAvailableRaw')!,
diskUsagePercentage: mapValueOfType<double>(json, r'diskUsagePercentage')!,
diskSize: mapValueOfType<String>(json, r'diskSize')!,
diskUse: mapValueOfType<String>(json, r'diskUse')!,
diskAvailable: mapValueOfType<String>(json, r'diskAvailable')!,
);
}
return null;
}
static List<ServerInfoResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerInfoResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ServerInfoResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ServerInfoResponseDto> mapFromJson(dynamic json) {
final map = <String, ServerInfoResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerInfoResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ServerInfoResponseDto-objects as value to a dart map
static Map<String, List<ServerInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerInfoResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerInfoResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'diskSizeRaw',
'diskUseRaw',
'diskAvailableRaw',
'diskUsagePercentage',
'diskSize',
'diskUse',
'diskAvailable',
};
}

View File

@ -0,0 +1,111 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ServerPingResponse {
/// Returns a new [ServerPingResponse] instance.
ServerPingResponse({
required this.res,
});
String res;
@override
bool operator ==(Object other) => identical(this, other) || other is ServerPingResponse &&
other.res == res;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(res.hashCode);
@override
String toString() => 'ServerPingResponse[res=$res]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'res'] = res;
return _json;
}
/// Returns a new [ServerPingResponse] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ServerPingResponse? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "ServerPingResponse[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "ServerPingResponse[$key]" has a null value in JSON.');
});
return true;
}());
return ServerPingResponse(
res: mapValueOfType<String>(json, r'res')!,
);
}
return null;
}
static List<ServerPingResponse>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerPingResponse>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ServerPingResponse.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ServerPingResponse> mapFromJson(dynamic json) {
final map = <String, ServerPingResponse>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerPingResponse.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ServerPingResponse-objects as value to a dart map
static Map<String, List<ServerPingResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerPingResponse>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerPingResponse.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'res',
};
}

View File

@ -0,0 +1,135 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class ServerVersionReponseDto {
/// Returns a new [ServerVersionReponseDto] instance.
ServerVersionReponseDto({
required this.major,
required this.minor,
required this.patch_,
required this.build,
});
int major;
int minor;
int patch_;
int build;
@override
bool operator ==(Object other) => identical(this, other) || other is ServerVersionReponseDto &&
other.major == major &&
other.minor == minor &&
other.patch_ == patch_ &&
other.build == build;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(major.hashCode) +
(minor.hashCode) +
(patch_.hashCode) +
(build.hashCode);
@override
String toString() => 'ServerVersionReponseDto[major=$major, minor=$minor, patch_=$patch_, build=$build]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'major'] = major;
_json[r'minor'] = minor;
_json[r'patch'] = patch_;
_json[r'build'] = build;
return _json;
}
/// Returns a new [ServerVersionReponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ServerVersionReponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "ServerVersionReponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "ServerVersionReponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return ServerVersionReponseDto(
major: mapValueOfType<int>(json, r'major')!,
minor: mapValueOfType<int>(json, r'minor')!,
patch_: mapValueOfType<int>(json, r'patch')!,
build: mapValueOfType<int>(json, r'build')!,
);
}
return null;
}
static List<ServerVersionReponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerVersionReponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ServerVersionReponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ServerVersionReponseDto> mapFromJson(dynamic json) {
final map = <String, ServerVersionReponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerVersionReponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ServerVersionReponseDto-objects as value to a dart map
static Map<String, List<ServerVersionReponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerVersionReponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ServerVersionReponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'major',
'minor',
'patch',
'build',
};
}

View File

@ -0,0 +1,135 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SignUpDto {
/// Returns a new [SignUpDto] instance.
SignUpDto({
required this.email,
required this.password,
required this.firstName,
required this.lastName,
});
String email;
String password;
String firstName;
String lastName;
@override
bool operator ==(Object other) => identical(this, other) || other is SignUpDto &&
other.email == email &&
other.password == password &&
other.firstName == firstName &&
other.lastName == lastName;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(email.hashCode) +
(password.hashCode) +
(firstName.hashCode) +
(lastName.hashCode);
@override
String toString() => 'SignUpDto[email=$email, password=$password, firstName=$firstName, lastName=$lastName]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'email'] = email;
_json[r'password'] = password;
_json[r'firstName'] = firstName;
_json[r'lastName'] = lastName;
return _json;
}
/// Returns a new [SignUpDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SignUpDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SignUpDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SignUpDto[$key]" has a null value in JSON.');
});
return true;
}());
return SignUpDto(
email: mapValueOfType<String>(json, r'email')!,
password: mapValueOfType<String>(json, r'password')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
);
}
return null;
}
static List<SignUpDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <SignUpDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SignUpDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SignUpDto> mapFromJson(dynamic json) {
final map = <String, SignUpDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SignUpDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SignUpDto-objects as value to a dart map
static Map<String, List<SignUpDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SignUpDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SignUpDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'email',
'password',
'firstName',
'lastName',
};
}

View File

@ -0,0 +1,146 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class SmartInfoResponseDto {
/// Returns a new [SmartInfoResponseDto] instance.
SmartInfoResponseDto({
this.id,
this.tags = const [],
this.objects = const [],
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? id;
List<String>? tags;
List<String>? objects;
@override
bool operator ==(Object other) => identical(this, other) || other is SmartInfoResponseDto &&
other.id == id &&
other.tags == tags &&
other.objects == objects;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id == null ? 0 : id!.hashCode) +
(tags == null ? 0 : tags!.hashCode) +
(objects == null ? 0 : objects!.hashCode);
@override
String toString() => 'SmartInfoResponseDto[id=$id, tags=$tags, objects=$objects]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
if (id != null) {
_json[r'id'] = id;
} else {
_json[r'id'] = null;
}
if (tags != null) {
_json[r'tags'] = tags;
} else {
_json[r'tags'] = null;
}
if (objects != null) {
_json[r'objects'] = objects;
} else {
_json[r'objects'] = null;
}
return _json;
}
/// Returns a new [SmartInfoResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SmartInfoResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "SmartInfoResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "SmartInfoResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return SmartInfoResponseDto(
id: mapValueOfType<String>(json, r'id'),
tags: json[r'tags'] is List
? (json[r'tags'] as List).cast<String>()
: const [],
objects: json[r'objects'] is List
? (json[r'objects'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<SmartInfoResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <SmartInfoResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SmartInfoResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SmartInfoResponseDto> mapFromJson(dynamic json) {
final map = <String, SmartInfoResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SmartInfoResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SmartInfoResponseDto-objects as value to a dart map
static Map<String, List<SmartInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SmartInfoResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SmartInfoResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}

View File

@ -0,0 +1,119 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UpdateAlbumDto {
/// Returns a new [UpdateAlbumDto] instance.
UpdateAlbumDto({
required this.albumName,
required this.ownerId,
});
String albumName;
String ownerId;
@override
bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumDto &&
other.albumName == albumName &&
other.ownerId == ownerId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumName.hashCode) +
(ownerId.hashCode);
@override
String toString() => 'UpdateAlbumDto[albumName=$albumName, ownerId=$ownerId]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'albumName'] = albumName;
_json[r'ownerId'] = ownerId;
return _json;
}
/// Returns a new [UpdateAlbumDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UpdateAlbumDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "UpdateAlbumDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "UpdateAlbumDto[$key]" has a null value in JSON.');
});
return true;
}());
return UpdateAlbumDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
);
}
return null;
}
static List<UpdateAlbumDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateAlbumDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UpdateAlbumDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UpdateAlbumDto> mapFromJson(dynamic json) {
final map = <String, UpdateAlbumDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateAlbumDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UpdateAlbumDto-objects as value to a dart map
static Map<String, List<UpdateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateAlbumDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateAlbumDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'albumName',
'ownerId',
};
}

View File

@ -0,0 +1,136 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UpdateDeviceInfoDto {
/// Returns a new [UpdateDeviceInfoDto] instance.
UpdateDeviceInfoDto({
required this.deviceType,
required this.deviceId,
this.isAutoBackup,
});
DeviceTypeEnum deviceType;
String deviceId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isAutoBackup;
@override
bool operator ==(Object other) => identical(this, other) || other is UpdateDeviceInfoDto &&
other.deviceType == deviceType &&
other.deviceId == deviceId &&
other.isAutoBackup == isAutoBackup;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(deviceType.hashCode) +
(deviceId.hashCode) +
(isAutoBackup == null ? 0 : isAutoBackup!.hashCode);
@override
String toString() => 'UpdateDeviceInfoDto[deviceType=$deviceType, deviceId=$deviceId, isAutoBackup=$isAutoBackup]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'deviceType'] = deviceType;
_json[r'deviceId'] = deviceId;
if (isAutoBackup != null) {
_json[r'isAutoBackup'] = isAutoBackup;
} else {
_json[r'isAutoBackup'] = null;
}
return _json;
}
/// Returns a new [UpdateDeviceInfoDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UpdateDeviceInfoDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "UpdateDeviceInfoDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "UpdateDeviceInfoDto[$key]" has a null value in JSON.');
});
return true;
}());
return UpdateDeviceInfoDto(
deviceType: DeviceTypeEnum.fromJson(json[r'deviceType'])!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
isAutoBackup: mapValueOfType<bool>(json, r'isAutoBackup'),
);
}
return null;
}
static List<UpdateDeviceInfoDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateDeviceInfoDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UpdateDeviceInfoDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UpdateDeviceInfoDto> mapFromJson(dynamic json) {
final map = <String, UpdateDeviceInfoDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateDeviceInfoDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UpdateDeviceInfoDto-objects as value to a dart map
static Map<String, List<UpdateDeviceInfoDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateDeviceInfoDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateDeviceInfoDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'deviceType',
'deviceId',
};
}

View File

@ -0,0 +1,213 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UpdateUserDto {
/// Returns a new [UpdateUserDto] instance.
UpdateUserDto({
required this.id,
this.password,
this.firstName,
this.lastName,
this.isAdmin,
this.shouldChangePassword,
this.profileImagePath,
});
String id;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? password;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? firstName;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? lastName;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? isAdmin;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? shouldChangePassword;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? profileImagePath;
@override
bool operator ==(Object other) => identical(this, other) || other is UpdateUserDto &&
other.id == id &&
other.password == password &&
other.firstName == firstName &&
other.lastName == lastName &&
other.isAdmin == isAdmin &&
other.shouldChangePassword == shouldChangePassword &&
other.profileImagePath == profileImagePath;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(password == null ? 0 : password!.hashCode) +
(firstName == null ? 0 : firstName!.hashCode) +
(lastName == null ? 0 : lastName!.hashCode) +
(isAdmin == null ? 0 : isAdmin!.hashCode) +
(shouldChangePassword == null ? 0 : shouldChangePassword!.hashCode) +
(profileImagePath == null ? 0 : profileImagePath!.hashCode);
@override
String toString() => 'UpdateUserDto[id=$id, password=$password, firstName=$firstName, lastName=$lastName, isAdmin=$isAdmin, shouldChangePassword=$shouldChangePassword, profileImagePath=$profileImagePath]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
if (password != null) {
_json[r'password'] = password;
} else {
_json[r'password'] = null;
}
if (firstName != null) {
_json[r'firstName'] = firstName;
} else {
_json[r'firstName'] = null;
}
if (lastName != null) {
_json[r'lastName'] = lastName;
} else {
_json[r'lastName'] = null;
}
if (isAdmin != null) {
_json[r'isAdmin'] = isAdmin;
} else {
_json[r'isAdmin'] = null;
}
if (shouldChangePassword != null) {
_json[r'shouldChangePassword'] = shouldChangePassword;
} else {
_json[r'shouldChangePassword'] = null;
}
if (profileImagePath != null) {
_json[r'profileImagePath'] = profileImagePath;
} else {
_json[r'profileImagePath'] = null;
}
return _json;
}
/// Returns a new [UpdateUserDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UpdateUserDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "UpdateUserDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "UpdateUserDto[$key]" has a null value in JSON.');
});
return true;
}());
return UpdateUserDto(
id: mapValueOfType<String>(json, r'id')!,
password: mapValueOfType<String>(json, r'password'),
firstName: mapValueOfType<String>(json, r'firstName'),
lastName: mapValueOfType<String>(json, r'lastName'),
isAdmin: mapValueOfType<bool>(json, r'isAdmin'),
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword'),
profileImagePath: mapValueOfType<String>(json, r'profileImagePath'),
);
}
return null;
}
static List<UpdateUserDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateUserDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UpdateUserDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UpdateUserDto> mapFromJson(dynamic json) {
final map = <String, UpdateUserDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateUserDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UpdateUserDto-objects as value to a dart map
static Map<String, List<UpdateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateUserDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UpdateUserDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
};
}

View File

@ -0,0 +1,111 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UserCountResponseDto {
/// Returns a new [UserCountResponseDto] instance.
UserCountResponseDto({
required this.userCount,
});
int userCount;
@override
bool operator ==(Object other) => identical(this, other) || other is UserCountResponseDto &&
other.userCount == userCount;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(userCount.hashCode);
@override
String toString() => 'UserCountResponseDto[userCount=$userCount]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'userCount'] = userCount;
return _json;
}
/// Returns a new [UserCountResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UserCountResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "UserCountResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "UserCountResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return UserCountResponseDto(
userCount: mapValueOfType<int>(json, r'userCount')!,
);
}
return null;
}
static List<UserCountResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserCountResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserCountResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UserCountResponseDto> mapFromJson(dynamic json) {
final map = <String, UserCountResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UserCountResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UserCountResponseDto-objects as value to a dart map
static Map<String, List<UserCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UserCountResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UserCountResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'userCount',
};
}

View File

@ -0,0 +1,167 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.12
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class UserResponseDto {
/// Returns a new [UserResponseDto] instance.
UserResponseDto({
required this.id,
required this.email,
required this.firstName,
required this.lastName,
required this.createdAt,
required this.profileImagePath,
required this.shouldChangePassword,
required this.isAdmin,
});
String id;
String email;
String firstName;
String lastName;
String createdAt;
String profileImagePath;
bool shouldChangePassword;
bool isAdmin;
@override
bool operator ==(Object other) => identical(this, other) || other is UserResponseDto &&
other.id == id &&
other.email == email &&
other.firstName == firstName &&
other.lastName == lastName &&
other.createdAt == createdAt &&
other.profileImagePath == profileImagePath &&
other.shouldChangePassword == shouldChangePassword &&
other.isAdmin == isAdmin;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(id.hashCode) +
(email.hashCode) +
(firstName.hashCode) +
(lastName.hashCode) +
(createdAt.hashCode) +
(profileImagePath.hashCode) +
(shouldChangePassword.hashCode) +
(isAdmin.hashCode);
@override
String toString() => 'UserResponseDto[id=$id, email=$email, firstName=$firstName, lastName=$lastName, createdAt=$createdAt, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, isAdmin=$isAdmin]';
Map<String, dynamic> toJson() {
final _json = <String, dynamic>{};
_json[r'id'] = id;
_json[r'email'] = email;
_json[r'firstName'] = firstName;
_json[r'lastName'] = lastName;
_json[r'createdAt'] = createdAt;
_json[r'profileImagePath'] = profileImagePath;
_json[r'shouldChangePassword'] = shouldChangePassword;
_json[r'isAdmin'] = isAdmin;
return _json;
}
/// Returns a new [UserResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UserResponseDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
requiredKeys.forEach((key) {
assert(json.containsKey(key), 'Required key "UserResponseDto[$key]" is missing from JSON.');
assert(json[key] != null, 'Required key "UserResponseDto[$key]" has a null value in JSON.');
});
return true;
}());
return UserResponseDto(
id: mapValueOfType<String>(json, r'id')!,
email: mapValueOfType<String>(json, r'email')!,
firstName: mapValueOfType<String>(json, r'firstName')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
createdAt: mapValueOfType<String>(json, r'createdAt')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
);
}
return null;
}
static List<UserResponseDto>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UserResponseDto> mapFromJson(dynamic json) {
final map = <String, UserResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UserResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UserResponseDto-objects as value to a dart map
static Map<String, List<UserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UserResponseDto>>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UserResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'id',
'email',
'firstName',
'lastName',
'createdAt',
'profileImagePath',
'shouldChangePassword',
'isAdmin',
};
}

Some files were not shown because too many files have changed in this diff Show More