regenerate api

This commit is contained in:
martabal 2023-10-04 14:06:18 +02:00
parent 698e45a5cb
commit 4dcc1131fa
No known key found for this signature in database
GPG key ID: C00196E3148A52BD
44 changed files with 241 additions and 6942 deletions

File diff suppressed because it is too large Load diff

View file

@ -12,7 +12,6 @@ doc/AddUsersDto.md
doc/AdminSignupResponseDto.md
doc/AlbumApi.md
doc/AlbumCountResponseDto.md
doc/AlbumEntity.md
doc/AlbumResponseDto.md
doc/AllJobStatusResponseDto.md
doc/AssetApi.md
@ -21,8 +20,7 @@ doc/AssetBulkUploadCheckDto.md
doc/AssetBulkUploadCheckItem.md
doc/AssetBulkUploadCheckResponseDto.md
doc/AssetBulkUploadCheckResult.md
doc/AssetEntity.md
doc/AssetFaceEntity.md
doc/AssetFaceBoxDto.md
doc/AssetFaceUpdateDto.md
doc/AssetFileUploadResponseDto.md
doc/AssetIdsDto.md
@ -65,7 +63,6 @@ doc/DownloadArchiveInfo.md
doc/DownloadInfoDto.md
doc/DownloadResponseDto.md
doc/EntityType.md
doc/ExifEntity.md
doc/ExifResponseDto.md
doc/ImportAssetDto.md
doc/JobApi.md
@ -76,7 +73,6 @@ doc/JobName.md
doc/JobSettingsDto.md
doc/JobStatusDto.md
doc/LibraryApi.md
doc/LibraryEntity.md
doc/LibraryResponseDto.md
doc/LibraryStatsResponseDto.md
doc/LibraryType.md
@ -97,7 +93,6 @@ doc/PeopleResponseDto.md
doc/PeopleUpdateDto.md
doc/PeopleUpdateItem.md
doc/PersonApi.md
doc/PersonEntity.md
doc/PersonResponseDto.md
doc/PersonUpdateDto.md
doc/QueueStatusDto.md
@ -123,11 +118,9 @@ doc/ServerVersionResponseDto.md
doc/SharedLinkApi.md
doc/SharedLinkCreateDto.md
doc/SharedLinkEditDto.md
doc/SharedLinkEntity.md
doc/SharedLinkResponseDto.md
doc/SharedLinkType.md
doc/SignUpDto.md
doc/SmartInfoEntity.md
doc/SmartInfoResponseDto.md
doc/SystemConfigApi.md
doc/SystemConfigDto.md
@ -142,7 +135,6 @@ doc/SystemConfigStorageTemplateDto.md
doc/SystemConfigTemplateStorageOptionDto.md
doc/SystemConfigThumbnailDto.md
doc/TagApi.md
doc/TagEntity.md
doc/TagResponseDto.md
doc/TagTypeEnum.md
doc/ThumbnailFormat.md
@ -159,7 +151,6 @@ doc/UpdateUserDto.md
doc/UsageByUserDto.md
doc/UserApi.md
doc/UserCountResponseDto.md
doc/UserEntity.md
doc/UserResponseDto.md
doc/ValidateAccessTokenResponseDto.md
doc/VideoCodec.md
@ -192,7 +183,6 @@ lib/auth/oauth.dart
lib/model/add_users_dto.dart
lib/model/admin_signup_response_dto.dart
lib/model/album_count_response_dto.dart
lib/model/album_entity.dart
lib/model/album_response_dto.dart
lib/model/all_job_status_response_dto.dart
lib/model/api_key_create_dto.dart
@ -204,8 +194,7 @@ lib/model/asset_bulk_upload_check_dto.dart
lib/model/asset_bulk_upload_check_item.dart
lib/model/asset_bulk_upload_check_response_dto.dart
lib/model/asset_bulk_upload_check_result.dart
lib/model/asset_entity.dart
lib/model/asset_face_entity.dart
lib/model/asset_face_box_dto.dart
lib/model/asset_face_update_dto.dart
lib/model/asset_file_upload_response_dto.dart
lib/model/asset_ids_dto.dart
@ -246,7 +235,6 @@ lib/model/download_archive_info.dart
lib/model/download_info_dto.dart
lib/model/download_response_dto.dart
lib/model/entity_type.dart
lib/model/exif_entity.dart
lib/model/exif_response_dto.dart
lib/model/import_asset_dto.dart
lib/model/job_command.dart
@ -255,7 +243,6 @@ lib/model/job_counts_dto.dart
lib/model/job_name.dart
lib/model/job_settings_dto.dart
lib/model/job_status_dto.dart
lib/model/library_entity.dart
lib/model/library_response_dto.dart
lib/model/library_stats_response_dto.dart
lib/model/library_type.dart
@ -273,7 +260,6 @@ lib/model/o_auth_config_response_dto.dart
lib/model/people_response_dto.dart
lib/model/people_update_dto.dart
lib/model/people_update_item.dart
lib/model/person_entity.dart
lib/model/person_response_dto.dart
lib/model/person_update_dto.dart
lib/model/queue_status_dto.dart
@ -296,11 +282,9 @@ lib/model/server_stats_response_dto.dart
lib/model/server_version_response_dto.dart
lib/model/shared_link_create_dto.dart
lib/model/shared_link_edit_dto.dart
lib/model/shared_link_entity.dart
lib/model/shared_link_response_dto.dart
lib/model/shared_link_type.dart
lib/model/sign_up_dto.dart
lib/model/smart_info_entity.dart
lib/model/smart_info_response_dto.dart
lib/model/system_config_dto.dart
lib/model/system_config_f_fmpeg_dto.dart
@ -313,7 +297,6 @@ lib/model/system_config_reverse_geocoding_dto.dart
lib/model/system_config_storage_template_dto.dart
lib/model/system_config_template_storage_option_dto.dart
lib/model/system_config_thumbnail_dto.dart
lib/model/tag_entity.dart
lib/model/tag_response_dto.dart
lib/model/tag_type_enum.dart
lib/model/thumbnail_format.dart
@ -329,7 +312,6 @@ lib/model/update_tag_dto.dart
lib/model/update_user_dto.dart
lib/model/usage_by_user_dto.dart
lib/model/user_count_response_dto.dart
lib/model/user_entity.dart
lib/model/user_response_dto.dart
lib/model/validate_access_token_response_dto.dart
lib/model/video_codec.dart
@ -338,7 +320,6 @@ test/add_users_dto_test.dart
test/admin_signup_response_dto_test.dart
test/album_api_test.dart
test/album_count_response_dto_test.dart
test/album_entity_test.dart
test/album_response_dto_test.dart
test/all_job_status_response_dto_test.dart
test/api_key_api_test.dart
@ -352,8 +333,7 @@ test/asset_bulk_upload_check_dto_test.dart
test/asset_bulk_upload_check_item_test.dart
test/asset_bulk_upload_check_response_dto_test.dart
test/asset_bulk_upload_check_result_test.dart
test/asset_entity_test.dart
test/asset_face_entity_test.dart
test/asset_face_box_dto_test.dart
test/asset_face_update_dto_test.dart
test/asset_file_upload_response_dto_test.dart
test/asset_ids_dto_test.dart
@ -396,7 +376,6 @@ test/download_archive_info_test.dart
test/download_info_dto_test.dart
test/download_response_dto_test.dart
test/entity_type_test.dart
test/exif_entity_test.dart
test/exif_response_dto_test.dart
test/import_asset_dto_test.dart
test/job_api_test.dart
@ -407,7 +386,6 @@ test/job_name_test.dart
test/job_settings_dto_test.dart
test/job_status_dto_test.dart
test/library_api_test.dart
test/library_entity_test.dart
test/library_response_dto_test.dart
test/library_stats_response_dto_test.dart
test/library_type_test.dart
@ -428,7 +406,6 @@ test/people_response_dto_test.dart
test/people_update_dto_test.dart
test/people_update_item_test.dart
test/person_api_test.dart
test/person_entity_test.dart
test/person_response_dto_test.dart
test/person_update_dto_test.dart
test/queue_status_dto_test.dart
@ -454,11 +431,9 @@ test/server_version_response_dto_test.dart
test/shared_link_api_test.dart
test/shared_link_create_dto_test.dart
test/shared_link_edit_dto_test.dart
test/shared_link_entity_test.dart
test/shared_link_response_dto_test.dart
test/shared_link_type_test.dart
test/sign_up_dto_test.dart
test/smart_info_entity_test.dart
test/smart_info_response_dto_test.dart
test/system_config_api_test.dart
test/system_config_dto_test.dart
@ -473,7 +448,6 @@ test/system_config_storage_template_dto_test.dart
test/system_config_template_storage_option_dto_test.dart
test/system_config_thumbnail_dto_test.dart
test/tag_api_test.dart
test/tag_entity_test.dart
test/tag_response_dto_test.dart
test/tag_type_enum_test.dart
test/thumbnail_format_test.dart
@ -490,7 +464,6 @@ test/update_user_dto_test.dart
test/usage_by_user_dto_test.dart
test/user_api_test.dart
test/user_count_response_dto_test.dart
test/user_entity_test.dart
test/user_response_dto_test.dart
test/validate_access_token_response_dto_test.dart
test/video_codec_test.dart

View file

@ -202,7 +202,6 @@ Class | Method | HTTP request | Description
- [AddUsersDto](doc//AddUsersDto.md)
- [AdminSignupResponseDto](doc//AdminSignupResponseDto.md)
- [AlbumCountResponseDto](doc//AlbumCountResponseDto.md)
- [AlbumEntity](doc//AlbumEntity.md)
- [AlbumResponseDto](doc//AlbumResponseDto.md)
- [AllJobStatusResponseDto](doc//AllJobStatusResponseDto.md)
- [AssetBulkUpdateDto](doc//AssetBulkUpdateDto.md)
@ -210,8 +209,7 @@ Class | Method | HTTP request | Description
- [AssetBulkUploadCheckItem](doc//AssetBulkUploadCheckItem.md)
- [AssetBulkUploadCheckResponseDto](doc//AssetBulkUploadCheckResponseDto.md)
- [AssetBulkUploadCheckResult](doc//AssetBulkUploadCheckResult.md)
- [AssetEntity](doc//AssetEntity.md)
- [AssetFaceEntity](doc//AssetFaceEntity.md)
- [AssetFaceBoxDto](doc//AssetFaceBoxDto.md)
- [AssetFaceUpdateDto](doc//AssetFaceUpdateDto.md)
- [AssetFileUploadResponseDto](doc//AssetFileUploadResponseDto.md)
- [AssetIdsDto](doc//AssetIdsDto.md)
@ -252,7 +250,6 @@ Class | Method | HTTP request | Description
- [DownloadInfoDto](doc//DownloadInfoDto.md)
- [DownloadResponseDto](doc//DownloadResponseDto.md)
- [EntityType](doc//EntityType.md)
- [ExifEntity](doc//ExifEntity.md)
- [ExifResponseDto](doc//ExifResponseDto.md)
- [ImportAssetDto](doc//ImportAssetDto.md)
- [JobCommand](doc//JobCommand.md)
@ -261,7 +258,6 @@ Class | Method | HTTP request | Description
- [JobName](doc//JobName.md)
- [JobSettingsDto](doc//JobSettingsDto.md)
- [JobStatusDto](doc//JobStatusDto.md)
- [LibraryEntity](doc//LibraryEntity.md)
- [LibraryResponseDto](doc//LibraryResponseDto.md)
- [LibraryStatsResponseDto](doc//LibraryStatsResponseDto.md)
- [LibraryType](doc//LibraryType.md)
@ -279,7 +275,6 @@ Class | Method | HTTP request | Description
- [PeopleResponseDto](doc//PeopleResponseDto.md)
- [PeopleUpdateDto](doc//PeopleUpdateDto.md)
- [PeopleUpdateItem](doc//PeopleUpdateItem.md)
- [PersonEntity](doc//PersonEntity.md)
- [PersonResponseDto](doc//PersonResponseDto.md)
- [PersonUpdateDto](doc//PersonUpdateDto.md)
- [QueueStatusDto](doc//QueueStatusDto.md)
@ -302,11 +297,9 @@ Class | Method | HTTP request | Description
- [ServerVersionResponseDto](doc//ServerVersionResponseDto.md)
- [SharedLinkCreateDto](doc//SharedLinkCreateDto.md)
- [SharedLinkEditDto](doc//SharedLinkEditDto.md)
- [SharedLinkEntity](doc//SharedLinkEntity.md)
- [SharedLinkResponseDto](doc//SharedLinkResponseDto.md)
- [SharedLinkType](doc//SharedLinkType.md)
- [SignUpDto](doc//SignUpDto.md)
- [SmartInfoEntity](doc//SmartInfoEntity.md)
- [SmartInfoResponseDto](doc//SmartInfoResponseDto.md)
- [SystemConfigDto](doc//SystemConfigDto.md)
- [SystemConfigFFmpegDto](doc//SystemConfigFFmpegDto.md)
@ -319,7 +312,6 @@ Class | Method | HTTP request | Description
- [SystemConfigStorageTemplateDto](doc//SystemConfigStorageTemplateDto.md)
- [SystemConfigTemplateStorageOptionDto](doc//SystemConfigTemplateStorageOptionDto.md)
- [SystemConfigThumbnailDto](doc//SystemConfigThumbnailDto.md)
- [TagEntity](doc//TagEntity.md)
- [TagResponseDto](doc//TagResponseDto.md)
- [TagTypeEnum](doc//TagTypeEnum.md)
- [ThumbnailFormat](doc//ThumbnailFormat.md)
@ -335,7 +327,6 @@ Class | Method | HTTP request | Description
- [UpdateUserDto](doc//UpdateUserDto.md)
- [UsageByUserDto](doc//UsageByUserDto.md)
- [UserCountResponseDto](doc//UserCountResponseDto.md)
- [UserEntity](doc//UserEntity.md)
- [UserResponseDto](doc//UserResponseDto.md)
- [ValidateAccessTokenResponseDto](doc//ValidateAccessTokenResponseDto.md)
- [VideoCodec](doc//VideoCodec.md)

View file

@ -1,27 +0,0 @@
# openapi.model.AlbumEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**albumName** | **String** | |
**albumThumbnailAsset** | [**AssetEntity**](AssetEntity.md) | |
**albumThumbnailAssetId** | **String** | |
**assets** | [**List<AssetEntity>**](AssetEntity.md) | | [default to const []]
**createdAt** | [**DateTime**](DateTime.md) | |
**deletedAt** | [**DateTime**](DateTime.md) | |
**description** | **String** | |
**id** | **String** | |
**owner** | [**UserEntity**](UserEntity.md) | |
**ownerId** | **String** | |
**sharedLinks** | [**List<SharedLinkEntity>**](SharedLinkEntity.md) | | [default to const []]
**sharedUsers** | [**List<UserEntity>**](UserEntity.md) | | [default to const []]
**updatedAt** | [**DateTime**](DateTime.md) | |
[[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

@ -1,49 +0,0 @@
# openapi.model.AssetEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**albums** | [**List<AlbumEntity>**](AlbumEntity.md) | | [optional] [default to const []]
**checksum** | [**Object**](.md) | |
**createdAt** | [**DateTime**](DateTime.md) | |
**deviceAssetId** | **String** | |
**deviceId** | **String** | |
**duration** | **String** | |
**encodedVideoPath** | **String** | |
**exifInfo** | [**ExifEntity**](ExifEntity.md) | | [optional]
**faces** | [**List<AssetFaceEntity>**](AssetFaceEntity.md) | | [default to const []]
**fileCreatedAt** | [**DateTime**](DateTime.md) | |
**fileModifiedAt** | [**DateTime**](DateTime.md) | |
**id** | **String** | |
**isArchived** | **bool** | |
**isExternal** | **bool** | |
**isFavorite** | **bool** | |
**isOffline** | **bool** | |
**isReadOnly** | **bool** | |
**isVisible** | **bool** | |
**library_** | [**LibraryEntity**](LibraryEntity.md) | |
**libraryId** | **String** | |
**livePhotoVideo** | [**AssetEntity**](AssetEntity.md) | |
**livePhotoVideoId** | **String** | |
**originalFileName** | **String** | |
**originalPath** | **String** | |
**owner** | [**UserEntity**](UserEntity.md) | |
**ownerId** | **String** | |
**resizePath** | **String** | |
**sharedLinks** | [**List<SharedLinkEntity>**](SharedLinkEntity.md) | | [default to const []]
**sidecarPath** | **String** | |
**smartInfo** | [**SmartInfoEntity**](SmartInfoEntity.md) | | [optional]
**tags** | [**List<TagEntity>**](TagEntity.md) | | [default to const []]
**thumbhash** | [**Object**](.md) | |
**type** | **String** | |
**updatedAt** | [**DateTime**](DateTime.md) | |
**webpPath** | **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

@ -1,4 +1,4 @@
# openapi.model.SmartInfoEntity
# openapi.model.AssetFaceBoxDto
## Load the model package
```dart
@ -8,11 +8,12 @@ import 'package:openapi/api.dart';
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset** | [**AssetEntity**](AssetEntity.md) | | [optional]
**assetId** | **String** | |
**clipEmbedding** | **List<num>** | | [default to const []]
**objects** | **List<String>** | | [default to const []]
**tags** | **List<String>** | | [default to const []]
**boundingBoxX1** | **int** | |
**boundingBoxX2** | **int** | |
**boundingBoxY1** | **int** | |
**boundingBoxY2** | **int** | |
**imageHeight** | **int** | |
**imageWidth** | **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

@ -1,25 +0,0 @@
# openapi.model.AssetFaceEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset** | [**AssetEntity**](AssetEntity.md) | |
**assetId** | **String** | |
**boundingBoxX1** | **num** | |
**boundingBoxX2** | **num** | |
**boundingBoxY1** | **num** | |
**boundingBoxY2** | **num** | |
**embedding** | **List<num>** | | [default to const []]
**imageHeight** | **num** | |
**imageWidth** | **num** | |
**person** | [**PersonEntity**](PersonEntity.md) | |
**personId** | **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

@ -1,43 +0,0 @@
# openapi.model.ExifEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset** | [**AssetEntity**](AssetEntity.md) | | [optional]
**assetId** | **String** | |
**bitsPerSample** | **num** | |
**city** | **String** | |
**colorspace** | **String** | |
**country** | **String** | |
**dateTimeOriginal** | [**DateTime**](DateTime.md) | |
**description** | **String** | General info |
**exifImageHeight** | **num** | |
**exifImageWidth** | **num** | |
**exifTextSearchableColumn** | **String** | |
**exposureTime** | **String** | |
**fNumber** | **num** | |
**fileSizeInByte** | **num** | |
**focalLength** | **num** | |
**fps** | **num** | Video info | [optional]
**iso** | **num** | |
**latitude** | **num** | |
**lensModel** | **String** | |
**livePhotoCID** | **String** | |
**longitude** | **num** | |
**make** | **String** | Image info |
**model** | **String** | |
**modifyDate** | [**DateTime**](DateTime.md) | |
**orientation** | **String** | |
**profileDescription** | **String** | |
**projectionType** | **String** | |
**state** | **String** | |
**timeZone** | **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

@ -1,27 +0,0 @@
# openapi.model.LibraryEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assets** | [**List<AssetEntity>**](AssetEntity.md) | | [default to const []]
**createdAt** | [**DateTime**](DateTime.md) | |
**deletedAt** | [**DateTime**](DateTime.md) | | [optional]
**exclusionPatterns** | **List<String>** | | [default to const []]
**id** | **String** | |
**importPaths** | **List<String>** | | [default to const []]
**isVisible** | **bool** | |
**name** | **String** | |
**owner** | [**UserEntity**](UserEntity.md) | |
**ownerId** | **String** | |
**refreshedAt** | [**DateTime**](DateTime.md) | |
**type** | **String** | |
**updatedAt** | [**DateTime**](DateTime.md) | |
[[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

@ -22,7 +22,7 @@ Method | HTTP request | Description
# **createPerson**
> PersonEntity createPerson(assetFaceUpdateDto)
> PersonResponseDto createPerson(assetFaceUpdateDto)
@ -63,7 +63,7 @@ Name | Type | Description | Notes
### Return type
[**PersonEntity**](PersonEntity.md)
[**PersonResponseDto**](PersonResponseDto.md)
### Authorization
@ -132,7 +132,7 @@ Name | Type | Description | Notes
[[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)
# **getAssetFace**
> AssetFaceEntity getAssetFace(id, assetId)
> AssetFaceBoxDto getAssetFace(id, assetId)
@ -175,7 +175,7 @@ Name | Type | Description | Notes
### Return type
[**AssetFaceEntity**](AssetFaceEntity.md)
[**AssetFaceBoxDto**](AssetFaceBoxDto.md)
### Authorization

View file

@ -1,26 +0,0 @@
# openapi.model.PersonEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**birthDate** | [**DateTime**](DateTime.md) | |
**createdAt** | [**DateTime**](DateTime.md) | |
**faceAsset** | [**AssetEntity**](AssetEntity.md) | |
**faceAssetId** | **String** | |
**faces** | [**List<AssetFaceEntity>**](AssetFaceEntity.md) | | [default to const []]
**id** | **String** | |
**isHidden** | **bool** | |
**name** | **String** | |
**owner** | [**UserEntity**](UserEntity.md) | |
**ownerId** | **String** | |
**thumbnailPath** | **String** | |
**updatedAt** | [**DateTime**](DateTime.md) | |
[[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

@ -1,28 +0,0 @@
# openapi.model.SharedLinkEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**album** | [**AlbumEntity**](AlbumEntity.md) | | [optional]
**albumId** | **String** | |
**allowDownload** | **bool** | |
**allowUpload** | **bool** | |
**assets** | [**List<AssetEntity>**](AssetEntity.md) | | [default to const []]
**createdAt** | [**DateTime**](DateTime.md) | |
**description** | **String** | |
**expiresAt** | [**DateTime**](DateTime.md) | |
**id** | **String** | |
**key** | [**Object**](.md) | |
**showExif** | **bool** | |
**type** | **String** | |
**user** | [**UserEntity**](UserEntity.md) | |
**userId** | **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

@ -1,21 +0,0 @@
# openapi.model.TagEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assets** | [**List<AssetEntity>**](AssetEntity.md) | | [default to const []]
**id** | **String** | |
**name** | **String** | |
**renameTagId** | **String** | |
**type** | **String** | |
**user** | [**UserEntity**](UserEntity.md) | |
**userId** | **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

@ -1,31 +0,0 @@
# openapi.model.UserEntity
## Load the model package
```dart
import 'package:openapi/api.dart';
```
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assets** | [**List<AssetEntity>**](AssetEntity.md) | | [default to const []]
**createdAt** | [**DateTime**](DateTime.md) | |
**deletedAt** | [**DateTime**](DateTime.md) | |
**email** | **String** | |
**externalPath** | **String** | |
**firstName** | **String** | |
**id** | **String** | |
**isAdmin** | **bool** | |
**lastName** | **String** | |
**memoriesEnabled** | **bool** | |
**oauthId** | **String** | |
**password** | **String** | | [optional]
**profileImagePath** | **String** | |
**shouldChangePassword** | **bool** | |
**storageLabel** | **String** | |
**tags** | [**List<TagEntity>**](TagEntity.md) | | [default to const []]
**updatedAt** | [**DateTime**](DateTime.md) | |
[[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

@ -52,7 +52,6 @@ part 'model/api_key_update_dto.dart';
part 'model/add_users_dto.dart';
part 'model/admin_signup_response_dto.dart';
part 'model/album_count_response_dto.dart';
part 'model/album_entity.dart';
part 'model/album_response_dto.dart';
part 'model/all_job_status_response_dto.dart';
part 'model/asset_bulk_update_dto.dart';
@ -60,8 +59,7 @@ part 'model/asset_bulk_upload_check_dto.dart';
part 'model/asset_bulk_upload_check_item.dart';
part 'model/asset_bulk_upload_check_response_dto.dart';
part 'model/asset_bulk_upload_check_result.dart';
part 'model/asset_entity.dart';
part 'model/asset_face_entity.dart';
part 'model/asset_face_box_dto.dart';
part 'model/asset_face_update_dto.dart';
part 'model/asset_file_upload_response_dto.dart';
part 'model/asset_ids_dto.dart';
@ -102,7 +100,6 @@ part 'model/download_archive_info.dart';
part 'model/download_info_dto.dart';
part 'model/download_response_dto.dart';
part 'model/entity_type.dart';
part 'model/exif_entity.dart';
part 'model/exif_response_dto.dart';
part 'model/import_asset_dto.dart';
part 'model/job_command.dart';
@ -111,7 +108,6 @@ part 'model/job_counts_dto.dart';
part 'model/job_name.dart';
part 'model/job_settings_dto.dart';
part 'model/job_status_dto.dart';
part 'model/library_entity.dart';
part 'model/library_response_dto.dart';
part 'model/library_stats_response_dto.dart';
part 'model/library_type.dart';
@ -129,7 +125,6 @@ part 'model/o_auth_config_response_dto.dart';
part 'model/people_response_dto.dart';
part 'model/people_update_dto.dart';
part 'model/people_update_item.dart';
part 'model/person_entity.dart';
part 'model/person_response_dto.dart';
part 'model/person_update_dto.dart';
part 'model/queue_status_dto.dart';
@ -152,11 +147,9 @@ part 'model/server_stats_response_dto.dart';
part 'model/server_version_response_dto.dart';
part 'model/shared_link_create_dto.dart';
part 'model/shared_link_edit_dto.dart';
part 'model/shared_link_entity.dart';
part 'model/shared_link_response_dto.dart';
part 'model/shared_link_type.dart';
part 'model/sign_up_dto.dart';
part 'model/smart_info_entity.dart';
part 'model/smart_info_response_dto.dart';
part 'model/system_config_dto.dart';
part 'model/system_config_f_fmpeg_dto.dart';
@ -169,7 +162,6 @@ part 'model/system_config_reverse_geocoding_dto.dart';
part 'model/system_config_storage_template_dto.dart';
part 'model/system_config_template_storage_option_dto.dart';
part 'model/system_config_thumbnail_dto.dart';
part 'model/tag_entity.dart';
part 'model/tag_response_dto.dart';
part 'model/tag_type_enum.dart';
part 'model/thumbnail_format.dart';
@ -185,7 +177,6 @@ part 'model/update_tag_dto.dart';
part 'model/update_user_dto.dart';
part 'model/usage_by_user_dto.dart';
part 'model/user_count_response_dto.dart';
part 'model/user_entity.dart';
part 'model/user_response_dto.dart';
part 'model/validate_access_token_response_dto.dart';
part 'model/video_codec.dart';

View file

@ -48,7 +48,7 @@ class PersonApi {
/// Parameters:
///
/// * [AssetFaceUpdateDto] assetFaceUpdateDto (required):
Future<PersonEntity?> createPerson(AssetFaceUpdateDto assetFaceUpdateDto,) async {
Future<PersonResponseDto?> createPerson(AssetFaceUpdateDto assetFaceUpdateDto,) async {
final response = await createPersonWithHttpInfo(assetFaceUpdateDto,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
@ -57,7 +57,7 @@ class PersonApi {
// 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), 'PersonEntity',) as PersonEntity;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'PersonResponseDto',) as PersonResponseDto;
}
return null;
@ -152,7 +152,7 @@ class PersonApi {
/// * [String] id (required):
///
/// * [String] assetId (required):
Future<AssetFaceEntity?> getAssetFace(String id, String assetId,) async {
Future<AssetFaceBoxDto?> getAssetFace(String id, String assetId,) async {
final response = await getAssetFaceWithHttpInfo(id, assetId,);
if (response.statusCode >= HttpStatus.badRequest) {
throw ApiException(response.statusCode, await _decodeBodyBytes(response));
@ -161,7 +161,7 @@ class PersonApi {
// 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), 'AssetFaceEntity',) as AssetFaceEntity;
return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'AssetFaceBoxDto',) as AssetFaceBoxDto;
}
return null;

View file

@ -195,8 +195,6 @@ class ApiClient {
return AdminSignupResponseDto.fromJson(value);
case 'AlbumCountResponseDto':
return AlbumCountResponseDto.fromJson(value);
case 'AlbumEntity':
return AlbumEntity.fromJson(value);
case 'AlbumResponseDto':
return AlbumResponseDto.fromJson(value);
case 'AllJobStatusResponseDto':
@ -211,10 +209,8 @@ class ApiClient {
return AssetBulkUploadCheckResponseDto.fromJson(value);
case 'AssetBulkUploadCheckResult':
return AssetBulkUploadCheckResult.fromJson(value);
case 'AssetEntity':
return AssetEntity.fromJson(value);
case 'AssetFaceEntity':
return AssetFaceEntity.fromJson(value);
case 'AssetFaceBoxDto':
return AssetFaceBoxDto.fromJson(value);
case 'AssetFaceUpdateDto':
return AssetFaceUpdateDto.fromJson(value);
case 'AssetFileUploadResponseDto':
@ -295,8 +291,6 @@ class ApiClient {
return DownloadResponseDto.fromJson(value);
case 'EntityType':
return EntityTypeTypeTransformer().decode(value);
case 'ExifEntity':
return ExifEntity.fromJson(value);
case 'ExifResponseDto':
return ExifResponseDto.fromJson(value);
case 'ImportAssetDto':
@ -313,8 +307,6 @@ class ApiClient {
return JobSettingsDto.fromJson(value);
case 'JobStatusDto':
return JobStatusDto.fromJson(value);
case 'LibraryEntity':
return LibraryEntity.fromJson(value);
case 'LibraryResponseDto':
return LibraryResponseDto.fromJson(value);
case 'LibraryStatsResponseDto':
@ -349,8 +341,6 @@ class ApiClient {
return PeopleUpdateDto.fromJson(value);
case 'PeopleUpdateItem':
return PeopleUpdateItem.fromJson(value);
case 'PersonEntity':
return PersonEntity.fromJson(value);
case 'PersonResponseDto':
return PersonResponseDto.fromJson(value);
case 'PersonUpdateDto':
@ -395,16 +385,12 @@ class ApiClient {
return SharedLinkCreateDto.fromJson(value);
case 'SharedLinkEditDto':
return SharedLinkEditDto.fromJson(value);
case 'SharedLinkEntity':
return SharedLinkEntity.fromJson(value);
case 'SharedLinkResponseDto':
return SharedLinkResponseDto.fromJson(value);
case 'SharedLinkType':
return SharedLinkTypeTypeTransformer().decode(value);
case 'SignUpDto':
return SignUpDto.fromJson(value);
case 'SmartInfoEntity':
return SmartInfoEntity.fromJson(value);
case 'SmartInfoResponseDto':
return SmartInfoResponseDto.fromJson(value);
case 'SystemConfigDto':
@ -429,8 +415,6 @@ class ApiClient {
return SystemConfigTemplateStorageOptionDto.fromJson(value);
case 'SystemConfigThumbnailDto':
return SystemConfigThumbnailDto.fromJson(value);
case 'TagEntity':
return TagEntity.fromJson(value);
case 'TagResponseDto':
return TagResponseDto.fromJson(value);
case 'TagTypeEnum':
@ -461,8 +445,6 @@ class ApiClient {
return UsageByUserDto.fromJson(value);
case 'UserCountResponseDto':
return UserCountResponseDto.fromJson(value);
case 'UserEntity':
return UserEntity.fromJson(value);
case 'UserResponseDto':
return UserResponseDto.fromJson(value);
case 'ValidateAccessTokenResponseDto':

View file

@ -1,206 +0,0 @@
//
// 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 AlbumEntity {
/// Returns a new [AlbumEntity] instance.
AlbumEntity({
required this.albumName,
required this.albumThumbnailAsset,
required this.albumThumbnailAssetId,
this.assets = const [],
required this.createdAt,
required this.deletedAt,
required this.description,
required this.id,
required this.owner,
required this.ownerId,
this.sharedLinks = const [],
this.sharedUsers = const [],
required this.updatedAt,
});
String albumName;
AssetEntity? albumThumbnailAsset;
String? albumThumbnailAssetId;
List<AssetEntity> assets;
DateTime createdAt;
DateTime? deletedAt;
String description;
String id;
UserEntity owner;
String ownerId;
List<SharedLinkEntity> sharedLinks;
List<UserEntity> sharedUsers;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumEntity &&
other.albumName == albumName &&
other.albumThumbnailAsset == albumThumbnailAsset &&
other.albumThumbnailAssetId == albumThumbnailAssetId &&
other.assets == assets &&
other.createdAt == createdAt &&
other.deletedAt == deletedAt &&
other.description == description &&
other.id == id &&
other.owner == owner &&
other.ownerId == ownerId &&
other.sharedLinks == sharedLinks &&
other.sharedUsers == sharedUsers &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumName.hashCode) +
(albumThumbnailAsset == null ? 0 : albumThumbnailAsset!.hashCode) +
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
(assets.hashCode) +
(createdAt.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(description.hashCode) +
(id.hashCode) +
(owner.hashCode) +
(ownerId.hashCode) +
(sharedLinks.hashCode) +
(sharedUsers.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'AlbumEntity[albumName=$albumName, albumThumbnailAsset=$albumThumbnailAsset, albumThumbnailAssetId=$albumThumbnailAssetId, assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, description=$description, id=$id, owner=$owner, ownerId=$ownerId, sharedLinks=$sharedLinks, sharedUsers=$sharedUsers, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'albumName'] = this.albumName;
if (this.albumThumbnailAsset != null) {
json[r'albumThumbnailAsset'] = this.albumThumbnailAsset;
} else {
// json[r'albumThumbnailAsset'] = null;
}
if (this.albumThumbnailAssetId != null) {
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
} else {
// json[r'albumThumbnailAssetId'] = null;
}
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
}
json[r'description'] = this.description;
json[r'id'] = this.id;
json[r'owner'] = this.owner;
json[r'ownerId'] = this.ownerId;
json[r'sharedLinks'] = this.sharedLinks;
json[r'sharedUsers'] = this.sharedUsers;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [AlbumEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumEntity(
albumName: mapValueOfType<String>(json, r'albumName')!,
albumThumbnailAsset: AssetEntity.fromJson(json[r'albumThumbnailAsset']),
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
assets: AssetEntity.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', '')!,
deletedAt: mapDateTime(json, r'deletedAt', ''),
description: mapValueOfType<String>(json, r'description')!,
id: mapValueOfType<String>(json, r'id')!,
owner: UserEntity.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
sharedLinks: SharedLinkEntity.listFromJson(json[r'sharedLinks']),
sharedUsers: UserEntity.listFromJson(json[r'sharedUsers']),
updatedAt: mapDateTime(json, r'updatedAt', '')!,
);
}
return null;
}
static List<AlbumEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumEntity> mapFromJson(dynamic json) {
final map = <String, AlbumEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumEntity-objects as value to a dart map
static Map<String, List<AlbumEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'albumName',
'albumThumbnailAsset',
'albumThumbnailAssetId',
'assets',
'createdAt',
'deletedAt',
'description',
'id',
'owner',
'ownerId',
'sharedLinks',
'sharedUsers',
'updatedAt',
};
}

View file

@ -1,499 +0,0 @@
//
// 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 AssetEntity {
/// Returns a new [AssetEntity] instance.
AssetEntity({
this.albums = const [],
required this.checksum,
required this.createdAt,
required this.deviceAssetId,
required this.deviceId,
required this.duration,
required this.encodedVideoPath,
this.exifInfo,
this.faces = const [],
required this.fileCreatedAt,
required this.fileModifiedAt,
required this.id,
required this.isArchived,
required this.isExternal,
required this.isFavorite,
required this.isOffline,
required this.isReadOnly,
required this.isVisible,
required this.library_,
required this.libraryId,
required this.livePhotoVideo,
required this.livePhotoVideoId,
required this.originalFileName,
required this.originalPath,
required this.owner,
required this.ownerId,
required this.resizePath,
this.sharedLinks = const [],
required this.sidecarPath,
this.smartInfo,
this.tags = const [],
required this.thumbhash,
required this.type,
required this.updatedAt,
required this.webpPath,
});
List<AlbumEntity> albums;
Object checksum;
DateTime createdAt;
String deviceAssetId;
String deviceId;
String? duration;
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.
///
ExifEntity? exifInfo;
List<AssetFaceEntity> faces;
DateTime fileCreatedAt;
DateTime fileModifiedAt;
String id;
bool isArchived;
bool isExternal;
bool isFavorite;
bool isOffline;
bool isReadOnly;
bool isVisible;
LibraryEntity library_;
String libraryId;
AssetEntity? livePhotoVideo;
String? livePhotoVideoId;
String originalFileName;
String originalPath;
UserEntity owner;
String ownerId;
String? resizePath;
List<SharedLinkEntity> sharedLinks;
String? sidecarPath;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
SmartInfoEntity? smartInfo;
List<TagEntity> tags;
Object? thumbhash;
AssetEntityTypeEnum type;
DateTime updatedAt;
String? webpPath;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEntity &&
other.albums == albums &&
other.checksum == checksum &&
other.createdAt == createdAt &&
other.deviceAssetId == deviceAssetId &&
other.deviceId == deviceId &&
other.duration == duration &&
other.encodedVideoPath == encodedVideoPath &&
other.exifInfo == exifInfo &&
other.faces == faces &&
other.fileCreatedAt == fileCreatedAt &&
other.fileModifiedAt == fileModifiedAt &&
other.id == id &&
other.isArchived == isArchived &&
other.isExternal == isExternal &&
other.isFavorite == isFavorite &&
other.isOffline == isOffline &&
other.isReadOnly == isReadOnly &&
other.isVisible == isVisible &&
other.library_ == library_ &&
other.libraryId == libraryId &&
other.livePhotoVideo == livePhotoVideo &&
other.livePhotoVideoId == livePhotoVideoId &&
other.originalFileName == originalFileName &&
other.originalPath == originalPath &&
other.owner == owner &&
other.ownerId == ownerId &&
other.resizePath == resizePath &&
other.sharedLinks == sharedLinks &&
other.sidecarPath == sidecarPath &&
other.smartInfo == smartInfo &&
other.tags == tags &&
other.thumbhash == thumbhash &&
other.type == type &&
other.updatedAt == updatedAt &&
other.webpPath == webpPath;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(albums.hashCode) +
(checksum.hashCode) +
(createdAt.hashCode) +
(deviceAssetId.hashCode) +
(deviceId.hashCode) +
(duration == null ? 0 : duration!.hashCode) +
(encodedVideoPath == null ? 0 : encodedVideoPath!.hashCode) +
(exifInfo == null ? 0 : exifInfo!.hashCode) +
(faces.hashCode) +
(fileCreatedAt.hashCode) +
(fileModifiedAt.hashCode) +
(id.hashCode) +
(isArchived.hashCode) +
(isExternal.hashCode) +
(isFavorite.hashCode) +
(isOffline.hashCode) +
(isReadOnly.hashCode) +
(isVisible.hashCode) +
(library_.hashCode) +
(libraryId.hashCode) +
(livePhotoVideo == null ? 0 : livePhotoVideo!.hashCode) +
(livePhotoVideoId == null ? 0 : livePhotoVideoId!.hashCode) +
(originalFileName.hashCode) +
(originalPath.hashCode) +
(owner.hashCode) +
(ownerId.hashCode) +
(resizePath == null ? 0 : resizePath!.hashCode) +
(sharedLinks.hashCode) +
(sidecarPath == null ? 0 : sidecarPath!.hashCode) +
(smartInfo == null ? 0 : smartInfo!.hashCode) +
(tags.hashCode) +
(thumbhash == null ? 0 : thumbhash!.hashCode) +
(type.hashCode) +
(updatedAt.hashCode) +
(webpPath == null ? 0 : webpPath!.hashCode);
@override
String toString() => 'AssetEntity[albums=$albums, checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duration=$duration, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, faces=$faces, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, id=$id, isArchived=$isArchived, isExternal=$isExternal, isFavorite=$isFavorite, isOffline=$isOffline, isReadOnly=$isReadOnly, isVisible=$isVisible, library_=$library_, libraryId=$libraryId, livePhotoVideo=$livePhotoVideo, livePhotoVideoId=$livePhotoVideoId, originalFileName=$originalFileName, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, resizePath=$resizePath, sharedLinks=$sharedLinks, sidecarPath=$sidecarPath, smartInfo=$smartInfo, tags=$tags, thumbhash=$thumbhash, type=$type, updatedAt=$updatedAt, webpPath=$webpPath]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'albums'] = this.albums;
json[r'checksum'] = this.checksum;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'deviceAssetId'] = this.deviceAssetId;
json[r'deviceId'] = this.deviceId;
if (this.duration != null) {
json[r'duration'] = this.duration;
} else {
// json[r'duration'] = null;
}
if (this.encodedVideoPath != null) {
json[r'encodedVideoPath'] = this.encodedVideoPath;
} else {
// json[r'encodedVideoPath'] = null;
}
if (this.exifInfo != null) {
json[r'exifInfo'] = this.exifInfo;
} else {
// json[r'exifInfo'] = null;
}
json[r'faces'] = this.faces;
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
json[r'id'] = this.id;
json[r'isArchived'] = this.isArchived;
json[r'isExternal'] = this.isExternal;
json[r'isFavorite'] = this.isFavorite;
json[r'isOffline'] = this.isOffline;
json[r'isReadOnly'] = this.isReadOnly;
json[r'isVisible'] = this.isVisible;
json[r'library'] = this.library_;
json[r'libraryId'] = this.libraryId;
if (this.livePhotoVideo != null) {
json[r'livePhotoVideo'] = this.livePhotoVideo;
} else {
// json[r'livePhotoVideo'] = null;
}
if (this.livePhotoVideoId != null) {
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
} else {
// json[r'livePhotoVideoId'] = null;
}
json[r'originalFileName'] = this.originalFileName;
json[r'originalPath'] = this.originalPath;
json[r'owner'] = this.owner;
json[r'ownerId'] = this.ownerId;
if (this.resizePath != null) {
json[r'resizePath'] = this.resizePath;
} else {
// json[r'resizePath'] = null;
}
json[r'sharedLinks'] = this.sharedLinks;
if (this.sidecarPath != null) {
json[r'sidecarPath'] = this.sidecarPath;
} else {
// json[r'sidecarPath'] = null;
}
if (this.smartInfo != null) {
json[r'smartInfo'] = this.smartInfo;
} else {
// json[r'smartInfo'] = null;
}
json[r'tags'] = this.tags;
if (this.thumbhash != null) {
json[r'thumbhash'] = this.thumbhash;
} else {
// json[r'thumbhash'] = null;
}
json[r'type'] = this.type;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
if (this.webpPath != null) {
json[r'webpPath'] = this.webpPath;
} else {
// json[r'webpPath'] = null;
}
return json;
}
/// Returns a new [AssetEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetEntity(
albums: AlbumEntity.listFromJson(json[r'albums']),
checksum: mapValueOfType<Object>(json, r'checksum')!,
createdAt: mapDateTime(json, r'createdAt', '')!,
deviceAssetId: mapValueOfType<String>(json, r'deviceAssetId')!,
deviceId: mapValueOfType<String>(json, r'deviceId')!,
duration: mapValueOfType<String>(json, r'duration'),
encodedVideoPath: mapValueOfType<String>(json, r'encodedVideoPath'),
exifInfo: ExifEntity.fromJson(json[r'exifInfo']),
faces: AssetFaceEntity.listFromJson(json[r'faces']),
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', '')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', '')!,
id: mapValueOfType<String>(json, r'id')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
isExternal: mapValueOfType<bool>(json, r'isExternal')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isOffline: mapValueOfType<bool>(json, r'isOffline')!,
isReadOnly: mapValueOfType<bool>(json, r'isReadOnly')!,
isVisible: mapValueOfType<bool>(json, r'isVisible')!,
library_: LibraryEntity.fromJson(json[r'library'])!,
libraryId: mapValueOfType<String>(json, r'libraryId')!,
livePhotoVideo: AssetEntity.fromJson(json[r'livePhotoVideo']),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
originalFileName: mapValueOfType<String>(json, r'originalFileName')!,
originalPath: mapValueOfType<String>(json, r'originalPath')!,
owner: UserEntity.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
resizePath: mapValueOfType<String>(json, r'resizePath'),
sharedLinks: SharedLinkEntity.listFromJson(json[r'sharedLinks']),
sidecarPath: mapValueOfType<String>(json, r'sidecarPath'),
smartInfo: SmartInfoEntity.fromJson(json[r'smartInfo']),
tags: TagEntity.listFromJson(json[r'tags']),
thumbhash: mapValueOfType<Object>(json, r'thumbhash'),
type: AssetEntityTypeEnum.fromJson(json[r'type'])!,
updatedAt: mapDateTime(json, r'updatedAt', '')!,
webpPath: mapValueOfType<String>(json, r'webpPath'),
);
}
return null;
}
static List<AssetEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEntity> mapFromJson(dynamic json) {
final map = <String, AssetEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEntity-objects as value to a dart map
static Map<String, List<AssetEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'checksum',
'createdAt',
'deviceAssetId',
'deviceId',
'duration',
'encodedVideoPath',
'faces',
'fileCreatedAt',
'fileModifiedAt',
'id',
'isArchived',
'isExternal',
'isFavorite',
'isOffline',
'isReadOnly',
'isVisible',
'library',
'libraryId',
'livePhotoVideo',
'livePhotoVideoId',
'originalFileName',
'originalPath',
'owner',
'ownerId',
'resizePath',
'sharedLinks',
'sidecarPath',
'tags',
'thumbhash',
'type',
'updatedAt',
'webpPath',
};
}
class AssetEntityTypeEnum {
/// Instantiate a new enum with the provided [value].
const AssetEntityTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const IMAGE = AssetEntityTypeEnum._(r'IMAGE');
static const VIDEO = AssetEntityTypeEnum._(r'VIDEO');
static const AUDIO = AssetEntityTypeEnum._(r'AUDIO');
static const OTHER = AssetEntityTypeEnum._(r'OTHER');
/// List of all possible values in this [enum][AssetEntityTypeEnum].
static const values = <AssetEntityTypeEnum>[
IMAGE,
VIDEO,
AUDIO,
OTHER,
];
static AssetEntityTypeEnum? fromJson(dynamic value) => AssetEntityTypeEnumTypeTransformer().decode(value);
static List<AssetEntityTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEntityTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEntityTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [AssetEntityTypeEnum] to String,
/// and [decode] dynamic data back to [AssetEntityTypeEnum].
class AssetEntityTypeEnumTypeTransformer {
factory AssetEntityTypeEnumTypeTransformer() => _instance ??= const AssetEntityTypeEnumTypeTransformer._();
const AssetEntityTypeEnumTypeTransformer._();
String encode(AssetEntityTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a AssetEntityTypeEnum.
///
/// 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.
AssetEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'IMAGE': return AssetEntityTypeEnum.IMAGE;
case r'VIDEO': return AssetEntityTypeEnum.VIDEO;
case r'AUDIO': return AssetEntityTypeEnum.AUDIO;
case r'OTHER': return AssetEntityTypeEnum.OTHER;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [AssetEntityTypeEnumTypeTransformer] instance.
static AssetEntityTypeEnumTypeTransformer? _instance;
}

View file

@ -0,0 +1,138 @@
//
// 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 AssetFaceBoxDto {
/// Returns a new [AssetFaceBoxDto] instance.
AssetFaceBoxDto({
required this.boundingBoxX1,
required this.boundingBoxX2,
required this.boundingBoxY1,
required this.boundingBoxY2,
required this.imageHeight,
required this.imageWidth,
});
int boundingBoxX1;
int boundingBoxX2;
int boundingBoxY1;
int boundingBoxY2;
int imageHeight;
int imageWidth;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetFaceBoxDto &&
other.boundingBoxX1 == boundingBoxX1 &&
other.boundingBoxX2 == boundingBoxX2 &&
other.boundingBoxY1 == boundingBoxY1 &&
other.boundingBoxY2 == boundingBoxY2 &&
other.imageHeight == imageHeight &&
other.imageWidth == imageWidth;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(boundingBoxX1.hashCode) +
(boundingBoxX2.hashCode) +
(boundingBoxY1.hashCode) +
(boundingBoxY2.hashCode) +
(imageHeight.hashCode) +
(imageWidth.hashCode);
@override
String toString() => 'AssetFaceBoxDto[boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, imageHeight=$imageHeight, imageWidth=$imageWidth]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'boundingBoxX1'] = this.boundingBoxX1;
json[r'boundingBoxX2'] = this.boundingBoxX2;
json[r'boundingBoxY1'] = this.boundingBoxY1;
json[r'boundingBoxY2'] = this.boundingBoxY2;
json[r'imageHeight'] = this.imageHeight;
json[r'imageWidth'] = this.imageWidth;
return json;
}
/// Returns a new [AssetFaceBoxDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceBoxDto? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetFaceBoxDto(
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
boundingBoxY1: mapValueOfType<int>(json, r'boundingBoxY1')!,
boundingBoxY2: mapValueOfType<int>(json, r'boundingBoxY2')!,
imageHeight: mapValueOfType<int>(json, r'imageHeight')!,
imageWidth: mapValueOfType<int>(json, r'imageWidth')!,
);
}
return null;
}
static List<AssetFaceBoxDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetFaceBoxDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetFaceBoxDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetFaceBoxDto> mapFromJson(dynamic json) {
final map = <String, AssetFaceBoxDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetFaceBoxDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetFaceBoxDto-objects as value to a dart map
static Map<String, List<AssetFaceBoxDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetFaceBoxDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetFaceBoxDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'boundingBoxX1',
'boundingBoxX2',
'boundingBoxY1',
'boundingBoxY2',
'imageHeight',
'imageWidth',
};
}

View file

@ -1,196 +0,0 @@
//
// 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 AssetFaceEntity {
/// Returns a new [AssetFaceEntity] instance.
AssetFaceEntity({
required this.asset,
required this.assetId,
required this.boundingBoxX1,
required this.boundingBoxX2,
required this.boundingBoxY1,
required this.boundingBoxY2,
this.embedding = const [],
required this.imageHeight,
required this.imageWidth,
required this.person,
required this.personId,
});
AssetEntity asset;
String assetId;
num boundingBoxX1;
num boundingBoxX2;
num boundingBoxY1;
num boundingBoxY2;
List<num>? embedding;
num imageHeight;
num imageWidth;
PersonEntity person;
String personId;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetFaceEntity &&
other.asset == asset &&
other.assetId == assetId &&
other.boundingBoxX1 == boundingBoxX1 &&
other.boundingBoxX2 == boundingBoxX2 &&
other.boundingBoxY1 == boundingBoxY1 &&
other.boundingBoxY2 == boundingBoxY2 &&
other.embedding == embedding &&
other.imageHeight == imageHeight &&
other.imageWidth == imageWidth &&
other.person == person &&
other.personId == personId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(asset.hashCode) +
(assetId.hashCode) +
(boundingBoxX1.hashCode) +
(boundingBoxX2.hashCode) +
(boundingBoxY1.hashCode) +
(boundingBoxY2.hashCode) +
(embedding == null ? 0 : embedding!.hashCode) +
(imageHeight.hashCode) +
(imageWidth.hashCode) +
(person.hashCode) +
(personId.hashCode);
@override
String toString() => 'AssetFaceEntity[asset=$asset, assetId=$assetId, boundingBoxX1=$boundingBoxX1, boundingBoxX2=$boundingBoxX2, boundingBoxY1=$boundingBoxY1, boundingBoxY2=$boundingBoxY2, embedding=$embedding, imageHeight=$imageHeight, imageWidth=$imageWidth, person=$person, personId=$personId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'asset'] = this.asset;
json[r'assetId'] = this.assetId;
json[r'boundingBoxX1'] = this.boundingBoxX1;
json[r'boundingBoxX2'] = this.boundingBoxX2;
json[r'boundingBoxY1'] = this.boundingBoxY1;
json[r'boundingBoxY2'] = this.boundingBoxY2;
if (this.embedding != null) {
json[r'embedding'] = this.embedding;
} else {
// json[r'embedding'] = null;
}
json[r'imageHeight'] = this.imageHeight;
json[r'imageWidth'] = this.imageWidth;
json[r'person'] = this.person;
json[r'personId'] = this.personId;
return json;
}
/// Returns a new [AssetFaceEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AssetFaceEntity(
asset: AssetEntity.fromJson(json[r'asset'])!,
assetId: mapValueOfType<String>(json, r'assetId')!,
boundingBoxX1: json[r'boundingBoxX1'] == null
? null
: num.parse(json[r'boundingBoxX1'].toString()),
boundingBoxX2: json[r'boundingBoxX2'] == null
? null
: num.parse(json[r'boundingBoxX2'].toString()),
boundingBoxY1: json[r'boundingBoxY1'] == null
? null
: num.parse(json[r'boundingBoxY1'].toString()),
boundingBoxY2: json[r'boundingBoxY2'] == null
? null
: num.parse(json[r'boundingBoxY2'].toString()),
embedding: json[r'embedding'] is List
? (json[r'embedding'] as List).cast<num>()
: const [],
imageHeight: json[r'imageHeight'] == null
? null
: num.parse(json[r'imageHeight'].toString()),
imageWidth: json[r'imageWidth'] == null
? null
: num.parse(json[r'imageWidth'].toString()),
person: PersonEntity.fromJson(json[r'person'])!,
personId: mapValueOfType<String>(json, r'personId')!,
);
}
return null;
}
static List<AssetFaceEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetFaceEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetFaceEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetFaceEntity> mapFromJson(dynamic json) {
final map = <String, AssetFaceEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetFaceEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetFaceEntity-objects as value to a dart map
static Map<String, List<AssetFaceEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetFaceEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetFaceEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'asset',
'assetId',
'boundingBoxX1',
'boundingBoxX2',
'boundingBoxY1',
'boundingBoxY2',
'embedding',
'imageHeight',
'imageWidth',
'person',
'personId',
};
}

View file

@ -1,453 +0,0 @@
//
// 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 ExifEntity {
/// Returns a new [ExifEntity] instance.
ExifEntity({
this.asset,
required this.assetId,
required this.bitsPerSample,
required this.city,
required this.colorspace,
required this.country,
required this.dateTimeOriginal,
required this.description,
required this.exifImageHeight,
required this.exifImageWidth,
required this.exifTextSearchableColumn,
required this.exposureTime,
required this.fNumber,
required this.fileSizeInByte,
required this.focalLength,
this.fps,
required this.iso,
required this.latitude,
required this.lensModel,
required this.livePhotoCID,
required this.longitude,
required this.make,
required this.model,
required this.modifyDate,
required this.orientation,
required this.profileDescription,
required this.projectionType,
required this.state,
required this.timeZone,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
AssetEntity? asset;
String assetId;
num? bitsPerSample;
String? city;
String? colorspace;
String? country;
DateTime? dateTimeOriginal;
/// General info
String description;
num? exifImageHeight;
num? exifImageWidth;
String exifTextSearchableColumn;
String? exposureTime;
num? fNumber;
num? fileSizeInByte;
num? focalLength;
/// Video info
num? fps;
num? iso;
num? latitude;
String? lensModel;
String? livePhotoCID;
num? longitude;
/// Image info
String? make;
String? model;
DateTime? modifyDate;
String? orientation;
String? profileDescription;
String? projectionType;
String? state;
String? timeZone;
@override
bool operator ==(Object other) => identical(this, other) || other is ExifEntity &&
other.asset == asset &&
other.assetId == assetId &&
other.bitsPerSample == bitsPerSample &&
other.city == city &&
other.colorspace == colorspace &&
other.country == country &&
other.dateTimeOriginal == dateTimeOriginal &&
other.description == description &&
other.exifImageHeight == exifImageHeight &&
other.exifImageWidth == exifImageWidth &&
other.exifTextSearchableColumn == exifTextSearchableColumn &&
other.exposureTime == exposureTime &&
other.fNumber == fNumber &&
other.fileSizeInByte == fileSizeInByte &&
other.focalLength == focalLength &&
other.fps == fps &&
other.iso == iso &&
other.latitude == latitude &&
other.lensModel == lensModel &&
other.livePhotoCID == livePhotoCID &&
other.longitude == longitude &&
other.make == make &&
other.model == model &&
other.modifyDate == modifyDate &&
other.orientation == orientation &&
other.profileDescription == profileDescription &&
other.projectionType == projectionType &&
other.state == state &&
other.timeZone == timeZone;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(asset == null ? 0 : asset!.hashCode) +
(assetId.hashCode) +
(bitsPerSample == null ? 0 : bitsPerSample!.hashCode) +
(city == null ? 0 : city!.hashCode) +
(colorspace == null ? 0 : colorspace!.hashCode) +
(country == null ? 0 : country!.hashCode) +
(dateTimeOriginal == null ? 0 : dateTimeOriginal!.hashCode) +
(description.hashCode) +
(exifImageHeight == null ? 0 : exifImageHeight!.hashCode) +
(exifImageWidth == null ? 0 : exifImageWidth!.hashCode) +
(exifTextSearchableColumn.hashCode) +
(exposureTime == null ? 0 : exposureTime!.hashCode) +
(fNumber == null ? 0 : fNumber!.hashCode) +
(fileSizeInByte == null ? 0 : fileSizeInByte!.hashCode) +
(focalLength == null ? 0 : focalLength!.hashCode) +
(fps == null ? 0 : fps!.hashCode) +
(iso == null ? 0 : iso!.hashCode) +
(latitude == null ? 0 : latitude!.hashCode) +
(lensModel == null ? 0 : lensModel!.hashCode) +
(livePhotoCID == null ? 0 : livePhotoCID!.hashCode) +
(longitude == null ? 0 : longitude!.hashCode) +
(make == null ? 0 : make!.hashCode) +
(model == null ? 0 : model!.hashCode) +
(modifyDate == null ? 0 : modifyDate!.hashCode) +
(orientation == null ? 0 : orientation!.hashCode) +
(profileDescription == null ? 0 : profileDescription!.hashCode) +
(projectionType == null ? 0 : projectionType!.hashCode) +
(state == null ? 0 : state!.hashCode) +
(timeZone == null ? 0 : timeZone!.hashCode);
@override
String toString() => 'ExifEntity[asset=$asset, assetId=$assetId, bitsPerSample=$bitsPerSample, city=$city, colorspace=$colorspace, country=$country, dateTimeOriginal=$dateTimeOriginal, description=$description, exifImageHeight=$exifImageHeight, exifImageWidth=$exifImageWidth, exifTextSearchableColumn=$exifTextSearchableColumn, exposureTime=$exposureTime, fNumber=$fNumber, fileSizeInByte=$fileSizeInByte, focalLength=$focalLength, fps=$fps, iso=$iso, latitude=$latitude, lensModel=$lensModel, livePhotoCID=$livePhotoCID, longitude=$longitude, make=$make, model=$model, modifyDate=$modifyDate, orientation=$orientation, profileDescription=$profileDescription, projectionType=$projectionType, state=$state, timeZone=$timeZone]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.asset != null) {
json[r'asset'] = this.asset;
} else {
// json[r'asset'] = null;
}
json[r'assetId'] = this.assetId;
if (this.bitsPerSample != null) {
json[r'bitsPerSample'] = this.bitsPerSample;
} else {
// json[r'bitsPerSample'] = null;
}
if (this.city != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
}
if (this.colorspace != null) {
json[r'colorspace'] = this.colorspace;
} else {
// json[r'colorspace'] = null;
}
if (this.country != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
}
if (this.dateTimeOriginal != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
} else {
// json[r'dateTimeOriginal'] = null;
}
json[r'description'] = this.description;
if (this.exifImageHeight != null) {
json[r'exifImageHeight'] = this.exifImageHeight;
} else {
// json[r'exifImageHeight'] = null;
}
if (this.exifImageWidth != null) {
json[r'exifImageWidth'] = this.exifImageWidth;
} else {
// json[r'exifImageWidth'] = null;
}
json[r'exifTextSearchableColumn'] = this.exifTextSearchableColumn;
if (this.exposureTime != null) {
json[r'exposureTime'] = this.exposureTime;
} else {
// json[r'exposureTime'] = null;
}
if (this.fNumber != null) {
json[r'fNumber'] = this.fNumber;
} else {
// json[r'fNumber'] = null;
}
if (this.fileSizeInByte != null) {
json[r'fileSizeInByte'] = this.fileSizeInByte;
} else {
// json[r'fileSizeInByte'] = null;
}
if (this.focalLength != null) {
json[r'focalLength'] = this.focalLength;
} else {
// json[r'focalLength'] = null;
}
if (this.fps != null) {
json[r'fps'] = this.fps;
} else {
// json[r'fps'] = null;
}
if (this.iso != null) {
json[r'iso'] = this.iso;
} else {
// json[r'iso'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
// json[r'latitude'] = null;
}
if (this.lensModel != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
}
if (this.livePhotoCID != null) {
json[r'livePhotoCID'] = this.livePhotoCID;
} else {
// json[r'livePhotoCID'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
// json[r'longitude'] = null;
}
if (this.make != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
}
if (this.model != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
}
if (this.modifyDate != null) {
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
} else {
// json[r'modifyDate'] = null;
}
if (this.orientation != null) {
json[r'orientation'] = this.orientation;
} else {
// json[r'orientation'] = null;
}
if (this.profileDescription != null) {
json[r'profileDescription'] = this.profileDescription;
} else {
// json[r'profileDescription'] = null;
}
if (this.projectionType != null) {
json[r'projectionType'] = this.projectionType;
} else {
// json[r'projectionType'] = null;
}
if (this.state != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
}
if (this.timeZone != null) {
json[r'timeZone'] = this.timeZone;
} else {
// json[r'timeZone'] = null;
}
return json;
}
/// Returns a new [ExifEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ExifEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return ExifEntity(
asset: AssetEntity.fromJson(json[r'asset']),
assetId: mapValueOfType<String>(json, r'assetId')!,
bitsPerSample: json[r'bitsPerSample'] == null
? null
: num.parse(json[r'bitsPerSample'].toString()),
city: mapValueOfType<String>(json, r'city'),
colorspace: mapValueOfType<String>(json, r'colorspace'),
country: mapValueOfType<String>(json, r'country'),
dateTimeOriginal: mapDateTime(json, r'dateTimeOriginal', ''),
description: mapValueOfType<String>(json, r'description')!,
exifImageHeight: json[r'exifImageHeight'] == null
? null
: num.parse(json[r'exifImageHeight'].toString()),
exifImageWidth: json[r'exifImageWidth'] == null
? null
: num.parse(json[r'exifImageWidth'].toString()),
exifTextSearchableColumn: mapValueOfType<String>(json, r'exifTextSearchableColumn')!,
exposureTime: mapValueOfType<String>(json, r'exposureTime'),
fNumber: json[r'fNumber'] == null
? null
: num.parse(json[r'fNumber'].toString()),
fileSizeInByte: json[r'fileSizeInByte'] == null
? null
: num.parse(json[r'fileSizeInByte'].toString()),
focalLength: json[r'focalLength'] == null
? null
: num.parse(json[r'focalLength'].toString()),
fps: json[r'fps'] == null
? null
: num.parse(json[r'fps'].toString()),
iso: json[r'iso'] == null
? null
: num.parse(json[r'iso'].toString()),
latitude: json[r'latitude'] == null
? null
: num.parse(json[r'latitude'].toString()),
lensModel: mapValueOfType<String>(json, r'lensModel'),
livePhotoCID: mapValueOfType<String>(json, r'livePhotoCID'),
longitude: json[r'longitude'] == null
? null
: num.parse(json[r'longitude'].toString()),
make: mapValueOfType<String>(json, r'make'),
model: mapValueOfType<String>(json, r'model'),
modifyDate: mapDateTime(json, r'modifyDate', ''),
orientation: mapValueOfType<String>(json, r'orientation'),
profileDescription: mapValueOfType<String>(json, r'profileDescription'),
projectionType: mapValueOfType<String>(json, r'projectionType'),
state: mapValueOfType<String>(json, r'state'),
timeZone: mapValueOfType<String>(json, r'timeZone'),
);
}
return null;
}
static List<ExifEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ExifEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = ExifEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, ExifEntity> mapFromJson(dynamic json) {
final map = <String, ExifEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = ExifEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of ExifEntity-objects as value to a dart map
static Map<String, List<ExifEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ExifEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = ExifEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'bitsPerSample',
'city',
'colorspace',
'country',
'dateTimeOriginal',
'description',
'exifImageHeight',
'exifImageWidth',
'exifTextSearchableColumn',
'exposureTime',
'fNumber',
'fileSizeInByte',
'focalLength',
'iso',
'latitude',
'lensModel',
'livePhotoCID',
'longitude',
'make',
'model',
'modifyDate',
'orientation',
'profileDescription',
'projectionType',
'state',
'timeZone',
};
}

View file

@ -1,285 +0,0 @@
//
// 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 LibraryEntity {
/// Returns a new [LibraryEntity] instance.
LibraryEntity({
this.assets = const [],
required this.createdAt,
this.deletedAt,
this.exclusionPatterns = const [],
required this.id,
this.importPaths = const [],
required this.isVisible,
required this.name,
required this.owner,
required this.ownerId,
required this.refreshedAt,
required this.type,
required this.updatedAt,
});
List<AssetEntity> assets;
DateTime createdAt;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
DateTime? deletedAt;
List<String> exclusionPatterns;
String id;
List<String> importPaths;
bool isVisible;
String name;
UserEntity owner;
String ownerId;
DateTime? refreshedAt;
LibraryEntityTypeEnum type;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is LibraryEntity &&
other.assets == assets &&
other.createdAt == createdAt &&
other.deletedAt == deletedAt &&
other.exclusionPatterns == exclusionPatterns &&
other.id == id &&
other.importPaths == importPaths &&
other.isVisible == isVisible &&
other.name == name &&
other.owner == owner &&
other.ownerId == ownerId &&
other.refreshedAt == refreshedAt &&
other.type == type &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assets.hashCode) +
(createdAt.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(exclusionPatterns.hashCode) +
(id.hashCode) +
(importPaths.hashCode) +
(isVisible.hashCode) +
(name.hashCode) +
(owner.hashCode) +
(ownerId.hashCode) +
(refreshedAt == null ? 0 : refreshedAt!.hashCode) +
(type.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'LibraryEntity[assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, exclusionPatterns=$exclusionPatterns, id=$id, importPaths=$importPaths, isVisible=$isVisible, name=$name, owner=$owner, ownerId=$ownerId, refreshedAt=$refreshedAt, type=$type, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
}
json[r'exclusionPatterns'] = this.exclusionPatterns;
json[r'id'] = this.id;
json[r'importPaths'] = this.importPaths;
json[r'isVisible'] = this.isVisible;
json[r'name'] = this.name;
json[r'owner'] = this.owner;
json[r'ownerId'] = this.ownerId;
if (this.refreshedAt != null) {
json[r'refreshedAt'] = this.refreshedAt!.toUtc().toIso8601String();
} else {
// json[r'refreshedAt'] = null;
}
json[r'type'] = this.type;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [LibraryEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LibraryEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return LibraryEntity(
assets: AssetEntity.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', '')!,
deletedAt: mapDateTime(json, r'deletedAt', ''),
exclusionPatterns: json[r'exclusionPatterns'] is List
? (json[r'exclusionPatterns'] as List).cast<String>()
: const [],
id: mapValueOfType<String>(json, r'id')!,
importPaths: json[r'importPaths'] is List
? (json[r'importPaths'] as List).cast<String>()
: const [],
isVisible: mapValueOfType<bool>(json, r'isVisible')!,
name: mapValueOfType<String>(json, r'name')!,
owner: UserEntity.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
refreshedAt: mapDateTime(json, r'refreshedAt', ''),
type: LibraryEntityTypeEnum.fromJson(json[r'type'])!,
updatedAt: mapDateTime(json, r'updatedAt', '')!,
);
}
return null;
}
static List<LibraryEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LibraryEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LibraryEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, LibraryEntity> mapFromJson(dynamic json) {
final map = <String, LibraryEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = LibraryEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of LibraryEntity-objects as value to a dart map
static Map<String, List<LibraryEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LibraryEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = LibraryEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assets',
'createdAt',
'exclusionPatterns',
'id',
'importPaths',
'isVisible',
'name',
'owner',
'ownerId',
'refreshedAt',
'type',
'updatedAt',
};
}
class LibraryEntityTypeEnum {
/// Instantiate a new enum with the provided [value].
const LibraryEntityTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const UPLOAD = LibraryEntityTypeEnum._(r'UPLOAD');
static const EXTERNAL = LibraryEntityTypeEnum._(r'EXTERNAL');
/// List of all possible values in this [enum][LibraryEntityTypeEnum].
static const values = <LibraryEntityTypeEnum>[
UPLOAD,
EXTERNAL,
];
static LibraryEntityTypeEnum? fromJson(dynamic value) => LibraryEntityTypeEnumTypeTransformer().decode(value);
static List<LibraryEntityTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <LibraryEntityTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = LibraryEntityTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [LibraryEntityTypeEnum] to String,
/// and [decode] dynamic data back to [LibraryEntityTypeEnum].
class LibraryEntityTypeEnumTypeTransformer {
factory LibraryEntityTypeEnumTypeTransformer() => _instance ??= const LibraryEntityTypeEnumTypeTransformer._();
const LibraryEntityTypeEnumTypeTransformer._();
String encode(LibraryEntityTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a LibraryEntityTypeEnum.
///
/// 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.
LibraryEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'UPLOAD': return LibraryEntityTypeEnum.UPLOAD;
case r'EXTERNAL': return LibraryEntityTypeEnum.EXTERNAL;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [LibraryEntityTypeEnumTypeTransformer] instance.
static LibraryEntityTypeEnumTypeTransformer? _instance;
}

View file

@ -1,198 +0,0 @@
//
// 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 PersonEntity {
/// Returns a new [PersonEntity] instance.
PersonEntity({
required this.birthDate,
required this.createdAt,
required this.faceAsset,
required this.faceAssetId,
this.faces = const [],
required this.id,
required this.isHidden,
required this.name,
required this.owner,
required this.ownerId,
required this.thumbnailPath,
required this.updatedAt,
});
DateTime? birthDate;
DateTime createdAt;
AssetEntity? faceAsset;
String? faceAssetId;
List<AssetFaceEntity> faces;
String id;
bool isHidden;
String name;
UserEntity owner;
String ownerId;
String thumbnailPath;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is PersonEntity &&
other.birthDate == birthDate &&
other.createdAt == createdAt &&
other.faceAsset == faceAsset &&
other.faceAssetId == faceAssetId &&
other.faces == faces &&
other.id == id &&
other.isHidden == isHidden &&
other.name == name &&
other.owner == owner &&
other.ownerId == ownerId &&
other.thumbnailPath == thumbnailPath &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(birthDate == null ? 0 : birthDate!.hashCode) +
(createdAt.hashCode) +
(faceAsset == null ? 0 : faceAsset!.hashCode) +
(faceAssetId == null ? 0 : faceAssetId!.hashCode) +
(faces.hashCode) +
(id.hashCode) +
(isHidden.hashCode) +
(name.hashCode) +
(owner.hashCode) +
(ownerId.hashCode) +
(thumbnailPath.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'PersonEntity[birthDate=$birthDate, createdAt=$createdAt, faceAsset=$faceAsset, faceAssetId=$faceAssetId, faces=$faces, id=$id, isHidden=$isHidden, name=$name, owner=$owner, ownerId=$ownerId, thumbnailPath=$thumbnailPath, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.birthDate != null) {
json[r'birthDate'] = this.birthDate!.toUtc().toIso8601String();
} else {
// json[r'birthDate'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.faceAsset != null) {
json[r'faceAsset'] = this.faceAsset;
} else {
// json[r'faceAsset'] = null;
}
if (this.faceAssetId != null) {
json[r'faceAssetId'] = this.faceAssetId;
} else {
// json[r'faceAssetId'] = null;
}
json[r'faces'] = this.faces;
json[r'id'] = this.id;
json[r'isHidden'] = this.isHidden;
json[r'name'] = this.name;
json[r'owner'] = this.owner;
json[r'ownerId'] = this.ownerId;
json[r'thumbnailPath'] = this.thumbnailPath;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [PersonEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static PersonEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return PersonEntity(
birthDate: mapDateTime(json, r'birthDate', ''),
createdAt: mapDateTime(json, r'createdAt', '')!,
faceAsset: AssetEntity.fromJson(json[r'faceAsset']),
faceAssetId: mapValueOfType<String>(json, r'faceAssetId'),
faces: AssetFaceEntity.listFromJson(json[r'faces']),
id: mapValueOfType<String>(json, r'id')!,
isHidden: mapValueOfType<bool>(json, r'isHidden')!,
name: mapValueOfType<String>(json, r'name')!,
owner: UserEntity.fromJson(json[r'owner'])!,
ownerId: mapValueOfType<String>(json, r'ownerId')!,
thumbnailPath: mapValueOfType<String>(json, r'thumbnailPath')!,
updatedAt: mapDateTime(json, r'updatedAt', '')!,
);
}
return null;
}
static List<PersonEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <PersonEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = PersonEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, PersonEntity> mapFromJson(dynamic json) {
final map = <String, PersonEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = PersonEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of PersonEntity-objects as value to a dart map
static Map<String, List<PersonEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<PersonEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = PersonEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'birthDate',
'createdAt',
'faceAsset',
'faceAssetId',
'faces',
'id',
'isHidden',
'name',
'owner',
'ownerId',
'thumbnailPath',
'updatedAt',
};
}

View file

@ -1,297 +0,0 @@
//
// 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 SharedLinkEntity {
/// Returns a new [SharedLinkEntity] instance.
SharedLinkEntity({
this.album,
required this.albumId,
required this.allowDownload,
required this.allowUpload,
this.assets = const [],
required this.createdAt,
required this.description,
required this.expiresAt,
required this.id,
required this.key,
required this.showExif,
required this.type,
required this.user,
required this.userId,
});
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
AlbumEntity? album;
String? albumId;
bool allowDownload;
bool allowUpload;
List<AssetEntity> assets;
DateTime createdAt;
String? description;
DateTime? expiresAt;
String id;
Object key;
bool showExif;
SharedLinkEntityTypeEnum type;
UserEntity user;
String userId;
@override
bool operator ==(Object other) => identical(this, other) || other is SharedLinkEntity &&
other.album == album &&
other.albumId == albumId &&
other.allowDownload == allowDownload &&
other.allowUpload == allowUpload &&
other.assets == assets &&
other.createdAt == createdAt &&
other.description == description &&
other.expiresAt == expiresAt &&
other.id == id &&
other.key == key &&
other.showExif == showExif &&
other.type == type &&
other.user == user &&
other.userId == userId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(album == null ? 0 : album!.hashCode) +
(albumId == null ? 0 : albumId!.hashCode) +
(allowDownload.hashCode) +
(allowUpload.hashCode) +
(assets.hashCode) +
(createdAt.hashCode) +
(description == null ? 0 : description!.hashCode) +
(expiresAt == null ? 0 : expiresAt!.hashCode) +
(id.hashCode) +
(key.hashCode) +
(showExif.hashCode) +
(type.hashCode) +
(user.hashCode) +
(userId.hashCode);
@override
String toString() => 'SharedLinkEntity[album=$album, albumId=$albumId, allowDownload=$allowDownload, allowUpload=$allowUpload, assets=$assets, createdAt=$createdAt, description=$description, expiresAt=$expiresAt, id=$id, key=$key, showExif=$showExif, type=$type, user=$user, userId=$userId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.album != null) {
json[r'album'] = this.album;
} else {
// json[r'album'] = null;
}
if (this.albumId != null) {
json[r'albumId'] = this.albumId;
} else {
// json[r'albumId'] = null;
}
json[r'allowDownload'] = this.allowDownload;
json[r'allowUpload'] = this.allowUpload;
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String();
} else {
// json[r'expiresAt'] = null;
}
json[r'id'] = this.id;
json[r'key'] = this.key;
json[r'showExif'] = this.showExif;
json[r'type'] = this.type;
json[r'user'] = this.user;
json[r'userId'] = this.userId;
return json;
}
/// Returns a new [SharedLinkEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SharedLinkEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return SharedLinkEntity(
album: AlbumEntity.fromJson(json[r'album']),
albumId: mapValueOfType<String>(json, r'albumId'),
allowDownload: mapValueOfType<bool>(json, r'allowDownload')!,
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
assets: AssetEntity.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', '')!,
description: mapValueOfType<String>(json, r'description'),
expiresAt: mapDateTime(json, r'expiresAt', ''),
id: mapValueOfType<String>(json, r'id')!,
key: mapValueOfType<Object>(json, r'key')!,
showExif: mapValueOfType<bool>(json, r'showExif')!,
type: SharedLinkEntityTypeEnum.fromJson(json[r'type'])!,
user: UserEntity.fromJson(json[r'user'])!,
userId: mapValueOfType<String>(json, r'userId')!,
);
}
return null;
}
static List<SharedLinkEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SharedLinkEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SharedLinkEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SharedLinkEntity> mapFromJson(dynamic json) {
final map = <String, SharedLinkEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SharedLinkEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SharedLinkEntity-objects as value to a dart map
static Map<String, List<SharedLinkEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SharedLinkEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SharedLinkEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'albumId',
'allowDownload',
'allowUpload',
'assets',
'createdAt',
'description',
'expiresAt',
'id',
'key',
'showExif',
'type',
'user',
'userId',
};
}
class SharedLinkEntityTypeEnum {
/// Instantiate a new enum with the provided [value].
const SharedLinkEntityTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const ALBUM = SharedLinkEntityTypeEnum._(r'ALBUM');
static const INDIVIDUAL = SharedLinkEntityTypeEnum._(r'INDIVIDUAL');
/// List of all possible values in this [enum][SharedLinkEntityTypeEnum].
static const values = <SharedLinkEntityTypeEnum>[
ALBUM,
INDIVIDUAL,
];
static SharedLinkEntityTypeEnum? fromJson(dynamic value) => SharedLinkEntityTypeEnumTypeTransformer().decode(value);
static List<SharedLinkEntityTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <SharedLinkEntityTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SharedLinkEntityTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [SharedLinkEntityTypeEnum] to String,
/// and [decode] dynamic data back to [SharedLinkEntityTypeEnum].
class SharedLinkEntityTypeEnumTypeTransformer {
factory SharedLinkEntityTypeEnumTypeTransformer() => _instance ??= const SharedLinkEntityTypeEnumTypeTransformer._();
const SharedLinkEntityTypeEnumTypeTransformer._();
String encode(SharedLinkEntityTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a SharedLinkEntityTypeEnum.
///
/// 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.
SharedLinkEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'ALBUM': return SharedLinkEntityTypeEnum.ALBUM;
case r'INDIVIDUAL': return SharedLinkEntityTypeEnum.INDIVIDUAL;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [SharedLinkEntityTypeEnumTypeTransformer] instance.
static SharedLinkEntityTypeEnumTypeTransformer? _instance;
}

View file

@ -1,157 +0,0 @@
//
// 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 SmartInfoEntity {
/// Returns a new [SmartInfoEntity] instance.
SmartInfoEntity({
this.asset,
required this.assetId,
this.clipEmbedding = const [],
this.objects = const [],
this.tags = 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.
///
AssetEntity? asset;
String assetId;
List<num>? clipEmbedding;
List<String>? objects;
List<String>? tags;
@override
bool operator ==(Object other) => identical(this, other) || other is SmartInfoEntity &&
other.asset == asset &&
other.assetId == assetId &&
other.clipEmbedding == clipEmbedding &&
other.objects == objects &&
other.tags == tags;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(asset == null ? 0 : asset!.hashCode) +
(assetId.hashCode) +
(clipEmbedding == null ? 0 : clipEmbedding!.hashCode) +
(objects == null ? 0 : objects!.hashCode) +
(tags == null ? 0 : tags!.hashCode);
@override
String toString() => 'SmartInfoEntity[asset=$asset, assetId=$assetId, clipEmbedding=$clipEmbedding, objects=$objects, tags=$tags]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.asset != null) {
json[r'asset'] = this.asset;
} else {
// json[r'asset'] = null;
}
json[r'assetId'] = this.assetId;
if (this.clipEmbedding != null) {
json[r'clipEmbedding'] = this.clipEmbedding;
} else {
// json[r'clipEmbedding'] = null;
}
if (this.objects != null) {
json[r'objects'] = this.objects;
} else {
// json[r'objects'] = null;
}
if (this.tags != null) {
json[r'tags'] = this.tags;
} else {
// json[r'tags'] = null;
}
return json;
}
/// Returns a new [SmartInfoEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static SmartInfoEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return SmartInfoEntity(
asset: AssetEntity.fromJson(json[r'asset']),
assetId: mapValueOfType<String>(json, r'assetId')!,
clipEmbedding: json[r'clipEmbedding'] is List
? (json[r'clipEmbedding'] as List).cast<num>()
: const [],
objects: json[r'objects'] is List
? (json[r'objects'] as List).cast<String>()
: const [],
tags: json[r'tags'] is List
? (json[r'tags'] as List).cast<String>()
: const [],
);
}
return null;
}
static List<SmartInfoEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SmartInfoEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = SmartInfoEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, SmartInfoEntity> mapFromJson(dynamic json) {
final map = <String, SmartInfoEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = SmartInfoEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of SmartInfoEntity-objects as value to a dart map
static Map<String, List<SmartInfoEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SmartInfoEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = SmartInfoEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'clipEmbedding',
'objects',
'tags',
};
}

View file

@ -1,227 +0,0 @@
//
// 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 TagEntity {
/// Returns a new [TagEntity] instance.
TagEntity({
this.assets = const [],
required this.id,
required this.name,
required this.renameTagId,
required this.type,
required this.user,
required this.userId,
});
List<AssetEntity> assets;
String id;
String name;
String? renameTagId;
TagEntityTypeEnum type;
UserEntity user;
String userId;
@override
bool operator ==(Object other) => identical(this, other) || other is TagEntity &&
other.assets == assets &&
other.id == id &&
other.name == name &&
other.renameTagId == renameTagId &&
other.type == type &&
other.user == user &&
other.userId == userId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assets.hashCode) +
(id.hashCode) +
(name.hashCode) +
(renameTagId == null ? 0 : renameTagId!.hashCode) +
(type.hashCode) +
(user.hashCode) +
(userId.hashCode);
@override
String toString() => 'TagEntity[assets=$assets, id=$id, name=$name, renameTagId=$renameTagId, type=$type, user=$user, userId=$userId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assets'] = this.assets;
json[r'id'] = this.id;
json[r'name'] = this.name;
if (this.renameTagId != null) {
json[r'renameTagId'] = this.renameTagId;
} else {
// json[r'renameTagId'] = null;
}
json[r'type'] = this.type;
json[r'user'] = this.user;
json[r'userId'] = this.userId;
return json;
}
/// Returns a new [TagEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static TagEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return TagEntity(
assets: AssetEntity.listFromJson(json[r'assets']),
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
renameTagId: mapValueOfType<String>(json, r'renameTagId'),
type: TagEntityTypeEnum.fromJson(json[r'type'])!,
user: UserEntity.fromJson(json[r'user'])!,
userId: mapValueOfType<String>(json, r'userId')!,
);
}
return null;
}
static List<TagEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, TagEntity> mapFromJson(dynamic json) {
final map = <String, TagEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = TagEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of TagEntity-objects as value to a dart map
static Map<String, List<TagEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = TagEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assets',
'id',
'name',
'renameTagId',
'type',
'user',
'userId',
};
}
class TagEntityTypeEnum {
/// Instantiate a new enum with the provided [value].
const TagEntityTypeEnum._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const OBJECT = TagEntityTypeEnum._(r'OBJECT');
static const FACE = TagEntityTypeEnum._(r'FACE');
static const CUSTOM = TagEntityTypeEnum._(r'CUSTOM');
/// List of all possible values in this [enum][TagEntityTypeEnum].
static const values = <TagEntityTypeEnum>[
OBJECT,
FACE,
CUSTOM,
];
static TagEntityTypeEnum? fromJson(dynamic value) => TagEntityTypeEnumTypeTransformer().decode(value);
static List<TagEntityTypeEnum>? listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagEntityTypeEnum>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = TagEntityTypeEnum.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [TagEntityTypeEnum] to String,
/// and [decode] dynamic data back to [TagEntityTypeEnum].
class TagEntityTypeEnumTypeTransformer {
factory TagEntityTypeEnumTypeTransformer() => _instance ??= const TagEntityTypeEnumTypeTransformer._();
const TagEntityTypeEnumTypeTransformer._();
String encode(TagEntityTypeEnum data) => data.value;
/// Decodes a [dynamic value][data] to a TagEntityTypeEnum.
///
/// 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.
TagEntityTypeEnum? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'OBJECT': return TagEntityTypeEnum.OBJECT;
case r'FACE': return TagEntityTypeEnum.FACE;
case r'CUSTOM': return TagEntityTypeEnum.CUSTOM;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [TagEntityTypeEnumTypeTransformer] instance.
static TagEntityTypeEnumTypeTransformer? _instance;
}

View file

@ -1,247 +0,0 @@
//
// 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 UserEntity {
/// Returns a new [UserEntity] instance.
UserEntity({
this.assets = const [],
required this.createdAt,
required this.deletedAt,
required this.email,
required this.externalPath,
required this.firstName,
required this.id,
required this.isAdmin,
required this.lastName,
required this.memoriesEnabled,
required this.oauthId,
this.password,
required this.profileImagePath,
required this.shouldChangePassword,
required this.storageLabel,
this.tags = const [],
required this.updatedAt,
});
List<AssetEntity> assets;
DateTime createdAt;
DateTime? deletedAt;
String email;
String? externalPath;
String firstName;
String id;
bool isAdmin;
String lastName;
bool memoriesEnabled;
String oauthId;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the 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;
String profileImagePath;
bool shouldChangePassword;
String? storageLabel;
List<TagEntity> tags;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is UserEntity &&
other.assets == assets &&
other.createdAt == createdAt &&
other.deletedAt == deletedAt &&
other.email == email &&
other.externalPath == externalPath &&
other.firstName == firstName &&
other.id == id &&
other.isAdmin == isAdmin &&
other.lastName == lastName &&
other.memoriesEnabled == memoriesEnabled &&
other.oauthId == oauthId &&
other.password == password &&
other.profileImagePath == profileImagePath &&
other.shouldChangePassword == shouldChangePassword &&
other.storageLabel == storageLabel &&
other.tags == tags &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assets.hashCode) +
(createdAt.hashCode) +
(deletedAt == null ? 0 : deletedAt!.hashCode) +
(email.hashCode) +
(externalPath == null ? 0 : externalPath!.hashCode) +
(firstName.hashCode) +
(id.hashCode) +
(isAdmin.hashCode) +
(lastName.hashCode) +
(memoriesEnabled.hashCode) +
(oauthId.hashCode) +
(password == null ? 0 : password!.hashCode) +
(profileImagePath.hashCode) +
(shouldChangePassword.hashCode) +
(storageLabel == null ? 0 : storageLabel!.hashCode) +
(tags.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'UserEntity[assets=$assets, createdAt=$createdAt, deletedAt=$deletedAt, email=$email, externalPath=$externalPath, firstName=$firstName, id=$id, isAdmin=$isAdmin, lastName=$lastName, memoriesEnabled=$memoriesEnabled, oauthId=$oauthId, password=$password, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, storageLabel=$storageLabel, tags=$tags, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assets'] = this.assets;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.deletedAt != null) {
json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String();
} else {
// json[r'deletedAt'] = null;
}
json[r'email'] = this.email;
if (this.externalPath != null) {
json[r'externalPath'] = this.externalPath;
} else {
// json[r'externalPath'] = null;
}
json[r'firstName'] = this.firstName;
json[r'id'] = this.id;
json[r'isAdmin'] = this.isAdmin;
json[r'lastName'] = this.lastName;
json[r'memoriesEnabled'] = this.memoriesEnabled;
json[r'oauthId'] = this.oauthId;
if (this.password != null) {
json[r'password'] = this.password;
} else {
// json[r'password'] = null;
}
json[r'profileImagePath'] = this.profileImagePath;
json[r'shouldChangePassword'] = this.shouldChangePassword;
if (this.storageLabel != null) {
json[r'storageLabel'] = this.storageLabel;
} else {
// json[r'storageLabel'] = null;
}
json[r'tags'] = this.tags;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [UserEntity] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static UserEntity? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return UserEntity(
assets: AssetEntity.listFromJson(json[r'assets']),
createdAt: mapDateTime(json, r'createdAt', '')!,
deletedAt: mapDateTime(json, r'deletedAt', ''),
email: mapValueOfType<String>(json, r'email')!,
externalPath: mapValueOfType<String>(json, r'externalPath'),
firstName: mapValueOfType<String>(json, r'firstName')!,
id: mapValueOfType<String>(json, r'id')!,
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
lastName: mapValueOfType<String>(json, r'lastName')!,
memoriesEnabled: mapValueOfType<bool>(json, r'memoriesEnabled')!,
oauthId: mapValueOfType<String>(json, r'oauthId')!,
password: mapValueOfType<String>(json, r'password'),
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
shouldChangePassword: mapValueOfType<bool>(json, r'shouldChangePassword')!,
storageLabel: mapValueOfType<String>(json, r'storageLabel'),
tags: TagEntity.listFromJson(json[r'tags']),
updatedAt: mapDateTime(json, r'updatedAt', '')!,
);
}
return null;
}
static List<UserEntity> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserEntity>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = UserEntity.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, UserEntity> mapFromJson(dynamic json) {
final map = <String, UserEntity>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = UserEntity.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of UserEntity-objects as value to a dart map
static Map<String, List<UserEntity>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UserEntity>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = UserEntity.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assets',
'createdAt',
'deletedAt',
'email',
'externalPath',
'firstName',
'id',
'isAdmin',
'lastName',
'memoriesEnabled',
'oauthId',
'profileImagePath',
'shouldChangePassword',
'storageLabel',
'tags',
'updatedAt',
};
}

View file

@ -1,87 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for AlbumEntity
void main() {
// final instance = AlbumEntity();
group('test AlbumEntity', () {
// String albumName
test('to test the property `albumName`', () async {
// TODO
});
// AssetEntity albumThumbnailAsset
test('to test the property `albumThumbnailAsset`', () async {
// TODO
});
// String albumThumbnailAssetId
test('to test the property `albumThumbnailAssetId`', () async {
// TODO
});
// List<AssetEntity> assets (default value: const [])
test('to test the property `assets`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// DateTime deletedAt
test('to test the property `deletedAt`', () async {
// TODO
});
// String description
test('to test the property `description`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// UserEntity owner
test('to test the property `owner`', () async {
// TODO
});
// String ownerId
test('to test the property `ownerId`', () async {
// TODO
});
// List<SharedLinkEntity> sharedLinks (default value: const [])
test('to test the property `sharedLinks`', () async {
// TODO
});
// List<UserEntity> sharedUsers (default value: const [])
test('to test the property `sharedUsers`', () async {
// TODO
});
// DateTime updatedAt
test('to test the property `updatedAt`', () async {
// TODO
});
});
}

View file

@ -1,197 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for AssetEntity
void main() {
// final instance = AssetEntity();
group('test AssetEntity', () {
// List<AlbumEntity> albums (default value: const [])
test('to test the property `albums`', () async {
// TODO
});
// Object checksum
test('to test the property `checksum`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// String deviceAssetId
test('to test the property `deviceAssetId`', () async {
// TODO
});
// String deviceId
test('to test the property `deviceId`', () async {
// TODO
});
// String duration
test('to test the property `duration`', () async {
// TODO
});
// String encodedVideoPath
test('to test the property `encodedVideoPath`', () async {
// TODO
});
// ExifEntity exifInfo
test('to test the property `exifInfo`', () async {
// TODO
});
// List<AssetFaceEntity> faces (default value: const [])
test('to test the property `faces`', () async {
// TODO
});
// DateTime fileCreatedAt
test('to test the property `fileCreatedAt`', () async {
// TODO
});
// DateTime fileModifiedAt
test('to test the property `fileModifiedAt`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// bool isArchived
test('to test the property `isArchived`', () async {
// TODO
});
// bool isExternal
test('to test the property `isExternal`', () async {
// TODO
});
// bool isFavorite
test('to test the property `isFavorite`', () async {
// TODO
});
// bool isOffline
test('to test the property `isOffline`', () async {
// TODO
});
// bool isReadOnly
test('to test the property `isReadOnly`', () async {
// TODO
});
// bool isVisible
test('to test the property `isVisible`', () async {
// TODO
});
// LibraryEntity library_
test('to test the property `library_`', () async {
// TODO
});
// String libraryId
test('to test the property `libraryId`', () async {
// TODO
});
// AssetEntity livePhotoVideo
test('to test the property `livePhotoVideo`', () async {
// TODO
});
// String livePhotoVideoId
test('to test the property `livePhotoVideoId`', () async {
// TODO
});
// String originalFileName
test('to test the property `originalFileName`', () async {
// TODO
});
// String originalPath
test('to test the property `originalPath`', () async {
// TODO
});
// UserEntity owner
test('to test the property `owner`', () async {
// TODO
});
// String ownerId
test('to test the property `ownerId`', () async {
// TODO
});
// String resizePath
test('to test the property `resizePath`', () async {
// TODO
});
// List<SharedLinkEntity> sharedLinks (default value: const [])
test('to test the property `sharedLinks`', () async {
// TODO
});
// String sidecarPath
test('to test the property `sidecarPath`', () async {
// TODO
});
// SmartInfoEntity smartInfo
test('to test the property `smartInfo`', () async {
// TODO
});
// List<TagEntity> tags (default value: const [])
test('to test the property `tags`', () async {
// TODO
});
// Object thumbhash
test('to test the property `thumbhash`', () async {
// TODO
});
// String type
test('to test the property `type`', () async {
// TODO
});
// DateTime updatedAt
test('to test the property `updatedAt`', () async {
// TODO
});
// String webpPath
test('to test the property `webpPath`', () async {
// TODO
});
});
}

View file

@ -11,66 +11,41 @@
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for AssetFaceEntity
// tests for AssetFaceBoxDto
void main() {
// final instance = AssetFaceEntity();
// final instance = AssetFaceBoxDto();
group('test AssetFaceEntity', () {
// AssetEntity asset
test('to test the property `asset`', () async {
// TODO
});
// String assetId
test('to test the property `assetId`', () async {
// TODO
});
// num boundingBoxX1
group('test AssetFaceBoxDto', () {
// int boundingBoxX1
test('to test the property `boundingBoxX1`', () async {
// TODO
});
// num boundingBoxX2
// int boundingBoxX2
test('to test the property `boundingBoxX2`', () async {
// TODO
});
// num boundingBoxY1
// int boundingBoxY1
test('to test the property `boundingBoxY1`', () async {
// TODO
});
// num boundingBoxY2
// int boundingBoxY2
test('to test the property `boundingBoxY2`', () async {
// TODO
});
// List<num> embedding (default value: const [])
test('to test the property `embedding`', () async {
// TODO
});
// num imageHeight
// int imageHeight
test('to test the property `imageHeight`', () async {
// TODO
});
// num imageWidth
// int imageWidth
test('to test the property `imageWidth`', () async {
// TODO
});
// PersonEntity person
test('to test the property `person`', () async {
// TODO
});
// String personId
test('to test the property `personId`', () async {
// TODO
});
});

View file

@ -1,170 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for ExifEntity
void main() {
// final instance = ExifEntity();
group('test ExifEntity', () {
// AssetEntity asset
test('to test the property `asset`', () async {
// TODO
});
// String assetId
test('to test the property `assetId`', () async {
// TODO
});
// num bitsPerSample
test('to test the property `bitsPerSample`', () async {
// TODO
});
// String city
test('to test the property `city`', () async {
// TODO
});
// String colorspace
test('to test the property `colorspace`', () async {
// TODO
});
// String country
test('to test the property `country`', () async {
// TODO
});
// DateTime dateTimeOriginal
test('to test the property `dateTimeOriginal`', () async {
// TODO
});
// General info
// String description
test('to test the property `description`', () async {
// TODO
});
// num exifImageHeight
test('to test the property `exifImageHeight`', () async {
// TODO
});
// num exifImageWidth
test('to test the property `exifImageWidth`', () async {
// TODO
});
// String exifTextSearchableColumn
test('to test the property `exifTextSearchableColumn`', () async {
// TODO
});
// String exposureTime
test('to test the property `exposureTime`', () async {
// TODO
});
// num fNumber
test('to test the property `fNumber`', () async {
// TODO
});
// num fileSizeInByte
test('to test the property `fileSizeInByte`', () async {
// TODO
});
// num focalLength
test('to test the property `focalLength`', () async {
// TODO
});
// Video info
// num fps
test('to test the property `fps`', () async {
// TODO
});
// num iso
test('to test the property `iso`', () async {
// TODO
});
// num latitude
test('to test the property `latitude`', () async {
// TODO
});
// String lensModel
test('to test the property `lensModel`', () async {
// TODO
});
// String livePhotoCID
test('to test the property `livePhotoCID`', () async {
// TODO
});
// num longitude
test('to test the property `longitude`', () async {
// TODO
});
// Image info
// String make
test('to test the property `make`', () async {
// TODO
});
// String model
test('to test the property `model`', () async {
// TODO
});
// DateTime modifyDate
test('to test the property `modifyDate`', () async {
// TODO
});
// String orientation
test('to test the property `orientation`', () async {
// TODO
});
// String profileDescription
test('to test the property `profileDescription`', () async {
// TODO
});
// String projectionType
test('to test the property `projectionType`', () async {
// TODO
});
// String state
test('to test the property `state`', () async {
// TODO
});
// String timeZone
test('to test the property `timeZone`', () async {
// TODO
});
});
}

View file

@ -1,87 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for LibraryEntity
void main() {
// final instance = LibraryEntity();
group('test LibraryEntity', () {
// List<AssetEntity> assets (default value: const [])
test('to test the property `assets`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// DateTime deletedAt
test('to test the property `deletedAt`', () async {
// TODO
});
// List<String> exclusionPatterns (default value: const [])
test('to test the property `exclusionPatterns`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// List<String> importPaths (default value: const [])
test('to test the property `importPaths`', () async {
// TODO
});
// bool isVisible
test('to test the property `isVisible`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// UserEntity owner
test('to test the property `owner`', () async {
// TODO
});
// String ownerId
test('to test the property `ownerId`', () async {
// TODO
});
// DateTime refreshedAt
test('to test the property `refreshedAt`', () async {
// TODO
});
// String type
test('to test the property `type`', () async {
// TODO
});
// DateTime updatedAt
test('to test the property `updatedAt`', () async {
// TODO
});
});
}

View file

@ -17,7 +17,7 @@ void main() {
// final instance = PersonApi();
group('tests for PersonApi', () {
//Future<PersonEntity> createPerson(AssetFaceUpdateDto assetFaceUpdateDto) async
//Future<PersonResponseDto> createPerson(AssetFaceUpdateDto assetFaceUpdateDto) async
test('test createPerson', () async {
// TODO
});
@ -27,7 +27,7 @@ void main() {
// TODO
});
//Future<AssetFaceEntity> getAssetFace(String id, String assetId) async
//Future<AssetFaceBoxDto> getAssetFace(String id, String assetId) async
test('test getAssetFace', () async {
// TODO
});

View file

@ -1,82 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for PersonEntity
void main() {
// final instance = PersonEntity();
group('test PersonEntity', () {
// DateTime birthDate
test('to test the property `birthDate`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// AssetEntity faceAsset
test('to test the property `faceAsset`', () async {
// TODO
});
// String faceAssetId
test('to test the property `faceAssetId`', () async {
// TODO
});
// List<AssetFaceEntity> faces (default value: const [])
test('to test the property `faces`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// bool isHidden
test('to test the property `isHidden`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// UserEntity owner
test('to test the property `owner`', () async {
// TODO
});
// String ownerId
test('to test the property `ownerId`', () async {
// TODO
});
// String thumbnailPath
test('to test the property `thumbnailPath`', () async {
// TODO
});
// DateTime updatedAt
test('to test the property `updatedAt`', () async {
// TODO
});
});
}

View file

@ -1,92 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SharedLinkEntity
void main() {
// final instance = SharedLinkEntity();
group('test SharedLinkEntity', () {
// AlbumEntity album
test('to test the property `album`', () async {
// TODO
});
// String albumId
test('to test the property `albumId`', () async {
// TODO
});
// bool allowDownload
test('to test the property `allowDownload`', () async {
// TODO
});
// bool allowUpload
test('to test the property `allowUpload`', () async {
// TODO
});
// List<AssetEntity> assets (default value: const [])
test('to test the property `assets`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// String description
test('to test the property `description`', () async {
// TODO
});
// DateTime expiresAt
test('to test the property `expiresAt`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// Object key
test('to test the property `key`', () async {
// TODO
});
// bool showExif
test('to test the property `showExif`', () async {
// TODO
});
// String type
test('to test the property `type`', () async {
// TODO
});
// UserEntity user
test('to test the property `user`', () async {
// TODO
});
// String userId
test('to test the property `userId`', () async {
// TODO
});
});
}

View file

@ -1,47 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for SmartInfoEntity
void main() {
// final instance = SmartInfoEntity();
group('test SmartInfoEntity', () {
// AssetEntity asset
test('to test the property `asset`', () async {
// TODO
});
// String assetId
test('to test the property `assetId`', () async {
// TODO
});
// List<num> clipEmbedding (default value: const [])
test('to test the property `clipEmbedding`', () async {
// TODO
});
// List<String> objects (default value: const [])
test('to test the property `objects`', () async {
// TODO
});
// List<String> tags (default value: const [])
test('to test the property `tags`', () async {
// TODO
});
});
}

View file

@ -1,57 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for TagEntity
void main() {
// final instance = TagEntity();
group('test TagEntity', () {
// List<AssetEntity> assets (default value: const [])
test('to test the property `assets`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// String name
test('to test the property `name`', () async {
// TODO
});
// String renameTagId
test('to test the property `renameTagId`', () async {
// TODO
});
// String type
test('to test the property `type`', () async {
// TODO
});
// UserEntity user
test('to test the property `user`', () async {
// TODO
});
// String userId
test('to test the property `userId`', () async {
// TODO
});
});
}

View file

@ -1,107 +0,0 @@
//
// 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
import 'package:openapi/api.dart';
import 'package:test/test.dart';
// tests for UserEntity
void main() {
// final instance = UserEntity();
group('test UserEntity', () {
// List<AssetEntity> assets (default value: const [])
test('to test the property `assets`', () async {
// TODO
});
// DateTime createdAt
test('to test the property `createdAt`', () async {
// TODO
});
// DateTime deletedAt
test('to test the property `deletedAt`', () async {
// TODO
});
// String email
test('to test the property `email`', () async {
// TODO
});
// String externalPath
test('to test the property `externalPath`', () async {
// TODO
});
// String firstName
test('to test the property `firstName`', () async {
// TODO
});
// String id
test('to test the property `id`', () async {
// TODO
});
// bool isAdmin
test('to test the property `isAdmin`', () async {
// TODO
});
// String lastName
test('to test the property `lastName`', () async {
// TODO
});
// bool memoriesEnabled
test('to test the property `memoriesEnabled`', () async {
// TODO
});
// String oauthId
test('to test the property `oauthId`', () async {
// TODO
});
// String password
test('to test the property `password`', () async {
// TODO
});
// String profileImagePath
test('to test the property `profileImagePath`', () async {
// TODO
});
// bool shouldChangePassword
test('to test the property `shouldChangePassword`', () async {
// TODO
});
// String storageLabel
test('to test the property `storageLabel`', () async {
// TODO
});
// List<TagEntity> tags (default value: const [])
test('to test the property `tags`', () async {
// TODO
});
// DateTime updatedAt
test('to test the property `updatedAt`', () async {
// TODO
});
});
}

View file

@ -3207,7 +3207,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PersonEntity"
"$ref": "#/components/schemas/PersonResponseDto"
}
}
},
@ -3590,7 +3590,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AssetFaceEntity"
"$ref": "#/components/schemas/AssetFaceBoxDto"
}
}
},
@ -5394,84 +5394,6 @@
],
"type": "object"
},
"AlbumEntity": {
"properties": {
"albumName": {
"type": "string"
},
"albumThumbnailAsset": {
"allOf": [
{
"$ref": "#/components/schemas/AssetEntity"
}
],
"nullable": true
},
"albumThumbnailAssetId": {
"nullable": true,
"type": "string"
},
"assets": {
"items": {
"$ref": "#/components/schemas/AssetEntity"
},
"type": "array"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"deletedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"description": {
"type": "string"
},
"id": {
"type": "string"
},
"owner": {
"$ref": "#/components/schemas/UserEntity"
},
"ownerId": {
"type": "string"
},
"sharedLinks": {
"items": {
"$ref": "#/components/schemas/SharedLinkEntity"
},
"type": "array"
},
"sharedUsers": {
"items": {
"$ref": "#/components/schemas/UserEntity"
},
"type": "array"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"owner",
"ownerId",
"albumName",
"description",
"createdAt",
"updatedAt",
"deletedAt",
"albumThumbnailAsset",
"albumThumbnailAssetId",
"sharedUsers",
"assets",
"sharedLinks"
],
"type": "object"
},
"AlbumResponseDto": {
"properties": {
"albumName": {
@ -5701,236 +5623,34 @@
],
"type": "object"
},
"AssetEntity": {
"AssetFaceBoxDto": {
"properties": {
"albums": {
"items": {
"$ref": "#/components/schemas/AlbumEntity"
},
"type": "array"
},
"checksum": {
"type": "object"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"deviceAssetId": {
"type": "string"
},
"deviceId": {
"type": "string"
},
"duration": {
"nullable": true,
"type": "string"
},
"encodedVideoPath": {
"nullable": true,
"type": "string"
},
"exifInfo": {
"$ref": "#/components/schemas/ExifEntity"
},
"faces": {
"items": {
"$ref": "#/components/schemas/AssetFaceEntity"
},
"type": "array"
},
"fileCreatedAt": {
"format": "date-time",
"type": "string"
},
"fileModifiedAt": {
"format": "date-time",
"type": "string"
},
"id": {
"type": "string"
},
"isArchived": {
"type": "boolean"
},
"isExternal": {
"type": "boolean"
},
"isFavorite": {
"type": "boolean"
},
"isOffline": {
"type": "boolean"
},
"isReadOnly": {
"type": "boolean"
},
"isVisible": {
"type": "boolean"
},
"library": {
"$ref": "#/components/schemas/LibraryEntity"
},
"libraryId": {
"type": "string"
},
"livePhotoVideo": {
"allOf": [
{
"$ref": "#/components/schemas/AssetEntity"
}
],
"nullable": true
},
"livePhotoVideoId": {
"nullable": true,
"type": "string"
},
"originalFileName": {
"type": "string"
},
"originalPath": {
"type": "string"
},
"owner": {
"$ref": "#/components/schemas/UserEntity"
},
"ownerId": {
"type": "string"
},
"resizePath": {
"nullable": true,
"type": "string"
},
"sharedLinks": {
"items": {
"$ref": "#/components/schemas/SharedLinkEntity"
},
"type": "array"
},
"sidecarPath": {
"nullable": true,
"type": "string"
},
"smartInfo": {
"$ref": "#/components/schemas/SmartInfoEntity"
},
"tags": {
"items": {
"$ref": "#/components/schemas/TagEntity"
},
"type": "array"
},
"thumbhash": {
"nullable": true,
"type": "object"
},
"type": {
"enum": [
"IMAGE",
"VIDEO",
"AUDIO",
"OTHER"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
},
"webpPath": {
"nullable": true,
"type": "string"
}
},
"required": [
"id",
"deviceAssetId",
"owner",
"ownerId",
"library",
"libraryId",
"deviceId",
"type",
"originalPath",
"resizePath",
"webpPath",
"thumbhash",
"encodedVideoPath",
"createdAt",
"updatedAt",
"fileCreatedAt",
"fileModifiedAt",
"isFavorite",
"isArchived",
"isExternal",
"isReadOnly",
"isOffline",
"checksum",
"duration",
"isVisible",
"livePhotoVideo",
"livePhotoVideoId",
"originalFileName",
"sidecarPath",
"tags",
"sharedLinks",
"faces"
],
"type": "object"
},
"AssetFaceEntity": {
"properties": {
"asset": {
"$ref": "#/components/schemas/AssetEntity"
},
"assetId": {
"type": "string"
},
"boundingBoxX1": {
"type": "number"
"type": "integer"
},
"boundingBoxX2": {
"type": "number"
"type": "integer"
},
"boundingBoxY1": {
"type": "number"
"type": "integer"
},
"boundingBoxY2": {
"type": "number"
},
"embedding": {
"items": {
"type": "number"
},
"nullable": true,
"type": "array"
"type": "integer"
},
"imageHeight": {
"type": "number"
"type": "integer"
},
"imageWidth": {
"type": "number"
},
"person": {
"$ref": "#/components/schemas/PersonEntity"
},
"personId": {
"type": "string"
"type": "integer"
}
},
"required": [
"assetId",
"personId",
"embedding",
"imageWidth",
"imageHeight",
"boundingBoxX1",
"boundingBoxY1",
"boundingBoxX2",
"boundingBoxY2",
"asset",
"person"
"boundingBoxY2"
],
"type": "object"
},
@ -6796,157 +6516,6 @@
],
"type": "string"
},
"ExifEntity": {
"properties": {
"asset": {
"$ref": "#/components/schemas/AssetEntity"
},
"assetId": {
"type": "string"
},
"bitsPerSample": {
"nullable": true,
"type": "number"
},
"city": {
"nullable": true,
"type": "string"
},
"colorspace": {
"nullable": true,
"type": "string"
},
"country": {
"nullable": true,
"type": "string"
},
"dateTimeOriginal": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"description": {
"description": "General info",
"type": "string"
},
"exifImageHeight": {
"nullable": true,
"type": "number"
},
"exifImageWidth": {
"nullable": true,
"type": "number"
},
"exifTextSearchableColumn": {
"type": "string"
},
"exposureTime": {
"nullable": true,
"type": "string"
},
"fNumber": {
"nullable": true,
"type": "number"
},
"fileSizeInByte": {
"nullable": true,
"type": "number"
},
"focalLength": {
"nullable": true,
"type": "number"
},
"fps": {
"description": "Video info",
"nullable": true,
"type": "number"
},
"iso": {
"nullable": true,
"type": "number"
},
"latitude": {
"nullable": true,
"type": "number"
},
"lensModel": {
"nullable": true,
"type": "string"
},
"livePhotoCID": {
"nullable": true,
"type": "string"
},
"longitude": {
"nullable": true,
"type": "number"
},
"make": {
"description": "Image info",
"nullable": true,
"type": "string"
},
"model": {
"nullable": true,
"type": "string"
},
"modifyDate": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"orientation": {
"nullable": true,
"type": "string"
},
"profileDescription": {
"nullable": true,
"type": "string"
},
"projectionType": {
"nullable": true,
"type": "string"
},
"state": {
"nullable": true,
"type": "string"
},
"timeZone": {
"nullable": true,
"type": "string"
}
},
"required": [
"assetId",
"description",
"exifImageWidth",
"exifImageHeight",
"fileSizeInByte",
"orientation",
"dateTimeOriginal",
"modifyDate",
"timeZone",
"latitude",
"longitude",
"projectionType",
"city",
"livePhotoCID",
"state",
"country",
"make",
"model",
"lensModel",
"fNumber",
"focalLength",
"iso",
"exposureTime",
"profileDescription",
"colorspace",
"bitsPerSample",
"exifTextSearchableColumn"
],
"type": "object"
},
"ExifResponseDto": {
"properties": {
"city": {
@ -7217,82 +6786,6 @@
],
"type": "object"
},
"LibraryEntity": {
"properties": {
"assets": {
"items": {
"$ref": "#/components/schemas/AssetEntity"
},
"type": "array"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"deletedAt": {
"format": "date-time",
"type": "string"
},
"exclusionPatterns": {
"items": {
"type": "string"
},
"type": "array"
},
"id": {
"type": "string"
},
"importPaths": {
"items": {
"type": "string"
},
"type": "array"
},
"isVisible": {
"type": "boolean"
},
"name": {
"type": "string"
},
"owner": {
"$ref": "#/components/schemas/UserEntity"
},
"ownerId": {
"type": "string"
},
"refreshedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"type": {
"enum": [
"UPLOAD",
"EXTERNAL"
],
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"name",
"assets",
"owner",
"ownerId",
"type",
"importPaths",
"exclusionPatterns",
"createdAt",
"updatedAt",
"refreshedAt",
"isVisible"
],
"type": "object"
},
"LibraryResponseDto": {
"properties": {
"assetCount": {
@ -7649,74 +7142,6 @@
],
"type": "object"
},
"PersonEntity": {
"properties": {
"birthDate": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"faceAsset": {
"allOf": [
{
"$ref": "#/components/schemas/AssetEntity"
}
],
"nullable": true
},
"faceAssetId": {
"nullable": true,
"type": "string"
},
"faces": {
"items": {
"$ref": "#/components/schemas/AssetFaceEntity"
},
"type": "array"
},
"id": {
"type": "string"
},
"isHidden": {
"type": "boolean"
},
"name": {
"type": "string"
},
"owner": {
"$ref": "#/components/schemas/UserEntity"
},
"ownerId": {
"type": "string"
},
"thumbnailPath": {
"type": "string"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"createdAt",
"updatedAt",
"ownerId",
"owner",
"name",
"birthDate",
"thumbnailPath",
"faceAssetId",
"faceAsset",
"faces",
"isHidden"
],
"type": "object"
},
"PersonResponseDto": {
"properties": {
"birthDate": {
@ -8249,80 +7674,6 @@
},
"type": "object"
},
"SharedLinkEntity": {
"properties": {
"album": {
"$ref": "#/components/schemas/AlbumEntity"
},
"albumId": {
"nullable": true,
"type": "string"
},
"allowDownload": {
"type": "boolean"
},
"allowUpload": {
"type": "boolean"
},
"assets": {
"items": {
"$ref": "#/components/schemas/AssetEntity"
},
"type": "array"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"description": {
"nullable": true,
"type": "string"
},
"expiresAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"id": {
"type": "string"
},
"key": {
"type": "object"
},
"showExif": {
"type": "boolean"
},
"type": {
"enum": [
"ALBUM",
"INDIVIDUAL"
],
"type": "string"
},
"user": {
"$ref": "#/components/schemas/UserEntity"
},
"userId": {
"type": "string"
}
},
"required": [
"id",
"description",
"userId",
"user",
"key",
"type",
"createdAt",
"expiresAt",
"allowUpload",
"allowDownload",
"showExif",
"assets",
"albumId"
],
"type": "object"
},
"SharedLinkResponseDto": {
"properties": {
"album": {
@ -8418,44 +7769,6 @@
],
"type": "object"
},
"SmartInfoEntity": {
"properties": {
"asset": {
"$ref": "#/components/schemas/AssetEntity"
},
"assetId": {
"type": "string"
},
"clipEmbedding": {
"items": {
"type": "number"
},
"nullable": true,
"type": "array"
},
"objects": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
},
"tags": {
"items": {
"type": "string"
},
"nullable": true,
"type": "array"
}
},
"required": [
"assetId",
"tags",
"objects",
"clipEmbedding"
],
"type": "object"
},
"SmartInfoResponseDto": {
"properties": {
"objects": {
@ -8864,50 +8177,6 @@
],
"type": "object"
},
"TagEntity": {
"properties": {
"assets": {
"items": {
"$ref": "#/components/schemas/AssetEntity"
},
"type": "array"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"renameTagId": {
"nullable": true,
"type": "string"
},
"type": {
"enum": [
"OBJECT",
"FACE",
"CUSTOM"
],
"type": "string"
},
"user": {
"$ref": "#/components/schemas/UserEntity"
},
"userId": {
"type": "string"
}
},
"required": [
"id",
"type",
"name",
"user",
"userId",
"renameTagId",
"assets"
],
"type": "object"
},
"TagResponseDto": {
"properties": {
"id": {
@ -9137,92 +8406,6 @@
],
"type": "object"
},
"UserEntity": {
"properties": {
"assets": {
"items": {
"$ref": "#/components/schemas/AssetEntity"
},
"type": "array"
},
"createdAt": {
"format": "date-time",
"type": "string"
},
"deletedAt": {
"format": "date-time",
"nullable": true,
"type": "string"
},
"email": {
"type": "string"
},
"externalPath": {
"nullable": true,
"type": "string"
},
"firstName": {
"type": "string"
},
"id": {
"type": "string"
},
"isAdmin": {
"type": "boolean"
},
"lastName": {
"type": "string"
},
"memoriesEnabled": {
"type": "boolean"
},
"oauthId": {
"type": "string"
},
"password": {
"type": "string"
},
"profileImagePath": {
"type": "string"
},
"shouldChangePassword": {
"type": "boolean"
},
"storageLabel": {
"nullable": true,
"type": "string"
},
"tags": {
"items": {
"$ref": "#/components/schemas/TagEntity"
},
"type": "array"
},
"updatedAt": {
"format": "date-time",
"type": "string"
}
},
"required": [
"id",
"firstName",
"lastName",
"isAdmin",
"email",
"storageLabel",
"externalPath",
"oauthId",
"profileImagePath",
"shouldChangePassword",
"createdAt",
"deletedAt",
"updatedAt",
"memoriesEnabled",
"tags",
"assets"
],
"type": "object"
},
"UserResponseDto": {
"properties": {
"createdAt": {

View file

@ -79,6 +79,26 @@ export class PersonSearchDto {
withHidden?: boolean = false;
}
export class AssetFaceBoxDto {
@ApiProperty({ type: 'integer' })
imageWidth!: number;
@ApiProperty({ type: 'integer' })
imageHeight!: number;
@ApiProperty({ type: 'integer' })
boundingBoxX1!: number;
@ApiProperty({ type: 'integer' })
boundingBoxY1!: number;
@ApiProperty({ type: 'integer' })
boundingBoxX2!: number;
@ApiProperty({ type: 'integer' })
boundingBoxY2!: number;
}
export class PersonResponseDto {
id!: string;
name!: string;

View file

@ -1,4 +1,4 @@
import { AssetFaceEntity, PersonEntity } from '@app/infra/entities';
import { PersonEntity } from '@app/infra/entities';
import { BadRequestException, Inject, Injectable, Logger, NotFoundException } from '@nestjs/common';
import { AccessCore, IAccessRepository, Permission } from '../access';
import {
@ -19,6 +19,7 @@ import { IMachineLearningRepository } from '../smart-info';
import { IStorageRepository, ImmichReadStream, StorageCore, StorageFolder } from '../storage';
import { ISystemConfigRepository, SystemConfigCore } from '../system-config';
import {
AssetFaceBoxDto,
AssetFaceUpdateDto,
MergePersonDto,
PeopleResponseDto,
@ -196,16 +197,24 @@ export class PersonService {
return true;
}
async getFaceEntity(authUser: AuthUserDto, personId: string, assetId: string): Promise<AssetFaceEntity> {
async getFaceEntity(authUser: AuthUserDto, personId: string, assetId: string): Promise<AssetFaceBoxDto> {
await this.access.requirePermission(authUser, Permission.PERSON_READ, personId);
const [face] = await this.repository.getFacesByIds([{ personId, assetId }]);
if (!face) {
throw new BadRequestException('Invalid assetId for feature face');
}
return face;
return {
boundingBoxX1: face.boundingBoxX1,
boundingBoxX2: face.boundingBoxX2,
boundingBoxY1: face.boundingBoxY1,
boundingBoxY2: face.boundingBoxY2,
imageHeight: face.imageHeight,
imageWidth: face.imageWidth,
};
}
async createPerson(authUser: AuthUserDto, dto: AssetFaceUpdateDto): Promise<PersonEntity> {
async createPerson(authUser: AuthUserDto, dto: AssetFaceUpdateDto): Promise<PersonResponseDto> {
let hasGeneratedFaceThumbnail = false;
const newPerson = await this.repository.create({ ownerId: authUser.id });

View file

@ -1,4 +1,5 @@
import {
AssetFaceBoxDto,
AssetFaceUpdateDto,
AssetResponseDto,
AuthUserDto,
@ -12,7 +13,6 @@ import {
PersonService,
PersonUpdateDto,
} from '@app/domain';
import { AssetFaceEntity, PersonEntity } from '@app/infra/entities';
import { Body, Controller, Get, Param, Post, Put, Query, StreamableFile } from '@nestjs/common';
import { ApiOkResponse, ApiTags } from '@nestjs/swagger';
import { ParseMeUUIDPipe } from '../api-v1/validation/parse-me-uuid-pipe';
@ -45,12 +45,12 @@ export class PersonController {
@AuthUser() authUser: AuthUserDto,
@Param() { id }: UUIDParamDto,
@Param('assetId', new ParseMeUUIDPipe({ version: '4' })) assetId: string,
): Promise<AssetFaceEntity> {
): Promise<AssetFaceBoxDto> {
return this.service.getFaceEntity(authUser, id, assetId);
}
@Post('')
createPerson(@AuthUser() authUser: AuthUserDto, @Body() dto: AssetFaceUpdateDto): Promise<PersonEntity> {
createPerson(@AuthUser() authUser: AuthUserDto, @Body() dto: AssetFaceUpdateDto): Promise<PersonResponseDto> {
return this.service.createPerson(authUser, dto);
}

File diff suppressed because it is too large Load diff