chore: regenerate open api (#2374)

This commit is contained in:
Jason Rasmussen 2023-05-03 15:27:57 -04:00 committed by GitHub
parent b6b9f51bd7
commit 91ad584064
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 337 additions and 497 deletions

View File

@ -63,7 +63,7 @@ class AddAssetsDto {
return null; return null;
} }
static List<AddAssetsDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AddAssetsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AddAssetsDto>[]; final result = <AddAssetsDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class AddAssetsDto {
static Map<String, List<AddAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AddAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AddAssetsDto>>{}; final map = <String, List<AddAssetsDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AddAssetsDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AddAssetsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -87,7 +87,7 @@ class AddAssetsResponseDto {
return null; return null;
} }
static List<AddAssetsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AddAssetsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AddAssetsResponseDto>[]; final result = <AddAssetsResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -118,12 +118,10 @@ class AddAssetsResponseDto {
static Map<String, List<AddAssetsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AddAssetsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AddAssetsResponseDto>>{}; final map = <String, List<AddAssetsResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AddAssetsResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AddAssetsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class AddUsersDto {
return null; return null;
} }
static List<AddUsersDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AddUsersDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AddUsersDto>[]; final result = <AddUsersDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class AddUsersDto {
static Map<String, List<AddUsersDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AddUsersDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AddUsersDto>>{}; final map = <String, List<AddUsersDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AddUsersDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AddUsersDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -89,7 +89,7 @@ class AdminSignupResponseDto {
return null; return null;
} }
static List<AdminSignupResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AdminSignupResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AdminSignupResponseDto>[]; final result = <AdminSignupResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -120,12 +120,10 @@ class AdminSignupResponseDto {
static Map<String, List<AdminSignupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AdminSignupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AdminSignupResponseDto>>{}; final map = <String, List<AdminSignupResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AdminSignupResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AdminSignupResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -75,7 +75,7 @@ class AlbumCountResponseDto {
return null; return null;
} }
static List<AlbumCountResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AlbumCountResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumCountResponseDto>[]; final result = <AlbumCountResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -106,12 +106,10 @@ class AlbumCountResponseDto {
static Map<String, List<AlbumCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AlbumCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumCountResponseDto>>{}; final map = <String, List<AlbumCountResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AlbumCountResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AlbumCountResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -127,15 +127,15 @@ class AlbumResponseDto {
updatedAt: mapValueOfType<String>(json, r'updatedAt')!, updatedAt: mapValueOfType<String>(json, r'updatedAt')!,
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'), albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
shared: mapValueOfType<bool>(json, r'shared')!, shared: mapValueOfType<bool>(json, r'shared')!,
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers'])!, sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
assets: AssetResponseDto.listFromJson(json[r'assets'])!, assets: AssetResponseDto.listFromJson(json[r'assets']),
owner: UserResponseDto.fromJson(json[r'owner'])!, owner: UserResponseDto.fromJson(json[r'owner'])!,
); );
} }
return null; return null;
} }
static List<AlbumResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AlbumResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumResponseDto>[]; final result = <AlbumResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -166,12 +166,10 @@ class AlbumResponseDto {
static Map<String, List<AlbumResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AlbumResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumResponseDto>>{}; final map = <String, List<AlbumResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AlbumResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AlbumResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -110,7 +110,7 @@ class AllJobStatusResponseDto {
return null; return null;
} }
static List<AllJobStatusResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AllJobStatusResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AllJobStatusResponseDto>[]; final result = <AllJobStatusResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -141,12 +141,10 @@ class AllJobStatusResponseDto {
static Map<String, List<AllJobStatusResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AllJobStatusResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AllJobStatusResponseDto>>{}; final map = <String, List<AllJobStatusResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AllJobStatusResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AllJobStatusResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -71,7 +71,7 @@ class APIKeyCreateDto {
return null; return null;
} }
static List<APIKeyCreateDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<APIKeyCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <APIKeyCreateDto>[]; final result = <APIKeyCreateDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -102,12 +102,10 @@ class APIKeyCreateDto {
static Map<String, List<APIKeyCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<APIKeyCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<APIKeyCreateDto>>{}; final map = <String, List<APIKeyCreateDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = APIKeyCreateDto.listFromJson(entry.value, growable: growable,); map[entry.key] = APIKeyCreateDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class APIKeyCreateResponseDto {
return null; return null;
} }
static List<APIKeyCreateResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<APIKeyCreateResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <APIKeyCreateResponseDto>[]; final result = <APIKeyCreateResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class APIKeyCreateResponseDto {
static Map<String, List<APIKeyCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<APIKeyCreateResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<APIKeyCreateResponseDto>>{}; final map = <String, List<APIKeyCreateResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = APIKeyCreateResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = APIKeyCreateResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -82,7 +82,7 @@ class APIKeyResponseDto {
return null; return null;
} }
static List<APIKeyResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<APIKeyResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <APIKeyResponseDto>[]; final result = <APIKeyResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class APIKeyResponseDto {
static Map<String, List<APIKeyResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<APIKeyResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<APIKeyResponseDto>>{}; final map = <String, List<APIKeyResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = APIKeyResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = APIKeyResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class APIKeyUpdateDto {
return null; return null;
} }
static List<APIKeyUpdateDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<APIKeyUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <APIKeyUpdateDto>[]; final result = <APIKeyUpdateDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class APIKeyUpdateDto {
static Map<String, List<APIKeyUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<APIKeyUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<APIKeyUpdateDto>>{}; final map = <String, List<APIKeyUpdateDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = APIKeyUpdateDto.listFromJson(entry.value, growable: growable,); map[entry.key] = APIKeyUpdateDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class AssetCountByTimeBucket {
return null; return null;
} }
static List<AssetCountByTimeBucket>? listFromJson(dynamic json, {bool growable = false,}) { static List<AssetCountByTimeBucket> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetCountByTimeBucket>[]; final result = <AssetCountByTimeBucket>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class AssetCountByTimeBucket {
static Map<String, List<AssetCountByTimeBucket>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AssetCountByTimeBucket>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetCountByTimeBucket>>{}; final map = <String, List<AssetCountByTimeBucket>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AssetCountByTimeBucket.listFromJson(entry.value, growable: growable,); map[entry.key] = AssetCountByTimeBucket.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -62,13 +62,13 @@ class AssetCountByTimeBucketResponseDto {
return AssetCountByTimeBucketResponseDto( return AssetCountByTimeBucketResponseDto(
totalCount: mapValueOfType<int>(json, r'totalCount')!, totalCount: mapValueOfType<int>(json, r'totalCount')!,
buckets: AssetCountByTimeBucket.listFromJson(json[r'buckets'])!, buckets: AssetCountByTimeBucket.listFromJson(json[r'buckets']),
); );
} }
return null; return null;
} }
static List<AssetCountByTimeBucketResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AssetCountByTimeBucketResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetCountByTimeBucketResponseDto>[]; final result = <AssetCountByTimeBucketResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class AssetCountByTimeBucketResponseDto {
static Map<String, List<AssetCountByTimeBucketResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AssetCountByTimeBucketResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetCountByTimeBucketResponseDto>>{}; final map = <String, List<AssetCountByTimeBucketResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AssetCountByTimeBucketResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AssetCountByTimeBucketResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -89,7 +89,7 @@ class AssetCountByUserIdResponseDto {
return null; return null;
} }
static List<AssetCountByUserIdResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AssetCountByUserIdResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetCountByUserIdResponseDto>[]; final result = <AssetCountByUserIdResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -120,12 +120,10 @@ class AssetCountByUserIdResponseDto {
static Map<String, List<AssetCountByUserIdResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AssetCountByUserIdResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetCountByUserIdResponseDto>>{}; final map = <String, List<AssetCountByUserIdResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AssetCountByUserIdResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AssetCountByUserIdResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class AssetFileUploadResponseDto {
return null; return null;
} }
static List<AssetFileUploadResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AssetFileUploadResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetFileUploadResponseDto>[]; final result = <AssetFileUploadResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class AssetFileUploadResponseDto {
static Map<String, List<AssetFileUploadResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AssetFileUploadResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetFileUploadResponseDto>>{}; final map = <String, List<AssetFileUploadResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AssetFileUploadResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AssetFileUploadResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -235,13 +235,13 @@ class AssetResponseDto {
exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']), exifInfo: ExifResponseDto.fromJson(json[r'exifInfo']),
smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']), smartInfo: SmartInfoResponseDto.fromJson(json[r'smartInfo']),
livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'), livePhotoVideoId: mapValueOfType<String>(json, r'livePhotoVideoId'),
tags: TagResponseDto.listFromJson(json[r'tags']) ?? const [], tags: TagResponseDto.listFromJson(json[r'tags']),
); );
} }
return null; return null;
} }
static List<AssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AssetResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetResponseDto>[]; final result = <AssetResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -272,12 +272,10 @@ class AssetResponseDto {
static Map<String, List<AssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetResponseDto>>{}; final map = <String, List<AssetResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AssetResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -96,7 +96,7 @@ class AuthDeviceResponseDto {
return null; return null;
} }
static List<AuthDeviceResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<AuthDeviceResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AuthDeviceResponseDto>[]; final result = <AuthDeviceResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -127,12 +127,10 @@ class AuthDeviceResponseDto {
static Map<String, List<AuthDeviceResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<AuthDeviceResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AuthDeviceResponseDto>>{}; final map = <String, List<AuthDeviceResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = AuthDeviceResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = AuthDeviceResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class ChangePasswordDto {
return null; return null;
} }
static List<ChangePasswordDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ChangePasswordDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ChangePasswordDto>[]; final result = <ChangePasswordDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class ChangePasswordDto {
static Map<String, List<ChangePasswordDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ChangePasswordDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ChangePasswordDto>>{}; final map = <String, List<ChangePasswordDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ChangePasswordDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ChangePasswordDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class CheckDuplicateAssetDto {
return null; return null;
} }
static List<CheckDuplicateAssetDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CheckDuplicateAssetDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckDuplicateAssetDto>[]; final result = <CheckDuplicateAssetDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class CheckDuplicateAssetDto {
static Map<String, List<CheckDuplicateAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CheckDuplicateAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckDuplicateAssetDto>>{}; final map = <String, List<CheckDuplicateAssetDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CheckDuplicateAssetDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CheckDuplicateAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -78,7 +78,7 @@ class CheckDuplicateAssetResponseDto {
return null; return null;
} }
static List<CheckDuplicateAssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CheckDuplicateAssetResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckDuplicateAssetResponseDto>[]; final result = <CheckDuplicateAssetResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -109,12 +109,10 @@ class CheckDuplicateAssetResponseDto {
static Map<String, List<CheckDuplicateAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CheckDuplicateAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckDuplicateAssetResponseDto>>{}; final map = <String, List<CheckDuplicateAssetResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CheckDuplicateAssetResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CheckDuplicateAssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -70,7 +70,7 @@ class CheckExistingAssetsDto {
return null; return null;
} }
static List<CheckExistingAssetsDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CheckExistingAssetsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckExistingAssetsDto>[]; final result = <CheckExistingAssetsDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -101,12 +101,10 @@ class CheckExistingAssetsDto {
static Map<String, List<CheckExistingAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CheckExistingAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckExistingAssetsDto>>{}; final map = <String, List<CheckExistingAssetsDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CheckExistingAssetsDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CheckExistingAssetsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class CheckExistingAssetsResponseDto {
return null; return null;
} }
static List<CheckExistingAssetsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CheckExistingAssetsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CheckExistingAssetsResponseDto>[]; final result = <CheckExistingAssetsResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class CheckExistingAssetsResponseDto {
static Map<String, List<CheckExistingAssetsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CheckExistingAssetsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CheckExistingAssetsResponseDto>>{}; final map = <String, List<CheckExistingAssetsResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CheckExistingAssetsResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CheckExistingAssetsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -79,7 +79,7 @@ class CreateAlbumDto {
return null; return null;
} }
static List<CreateAlbumDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateAlbumDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateAlbumDto>[]; final result = <CreateAlbumDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -110,12 +110,10 @@ class CreateAlbumDto {
static Map<String, List<CreateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateAlbumDto>>{}; final map = <String, List<CreateAlbumDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateAlbumDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateAlbumDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -146,7 +146,7 @@ class CreateAlbumShareLinkDto {
return null; return null;
} }
static List<CreateAlbumShareLinkDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateAlbumShareLinkDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateAlbumShareLinkDto>[]; final result = <CreateAlbumShareLinkDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -177,12 +177,10 @@ class CreateAlbumShareLinkDto {
static Map<String, List<CreateAlbumShareLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateAlbumShareLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateAlbumShareLinkDto>>{}; final map = <String, List<CreateAlbumShareLinkDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateAlbumShareLinkDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateAlbumShareLinkDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -148,7 +148,7 @@ class CreateAssetsShareLinkDto {
return null; return null;
} }
static List<CreateAssetsShareLinkDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateAssetsShareLinkDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateAssetsShareLinkDto>[]; final result = <CreateAssetsShareLinkDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -179,12 +179,10 @@ class CreateAssetsShareLinkDto {
static Map<String, List<CreateAssetsShareLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateAssetsShareLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateAssetsShareLinkDto>>{}; final map = <String, List<CreateAssetsShareLinkDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateAssetsShareLinkDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateAssetsShareLinkDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class CreateProfileImageResponseDto {
return null; return null;
} }
static List<CreateProfileImageResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateProfileImageResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateProfileImageResponseDto>[]; final result = <CreateProfileImageResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class CreateProfileImageResponseDto {
static Map<String, List<CreateProfileImageResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateProfileImageResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateProfileImageResponseDto>>{}; final map = <String, List<CreateProfileImageResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateProfileImageResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class CreateTagDto {
return null; return null;
} }
static List<CreateTagDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateTagDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateTagDto>[]; final result = <CreateTagDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class CreateTagDto {
static Map<String, List<CreateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateTagDto>>{}; final map = <String, List<CreateTagDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateTagDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateTagDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -82,7 +82,7 @@ class CreateUserDto {
return null; return null;
} }
static List<CreateUserDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CreateUserDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CreateUserDto>[]; final result = <CreateUserDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class CreateUserDto {
static Map<String, List<CreateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CreateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CreateUserDto>>{}; final map = <String, List<CreateUserDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CreateUserDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CreateUserDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -89,7 +89,7 @@ class CuratedLocationsResponseDto {
return null; return null;
} }
static List<CuratedLocationsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CuratedLocationsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CuratedLocationsResponseDto>[]; final result = <CuratedLocationsResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -120,12 +120,10 @@ class CuratedLocationsResponseDto {
static Map<String, List<CuratedLocationsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CuratedLocationsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CuratedLocationsResponseDto>>{}; final map = <String, List<CuratedLocationsResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CuratedLocationsResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CuratedLocationsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -89,7 +89,7 @@ class CuratedObjectsResponseDto {
return null; return null;
} }
static List<CuratedObjectsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<CuratedObjectsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CuratedObjectsResponseDto>[]; final result = <CuratedObjectsResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -120,12 +120,10 @@ class CuratedObjectsResponseDto {
static Map<String, List<CuratedObjectsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<CuratedObjectsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CuratedObjectsResponseDto>>{}; final map = <String, List<CuratedObjectsResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = CuratedObjectsResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = CuratedObjectsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class DeleteAssetDto {
return null; return null;
} }
static List<DeleteAssetDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<DeleteAssetDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeleteAssetDto>[]; final result = <DeleteAssetDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class DeleteAssetDto {
static Map<String, List<DeleteAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<DeleteAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeleteAssetDto>>{}; final map = <String, List<DeleteAssetDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = DeleteAssetDto.listFromJson(entry.value, growable: growable,); map[entry.key] = DeleteAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class DeleteAssetResponseDto {
return null; return null;
} }
static List<DeleteAssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<DeleteAssetResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DeleteAssetResponseDto>[]; final result = <DeleteAssetResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class DeleteAssetResponseDto {
static Map<String, List<DeleteAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<DeleteAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DeleteAssetResponseDto>>{}; final map = <String, List<DeleteAssetResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = DeleteAssetResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = DeleteAssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class DownloadFilesDto {
return null; return null;
} }
static List<DownloadFilesDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<DownloadFilesDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DownloadFilesDto>[]; final result = <DownloadFilesDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class DownloadFilesDto {
static Map<String, List<DownloadFilesDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<DownloadFilesDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DownloadFilesDto>>{}; final map = <String, List<DownloadFilesDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = DownloadFilesDto.listFromJson(entry.value, growable: growable,); map[entry.key] = DownloadFilesDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -133,7 +133,7 @@ class EditSharedLinkDto {
return null; return null;
} }
static List<EditSharedLinkDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<EditSharedLinkDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <EditSharedLinkDto>[]; final result = <EditSharedLinkDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -164,12 +164,10 @@ class EditSharedLinkDto {
static Map<String, List<EditSharedLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<EditSharedLinkDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<EditSharedLinkDto>>{}; final map = <String, List<EditSharedLinkDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = EditSharedLinkDto.listFromJson(entry.value, growable: growable,); map[entry.key] = EditSharedLinkDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -288,7 +288,7 @@ class ExifResponseDto {
return null; return null;
} }
static List<ExifResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ExifResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ExifResponseDto>[]; final result = <ExifResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -319,12 +319,10 @@ class ExifResponseDto {
static Map<String, List<ExifResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ExifResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ExifResponseDto>>{}; final map = <String, List<ExifResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ExifResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ExifResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class GetAssetByTimeBucketDto {
return null; return null;
} }
static List<GetAssetByTimeBucketDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<GetAssetByTimeBucketDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GetAssetByTimeBucketDto>[]; final result = <GetAssetByTimeBucketDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class GetAssetByTimeBucketDto {
static Map<String, List<GetAssetByTimeBucketDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<GetAssetByTimeBucketDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GetAssetByTimeBucketDto>>{}; final map = <String, List<GetAssetByTimeBucketDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = GetAssetByTimeBucketDto.listFromJson(entry.value, growable: growable,); map[entry.key] = GetAssetByTimeBucketDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class GetAssetCountByTimeBucketDto {
return null; return null;
} }
static List<GetAssetCountByTimeBucketDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<GetAssetCountByTimeBucketDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GetAssetCountByTimeBucketDto>[]; final result = <GetAssetCountByTimeBucketDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class GetAssetCountByTimeBucketDto {
static Map<String, List<GetAssetCountByTimeBucketDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<GetAssetCountByTimeBucketDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GetAssetCountByTimeBucketDto>>{}; final map = <String, List<GetAssetCountByTimeBucketDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = GetAssetCountByTimeBucketDto.listFromJson(entry.value, growable: growable,); map[entry.key] = GetAssetCountByTimeBucketDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class JobCommandDto {
return null; return null;
} }
static List<JobCommandDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<JobCommandDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <JobCommandDto>[]; final result = <JobCommandDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class JobCommandDto {
static Map<String, List<JobCommandDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<JobCommandDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<JobCommandDto>>{}; final map = <String, List<JobCommandDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = JobCommandDto.listFromJson(entry.value, growable: growable,); map[entry.key] = JobCommandDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -96,7 +96,7 @@ class JobCountsDto {
return null; return null;
} }
static List<JobCountsDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<JobCountsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <JobCountsDto>[]; final result = <JobCountsDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -127,12 +127,10 @@ class JobCountsDto {
static Map<String, List<JobCountsDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<JobCountsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<JobCountsDto>>{}; final map = <String, List<JobCountsDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = JobCountsDto.listFromJson(entry.value, growable: growable,); map[entry.key] = JobCountsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class JobStatusDto {
return null; return null;
} }
static List<JobStatusDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<JobStatusDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <JobStatusDto>[]; final result = <JobStatusDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class JobStatusDto {
static Map<String, List<JobStatusDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<JobStatusDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<JobStatusDto>>{}; final map = <String, List<JobStatusDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = JobStatusDto.listFromJson(entry.value, growable: growable,); map[entry.key] = JobStatusDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class LoginCredentialDto {
return null; return null;
} }
static List<LoginCredentialDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<LoginCredentialDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LoginCredentialDto>[]; final result = <LoginCredentialDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class LoginCredentialDto {
static Map<String, List<LoginCredentialDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<LoginCredentialDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LoginCredentialDto>>{}; final map = <String, List<LoginCredentialDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = LoginCredentialDto.listFromJson(entry.value, growable: growable,); map[entry.key] = LoginCredentialDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -110,7 +110,7 @@ class LoginResponseDto {
return null; return null;
} }
static List<LoginResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<LoginResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LoginResponseDto>[]; final result = <LoginResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -141,12 +141,10 @@ class LoginResponseDto {
static Map<String, List<LoginResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<LoginResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LoginResponseDto>>{}; final map = <String, List<LoginResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = LoginResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = LoginResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class LogoutResponseDto {
return null; return null;
} }
static List<LogoutResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<LogoutResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <LogoutResponseDto>[]; final result = <LogoutResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class LogoutResponseDto {
static Map<String, List<LogoutResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<LogoutResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<LogoutResponseDto>>{}; final map = <String, List<LogoutResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = LogoutResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = LogoutResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class OAuthCallbackDto {
return null; return null;
} }
static List<OAuthCallbackDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<OAuthCallbackDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <OAuthCallbackDto>[]; final result = <OAuthCallbackDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class OAuthCallbackDto {
static Map<String, List<OAuthCallbackDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<OAuthCallbackDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<OAuthCallbackDto>>{}; final map = <String, List<OAuthCallbackDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = OAuthCallbackDto.listFromJson(entry.value, growable: growable,); map[entry.key] = OAuthCallbackDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class OAuthConfigDto {
return null; return null;
} }
static List<OAuthConfigDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<OAuthConfigDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <OAuthConfigDto>[]; final result = <OAuthConfigDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class OAuthConfigDto {
static Map<String, List<OAuthConfigDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<OAuthConfigDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<OAuthConfigDto>>{}; final map = <String, List<OAuthConfigDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = OAuthConfigDto.listFromJson(entry.value, growable: growable,); map[entry.key] = OAuthConfigDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -119,7 +119,7 @@ class OAuthConfigResponseDto {
return null; return null;
} }
static List<OAuthConfigResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<OAuthConfigResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <OAuthConfigResponseDto>[]; final result = <OAuthConfigResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -150,12 +150,10 @@ class OAuthConfigResponseDto {
static Map<String, List<OAuthConfigResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<OAuthConfigResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<OAuthConfigResponseDto>>{}; final map = <String, List<OAuthConfigResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = OAuthConfigResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = OAuthConfigResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class QueueStatusDto {
return null; return null;
} }
static List<QueueStatusDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<QueueStatusDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <QueueStatusDto>[]; final result = <QueueStatusDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class QueueStatusDto {
static Map<String, List<QueueStatusDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<QueueStatusDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<QueueStatusDto>>{}; final map = <String, List<QueueStatusDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = QueueStatusDto.listFromJson(entry.value, growable: growable,); map[entry.key] = QueueStatusDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -63,7 +63,7 @@ class RemoveAssetsDto {
return null; return null;
} }
static List<RemoveAssetsDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<RemoveAssetsDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <RemoveAssetsDto>[]; final result = <RemoveAssetsDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -94,12 +94,10 @@ class RemoveAssetsDto {
static Map<String, List<RemoveAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<RemoveAssetsDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<RemoveAssetsDto>>{}; final map = <String, List<RemoveAssetsDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = RemoveAssetsDto.listFromJson(entry.value, growable: growable,); map[entry.key] = RemoveAssetsDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -75,14 +75,14 @@ class SearchAlbumResponseDto {
return SearchAlbumResponseDto( return SearchAlbumResponseDto(
total: mapValueOfType<int>(json, r'total')!, total: mapValueOfType<int>(json, r'total')!,
count: mapValueOfType<int>(json, r'count')!, count: mapValueOfType<int>(json, r'count')!,
items: AlbumResponseDto.listFromJson(json[r'items'])!, items: AlbumResponseDto.listFromJson(json[r'items']),
facets: SearchFacetResponseDto.listFromJson(json[r'facets'])!, facets: SearchFacetResponseDto.listFromJson(json[r'facets']),
); );
} }
return null; return null;
} }
static List<SearchAlbumResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchAlbumResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchAlbumResponseDto>[]; final result = <SearchAlbumResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class SearchAlbumResponseDto {
static Map<String, List<SearchAlbumResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchAlbumResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchAlbumResponseDto>>{}; final map = <String, List<SearchAlbumResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchAlbumResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class SearchAssetDto {
return null; return null;
} }
static List<SearchAssetDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchAssetDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchAssetDto>[]; final result = <SearchAssetDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class SearchAssetDto {
static Map<String, List<SearchAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchAssetDto>>{}; final map = <String, List<SearchAssetDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchAssetDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -75,14 +75,14 @@ class SearchAssetResponseDto {
return SearchAssetResponseDto( return SearchAssetResponseDto(
total: mapValueOfType<int>(json, r'total')!, total: mapValueOfType<int>(json, r'total')!,
count: mapValueOfType<int>(json, r'count')!, count: mapValueOfType<int>(json, r'count')!,
items: AssetResponseDto.listFromJson(json[r'items'])!, items: AssetResponseDto.listFromJson(json[r'items']),
facets: SearchFacetResponseDto.listFromJson(json[r'facets'])!, facets: SearchFacetResponseDto.listFromJson(json[r'facets']),
); );
} }
return null; return null;
} }
static List<SearchAssetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchAssetResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchAssetResponseDto>[]; final result = <SearchAssetResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class SearchAssetResponseDto {
static Map<String, List<SearchAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchAssetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchAssetResponseDto>>{}; final map = <String, List<SearchAssetResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchAssetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class SearchConfigResponseDto {
return null; return null;
} }
static List<SearchConfigResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchConfigResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchConfigResponseDto>[]; final result = <SearchConfigResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class SearchConfigResponseDto {
static Map<String, List<SearchConfigResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchConfigResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchConfigResponseDto>>{}; final map = <String, List<SearchConfigResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchConfigResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchConfigResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class SearchExploreItem {
return null; return null;
} }
static List<SearchExploreItem>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchExploreItem> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchExploreItem>[]; final result = <SearchExploreItem>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class SearchExploreItem {
static Map<String, List<SearchExploreItem>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchExploreItem>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchExploreItem>>{}; final map = <String, List<SearchExploreItem>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchExploreItem.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchExploreItem.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -62,13 +62,13 @@ class SearchExploreResponseDto {
return SearchExploreResponseDto( return SearchExploreResponseDto(
fieldName: mapValueOfType<String>(json, r'fieldName')!, fieldName: mapValueOfType<String>(json, r'fieldName')!,
items: SearchExploreItem.listFromJson(json[r'items'])!, items: SearchExploreItem.listFromJson(json[r'items']),
); );
} }
return null; return null;
} }
static List<SearchExploreResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchExploreResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchExploreResponseDto>[]; final result = <SearchExploreResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class SearchExploreResponseDto {
static Map<String, List<SearchExploreResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchExploreResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchExploreResponseDto>>{}; final map = <String, List<SearchExploreResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchExploreResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class SearchFacetCountResponseDto {
return null; return null;
} }
static List<SearchFacetCountResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchFacetCountResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchFacetCountResponseDto>[]; final result = <SearchFacetCountResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class SearchFacetCountResponseDto {
static Map<String, List<SearchFacetCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchFacetCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchFacetCountResponseDto>>{}; final map = <String, List<SearchFacetCountResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchFacetCountResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -62,13 +62,13 @@ class SearchFacetResponseDto {
return SearchFacetResponseDto( return SearchFacetResponseDto(
fieldName: mapValueOfType<String>(json, r'fieldName')!, fieldName: mapValueOfType<String>(json, r'fieldName')!,
counts: SearchFacetCountResponseDto.listFromJson(json[r'counts'])!, counts: SearchFacetCountResponseDto.listFromJson(json[r'counts']),
); );
} }
return null; return null;
} }
static List<SearchFacetResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchFacetResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchFacetResponseDto>[]; final result = <SearchFacetResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class SearchFacetResponseDto {
static Map<String, List<SearchFacetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchFacetResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchFacetResponseDto>>{}; final map = <String, List<SearchFacetResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchFacetResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -68,7 +68,7 @@ class SearchResponseDto {
return null; return null;
} }
static List<SearchResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SearchResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SearchResponseDto>[]; final result = <SearchResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -99,12 +99,10 @@ class SearchResponseDto {
static Map<String, List<SearchResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SearchResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SearchResponseDto>>{}; final map = <String, List<SearchResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SearchResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SearchResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -103,7 +103,7 @@ class ServerInfoResponseDto {
return null; return null;
} }
static List<ServerInfoResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ServerInfoResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerInfoResponseDto>[]; final result = <ServerInfoResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -134,12 +134,10 @@ class ServerInfoResponseDto {
static Map<String, List<ServerInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ServerInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerInfoResponseDto>>{}; final map = <String, List<ServerInfoResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ServerInfoResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ServerInfoResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class ServerPingResponse {
return null; return null;
} }
static List<ServerPingResponse>? listFromJson(dynamic json, {bool growable = false,}) { static List<ServerPingResponse> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerPingResponse>[]; final result = <ServerPingResponse>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class ServerPingResponse {
static Map<String, List<ServerPingResponse>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ServerPingResponse>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerPingResponse>>{}; final map = <String, List<ServerPingResponse>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ServerPingResponse.listFromJson(entry.value, growable: growable,); map[entry.key] = ServerPingResponse.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -76,13 +76,13 @@ class ServerStatsResponseDto {
photos: mapValueOfType<int>(json, r'photos')!, photos: mapValueOfType<int>(json, r'photos')!,
videos: mapValueOfType<int>(json, r'videos')!, videos: mapValueOfType<int>(json, r'videos')!,
usage: mapValueOfType<int>(json, r'usage')!, usage: mapValueOfType<int>(json, r'usage')!,
usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser'])!, usageByUser: UsageByUserDto.listFromJson(json[r'usageByUser']),
); );
} }
return null; return null;
} }
static List<ServerStatsResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ServerStatsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerStatsResponseDto>[]; final result = <ServerStatsResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class ServerStatsResponseDto {
static Map<String, List<ServerStatsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ServerStatsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerStatsResponseDto>>{}; final map = <String, List<ServerStatsResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ServerStatsResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -75,7 +75,7 @@ class ServerVersionReponseDto {
return null; return null;
} }
static List<ServerVersionReponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ServerVersionReponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ServerVersionReponseDto>[]; final result = <ServerVersionReponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -106,12 +106,10 @@ class ServerVersionReponseDto {
static Map<String, List<ServerVersionReponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ServerVersionReponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ServerVersionReponseDto>>{}; final map = <String, List<ServerVersionReponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ServerVersionReponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ServerVersionReponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -152,7 +152,7 @@ class SharedLinkResponseDto {
key: mapValueOfType<String>(json, r'key')!, key: mapValueOfType<String>(json, r'key')!,
createdAt: mapValueOfType<String>(json, r'createdAt')!, createdAt: mapValueOfType<String>(json, r'createdAt')!,
expiresAt: mapValueOfType<String>(json, r'expiresAt'), expiresAt: mapValueOfType<String>(json, r'expiresAt'),
assets: AssetResponseDto.listFromJson(json[r'assets'])!, assets: AssetResponseDto.listFromJson(json[r'assets']),
album: AlbumResponseDto.fromJson(json[r'album']), album: AlbumResponseDto.fromJson(json[r'album']),
allowUpload: mapValueOfType<bool>(json, r'allowUpload')!, allowUpload: mapValueOfType<bool>(json, r'allowUpload')!,
allowDownload: mapValueOfType<bool>(json, r'allowDownload')!, allowDownload: mapValueOfType<bool>(json, r'allowDownload')!,
@ -162,7 +162,7 @@ class SharedLinkResponseDto {
return null; return null;
} }
static List<SharedLinkResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SharedLinkResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SharedLinkResponseDto>[]; final result = <SharedLinkResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -193,12 +193,10 @@ class SharedLinkResponseDto {
static Map<String, List<SharedLinkResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SharedLinkResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SharedLinkResponseDto>>{}; final map = <String, List<SharedLinkResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SharedLinkResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -82,7 +82,7 @@ class SignUpDto {
return null; return null;
} }
static List<SignUpDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SignUpDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SignUpDto>[]; final result = <SignUpDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class SignUpDto {
static Map<String, List<SignUpDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SignUpDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SignUpDto>>{}; final map = <String, List<SignUpDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SignUpDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SignUpDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -80,7 +80,7 @@ class SmartInfoResponseDto {
return null; return null;
} }
static List<SmartInfoResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SmartInfoResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SmartInfoResponseDto>[]; final result = <SmartInfoResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -111,12 +111,10 @@ class SmartInfoResponseDto {
static Map<String, List<SmartInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SmartInfoResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SmartInfoResponseDto>>{}; final map = <String, List<SmartInfoResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SmartInfoResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SmartInfoResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -82,7 +82,7 @@ class SystemConfigDto {
return null; return null;
} }
static List<SystemConfigDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigDto>[]; final result = <SystemConfigDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -113,12 +113,10 @@ class SystemConfigDto {
static Map<String, List<SystemConfigDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigDto>>{}; final map = <String, List<SystemConfigDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -96,7 +96,7 @@ class SystemConfigFFmpegDto {
return null; return null;
} }
static List<SystemConfigFFmpegDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigFFmpegDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigFFmpegDto>[]; final result = <SystemConfigFFmpegDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -127,12 +127,10 @@ class SystemConfigFFmpegDto {
static Map<String, List<SystemConfigFFmpegDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigFFmpegDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigFFmpegDto>>{}; final map = <String, List<SystemConfigFFmpegDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -124,7 +124,7 @@ class SystemConfigOAuthDto {
return null; return null;
} }
static List<SystemConfigOAuthDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigOAuthDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigOAuthDto>[]; final result = <SystemConfigOAuthDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -155,12 +155,10 @@ class SystemConfigOAuthDto {
static Map<String, List<SystemConfigOAuthDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigOAuthDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigOAuthDto>>{}; final map = <String, List<SystemConfigOAuthDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigOAuthDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class SystemConfigPasswordLoginDto {
return null; return null;
} }
static List<SystemConfigPasswordLoginDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigPasswordLoginDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigPasswordLoginDto>[]; final result = <SystemConfigPasswordLoginDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class SystemConfigPasswordLoginDto {
static Map<String, List<SystemConfigPasswordLoginDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigPasswordLoginDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigPasswordLoginDto>>{}; final map = <String, List<SystemConfigPasswordLoginDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigPasswordLoginDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class SystemConfigStorageTemplateDto {
return null; return null;
} }
static List<SystemConfigStorageTemplateDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigStorageTemplateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigStorageTemplateDto>[]; final result = <SystemConfigStorageTemplateDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class SystemConfigStorageTemplateDto {
static Map<String, List<SystemConfigStorageTemplateDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigStorageTemplateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigStorageTemplateDto>>{}; final map = <String, List<SystemConfigStorageTemplateDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigStorageTemplateDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -117,7 +117,7 @@ class SystemConfigTemplateStorageOptionDto {
return null; return null;
} }
static List<SystemConfigTemplateStorageOptionDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<SystemConfigTemplateStorageOptionDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <SystemConfigTemplateStorageOptionDto>[]; final result = <SystemConfigTemplateStorageOptionDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -148,12 +148,10 @@ class SystemConfigTemplateStorageOptionDto {
static Map<String, List<SystemConfigTemplateStorageOptionDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<SystemConfigTemplateStorageOptionDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<SystemConfigTemplateStorageOptionDto>>{}; final map = <String, List<SystemConfigTemplateStorageOptionDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,); map[entry.key] = SystemConfigTemplateStorageOptionDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -93,7 +93,7 @@ class TagResponseDto {
return null; return null;
} }
static List<TagResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<TagResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <TagResponseDto>[]; final result = <TagResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -124,12 +124,10 @@ class TagResponseDto {
static Map<String, List<TagResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<TagResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<TagResponseDto>>{}; final map = <String, List<TagResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = TagResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = TagResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -88,7 +88,7 @@ class UpdateAlbumDto {
return null; return null;
} }
static List<UpdateAlbumDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UpdateAlbumDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateAlbumDto>[]; final result = <UpdateAlbumDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -119,12 +119,10 @@ class UpdateAlbumDto {
static Map<String, List<UpdateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UpdateAlbumDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateAlbumDto>>{}; final map = <String, List<UpdateAlbumDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UpdateAlbumDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UpdateAlbumDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -114,7 +114,7 @@ class UpdateAssetDto {
return null; return null;
} }
static List<UpdateAssetDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UpdateAssetDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateAssetDto>[]; final result = <UpdateAssetDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -145,12 +145,10 @@ class UpdateAssetDto {
static Map<String, List<UpdateAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UpdateAssetDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateAssetDto>>{}; final map = <String, List<UpdateAssetDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UpdateAssetDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UpdateAssetDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -88,7 +88,7 @@ class UpdateTagDto {
return null; return null;
} }
static List<UpdateTagDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UpdateTagDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateTagDto>[]; final result = <UpdateTagDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -119,12 +119,10 @@ class UpdateTagDto {
static Map<String, List<UpdateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UpdateTagDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateTagDto>>{}; final map = <String, List<UpdateTagDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UpdateTagDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UpdateTagDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -163,7 +163,7 @@ class UpdateUserDto {
return null; return null;
} }
static List<UpdateUserDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UpdateUserDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UpdateUserDto>[]; final result = <UpdateUserDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -194,12 +194,10 @@ class UpdateUserDto {
static Map<String, List<UpdateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UpdateUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UpdateUserDto>>{}; final map = <String, List<UpdateUserDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UpdateUserDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UpdateUserDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -96,7 +96,7 @@ class UsageByUserDto {
return null; return null;
} }
static List<UsageByUserDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UsageByUserDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UsageByUserDto>[]; final result = <UsageByUserDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -127,12 +127,10 @@ class UsageByUserDto {
static Map<String, List<UsageByUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UsageByUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UsageByUserDto>>{}; final map = <String, List<UsageByUserDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UsageByUserDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UsageByUserDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class UserCountResponseDto {
return null; return null;
} }
static List<UserCountResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UserCountResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserCountResponseDto>[]; final result = <UserCountResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class UserCountResponseDto {
static Map<String, List<UserCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UserCountResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UserCountResponseDto>>{}; final map = <String, List<UserCountResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UserCountResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UserCountResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -151,7 +151,7 @@ class UserResponseDto {
return null; return null;
} }
static List<UserResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<UserResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <UserResponseDto>[]; final result = <UserResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -182,12 +182,10 @@ class UserResponseDto {
static Map<String, List<UserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<UserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<UserResponseDto>>{}; final map = <String, List<UserResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = UserResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = UserResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -61,7 +61,7 @@ class ValidateAccessTokenResponseDto {
return null; return null;
} }
static List<ValidateAccessTokenResponseDto>? listFromJson(dynamic json, {bool growable = false,}) { static List<ValidateAccessTokenResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <ValidateAccessTokenResponseDto>[]; final result = <ValidateAccessTokenResponseDto>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -92,12 +92,10 @@ class ValidateAccessTokenResponseDto {
static Map<String, List<ValidateAccessTokenResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<ValidateAccessTokenResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<ValidateAccessTokenResponseDto>>{}; final map = <String, List<ValidateAccessTokenResponseDto>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,); map[entry.key] = ValidateAccessTokenResponseDto.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;

View File

@ -141,7 +141,7 @@ class {{{classname}}} {
{{{name}}}: json[r'{{{baseName}}}'] is List {{{name}}}: json[r'{{{baseName}}}'] is List
? (json[r'{{{baseName}}}'] as List).map((e) => ? (json[r'{{{baseName}}}'] as List).map((e) =>
{{#items.complexType}} {{#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}}
{{^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}}>() 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}}, : {{#isNullable}}null{{/isNullable}}{{^isNullable}}const []{{/isNullable}},
{{/items.isArray}} {{/items.isArray}}
{{^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}} {{/items.isArray}}
{{/isArray}} {{/isArray}}
{{^isArray}} {{^isArray}}
@ -168,7 +168,7 @@ class {{{classname}}} {
{{^items.isArray}} {{^items.isArray}}
{{#items.isMap}} {{#items.isMap}}
{{#items.complexType}} {{#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}}
{{^items.complexType}} {{^items.complexType}}
{{{name}}}: mapCastOfType<String, dynamic>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{{name}}}: mapCastOfType<String, dynamic>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
@ -176,7 +176,7 @@ class {{{classname}}} {
{{/items.isMap}} {{/items.isMap}}
{{^items.isMap}} {{^items.isMap}}
{{#items.complexType}} {{#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}}
{{^items.complexType}} {{^items.complexType}}
{{{name}}}: mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}}, {{{name}}}: mapCastOfType<String, {{items.dataType}}>(json, r'{{{baseName}}}'){{#required}}{{^isNullable}}!{{/isNullable}}{{/required}}{{^required}}{{#defaultValue}} ?? {{{.}}}{{/defaultValue}}{{/required}},
@ -197,7 +197,7 @@ class {{{classname}}} {
{{^complexType}} {{^complexType}}
{{#isArray}} {{#isArray}}
{{#isEnum}} {{#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}}
{{^isEnum}} {{^isEnum}}
{{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}} {{{name}}}: json[r'{{{baseName}}}'] is {{#uniqueItems}}Set{{/uniqueItems}}{{^uniqueItems}}List{{/uniqueItems}}
@ -234,7 +234,7 @@ class {{{classname}}} {
return null; return null;
} }
static List<{{{classname}}}>? listFromJson(dynamic json, {bool growable = false,}) { static List<{{{classname}}}> listFromJson(dynamic json, {bool growable = false,}) {
final result = <{{{classname}}}>[]; final result = <{{{classname}}}>[];
if (json is List && json.isNotEmpty) { if (json is List && json.isNotEmpty) {
for (final row in json) { for (final row in json) {
@ -265,12 +265,10 @@ class {{{classname}}} {
static Map<String, List<{{{classname}}}>> mapListFromJson(dynamic json, {bool growable = false,}) { static Map<String, List<{{{classname}}}>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<{{{classname}}}>>{}; final map = <String, List<{{{classname}}}>>{};
if (json is Map && json.isNotEmpty) { if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments // ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) { for (final entry in json.entries) {
final value = {{{classname}}}.listFromJson(entry.value, growable: growable,); map[entry.key] = {{{classname}}}.listFromJson(entry.value, growable: growable,);
if (value != null) {
map[entry.key] = value;
}
} }
} }
return map; return map;