diff --git a/mobile/openapi/doc/APIKeyResponseDto.md b/mobile/openapi/doc/APIKeyResponseDto.md index f085aa0255..78ccbc19ca 100644 --- a/mobile/openapi/doc/APIKeyResponseDto.md +++ b/mobile/openapi/doc/APIKeyResponseDto.md @@ -8,7 +8,7 @@ import 'package:openapi/api.dart'; ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **num** | | +**id** | **int** | | **name** | **String** | | **createdAt** | **String** | | **updatedAt** | **String** | | diff --git a/mobile/openapi/lib/model/add_assets_dto.dart b/mobile/openapi/lib/model/add_assets_dto.dart index bebbaeb083..42908bc827 100644 --- a/mobile/openapi/lib/model/add_assets_dto.dart +++ b/mobile/openapi/lib/model/add_assets_dto.dart @@ -31,9 +31,9 @@ class AddAssetsDto { String toString() => 'AddAssetsDto[assetIds=$assetIds]'; Map toJson() { - final _json = {}; - _json[r'assetIds'] = assetIds; - return _json; + final json = {}; + json[r'assetIds'] = this.assetIds; + return json; } /// Returns a new [AddAssetsDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/add_assets_response_dto.dart b/mobile/openapi/lib/model/add_assets_response_dto.dart index 3f68d75285..c8723382c3 100644 --- a/mobile/openapi/lib/model/add_assets_response_dto.dart +++ b/mobile/openapi/lib/model/add_assets_response_dto.dart @@ -47,15 +47,15 @@ class AddAssetsResponseDto { String toString() => 'AddAssetsResponseDto[successfullyAdded=$successfullyAdded, alreadyInAlbum=$alreadyInAlbum, album=$album]'; Map toJson() { - final _json = {}; - _json[r'successfullyAdded'] = successfullyAdded; - _json[r'alreadyInAlbum'] = alreadyInAlbum; - if (album != null) { - _json[r'album'] = album; + final json = {}; + json[r'successfullyAdded'] = this.successfullyAdded; + json[r'alreadyInAlbum'] = this.alreadyInAlbum; + if (this.album != null) { + json[r'album'] = this.album; } else { - _json[r'album'] = null; + // json[r'album'] = null; } - return _json; + return json; } /// Returns a new [AddAssetsResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart index 6e0b5a88f8..2c565a217c 100644 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ b/mobile/openapi/lib/model/add_users_dto.dart @@ -31,9 +31,9 @@ class AddUsersDto { String toString() => 'AddUsersDto[sharedUserIds=$sharedUserIds]'; Map toJson() { - final _json = {}; - _json[r'sharedUserIds'] = sharedUserIds; - return _json; + final json = {}; + json[r'sharedUserIds'] = this.sharedUserIds; + return json; } /// Returns a new [AddUsersDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/admin_signup_response_dto.dart b/mobile/openapi/lib/model/admin_signup_response_dto.dart index 8757449690..8e18987078 100644 --- a/mobile/openapi/lib/model/admin_signup_response_dto.dart +++ b/mobile/openapi/lib/model/admin_signup_response_dto.dart @@ -51,13 +51,13 @@ class AdminSignupResponseDto { String toString() => 'AdminSignupResponseDto[id=$id, email=$email, firstName=$firstName, lastName=$lastName, createdAt=$createdAt]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'email'] = email; - _json[r'firstName'] = firstName; - _json[r'lastName'] = lastName; - _json[r'createdAt'] = createdAt; - return _json; + final json = {}; + json[r'id'] = this.id; + json[r'email'] = this.email; + json[r'firstName'] = this.firstName; + json[r'lastName'] = this.lastName; + json[r'createdAt'] = this.createdAt; + return json; } /// Returns a new [AdminSignupResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/album_count_response_dto.dart b/mobile/openapi/lib/model/album_count_response_dto.dart index 30fe19fb58..512c112348 100644 --- a/mobile/openapi/lib/model/album_count_response_dto.dart +++ b/mobile/openapi/lib/model/album_count_response_dto.dart @@ -41,11 +41,11 @@ class AlbumCountResponseDto { String toString() => 'AlbumCountResponseDto[owned=$owned, shared=$shared, sharing=$sharing]'; Map toJson() { - final _json = {}; - _json[r'owned'] = owned; - _json[r'shared'] = shared; - _json[r'sharing'] = sharing; - return _json; + final json = {}; + json[r'owned'] = this.owned; + json[r'shared'] = this.shared; + json[r'sharing'] = this.sharing; + return json; } /// Returns a new [AlbumCountResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart index ac170523d8..282344a16f 100644 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ b/mobile/openapi/lib/model/album_response_dto.dart @@ -71,21 +71,21 @@ class AlbumResponseDto { String toString() => 'AlbumResponseDto[assetCount=$assetCount, id=$id, ownerId=$ownerId, albumName=$albumName, createdAt=$createdAt, albumThumbnailAssetId=$albumThumbnailAssetId, shared=$shared, sharedUsers=$sharedUsers, assets=$assets]'; Map toJson() { - final _json = {}; - _json[r'assetCount'] = assetCount; - _json[r'id'] = id; - _json[r'ownerId'] = ownerId; - _json[r'albumName'] = albumName; - _json[r'createdAt'] = createdAt; - if (albumThumbnailAssetId != null) { - _json[r'albumThumbnailAssetId'] = albumThumbnailAssetId; + final json = {}; + json[r'assetCount'] = this.assetCount; + json[r'id'] = this.id; + json[r'ownerId'] = this.ownerId; + json[r'albumName'] = this.albumName; + json[r'createdAt'] = this.createdAt; + if (this.albumThumbnailAssetId != null) { + json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; } else { - _json[r'albumThumbnailAssetId'] = null; + // json[r'albumThumbnailAssetId'] = null; } - _json[r'shared'] = shared; - _json[r'sharedUsers'] = sharedUsers; - _json[r'assets'] = assets; - return _json; + json[r'shared'] = this.shared; + json[r'sharedUsers'] = this.sharedUsers; + json[r'assets'] = this.assets; + return json; } /// Returns a new [AlbumResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/all_job_status_response_dto.dart b/mobile/openapi/lib/model/all_job_status_response_dto.dart index 88865d7993..9bf95e3702 100644 --- a/mobile/openapi/lib/model/all_job_status_response_dto.dart +++ b/mobile/openapi/lib/model/all_job_status_response_dto.dart @@ -76,18 +76,18 @@ class AllJobStatusResponseDto { String toString() => 'AllJobStatusResponseDto[thumbnailGenerationQueueCount=$thumbnailGenerationQueueCount, metadataExtractionQueueCount=$metadataExtractionQueueCount, videoConversionQueueCount=$videoConversionQueueCount, machineLearningQueueCount=$machineLearningQueueCount, storageMigrationQueueCount=$storageMigrationQueueCount, isThumbnailGenerationActive=$isThumbnailGenerationActive, isMetadataExtractionActive=$isMetadataExtractionActive, isVideoConversionActive=$isVideoConversionActive, isMachineLearningActive=$isMachineLearningActive, isStorageMigrationActive=$isStorageMigrationActive]'; Map toJson() { - final _json = {}; - _json[r'thumbnailGenerationQueueCount'] = thumbnailGenerationQueueCount; - _json[r'metadataExtractionQueueCount'] = metadataExtractionQueueCount; - _json[r'videoConversionQueueCount'] = videoConversionQueueCount; - _json[r'machineLearningQueueCount'] = machineLearningQueueCount; - _json[r'storageMigrationQueueCount'] = storageMigrationQueueCount; - _json[r'isThumbnailGenerationActive'] = isThumbnailGenerationActive; - _json[r'isMetadataExtractionActive'] = isMetadataExtractionActive; - _json[r'isVideoConversionActive'] = isVideoConversionActive; - _json[r'isMachineLearningActive'] = isMachineLearningActive; - _json[r'isStorageMigrationActive'] = isStorageMigrationActive; - return _json; + final json = {}; + json[r'thumbnailGenerationQueueCount'] = this.thumbnailGenerationQueueCount; + json[r'metadataExtractionQueueCount'] = this.metadataExtractionQueueCount; + json[r'videoConversionQueueCount'] = this.videoConversionQueueCount; + json[r'machineLearningQueueCount'] = this.machineLearningQueueCount; + json[r'storageMigrationQueueCount'] = this.storageMigrationQueueCount; + json[r'isThumbnailGenerationActive'] = this.isThumbnailGenerationActive; + json[r'isMetadataExtractionActive'] = this.isMetadataExtractionActive; + json[r'isVideoConversionActive'] = this.isVideoConversionActive; + json[r'isMachineLearningActive'] = this.isMachineLearningActive; + json[r'isStorageMigrationActive'] = this.isStorageMigrationActive; + return json; } /// Returns a new [AllJobStatusResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart index 0cd0480b94..84b259030b 100644 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_dto.dart @@ -37,13 +37,13 @@ class APIKeyCreateDto { String toString() => 'APIKeyCreateDto[name=$name]'; Map toJson() { - final _json = {}; - if (name != null) { - _json[r'name'] = name; + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; } else { - _json[r'name'] = null; + // json[r'name'] = null; } - return _json; + return json; } /// Returns a new [APIKeyCreateDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/api_key_create_response_dto.dart b/mobile/openapi/lib/model/api_key_create_response_dto.dart index 5947f7ff0a..77b5e3df3e 100644 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_response_dto.dart @@ -36,10 +36,10 @@ class APIKeyCreateResponseDto { String toString() => 'APIKeyCreateResponseDto[secret=$secret, apiKey=$apiKey]'; Map toJson() { - final _json = {}; - _json[r'secret'] = secret; - _json[r'apiKey'] = apiKey; - return _json; + final json = {}; + json[r'secret'] = this.secret; + json[r'apiKey'] = this.apiKey; + return json; } /// Returns a new [APIKeyCreateResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart index 6b1d93dbee..3930829e26 100644 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_response_dto.dart @@ -19,7 +19,7 @@ class APIKeyResponseDto { required this.updatedAt, }); - num id; + int id; String name; @@ -46,12 +46,12 @@ class APIKeyResponseDto { String toString() => 'APIKeyResponseDto[id=$id, name=$name, createdAt=$createdAt, updatedAt=$updatedAt]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'name'] = name; - _json[r'createdAt'] = createdAt; - _json[r'updatedAt'] = updatedAt; - return _json; + final json = {}; + json[r'id'] = this.id; + json[r'name'] = this.name; + json[r'createdAt'] = this.createdAt; + json[r'updatedAt'] = this.updatedAt; + return json; } /// Returns a new [APIKeyResponseDto] instance and imports its values from @@ -73,9 +73,7 @@ class APIKeyResponseDto { }()); return APIKeyResponseDto( - id: json[r'id'] == null - ? null - : num.parse(json[r'id'].toString()), + id: mapValueOfType(json, r'id')!, name: mapValueOfType(json, r'name')!, createdAt: mapValueOfType(json, r'createdAt')!, updatedAt: mapValueOfType(json, r'updatedAt')!, diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart index 9116f84aa2..47847df788 100644 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ b/mobile/openapi/lib/model/api_key_update_dto.dart @@ -31,9 +31,9 @@ class APIKeyUpdateDto { String toString() => 'APIKeyUpdateDto[name=$name]'; Map toJson() { - final _json = {}; - _json[r'name'] = name; - return _json; + final json = {}; + json[r'name'] = this.name; + return json; } /// Returns a new [APIKeyUpdateDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/asset_count_by_time_bucket.dart b/mobile/openapi/lib/model/asset_count_by_time_bucket.dart index 410afbaae8..be1b22f8cd 100644 --- a/mobile/openapi/lib/model/asset_count_by_time_bucket.dart +++ b/mobile/openapi/lib/model/asset_count_by_time_bucket.dart @@ -36,10 +36,10 @@ class AssetCountByTimeBucket { String toString() => 'AssetCountByTimeBucket[timeBucket=$timeBucket, count=$count]'; Map toJson() { - final _json = {}; - _json[r'timeBucket'] = timeBucket; - _json[r'count'] = count; - return _json; + final json = {}; + json[r'timeBucket'] = this.timeBucket; + json[r'count'] = this.count; + return json; } /// Returns a new [AssetCountByTimeBucket] instance and imports its values from diff --git a/mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart b/mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart index 0b1f1d262f..834a60194a 100644 --- a/mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart +++ b/mobile/openapi/lib/model/asset_count_by_time_bucket_response_dto.dart @@ -36,10 +36,10 @@ class AssetCountByTimeBucketResponseDto { String toString() => 'AssetCountByTimeBucketResponseDto[totalCount=$totalCount, buckets=$buckets]'; Map toJson() { - final _json = {}; - _json[r'totalCount'] = totalCount; - _json[r'buckets'] = buckets; - return _json; + final json = {}; + json[r'totalCount'] = this.totalCount; + json[r'buckets'] = this.buckets; + return json; } /// Returns a new [AssetCountByTimeBucketResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/asset_count_by_user_id_response_dto.dart b/mobile/openapi/lib/model/asset_count_by_user_id_response_dto.dart index e1dddf1213..7b1f0e4878 100644 --- a/mobile/openapi/lib/model/asset_count_by_user_id_response_dto.dart +++ b/mobile/openapi/lib/model/asset_count_by_user_id_response_dto.dart @@ -51,13 +51,13 @@ class AssetCountByUserIdResponseDto { String toString() => 'AssetCountByUserIdResponseDto[audio=$audio, photos=$photos, videos=$videos, other=$other, total=$total]'; Map toJson() { - final _json = {}; - _json[r'audio'] = audio; - _json[r'photos'] = photos; - _json[r'videos'] = videos; - _json[r'other'] = other; - _json[r'total'] = total; - return _json; + final json = {}; + json[r'audio'] = this.audio; + json[r'photos'] = this.photos; + json[r'videos'] = this.videos; + json[r'other'] = this.other; + json[r'total'] = this.total; + return json; } /// Returns a new [AssetCountByUserIdResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/asset_file_upload_response_dto.dart b/mobile/openapi/lib/model/asset_file_upload_response_dto.dart index 40583b6ce5..d7802e89ea 100644 --- a/mobile/openapi/lib/model/asset_file_upload_response_dto.dart +++ b/mobile/openapi/lib/model/asset_file_upload_response_dto.dart @@ -31,9 +31,9 @@ class AssetFileUploadResponseDto { String toString() => 'AssetFileUploadResponseDto[id=$id]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - return _json; + final json = {}; + json[r'id'] = this.id; + return json; } /// Returns a new [AssetFileUploadResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart index ae15193a30..2f516e2bda 100644 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ b/mobile/openapi/lib/model/asset_response_dto.dart @@ -128,54 +128,54 @@ class AssetResponseDto { String toString() => 'AssetResponseDto[type=$type, id=$id, deviceAssetId=$deviceAssetId, ownerId=$ownerId, deviceId=$deviceId, originalPath=$originalPath, resizePath=$resizePath, createdAt=$createdAt, modifiedAt=$modifiedAt, isFavorite=$isFavorite, mimeType=$mimeType, duration=$duration, webpPath=$webpPath, encodedVideoPath=$encodedVideoPath, exifInfo=$exifInfo, smartInfo=$smartInfo, livePhotoVideoId=$livePhotoVideoId, tags=$tags]'; Map toJson() { - final _json = {}; - _json[r'type'] = type; - _json[r'id'] = id; - _json[r'deviceAssetId'] = deviceAssetId; - _json[r'ownerId'] = ownerId; - _json[r'deviceId'] = deviceId; - _json[r'originalPath'] = originalPath; - if (resizePath != null) { - _json[r'resizePath'] = resizePath; + final json = {}; + json[r'type'] = this.type; + json[r'id'] = this.id; + json[r'deviceAssetId'] = this.deviceAssetId; + json[r'ownerId'] = this.ownerId; + json[r'deviceId'] = this.deviceId; + json[r'originalPath'] = this.originalPath; + if (this.resizePath != null) { + json[r'resizePath'] = this.resizePath; } else { - _json[r'resizePath'] = null; + // json[r'resizePath'] = null; } - _json[r'createdAt'] = createdAt; - _json[r'modifiedAt'] = modifiedAt; - _json[r'isFavorite'] = isFavorite; - if (mimeType != null) { - _json[r'mimeType'] = mimeType; + json[r'createdAt'] = this.createdAt; + json[r'modifiedAt'] = this.modifiedAt; + json[r'isFavorite'] = this.isFavorite; + if (this.mimeType != null) { + json[r'mimeType'] = this.mimeType; } else { - _json[r'mimeType'] = null; + // json[r'mimeType'] = null; } - _json[r'duration'] = duration; - if (webpPath != null) { - _json[r'webpPath'] = webpPath; + json[r'duration'] = this.duration; + if (this.webpPath != null) { + json[r'webpPath'] = this.webpPath; } else { - _json[r'webpPath'] = null; + // json[r'webpPath'] = null; } - if (encodedVideoPath != null) { - _json[r'encodedVideoPath'] = encodedVideoPath; + if (this.encodedVideoPath != null) { + json[r'encodedVideoPath'] = this.encodedVideoPath; } else { - _json[r'encodedVideoPath'] = null; + // json[r'encodedVideoPath'] = null; } - if (exifInfo != null) { - _json[r'exifInfo'] = exifInfo; + if (this.exifInfo != null) { + json[r'exifInfo'] = this.exifInfo; } else { - _json[r'exifInfo'] = null; + // json[r'exifInfo'] = null; } - if (smartInfo != null) { - _json[r'smartInfo'] = smartInfo; + if (this.smartInfo != null) { + json[r'smartInfo'] = this.smartInfo; } else { - _json[r'smartInfo'] = null; + // json[r'smartInfo'] = null; } - if (livePhotoVideoId != null) { - _json[r'livePhotoVideoId'] = livePhotoVideoId; + if (this.livePhotoVideoId != null) { + json[r'livePhotoVideoId'] = this.livePhotoVideoId; } else { - _json[r'livePhotoVideoId'] = null; + // json[r'livePhotoVideoId'] = null; } - _json[r'tags'] = tags; - return _json; + json[r'tags'] = this.tags; + return json; } /// Returns a new [AssetResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart index dc8bb31e26..ebb6651b7f 100644 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ b/mobile/openapi/lib/model/change_password_dto.dart @@ -36,10 +36,10 @@ class ChangePasswordDto { String toString() => 'ChangePasswordDto[password=$password, newPassword=$newPassword]'; Map toJson() { - final _json = {}; - _json[r'password'] = password; - _json[r'newPassword'] = newPassword; - return _json; + final json = {}; + json[r'password'] = this.password; + json[r'newPassword'] = this.newPassword; + return json; } /// Returns a new [ChangePasswordDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart index 8644381cbf..65a4a6ebd2 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart @@ -36,10 +36,10 @@ class CheckDuplicateAssetDto { String toString() => 'CheckDuplicateAssetDto[deviceAssetId=$deviceAssetId, deviceId=$deviceId]'; Map toJson() { - final _json = {}; - _json[r'deviceAssetId'] = deviceAssetId; - _json[r'deviceId'] = deviceId; - return _json; + final json = {}; + json[r'deviceAssetId'] = this.deviceAssetId; + json[r'deviceId'] = this.deviceId; + return json; } /// Returns a new [CheckDuplicateAssetDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart b/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart index 5ef8f585e0..e106a899b5 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart @@ -42,14 +42,14 @@ class CheckDuplicateAssetResponseDto { String toString() => 'CheckDuplicateAssetResponseDto[isExist=$isExist, id=$id]'; Map toJson() { - final _json = {}; - _json[r'isExist'] = isExist; - if (id != null) { - _json[r'id'] = id; + final json = {}; + json[r'isExist'] = this.isExist; + if (this.id != null) { + json[r'id'] = this.id; } else { - _json[r'id'] = null; + // json[r'id'] = null; } - return _json; + return json; } /// Returns a new [CheckDuplicateAssetResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/check_existing_assets_dto.dart b/mobile/openapi/lib/model/check_existing_assets_dto.dart index e269365310..2cc69c40b5 100644 --- a/mobile/openapi/lib/model/check_existing_assets_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_dto.dart @@ -36,10 +36,10 @@ class CheckExistingAssetsDto { String toString() => 'CheckExistingAssetsDto[deviceAssetIds=$deviceAssetIds, deviceId=$deviceId]'; Map toJson() { - final _json = {}; - _json[r'deviceAssetIds'] = deviceAssetIds; - _json[r'deviceId'] = deviceId; - return _json; + final json = {}; + json[r'deviceAssetIds'] = this.deviceAssetIds; + json[r'deviceId'] = this.deviceId; + return json; } /// Returns a new [CheckExistingAssetsDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/check_existing_assets_response_dto.dart b/mobile/openapi/lib/model/check_existing_assets_response_dto.dart index 538482fc1c..0d46eb7259 100644 --- a/mobile/openapi/lib/model/check_existing_assets_response_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_response_dto.dart @@ -31,9 +31,9 @@ class CheckExistingAssetsResponseDto { String toString() => 'CheckExistingAssetsResponseDto[existingIds=$existingIds]'; Map toJson() { - final _json = {}; - _json[r'existingIds'] = existingIds; - return _json; + final json = {}; + json[r'existingIds'] = this.existingIds; + return json; } /// Returns a new [CheckExistingAssetsResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart index 202a474be7..3a6e08ea46 100644 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ b/mobile/openapi/lib/model/create_album_dto.dart @@ -41,11 +41,11 @@ class CreateAlbumDto { String toString() => 'CreateAlbumDto[albumName=$albumName, sharedWithUserIds=$sharedWithUserIds, assetIds=$assetIds]'; Map toJson() { - final _json = {}; - _json[r'albumName'] = albumName; - _json[r'sharedWithUserIds'] = sharedWithUserIds; - _json[r'assetIds'] = assetIds; - return _json; + final json = {}; + json[r'albumName'] = this.albumName; + json[r'sharedWithUserIds'] = this.sharedWithUserIds; + json[r'assetIds'] = this.assetIds; + return json; } /// Returns a new [CreateAlbumDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/create_album_share_link_dto.dart b/mobile/openapi/lib/model/create_album_share_link_dto.dart index e021ecde61..3144f9aa11 100644 --- a/mobile/openapi/lib/model/create_album_share_link_dto.dart +++ b/mobile/openapi/lib/model/create_album_share_link_dto.dart @@ -64,24 +64,24 @@ class CreateAlbumShareLinkDto { String toString() => 'CreateAlbumShareLinkDto[albumId=$albumId, expiredAt=$expiredAt, allowUpload=$allowUpload, description=$description]'; Map toJson() { - final _json = {}; - _json[r'albumId'] = albumId; - if (expiredAt != null) { - _json[r'expiredAt'] = expiredAt; + final json = {}; + json[r'albumId'] = this.albumId; + if (this.expiredAt != null) { + json[r'expiredAt'] = this.expiredAt; } else { - _json[r'expiredAt'] = null; + // json[r'expiredAt'] = null; } - if (allowUpload != null) { - _json[r'allowUpload'] = allowUpload; + if (this.allowUpload != null) { + json[r'allowUpload'] = this.allowUpload; } else { - _json[r'allowUpload'] = null; + // json[r'allowUpload'] = null; } - if (description != null) { - _json[r'description'] = description; + if (this.description != null) { + json[r'description'] = this.description; } else { - _json[r'description'] = null; + // json[r'description'] = null; } - return _json; + return json; } /// Returns a new [CreateAlbumShareLinkDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/create_profile_image_response_dto.dart b/mobile/openapi/lib/model/create_profile_image_response_dto.dart index fc7321cbb8..dfdcba8a47 100644 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ b/mobile/openapi/lib/model/create_profile_image_response_dto.dart @@ -36,10 +36,10 @@ class CreateProfileImageResponseDto { String toString() => 'CreateProfileImageResponseDto[userId=$userId, profileImagePath=$profileImagePath]'; Map toJson() { - final _json = {}; - _json[r'userId'] = userId; - _json[r'profileImagePath'] = profileImagePath; - return _json; + final json = {}; + json[r'userId'] = this.userId; + json[r'profileImagePath'] = this.profileImagePath; + return json; } /// Returns a new [CreateProfileImageResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/create_tag_dto.dart b/mobile/openapi/lib/model/create_tag_dto.dart index 0d9a79255c..60701f4cbf 100644 --- a/mobile/openapi/lib/model/create_tag_dto.dart +++ b/mobile/openapi/lib/model/create_tag_dto.dart @@ -36,10 +36,10 @@ class CreateTagDto { String toString() => 'CreateTagDto[type=$type, name=$name]'; Map toJson() { - final _json = {}; - _json[r'type'] = type; - _json[r'name'] = name; - return _json; + final json = {}; + json[r'type'] = this.type; + json[r'name'] = this.name; + return json; } /// Returns a new [CreateTagDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/create_user_dto.dart b/mobile/openapi/lib/model/create_user_dto.dart index b8977d46d9..bb7bb7c17d 100644 --- a/mobile/openapi/lib/model/create_user_dto.dart +++ b/mobile/openapi/lib/model/create_user_dto.dart @@ -46,12 +46,12 @@ class CreateUserDto { String toString() => 'CreateUserDto[email=$email, password=$password, firstName=$firstName, lastName=$lastName]'; Map toJson() { - final _json = {}; - _json[r'email'] = email; - _json[r'password'] = password; - _json[r'firstName'] = firstName; - _json[r'lastName'] = lastName; - return _json; + final json = {}; + json[r'email'] = this.email; + json[r'password'] = this.password; + json[r'firstName'] = this.firstName; + json[r'lastName'] = this.lastName; + return json; } /// Returns a new [CreateUserDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/curated_locations_response_dto.dart b/mobile/openapi/lib/model/curated_locations_response_dto.dart index 5117aa9908..75cd05c0ad 100644 --- a/mobile/openapi/lib/model/curated_locations_response_dto.dart +++ b/mobile/openapi/lib/model/curated_locations_response_dto.dart @@ -51,13 +51,13 @@ class CuratedLocationsResponseDto { String toString() => 'CuratedLocationsResponseDto[id=$id, city=$city, resizePath=$resizePath, deviceAssetId=$deviceAssetId, deviceId=$deviceId]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'city'] = city; - _json[r'resizePath'] = resizePath; - _json[r'deviceAssetId'] = deviceAssetId; - _json[r'deviceId'] = deviceId; - return _json; + final json = {}; + json[r'id'] = this.id; + json[r'city'] = this.city; + json[r'resizePath'] = this.resizePath; + json[r'deviceAssetId'] = this.deviceAssetId; + json[r'deviceId'] = this.deviceId; + return json; } /// Returns a new [CuratedLocationsResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/curated_objects_response_dto.dart b/mobile/openapi/lib/model/curated_objects_response_dto.dart index 00662c5f17..d7e6617bf1 100644 --- a/mobile/openapi/lib/model/curated_objects_response_dto.dart +++ b/mobile/openapi/lib/model/curated_objects_response_dto.dart @@ -51,13 +51,13 @@ class CuratedObjectsResponseDto { String toString() => 'CuratedObjectsResponseDto[id=$id, object=$object, resizePath=$resizePath, deviceAssetId=$deviceAssetId, deviceId=$deviceId]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'object'] = object; - _json[r'resizePath'] = resizePath; - _json[r'deviceAssetId'] = deviceAssetId; - _json[r'deviceId'] = deviceId; - return _json; + final json = {}; + json[r'id'] = this.id; + json[r'object'] = this.object; + json[r'resizePath'] = this.resizePath; + json[r'deviceAssetId'] = this.deviceAssetId; + json[r'deviceId'] = this.deviceId; + return json; } /// Returns a new [CuratedObjectsResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/delete_asset_dto.dart b/mobile/openapi/lib/model/delete_asset_dto.dart index 4830dd40c3..a7c613a436 100644 --- a/mobile/openapi/lib/model/delete_asset_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_dto.dart @@ -31,9 +31,9 @@ class DeleteAssetDto { String toString() => 'DeleteAssetDto[ids=$ids]'; Map toJson() { - final _json = {}; - _json[r'ids'] = ids; - return _json; + final json = {}; + json[r'ids'] = this.ids; + return json; } /// Returns a new [DeleteAssetDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/delete_asset_response_dto.dart b/mobile/openapi/lib/model/delete_asset_response_dto.dart index b71336aca8..d3e3a38f34 100644 --- a/mobile/openapi/lib/model/delete_asset_response_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_response_dto.dart @@ -36,10 +36,10 @@ class DeleteAssetResponseDto { String toString() => 'DeleteAssetResponseDto[status=$status, id=$id]'; Map toJson() { - final _json = {}; - _json[r'status'] = status; - _json[r'id'] = id; - return _json; + final json = {}; + json[r'status'] = this.status; + json[r'id'] = this.id; + return json; } /// Returns a new [DeleteAssetResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/device_info_response_dto.dart b/mobile/openapi/lib/model/device_info_response_dto.dart index ad831c4691..4d26fa392c 100644 --- a/mobile/openapi/lib/model/device_info_response_dto.dart +++ b/mobile/openapi/lib/model/device_info_response_dto.dart @@ -56,14 +56,14 @@ class DeviceInfoResponseDto { String toString() => 'DeviceInfoResponseDto[id=$id, deviceType=$deviceType, userId=$userId, deviceId=$deviceId, createdAt=$createdAt, isAutoBackup=$isAutoBackup]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'deviceType'] = deviceType; - _json[r'userId'] = userId; - _json[r'deviceId'] = deviceId; - _json[r'createdAt'] = createdAt; - _json[r'isAutoBackup'] = isAutoBackup; - return _json; + final json = {}; + json[r'id'] = this.id; + json[r'deviceType'] = this.deviceType; + json[r'userId'] = this.userId; + json[r'deviceId'] = this.deviceId; + json[r'createdAt'] = this.createdAt; + json[r'isAutoBackup'] = this.isAutoBackup; + return json; } /// Returns a new [DeviceInfoResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/download_files_dto.dart b/mobile/openapi/lib/model/download_files_dto.dart index bef626560e..14e2f4dd7a 100644 --- a/mobile/openapi/lib/model/download_files_dto.dart +++ b/mobile/openapi/lib/model/download_files_dto.dart @@ -31,9 +31,9 @@ class DownloadFilesDto { String toString() => 'DownloadFilesDto[assetIds=$assetIds]'; Map toJson() { - final _json = {}; - _json[r'assetIds'] = assetIds; - return _json; + final json = {}; + json[r'assetIds'] = this.assetIds; + return json; } /// Returns a new [DownloadFilesDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/edit_shared_link_dto.dart b/mobile/openapi/lib/model/edit_shared_link_dto.dart index 458ce2f759..8d8b988446 100644 --- a/mobile/openapi/lib/model/edit_shared_link_dto.dart +++ b/mobile/openapi/lib/model/edit_shared_link_dto.dart @@ -70,28 +70,28 @@ class EditSharedLinkDto { String toString() => 'EditSharedLinkDto[description=$description, expiredAt=$expiredAt, allowUpload=$allowUpload, isEditExpireTime=$isEditExpireTime]'; Map toJson() { - final _json = {}; - if (description != null) { - _json[r'description'] = description; + final json = {}; + if (this.description != null) { + json[r'description'] = this.description; } else { - _json[r'description'] = null; + // json[r'description'] = null; } - if (expiredAt != null) { - _json[r'expiredAt'] = expiredAt; + if (this.expiredAt != null) { + json[r'expiredAt'] = this.expiredAt; } else { - _json[r'expiredAt'] = null; + // json[r'expiredAt'] = null; } - if (allowUpload != null) { - _json[r'allowUpload'] = allowUpload; + if (this.allowUpload != null) { + json[r'allowUpload'] = this.allowUpload; } else { - _json[r'allowUpload'] = null; + // json[r'allowUpload'] = null; } - if (isEditExpireTime != null) { - _json[r'isEditExpireTime'] = isEditExpireTime; + if (this.isEditExpireTime != null) { + json[r'isEditExpireTime'] = this.isEditExpireTime; } else { - _json[r'isEditExpireTime'] = null; + // json[r'isEditExpireTime'] = null; } - return _json; + return json; } /// Returns a new [EditSharedLinkDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart index b81f0e347b..8423aa56a7 100644 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ b/mobile/openapi/lib/model/exif_response_dto.dart @@ -126,108 +126,108 @@ class ExifResponseDto { String toString() => 'ExifResponseDto[id=$id, fileSizeInByte=$fileSizeInByte, make=$make, model=$model, imageName=$imageName, exifImageWidth=$exifImageWidth, exifImageHeight=$exifImageHeight, orientation=$orientation, dateTimeOriginal=$dateTimeOriginal, modifyDate=$modifyDate, lensModel=$lensModel, fNumber=$fNumber, focalLength=$focalLength, iso=$iso, exposureTime=$exposureTime, latitude=$latitude, longitude=$longitude, city=$city, state=$state, country=$country]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; } else { - _json[r'id'] = null; + // json[r'id'] = null; } - if (fileSizeInByte != null) { - _json[r'fileSizeInByte'] = fileSizeInByte; + if (this.fileSizeInByte != null) { + json[r'fileSizeInByte'] = this.fileSizeInByte; } else { - _json[r'fileSizeInByte'] = null; + // json[r'fileSizeInByte'] = null; } - if (make != null) { - _json[r'make'] = make; + if (this.make != null) { + json[r'make'] = this.make; } else { - _json[r'make'] = null; + // json[r'make'] = null; } - if (model != null) { - _json[r'model'] = model; + if (this.model != null) { + json[r'model'] = this.model; } else { - _json[r'model'] = null; + // json[r'model'] = null; } - if (imageName != null) { - _json[r'imageName'] = imageName; + if (this.imageName != null) { + json[r'imageName'] = this.imageName; } else { - _json[r'imageName'] = null; + // json[r'imageName'] = null; } - if (exifImageWidth != null) { - _json[r'exifImageWidth'] = exifImageWidth; + if (this.exifImageWidth != null) { + json[r'exifImageWidth'] = this.exifImageWidth; } else { - _json[r'exifImageWidth'] = null; + // json[r'exifImageWidth'] = null; } - if (exifImageHeight != null) { - _json[r'exifImageHeight'] = exifImageHeight; + if (this.exifImageHeight != null) { + json[r'exifImageHeight'] = this.exifImageHeight; } else { - _json[r'exifImageHeight'] = null; + // json[r'exifImageHeight'] = null; } - if (orientation != null) { - _json[r'orientation'] = orientation; + if (this.orientation != null) { + json[r'orientation'] = this.orientation; } else { - _json[r'orientation'] = null; + // json[r'orientation'] = null; } - if (dateTimeOriginal != null) { - _json[r'dateTimeOriginal'] = dateTimeOriginal!.toUtc().toIso8601String(); + if (this.dateTimeOriginal != null) { + json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String(); } else { - _json[r'dateTimeOriginal'] = null; + // json[r'dateTimeOriginal'] = null; } - if (modifyDate != null) { - _json[r'modifyDate'] = modifyDate!.toUtc().toIso8601String(); + if (this.modifyDate != null) { + json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String(); } else { - _json[r'modifyDate'] = null; + // json[r'modifyDate'] = null; } - if (lensModel != null) { - _json[r'lensModel'] = lensModel; + if (this.lensModel != null) { + json[r'lensModel'] = this.lensModel; } else { - _json[r'lensModel'] = null; + // json[r'lensModel'] = null; } - if (fNumber != null) { - _json[r'fNumber'] = fNumber; + if (this.fNumber != null) { + json[r'fNumber'] = this.fNumber; } else { - _json[r'fNumber'] = null; + // json[r'fNumber'] = null; } - if (focalLength != null) { - _json[r'focalLength'] = focalLength; + if (this.focalLength != null) { + json[r'focalLength'] = this.focalLength; } else { - _json[r'focalLength'] = null; + // json[r'focalLength'] = null; } - if (iso != null) { - _json[r'iso'] = iso; + if (this.iso != null) { + json[r'iso'] = this.iso; } else { - _json[r'iso'] = null; + // json[r'iso'] = null; } - if (exposureTime != null) { - _json[r'exposureTime'] = exposureTime; + if (this.exposureTime != null) { + json[r'exposureTime'] = this.exposureTime; } else { - _json[r'exposureTime'] = null; + // json[r'exposureTime'] = null; } - if (latitude != null) { - _json[r'latitude'] = latitude; + if (this.latitude != null) { + json[r'latitude'] = this.latitude; } else { - _json[r'latitude'] = null; + // json[r'latitude'] = null; } - if (longitude != null) { - _json[r'longitude'] = longitude; + if (this.longitude != null) { + json[r'longitude'] = this.longitude; } else { - _json[r'longitude'] = null; + // json[r'longitude'] = null; } - if (city != null) { - _json[r'city'] = city; + if (this.city != null) { + json[r'city'] = this.city; } else { - _json[r'city'] = null; + // json[r'city'] = null; } - if (state != null) { - _json[r'state'] = state; + if (this.state != null) { + json[r'state'] = this.state; } else { - _json[r'state'] = null; + // json[r'state'] = null; } - if (country != null) { - _json[r'country'] = country; + if (this.country != null) { + json[r'country'] = this.country; } else { - _json[r'country'] = null; + // json[r'country'] = null; } - return _json; + return json; } /// Returns a new [ExifResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart b/mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart index c00518a1f3..d483153649 100644 --- a/mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart +++ b/mobile/openapi/lib/model/get_asset_by_time_bucket_dto.dart @@ -31,9 +31,9 @@ class GetAssetByTimeBucketDto { String toString() => 'GetAssetByTimeBucketDto[timeBucket=$timeBucket]'; Map toJson() { - final _json = {}; - _json[r'timeBucket'] = timeBucket; - return _json; + final json = {}; + json[r'timeBucket'] = this.timeBucket; + return json; } /// Returns a new [GetAssetByTimeBucketDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart b/mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart index 4a75a8caae..342d2b59c6 100644 --- a/mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart +++ b/mobile/openapi/lib/model/get_asset_count_by_time_bucket_dto.dart @@ -31,9 +31,9 @@ class GetAssetCountByTimeBucketDto { String toString() => 'GetAssetCountByTimeBucketDto[timeGroup=$timeGroup]'; Map toJson() { - final _json = {}; - _json[r'timeGroup'] = timeGroup; - return _json; + final json = {}; + json[r'timeGroup'] = this.timeGroup; + return json; } /// Returns a new [GetAssetCountByTimeBucketDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/job_command_dto.dart b/mobile/openapi/lib/model/job_command_dto.dart index 808eb50d75..e3e5d41da8 100644 --- a/mobile/openapi/lib/model/job_command_dto.dart +++ b/mobile/openapi/lib/model/job_command_dto.dart @@ -31,9 +31,9 @@ class JobCommandDto { String toString() => 'JobCommandDto[command=$command]'; Map toJson() { - final _json = {}; - _json[r'command'] = command; - return _json; + final json = {}; + json[r'command'] = this.command; + return json; } /// Returns a new [JobCommandDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/job_counts.dart b/mobile/openapi/lib/model/job_counts.dart index dadb72f328..795821a19b 100644 --- a/mobile/openapi/lib/model/job_counts.dart +++ b/mobile/openapi/lib/model/job_counts.dart @@ -51,13 +51,13 @@ class JobCounts { String toString() => 'JobCounts[active=$active, completed=$completed, failed=$failed, delayed=$delayed, waiting=$waiting]'; Map toJson() { - final _json = {}; - _json[r'active'] = active; - _json[r'completed'] = completed; - _json[r'failed'] = failed; - _json[r'delayed'] = delayed; - _json[r'waiting'] = waiting; - return _json; + final json = {}; + json[r'active'] = this.active; + json[r'completed'] = this.completed; + json[r'failed'] = this.failed; + json[r'delayed'] = this.delayed; + json[r'waiting'] = this.waiting; + return json; } /// Returns a new [JobCounts] instance and imports its values from diff --git a/mobile/openapi/lib/model/job_status_response_dto.dart b/mobile/openapi/lib/model/job_status_response_dto.dart index d3854b8f3a..2e6edb2938 100644 --- a/mobile/openapi/lib/model/job_status_response_dto.dart +++ b/mobile/openapi/lib/model/job_status_response_dto.dart @@ -36,10 +36,10 @@ class JobStatusResponseDto { String toString() => 'JobStatusResponseDto[isActive=$isActive, queueCount=$queueCount]'; Map toJson() { - final _json = {}; - _json[r'isActive'] = isActive; - _json[r'queueCount'] = queueCount; - return _json; + final json = {}; + json[r'isActive'] = this.isActive; + json[r'queueCount'] = this.queueCount; + return json; } /// Returns a new [JobStatusResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart index b8a23be593..103eedd4ba 100644 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ b/mobile/openapi/lib/model/login_credential_dto.dart @@ -36,10 +36,10 @@ class LoginCredentialDto { String toString() => 'LoginCredentialDto[email=$email, password=$password]'; Map toJson() { - final _json = {}; - _json[r'email'] = email; - _json[r'password'] = password; - return _json; + final json = {}; + json[r'email'] = this.email; + json[r'password'] = this.password; + return json; } /// Returns a new [LoginCredentialDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart index 4eec0475aa..9f3fa60f74 100644 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ b/mobile/openapi/lib/model/login_response_dto.dart @@ -66,16 +66,16 @@ class LoginResponseDto { String toString() => 'LoginResponseDto[accessToken=$accessToken, userId=$userId, userEmail=$userEmail, firstName=$firstName, lastName=$lastName, profileImagePath=$profileImagePath, isAdmin=$isAdmin, shouldChangePassword=$shouldChangePassword]'; Map toJson() { - final _json = {}; - _json[r'accessToken'] = accessToken; - _json[r'userId'] = userId; - _json[r'userEmail'] = userEmail; - _json[r'firstName'] = firstName; - _json[r'lastName'] = lastName; - _json[r'profileImagePath'] = profileImagePath; - _json[r'isAdmin'] = isAdmin; - _json[r'shouldChangePassword'] = shouldChangePassword; - return _json; + final json = {}; + json[r'accessToken'] = this.accessToken; + json[r'userId'] = this.userId; + json[r'userEmail'] = this.userEmail; + json[r'firstName'] = this.firstName; + json[r'lastName'] = this.lastName; + json[r'profileImagePath'] = this.profileImagePath; + json[r'isAdmin'] = this.isAdmin; + json[r'shouldChangePassword'] = this.shouldChangePassword; + return json; } /// Returns a new [LoginResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart index 52120aaabb..9a86bb6cc6 100644 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ b/mobile/openapi/lib/model/logout_response_dto.dart @@ -36,10 +36,10 @@ class LogoutResponseDto { String toString() => 'LogoutResponseDto[successful=$successful, redirectUri=$redirectUri]'; Map toJson() { - final _json = {}; - _json[r'successful'] = successful; - _json[r'redirectUri'] = redirectUri; - return _json; + final json = {}; + json[r'successful'] = this.successful; + json[r'redirectUri'] = this.redirectUri; + return json; } /// Returns a new [LogoutResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart index 3479f5b170..63f9cd3152 100644 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ b/mobile/openapi/lib/model/o_auth_callback_dto.dart @@ -31,9 +31,9 @@ class OAuthCallbackDto { String toString() => 'OAuthCallbackDto[url=$url]'; Map toJson() { - final _json = {}; - _json[r'url'] = url; - return _json; + final json = {}; + json[r'url'] = this.url; + return json; } /// Returns a new [OAuthCallbackDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart index 23173b46be..f33488b03c 100644 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_dto.dart @@ -31,9 +31,9 @@ class OAuthConfigDto { String toString() => 'OAuthConfigDto[redirectUri=$redirectUri]'; Map toJson() { - final _json = {}; - _json[r'redirectUri'] = redirectUri; - return _json; + final json = {}; + json[r'redirectUri'] = this.redirectUri; + return json; } /// Returns a new [OAuthConfigDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/o_auth_config_response_dto.dart b/mobile/openapi/lib/model/o_auth_config_response_dto.dart index db6c9c9e92..03025a07cb 100644 --- a/mobile/openapi/lib/model/o_auth_config_response_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_response_dto.dart @@ -69,25 +69,25 @@ class OAuthConfigResponseDto { String toString() => 'OAuthConfigResponseDto[enabled=$enabled, passwordLoginEnabled=$passwordLoginEnabled, url=$url, buttonText=$buttonText, autoLaunch=$autoLaunch]'; Map toJson() { - final _json = {}; - _json[r'enabled'] = enabled; - _json[r'passwordLoginEnabled'] = passwordLoginEnabled; - if (url != null) { - _json[r'url'] = url; + final json = {}; + json[r'enabled'] = this.enabled; + json[r'passwordLoginEnabled'] = this.passwordLoginEnabled; + if (this.url != null) { + json[r'url'] = this.url; } else { - _json[r'url'] = null; + // json[r'url'] = null; } - if (buttonText != null) { - _json[r'buttonText'] = buttonText; + if (this.buttonText != null) { + json[r'buttonText'] = this.buttonText; } else { - _json[r'buttonText'] = null; + // json[r'buttonText'] = null; } - if (autoLaunch != null) { - _json[r'autoLaunch'] = autoLaunch; + if (this.autoLaunch != null) { + json[r'autoLaunch'] = this.autoLaunch; } else { - _json[r'autoLaunch'] = null; + // json[r'autoLaunch'] = null; } - return _json; + return json; } /// Returns a new [OAuthConfigResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/remove_assets_dto.dart b/mobile/openapi/lib/model/remove_assets_dto.dart index 1457bac388..7dd1e9f9fb 100644 --- a/mobile/openapi/lib/model/remove_assets_dto.dart +++ b/mobile/openapi/lib/model/remove_assets_dto.dart @@ -31,9 +31,9 @@ class RemoveAssetsDto { String toString() => 'RemoveAssetsDto[assetIds=$assetIds]'; Map toJson() { - final _json = {}; - _json[r'assetIds'] = assetIds; - return _json; + final json = {}; + json[r'assetIds'] = this.assetIds; + return json; } /// Returns a new [RemoveAssetsDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/search_asset_dto.dart b/mobile/openapi/lib/model/search_asset_dto.dart index d90682750b..7bc1341ddb 100644 --- a/mobile/openapi/lib/model/search_asset_dto.dart +++ b/mobile/openapi/lib/model/search_asset_dto.dart @@ -31,9 +31,9 @@ class SearchAssetDto { String toString() => 'SearchAssetDto[searchTerm=$searchTerm]'; Map toJson() { - final _json = {}; - _json[r'searchTerm'] = searchTerm; - return _json; + final json = {}; + json[r'searchTerm'] = this.searchTerm; + return json; } /// Returns a new [SearchAssetDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/server_info_response_dto.dart b/mobile/openapi/lib/model/server_info_response_dto.dart index 0bc23439ca..5f359cde08 100644 --- a/mobile/openapi/lib/model/server_info_response_dto.dart +++ b/mobile/openapi/lib/model/server_info_response_dto.dart @@ -61,15 +61,15 @@ class ServerInfoResponseDto { String toString() => 'ServerInfoResponseDto[diskSizeRaw=$diskSizeRaw, diskUseRaw=$diskUseRaw, diskAvailableRaw=$diskAvailableRaw, diskUsagePercentage=$diskUsagePercentage, diskSize=$diskSize, diskUse=$diskUse, diskAvailable=$diskAvailable]'; Map toJson() { - final _json = {}; - _json[r'diskSizeRaw'] = diskSizeRaw; - _json[r'diskUseRaw'] = diskUseRaw; - _json[r'diskAvailableRaw'] = diskAvailableRaw; - _json[r'diskUsagePercentage'] = diskUsagePercentage; - _json[r'diskSize'] = diskSize; - _json[r'diskUse'] = diskUse; - _json[r'diskAvailable'] = diskAvailable; - return _json; + final json = {}; + json[r'diskSizeRaw'] = this.diskSizeRaw; + json[r'diskUseRaw'] = this.diskUseRaw; + json[r'diskAvailableRaw'] = this.diskAvailableRaw; + json[r'diskUsagePercentage'] = this.diskUsagePercentage; + json[r'diskSize'] = this.diskSize; + json[r'diskUse'] = this.diskUse; + json[r'diskAvailable'] = this.diskAvailable; + return json; } /// Returns a new [ServerInfoResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart index 56af4fa5ba..2385b27b8e 100644 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ b/mobile/openapi/lib/model/server_ping_response.dart @@ -31,9 +31,9 @@ class ServerPingResponse { String toString() => 'ServerPingResponse[res=$res]'; Map toJson() { - final _json = {}; - _json[r'res'] = res; - return _json; + final json = {}; + json[r'res'] = this.res; + return json; } /// Returns a new [ServerPingResponse] instance and imports its values from diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart index 5417439b48..7dbc1db42a 100644 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ b/mobile/openapi/lib/model/server_stats_response_dto.dart @@ -56,14 +56,14 @@ class ServerStatsResponseDto { String toString() => 'ServerStatsResponseDto[photos=$photos, videos=$videos, objects=$objects, usageRaw=$usageRaw, usage=$usage, usageByUser=$usageByUser]'; Map toJson() { - final _json = {}; - _json[r'photos'] = photos; - _json[r'videos'] = videos; - _json[r'objects'] = objects; - _json[r'usageRaw'] = usageRaw; - _json[r'usage'] = usage; - _json[r'usageByUser'] = usageByUser; - return _json; + final json = {}; + json[r'photos'] = this.photos; + json[r'videos'] = this.videos; + json[r'objects'] = this.objects; + json[r'usageRaw'] = this.usageRaw; + json[r'usage'] = this.usage; + json[r'usageByUser'] = this.usageByUser; + return json; } /// Returns a new [ServerStatsResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/server_version_reponse_dto.dart b/mobile/openapi/lib/model/server_version_reponse_dto.dart index 72caaf1940..aec917e275 100644 --- a/mobile/openapi/lib/model/server_version_reponse_dto.dart +++ b/mobile/openapi/lib/model/server_version_reponse_dto.dart @@ -46,12 +46,12 @@ class ServerVersionReponseDto { String toString() => 'ServerVersionReponseDto[major=$major, minor=$minor, patch_=$patch_, build=$build]'; Map toJson() { - final _json = {}; - _json[r'major'] = major; - _json[r'minor'] = minor; - _json[r'patch'] = patch_; - _json[r'build'] = build; - return _json; + final json = {}; + json[r'major'] = this.major; + json[r'minor'] = this.minor; + json[r'patch'] = this.patch_; + json[r'build'] = this.build; + return json; } /// Returns a new [ServerVersionReponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart index aad8972d2e..9adf91f7a3 100644 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ b/mobile/openapi/lib/model/shared_link_response_dto.dart @@ -88,30 +88,30 @@ class SharedLinkResponseDto { String toString() => 'SharedLinkResponseDto[type=$type, id=$id, description=$description, userId=$userId, key=$key, createdAt=$createdAt, expiresAt=$expiresAt, assets=$assets, album=$album, allowUpload=$allowUpload]'; Map toJson() { - final _json = {}; - _json[r'type'] = type; - _json[r'id'] = id; - if (description != null) { - _json[r'description'] = description; + final json = {}; + json[r'type'] = this.type; + json[r'id'] = this.id; + if (this.description != null) { + json[r'description'] = this.description; } else { - _json[r'description'] = null; + // json[r'description'] = null; } - _json[r'userId'] = userId; - _json[r'key'] = key; - _json[r'createdAt'] = createdAt; - if (expiresAt != null) { - _json[r'expiresAt'] = expiresAt; + json[r'userId'] = this.userId; + json[r'key'] = this.key; + json[r'createdAt'] = this.createdAt; + if (this.expiresAt != null) { + json[r'expiresAt'] = this.expiresAt; } else { - _json[r'expiresAt'] = null; + // json[r'expiresAt'] = null; } - _json[r'assets'] = assets; - if (album != null) { - _json[r'album'] = album; + json[r'assets'] = this.assets; + if (this.album != null) { + json[r'album'] = this.album; } else { - _json[r'album'] = null; + // json[r'album'] = null; } - _json[r'allowUpload'] = allowUpload; - return _json; + json[r'allowUpload'] = this.allowUpload; + return json; } /// Returns a new [SharedLinkResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart index dc027a3ce0..5aaa7ac31a 100644 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ b/mobile/openapi/lib/model/sign_up_dto.dart @@ -46,12 +46,12 @@ class SignUpDto { String toString() => 'SignUpDto[email=$email, password=$password, firstName=$firstName, lastName=$lastName]'; Map toJson() { - final _json = {}; - _json[r'email'] = email; - _json[r'password'] = password; - _json[r'firstName'] = firstName; - _json[r'lastName'] = lastName; - return _json; + final json = {}; + json[r'email'] = this.email; + json[r'password'] = this.password; + json[r'firstName'] = this.firstName; + json[r'lastName'] = this.lastName; + return json; } /// Returns a new [SignUpDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/smart_info_response_dto.dart b/mobile/openapi/lib/model/smart_info_response_dto.dart index e291cf13e3..d24c836d5e 100644 --- a/mobile/openapi/lib/model/smart_info_response_dto.dart +++ b/mobile/openapi/lib/model/smart_info_response_dto.dart @@ -47,23 +47,23 @@ class SmartInfoResponseDto { String toString() => 'SmartInfoResponseDto[id=$id, tags=$tags, objects=$objects]'; Map toJson() { - final _json = {}; - if (id != null) { - _json[r'id'] = id; + final json = {}; + if (this.id != null) { + json[r'id'] = this.id; } else { - _json[r'id'] = null; + // json[r'id'] = null; } - if (tags != null) { - _json[r'tags'] = tags; + if (this.tags != null) { + json[r'tags'] = this.tags; } else { - _json[r'tags'] = null; + // json[r'tags'] = null; } - if (objects != null) { - _json[r'objects'] = objects; + if (this.objects != null) { + json[r'objects'] = this.objects; } else { - _json[r'objects'] = null; + // json[r'objects'] = null; } - return _json; + return json; } /// Returns a new [SmartInfoResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart index a4e9760512..fb35e7350f 100644 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ b/mobile/openapi/lib/model/system_config_dto.dart @@ -46,12 +46,12 @@ class SystemConfigDto { String toString() => 'SystemConfigDto[ffmpeg=$ffmpeg, oauth=$oauth, passwordLogin=$passwordLogin, storageTemplate=$storageTemplate]'; Map toJson() { - final _json = {}; - _json[r'ffmpeg'] = ffmpeg; - _json[r'oauth'] = oauth; - _json[r'passwordLogin'] = passwordLogin; - _json[r'storageTemplate'] = storageTemplate; - return _json; + final json = {}; + json[r'ffmpeg'] = this.ffmpeg; + json[r'oauth'] = this.oauth; + json[r'passwordLogin'] = this.passwordLogin; + json[r'storageTemplate'] = this.storageTemplate; + return json; } /// Returns a new [SystemConfigDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart index 73692bdcea..064bdd36c2 100644 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart @@ -51,13 +51,13 @@ class SystemConfigFFmpegDto { String toString() => 'SystemConfigFFmpegDto[crf=$crf, preset=$preset, targetVideoCodec=$targetVideoCodec, targetAudioCodec=$targetAudioCodec, targetScaling=$targetScaling]'; Map toJson() { - final _json = {}; - _json[r'crf'] = crf; - _json[r'preset'] = preset; - _json[r'targetVideoCodec'] = targetVideoCodec; - _json[r'targetAudioCodec'] = targetAudioCodec; - _json[r'targetScaling'] = targetScaling; - return _json; + final json = {}; + json[r'crf'] = this.crf; + json[r'preset'] = this.preset; + json[r'targetVideoCodec'] = this.targetVideoCodec; + json[r'targetAudioCodec'] = this.targetAudioCodec; + json[r'targetScaling'] = this.targetScaling; + return json; } /// Returns a new [SystemConfigFFmpegDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_o_auth_dto.dart b/mobile/openapi/lib/model/system_config_o_auth_dto.dart index d0fb195ccc..19a87df106 100644 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ b/mobile/openapi/lib/model/system_config_o_auth_dto.dart @@ -76,18 +76,18 @@ class SystemConfigOAuthDto { String toString() => 'SystemConfigOAuthDto[enabled=$enabled, issuerUrl=$issuerUrl, clientId=$clientId, clientSecret=$clientSecret, scope=$scope, buttonText=$buttonText, autoRegister=$autoRegister, autoLaunch=$autoLaunch, mobileOverrideEnabled=$mobileOverrideEnabled, mobileRedirectUri=$mobileRedirectUri]'; Map toJson() { - final _json = {}; - _json[r'enabled'] = enabled; - _json[r'issuerUrl'] = issuerUrl; - _json[r'clientId'] = clientId; - _json[r'clientSecret'] = clientSecret; - _json[r'scope'] = scope; - _json[r'buttonText'] = buttonText; - _json[r'autoRegister'] = autoRegister; - _json[r'autoLaunch'] = autoLaunch; - _json[r'mobileOverrideEnabled'] = mobileOverrideEnabled; - _json[r'mobileRedirectUri'] = mobileRedirectUri; - return _json; + final json = {}; + json[r'enabled'] = this.enabled; + json[r'issuerUrl'] = this.issuerUrl; + json[r'clientId'] = this.clientId; + json[r'clientSecret'] = this.clientSecret; + json[r'scope'] = this.scope; + json[r'buttonText'] = this.buttonText; + json[r'autoRegister'] = this.autoRegister; + json[r'autoLaunch'] = this.autoLaunch; + json[r'mobileOverrideEnabled'] = this.mobileOverrideEnabled; + json[r'mobileRedirectUri'] = this.mobileRedirectUri; + return json; } /// Returns a new [SystemConfigOAuthDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_password_login_dto.dart b/mobile/openapi/lib/model/system_config_password_login_dto.dart index f5562800a9..5a0eba93a2 100644 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ b/mobile/openapi/lib/model/system_config_password_login_dto.dart @@ -31,9 +31,9 @@ class SystemConfigPasswordLoginDto { String toString() => 'SystemConfigPasswordLoginDto[enabled=$enabled]'; Map toJson() { - final _json = {}; - _json[r'enabled'] = enabled; - return _json; + final json = {}; + json[r'enabled'] = this.enabled; + return json; } /// Returns a new [SystemConfigPasswordLoginDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_storage_template_dto.dart b/mobile/openapi/lib/model/system_config_storage_template_dto.dart index 482641484f..c5fd4f9121 100644 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ b/mobile/openapi/lib/model/system_config_storage_template_dto.dart @@ -31,9 +31,9 @@ class SystemConfigStorageTemplateDto { String toString() => 'SystemConfigStorageTemplateDto[template=$template]'; Map toJson() { - final _json = {}; - _json[r'template'] = template; - return _json; + final json = {}; + json[r'template'] = this.template; + return json; } /// Returns a new [SystemConfigStorageTemplateDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart b/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart index a0a799bd09..721e79869d 100644 --- a/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart +++ b/mobile/openapi/lib/model/system_config_template_storage_option_dto.dart @@ -61,15 +61,15 @@ class SystemConfigTemplateStorageOptionDto { String toString() => 'SystemConfigTemplateStorageOptionDto[yearOptions=$yearOptions, monthOptions=$monthOptions, dayOptions=$dayOptions, hourOptions=$hourOptions, minuteOptions=$minuteOptions, secondOptions=$secondOptions, presetOptions=$presetOptions]'; Map toJson() { - final _json = {}; - _json[r'yearOptions'] = yearOptions; - _json[r'monthOptions'] = monthOptions; - _json[r'dayOptions'] = dayOptions; - _json[r'hourOptions'] = hourOptions; - _json[r'minuteOptions'] = minuteOptions; - _json[r'secondOptions'] = secondOptions; - _json[r'presetOptions'] = presetOptions; - return _json; + final json = {}; + json[r'yearOptions'] = this.yearOptions; + json[r'monthOptions'] = this.monthOptions; + json[r'dayOptions'] = this.dayOptions; + json[r'hourOptions'] = this.hourOptions; + json[r'minuteOptions'] = this.minuteOptions; + json[r'secondOptions'] = this.secondOptions; + json[r'presetOptions'] = this.presetOptions; + return json; } /// Returns a new [SystemConfigTemplateStorageOptionDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart index 69626a2fc6..352b0e5aa8 100644 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ b/mobile/openapi/lib/model/tag_response_dto.dart @@ -51,17 +51,17 @@ class TagResponseDto { String toString() => 'TagResponseDto[id=$id, type=$type, name=$name, userId=$userId, renameTagId=$renameTagId]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'type'] = type; - _json[r'name'] = name; - _json[r'userId'] = userId; - if (renameTagId != null) { - _json[r'renameTagId'] = renameTagId; + final json = {}; + json[r'id'] = this.id; + json[r'type'] = this.type; + json[r'name'] = this.name; + json[r'userId'] = this.userId; + if (this.renameTagId != null) { + json[r'renameTagId'] = this.renameTagId; } else { - _json[r'renameTagId'] = null; + // json[r'renameTagId'] = null; } - return _json; + return json; } /// Returns a new [TagResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart index 7f2ab6810b..17c1819979 100644 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ b/mobile/openapi/lib/model/update_album_dto.dart @@ -48,18 +48,18 @@ class UpdateAlbumDto { String toString() => 'UpdateAlbumDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId]'; Map toJson() { - final _json = {}; - if (albumName != null) { - _json[r'albumName'] = albumName; + final json = {}; + if (this.albumName != null) { + json[r'albumName'] = this.albumName; } else { - _json[r'albumName'] = null; + // json[r'albumName'] = null; } - if (albumThumbnailAssetId != null) { - _json[r'albumThumbnailAssetId'] = albumThumbnailAssetId; + if (this.albumThumbnailAssetId != null) { + json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; } else { - _json[r'albumThumbnailAssetId'] = null; + // json[r'albumThumbnailAssetId'] = null; } - return _json; + return json; } /// Returns a new [UpdateAlbumDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart index cb7fd1c883..dad7b2c3e1 100644 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ b/mobile/openapi/lib/model/update_asset_dto.dart @@ -42,14 +42,14 @@ class UpdateAssetDto { String toString() => 'UpdateAssetDto[tagIds=$tagIds, isFavorite=$isFavorite]'; Map toJson() { - final _json = {}; - _json[r'tagIds'] = tagIds; - if (isFavorite != null) { - _json[r'isFavorite'] = isFavorite; + final json = {}; + json[r'tagIds'] = this.tagIds; + if (this.isFavorite != null) { + json[r'isFavorite'] = this.isFavorite; } else { - _json[r'isFavorite'] = null; + // json[r'isFavorite'] = null; } - return _json; + return json; } /// Returns a new [UpdateAssetDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/update_tag_dto.dart b/mobile/openapi/lib/model/update_tag_dto.dart index a651405ec4..20696fe1b9 100644 --- a/mobile/openapi/lib/model/update_tag_dto.dart +++ b/mobile/openapi/lib/model/update_tag_dto.dart @@ -48,18 +48,18 @@ class UpdateTagDto { String toString() => 'UpdateTagDto[name=$name, renameTagId=$renameTagId]'; Map toJson() { - final _json = {}; - if (name != null) { - _json[r'name'] = name; + final json = {}; + if (this.name != null) { + json[r'name'] = this.name; } else { - _json[r'name'] = null; + // json[r'name'] = null; } - if (renameTagId != null) { - _json[r'renameTagId'] = renameTagId; + if (this.renameTagId != null) { + json[r'renameTagId'] = this.renameTagId; } else { - _json[r'renameTagId'] = null; + // json[r'renameTagId'] = null; } - return _json; + return json; } /// Returns a new [UpdateTagDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/update_user_dto.dart b/mobile/openapi/lib/model/update_user_dto.dart index bfb19c734d..edc5298104 100644 --- a/mobile/openapi/lib/model/update_user_dto.dart +++ b/mobile/openapi/lib/model/update_user_dto.dart @@ -108,44 +108,44 @@ class UpdateUserDto { String toString() => 'UpdateUserDto[id=$id, email=$email, password=$password, firstName=$firstName, lastName=$lastName, isAdmin=$isAdmin, shouldChangePassword=$shouldChangePassword, profileImagePath=$profileImagePath]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - if (email != null) { - _json[r'email'] = email; + final json = {}; + json[r'id'] = this.id; + if (this.email != null) { + json[r'email'] = this.email; } else { - _json[r'email'] = null; + // json[r'email'] = null; } - if (password != null) { - _json[r'password'] = password; + if (this.password != null) { + json[r'password'] = this.password; } else { - _json[r'password'] = null; + // json[r'password'] = null; } - if (firstName != null) { - _json[r'firstName'] = firstName; + if (this.firstName != null) { + json[r'firstName'] = this.firstName; } else { - _json[r'firstName'] = null; + // json[r'firstName'] = null; } - if (lastName != null) { - _json[r'lastName'] = lastName; + if (this.lastName != null) { + json[r'lastName'] = this.lastName; } else { - _json[r'lastName'] = null; + // json[r'lastName'] = null; } - if (isAdmin != null) { - _json[r'isAdmin'] = isAdmin; + if (this.isAdmin != null) { + json[r'isAdmin'] = this.isAdmin; } else { - _json[r'isAdmin'] = null; + // json[r'isAdmin'] = null; } - if (shouldChangePassword != null) { - _json[r'shouldChangePassword'] = shouldChangePassword; + if (this.shouldChangePassword != null) { + json[r'shouldChangePassword'] = this.shouldChangePassword; } else { - _json[r'shouldChangePassword'] = null; + // json[r'shouldChangePassword'] = null; } - if (profileImagePath != null) { - _json[r'profileImagePath'] = profileImagePath; + if (this.profileImagePath != null) { + json[r'profileImagePath'] = this.profileImagePath; } else { - _json[r'profileImagePath'] = null; + // json[r'profileImagePath'] = null; } - return _json; + return json; } /// Returns a new [UpdateUserDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/upsert_device_info_dto.dart b/mobile/openapi/lib/model/upsert_device_info_dto.dart index 7d642d28c5..d9fc14a617 100644 --- a/mobile/openapi/lib/model/upsert_device_info_dto.dart +++ b/mobile/openapi/lib/model/upsert_device_info_dto.dart @@ -47,15 +47,15 @@ class UpsertDeviceInfoDto { String toString() => 'UpsertDeviceInfoDto[deviceType=$deviceType, deviceId=$deviceId, isAutoBackup=$isAutoBackup]'; Map toJson() { - final _json = {}; - _json[r'deviceType'] = deviceType; - _json[r'deviceId'] = deviceId; - if (isAutoBackup != null) { - _json[r'isAutoBackup'] = isAutoBackup; + final json = {}; + json[r'deviceType'] = this.deviceType; + json[r'deviceId'] = this.deviceId; + if (this.isAutoBackup != null) { + json[r'isAutoBackup'] = this.isAutoBackup; } else { - _json[r'isAutoBackup'] = null; + // json[r'isAutoBackup'] = null; } - return _json; + return json; } /// Returns a new [UpsertDeviceInfoDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart index 6657b946e3..e18ac81de8 100644 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ b/mobile/openapi/lib/model/usage_by_user_dto.dart @@ -51,13 +51,13 @@ class UsageByUserDto { String toString() => 'UsageByUserDto[userId=$userId, videos=$videos, photos=$photos, usageRaw=$usageRaw, usage=$usage]'; Map toJson() { - final _json = {}; - _json[r'userId'] = userId; - _json[r'videos'] = videos; - _json[r'photos'] = photos; - _json[r'usageRaw'] = usageRaw; - _json[r'usage'] = usage; - return _json; + final json = {}; + json[r'userId'] = this.userId; + json[r'videos'] = this.videos; + json[r'photos'] = this.photos; + json[r'usageRaw'] = this.usageRaw; + json[r'usage'] = this.usage; + return json; } /// Returns a new [UsageByUserDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/user_count_response_dto.dart b/mobile/openapi/lib/model/user_count_response_dto.dart index ba11a4c362..81b0f488a9 100644 --- a/mobile/openapi/lib/model/user_count_response_dto.dart +++ b/mobile/openapi/lib/model/user_count_response_dto.dart @@ -31,9 +31,9 @@ class UserCountResponseDto { String toString() => 'UserCountResponseDto[userCount=$userCount]'; Map toJson() { - final _json = {}; - _json[r'userCount'] = userCount; - return _json; + final json = {}; + json[r'userCount'] = this.userCount; + return json; } /// Returns a new [UserCountResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart index f00efadf27..a9e80c593e 100644 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ b/mobile/openapi/lib/model/user_response_dto.dart @@ -82,22 +82,22 @@ class UserResponseDto { String toString() => 'UserResponseDto[id=$id, email=$email, firstName=$firstName, lastName=$lastName, createdAt=$createdAt, profileImagePath=$profileImagePath, shouldChangePassword=$shouldChangePassword, isAdmin=$isAdmin, deletedAt=$deletedAt, oauthId=$oauthId]'; Map toJson() { - final _json = {}; - _json[r'id'] = id; - _json[r'email'] = email; - _json[r'firstName'] = firstName; - _json[r'lastName'] = lastName; - _json[r'createdAt'] = createdAt; - _json[r'profileImagePath'] = profileImagePath; - _json[r'shouldChangePassword'] = shouldChangePassword; - _json[r'isAdmin'] = isAdmin; - if (deletedAt != null) { - _json[r'deletedAt'] = deletedAt!.toUtc().toIso8601String(); + final json = {}; + json[r'id'] = this.id; + json[r'email'] = this.email; + json[r'firstName'] = this.firstName; + json[r'lastName'] = this.lastName; + json[r'createdAt'] = this.createdAt; + json[r'profileImagePath'] = this.profileImagePath; + json[r'shouldChangePassword'] = this.shouldChangePassword; + json[r'isAdmin'] = this.isAdmin; + if (this.deletedAt != null) { + json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); } else { - _json[r'deletedAt'] = null; + // json[r'deletedAt'] = null; } - _json[r'oauthId'] = oauthId; - return _json; + json[r'oauthId'] = this.oauthId; + return json; } /// Returns a new [UserResponseDto] instance and imports its values from diff --git a/mobile/openapi/lib/model/validate_access_token_response_dto.dart b/mobile/openapi/lib/model/validate_access_token_response_dto.dart index b3f9f97359..a32f2d914e 100644 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ b/mobile/openapi/lib/model/validate_access_token_response_dto.dart @@ -31,9 +31,9 @@ class ValidateAccessTokenResponseDto { String toString() => 'ValidateAccessTokenResponseDto[authStatus=$authStatus]'; Map toJson() { - final _json = {}; - _json[r'authStatus'] = authStatus; - return _json; + final json = {}; + json[r'authStatus'] = this.authStatus; + return json; } /// Returns a new [ValidateAccessTokenResponseDto] instance and imports its values from diff --git a/mobile/openapi/test/api_key_response_dto_test.dart b/mobile/openapi/test/api_key_response_dto_test.dart index 6862afa7ad..a9c7b7e858 100644 --- a/mobile/openapi/test/api_key_response_dto_test.dart +++ b/mobile/openapi/test/api_key_response_dto_test.dart @@ -16,7 +16,7 @@ void main() { // final instance = APIKeyResponseDto(); group('test APIKeyResponseDto', () { - // num id + // int id test('to test the property `id`', () async { // TODO }); diff --git a/server/apps/immich/src/api-v1/api-key/repsonse-dto/api-key-response.dto.ts b/server/apps/immich/src/api-v1/api-key/repsonse-dto/api-key-response.dto.ts index bc1b6b3127..31a43df1ba 100644 --- a/server/apps/immich/src/api-v1/api-key/repsonse-dto/api-key-response.dto.ts +++ b/server/apps/immich/src/api-v1/api-key/repsonse-dto/api-key-response.dto.ts @@ -1,6 +1,8 @@ import { APIKeyEntity } from '@app/database'; +import { ApiProperty } from '@nestjs/swagger'; export class APIKeyResponseDto { + @ApiProperty({ type: 'integer' }) id!: number; name!: string; createdAt!: string; diff --git a/server/apps/immich/src/api-v1/user/user.core.ts b/server/apps/immich/src/api-v1/user/user.core.ts index df58041849..a263b3b27e 100644 --- a/server/apps/immich/src/api-v1/user/user.core.ts +++ b/server/apps/immich/src/api-v1/user/user.core.ts @@ -35,25 +35,12 @@ export class UserCore { } } - const user = await this.userRepository.get(id); - if (!user) { - throw new NotFoundException('User not found'); - } - try { if (dto.password) { dto.password = await hash(dto.password, SALT_ROUNDS); } - user.password = dto.password ?? user.password; - user.email = dto.email ?? user.email; - user.firstName = dto.firstName ?? user.firstName; - user.lastName = dto.lastName ?? user.lastName; - user.isAdmin = dto.isAdmin ?? user.isAdmin; - user.shouldChangePassword = dto.shouldChangePassword ?? user.shouldChangePassword; - user.profileImagePath = dto.profileImagePath ?? user.profileImagePath; - - return this.userRepository.update(id, user); + return this.userRepository.update(id, dto); } catch (e) { Logger.error(e, 'Failed to update user info'); throw new InternalServerErrorException('Failed to update user info'); diff --git a/server/bin/generate-open-api.sh b/server/bin/generate-open-api.sh new file mode 100755 index 0000000000..bc693269e9 --- /dev/null +++ b/server/bin/generate-open-api.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +function mobile { + rm -rf ../mobile/openapi + cd ./openapi-generator/templates/serialization/native + wget -O native_class.mustache https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/main/resources/dart2/serialization/native/native_class.mustache + patch -u native_class.mustache dart_constructor}} +{{#vars}} + {{#description}} + /// {{{.}}} + {{/description}} + {{^isEnum}} + {{#minimum}} + {{#description}} + /// + {{/description}} + /// Minimum value: {{{.}}} + {{/minimum}} + {{#maximum}} + {{#description}} + {{^minimum}} + /// + {{/minimum}} + {{/description}} + /// Maximum value: {{{.}}} + {{/maximum}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + /// + /// Please note: This property should have been non-nullable! Since the specification file + /// does not include a default value (using the "default:" property), however, the generated + /// source code must fall back to having a nullable type. + /// Consider adding a "default:" property in the specification file to hide this note. + /// + {{/defaultValue}} + {{/required}} + {{/isNullable}} + {{/isEnum}} + {{{datatypeWithEnum}}}{{#isNullable}}?{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}?{{/defaultValue}}{{/required}}{{/isNullable}} {{{name}}}; + +{{/vars}} + @override + bool operator ==(Object other) => identical(this, other) || other is {{{classname}}} && + {{#vars}} + other.{{{name}}} == {{{name}}}{{^-last}} &&{{/-last}}{{#-last}};{{/-last}} + {{/vars}} + + @override + int get hashCode => + // ignore: unnecessary_parenthesis + {{#vars}} + ({{#isNullable}}{{{name}}} == null ? 0 : {{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}{{{name}}} == null ? 0 : {{/defaultValue}}{{/required}}{{/isNullable}}{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.hashCode){{^-last}} +{{/-last}}{{#-last}};{{/-last}} + {{/vars}} + + @override + String toString() => '{{{classname}}}[{{#vars}}{{{name}}}=${{{name}}}{{^-last}}, {{/-last}}{{/vars}}]'; + + Map toJson() { + final json = {}; + {{#vars}} + {{#isNullable}} + if (this.{{{name}}} != null) { + {{/isNullable}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + if (this.{{{name}}} != null) { + {{/defaultValue}} + {{/required}} + {{/isNullable}} + {{#isDateTime}} + {{#pattern}} + json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + ? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch + : this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); + {{/pattern}} + {{^pattern}} + json[r'{{{baseName}}}'] = this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc().toIso8601String(); + {{/pattern}} + {{/isDateTime}} + {{#isDate}} + {{#pattern}} + json[r'{{{baseName}}}'] = _dateEpochMarker == '{{{pattern}}}' + ? this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.millisecondsSinceEpoch + : _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); + {{/pattern}} + {{^pattern}} + json[r'{{{baseName}}}'] = _dateFormatter.format(this.{{{name}}}{{#isNullable}}!{{/isNullable}}{{^isNullable}}{{^required}}{{^defaultValue}}!{{/defaultValue}}{{/required}}{{/isNullable}}.toUtc()); + {{/pattern}} + {{/isDate}} + {{^isDateTime}} + {{^isDate}} + json[r'{{{baseName}}}'] = this.{{{name}}}; + {{/isDate}} + {{/isDateTime}} + {{#isNullable}} + } else { + // json[r'{{{baseName}}}'] = null; + } + {{/isNullable}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + } else { + // json[r'{{{baseName}}}'] = null; + } + {{/defaultValue}} + {{/required}} + {{/isNullable}} + {{/vars}} + return json; + } + + /// Returns a new [{{{classname}}}] instance and imports its values from + /// [value] if it's a [Map], null otherwise. + // ignore: prefer_constructors_over_static_methods + static {{{classname}}}? fromJson(dynamic value) { + if (value is Map) { + final json = value.cast(); + + // Ensure that the map contains the required keys. + // Note 1: the values aren't checked for validity beyond being non-null. + // Note 2: this code is stripped in release mode! + assert(() { + requiredKeys.forEach((key) { + assert(json.containsKey(key), 'Required key "{{{classname}}}[$key]" is missing from JSON.'); + assert(json[key] != null, 'Required key "{{{classname}}}[$key]" has a null value in JSON.'); + }); + return true; + }()); + + return {{{classname}}}( + {{#vars}} + {{#isDateTime}} + {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isDateTime}} + {{#isDate}} + {{{name}}}: mapDateTime(json, r'{{{baseName}}}', '{{{pattern}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isDate}} + {{^isDateTime}} + {{^isDate}} + {{#complexType}} + {{#isArray}} + {{#items.isArray}} + {{{name}}}: json[r'{{{baseName}}}'] is List + ? (json[r'{{{baseName}}}'] as List).map((e) => + {{#items.complexType}} + {{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}} + {{/items.complexType}} + {{^items.complexType}} + e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>() + {{/items.complexType}} + ).toList() + : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}, + {{/items.isArray}} + {{^items.isArray}} + {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/items.isArray}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{#items.isArray}} + {{{name}}}: json[r'{{{baseName}}}'] == null + ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} + {{#items.complexType}} + : {{items.complexType}}.mapListFromJson(json[r'{{{baseName}}}']), + {{/items.complexType}} + {{^items.complexType}} + : mapCastOfType(json, r'{{{baseName}}}'), + {{/items.complexType}} + {{/items.isArray}} + {{^items.isArray}} + {{#items.isMap}} + {{#items.complexType}} + {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/items.complexType}} + {{^items.complexType}} + {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/items.complexType}} + {{/items.isMap}} + {{^items.isMap}} + {{#items.complexType}} + {{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'{{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}}]) ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/items.complexType}} + {{^items.complexType}} + {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/items.complexType}} + {{/items.isMap}} + {{/items.isArray}} + {{/isMap}} + {{^isMap}} + {{#isBinary}} + {{{name}}}: null, // No support for decoding binary content from JSON + {{/isBinary}} + {{^isBinary}} + {{{name}}}: {{{complexType}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isBinary}} + {{/isMap}} + {{/isArray}} + {{/complexType}} + {{^complexType}} + {{#isArray}} + {{#isEnum}} + {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isEnum}} + {{^isEnum}} + {{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}} + ? (json[r'{{{baseName}}}'] as {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}).cast<{{{items.datatype}}}>() + : {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}, + {{/isEnum}} + {{/isArray}} + {{^isArray}} + {{#isMap}} + {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isMap}} + {{^isMap}} + {{#isNumber}} + {{{name}}}: json[r'{{{baseName}}}'] == null + ? {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}} + : {{{datatypeWithEnum}}}.parse(json[r'{{{baseName}}}'].toString()), + {{/isNumber}} + {{^isNumber}} + {{^isEnum}} + {{{name}}}: mapValueOfType<{{{datatypeWithEnum}}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isEnum}} + {{#isEnum}} + {{{name}}}: {{{enumName}}}.fromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{/isEnum}} + {{/isNumber}} + {{/isMap}} + {{/isArray}} + {{/complexType}} + {{/isDate}} + {{/isDateTime}} + {{/vars}} + ); + } + return null; + } + + static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) { + final result = <{{{classname}}}>[]; + if (json is List && json.isNotEmpty) { + for (final row in json) { + final value = {{{classname}}}.fromJson(row); + if (value != null) { + result.add(value); + } + } + } + return result.toList(growable: growable); + } + + static Map mapFromJson(dynamic json) { + final map = {}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = {{{classname}}}.fromJson(entry.value); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + // maps a json object with a list of {{{classname}}}-objects as value to a dart map + static Map> mapListFromJson(dynamic json, {bool growable = false,}) { + final map = >{}; + if (json is Map && json.isNotEmpty) { + json = json.cast(); // ignore: parameter_assignments + for (final entry in json.entries) { + final value = {{{classname}}}.listFromJson(entry.value, growable: growable,); + if (value != null) { + map[entry.key] = value; + } + } + } + return map; + } + + /// The list of required keys that must be present in a JSON. + static const requiredKeys = { +{{#vars}} + {{#required}} + '{{{baseName}}}', + {{/required}} +{{/vars}} + }; +} +{{#vars}} + {{^isModel}} + {{#isEnum}} + {{^isContainer}} + +{{>serialization/native/native_enum_inline}} + {{/isContainer}} + {{#isContainer}} + {{#mostInnerItems}} + +{{>serialization/native/native_enum_inline}} + {{/mostInnerItems}} + {{/isContainer}} + {{/isEnum}} + {{/isModel}} +{{/vars}} diff --git a/server/openapi-generator/templates/serialization/native/native_class.mustache.patch b/server/openapi-generator/templates/serialization/native/native_class.mustache.patch new file mode 100644 index 0000000000..11ecf0271c --- /dev/null +++ b/server/openapi-generator/templates/serialization/native/native_class.mustache.patch @@ -0,0 +1,19 @@ +--- native_class.mustache 2023-01-04 09:58:25.683944036 -0500 ++++ native_class1.mustache 2023-01-04 09:59:43.856353945 -0500 +@@ -91,14 +91,14 @@ + {{/isDateTime}} + {{#isNullable}} + } else { +- json[r'{{{baseName}}}'] = null; ++ // json[r'{{{baseName}}}'] = null; + } + {{/isNullable}} + {{^isNullable}} + {{^required}} + {{^defaultValue}} + } else { +- json[r'{{{baseName}}}'] = null; ++ // json[r'{{{baseName}}}'] = null; + } + {{/defaultValue}} + {{/required}} diff --git a/server/package.json b/server/package.json index 1229f23c5a..9a0efc48ae 100644 --- a/server/package.json +++ b/server/package.json @@ -27,9 +27,9 @@ "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:e2e": "jest --config ./apps/immich/test/jest-e2e.json", "typeorm": "node --require ts-node/register ./node_modules/typeorm/cli.js", - "api:typescript": "rm -rf ../web/src/api/open-api && npx openapi-generator-cli generate -g typescript-axios -i ./immich-openapi-specs.json -o ../web/src/api/open-api", - "api:dart": "rm -rf ../mobile/openapi && npx openapi-generator-cli generate -g dart -i ./immich-openapi-specs.json -o ../mobile/openapi", - "api:generate": "npm run api:typescript && npm run api:dart" + "api:typescript": "bash ./bin/generate-open-api.sh web", + "api:dart": "bash ./bin/generate-open-api.sh mobile", + "api:generate": "bash ./bin/generate-open-api.sh" }, "dependencies": { "@nestjs/bull": "^0.5.5",