diff --git a/mobile/openapi/lib/model/add_assets_dto.dart b/mobile/openapi/lib/model/add_assets_dto.dart index 11a9292343c22..dd8ca47694071 100644 --- a/mobile/openapi/lib/model/add_assets_dto.dart +++ b/mobile/openapi/lib/model/add_assets_dto.dart @@ -43,17 +43,6 @@ class AddAssetsDto { 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 "AddAssetsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AddAssetsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AddAssetsDto( assetIds: json[r'assetIds'] is Iterable ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/add_assets_response_dto.dart b/mobile/openapi/lib/model/add_assets_response_dto.dart index 85a26651d9913..5b3586d85aed9 100644 --- a/mobile/openapi/lib/model/add_assets_response_dto.dart +++ b/mobile/openapi/lib/model/add_assets_response_dto.dart @@ -53,7 +53,7 @@ class AddAssetsResponseDto { if (this.album != null) { json[r'album'] = this.album; } else { - // json[r'album'] = null; + // json[r'album'] = null; } return json; } @@ -65,17 +65,6 @@ class AddAssetsResponseDto { 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 "AddAssetsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AddAssetsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AddAssetsResponseDto( successfullyAdded: mapValueOfType(json, r'successfullyAdded')!, alreadyInAlbum: json[r'alreadyInAlbum'] is Iterable diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart index d1108b0d7f86e..8f1d71e3a9441 100644 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ b/mobile/openapi/lib/model/add_users_dto.dart @@ -43,17 +43,6 @@ class AddUsersDto { 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 "AddUsersDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AddUsersDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AddUsersDto( sharedUserIds: json[r'sharedUserIds'] is Iterable ? (json[r'sharedUserIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/admin_signup_response_dto.dart b/mobile/openapi/lib/model/admin_signup_response_dto.dart index 38a7a75189539..70162665a32a9 100644 --- a/mobile/openapi/lib/model/admin_signup_response_dto.dart +++ b/mobile/openapi/lib/model/admin_signup_response_dto.dart @@ -67,17 +67,6 @@ class AdminSignupResponseDto { 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 "AdminSignupResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AdminSignupResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AdminSignupResponseDto( id: mapValueOfType(json, r'id')!, email: mapValueOfType(json, r'email')!, diff --git a/mobile/openapi/lib/model/album_count_response_dto.dart b/mobile/openapi/lib/model/album_count_response_dto.dart index 95d51df2cc33e..33fea91a8aded 100644 --- a/mobile/openapi/lib/model/album_count_response_dto.dart +++ b/mobile/openapi/lib/model/album_count_response_dto.dart @@ -55,17 +55,6 @@ class AlbumCountResponseDto { 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 "AlbumCountResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AlbumCountResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AlbumCountResponseDto( owned: mapValueOfType(json, r'owned')!, shared: mapValueOfType(json, r'shared')!, diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart index a6e9966e92da8..3c2df247a4f9c 100644 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ b/mobile/openapi/lib/model/album_response_dto.dart @@ -102,7 +102,7 @@ class AlbumResponseDto { if (this.albumThumbnailAssetId != null) { json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; } else { - // json[r'albumThumbnailAssetId'] = null; + // json[r'albumThumbnailAssetId'] = null; } json[r'shared'] = this.shared; json[r'sharedUsers'] = this.sharedUsers; @@ -111,7 +111,7 @@ class AlbumResponseDto { if (this.lastModifiedAssetTimestamp != null) { json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String(); } else { - // json[r'lastModifiedAssetTimestamp'] = null; + // json[r'lastModifiedAssetTimestamp'] = null; } return json; } @@ -123,17 +123,6 @@ class AlbumResponseDto { 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 "AlbumResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AlbumResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AlbumResponseDto( assetCount: mapValueOfType(json, r'assetCount')!, id: mapValueOfType(json, r'id')!, 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 7ae4a370faa07..aa3ba1d74d1dd 100644 --- a/mobile/openapi/lib/model/all_job_status_response_dto.dart +++ b/mobile/openapi/lib/model/all_job_status_response_dto.dart @@ -97,17 +97,6 @@ class AllJobStatusResponseDto { 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 "AllJobStatusResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AllJobStatusResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AllJobStatusResponseDto( thumbnailGeneration: JobStatusDto.fromJson(json[r'thumbnailGeneration'])!, metadataExtraction: JobStatusDto.fromJson(json[r'metadataExtraction'])!, diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart index f1e325179463f..c8eec9bfc7e79 100644 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_dto.dart @@ -41,7 +41,7 @@ class APIKeyCreateDto { if (this.name != null) { json[r'name'] = this.name; } else { - // json[r'name'] = null; + // json[r'name'] = null; } return json; } @@ -53,17 +53,6 @@ class APIKeyCreateDto { 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 "APIKeyCreateDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "APIKeyCreateDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return APIKeyCreateDto( name: mapValueOfType(json, r'name'), ); 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 d0c7a76b85d28..69f7ad6ec5d8e 100644 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_response_dto.dart @@ -49,17 +49,6 @@ class APIKeyCreateResponseDto { 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 "APIKeyCreateResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "APIKeyCreateResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return APIKeyCreateResponseDto( secret: mapValueOfType(json, r'secret')!, apiKey: APIKeyResponseDto.fromJson(json[r'apiKey'])!, diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart index 21e95d6d9ce22..2125d92c23ba3 100644 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_response_dto.dart @@ -61,17 +61,6 @@ class APIKeyResponseDto { 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 "APIKeyResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "APIKeyResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return APIKeyResponseDto( id: mapValueOfType(json, r'id')!, name: mapValueOfType(json, r'name')!, diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart index cbd6a256be8af..c28cafaee4b95 100644 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ b/mobile/openapi/lib/model/api_key_update_dto.dart @@ -43,17 +43,6 @@ class APIKeyUpdateDto { 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 "APIKeyUpdateDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "APIKeyUpdateDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return APIKeyUpdateDto( name: mapValueOfType(json, r'name')!, ); diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart index 96e3223aac15c..fc80d4537bc79 100644 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart +++ b/mobile/openapi/lib/model/asset_bulk_upload_check_dto.dart @@ -43,17 +43,6 @@ class AssetBulkUploadCheckDto { 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 "AssetBulkUploadCheckDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetBulkUploadCheckDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetBulkUploadCheckDto( assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']), ); diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart index b84af26eef4ed..4cc8689814636 100644 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart +++ b/mobile/openapi/lib/model/asset_bulk_upload_check_item.dart @@ -50,17 +50,6 @@ class AssetBulkUploadCheckItem { 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 "AssetBulkUploadCheckItem[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetBulkUploadCheckItem[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetBulkUploadCheckItem( id: mapValueOfType(json, r'id')!, checksum: mapValueOfType(json, r'checksum')!, diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart index 7f035a33715d1..f77c3686a3cda 100644 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart +++ b/mobile/openapi/lib/model/asset_bulk_upload_check_response_dto.dart @@ -43,17 +43,6 @@ class AssetBulkUploadCheckResponseDto { 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 "AssetBulkUploadCheckResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetBulkUploadCheckResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetBulkUploadCheckResponseDto( results: AssetBulkUploadCheckResult.listFromJson(json[r'results']), ); diff --git a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart b/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart index a6fdb8d24f814..3ca23ea4dc396 100644 --- a/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart +++ b/mobile/openapi/lib/model/asset_bulk_upload_check_result.dart @@ -58,12 +58,12 @@ class AssetBulkUploadCheckResult { if (this.reason != null) { json[r'reason'] = this.reason; } else { - // json[r'reason'] = null; + // json[r'reason'] = null; } if (this.assetId != null) { json[r'assetId'] = this.assetId; } else { - // json[r'assetId'] = null; + // json[r'assetId'] = null; } return json; } @@ -75,17 +75,6 @@ class AssetBulkUploadCheckResult { 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 "AssetBulkUploadCheckResult[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetBulkUploadCheckResult[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetBulkUploadCheckResult( id: mapValueOfType(json, r'id')!, action: AssetBulkUploadCheckResultActionEnum.fromJson(json[r'action'])!, 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 d71c1bb2a8517..0790d714a8d5d 100644 --- a/mobile/openapi/lib/model/asset_count_by_time_bucket.dart +++ b/mobile/openapi/lib/model/asset_count_by_time_bucket.dart @@ -49,17 +49,6 @@ class AssetCountByTimeBucket { 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 "AssetCountByTimeBucket[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetCountByTimeBucket[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetCountByTimeBucket( timeBucket: mapValueOfType(json, r'timeBucket')!, count: mapValueOfType(json, r'count')!, 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 3105ec1d3a0a6..49eb399a6423f 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 @@ -49,17 +49,6 @@ class AssetCountByTimeBucketResponseDto { 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 "AssetCountByTimeBucketResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetCountByTimeBucketResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetCountByTimeBucketResponseDto( totalCount: mapValueOfType(json, r'totalCount')!, buckets: AssetCountByTimeBucket.listFromJson(json[r'buckets']), 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 0b90dfbc2b897..0e2b1cefc457f 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 @@ -67,17 +67,6 @@ class AssetCountByUserIdResponseDto { 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 "AssetCountByUserIdResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetCountByUserIdResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetCountByUserIdResponseDto( audio: mapValueOfType(json, r'audio')!, photos: mapValueOfType(json, r'photos')!, 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 6c3b5abe7fc9e..7dd7ee0e26c9e 100644 --- a/mobile/openapi/lib/model/asset_file_upload_response_dto.dart +++ b/mobile/openapi/lib/model/asset_file_upload_response_dto.dart @@ -49,17 +49,6 @@ class AssetFileUploadResponseDto { 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 "AssetFileUploadResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetFileUploadResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetFileUploadResponseDto( id: mapValueOfType(json, r'id')!, duplicate: mapValueOfType(json, r'duplicate')!, diff --git a/mobile/openapi/lib/model/asset_ids_dto.dart b/mobile/openapi/lib/model/asset_ids_dto.dart index 910ab988751ca..f7835f1b46a68 100644 --- a/mobile/openapi/lib/model/asset_ids_dto.dart +++ b/mobile/openapi/lib/model/asset_ids_dto.dart @@ -43,17 +43,6 @@ class AssetIdsDto { 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 "AssetIdsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetIdsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetIdsDto( assetIds: json[r'assetIds'] is Iterable ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/asset_ids_response_dto.dart b/mobile/openapi/lib/model/asset_ids_response_dto.dart index 32b9074016de4..e3829a0425a30 100644 --- a/mobile/openapi/lib/model/asset_ids_response_dto.dart +++ b/mobile/openapi/lib/model/asset_ids_response_dto.dart @@ -47,7 +47,7 @@ class AssetIdsResponseDto { if (this.error != null) { json[r'error'] = this.error; } else { - // json[r'error'] = null; + // json[r'error'] = null; } return json; } @@ -59,17 +59,6 @@ class AssetIdsResponseDto { 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 "AssetIdsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetIdsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetIdsResponseDto( assetId: mapValueOfType(json, r'assetId')!, success: mapValueOfType(json, r'success')!, diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart index 9f80a9027966a..c068b61ebe710 100644 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ b/mobile/openapi/lib/model/asset_response_dto.dart @@ -162,7 +162,7 @@ class AssetResponseDto { if (this.thumbhash != null) { json[r'thumbhash'] = this.thumbhash; } else { - // json[r'thumbhash'] = null; + // json[r'thumbhash'] = null; } json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String(); json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String(); @@ -172,23 +172,23 @@ class AssetResponseDto { if (this.mimeType != null) { json[r'mimeType'] = this.mimeType; } else { - // json[r'mimeType'] = null; + // json[r'mimeType'] = null; } json[r'duration'] = this.duration; if (this.exifInfo != null) { json[r'exifInfo'] = this.exifInfo; } else { - // json[r'exifInfo'] = null; + // json[r'exifInfo'] = null; } if (this.smartInfo != null) { json[r'smartInfo'] = this.smartInfo; } else { - // json[r'smartInfo'] = null; + // json[r'smartInfo'] = null; } if (this.livePhotoVideoId != null) { json[r'livePhotoVideoId'] = this.livePhotoVideoId; } else { - // json[r'livePhotoVideoId'] = null; + // json[r'livePhotoVideoId'] = null; } json[r'tags'] = this.tags; json[r'people'] = this.people; @@ -203,17 +203,6 @@ class AssetResponseDto { 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 "AssetResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AssetResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AssetResponseDto( type: AssetTypeEnum.fromJson(json[r'type'])!, id: mapValueOfType(json, r'id')!, diff --git a/mobile/openapi/lib/model/auth_device_response_dto.dart b/mobile/openapi/lib/model/auth_device_response_dto.dart index 4bf908eee683a..eace07a35366e 100644 --- a/mobile/openapi/lib/model/auth_device_response_dto.dart +++ b/mobile/openapi/lib/model/auth_device_response_dto.dart @@ -73,17 +73,6 @@ class AuthDeviceResponseDto { 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 "AuthDeviceResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "AuthDeviceResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return AuthDeviceResponseDto( id: mapValueOfType(json, r'id')!, createdAt: mapValueOfType(json, r'createdAt')!, diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart index 8ed839e484a78..21547a245fe02 100644 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ b/mobile/openapi/lib/model/change_password_dto.dart @@ -49,17 +49,6 @@ class ChangePasswordDto { 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 "ChangePasswordDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ChangePasswordDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ChangePasswordDto( password: mapValueOfType(json, r'password')!, newPassword: mapValueOfType(json, r'newPassword')!, diff --git a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart index 30c94473ceaed..3d2a3cd57a329 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart @@ -49,17 +49,6 @@ class CheckDuplicateAssetDto { 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 "CheckDuplicateAssetDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CheckDuplicateAssetDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CheckDuplicateAssetDto( deviceAssetId: mapValueOfType(json, r'deviceAssetId')!, deviceId: mapValueOfType(json, r'deviceId')!, 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 07aecd10fb89c..d8b29ff51ef41 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart @@ -47,7 +47,7 @@ class CheckDuplicateAssetResponseDto { if (this.id != null) { json[r'id'] = this.id; } else { - // json[r'id'] = null; + // json[r'id'] = null; } return json; } @@ -59,17 +59,6 @@ class CheckDuplicateAssetResponseDto { 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 "CheckDuplicateAssetResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CheckDuplicateAssetResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CheckDuplicateAssetResponseDto( isExist: mapValueOfType(json, r'isExist')!, id: mapValueOfType(json, r'id'), diff --git a/mobile/openapi/lib/model/check_existing_assets_dto.dart b/mobile/openapi/lib/model/check_existing_assets_dto.dart index 3c8a441b80aeb..e06d1e28499e5 100644 --- a/mobile/openapi/lib/model/check_existing_assets_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_dto.dart @@ -49,17 +49,6 @@ class CheckExistingAssetsDto { 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 "CheckExistingAssetsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CheckExistingAssetsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CheckExistingAssetsDto( deviceAssetIds: json[r'deviceAssetIds'] is Iterable ? (json[r'deviceAssetIds'] as Iterable).cast().toList(growable: false) 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 d849f725fcf1e..7ec23f1699a0d 100644 --- a/mobile/openapi/lib/model/check_existing_assets_response_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_response_dto.dart @@ -43,17 +43,6 @@ class CheckExistingAssetsResponseDto { 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 "CheckExistingAssetsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CheckExistingAssetsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CheckExistingAssetsResponseDto( existingIds: json[r'existingIds'] is Iterable ? (json[r'existingIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart index c75995cc7d058..32e107371b012 100644 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ b/mobile/openapi/lib/model/create_album_dto.dart @@ -55,17 +55,6 @@ class CreateAlbumDto { 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 "CreateAlbumDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CreateAlbumDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CreateAlbumDto( albumName: mapValueOfType(json, r'albumName')!, sharedWithUserIds: json[r'sharedWithUserIds'] is Iterable 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 389f415e8c1da..f86da6385eed8 100644 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ b/mobile/openapi/lib/model/create_profile_image_response_dto.dart @@ -49,17 +49,6 @@ class CreateProfileImageResponseDto { 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 "CreateProfileImageResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CreateProfileImageResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CreateProfileImageResponseDto( userId: mapValueOfType(json, r'userId')!, profileImagePath: mapValueOfType(json, r'profileImagePath')!, diff --git a/mobile/openapi/lib/model/create_tag_dto.dart b/mobile/openapi/lib/model/create_tag_dto.dart index 24eb9a1894035..461c94ab1bf75 100644 --- a/mobile/openapi/lib/model/create_tag_dto.dart +++ b/mobile/openapi/lib/model/create_tag_dto.dart @@ -49,17 +49,6 @@ class CreateTagDto { 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 "CreateTagDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CreateTagDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CreateTagDto( type: TagTypeEnum.fromJson(json[r'type'])!, name: mapValueOfType(json, r'name')!, diff --git a/mobile/openapi/lib/model/create_user_dto.dart b/mobile/openapi/lib/model/create_user_dto.dart index cd1fc5955a658..b5197aa70f611 100644 --- a/mobile/openapi/lib/model/create_user_dto.dart +++ b/mobile/openapi/lib/model/create_user_dto.dart @@ -64,12 +64,12 @@ class CreateUserDto { if (this.storageLabel != null) { json[r'storageLabel'] = this.storageLabel; } else { - // json[r'storageLabel'] = null; + // json[r'storageLabel'] = null; } if (this.externalPath != null) { json[r'externalPath'] = this.externalPath; } else { - // json[r'externalPath'] = null; + // json[r'externalPath'] = null; } return json; } @@ -81,17 +81,6 @@ class CreateUserDto { 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 "CreateUserDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CreateUserDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CreateUserDto( email: mapValueOfType(json, r'email')!, password: mapValueOfType(json, r'password')!, diff --git a/mobile/openapi/lib/model/curated_locations_response_dto.dart b/mobile/openapi/lib/model/curated_locations_response_dto.dart index 0c8d1a328baee..5bedb93624f5e 100644 --- a/mobile/openapi/lib/model/curated_locations_response_dto.dart +++ b/mobile/openapi/lib/model/curated_locations_response_dto.dart @@ -67,17 +67,6 @@ class CuratedLocationsResponseDto { 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 "CuratedLocationsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CuratedLocationsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CuratedLocationsResponseDto( id: mapValueOfType(json, r'id')!, city: mapValueOfType(json, r'city')!, diff --git a/mobile/openapi/lib/model/curated_objects_response_dto.dart b/mobile/openapi/lib/model/curated_objects_response_dto.dart index 9cb9e0a67a826..76ea315ce11fe 100644 --- a/mobile/openapi/lib/model/curated_objects_response_dto.dart +++ b/mobile/openapi/lib/model/curated_objects_response_dto.dart @@ -67,17 +67,6 @@ class CuratedObjectsResponseDto { 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 "CuratedObjectsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "CuratedObjectsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return CuratedObjectsResponseDto( id: mapValueOfType(json, r'id')!, object: mapValueOfType(json, r'object')!, diff --git a/mobile/openapi/lib/model/delete_asset_dto.dart b/mobile/openapi/lib/model/delete_asset_dto.dart index 366faf88fb60d..33c2fced3e106 100644 --- a/mobile/openapi/lib/model/delete_asset_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_dto.dart @@ -43,17 +43,6 @@ class DeleteAssetDto { 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 "DeleteAssetDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "DeleteAssetDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return DeleteAssetDto( ids: json[r'ids'] is Iterable ? (json[r'ids'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/delete_asset_response_dto.dart b/mobile/openapi/lib/model/delete_asset_response_dto.dart index 0d40c2ce76791..7a33b5b5f05c7 100644 --- a/mobile/openapi/lib/model/delete_asset_response_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_response_dto.dart @@ -49,17 +49,6 @@ class DeleteAssetResponseDto { 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 "DeleteAssetResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "DeleteAssetResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return DeleteAssetResponseDto( status: DeleteAssetStatus.fromJson(json[r'status'])!, id: mapValueOfType(json, r'id')!, diff --git a/mobile/openapi/lib/model/download_files_dto.dart b/mobile/openapi/lib/model/download_files_dto.dart index f2a5df04d5615..bd7c3537f2d0d 100644 --- a/mobile/openapi/lib/model/download_files_dto.dart +++ b/mobile/openapi/lib/model/download_files_dto.dart @@ -43,17 +43,6 @@ class DownloadFilesDto { 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 "DownloadFilesDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "DownloadFilesDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return DownloadFilesDto( assetIds: json[r'assetIds'] is Iterable ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart index 0381eaff096ef..201c13d6e62a7 100644 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ b/mobile/openapi/lib/model/exif_response_dto.dart @@ -130,102 +130,102 @@ class ExifResponseDto { if (this.fileSizeInByte != null) { json[r'fileSizeInByte'] = this.fileSizeInByte; } else { - // json[r'fileSizeInByte'] = null; + // json[r'fileSizeInByte'] = null; } if (this.make != null) { json[r'make'] = this.make; } else { - // json[r'make'] = null; + // json[r'make'] = null; } if (this.model != null) { json[r'model'] = this.model; } else { - // json[r'model'] = null; + // json[r'model'] = null; } if (this.exifImageWidth != null) { json[r'exifImageWidth'] = this.exifImageWidth; } else { - // json[r'exifImageWidth'] = null; + // json[r'exifImageWidth'] = null; } if (this.exifImageHeight != null) { json[r'exifImageHeight'] = this.exifImageHeight; } else { - // json[r'exifImageHeight'] = null; + // json[r'exifImageHeight'] = null; } if (this.orientation != null) { json[r'orientation'] = this.orientation; } else { - // json[r'orientation'] = null; + // json[r'orientation'] = null; } if (this.dateTimeOriginal != null) { json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String(); } else { - // json[r'dateTimeOriginal'] = null; + // json[r'dateTimeOriginal'] = null; } if (this.modifyDate != null) { json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String(); } else { - // json[r'modifyDate'] = null; + // json[r'modifyDate'] = null; } if (this.timeZone != null) { json[r'timeZone'] = this.timeZone; } else { - // json[r'timeZone'] = null; + // json[r'timeZone'] = null; } if (this.lensModel != null) { json[r'lensModel'] = this.lensModel; } else { - // json[r'lensModel'] = null; + // json[r'lensModel'] = null; } if (this.fNumber != null) { json[r'fNumber'] = this.fNumber; } else { - // json[r'fNumber'] = null; + // json[r'fNumber'] = null; } if (this.focalLength != null) { json[r'focalLength'] = this.focalLength; } else { - // json[r'focalLength'] = null; + // json[r'focalLength'] = null; } if (this.iso != null) { json[r'iso'] = this.iso; } else { - // json[r'iso'] = null; + // json[r'iso'] = null; } if (this.exposureTime != null) { json[r'exposureTime'] = this.exposureTime; } else { - // json[r'exposureTime'] = null; + // json[r'exposureTime'] = null; } if (this.latitude != null) { json[r'latitude'] = this.latitude; } else { - // json[r'latitude'] = null; + // json[r'latitude'] = null; } if (this.longitude != null) { json[r'longitude'] = this.longitude; } else { - // json[r'longitude'] = null; + // json[r'longitude'] = null; } if (this.city != null) { json[r'city'] = this.city; } else { - // json[r'city'] = null; + // json[r'city'] = null; } if (this.state != null) { json[r'state'] = this.state; } else { - // json[r'state'] = null; + // json[r'state'] = null; } if (this.country != null) { json[r'country'] = this.country; } else { - // json[r'country'] = null; + // json[r'country'] = null; } if (this.description != null) { json[r'description'] = this.description; } else { - // json[r'description'] = null; + // json[r'description'] = null; } return json; } @@ -237,17 +237,6 @@ class ExifResponseDto { 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 "ExifResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ExifResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ExifResponseDto( fileSizeInByte: mapValueOfType(json, r'fileSizeInByte'), make: mapValueOfType(json, r'make'), 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 445d045538a7e..e2940974572be 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 @@ -59,12 +59,12 @@ class GetAssetByTimeBucketDto { if (this.userId != null) { json[r'userId'] = this.userId; } else { - // json[r'userId'] = null; + // json[r'userId'] = null; } if (this.withoutThumbs != null) { json[r'withoutThumbs'] = this.withoutThumbs; } else { - // json[r'withoutThumbs'] = null; + // json[r'withoutThumbs'] = null; } return json; } @@ -76,17 +76,6 @@ class GetAssetByTimeBucketDto { 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 "GetAssetByTimeBucketDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "GetAssetByTimeBucketDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return GetAssetByTimeBucketDto( timeBucket: json[r'timeBucket'] is Iterable ? (json[r'timeBucket'] as Iterable).cast().toList(growable: false) 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 9b033165cde9d..e42d0d514c246 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 @@ -59,12 +59,12 @@ class GetAssetCountByTimeBucketDto { if (this.userId != null) { json[r'userId'] = this.userId; } else { - // json[r'userId'] = null; + // json[r'userId'] = null; } if (this.withoutThumbs != null) { json[r'withoutThumbs'] = this.withoutThumbs; } else { - // json[r'withoutThumbs'] = null; + // json[r'withoutThumbs'] = null; } return json; } @@ -76,17 +76,6 @@ class GetAssetCountByTimeBucketDto { 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 "GetAssetCountByTimeBucketDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "GetAssetCountByTimeBucketDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return GetAssetCountByTimeBucketDto( timeGroup: TimeGroupEnum.fromJson(json[r'timeGroup'])!, userId: mapValueOfType(json, r'userId'), diff --git a/mobile/openapi/lib/model/import_asset_dto.dart b/mobile/openapi/lib/model/import_asset_dto.dart index bb80e82aa2f6a..9a6994a10679f 100644 --- a/mobile/openapi/lib/model/import_asset_dto.dart +++ b/mobile/openapi/lib/model/import_asset_dto.dart @@ -117,7 +117,7 @@ class ImportAssetDto { if (this.sidecarPath != null) { json[r'sidecarPath'] = this.sidecarPath; } else { - // json[r'sidecarPath'] = null; + // json[r'sidecarPath'] = null; } json[r'deviceAssetId'] = this.deviceAssetId; json[r'deviceId'] = this.deviceId; @@ -127,17 +127,17 @@ class ImportAssetDto { if (this.isArchived != null) { json[r'isArchived'] = this.isArchived; } else { - // json[r'isArchived'] = null; + // json[r'isArchived'] = null; } if (this.isVisible != null) { json[r'isVisible'] = this.isVisible; } else { - // json[r'isVisible'] = null; + // json[r'isVisible'] = null; } if (this.duration != null) { json[r'duration'] = this.duration; } else { - // json[r'duration'] = null; + // json[r'duration'] = null; } return json; } @@ -149,17 +149,6 @@ class ImportAssetDto { 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 "ImportAssetDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ImportAssetDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ImportAssetDto( assetType: AssetTypeEnum.fromJson(json[r'assetType'])!, isReadOnly: mapValueOfType(json, r'isReadOnly') ?? true, diff --git a/mobile/openapi/lib/model/job_command_dto.dart b/mobile/openapi/lib/model/job_command_dto.dart index fc9805efb726f..68289ab225ffa 100644 --- a/mobile/openapi/lib/model/job_command_dto.dart +++ b/mobile/openapi/lib/model/job_command_dto.dart @@ -49,17 +49,6 @@ class JobCommandDto { 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 "JobCommandDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "JobCommandDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return JobCommandDto( command: JobCommand.fromJson(json[r'command'])!, force: mapValueOfType(json, r'force')!, diff --git a/mobile/openapi/lib/model/job_counts_dto.dart b/mobile/openapi/lib/model/job_counts_dto.dart index af4fceda348c0..5006279cec2c5 100644 --- a/mobile/openapi/lib/model/job_counts_dto.dart +++ b/mobile/openapi/lib/model/job_counts_dto.dart @@ -73,17 +73,6 @@ class JobCountsDto { 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 "JobCountsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "JobCountsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return JobCountsDto( active: mapValueOfType(json, r'active')!, completed: mapValueOfType(json, r'completed')!, diff --git a/mobile/openapi/lib/model/job_settings_dto.dart b/mobile/openapi/lib/model/job_settings_dto.dart index 5bc68cf2c95e2..a1fe5445dc3dd 100644 --- a/mobile/openapi/lib/model/job_settings_dto.dart +++ b/mobile/openapi/lib/model/job_settings_dto.dart @@ -43,17 +43,6 @@ class JobSettingsDto { 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 "JobSettingsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "JobSettingsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return JobSettingsDto( concurrency: mapValueOfType(json, r'concurrency')!, ); diff --git a/mobile/openapi/lib/model/job_status_dto.dart b/mobile/openapi/lib/model/job_status_dto.dart index 1a40da6ba5cb5..e14101ce8e182 100644 --- a/mobile/openapi/lib/model/job_status_dto.dart +++ b/mobile/openapi/lib/model/job_status_dto.dart @@ -49,17 +49,6 @@ class JobStatusDto { 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 "JobStatusDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "JobStatusDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return JobStatusDto( jobCounts: JobCountsDto.fromJson(json[r'jobCounts'])!, queueStatus: QueueStatusDto.fromJson(json[r'queueStatus'])!, diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart index b2cfae5c62724..f047ff8c4e037 100644 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ b/mobile/openapi/lib/model/login_credential_dto.dart @@ -49,17 +49,6 @@ class LoginCredentialDto { 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 "LoginCredentialDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "LoginCredentialDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return LoginCredentialDto( email: mapValueOfType(json, r'email')!, password: mapValueOfType(json, r'password')!, diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart index e396d3e38d9e5..01a3338c3e964 100644 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ b/mobile/openapi/lib/model/login_response_dto.dart @@ -85,17 +85,6 @@ class LoginResponseDto { 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 "LoginResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "LoginResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return LoginResponseDto( accessToken: mapValueOfType(json, r'accessToken')!, userId: mapValueOfType(json, r'userId')!, diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart index de09872ac5d03..f8f77ba0a5cbe 100644 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ b/mobile/openapi/lib/model/logout_response_dto.dart @@ -49,17 +49,6 @@ class LogoutResponseDto { 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 "LogoutResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "LogoutResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return LogoutResponseDto( successful: mapValueOfType(json, r'successful')!, redirectUri: mapValueOfType(json, r'redirectUri')!, diff --git a/mobile/openapi/lib/model/map_marker_response_dto.dart b/mobile/openapi/lib/model/map_marker_response_dto.dart index 2b0ec734775f2..ded8ac167cb5c 100644 --- a/mobile/openapi/lib/model/map_marker_response_dto.dart +++ b/mobile/openapi/lib/model/map_marker_response_dto.dart @@ -55,17 +55,6 @@ class MapMarkerResponseDto { 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 "MapMarkerResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "MapMarkerResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return MapMarkerResponseDto( id: mapValueOfType(json, r'id')!, lat: mapValueOfType(json, r'lat')!, diff --git a/mobile/openapi/lib/model/memory_lane_response_dto.dart b/mobile/openapi/lib/model/memory_lane_response_dto.dart index 5e234dc0a11aa..fc33e4210f41e 100644 --- a/mobile/openapi/lib/model/memory_lane_response_dto.dart +++ b/mobile/openapi/lib/model/memory_lane_response_dto.dart @@ -49,17 +49,6 @@ class MemoryLaneResponseDto { 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 "MemoryLaneResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "MemoryLaneResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return MemoryLaneResponseDto( title: mapValueOfType(json, r'title')!, assets: AssetResponseDto.listFromJson(json[r'assets']), diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart index 14fb79a35d6c8..08fac9798ec40 100644 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ b/mobile/openapi/lib/model/o_auth_callback_dto.dart @@ -43,17 +43,6 @@ class OAuthCallbackDto { 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 "OAuthCallbackDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "OAuthCallbackDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return OAuthCallbackDto( url: mapValueOfType(json, r'url')!, ); diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart index d624f0ca55eaf..0f62306ef41e3 100644 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_dto.dart @@ -43,17 +43,6 @@ class OAuthConfigDto { 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 "OAuthConfigDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "OAuthConfigDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return OAuthConfigDto( redirectUri: mapValueOfType(json, r'redirectUri')!, ); 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 e2fea1a61343c..872455fb4ca12 100644 --- a/mobile/openapi/lib/model/o_auth_config_response_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_response_dto.dart @@ -75,17 +75,17 @@ class OAuthConfigResponseDto { if (this.url != null) { json[r'url'] = this.url; } else { - // json[r'url'] = null; + // json[r'url'] = null; } if (this.buttonText != null) { json[r'buttonText'] = this.buttonText; } else { - // json[r'buttonText'] = null; + // json[r'buttonText'] = null; } if (this.autoLaunch != null) { json[r'autoLaunch'] = this.autoLaunch; } else { - // json[r'autoLaunch'] = null; + // json[r'autoLaunch'] = null; } return json; } @@ -97,17 +97,6 @@ class OAuthConfigResponseDto { 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 "OAuthConfigResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "OAuthConfigResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return OAuthConfigResponseDto( enabled: mapValueOfType(json, r'enabled')!, passwordLoginEnabled: mapValueOfType(json, r'passwordLoginEnabled')!, diff --git a/mobile/openapi/lib/model/person_response_dto.dart b/mobile/openapi/lib/model/person_response_dto.dart index e7d31f72d3b21..ddaa733853d19 100644 --- a/mobile/openapi/lib/model/person_response_dto.dart +++ b/mobile/openapi/lib/model/person_response_dto.dart @@ -55,17 +55,6 @@ class PersonResponseDto { 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 "PersonResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "PersonResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return PersonResponseDto( id: mapValueOfType(json, r'id')!, name: mapValueOfType(json, r'name')!, diff --git a/mobile/openapi/lib/model/person_update_dto.dart b/mobile/openapi/lib/model/person_update_dto.dart index 55084d649ed7f..488b9abd55981 100644 --- a/mobile/openapi/lib/model/person_update_dto.dart +++ b/mobile/openapi/lib/model/person_update_dto.dart @@ -43,17 +43,6 @@ class PersonUpdateDto { 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 "PersonUpdateDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "PersonUpdateDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return PersonUpdateDto( name: mapValueOfType(json, r'name')!, ); diff --git a/mobile/openapi/lib/model/queue_status_dto.dart b/mobile/openapi/lib/model/queue_status_dto.dart index ddc2f1e9acc4b..6a15b7742156d 100644 --- a/mobile/openapi/lib/model/queue_status_dto.dart +++ b/mobile/openapi/lib/model/queue_status_dto.dart @@ -49,17 +49,6 @@ class QueueStatusDto { 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 "QueueStatusDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "QueueStatusDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return QueueStatusDto( isActive: mapValueOfType(json, r'isActive')!, isPaused: mapValueOfType(json, r'isPaused')!, diff --git a/mobile/openapi/lib/model/remove_assets_dto.dart b/mobile/openapi/lib/model/remove_assets_dto.dart index 6c486bdef5212..c53e6d0ad29d1 100644 --- a/mobile/openapi/lib/model/remove_assets_dto.dart +++ b/mobile/openapi/lib/model/remove_assets_dto.dart @@ -43,17 +43,6 @@ class RemoveAssetsDto { 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 "RemoveAssetsDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "RemoveAssetsDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return RemoveAssetsDto( assetIds: json[r'assetIds'] is Iterable ? (json[r'assetIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/search_album_response_dto.dart b/mobile/openapi/lib/model/search_album_response_dto.dart index c78f31e9bb856..d15513963df5c 100644 --- a/mobile/openapi/lib/model/search_album_response_dto.dart +++ b/mobile/openapi/lib/model/search_album_response_dto.dart @@ -61,17 +61,6 @@ class SearchAlbumResponseDto { 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 "SearchAlbumResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchAlbumResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchAlbumResponseDto( total: mapValueOfType(json, r'total')!, count: mapValueOfType(json, r'count')!, diff --git a/mobile/openapi/lib/model/search_asset_dto.dart b/mobile/openapi/lib/model/search_asset_dto.dart index 5906934928b93..02c744a06cadd 100644 --- a/mobile/openapi/lib/model/search_asset_dto.dart +++ b/mobile/openapi/lib/model/search_asset_dto.dart @@ -43,17 +43,6 @@ class SearchAssetDto { 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 "SearchAssetDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchAssetDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchAssetDto( searchTerm: mapValueOfType(json, r'searchTerm')!, ); diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart index 7567193f7a8c4..866dbbdcd055a 100644 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ b/mobile/openapi/lib/model/search_asset_response_dto.dart @@ -61,17 +61,6 @@ class SearchAssetResponseDto { 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 "SearchAssetResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchAssetResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchAssetResponseDto( total: mapValueOfType(json, r'total')!, count: mapValueOfType(json, r'count')!, diff --git a/mobile/openapi/lib/model/search_config_response_dto.dart b/mobile/openapi/lib/model/search_config_response_dto.dart index 21213057ae3c5..31927662c4bc0 100644 --- a/mobile/openapi/lib/model/search_config_response_dto.dart +++ b/mobile/openapi/lib/model/search_config_response_dto.dart @@ -43,17 +43,6 @@ class SearchConfigResponseDto { 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 "SearchConfigResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchConfigResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchConfigResponseDto( enabled: mapValueOfType(json, r'enabled')!, ); diff --git a/mobile/openapi/lib/model/search_explore_item.dart b/mobile/openapi/lib/model/search_explore_item.dart index 3d3855ddfa22c..6dd35b9562c22 100644 --- a/mobile/openapi/lib/model/search_explore_item.dart +++ b/mobile/openapi/lib/model/search_explore_item.dart @@ -49,17 +49,6 @@ class SearchExploreItem { 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 "SearchExploreItem[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchExploreItem[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchExploreItem( value: mapValueOfType(json, r'value')!, data: AssetResponseDto.fromJson(json[r'data'])!, diff --git a/mobile/openapi/lib/model/search_explore_response_dto.dart b/mobile/openapi/lib/model/search_explore_response_dto.dart index cbc4345e285f0..403ba396d45ad 100644 --- a/mobile/openapi/lib/model/search_explore_response_dto.dart +++ b/mobile/openapi/lib/model/search_explore_response_dto.dart @@ -49,17 +49,6 @@ class SearchExploreResponseDto { 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 "SearchExploreResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchExploreResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchExploreResponseDto( fieldName: mapValueOfType(json, r'fieldName')!, items: SearchExploreItem.listFromJson(json[r'items']), diff --git a/mobile/openapi/lib/model/search_facet_count_response_dto.dart b/mobile/openapi/lib/model/search_facet_count_response_dto.dart index 522e1a24283bb..d11450d2f0b70 100644 --- a/mobile/openapi/lib/model/search_facet_count_response_dto.dart +++ b/mobile/openapi/lib/model/search_facet_count_response_dto.dart @@ -49,17 +49,6 @@ class SearchFacetCountResponseDto { 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 "SearchFacetCountResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchFacetCountResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchFacetCountResponseDto( count: mapValueOfType(json, r'count')!, value: mapValueOfType(json, r'value')!, diff --git a/mobile/openapi/lib/model/search_facet_response_dto.dart b/mobile/openapi/lib/model/search_facet_response_dto.dart index 62d682f257ca6..aadbecb3901ab 100644 --- a/mobile/openapi/lib/model/search_facet_response_dto.dart +++ b/mobile/openapi/lib/model/search_facet_response_dto.dart @@ -49,17 +49,6 @@ class SearchFacetResponseDto { 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 "SearchFacetResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchFacetResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchFacetResponseDto( fieldName: mapValueOfType(json, r'fieldName')!, counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']), diff --git a/mobile/openapi/lib/model/search_response_dto.dart b/mobile/openapi/lib/model/search_response_dto.dart index 9e657316ae284..c194f8a94cc6c 100644 --- a/mobile/openapi/lib/model/search_response_dto.dart +++ b/mobile/openapi/lib/model/search_response_dto.dart @@ -49,17 +49,6 @@ class SearchResponseDto { 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 "SearchResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SearchResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SearchResponseDto( albums: SearchAlbumResponseDto.fromJson(json[r'albums'])!, assets: SearchAssetResponseDto.fromJson(json[r'assets'])!, diff --git a/mobile/openapi/lib/model/server_info_response_dto.dart b/mobile/openapi/lib/model/server_info_response_dto.dart index ef6409b064061..fa643d1221134 100644 --- a/mobile/openapi/lib/model/server_info_response_dto.dart +++ b/mobile/openapi/lib/model/server_info_response_dto.dart @@ -79,17 +79,6 @@ class ServerInfoResponseDto { 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 "ServerInfoResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ServerInfoResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ServerInfoResponseDto( diskSizeRaw: mapValueOfType(json, r'diskSizeRaw')!, diskUseRaw: mapValueOfType(json, r'diskUseRaw')!, diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart index 55386ebaf10af..ad72c0f5e52bb 100644 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ b/mobile/openapi/lib/model/server_ping_response.dart @@ -43,17 +43,6 @@ class ServerPingResponse { 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 "ServerPingResponse[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ServerPingResponse[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ServerPingResponse( res: mapValueOfType(json, r'res')!, ); diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart index a9b861a8f592a..3e541529298e1 100644 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ b/mobile/openapi/lib/model/server_stats_response_dto.dart @@ -61,17 +61,6 @@ class ServerStatsResponseDto { 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 "ServerStatsResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ServerStatsResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ServerStatsResponseDto( photos: mapValueOfType(json, r'photos')!, videos: mapValueOfType(json, r'videos')!, diff --git a/mobile/openapi/lib/model/server_version_reponse_dto.dart b/mobile/openapi/lib/model/server_version_reponse_dto.dart index a5dadac87ccb3..a1ec0e68e5208 100644 --- a/mobile/openapi/lib/model/server_version_reponse_dto.dart +++ b/mobile/openapi/lib/model/server_version_reponse_dto.dart @@ -55,17 +55,6 @@ class ServerVersionReponseDto { 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 "ServerVersionReponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ServerVersionReponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ServerVersionReponseDto( major: mapValueOfType(json, r'major')!, minor: mapValueOfType(json, r'minor')!, diff --git a/mobile/openapi/lib/model/shared_link_create_dto.dart b/mobile/openapi/lib/model/shared_link_create_dto.dart index f890044443cc6..cdd481c84b359 100644 --- a/mobile/openapi/lib/model/shared_link_create_dto.dart +++ b/mobile/openapi/lib/model/shared_link_create_dto.dart @@ -84,17 +84,17 @@ class SharedLinkCreateDto { if (this.albumId != null) { json[r'albumId'] = this.albumId; } else { - // json[r'albumId'] = null; + // json[r'albumId'] = null; } if (this.description != null) { json[r'description'] = this.description; } else { - // json[r'description'] = null; + // json[r'description'] = null; } if (this.expiresAt != null) { json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String(); } else { - // json[r'expiresAt'] = null; + // json[r'expiresAt'] = null; } json[r'allowUpload'] = this.allowUpload; json[r'allowDownload'] = this.allowDownload; @@ -109,17 +109,6 @@ class SharedLinkCreateDto { 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 "SharedLinkCreateDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SharedLinkCreateDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SharedLinkCreateDto( type: SharedLinkType.fromJson(json[r'type'])!, assetIds: json[r'assetIds'] is Iterable diff --git a/mobile/openapi/lib/model/shared_link_edit_dto.dart b/mobile/openapi/lib/model/shared_link_edit_dto.dart index 7d3c7c9cf92cd..a427b60ef02b3 100644 --- a/mobile/openapi/lib/model/shared_link_edit_dto.dart +++ b/mobile/openapi/lib/model/shared_link_edit_dto.dart @@ -79,27 +79,27 @@ class SharedLinkEditDto { if (this.description != null) { json[r'description'] = this.description; } else { - // json[r'description'] = null; + // json[r'description'] = null; } if (this.expiresAt != null) { json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String(); } else { - // json[r'expiresAt'] = null; + // json[r'expiresAt'] = null; } if (this.allowUpload != null) { json[r'allowUpload'] = this.allowUpload; } else { - // json[r'allowUpload'] = null; + // json[r'allowUpload'] = null; } if (this.allowDownload != null) { json[r'allowDownload'] = this.allowDownload; } else { - // json[r'allowDownload'] = null; + // json[r'allowDownload'] = null; } if (this.showExif != null) { json[r'showExif'] = this.showExif; } else { - // json[r'showExif'] = null; + // json[r'showExif'] = null; } return json; } @@ -111,17 +111,6 @@ class SharedLinkEditDto { 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 "SharedLinkEditDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SharedLinkEditDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SharedLinkEditDto( description: mapValueOfType(json, r'description'), expiresAt: mapDateTime(json, r'expiresAt', ''), diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart index d353082a52e4b..fad2b4383df7f 100644 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ b/mobile/openapi/lib/model/shared_link_response_dto.dart @@ -98,7 +98,7 @@ class SharedLinkResponseDto { if (this.description != null) { json[r'description'] = this.description; } else { - // json[r'description'] = null; + // json[r'description'] = null; } json[r'userId'] = this.userId; json[r'key'] = this.key; @@ -106,13 +106,13 @@ class SharedLinkResponseDto { if (this.expiresAt != null) { json[r'expiresAt'] = this.expiresAt!.toUtc().toIso8601String(); } else { - // json[r'expiresAt'] = null; + // json[r'expiresAt'] = null; } 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'] = this.allowUpload; json[r'allowDownload'] = this.allowDownload; @@ -127,17 +127,6 @@ class SharedLinkResponseDto { 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 "SharedLinkResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SharedLinkResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SharedLinkResponseDto( type: SharedLinkType.fromJson(json[r'type'])!, id: mapValueOfType(json, r'id')!, diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart index 5a24144482ede..c2637b0c0fe47 100644 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ b/mobile/openapi/lib/model/sign_up_dto.dart @@ -61,17 +61,6 @@ class SignUpDto { 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 "SignUpDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SignUpDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SignUpDto( email: mapValueOfType(json, r'email')!, password: mapValueOfType(json, r'password')!, diff --git a/mobile/openapi/lib/model/smart_info_response_dto.dart b/mobile/openapi/lib/model/smart_info_response_dto.dart index 0cb5a70de93f4..6af7cf9cfaf3e 100644 --- a/mobile/openapi/lib/model/smart_info_response_dto.dart +++ b/mobile/openapi/lib/model/smart_info_response_dto.dart @@ -40,12 +40,12 @@ class SmartInfoResponseDto { if (this.tags != null) { json[r'tags'] = this.tags; } else { - // json[r'tags'] = null; + // json[r'tags'] = null; } if (this.objects != null) { json[r'objects'] = this.objects; } else { - // json[r'objects'] = null; + // json[r'objects'] = null; } return json; } @@ -57,17 +57,6 @@ class SmartInfoResponseDto { 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 "SmartInfoResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SmartInfoResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SmartInfoResponseDto( tags: json[r'tags'] is Iterable ? (json[r'tags'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart index 2e8688b34f78e..4bcbd2634bba2 100644 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ b/mobile/openapi/lib/model/system_config_dto.dart @@ -67,17 +67,6 @@ class SystemConfigDto { 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 "SystemConfigDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigDto( ffmpeg: SystemConfigFFmpegDto.fromJson(json[r'ffmpeg'])!, oauth: SystemConfigOAuthDto.fromJson(json[r'oauth'])!, 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 e799b7477ff53..2cb29e0ce6e68 100644 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart @@ -91,17 +91,6 @@ class SystemConfigFFmpegDto { 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 "SystemConfigFFmpegDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigFFmpegDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigFFmpegDto( crf: mapValueOfType(json, r'crf')!, threads: mapValueOfType(json, r'threads')!, diff --git a/mobile/openapi/lib/model/system_config_job_dto.dart b/mobile/openapi/lib/model/system_config_job_dto.dart index 8e9bfd40d4d9b..bc667a3e76934 100644 --- a/mobile/openapi/lib/model/system_config_job_dto.dart +++ b/mobile/openapi/lib/model/system_config_job_dto.dart @@ -97,17 +97,6 @@ class SystemConfigJobDto { 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 "SystemConfigJobDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigJobDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigJobDto( thumbnailGeneration: JobSettingsDto.fromJson(json[r'thumbnailGeneration'])!, metadataExtraction: JobSettingsDto.fromJson(json[r'metadataExtraction'])!, 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 4fa7359e72831..364b99fd2f725 100644 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ b/mobile/openapi/lib/model/system_config_o_auth_dto.dart @@ -97,17 +97,6 @@ class SystemConfigOAuthDto { 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 "SystemConfigOAuthDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigOAuthDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigOAuthDto( enabled: mapValueOfType(json, r'enabled')!, issuerUrl: mapValueOfType(json, r'issuerUrl')!, 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 e6622a937c134..1e9dc20cb8db3 100644 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ b/mobile/openapi/lib/model/system_config_password_login_dto.dart @@ -43,17 +43,6 @@ class SystemConfigPasswordLoginDto { 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 "SystemConfigPasswordLoginDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigPasswordLoginDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigPasswordLoginDto( enabled: mapValueOfType(json, r'enabled')!, ); 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 ae077c528bb1a..604fe1256e000 100644 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ b/mobile/openapi/lib/model/system_config_storage_template_dto.dart @@ -43,17 +43,6 @@ class SystemConfigStorageTemplateDto { 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 "SystemConfigStorageTemplateDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigStorageTemplateDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigStorageTemplateDto( template: mapValueOfType(json, r'template')!, ); 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 23e20dff95872..81ac59f49c66d 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 @@ -79,17 +79,6 @@ class SystemConfigTemplateStorageOptionDto { 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 "SystemConfigTemplateStorageOptionDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "SystemConfigTemplateStorageOptionDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return SystemConfigTemplateStorageOptionDto( yearOptions: json[r'yearOptions'] is Iterable ? (json[r'yearOptions'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart index 30ff9b7aa3751..d7eee99a4a7e5 100644 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ b/mobile/openapi/lib/model/tag_response_dto.dart @@ -61,17 +61,6 @@ class TagResponseDto { 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 "TagResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "TagResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return TagResponseDto( type: TagTypeEnum.fromJson(json[r'type'])!, id: mapValueOfType(json, r'id')!, diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart index 671b45d8f4354..8fdd75b2d5a38 100644 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ b/mobile/openapi/lib/model/update_album_dto.dart @@ -52,12 +52,12 @@ class UpdateAlbumDto { if (this.albumName != null) { json[r'albumName'] = this.albumName; } else { - // json[r'albumName'] = null; + // json[r'albumName'] = null; } if (this.albumThumbnailAssetId != null) { json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId; } else { - // json[r'albumThumbnailAssetId'] = null; + // json[r'albumThumbnailAssetId'] = null; } return json; } @@ -69,17 +69,6 @@ class UpdateAlbumDto { 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 "UpdateAlbumDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UpdateAlbumDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UpdateAlbumDto( albumName: mapValueOfType(json, r'albumName'), albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart index 4063f8a71de02..6b2916b5055e0 100644 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ b/mobile/openapi/lib/model/update_asset_dto.dart @@ -69,17 +69,17 @@ class UpdateAssetDto { if (this.isFavorite != null) { json[r'isFavorite'] = this.isFavorite; } else { - // json[r'isFavorite'] = null; + // json[r'isFavorite'] = null; } if (this.isArchived != null) { json[r'isArchived'] = this.isArchived; } else { - // json[r'isArchived'] = null; + // json[r'isArchived'] = null; } if (this.description != null) { json[r'description'] = this.description; } else { - // json[r'description'] = null; + // json[r'description'] = null; } return json; } @@ -91,17 +91,6 @@ class UpdateAssetDto { 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 "UpdateAssetDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UpdateAssetDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UpdateAssetDto( tagIds: json[r'tagIds'] is Iterable ? (json[r'tagIds'] as Iterable).cast().toList(growable: false) diff --git a/mobile/openapi/lib/model/update_tag_dto.dart b/mobile/openapi/lib/model/update_tag_dto.dart index d9d3f48be34e0..f1ea738c02335 100644 --- a/mobile/openapi/lib/model/update_tag_dto.dart +++ b/mobile/openapi/lib/model/update_tag_dto.dart @@ -41,7 +41,7 @@ class UpdateTagDto { if (this.name != null) { json[r'name'] = this.name; } else { - // json[r'name'] = null; + // json[r'name'] = null; } return json; } @@ -53,17 +53,6 @@ class UpdateTagDto { 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 "UpdateTagDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UpdateTagDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UpdateTagDto( name: mapValueOfType(json, r'name'), ); diff --git a/mobile/openapi/lib/model/update_user_dto.dart b/mobile/openapi/lib/model/update_user_dto.dart index aa92fa64a699a..bf655ead3412d 100644 --- a/mobile/openapi/lib/model/update_user_dto.dart +++ b/mobile/openapi/lib/model/update_user_dto.dart @@ -124,42 +124,42 @@ class UpdateUserDto { if (this.email != null) { json[r'email'] = this.email; } else { - // json[r'email'] = null; + // json[r'email'] = null; } if (this.password != null) { json[r'password'] = this.password; } else { - // json[r'password'] = null; + // json[r'password'] = null; } if (this.firstName != null) { json[r'firstName'] = this.firstName; } else { - // json[r'firstName'] = null; + // json[r'firstName'] = null; } if (this.lastName != null) { json[r'lastName'] = this.lastName; } else { - // json[r'lastName'] = null; + // json[r'lastName'] = null; } if (this.storageLabel != null) { json[r'storageLabel'] = this.storageLabel; } else { - // json[r'storageLabel'] = null; + // json[r'storageLabel'] = null; } if (this.externalPath != null) { json[r'externalPath'] = this.externalPath; } else { - // json[r'externalPath'] = null; + // json[r'externalPath'] = null; } if (this.isAdmin != null) { json[r'isAdmin'] = this.isAdmin; } else { - // json[r'isAdmin'] = null; + // json[r'isAdmin'] = null; } if (this.shouldChangePassword != null) { json[r'shouldChangePassword'] = this.shouldChangePassword; } else { - // json[r'shouldChangePassword'] = null; + // json[r'shouldChangePassword'] = null; } return json; } @@ -171,17 +171,6 @@ class UpdateUserDto { 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 "UpdateUserDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UpdateUserDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UpdateUserDto( id: mapValueOfType(json, r'id')!, email: mapValueOfType(json, r'email'), diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart index b95e979d46245..a1def6e1e996f 100644 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ b/mobile/openapi/lib/model/usage_by_user_dto.dart @@ -73,17 +73,6 @@ class UsageByUserDto { 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 "UsageByUserDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UsageByUserDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UsageByUserDto( userId: mapValueOfType(json, r'userId')!, userFirstName: mapValueOfType(json, r'userFirstName')!, diff --git a/mobile/openapi/lib/model/user_count_response_dto.dart b/mobile/openapi/lib/model/user_count_response_dto.dart index 61fe856d294e2..ecdcd6e468fe6 100644 --- a/mobile/openapi/lib/model/user_count_response_dto.dart +++ b/mobile/openapi/lib/model/user_count_response_dto.dart @@ -43,17 +43,6 @@ class UserCountResponseDto { 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 "UserCountResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UserCountResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UserCountResponseDto( userCount: mapValueOfType(json, r'userCount')!, ); diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart index 26363de859970..dcf7e928b53c8 100644 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ b/mobile/openapi/lib/model/user_response_dto.dart @@ -99,12 +99,12 @@ class UserResponseDto { if (this.storageLabel != null) { json[r'storageLabel'] = this.storageLabel; } else { - // json[r'storageLabel'] = null; + // json[r'storageLabel'] = null; } if (this.externalPath != null) { json[r'externalPath'] = this.externalPath; } else { - // json[r'externalPath'] = null; + // json[r'externalPath'] = null; } json[r'profileImagePath'] = this.profileImagePath; json[r'shouldChangePassword'] = this.shouldChangePassword; @@ -113,7 +113,7 @@ class UserResponseDto { if (this.deletedAt != null) { json[r'deletedAt'] = this.deletedAt!.toUtc().toIso8601String(); } else { - // json[r'deletedAt'] = null; + // json[r'deletedAt'] = null; } json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String(); json[r'oauthId'] = this.oauthId; @@ -127,17 +127,6 @@ class UserResponseDto { 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 "UserResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "UserResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return UserResponseDto( id: mapValueOfType(json, r'id')!, email: mapValueOfType(json, r'email')!, 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 d7884d9c00790..b06bd663e0914 100644 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ b/mobile/openapi/lib/model/validate_access_token_response_dto.dart @@ -43,17 +43,6 @@ class ValidateAccessTokenResponseDto { 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 "ValidateAccessTokenResponseDto[$key]" is missing from JSON.'); - // assert(json[key] != null, 'Required key "ValidateAccessTokenResponseDto[$key]" has a null value in JSON.'); - }); - return true; - }()); - return ValidateAccessTokenResponseDto( authStatus: mapValueOfType(json, r'authStatus')!, ); diff --git a/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache b/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache index 83f4f0ded7403..c6a96f29e0ab6 100644 --- a/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache +++ b/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache @@ -91,14 +91,14 @@ class {{{classname}}} { {{/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}} @@ -114,17 +114,6 @@ class {{{classname}}} { 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}} diff --git a/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache.patch b/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache.patch index 67f0b2f8c7da1..98ea98a78d213 100644 --- a/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache.patch +++ b/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache.patch @@ -1,11 +1,11 @@ ---- native_class.mustache 2023-06-22 12:00:16.480685565 -0500 -+++ native_class1.mustache 2023-06-22 12:01:41.772534371 -0500 +--- native_class.mustache 2023-06-22 12:56:11.090350406 -0500 ++++ native_class1.mustache 2023-06-22 12:57:14.498184792 -0500 @@ -91,14 +91,14 @@ {{/isDateTime}} {{#isNullable}} } else { - json[r'{{{baseName}}}'] = null; -+ // json[r'{{{baseName}}}'] = null; ++ // json[r'{{{baseName}}}'] = null; } {{/isNullable}} {{^isNullable}} @@ -13,16 +13,25 @@ {{^defaultValue}} } else { - json[r'{{{baseName}}}'] = null; -+ // json[r'{{{baseName}}}'] = null; ++ // json[r'{{{baseName}}}'] = null; } {{/defaultValue}} {{/required}} -@@ -120,7 +120,7 @@ - assert(() { - requiredKeys.forEach((key) { - assert(json.containsKey(key), 'Required key "{{{classname}}}[$key]" is missing from JSON.'); +@@ -114,17 +114,6 @@ + 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.'); -+ // assert(json[key] != null, 'Required key "{{{classname}}}[$key]" has a null value in JSON.'); - }); - return true; - }()); +- }); +- return true; +- }()); +- + return {{{classname}}}( + {{#vars}} + {{#isDateTime}}