From 91ad5840648b568acbc6782578a1c98dd3f6b129 Mon Sep 17 00:00:00 2001 From: Jason Rasmussen Date: Wed, 3 May 2023 15:27:57 -0400 Subject: [PATCH] chore: regenerate open api (#2374) --- mobile/openapi/lib/model/add_assets_dto.dart | 10 ++++------ .../lib/model/add_assets_response_dto.dart | 10 ++++------ mobile/openapi/lib/model/add_users_dto.dart | 10 ++++------ .../lib/model/admin_signup_response_dto.dart | 10 ++++------ .../lib/model/album_count_response_dto.dart | 10 ++++------ .../openapi/lib/model/album_response_dto.dart | 14 ++++++------- .../model/all_job_status_response_dto.dart | 10 ++++------ .../openapi/lib/model/api_key_create_dto.dart | 10 ++++------ .../model/api_key_create_response_dto.dart | 10 ++++------ .../lib/model/api_key_response_dto.dart | 10 ++++------ .../openapi/lib/model/api_key_update_dto.dart | 10 ++++------ .../lib/model/asset_count_by_time_bucket.dart | 10 ++++------ ...set_count_by_time_bucket_response_dto.dart | 12 +++++------ .../asset_count_by_user_id_response_dto.dart | 10 ++++------ .../model/asset_file_upload_response_dto.dart | 10 ++++------ .../openapi/lib/model/asset_response_dto.dart | 12 +++++------ .../lib/model/auth_device_response_dto.dart | 10 ++++------ .../lib/model/change_password_dto.dart | 10 ++++------ .../lib/model/check_duplicate_asset_dto.dart | 10 ++++------ .../check_duplicate_asset_response_dto.dart | 10 ++++------ .../lib/model/check_existing_assets_dto.dart | 10 ++++------ .../check_existing_assets_response_dto.dart | 10 ++++------ .../openapi/lib/model/create_album_dto.dart | 10 ++++------ .../model/create_album_share_link_dto.dart | 10 ++++------ .../model/create_assets_share_link_dto.dart | 10 ++++------ .../create_profile_image_response_dto.dart | 10 ++++------ mobile/openapi/lib/model/create_tag_dto.dart | 10 ++++------ mobile/openapi/lib/model/create_user_dto.dart | 10 ++++------ .../model/curated_locations_response_dto.dart | 10 ++++------ .../model/curated_objects_response_dto.dart | 10 ++++------ .../openapi/lib/model/delete_asset_dto.dart | 10 ++++------ .../lib/model/delete_asset_response_dto.dart | 10 ++++------ .../openapi/lib/model/download_files_dto.dart | 10 ++++------ .../lib/model/edit_shared_link_dto.dart | 10 ++++------ .../openapi/lib/model/exif_response_dto.dart | 10 ++++------ .../model/get_asset_by_time_bucket_dto.dart | 10 ++++------ .../get_asset_count_by_time_bucket_dto.dart | 10 ++++------ mobile/openapi/lib/model/job_command_dto.dart | 10 ++++------ mobile/openapi/lib/model/job_counts_dto.dart | 10 ++++------ mobile/openapi/lib/model/job_status_dto.dart | 10 ++++------ .../lib/model/login_credential_dto.dart | 10 ++++------ .../openapi/lib/model/login_response_dto.dart | 10 ++++------ .../lib/model/logout_response_dto.dart | 10 ++++------ .../lib/model/o_auth_callback_dto.dart | 10 ++++------ .../openapi/lib/model/o_auth_config_dto.dart | 10 ++++------ .../lib/model/o_auth_config_response_dto.dart | 10 ++++------ .../openapi/lib/model/queue_status_dto.dart | 10 ++++------ .../openapi/lib/model/remove_assets_dto.dart | 10 ++++------ .../lib/model/search_album_response_dto.dart | 14 ++++++------- .../openapi/lib/model/search_asset_dto.dart | 10 ++++------ .../lib/model/search_asset_response_dto.dart | 14 ++++++------- .../lib/model/search_config_response_dto.dart | 10 ++++------ .../lib/model/search_explore_item.dart | 10 ++++------ .../model/search_explore_response_dto.dart | 12 +++++------ .../search_facet_count_response_dto.dart | 10 ++++------ .../lib/model/search_facet_response_dto.dart | 12 +++++------ .../lib/model/search_response_dto.dart | 10 ++++------ .../lib/model/server_info_response_dto.dart | 10 ++++------ .../lib/model/server_ping_response.dart | 10 ++++------ .../lib/model/server_stats_response_dto.dart | 12 +++++------ .../lib/model/server_version_reponse_dto.dart | 10 ++++------ .../lib/model/shared_link_response_dto.dart | 12 +++++------ mobile/openapi/lib/model/sign_up_dto.dart | 10 ++++------ .../lib/model/smart_info_response_dto.dart | 10 ++++------ .../openapi/lib/model/system_config_dto.dart | 10 ++++------ .../lib/model/system_config_f_fmpeg_dto.dart | 10 ++++------ .../lib/model/system_config_o_auth_dto.dart | 10 ++++------ .../system_config_password_login_dto.dart | 10 ++++------ .../system_config_storage_template_dto.dart | 10 ++++------ ...em_config_template_storage_option_dto.dart | 10 ++++------ .../openapi/lib/model/tag_response_dto.dart | 10 ++++------ .../openapi/lib/model/update_album_dto.dart | 10 ++++------ .../openapi/lib/model/update_asset_dto.dart | 10 ++++------ mobile/openapi/lib/model/update_tag_dto.dart | 10 ++++------ mobile/openapi/lib/model/update_user_dto.dart | 10 ++++------ .../openapi/lib/model/usage_by_user_dto.dart | 10 ++++------ .../lib/model/user_count_response_dto.dart | 10 ++++------ .../openapi/lib/model/user_response_dto.dart | 10 ++++------ .../validate_access_token_response_dto.dart | 10 ++++------ .../native/native_class.mustache | 20 +++++++++---------- 80 files changed, 337 insertions(+), 497 deletions(-) diff --git a/mobile/openapi/lib/model/add_assets_dto.dart b/mobile/openapi/lib/model/add_assets_dto.dart index 42908bc827..d0eb324493 100644 --- a/mobile/openapi/lib/model/add_assets_dto.dart +++ b/mobile/openapi/lib/model/add_assets_dto.dart @@ -63,7 +63,7 @@ class AddAssetsDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class AddAssetsDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AddAssetsDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AddAssetsDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/add_assets_response_dto.dart b/mobile/openapi/lib/model/add_assets_response_dto.dart index c8723382c3..ba3b500953 100644 --- a/mobile/openapi/lib/model/add_assets_response_dto.dart +++ b/mobile/openapi/lib/model/add_assets_response_dto.dart @@ -87,7 +87,7 @@ class AddAssetsResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -118,12 +118,10 @@ class AddAssetsResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AddAssetsResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AddAssetsResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/add_users_dto.dart b/mobile/openapi/lib/model/add_users_dto.dart index 2c565a217c..d742652716 100644 --- a/mobile/openapi/lib/model/add_users_dto.dart +++ b/mobile/openapi/lib/model/add_users_dto.dart @@ -63,7 +63,7 @@ class AddUsersDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class AddUsersDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AddUsersDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/admin_signup_response_dto.dart b/mobile/openapi/lib/model/admin_signup_response_dto.dart index 8e18987078..4e19b9473e 100644 --- a/mobile/openapi/lib/model/admin_signup_response_dto.dart +++ b/mobile/openapi/lib/model/admin_signup_response_dto.dart @@ -89,7 +89,7 @@ class AdminSignupResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -120,12 +120,10 @@ class AdminSignupResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AdminSignupResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AdminSignupResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/album_count_response_dto.dart b/mobile/openapi/lib/model/album_count_response_dto.dart index 512c112348..10a5e21a45 100644 --- a/mobile/openapi/lib/model/album_count_response_dto.dart +++ b/mobile/openapi/lib/model/album_count_response_dto.dart @@ -75,7 +75,7 @@ class AlbumCountResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -106,12 +106,10 @@ class AlbumCountResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AlbumCountResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AlbumCountResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/album_response_dto.dart b/mobile/openapi/lib/model/album_response_dto.dart index 615206a3c4..af1ed3f073 100644 --- a/mobile/openapi/lib/model/album_response_dto.dart +++ b/mobile/openapi/lib/model/album_response_dto.dart @@ -127,15 +127,15 @@ class AlbumResponseDto { updatedAt: mapValueOfType(json, r'updatedAt')!, albumThumbnailAssetId: mapValueOfType(json, r'albumThumbnailAssetId'), shared: mapValueOfType(json, r'shared')!, - sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers'])!, - assets: AssetResponseDto.listFromJson(json[r'assets'])!, + sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']), + assets: AssetResponseDto.listFromJson(json[r'assets']), owner: UserResponseDto.fromJson(json[r'owner'])!, ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -166,12 +166,10 @@ class AlbumResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AlbumResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AlbumResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 9aea38e6bb..aced194303 100644 --- a/mobile/openapi/lib/model/all_job_status_response_dto.dart +++ b/mobile/openapi/lib/model/all_job_status_response_dto.dart @@ -110,7 +110,7 @@ class AllJobStatusResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -141,12 +141,10 @@ class AllJobStatusResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AllJobStatusResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AllJobStatusResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/api_key_create_dto.dart b/mobile/openapi/lib/model/api_key_create_dto.dart index 84b259030b..895356da17 100644 --- a/mobile/openapi/lib/model/api_key_create_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_dto.dart @@ -71,7 +71,7 @@ class APIKeyCreateDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -102,12 +102,10 @@ class APIKeyCreateDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = APIKeyCreateDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = APIKeyCreateDto.listFromJson(entry.value, growable: growable,); } } return map; 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 77b5e3df3e..84cb2b4445 100644 --- a/mobile/openapi/lib/model/api_key_create_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_create_response_dto.dart @@ -68,7 +68,7 @@ class APIKeyCreateResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class APIKeyCreateResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = APIKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = APIKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/api_key_response_dto.dart b/mobile/openapi/lib/model/api_key_response_dto.dart index 5d40014ecb..237674e3cf 100644 --- a/mobile/openapi/lib/model/api_key_response_dto.dart +++ b/mobile/openapi/lib/model/api_key_response_dto.dart @@ -82,7 +82,7 @@ class APIKeyResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class APIKeyResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = APIKeyResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = APIKeyResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/api_key_update_dto.dart b/mobile/openapi/lib/model/api_key_update_dto.dart index 47847df788..82dcdb49c1 100644 --- a/mobile/openapi/lib/model/api_key_update_dto.dart +++ b/mobile/openapi/lib/model/api_key_update_dto.dart @@ -61,7 +61,7 @@ class APIKeyUpdateDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class APIKeyUpdateDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = APIKeyUpdateDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = APIKeyUpdateDto.listFromJson(entry.value, growable: growable,); } } return map; 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 be1b22f8cd..1124d91063 100644 --- a/mobile/openapi/lib/model/asset_count_by_time_bucket.dart +++ b/mobile/openapi/lib/model/asset_count_by_time_bucket.dart @@ -68,7 +68,7 @@ class AssetCountByTimeBucket { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class AssetCountByTimeBucket { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AssetCountByTimeBucket.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AssetCountByTimeBucket.listFromJson(entry.value, growable: growable,); } } return map; 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 834a60194a..1f017ecd24 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 @@ -62,13 +62,13 @@ class AssetCountByTimeBucketResponseDto { return AssetCountByTimeBucketResponseDto( totalCount: mapValueOfType(json, r'totalCount')!, - buckets: AssetCountByTimeBucket.listFromJson(json[r'buckets'])!, + buckets: AssetCountByTimeBucket.listFromJson(json[r'buckets']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class AssetCountByTimeBucketResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AssetCountByTimeBucketResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AssetCountByTimeBucketResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 7b1f0e4878..b227850de4 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 @@ -89,7 +89,7 @@ class AssetCountByUserIdResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -120,12 +120,10 @@ class AssetCountByUserIdResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AssetCountByUserIdResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AssetCountByUserIdResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 33f46cda25..b00e17871e 100644 --- a/mobile/openapi/lib/model/asset_file_upload_response_dto.dart +++ b/mobile/openapi/lib/model/asset_file_upload_response_dto.dart @@ -68,7 +68,7 @@ class AssetFileUploadResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class AssetFileUploadResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AssetFileUploadResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AssetFileUploadResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/asset_response_dto.dart b/mobile/openapi/lib/model/asset_response_dto.dart index 7fdc42559d..e9f0185ce8 100644 --- a/mobile/openapi/lib/model/asset_response_dto.dart +++ b/mobile/openapi/lib/model/asset_response_dto.dart @@ -235,13 +235,13 @@ class AssetResponseDto { exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']), smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']), livePhotoVideoId: mapValueOfType(json, r'livePhotoVideoId'), - tags: TagResponseDto.listFromJson(json[r'tags']) ?? const [], + tags: TagResponseDto.listFromJson(json[r'tags']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -272,12 +272,10 @@ class AssetResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AssetResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AssetResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/auth_device_response_dto.dart b/mobile/openapi/lib/model/auth_device_response_dto.dart index 534f6c2933..f767362a8a 100644 --- a/mobile/openapi/lib/model/auth_device_response_dto.dart +++ b/mobile/openapi/lib/model/auth_device_response_dto.dart @@ -96,7 +96,7 @@ class AuthDeviceResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,12 +127,10 @@ class AuthDeviceResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = AuthDeviceResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = AuthDeviceResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/change_password_dto.dart b/mobile/openapi/lib/model/change_password_dto.dart index ebb6651b7f..d700b534a6 100644 --- a/mobile/openapi/lib/model/change_password_dto.dart +++ b/mobile/openapi/lib/model/change_password_dto.dart @@ -68,7 +68,7 @@ class ChangePasswordDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class ChangePasswordDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ChangePasswordDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ChangePasswordDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart index 65a4a6ebd2..bdc9d4acd2 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_dto.dart @@ -68,7 +68,7 @@ class CheckDuplicateAssetDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class CheckDuplicateAssetDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CheckDuplicateAssetDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CheckDuplicateAssetDto.listFromJson(entry.value, growable: growable,); } } return map; 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 e106a899b5..6f4586edb6 100644 --- a/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart +++ b/mobile/openapi/lib/model/check_duplicate_asset_response_dto.dart @@ -78,7 +78,7 @@ class CheckDuplicateAssetResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -109,12 +109,10 @@ class CheckDuplicateAssetResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CheckDuplicateAssetResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CheckDuplicateAssetResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/check_existing_assets_dto.dart b/mobile/openapi/lib/model/check_existing_assets_dto.dart index 2cc69c40b5..bc647b8729 100644 --- a/mobile/openapi/lib/model/check_existing_assets_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_dto.dart @@ -70,7 +70,7 @@ class CheckExistingAssetsDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -101,12 +101,10 @@ class CheckExistingAssetsDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CheckExistingAssetsDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CheckExistingAssetsDto.listFromJson(entry.value, growable: growable,); } } return map; 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 0d46eb7259..afc48a0d1a 100644 --- a/mobile/openapi/lib/model/check_existing_assets_response_dto.dart +++ b/mobile/openapi/lib/model/check_existing_assets_response_dto.dart @@ -63,7 +63,7 @@ class CheckExistingAssetsResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class CheckExistingAssetsResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CheckExistingAssetsResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CheckExistingAssetsResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/create_album_dto.dart b/mobile/openapi/lib/model/create_album_dto.dart index 3a6e08ea46..4e2cf6fb84 100644 --- a/mobile/openapi/lib/model/create_album_dto.dart +++ b/mobile/openapi/lib/model/create_album_dto.dart @@ -79,7 +79,7 @@ class CreateAlbumDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -110,12 +110,10 @@ class CreateAlbumDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateAlbumDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateAlbumDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/create_album_share_link_dto.dart b/mobile/openapi/lib/model/create_album_share_link_dto.dart index 43aadbe056..f296d80473 100644 --- a/mobile/openapi/lib/model/create_album_share_link_dto.dart +++ b/mobile/openapi/lib/model/create_album_share_link_dto.dart @@ -146,7 +146,7 @@ class CreateAlbumShareLinkDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -177,12 +177,10 @@ class CreateAlbumShareLinkDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateAlbumShareLinkDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateAlbumShareLinkDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/create_assets_share_link_dto.dart b/mobile/openapi/lib/model/create_assets_share_link_dto.dart index 7141825bb0..5749fc0b1a 100644 --- a/mobile/openapi/lib/model/create_assets_share_link_dto.dart +++ b/mobile/openapi/lib/model/create_assets_share_link_dto.dart @@ -148,7 +148,7 @@ class CreateAssetsShareLinkDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -179,12 +179,10 @@ class CreateAssetsShareLinkDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateAssetsShareLinkDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateAssetsShareLinkDto.listFromJson(entry.value, growable: growable,); } } return map; 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 dfdcba8a47..3eeba4a13a 100644 --- a/mobile/openapi/lib/model/create_profile_image_response_dto.dart +++ b/mobile/openapi/lib/model/create_profile_image_response_dto.dart @@ -68,7 +68,7 @@ class CreateProfileImageResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class CreateProfileImageResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/create_tag_dto.dart b/mobile/openapi/lib/model/create_tag_dto.dart index 60701f4cbf..855ab3be25 100644 --- a/mobile/openapi/lib/model/create_tag_dto.dart +++ b/mobile/openapi/lib/model/create_tag_dto.dart @@ -68,7 +68,7 @@ class CreateTagDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class CreateTagDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateTagDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateTagDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/create_user_dto.dart b/mobile/openapi/lib/model/create_user_dto.dart index bb7bb7c17d..e292eb481b 100644 --- a/mobile/openapi/lib/model/create_user_dto.dart +++ b/mobile/openapi/lib/model/create_user_dto.dart @@ -82,7 +82,7 @@ class CreateUserDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class CreateUserDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CreateUserDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CreateUserDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/curated_locations_response_dto.dart b/mobile/openapi/lib/model/curated_locations_response_dto.dart index 75cd05c0ad..5b220a5aaf 100644 --- a/mobile/openapi/lib/model/curated_locations_response_dto.dart +++ b/mobile/openapi/lib/model/curated_locations_response_dto.dart @@ -89,7 +89,7 @@ class CuratedLocationsResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -120,12 +120,10 @@ class CuratedLocationsResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CuratedLocationsResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CuratedLocationsResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/curated_objects_response_dto.dart b/mobile/openapi/lib/model/curated_objects_response_dto.dart index d7e6617bf1..e1a3a2582e 100644 --- a/mobile/openapi/lib/model/curated_objects_response_dto.dart +++ b/mobile/openapi/lib/model/curated_objects_response_dto.dart @@ -89,7 +89,7 @@ class CuratedObjectsResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -120,12 +120,10 @@ class CuratedObjectsResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = CuratedObjectsResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = CuratedObjectsResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/delete_asset_dto.dart b/mobile/openapi/lib/model/delete_asset_dto.dart index a7c613a436..cc79b881d9 100644 --- a/mobile/openapi/lib/model/delete_asset_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_dto.dart @@ -63,7 +63,7 @@ class DeleteAssetDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class DeleteAssetDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DeleteAssetDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DeleteAssetDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/delete_asset_response_dto.dart b/mobile/openapi/lib/model/delete_asset_response_dto.dart index d3e3a38f34..6ee0a7d625 100644 --- a/mobile/openapi/lib/model/delete_asset_response_dto.dart +++ b/mobile/openapi/lib/model/delete_asset_response_dto.dart @@ -68,7 +68,7 @@ class DeleteAssetResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class DeleteAssetResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DeleteAssetResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DeleteAssetResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/download_files_dto.dart b/mobile/openapi/lib/model/download_files_dto.dart index 14e2f4dd7a..de6dd79cb0 100644 --- a/mobile/openapi/lib/model/download_files_dto.dart +++ b/mobile/openapi/lib/model/download_files_dto.dart @@ -63,7 +63,7 @@ class DownloadFilesDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class DownloadFilesDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = DownloadFilesDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = DownloadFilesDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/edit_shared_link_dto.dart b/mobile/openapi/lib/model/edit_shared_link_dto.dart index c6323e6672..f6f64d76fa 100644 --- a/mobile/openapi/lib/model/edit_shared_link_dto.dart +++ b/mobile/openapi/lib/model/edit_shared_link_dto.dart @@ -133,7 +133,7 @@ class EditSharedLinkDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -164,12 +164,10 @@ class EditSharedLinkDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = EditSharedLinkDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = EditSharedLinkDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/exif_response_dto.dart b/mobile/openapi/lib/model/exif_response_dto.dart index fceec66d37..96b727434a 100644 --- a/mobile/openapi/lib/model/exif_response_dto.dart +++ b/mobile/openapi/lib/model/exif_response_dto.dart @@ -288,7 +288,7 @@ class ExifResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -319,12 +319,10 @@ class ExifResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ExifResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ExifResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 d483153649..8cd6ff51ba 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 @@ -63,7 +63,7 @@ class GetAssetByTimeBucketDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class GetAssetByTimeBucketDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = GetAssetByTimeBucketDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = GetAssetByTimeBucketDto.listFromJson(entry.value, growable: growable,); } } return map; 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 342d2b59c6..2cd3feda83 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 @@ -61,7 +61,7 @@ class GetAssetCountByTimeBucketDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class GetAssetCountByTimeBucketDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = GetAssetCountByTimeBucketDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = GetAssetCountByTimeBucketDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/job_command_dto.dart b/mobile/openapi/lib/model/job_command_dto.dart index fe5c383439..d12037664b 100644 --- a/mobile/openapi/lib/model/job_command_dto.dart +++ b/mobile/openapi/lib/model/job_command_dto.dart @@ -68,7 +68,7 @@ class JobCommandDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class JobCommandDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = JobCommandDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = JobCommandDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/job_counts_dto.dart b/mobile/openapi/lib/model/job_counts_dto.dart index 80fa124224..936ef75461 100644 --- a/mobile/openapi/lib/model/job_counts_dto.dart +++ b/mobile/openapi/lib/model/job_counts_dto.dart @@ -96,7 +96,7 @@ class JobCountsDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,12 +127,10 @@ class JobCountsDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = JobCountsDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = JobCountsDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/job_status_dto.dart b/mobile/openapi/lib/model/job_status_dto.dart index 481855a230..47abf75827 100644 --- a/mobile/openapi/lib/model/job_status_dto.dart +++ b/mobile/openapi/lib/model/job_status_dto.dart @@ -68,7 +68,7 @@ class JobStatusDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class JobStatusDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = JobStatusDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = JobStatusDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/login_credential_dto.dart b/mobile/openapi/lib/model/login_credential_dto.dart index 103eedd4ba..381c455d47 100644 --- a/mobile/openapi/lib/model/login_credential_dto.dart +++ b/mobile/openapi/lib/model/login_credential_dto.dart @@ -68,7 +68,7 @@ class LoginCredentialDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class LoginCredentialDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = LoginCredentialDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = LoginCredentialDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/login_response_dto.dart b/mobile/openapi/lib/model/login_response_dto.dart index 9f3fa60f74..ec8e858ed5 100644 --- a/mobile/openapi/lib/model/login_response_dto.dart +++ b/mobile/openapi/lib/model/login_response_dto.dart @@ -110,7 +110,7 @@ class LoginResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -141,12 +141,10 @@ class LoginResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = LoginResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = LoginResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/logout_response_dto.dart b/mobile/openapi/lib/model/logout_response_dto.dart index 9a86bb6cc6..1280b74927 100644 --- a/mobile/openapi/lib/model/logout_response_dto.dart +++ b/mobile/openapi/lib/model/logout_response_dto.dart @@ -68,7 +68,7 @@ class LogoutResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class LogoutResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = LogoutResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = LogoutResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/o_auth_callback_dto.dart b/mobile/openapi/lib/model/o_auth_callback_dto.dart index 63f9cd3152..ee1ba0e41f 100644 --- a/mobile/openapi/lib/model/o_auth_callback_dto.dart +++ b/mobile/openapi/lib/model/o_auth_callback_dto.dart @@ -61,7 +61,7 @@ class OAuthCallbackDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class OAuthCallbackDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/o_auth_config_dto.dart b/mobile/openapi/lib/model/o_auth_config_dto.dart index f33488b03c..827427515f 100644 --- a/mobile/openapi/lib/model/o_auth_config_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_dto.dart @@ -61,7 +61,7 @@ class OAuthConfigDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class OAuthConfigDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = OAuthConfigDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = OAuthConfigDto.listFromJson(entry.value, growable: growable,); } } return map; 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 03025a07cb..949b31c18a 100644 --- a/mobile/openapi/lib/model/o_auth_config_response_dto.dart +++ b/mobile/openapi/lib/model/o_auth_config_response_dto.dart @@ -119,7 +119,7 @@ class OAuthConfigResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -150,12 +150,10 @@ class OAuthConfigResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = OAuthConfigResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = OAuthConfigResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/queue_status_dto.dart b/mobile/openapi/lib/model/queue_status_dto.dart index 9bb5dea0d3..51100a545c 100644 --- a/mobile/openapi/lib/model/queue_status_dto.dart +++ b/mobile/openapi/lib/model/queue_status_dto.dart @@ -68,7 +68,7 @@ class QueueStatusDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class QueueStatusDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = QueueStatusDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = QueueStatusDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/remove_assets_dto.dart b/mobile/openapi/lib/model/remove_assets_dto.dart index 7dd1e9f9fb..d7131b4f7a 100644 --- a/mobile/openapi/lib/model/remove_assets_dto.dart +++ b/mobile/openapi/lib/model/remove_assets_dto.dart @@ -63,7 +63,7 @@ class RemoveAssetsDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -94,12 +94,10 @@ class RemoveAssetsDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = RemoveAssetsDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = RemoveAssetsDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_album_response_dto.dart b/mobile/openapi/lib/model/search_album_response_dto.dart index 8a68fbe49f..26ad86f105 100644 --- a/mobile/openapi/lib/model/search_album_response_dto.dart +++ b/mobile/openapi/lib/model/search_album_response_dto.dart @@ -75,14 +75,14 @@ class SearchAlbumResponseDto { return SearchAlbumResponseDto( total: mapValueOfType(json, r'total')!, count: mapValueOfType(json, r'count')!, - items: AlbumResponseDto.listFromJson(json[r'items'])!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets'])!, + items: AlbumResponseDto.listFromJson(json[r'items']), + facets: SearchFacetResponseDto.listFromJson(json[r'facets']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class SearchAlbumResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_asset_dto.dart b/mobile/openapi/lib/model/search_asset_dto.dart index 7bc1341ddb..561e43bab4 100644 --- a/mobile/openapi/lib/model/search_asset_dto.dart +++ b/mobile/openapi/lib/model/search_asset_dto.dart @@ -61,7 +61,7 @@ class SearchAssetDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class SearchAssetDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchAssetDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchAssetDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_asset_response_dto.dart b/mobile/openapi/lib/model/search_asset_response_dto.dart index fd1b8b545f..60bfd2d2c6 100644 --- a/mobile/openapi/lib/model/search_asset_response_dto.dart +++ b/mobile/openapi/lib/model/search_asset_response_dto.dart @@ -75,14 +75,14 @@ class SearchAssetResponseDto { return SearchAssetResponseDto( total: mapValueOfType(json, r'total')!, count: mapValueOfType(json, r'count')!, - items: AssetResponseDto.listFromJson(json[r'items'])!, - facets: SearchFacetResponseDto.listFromJson(json[r'facets'])!, + items: AssetResponseDto.listFromJson(json[r'items']), + facets: SearchFacetResponseDto.listFromJson(json[r'facets']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class SearchAssetResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_config_response_dto.dart b/mobile/openapi/lib/model/search_config_response_dto.dart index 72faed25dc..5ec94abca2 100644 --- a/mobile/openapi/lib/model/search_config_response_dto.dart +++ b/mobile/openapi/lib/model/search_config_response_dto.dart @@ -61,7 +61,7 @@ class SearchConfigResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class SearchConfigResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchConfigResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchConfigResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_explore_item.dart b/mobile/openapi/lib/model/search_explore_item.dart index f7529496c5..7e5fbed4d0 100644 --- a/mobile/openapi/lib/model/search_explore_item.dart +++ b/mobile/openapi/lib/model/search_explore_item.dart @@ -68,7 +68,7 @@ class SearchExploreItem { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class SearchExploreItem { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchExploreItem.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchExploreItem.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_explore_response_dto.dart b/mobile/openapi/lib/model/search_explore_response_dto.dart index 812aceecf7..1c30196b76 100644 --- a/mobile/openapi/lib/model/search_explore_response_dto.dart +++ b/mobile/openapi/lib/model/search_explore_response_dto.dart @@ -62,13 +62,13 @@ class SearchExploreResponseDto { return SearchExploreResponseDto( fieldName: mapValueOfType(json, r'fieldName')!, - items: SearchExploreItem.listFromJson(json[r'items'])!, + items: SearchExploreItem.listFromJson(json[r'items']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class SearchExploreResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 8b9d30f81e..7b3f5868ca 100644 --- a/mobile/openapi/lib/model/search_facet_count_response_dto.dart +++ b/mobile/openapi/lib/model/search_facet_count_response_dto.dart @@ -68,7 +68,7 @@ class SearchFacetCountResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class SearchFacetCountResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_facet_response_dto.dart b/mobile/openapi/lib/model/search_facet_response_dto.dart index 78a4756af2..1eddd4181e 100644 --- a/mobile/openapi/lib/model/search_facet_response_dto.dart +++ b/mobile/openapi/lib/model/search_facet_response_dto.dart @@ -62,13 +62,13 @@ class SearchFacetResponseDto { return SearchFacetResponseDto( fieldName: mapValueOfType(json, r'fieldName')!, - counts: SearchFacetCountResponseDto.listFromJson(json[r'counts'])!, + counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class SearchFacetResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/search_response_dto.dart b/mobile/openapi/lib/model/search_response_dto.dart index c0e5c1a99e..87e6edaf16 100644 --- a/mobile/openapi/lib/model/search_response_dto.dart +++ b/mobile/openapi/lib/model/search_response_dto.dart @@ -68,7 +68,7 @@ class SearchResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -99,12 +99,10 @@ class SearchResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SearchResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SearchResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/server_info_response_dto.dart b/mobile/openapi/lib/model/server_info_response_dto.dart index 5f359cde08..be11babdd3 100644 --- a/mobile/openapi/lib/model/server_info_response_dto.dart +++ b/mobile/openapi/lib/model/server_info_response_dto.dart @@ -103,7 +103,7 @@ class ServerInfoResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -134,12 +134,10 @@ class ServerInfoResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ServerInfoResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ServerInfoResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/server_ping_response.dart b/mobile/openapi/lib/model/server_ping_response.dart index 2385b27b8e..20faa1a8be 100644 --- a/mobile/openapi/lib/model/server_ping_response.dart +++ b/mobile/openapi/lib/model/server_ping_response.dart @@ -61,7 +61,7 @@ class ServerPingResponse { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class ServerPingResponse { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ServerPingResponse.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ServerPingResponse.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/server_stats_response_dto.dart b/mobile/openapi/lib/model/server_stats_response_dto.dart index aeb40c0c7f..1d37076e9b 100644 --- a/mobile/openapi/lib/model/server_stats_response_dto.dart +++ b/mobile/openapi/lib/model/server_stats_response_dto.dart @@ -76,13 +76,13 @@ class ServerStatsResponseDto { photos: mapValueOfType(json, r'photos')!, videos: mapValueOfType(json, r'videos')!, usage: mapValueOfType(json, r'usage')!, - usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser'])!, + usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser']), ); } return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class ServerStatsResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/server_version_reponse_dto.dart b/mobile/openapi/lib/model/server_version_reponse_dto.dart index 361a1c6486..4071486d91 100644 --- a/mobile/openapi/lib/model/server_version_reponse_dto.dart +++ b/mobile/openapi/lib/model/server_version_reponse_dto.dart @@ -75,7 +75,7 @@ class ServerVersionReponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -106,12 +106,10 @@ class ServerVersionReponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ServerVersionReponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ServerVersionReponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/shared_link_response_dto.dart b/mobile/openapi/lib/model/shared_link_response_dto.dart index e39891043a..ec8472c810 100644 --- a/mobile/openapi/lib/model/shared_link_response_dto.dart +++ b/mobile/openapi/lib/model/shared_link_response_dto.dart @@ -152,7 +152,7 @@ class SharedLinkResponseDto { key: mapValueOfType(json, r'key')!, createdAt: mapValueOfType(json, r'createdAt')!, expiresAt: mapValueOfType(json, r'expiresAt'), - assets: AssetResponseDto.listFromJson(json[r'assets'])!, + assets: AssetResponseDto.listFromJson(json[r'assets']), album: AlbumResponseDto.fromJson(json[r'album']), allowUpload: mapValueOfType(json, r'allowUpload')!, allowDownload: mapValueOfType(json, r'allowDownload')!, @@ -162,7 +162,7 @@ class SharedLinkResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -193,12 +193,10 @@ class SharedLinkResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/sign_up_dto.dart b/mobile/openapi/lib/model/sign_up_dto.dart index 5aaa7ac31a..a68c3d92f0 100644 --- a/mobile/openapi/lib/model/sign_up_dto.dart +++ b/mobile/openapi/lib/model/sign_up_dto.dart @@ -82,7 +82,7 @@ class SignUpDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class SignUpDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SignUpDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SignUpDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/smart_info_response_dto.dart b/mobile/openapi/lib/model/smart_info_response_dto.dart index f567a82a83..9c9f42ef44 100644 --- a/mobile/openapi/lib/model/smart_info_response_dto.dart +++ b/mobile/openapi/lib/model/smart_info_response_dto.dart @@ -80,7 +80,7 @@ class SmartInfoResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -111,12 +111,10 @@ class SmartInfoResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SmartInfoResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SmartInfoResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/system_config_dto.dart b/mobile/openapi/lib/model/system_config_dto.dart index fb35e7350f..41ae4cee99 100644 --- a/mobile/openapi/lib/model/system_config_dto.dart +++ b/mobile/openapi/lib/model/system_config_dto.dart @@ -82,7 +82,7 @@ class SystemConfigDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -113,12 +113,10 @@ class SystemConfigDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigDto.listFromJson(entry.value, growable: growable,); } } return map; 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 15957023f8..0fa2758373 100644 --- a/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart +++ b/mobile/openapi/lib/model/system_config_f_fmpeg_dto.dart @@ -96,7 +96,7 @@ class SystemConfigFFmpegDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,12 +127,10 @@ class SystemConfigFFmpegDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); } } return map; 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 19a87df106..5ce9e0abac 100644 --- a/mobile/openapi/lib/model/system_config_o_auth_dto.dart +++ b/mobile/openapi/lib/model/system_config_o_auth_dto.dart @@ -124,7 +124,7 @@ class SystemConfigOAuthDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -155,12 +155,10 @@ class SystemConfigOAuthDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); } } return map; 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 5a0eba93a2..67cc5f6d70 100644 --- a/mobile/openapi/lib/model/system_config_password_login_dto.dart +++ b/mobile/openapi/lib/model/system_config_password_login_dto.dart @@ -61,7 +61,7 @@ class SystemConfigPasswordLoginDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class SystemConfigPasswordLoginDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); } } return map; 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 c5fd4f9121..c170ad07bf 100644 --- a/mobile/openapi/lib/model/system_config_storage_template_dto.dart +++ b/mobile/openapi/lib/model/system_config_storage_template_dto.dart @@ -61,7 +61,7 @@ class SystemConfigStorageTemplateDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class SystemConfigStorageTemplateDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); } } return map; 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 721e79869d..0fd4db6075 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 @@ -117,7 +117,7 @@ class SystemConfigTemplateStorageOptionDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -148,12 +148,10 @@ class SystemConfigTemplateStorageOptionDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/tag_response_dto.dart b/mobile/openapi/lib/model/tag_response_dto.dart index 352b0e5aa8..42c386df34 100644 --- a/mobile/openapi/lib/model/tag_response_dto.dart +++ b/mobile/openapi/lib/model/tag_response_dto.dart @@ -93,7 +93,7 @@ class TagResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -124,12 +124,10 @@ class TagResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = TagResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = TagResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/update_album_dto.dart b/mobile/openapi/lib/model/update_album_dto.dart index 17c1819979..234e70bf7c 100644 --- a/mobile/openapi/lib/model/update_album_dto.dart +++ b/mobile/openapi/lib/model/update_album_dto.dart @@ -88,7 +88,7 @@ class UpdateAlbumDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -119,12 +119,10 @@ class UpdateAlbumDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/update_asset_dto.dart b/mobile/openapi/lib/model/update_asset_dto.dart index c24a98dc3d..6b783fdac0 100644 --- a/mobile/openapi/lib/model/update_asset_dto.dart +++ b/mobile/openapi/lib/model/update_asset_dto.dart @@ -114,7 +114,7 @@ class UpdateAssetDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -145,12 +145,10 @@ class UpdateAssetDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UpdateAssetDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UpdateAssetDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/update_tag_dto.dart b/mobile/openapi/lib/model/update_tag_dto.dart index 20696fe1b9..85c1761a6b 100644 --- a/mobile/openapi/lib/model/update_tag_dto.dart +++ b/mobile/openapi/lib/model/update_tag_dto.dart @@ -88,7 +88,7 @@ class UpdateTagDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -119,12 +119,10 @@ class UpdateTagDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UpdateTagDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UpdateTagDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/update_user_dto.dart b/mobile/openapi/lib/model/update_user_dto.dart index 2d59db436e..4e2747745e 100644 --- a/mobile/openapi/lib/model/update_user_dto.dart +++ b/mobile/openapi/lib/model/update_user_dto.dart @@ -163,7 +163,7 @@ class UpdateUserDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -194,12 +194,10 @@ class UpdateUserDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UpdateUserDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UpdateUserDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/usage_by_user_dto.dart b/mobile/openapi/lib/model/usage_by_user_dto.dart index d2cbc4f41b..fb23acc6f7 100644 --- a/mobile/openapi/lib/model/usage_by_user_dto.dart +++ b/mobile/openapi/lib/model/usage_by_user_dto.dart @@ -96,7 +96,7 @@ class UsageByUserDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -127,12 +127,10 @@ class UsageByUserDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UsageByUserDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UsageByUserDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/user_count_response_dto.dart b/mobile/openapi/lib/model/user_count_response_dto.dart index 81b0f488a9..a5005f184e 100644 --- a/mobile/openapi/lib/model/user_count_response_dto.dart +++ b/mobile/openapi/lib/model/user_count_response_dto.dart @@ -61,7 +61,7 @@ class UserCountResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class UserCountResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UserCountResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UserCountResponseDto.listFromJson(entry.value, growable: growable,); } } return map; diff --git a/mobile/openapi/lib/model/user_response_dto.dart b/mobile/openapi/lib/model/user_response_dto.dart index 7d231d305b..ccdb9b552d 100644 --- a/mobile/openapi/lib/model/user_response_dto.dart +++ b/mobile/openapi/lib/model/user_response_dto.dart @@ -151,7 +151,7 @@ class UserResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -182,12 +182,10 @@ class UserResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = UserResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = UserResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 a32f2d914e..7a39b7f509 100644 --- a/mobile/openapi/lib/model/validate_access_token_response_dto.dart +++ b/mobile/openapi/lib/model/validate_access_token_response_dto.dart @@ -61,7 +61,7 @@ class ValidateAccessTokenResponseDto { return null; } - static List? listFromJson(dynamic json, {bool growable = false,}) { + static List listFromJson(dynamic json, {bool growable = false,}) { final result = []; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -92,12 +92,10 @@ class ValidateAccessTokenResponseDto { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); } } return map; 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 4cde0cd9b5..34f83c304b 100644 --- a/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache +++ b/server/openapi-generator/templates/mobile/serialization/native/native_class.mustache @@ -141,7 +141,7 @@ class {{{classname}}} { {{{name}}}: json[r'{{{baseName}}}'] is List ? (json[r'{{{baseName}}}'] as List).map((e) => {{#items.complexType}} - {{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}} + {{items.complexType}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}} {{/items.complexType}} {{^items.complexType}} e == null ? {{#items.isNullable}}null{{/items.isNullable}}{{^items.isNullable}}const <{{items.items.dataType}}>[]{{/items.isNullable}} : (e as List).cast<{{items.items.dataType}}>() @@ -150,7 +150,7 @@ class {{{classname}}} { : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}}, {{/items.isArray}} {{^items.isArray}} - {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{{name}}}: {{{complexType}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, {{/items.isArray}} {{/isArray}} {{^isArray}} @@ -168,7 +168,7 @@ class {{{classname}}} { {{^items.isArray}} {{#items.isMap}} {{#items.complexType}} - {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{{name}}}: {{items.complexType}}.mapFromJson(json[r'{{{baseName}}}']), {{/items.complexType}} {{^items.complexType}} {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, @@ -176,7 +176,7 @@ class {{{classname}}} { {{/items.isMap}} {{^items.isMap}} {{#items.complexType}} - {{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}'{{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}}]) ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{{name}}}: {{{items.complexType}}}.mapFromJson(json[r'{{{baseName}}}']), {{/items.complexType}} {{^items.complexType}} {{{name}}}: mapCastOfType(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, @@ -197,7 +197,7 @@ class {{{classname}}} { {{^complexType}} {{#isArray}} {{#isEnum}} - {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#required}}{{^isNullable}}!{{/isNullable}}{{#uniqueItems}}.toSet(){{/uniqueItems}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, + {{{name}}}: {{{items.datatypeWithEnum}}}.listFromJson(json[r'{{{baseName}}}']){{#uniqueItems}}.toSet(){{/uniqueItems}}, {{/isEnum}} {{^isEnum}} {{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}} @@ -234,7 +234,7 @@ class {{{classname}}} { return null; } - static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) { + static List<{{{classname}}}> listFromJson(dynamic json, {bool growable = false,}) { final result = <{{{classname}}}>[]; if (json is List && json.isNotEmpty) { for (final row in json) { @@ -265,12 +265,10 @@ class {{{classname}}} { static Map> mapListFromJson(dynamic json, {bool growable = false,}) { final map = >{}; if (json is Map && json.isNotEmpty) { - json = json.cast(); // ignore: parameter_assignments + // ignore: parameter_assignments + json = json.cast(); for (final entry in json.entries) { - final value = {{{classname}}}.listFromJson(entry.value, growable: growable,); - if (value != null) { - map[entry.key] = value; - } + map[entry.key] = {{{classname}}}.listFromJson(entry.value, growable: growable,); } } return map;