gen client

This commit is contained in:
timonrieger
2026-05-04 17:22:50 +02:00
parent 17af4324eb
commit 49b30ea2f2
315 changed files with 4724 additions and 930 deletions
+1 -1
View File
@@ -1 +1 @@
7.8.0
7.22.0
+1 -1
View File
@@ -4,7 +4,7 @@ Immich API
This Dart package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
- API version: 2.7.5
- Generator version: 7.8.0
- Generator version: 7.22.0
- Build package: org.openapitools.codegen.languages.DartClientCodegen
## Requirements
+1 -2
View File
@@ -15,8 +15,6 @@ import 'dart:convert';
import 'dart:io';
import 'package:collection/collection.dart';
import 'package:flutter/foundation.dart';
import 'package:immich_mobile/utils/openapi_patching.dart';
import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
@@ -29,6 +27,7 @@ part 'auth/api_key_auth.dart';
part 'auth/oauth.dart';
part 'auth/http_basic_auth.dart';
part 'auth/http_bearer_auth.dart';
part 'optional.dart';
part 'api/api_keys_api.dart';
part 'api/activities_api.dart';
+3 -3
View File
@@ -143,19 +143,19 @@ class ApiClient {
);
}
Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) =>
Future<dynamic> deserializeAsync(String value, String targetType, {bool growable = false,}) async =>
// ignore: deprecated_member_use_from_same_package
deserialize(value, targetType, growable: growable);
@Deprecated('Scheduled for removal in OpenAPI Generator 6.x. Use deserializeAsync() instead.')
Future<dynamic> deserialize(String value, String targetType, {bool growable = false,}) async {
dynamic deserialize(String value, String targetType, {bool growable = false,}) {
// Remove all spaces. Necessary for regular expressions as well.
targetType = targetType.replaceAll(' ', ''); // ignore: parameter_assignments
// If the expected target type is String, nothing to do...
return targetType == 'String'
? value
: fromJson(await compute((String j) => json.decode(j), value), targetType, growable: growable);
: fromJson(json.decode(value), targetType, growable: growable);
}
// ignore: deprecated_member_use_from_same_package
+3
View File
@@ -220,6 +220,9 @@ Future<String> _decodeBodyBytes(Response response) async {
/// Returns a valid [T] value found at the specified Map [key], null otherwise.
T? mapValueOfType<T>(dynamic map, String key) {
final dynamic value = map is Map ? map[key] : null;
if (T == double && value is int) {
return value.toDouble() as T;
}
return value is T ? value : null;
}
+13 -3
View File
@@ -66,12 +66,12 @@ class ActivityCreateDto {
if (this.assetId != null) {
json[r'assetId'] = this.assetId;
} else {
// json[r'assetId'] = null;
json[r'assetId'] = null;
}
if (this.comment != null) {
json[r'comment'] = this.comment;
} else {
// json[r'comment'] = null;
json[r'comment'] = null;
}
json[r'type'] = this.type;
return json;
@@ -81,10 +81,20 @@ class ActivityCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ActivityCreateDto? fromJson(dynamic value) {
upgradeDto(value, "ActivityCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumId'), 'Required key "ActivityCreateDto[albumId]" is missing from JSON.');
assert(json[r'albumId'] != null, 'Required key "ActivityCreateDto[albumId]" has a null value in JSON.');
assert(json.containsKey(r'type'), 'Required key "ActivityCreateDto[type]" is missing from JSON.');
assert(json[r'type'] != null, 'Required key "ActivityCreateDto[type]" has a null value in JSON.');
return true;
}());
return ActivityCreateDto(
albumId: mapValueOfType<String>(json, r'albumId')!,
assetId: mapValueOfType<String>(json, r'assetId'),
+18 -3
View File
@@ -64,12 +64,12 @@ class ActivityResponseDto {
if (this.assetId != null) {
json[r'assetId'] = this.assetId;
} else {
// json[r'assetId'] = null;
json[r'assetId'] = null;
}
if (this.comment != null) {
json[r'comment'] = this.comment;
} else {
// json[r'comment'] = null;
json[r'comment'] = null;
}
json[r'createdAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')
? this.createdAt.millisecondsSinceEpoch
@@ -84,10 +84,25 @@ class ActivityResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ActivityResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ActivityResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "ActivityResponseDto[assetId]" is missing from JSON.');
assert(json.containsKey(r'createdAt'), 'Required key "ActivityResponseDto[createdAt]" is missing from JSON.');
assert(json[r'createdAt'] != null, 'Required key "ActivityResponseDto[createdAt]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "ActivityResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "ActivityResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'type'), 'Required key "ActivityResponseDto[type]" is missing from JSON.');
assert(json[r'type'] != null, 'Required key "ActivityResponseDto[type]" has a null value in JSON.');
assert(json.containsKey(r'user'), 'Required key "ActivityResponseDto[user]" is missing from JSON.');
assert(json[r'user'] != null, 'Required key "ActivityResponseDto[user]" has a null value in JSON.');
return true;
}());
return ActivityResponseDto(
assetId: mapValueOfType<String>(json, r'assetId'),
comment: mapValueOfType<String>(json, r'comment'),
@@ -54,10 +54,20 @@ class ActivityStatisticsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ActivityStatisticsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ActivityStatisticsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'comments'), 'Required key "ActivityStatisticsResponseDto[comments]" is missing from JSON.');
assert(json[r'comments'] != null, 'Required key "ActivityStatisticsResponseDto[comments]" has a null value in JSON.');
assert(json.containsKey(r'likes'), 'Required key "ActivityStatisticsResponseDto[likes]" is missing from JSON.');
assert(json[r'likes'] != null, 'Required key "ActivityStatisticsResponseDto[likes]" has a null value in JSON.');
return true;
}());
return ActivityStatisticsResponseDto(
comments: mapValueOfType<int>(json, r'comments')!,
likes: mapValueOfType<int>(json, r'likes')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AddUsersDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AddUsersDto? fromJson(dynamic value) {
upgradeDto(value, "AddUsersDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumUsers'), 'Required key "AddUsersDto[albumUsers]" is missing from JSON.');
assert(json[r'albumUsers'] != null, 'Required key "AddUsersDto[albumUsers]" has a null value in JSON.');
return true;
}());
return AddUsersDto(
albumUsers: AlbumUserAddDto.listFromJson(json[r'albumUsers']),
);
+9 -1
View File
@@ -41,10 +41,18 @@ class AdminOnboardingUpdateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AdminOnboardingUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "AdminOnboardingUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'isOnboarded'), 'Required key "AdminOnboardingUpdateDto[isOnboarded]" is missing from JSON.');
assert(json[r'isOnboarded'] != null, 'Required key "AdminOnboardingUpdateDto[isOnboarded]" has a null value in JSON.');
return true;
}());
return AdminOnboardingUpdateDto(
isOnboarded: mapValueOfType<bool>(json, r'isOnboarded')!,
);
+33 -6
View File
@@ -152,7 +152,7 @@ class AlbumResponseDto {
if (this.albumThumbnailAssetId != null) {
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
} else {
// json[r'albumThumbnailAssetId'] = null;
json[r'albumThumbnailAssetId'] = null;
}
json[r'albumUsers'] = this.albumUsers;
json[r'assetCount'] = this.assetCount;
@@ -162,7 +162,7 @@ class AlbumResponseDto {
if (this.endDate != null) {
json[r'endDate'] = this.endDate!.toUtc().toIso8601String();
} else {
// json[r'endDate'] = null;
json[r'endDate'] = null;
}
json[r'hasSharedLink'] = this.hasSharedLink;
json[r'id'] = this.id;
@@ -170,18 +170,18 @@ class AlbumResponseDto {
if (this.lastModifiedAssetTimestamp != null) {
json[r'lastModifiedAssetTimestamp'] = this.lastModifiedAssetTimestamp!.toUtc().toIso8601String();
} else {
// json[r'lastModifiedAssetTimestamp'] = null;
json[r'lastModifiedAssetTimestamp'] = null;
}
if (this.order != null) {
json[r'order'] = this.order;
} else {
// json[r'order'] = null;
json[r'order'] = null;
}
json[r'shared'] = this.shared;
if (this.startDate != null) {
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
} else {
// json[r'startDate'] = null;
json[r'startDate'] = null;
}
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
@@ -191,10 +191,37 @@ class AlbumResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumName'), 'Required key "AlbumResponseDto[albumName]" is missing from JSON.');
assert(json[r'albumName'] != null, 'Required key "AlbumResponseDto[albumName]" has a null value in JSON.');
assert(json.containsKey(r'albumThumbnailAssetId'), 'Required key "AlbumResponseDto[albumThumbnailAssetId]" is missing from JSON.');
assert(json.containsKey(r'albumUsers'), 'Required key "AlbumResponseDto[albumUsers]" is missing from JSON.');
assert(json[r'albumUsers'] != null, 'Required key "AlbumResponseDto[albumUsers]" has a null value in JSON.');
assert(json.containsKey(r'assetCount'), 'Required key "AlbumResponseDto[assetCount]" is missing from JSON.');
assert(json[r'assetCount'] != null, 'Required key "AlbumResponseDto[assetCount]" has a null value in JSON.');
assert(json.containsKey(r'createdAt'), 'Required key "AlbumResponseDto[createdAt]" is missing from JSON.');
assert(json[r'createdAt'] != null, 'Required key "AlbumResponseDto[createdAt]" has a null value in JSON.');
assert(json.containsKey(r'description'), 'Required key "AlbumResponseDto[description]" is missing from JSON.');
assert(json[r'description'] != null, 'Required key "AlbumResponseDto[description]" has a null value in JSON.');
assert(json.containsKey(r'hasSharedLink'), 'Required key "AlbumResponseDto[hasSharedLink]" is missing from JSON.');
assert(json[r'hasSharedLink'] != null, 'Required key "AlbumResponseDto[hasSharedLink]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AlbumResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AlbumResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'isActivityEnabled'), 'Required key "AlbumResponseDto[isActivityEnabled]" is missing from JSON.');
assert(json[r'isActivityEnabled'] != null, 'Required key "AlbumResponseDto[isActivityEnabled]" has a null value in JSON.');
assert(json.containsKey(r'shared'), 'Required key "AlbumResponseDto[shared]" is missing from JSON.');
assert(json[r'shared'] != null, 'Required key "AlbumResponseDto[shared]" has a null value in JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "AlbumResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "AlbumResponseDto[updatedAt]" has a null value in JSON.');
return true;
}());
return AlbumResponseDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
+13 -1
View File
@@ -64,10 +64,22 @@ class AlbumStatisticsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumStatisticsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumStatisticsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'notShared'), 'Required key "AlbumStatisticsResponseDto[notShared]" is missing from JSON.');
assert(json[r'notShared'] != null, 'Required key "AlbumStatisticsResponseDto[notShared]" has a null value in JSON.');
assert(json.containsKey(r'owned'), 'Required key "AlbumStatisticsResponseDto[owned]" is missing from JSON.');
assert(json[r'owned'] != null, 'Required key "AlbumStatisticsResponseDto[owned]" has a null value in JSON.');
assert(json.containsKey(r'shared'), 'Required key "AlbumStatisticsResponseDto[shared]" is missing from JSON.');
assert(json[r'shared'] != null, 'Required key "AlbumStatisticsResponseDto[shared]" has a null value in JSON.');
return true;
}());
return AlbumStatisticsResponseDto(
notShared: mapValueOfType<int>(json, r'notShared')!,
owned: mapValueOfType<int>(json, r'owned')!,
+10 -2
View File
@@ -47,7 +47,7 @@ class AlbumUserAddDto {
if (this.role != null) {
json[r'role'] = this.role;
} else {
// json[r'role'] = null;
json[r'role'] = null;
}
json[r'userId'] = this.userId;
return json;
@@ -57,10 +57,18 @@ class AlbumUserAddDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumUserAddDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumUserAddDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'userId'), 'Required key "AlbumUserAddDto[userId]" is missing from JSON.');
assert(json[r'userId'] != null, 'Required key "AlbumUserAddDto[userId]" has a null value in JSON.');
return true;
}());
return AlbumUserAddDto(
role: AlbumUserRole.fromJson(json[r'role']),
userId: mapValueOfType<String>(json, r'userId')!,
+11 -1
View File
@@ -47,10 +47,20 @@ class AlbumUserCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumUserCreateDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumUserCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'role'), 'Required key "AlbumUserCreateDto[role]" is missing from JSON.');
assert(json[r'role'] != null, 'Required key "AlbumUserCreateDto[role]" has a null value in JSON.');
assert(json.containsKey(r'userId'), 'Required key "AlbumUserCreateDto[userId]" is missing from JSON.');
assert(json[r'userId'] != null, 'Required key "AlbumUserCreateDto[userId]" has a null value in JSON.');
return true;
}());
return AlbumUserCreateDto(
role: AlbumUserRole.fromJson(json[r'role'])!,
userId: mapValueOfType<String>(json, r'userId')!,
+11 -1
View File
@@ -46,10 +46,20 @@ class AlbumUserResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumUserResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumUserResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'role'), 'Required key "AlbumUserResponseDto[role]" is missing from JSON.');
assert(json[r'role'] != null, 'Required key "AlbumUserResponseDto[role]" has a null value in JSON.');
assert(json.containsKey(r'user'), 'Required key "AlbumUserResponseDto[user]" is missing from JSON.');
assert(json[r'user'] != null, 'Required key "AlbumUserResponseDto[user]" has a null value in JSON.');
return true;
}());
return AlbumUserResponseDto(
role: AlbumUserRole.fromJson(json[r'role'])!,
user: UserResponseDto.fromJson(json[r'user'])!,
+11 -1
View File
@@ -48,10 +48,20 @@ class AlbumsAddAssetsDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumsAddAssetsDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumsAddAssetsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumIds'), 'Required key "AlbumsAddAssetsDto[albumIds]" is missing from JSON.');
assert(json[r'albumIds'] != null, 'Required key "AlbumsAddAssetsDto[albumIds]" has a null value in JSON.');
assert(json.containsKey(r'assetIds'), 'Required key "AlbumsAddAssetsDto[assetIds]" is missing from JSON.');
assert(json[r'assetIds'] != null, 'Required key "AlbumsAddAssetsDto[assetIds]" has a null value in JSON.');
return true;
}());
return AlbumsAddAssetsDto(
albumIds: json[r'albumIds'] is Iterable
? (json[r'albumIds'] as Iterable).cast<String>().toList(growable: false)
+10 -2
View File
@@ -47,7 +47,7 @@ class AlbumsAddAssetsResponseDto {
if (this.error != null) {
json[r'error'] = this.error;
} else {
// json[r'error'] = null;
json[r'error'] = null;
}
json[r'success'] = this.success;
return json;
@@ -57,10 +57,18 @@ class AlbumsAddAssetsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumsAddAssetsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumsAddAssetsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'success'), 'Required key "AlbumsAddAssetsResponseDto[success]" is missing from JSON.');
assert(json[r'success'] != null, 'Required key "AlbumsAddAssetsResponseDto[success]" has a null value in JSON.');
return true;
}());
return AlbumsAddAssetsResponseDto(
error: BulkIdErrorReason.fromJson(json[r'error']),
success: mapValueOfType<bool>(json, r'success')!,
+9 -1
View File
@@ -40,10 +40,18 @@ class AlbumsResponse {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumsResponse? fromJson(dynamic value) {
upgradeDto(value, "AlbumsResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'defaultAssetOrder'), 'Required key "AlbumsResponse[defaultAssetOrder]" is missing from JSON.');
assert(json[r'defaultAssetOrder'] != null, 'Required key "AlbumsResponse[defaultAssetOrder]" has a null value in JSON.');
return true;
}());
return AlbumsResponse(
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder'])!,
);
+8 -2
View File
@@ -41,7 +41,7 @@ class AlbumsUpdate {
if (this.defaultAssetOrder != null) {
json[r'defaultAssetOrder'] = this.defaultAssetOrder;
} else {
// json[r'defaultAssetOrder'] = null;
json[r'defaultAssetOrder'] = null;
}
return json;
}
@@ -50,10 +50,16 @@ class AlbumsUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumsUpdate? fromJson(dynamic value) {
upgradeDto(value, "AlbumsUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return AlbumsUpdate(
defaultAssetOrder: AssetOrder.fromJson(json[r'defaultAssetOrder']),
);
+10 -2
View File
@@ -48,7 +48,7 @@ class ApiKeyCreateDto {
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
json[r'name'] = null;
}
json[r'permissions'] = this.permissions;
return json;
@@ -58,10 +58,18 @@ class ApiKeyCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ApiKeyCreateDto? fromJson(dynamic value) {
upgradeDto(value, "ApiKeyCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'permissions'), 'Required key "ApiKeyCreateDto[permissions]" is missing from JSON.');
assert(json[r'permissions'] != null, 'Required key "ApiKeyCreateDto[permissions]" has a null value in JSON.');
return true;
}());
return ApiKeyCreateDto(
name: mapValueOfType<String>(json, r'name'),
permissions: Permission.listFromJson(json[r'permissions']),
+11 -1
View File
@@ -47,10 +47,20 @@ class ApiKeyCreateResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ApiKeyCreateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ApiKeyCreateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'apiKey'), 'Required key "ApiKeyCreateResponseDto[apiKey]" is missing from JSON.');
assert(json[r'apiKey'] != null, 'Required key "ApiKeyCreateResponseDto[apiKey]" has a null value in JSON.');
assert(json.containsKey(r'secret'), 'Required key "ApiKeyCreateResponseDto[secret]" is missing from JSON.');
assert(json[r'secret'] != null, 'Required key "ApiKeyCreateResponseDto[secret]" has a null value in JSON.');
return true;
}());
return ApiKeyCreateResponseDto(
apiKey: ApiKeyResponseDto.fromJson(json[r'apiKey'])!,
secret: mapValueOfType<String>(json, r'secret')!,
+17 -1
View File
@@ -73,10 +73,26 @@ class ApiKeyResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ApiKeyResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ApiKeyResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'createdAt'), 'Required key "ApiKeyResponseDto[createdAt]" is missing from JSON.');
assert(json[r'createdAt'] != null, 'Required key "ApiKeyResponseDto[createdAt]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "ApiKeyResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "ApiKeyResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'name'), 'Required key "ApiKeyResponseDto[name]" is missing from JSON.');
assert(json[r'name'] != null, 'Required key "ApiKeyResponseDto[name]" has a null value in JSON.');
assert(json.containsKey(r'permissions'), 'Required key "ApiKeyResponseDto[permissions]" is missing from JSON.');
assert(json[r'permissions'] != null, 'Required key "ApiKeyResponseDto[permissions]" has a null value in JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "ApiKeyResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "ApiKeyResponseDto[updatedAt]" has a null value in JSON.');
return true;
}());
return ApiKeyResponseDto(
createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
id: mapValueOfType<String>(json, r'id')!,
+8 -2
View File
@@ -48,7 +48,7 @@ class ApiKeyUpdateDto {
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
json[r'name'] = null;
}
json[r'permissions'] = this.permissions;
return json;
@@ -58,10 +58,16 @@ class ApiKeyUpdateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ApiKeyUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "ApiKeyUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return ApiKeyUpdateDto(
name: mapValueOfType<String>(json, r'name'),
permissions: Permission.listFromJson(json[r'permissions']),
+10 -2
View File
@@ -48,7 +48,7 @@ class AssetBulkDeleteDto {
if (this.force != null) {
json[r'force'] = this.force;
} else {
// json[r'force'] = null;
json[r'force'] = null;
}
json[r'ids'] = this.ids;
return json;
@@ -58,10 +58,18 @@ class AssetBulkDeleteDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkDeleteDto? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkDeleteDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'ids'), 'Required key "AssetBulkDeleteDto[ids]" is missing from JSON.');
assert(json[r'ids'] != null, 'Required key "AssetBulkDeleteDto[ids]" has a null value in JSON.');
return true;
}());
return AssetBulkDeleteDto(
force: mapValueOfType<bool>(json, r'force'),
ids: json[r'ids'] is Iterable
+19 -11
View File
@@ -155,53 +155,53 @@ class AssetBulkUpdateDto {
if (this.dateTimeOriginal != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal;
} else {
// json[r'dateTimeOriginal'] = null;
json[r'dateTimeOriginal'] = null;
}
if (this.dateTimeRelative != null) {
json[r'dateTimeRelative'] = this.dateTimeRelative;
} else {
// json[r'dateTimeRelative'] = null;
json[r'dateTimeRelative'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
json[r'description'] = null;
}
if (this.duplicateId != null) {
json[r'duplicateId'] = this.duplicateId;
} else {
// json[r'duplicateId'] = null;
json[r'duplicateId'] = null;
}
json[r'ids'] = this.ids;
if (this.isFavorite != null) {
json[r'isFavorite'] = this.isFavorite;
} else {
// json[r'isFavorite'] = null;
json[r'isFavorite'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
// json[r'latitude'] = null;
json[r'latitude'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
// json[r'longitude'] = null;
json[r'longitude'] = null;
}
if (this.rating != null) {
json[r'rating'] = this.rating;
} else {
// json[r'rating'] = null;
json[r'rating'] = null;
}
if (this.timeZone != null) {
json[r'timeZone'] = this.timeZone;
} else {
// json[r'timeZone'] = null;
json[r'timeZone'] = null;
}
if (this.visibility != null) {
json[r'visibility'] = this.visibility;
} else {
// json[r'visibility'] = null;
json[r'visibility'] = null;
}
return json;
}
@@ -210,10 +210,18 @@ class AssetBulkUpdateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'ids'), 'Required key "AssetBulkUpdateDto[ids]" is missing from JSON.');
assert(json[r'ids'] != null, 'Required key "AssetBulkUpdateDto[ids]" has a null value in JSON.');
return true;
}());
return AssetBulkUpdateDto(
dateTimeOriginal: mapValueOfType<String>(json, r'dateTimeOriginal'),
dateTimeRelative: mapValueOfType<int>(json, r'dateTimeRelative'),
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetBulkUploadCheckDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkUploadCheckDto? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkUploadCheckDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assets'), 'Required key "AssetBulkUploadCheckDto[assets]" is missing from JSON.');
assert(json[r'assets'] != null, 'Required key "AssetBulkUploadCheckDto[assets]" has a null value in JSON.');
return true;
}());
return AssetBulkUploadCheckDto(
assets: AssetBulkUploadCheckItem.listFromJson(json[r'assets']),
);
+11 -1
View File
@@ -48,10 +48,20 @@ class AssetBulkUploadCheckItem {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkUploadCheckItem? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkUploadCheckItem");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'checksum'), 'Required key "AssetBulkUploadCheckItem[checksum]" is missing from JSON.');
assert(json[r'checksum'] != null, 'Required key "AssetBulkUploadCheckItem[checksum]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetBulkUploadCheckItem[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetBulkUploadCheckItem[id]" has a null value in JSON.');
return true;
}());
return AssetBulkUploadCheckItem(
checksum: mapValueOfType<String>(json, r'checksum')!,
id: mapValueOfType<String>(json, r'id')!,
@@ -41,10 +41,18 @@ class AssetBulkUploadCheckResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkUploadCheckResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkUploadCheckResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'results'), 'Required key "AssetBulkUploadCheckResponseDto[results]" is missing from JSON.');
assert(json[r'results'] != null, 'Required key "AssetBulkUploadCheckResponseDto[results]" has a null value in JSON.');
return true;
}());
return AssetBulkUploadCheckResponseDto(
results: AssetBulkUploadCheckResult.listFromJson(json[r'results']),
);
+14 -4
View File
@@ -77,18 +77,18 @@ class AssetBulkUploadCheckResult {
if (this.assetId != null) {
json[r'assetId'] = this.assetId;
} else {
// json[r'assetId'] = null;
json[r'assetId'] = null;
}
json[r'id'] = this.id;
if (this.isTrashed != null) {
json[r'isTrashed'] = this.isTrashed;
} else {
// json[r'isTrashed'] = null;
json[r'isTrashed'] = null;
}
if (this.reason != null) {
json[r'reason'] = this.reason;
} else {
// json[r'reason'] = null;
json[r'reason'] = null;
}
return json;
}
@@ -97,10 +97,20 @@ class AssetBulkUploadCheckResult {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetBulkUploadCheckResult? fromJson(dynamic value) {
upgradeDto(value, "AssetBulkUploadCheckResult");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'action'), 'Required key "AssetBulkUploadCheckResult[action]" is missing from JSON.');
assert(json[r'action'] != null, 'Required key "AssetBulkUploadCheckResult[action]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetBulkUploadCheckResult[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetBulkUploadCheckResult[id]" has a null value in JSON.');
return true;
}());
return AssetBulkUploadCheckResult(
action: AssetUploadAction.fromJson(json[r'action'])!,
assetId: mapValueOfType<String>(json, r'assetId'),
+11 -1
View File
@@ -83,10 +83,20 @@ class AssetCopyDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetCopyDto? fromJson(dynamic value) {
upgradeDto(value, "AssetCopyDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'sourceId'), 'Required key "AssetCopyDto[sourceId]" is missing from JSON.');
assert(json[r'sourceId'] != null, 'Required key "AssetCopyDto[sourceId]" has a null value in JSON.');
assert(json.containsKey(r'targetId'), 'Required key "AssetCopyDto[targetId]" is missing from JSON.');
assert(json[r'targetId'] != null, 'Required key "AssetCopyDto[targetId]" has a null value in JSON.');
return true;
}());
return AssetCopyDto(
albums: mapValueOfType<bool>(json, r'albums') ?? true,
favorite: mapValueOfType<bool>(json, r'favorite') ?? true,
+11 -1
View File
@@ -46,10 +46,20 @@ class AssetEditActionItemDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'action'), 'Required key "AssetEditActionItemDto[action]" is missing from JSON.');
assert(json[r'action'] != null, 'Required key "AssetEditActionItemDto[action]" has a null value in JSON.');
assert(json.containsKey(r'parameters'), 'Required key "AssetEditActionItemDto[parameters]" is missing from JSON.');
assert(json[r'parameters'] != null, 'Required key "AssetEditActionItemDto[parameters]" has a null value in JSON.');
return true;
}());
return AssetEditActionItemDto(
action: AssetEditAction.fromJson(json[r'action'])!,
parameters: json[r'parameters'],
@@ -87,10 +87,28 @@ class AssetEditActionItemDtoParameters {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemDtoParameters? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemDtoParameters");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'height'), 'Required key "AssetEditActionItemDtoParameters[height]" is missing from JSON.');
assert(json[r'height'] != null, 'Required key "AssetEditActionItemDtoParameters[height]" has a null value in JSON.');
assert(json.containsKey(r'width'), 'Required key "AssetEditActionItemDtoParameters[width]" is missing from JSON.');
assert(json[r'width'] != null, 'Required key "AssetEditActionItemDtoParameters[width]" has a null value in JSON.');
assert(json.containsKey(r'x'), 'Required key "AssetEditActionItemDtoParameters[x]" is missing from JSON.');
assert(json[r'x'] != null, 'Required key "AssetEditActionItemDtoParameters[x]" has a null value in JSON.');
assert(json.containsKey(r'y'), 'Required key "AssetEditActionItemDtoParameters[y]" is missing from JSON.');
assert(json[r'y'] != null, 'Required key "AssetEditActionItemDtoParameters[y]" has a null value in JSON.');
assert(json.containsKey(r'angle'), 'Required key "AssetEditActionItemDtoParameters[angle]" is missing from JSON.');
assert(json[r'angle'] != null, 'Required key "AssetEditActionItemDtoParameters[angle]" has a null value in JSON.');
assert(json.containsKey(r'axis'), 'Required key "AssetEditActionItemDtoParameters[axis]" is missing from JSON.');
assert(json[r'axis'] != null, 'Required key "AssetEditActionItemDtoParameters[axis]" has a null value in JSON.');
return true;
}());
return AssetEditActionItemDtoParameters(
height: mapValueOfType<int>(json, r'height')!,
width: mapValueOfType<int>(json, r'width')!,
@@ -53,10 +53,22 @@ class AssetEditActionItemResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditActionItemResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditActionItemResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'action'), 'Required key "AssetEditActionItemResponseDto[action]" is missing from JSON.');
assert(json[r'action'] != null, 'Required key "AssetEditActionItemResponseDto[action]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetEditActionItemResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetEditActionItemResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'parameters'), 'Required key "AssetEditActionItemResponseDto[parameters]" is missing from JSON.');
assert(json[r'parameters'] != null, 'Required key "AssetEditActionItemResponseDto[parameters]" has a null value in JSON.');
return true;
}());
return AssetEditActionItemResponseDto(
action: AssetEditAction.fromJson(json[r'action'])!,
id: mapValueOfType<String>(json, r'id')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetEditsCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditsCreateDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditsCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'edits'), 'Required key "AssetEditsCreateDto[edits]" is missing from JSON.');
assert(json[r'edits'] != null, 'Required key "AssetEditsCreateDto[edits]" has a null value in JSON.');
return true;
}());
return AssetEditsCreateDto(
edits: AssetEditActionItemDto.listFromJson(json[r'edits']),
);
+11 -1
View File
@@ -48,10 +48,20 @@ class AssetEditsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetEditsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetEditsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetEditsResponseDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetEditsResponseDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'edits'), 'Required key "AssetEditsResponseDto[edits]" is missing from JSON.');
assert(json[r'edits'] != null, 'Required key "AssetEditsResponseDto[edits]" has a null value in JSON.');
return true;
}());
return AssetEditsResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']),
+23 -1
View File
@@ -108,10 +108,32 @@ class AssetFaceCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceCreateDto? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetFaceCreateDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetFaceCreateDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'height'), 'Required key "AssetFaceCreateDto[height]" is missing from JSON.');
assert(json[r'height'] != null, 'Required key "AssetFaceCreateDto[height]" has a null value in JSON.');
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceCreateDto[imageHeight]" is missing from JSON.');
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceCreateDto[imageHeight]" has a null value in JSON.');
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceCreateDto[imageWidth]" is missing from JSON.');
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceCreateDto[imageWidth]" has a null value in JSON.');
assert(json.containsKey(r'personId'), 'Required key "AssetFaceCreateDto[personId]" is missing from JSON.');
assert(json[r'personId'] != null, 'Required key "AssetFaceCreateDto[personId]" has a null value in JSON.');
assert(json.containsKey(r'width'), 'Required key "AssetFaceCreateDto[width]" is missing from JSON.');
assert(json[r'width'] != null, 'Required key "AssetFaceCreateDto[width]" has a null value in JSON.');
assert(json.containsKey(r'x'), 'Required key "AssetFaceCreateDto[x]" is missing from JSON.');
assert(json[r'x'] != null, 'Required key "AssetFaceCreateDto[x]" has a null value in JSON.');
assert(json.containsKey(r'y'), 'Required key "AssetFaceCreateDto[y]" is missing from JSON.');
assert(json[r'y'] != null, 'Required key "AssetFaceCreateDto[y]" has a null value in JSON.');
return true;
}());
return AssetFaceCreateDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
height: mapValueOfType<int>(json, r'height')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetFaceDeleteDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceDeleteDto? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceDeleteDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'force'), 'Required key "AssetFaceDeleteDto[force]" is missing from JSON.');
assert(json[r'force'] != null, 'Required key "AssetFaceDeleteDto[force]" has a null value in JSON.');
return true;
}());
return AssetFaceDeleteDto(
force: mapValueOfType<bool>(json, r'force')!,
);
+24 -3
View File
@@ -113,12 +113,12 @@ class AssetFaceResponseDto {
if (this.person != null) {
json[r'person'] = this.person;
} else {
// json[r'person'] = null;
json[r'person'] = null;
}
if (this.sourceType != null) {
json[r'sourceType'] = this.sourceType;
} else {
// json[r'sourceType'] = null;
json[r'sourceType'] = null;
}
return json;
}
@@ -127,10 +127,31 @@ class AssetFaceResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'boundingBoxX1'), 'Required key "AssetFaceResponseDto[boundingBoxX1]" is missing from JSON.');
assert(json[r'boundingBoxX1'] != null, 'Required key "AssetFaceResponseDto[boundingBoxX1]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxX2'), 'Required key "AssetFaceResponseDto[boundingBoxX2]" is missing from JSON.');
assert(json[r'boundingBoxX2'] != null, 'Required key "AssetFaceResponseDto[boundingBoxX2]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxY1'), 'Required key "AssetFaceResponseDto[boundingBoxY1]" is missing from JSON.');
assert(json[r'boundingBoxY1'] != null, 'Required key "AssetFaceResponseDto[boundingBoxY1]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxY2'), 'Required key "AssetFaceResponseDto[boundingBoxY2]" is missing from JSON.');
assert(json[r'boundingBoxY2'] != null, 'Required key "AssetFaceResponseDto[boundingBoxY2]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetFaceResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetFaceResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceResponseDto[imageHeight]" is missing from JSON.');
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceResponseDto[imageHeight]" has a null value in JSON.');
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceResponseDto[imageWidth]" is missing from JSON.');
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceResponseDto[imageWidth]" has a null value in JSON.');
assert(json.containsKey(r'person'), 'Required key "AssetFaceResponseDto[person]" is missing from JSON.');
return true;
}());
return AssetFaceResponseDto(
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetFaceUpdateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'data'), 'Required key "AssetFaceUpdateDto[data]" is missing from JSON.');
assert(json[r'data'] != null, 'Required key "AssetFaceUpdateDto[data]" has a null value in JSON.');
return true;
}());
return AssetFaceUpdateDto(
data: AssetFaceUpdateItem.listFromJson(json[r'data']),
);
+11 -1
View File
@@ -48,10 +48,20 @@ class AssetFaceUpdateItem {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceUpdateItem? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceUpdateItem");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetFaceUpdateItem[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetFaceUpdateItem[assetId]" has a null value in JSON.');
assert(json.containsKey(r'personId'), 'Required key "AssetFaceUpdateItem[personId]" is missing from JSON.');
assert(json[r'personId'] != null, 'Required key "AssetFaceUpdateItem[personId]" has a null value in JSON.');
return true;
}());
return AssetFaceUpdateItem(
assetId: mapValueOfType<String>(json, r'assetId')!,
personId: mapValueOfType<String>(json, r'personId')!,
@@ -108,7 +108,7 @@ class AssetFaceWithoutPersonResponseDto {
if (this.sourceType != null) {
json[r'sourceType'] = this.sourceType;
} else {
// json[r'sourceType'] = null;
json[r'sourceType'] = null;
}
return json;
}
@@ -117,10 +117,30 @@ class AssetFaceWithoutPersonResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetFaceWithoutPersonResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetFaceWithoutPersonResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'boundingBoxX1'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX1]" is missing from JSON.');
assert(json[r'boundingBoxX1'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX1]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxX2'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX2]" is missing from JSON.');
assert(json[r'boundingBoxX2'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxX2]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxY1'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY1]" is missing from JSON.');
assert(json[r'boundingBoxY1'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY1]" has a null value in JSON.');
assert(json.containsKey(r'boundingBoxY2'), 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY2]" is missing from JSON.');
assert(json[r'boundingBoxY2'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[boundingBoxY2]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetFaceWithoutPersonResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'imageHeight'), 'Required key "AssetFaceWithoutPersonResponseDto[imageHeight]" is missing from JSON.');
assert(json[r'imageHeight'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[imageHeight]" has a null value in JSON.');
assert(json.containsKey(r'imageWidth'), 'Required key "AssetFaceWithoutPersonResponseDto[imageWidth]" is missing from JSON.');
assert(json[r'imageWidth'] != null, 'Required key "AssetFaceWithoutPersonResponseDto[imageWidth]" has a null value in JSON.');
return true;
}());
return AssetFaceWithoutPersonResponseDto(
boundingBoxX1: mapValueOfType<int>(json, r'boundingBoxX1')!,
boundingBoxX2: mapValueOfType<int>(json, r'boundingBoxX2')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetIdsDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetIdsDto? fromJson(dynamic value) {
upgradeDto(value, "AssetIdsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetIds'), 'Required key "AssetIdsDto[assetIds]" is missing from JSON.');
assert(json[r'assetIds'] != null, 'Required key "AssetIdsDto[assetIds]" has a null value in JSON.');
return true;
}());
return AssetIdsDto(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
+12 -2
View File
@@ -54,7 +54,7 @@ class AssetIdsResponseDto {
if (this.error != null) {
json[r'error'] = this.error;
} else {
// json[r'error'] = null;
json[r'error'] = null;
}
json[r'success'] = this.success;
return json;
@@ -64,10 +64,20 @@ class AssetIdsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetIdsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetIdsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetIdsResponseDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetIdsResponseDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'success'), 'Required key "AssetIdsResponseDto[success]" is missing from JSON.');
assert(json[r'success'] != null, 'Required key "AssetIdsResponseDto[success]" has a null value in JSON.');
return true;
}());
return AssetIdsResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
error: AssetIdErrorReason.fromJson(json[r'error']),
+11 -1
View File
@@ -47,10 +47,20 @@ class AssetJobsDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetJobsDto? fromJson(dynamic value) {
upgradeDto(value, "AssetJobsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetIds'), 'Required key "AssetJobsDto[assetIds]" is missing from JSON.');
assert(json[r'assetIds'] != null, 'Required key "AssetJobsDto[assetIds]" has a null value in JSON.');
assert(json.containsKey(r'name'), 'Required key "AssetJobsDto[name]" is missing from JSON.');
assert(json[r'name'] != null, 'Required key "AssetJobsDto[name]" has a null value in JSON.');
return true;
}());
return AssetJobsDto(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
+11 -1
View File
@@ -47,10 +47,20 @@ class AssetMediaResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMediaResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMediaResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'id'), 'Required key "AssetMediaResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetMediaResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'status'), 'Required key "AssetMediaResponseDto[status]" is missing from JSON.');
assert(json[r'status'] != null, 'Required key "AssetMediaResponseDto[status]" has a null value in JSON.');
return true;
}());
return AssetMediaResponseDto(
id: mapValueOfType<String>(json, r'id')!,
status: AssetMediaStatus.fromJson(json[r'status'])!,
@@ -41,10 +41,18 @@ class AssetMetadataBulkDeleteDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkDeleteDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkDeleteDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'items'), 'Required key "AssetMetadataBulkDeleteDto[items]" is missing from JSON.');
assert(json[r'items'] != null, 'Required key "AssetMetadataBulkDeleteDto[items]" has a null value in JSON.');
return true;
}());
return AssetMetadataBulkDeleteDto(
items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']),
);
@@ -48,10 +48,20 @@ class AssetMetadataBulkDeleteItemDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkDeleteItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkDeleteItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkDeleteItemDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkDeleteItemDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkDeleteItemDto[key]" is missing from JSON.');
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkDeleteItemDto[key]" has a null value in JSON.');
return true;
}());
return AssetMetadataBulkDeleteItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
@@ -64,10 +64,24 @@ class AssetMetadataBulkResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkResponseDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkResponseDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkResponseDto[key]" is missing from JSON.');
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkResponseDto[key]" has a null value in JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "AssetMetadataBulkResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "AssetMetadataBulkResponseDto[updatedAt]" has a null value in JSON.');
assert(json.containsKey(r'value'), 'Required key "AssetMetadataBulkResponseDto[value]" is missing from JSON.');
assert(json[r'value'] != null, 'Required key "AssetMetadataBulkResponseDto[value]" has a null value in JSON.');
return true;
}());
return AssetMetadataBulkResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
@@ -41,10 +41,18 @@ class AssetMetadataBulkUpsertDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkUpsertDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkUpsertDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'items'), 'Required key "AssetMetadataBulkUpsertDto[items]" is missing from JSON.');
assert(json[r'items'] != null, 'Required key "AssetMetadataBulkUpsertDto[items]" has a null value in JSON.');
return true;
}());
return AssetMetadataBulkUpsertDto(
items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']),
);
@@ -55,10 +55,22 @@ class AssetMetadataBulkUpsertItemDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataBulkUpsertItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataBulkUpsertItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetMetadataBulkUpsertItemDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'key'), 'Required key "AssetMetadataBulkUpsertItemDto[key]" is missing from JSON.');
assert(json[r'key'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[key]" has a null value in JSON.');
assert(json.containsKey(r'value'), 'Required key "AssetMetadataBulkUpsertItemDto[value]" is missing from JSON.');
assert(json[r'value'] != null, 'Required key "AssetMetadataBulkUpsertItemDto[value]" has a null value in JSON.');
return true;
}());
return AssetMetadataBulkUpsertItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
+13 -1
View File
@@ -57,10 +57,22 @@ class AssetMetadataResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'key'), 'Required key "AssetMetadataResponseDto[key]" is missing from JSON.');
assert(json[r'key'] != null, 'Required key "AssetMetadataResponseDto[key]" has a null value in JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "AssetMetadataResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "AssetMetadataResponseDto[updatedAt]" has a null value in JSON.');
assert(json.containsKey(r'value'), 'Required key "AssetMetadataResponseDto[value]" is missing from JSON.');
assert(json[r'value'] != null, 'Required key "AssetMetadataResponseDto[value]" has a null value in JSON.');
return true;
}());
return AssetMetadataResponseDto(
key: mapValueOfType<String>(json, r'key')!,
updatedAt: mapDateTime(json, r'updatedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class AssetMetadataUpsertDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataUpsertDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataUpsertDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'items'), 'Required key "AssetMetadataUpsertDto[items]" is missing from JSON.');
assert(json[r'items'] != null, 'Required key "AssetMetadataUpsertDto[items]" has a null value in JSON.');
return true;
}());
return AssetMetadataUpsertDto(
items: AssetMetadataUpsertItemDto.listFromJson(json[r'items']),
);
+11 -1
View File
@@ -48,10 +48,20 @@ class AssetMetadataUpsertItemDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetMetadataUpsertItemDto? fromJson(dynamic value) {
upgradeDto(value, "AssetMetadataUpsertItemDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'key'), 'Required key "AssetMetadataUpsertItemDto[key]" is missing from JSON.');
assert(json[r'key'] != null, 'Required key "AssetMetadataUpsertItemDto[key]" has a null value in JSON.');
assert(json.containsKey(r'value'), 'Required key "AssetMetadataUpsertItemDto[value]" is missing from JSON.');
assert(json[r'value'] != null, 'Required key "AssetMetadataUpsertItemDto[value]" has a null value in JSON.');
return true;
}());
return AssetMetadataUpsertItemDto(
key: mapValueOfType<String>(json, r'key')!,
value: mapCastOfType<String, Object>(json, r'value')!,
+43 -11
View File
@@ -123,24 +123,56 @@ class AssetOcrResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetOcrResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetOcrResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetId'), 'Required key "AssetOcrResponseDto[assetId]" is missing from JSON.');
assert(json[r'assetId'] != null, 'Required key "AssetOcrResponseDto[assetId]" has a null value in JSON.');
assert(json.containsKey(r'boxScore'), 'Required key "AssetOcrResponseDto[boxScore]" is missing from JSON.');
assert(json[r'boxScore'] != null, 'Required key "AssetOcrResponseDto[boxScore]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetOcrResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetOcrResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'text'), 'Required key "AssetOcrResponseDto[text]" is missing from JSON.');
assert(json[r'text'] != null, 'Required key "AssetOcrResponseDto[text]" has a null value in JSON.');
assert(json.containsKey(r'textScore'), 'Required key "AssetOcrResponseDto[textScore]" is missing from JSON.');
assert(json[r'textScore'] != null, 'Required key "AssetOcrResponseDto[textScore]" has a null value in JSON.');
assert(json.containsKey(r'x1'), 'Required key "AssetOcrResponseDto[x1]" is missing from JSON.');
assert(json[r'x1'] != null, 'Required key "AssetOcrResponseDto[x1]" has a null value in JSON.');
assert(json.containsKey(r'x2'), 'Required key "AssetOcrResponseDto[x2]" is missing from JSON.');
assert(json[r'x2'] != null, 'Required key "AssetOcrResponseDto[x2]" has a null value in JSON.');
assert(json.containsKey(r'x3'), 'Required key "AssetOcrResponseDto[x3]" is missing from JSON.');
assert(json[r'x3'] != null, 'Required key "AssetOcrResponseDto[x3]" has a null value in JSON.');
assert(json.containsKey(r'x4'), 'Required key "AssetOcrResponseDto[x4]" is missing from JSON.');
assert(json[r'x4'] != null, 'Required key "AssetOcrResponseDto[x4]" has a null value in JSON.');
assert(json.containsKey(r'y1'), 'Required key "AssetOcrResponseDto[y1]" is missing from JSON.');
assert(json[r'y1'] != null, 'Required key "AssetOcrResponseDto[y1]" has a null value in JSON.');
assert(json.containsKey(r'y2'), 'Required key "AssetOcrResponseDto[y2]" is missing from JSON.');
assert(json[r'y2'] != null, 'Required key "AssetOcrResponseDto[y2]" has a null value in JSON.');
assert(json.containsKey(r'y3'), 'Required key "AssetOcrResponseDto[y3]" is missing from JSON.');
assert(json[r'y3'] != null, 'Required key "AssetOcrResponseDto[y3]" has a null value in JSON.');
assert(json.containsKey(r'y4'), 'Required key "AssetOcrResponseDto[y4]" is missing from JSON.');
assert(json[r'y4'] != null, 'Required key "AssetOcrResponseDto[y4]" has a null value in JSON.');
return true;
}());
return AssetOcrResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
boxScore: (mapValueOfType<num>(json, r'boxScore')!).toDouble(),
boxScore: mapValueOfType<double>(json, r'boxScore')!,
id: mapValueOfType<String>(json, r'id')!,
text: mapValueOfType<String>(json, r'text')!,
textScore: (mapValueOfType<num>(json, r'textScore')!).toDouble(),
x1: (mapValueOfType<num>(json, r'x1')!).toDouble(),
x2: (mapValueOfType<num>(json, r'x2')!).toDouble(),
x3: (mapValueOfType<num>(json, r'x3')!).toDouble(),
x4: (mapValueOfType<num>(json, r'x4')!).toDouble(),
y1: (mapValueOfType<num>(json, r'y1')!).toDouble(),
y2: (mapValueOfType<num>(json, r'y2')!).toDouble(),
y3: (mapValueOfType<num>(json, r'y3')!).toDouble(),
y4: (mapValueOfType<num>(json, r'y4')!).toDouble(),
textScore: mapValueOfType<double>(json, r'textScore')!,
x1: mapValueOfType<double>(json, r'x1')!,
x2: mapValueOfType<double>(json, r'x2')!,
x3: mapValueOfType<double>(json, r'x3')!,
x4: mapValueOfType<double>(json, r'x4')!,
y1: mapValueOfType<double>(json, r'y1')!,
y2: mapValueOfType<double>(json, r'y2')!,
y3: mapValueOfType<double>(json, r'y3')!,
y4: mapValueOfType<double>(json, r'y4')!,
);
}
return null;
+59 -13
View File
@@ -255,17 +255,17 @@ class AssetResponseDto {
if (this.duplicateId != null) {
json[r'duplicateId'] = this.duplicateId;
} else {
// json[r'duplicateId'] = null;
json[r'duplicateId'] = null;
}
if (this.duration != null) {
json[r'duration'] = this.duration;
} else {
// json[r'duration'] = null;
json[r'duration'] = null;
}
if (this.exifInfo != null) {
json[r'exifInfo'] = this.exifInfo;
} else {
// json[r'exifInfo'] = null;
json[r'exifInfo'] = null;
}
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
@@ -273,7 +273,7 @@ class AssetResponseDto {
if (this.height != null) {
json[r'height'] = this.height;
} else {
// json[r'height'] = null;
json[r'height'] = null;
}
json[r'id'] = this.id;
json[r'isArchived'] = this.isArchived;
@@ -284,43 +284,43 @@ class AssetResponseDto {
if (this.libraryId != null) {
json[r'libraryId'] = this.libraryId;
} else {
// json[r'libraryId'] = null;
json[r'libraryId'] = null;
}
if (this.livePhotoVideoId != null) {
json[r'livePhotoVideoId'] = this.livePhotoVideoId;
} else {
// json[r'livePhotoVideoId'] = null;
json[r'livePhotoVideoId'] = null;
}
json[r'localDateTime'] = this.localDateTime.toUtc().toIso8601String();
json[r'originalFileName'] = this.originalFileName;
if (this.originalMimeType != null) {
json[r'originalMimeType'] = this.originalMimeType;
} else {
// json[r'originalMimeType'] = null;
json[r'originalMimeType'] = null;
}
json[r'originalPath'] = this.originalPath;
if (this.owner != null) {
json[r'owner'] = this.owner;
} else {
// json[r'owner'] = null;
json[r'owner'] = null;
}
json[r'ownerId'] = this.ownerId;
json[r'people'] = this.people;
if (this.resized != null) {
json[r'resized'] = this.resized;
} else {
// json[r'resized'] = null;
json[r'resized'] = null;
}
if (this.stack != null) {
json[r'stack'] = this.stack;
} else {
// json[r'stack'] = null;
json[r'stack'] = null;
}
json[r'tags'] = this.tags;
if (this.thumbhash != null) {
json[r'thumbhash'] = this.thumbhash;
} else {
// json[r'thumbhash'] = null;
json[r'thumbhash'] = null;
}
json[r'type'] = this.type;
json[r'unassignedFaces'] = this.unassignedFaces;
@@ -329,7 +329,7 @@ class AssetResponseDto {
if (this.width != null) {
json[r'width'] = this.width;
} else {
// json[r'width'] = null;
json[r'width'] = null;
}
return json;
}
@@ -338,10 +338,56 @@ class AssetResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'checksum'), 'Required key "AssetResponseDto[checksum]" is missing from JSON.');
assert(json[r'checksum'] != null, 'Required key "AssetResponseDto[checksum]" has a null value in JSON.');
assert(json.containsKey(r'createdAt'), 'Required key "AssetResponseDto[createdAt]" is missing from JSON.');
assert(json[r'createdAt'] != null, 'Required key "AssetResponseDto[createdAt]" has a null value in JSON.');
assert(json.containsKey(r'duration'), 'Required key "AssetResponseDto[duration]" is missing from JSON.');
assert(json.containsKey(r'fileCreatedAt'), 'Required key "AssetResponseDto[fileCreatedAt]" is missing from JSON.');
assert(json[r'fileCreatedAt'] != null, 'Required key "AssetResponseDto[fileCreatedAt]" has a null value in JSON.');
assert(json.containsKey(r'fileModifiedAt'), 'Required key "AssetResponseDto[fileModifiedAt]" is missing from JSON.');
assert(json[r'fileModifiedAt'] != null, 'Required key "AssetResponseDto[fileModifiedAt]" has a null value in JSON.');
assert(json.containsKey(r'hasMetadata'), 'Required key "AssetResponseDto[hasMetadata]" is missing from JSON.');
assert(json[r'hasMetadata'] != null, 'Required key "AssetResponseDto[hasMetadata]" has a null value in JSON.');
assert(json.containsKey(r'height'), 'Required key "AssetResponseDto[height]" is missing from JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'isArchived'), 'Required key "AssetResponseDto[isArchived]" is missing from JSON.');
assert(json[r'isArchived'] != null, 'Required key "AssetResponseDto[isArchived]" has a null value in JSON.');
assert(json.containsKey(r'isEdited'), 'Required key "AssetResponseDto[isEdited]" is missing from JSON.');
assert(json[r'isEdited'] != null, 'Required key "AssetResponseDto[isEdited]" has a null value in JSON.');
assert(json.containsKey(r'isFavorite'), 'Required key "AssetResponseDto[isFavorite]" is missing from JSON.');
assert(json[r'isFavorite'] != null, 'Required key "AssetResponseDto[isFavorite]" has a null value in JSON.');
assert(json.containsKey(r'isOffline'), 'Required key "AssetResponseDto[isOffline]" is missing from JSON.');
assert(json[r'isOffline'] != null, 'Required key "AssetResponseDto[isOffline]" has a null value in JSON.');
assert(json.containsKey(r'isTrashed'), 'Required key "AssetResponseDto[isTrashed]" is missing from JSON.');
assert(json[r'isTrashed'] != null, 'Required key "AssetResponseDto[isTrashed]" has a null value in JSON.');
assert(json.containsKey(r'localDateTime'), 'Required key "AssetResponseDto[localDateTime]" is missing from JSON.');
assert(json[r'localDateTime'] != null, 'Required key "AssetResponseDto[localDateTime]" has a null value in JSON.');
assert(json.containsKey(r'originalFileName'), 'Required key "AssetResponseDto[originalFileName]" is missing from JSON.');
assert(json[r'originalFileName'] != null, 'Required key "AssetResponseDto[originalFileName]" has a null value in JSON.');
assert(json.containsKey(r'originalPath'), 'Required key "AssetResponseDto[originalPath]" is missing from JSON.');
assert(json[r'originalPath'] != null, 'Required key "AssetResponseDto[originalPath]" has a null value in JSON.');
assert(json.containsKey(r'ownerId'), 'Required key "AssetResponseDto[ownerId]" is missing from JSON.');
assert(json[r'ownerId'] != null, 'Required key "AssetResponseDto[ownerId]" has a null value in JSON.');
assert(json.containsKey(r'thumbhash'), 'Required key "AssetResponseDto[thumbhash]" is missing from JSON.');
assert(json.containsKey(r'type'), 'Required key "AssetResponseDto[type]" is missing from JSON.');
assert(json[r'type'] != null, 'Required key "AssetResponseDto[type]" has a null value in JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "AssetResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "AssetResponseDto[updatedAt]" has a null value in JSON.');
assert(json.containsKey(r'visibility'), 'Required key "AssetResponseDto[visibility]" is missing from JSON.');
assert(json[r'visibility'] != null, 'Required key "AssetResponseDto[visibility]" has a null value in JSON.');
assert(json.containsKey(r'width'), 'Required key "AssetResponseDto[width]" is missing from JSON.');
return true;
}());
return AssetResponseDto(
checksum: mapValueOfType<String>(json, r'checksum')!,
createdAt: mapDateTime(json, r'createdAt', r'')!,
+13 -1
View File
@@ -58,10 +58,22 @@ class AssetStackResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetStackResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetStackResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetCount'), 'Required key "AssetStackResponseDto[assetCount]" is missing from JSON.');
assert(json[r'assetCount'] != null, 'Required key "AssetStackResponseDto[assetCount]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "AssetStackResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "AssetStackResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'primaryAssetId'), 'Required key "AssetStackResponseDto[primaryAssetId]" is missing from JSON.');
assert(json[r'primaryAssetId'] != null, 'Required key "AssetStackResponseDto[primaryAssetId]" has a null value in JSON.');
return true;
}());
return AssetStackResponseDto(
assetCount: mapValueOfType<int>(json, r'assetCount')!,
id: mapValueOfType<String>(json, r'id')!,
+13 -1
View File
@@ -64,10 +64,22 @@ class AssetStatsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AssetStatsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AssetStatsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'images'), 'Required key "AssetStatsResponseDto[images]" is missing from JSON.');
assert(json[r'images'] != null, 'Required key "AssetStatsResponseDto[images]" has a null value in JSON.');
assert(json.containsKey(r'total'), 'Required key "AssetStatsResponseDto[total]" is missing from JSON.');
assert(json[r'total'] != null, 'Required key "AssetStatsResponseDto[total]" has a null value in JSON.');
assert(json.containsKey(r'videos'), 'Required key "AssetStatsResponseDto[videos]" is missing from JSON.');
assert(json[r'videos'] != null, 'Required key "AssetStatsResponseDto[videos]" has a null value in JSON.');
return true;
}());
return AssetStatsResponseDto(
images: mapValueOfType<int>(json, r'images')!,
total: mapValueOfType<int>(json, r'total')!,
+15 -3
View File
@@ -72,7 +72,7 @@ class AuthStatusResponseDto {
if (this.expiresAt != null) {
json[r'expiresAt'] = this.expiresAt;
} else {
// json[r'expiresAt'] = null;
json[r'expiresAt'] = null;
}
json[r'isElevated'] = this.isElevated;
json[r'password'] = this.password;
@@ -80,7 +80,7 @@ class AuthStatusResponseDto {
if (this.pinExpiresAt != null) {
json[r'pinExpiresAt'] = this.pinExpiresAt;
} else {
// json[r'pinExpiresAt'] = null;
json[r'pinExpiresAt'] = null;
}
return json;
}
@@ -89,10 +89,22 @@ class AuthStatusResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AuthStatusResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AuthStatusResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'isElevated'), 'Required key "AuthStatusResponseDto[isElevated]" is missing from JSON.');
assert(json[r'isElevated'] != null, 'Required key "AuthStatusResponseDto[isElevated]" has a null value in JSON.');
assert(json.containsKey(r'password'), 'Required key "AuthStatusResponseDto[password]" is missing from JSON.');
assert(json[r'password'] != null, 'Required key "AuthStatusResponseDto[password]" has a null value in JSON.');
assert(json.containsKey(r'pinCode'), 'Required key "AuthStatusResponseDto[pinCode]" is missing from JSON.');
assert(json[r'pinCode'] != null, 'Required key "AuthStatusResponseDto[pinCode]" has a null value in JSON.');
return true;
}());
return AuthStatusResponseDto(
expiresAt: mapValueOfType<String>(json, r'expiresAt'),
isElevated: mapValueOfType<bool>(json, r'isElevated')!,
+8 -2
View File
@@ -41,7 +41,7 @@ class AvatarUpdate {
if (this.color != null) {
json[r'color'] = this.color;
} else {
// json[r'color'] = null;
json[r'color'] = null;
}
return json;
}
@@ -50,10 +50,16 @@ class AvatarUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AvatarUpdate? fromJson(dynamic value) {
upgradeDto(value, "AvatarUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return AvatarUpdate(
color: UserAvatarColor.fromJson(json[r'color']),
);
+13 -3
View File
@@ -64,12 +64,12 @@ class BulkIdResponseDto {
if (this.error != null) {
json[r'error'] = this.error;
} else {
// json[r'error'] = null;
json[r'error'] = null;
}
if (this.errorMessage != null) {
json[r'errorMessage'] = this.errorMessage;
} else {
// json[r'errorMessage'] = null;
json[r'errorMessage'] = null;
}
json[r'id'] = this.id;
json[r'success'] = this.success;
@@ -80,10 +80,20 @@ class BulkIdResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static BulkIdResponseDto? fromJson(dynamic value) {
upgradeDto(value, "BulkIdResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'id'), 'Required key "BulkIdResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "BulkIdResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'success'), 'Required key "BulkIdResponseDto[success]" is missing from JSON.');
assert(json[r'success'] != null, 'Required key "BulkIdResponseDto[success]" has a null value in JSON.');
return true;
}());
return BulkIdResponseDto(
error: BulkIdErrorReason.fromJson(json[r'error']),
errorMessage: mapValueOfType<String>(json, r'errorMessage'),
+9 -1
View File
@@ -41,10 +41,18 @@ class BulkIdsDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static BulkIdsDto? fromJson(dynamic value) {
upgradeDto(value, "BulkIdsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'ids'), 'Required key "BulkIdsDto[ids]" is missing from JSON.');
assert(json[r'ids'] != null, 'Required key "BulkIdsDto[ids]" has a null value in JSON.');
return true;
}());
return BulkIdsDto(
ids: json[r'ids'] is Iterable
? (json[r'ids'] as Iterable).cast<String>().toList(growable: false)
+9 -1
View File
@@ -41,10 +41,18 @@ class CastResponse {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CastResponse? fromJson(dynamic value) {
upgradeDto(value, "CastResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'gCastEnabled'), 'Required key "CastResponse[gCastEnabled]" is missing from JSON.');
assert(json[r'gCastEnabled'] != null, 'Required key "CastResponse[gCastEnabled]" has a null value in JSON.');
return true;
}());
return CastResponse(
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled')!,
);
+8 -2
View File
@@ -42,7 +42,7 @@ class CastUpdate {
if (this.gCastEnabled != null) {
json[r'gCastEnabled'] = this.gCastEnabled;
} else {
// json[r'gCastEnabled'] = null;
json[r'gCastEnabled'] = null;
}
return json;
}
@@ -51,10 +51,16 @@ class CastUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CastUpdate? fromJson(dynamic value) {
upgradeDto(value, "CastUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return CastUpdate(
gCastEnabled: mapValueOfType<bool>(json, r'gCastEnabled'),
);
+11 -1
View File
@@ -55,10 +55,20 @@ class ChangePasswordDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ChangePasswordDto? fromJson(dynamic value) {
upgradeDto(value, "ChangePasswordDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'newPassword'), 'Required key "ChangePasswordDto[newPassword]" is missing from JSON.');
assert(json[r'newPassword'] != null, 'Required key "ChangePasswordDto[newPassword]" has a null value in JSON.');
assert(json.containsKey(r'password'), 'Required key "ChangePasswordDto[password]" is missing from JSON.');
assert(json[r'password'] != null, 'Required key "ChangePasswordDto[password]" has a null value in JSON.');
return true;
}());
return ChangePasswordDto(
invalidateSessions: mapValueOfType<bool>(json, r'invalidateSessions') ?? false,
newPassword: mapValueOfType<String>(json, r'newPassword')!,
+11 -1
View File
@@ -48,10 +48,20 @@ class CLIPConfig {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CLIPConfig? fromJson(dynamic value) {
upgradeDto(value, "CLIPConfig");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'enabled'), 'Required key "CLIPConfig[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "CLIPConfig[enabled]" has a null value in JSON.');
assert(json.containsKey(r'modelName'), 'Required key "CLIPConfig[modelName]" is missing from JSON.');
assert(json[r'modelName'] != null, 'Required key "CLIPConfig[modelName]" has a null value in JSON.');
return true;
}());
return CLIPConfig(
enabled: mapValueOfType<bool>(json, r'enabled')!,
modelName: mapValueOfType<String>(json, r'modelName')!,
+11 -1
View File
@@ -51,10 +51,20 @@ class ContributorCountResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ContributorCountResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ContributorCountResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetCount'), 'Required key "ContributorCountResponseDto[assetCount]" is missing from JSON.');
assert(json[r'assetCount'] != null, 'Required key "ContributorCountResponseDto[assetCount]" has a null value in JSON.');
assert(json.containsKey(r'userId'), 'Required key "ContributorCountResponseDto[userId]" is missing from JSON.');
assert(json[r'userId'] != null, 'Required key "ContributorCountResponseDto[userId]" has a null value in JSON.');
return true;
}());
return ContributorCountResponseDto(
assetCount: mapValueOfType<int>(json, r'assetCount')!,
userId: mapValueOfType<String>(json, r'userId')!,
+10 -2
View File
@@ -63,7 +63,7 @@ class CreateAlbumDto {
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
json[r'description'] = null;
}
return json;
}
@@ -72,10 +72,18 @@ class CreateAlbumDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateAlbumDto? fromJson(dynamic value) {
upgradeDto(value, "CreateAlbumDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumName'), 'Required key "CreateAlbumDto[albumName]" is missing from JSON.');
assert(json[r'albumName'] != null, 'Required key "CreateAlbumDto[albumName]" has a null value in JSON.');
return true;
}());
return CreateAlbumDto(
albumName: mapValueOfType<String>(json, r'albumName')!,
albumUsers: AlbumUserCreateDto.listFromJson(json[r'albumUsers']),
+10 -2
View File
@@ -62,7 +62,7 @@ class CreateLibraryDto {
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
json[r'name'] = null;
}
json[r'ownerId'] = this.ownerId;
return json;
@@ -72,10 +72,18 @@ class CreateLibraryDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateLibraryDto? fromJson(dynamic value) {
upgradeDto(value, "CreateLibraryDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'ownerId'), 'Required key "CreateLibraryDto[ownerId]" is missing from JSON.');
assert(json[r'ownerId'] != null, 'Required key "CreateLibraryDto[ownerId]" has a null value in JSON.');
return true;
}());
return CreateLibraryDto(
exclusionPatterns: json[r'exclusionPatterns'] is Iterable
? (json[r'exclusionPatterns'] as Iterable).cast<String>().toList(growable: false)
@@ -57,10 +57,22 @@ class CreateProfileImageResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CreateProfileImageResponseDto? fromJson(dynamic value) {
upgradeDto(value, "CreateProfileImageResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'profileChangedAt'), 'Required key "CreateProfileImageResponseDto[profileChangedAt]" is missing from JSON.');
assert(json[r'profileChangedAt'] != null, 'Required key "CreateProfileImageResponseDto[profileChangedAt]" has a null value in JSON.');
assert(json.containsKey(r'profileImagePath'), 'Required key "CreateProfileImageResponseDto[profileImagePath]" is missing from JSON.');
assert(json[r'profileImagePath'] != null, 'Required key "CreateProfileImageResponseDto[profileImagePath]" has a null value in JSON.');
assert(json.containsKey(r'userId'), 'Required key "CreateProfileImageResponseDto[userId]" is missing from JSON.');
assert(json[r'userId'] != null, 'Required key "CreateProfileImageResponseDto[userId]" has a null value in JSON.');
return true;
}());
return CreateProfileImageResponseDto(
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
+15 -1
View File
@@ -74,10 +74,24 @@ class CropParameters {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static CropParameters? fromJson(dynamic value) {
upgradeDto(value, "CropParameters");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'height'), 'Required key "CropParameters[height]" is missing from JSON.');
assert(json[r'height'] != null, 'Required key "CropParameters[height]" has a null value in JSON.');
assert(json.containsKey(r'width'), 'Required key "CropParameters[width]" is missing from JSON.');
assert(json[r'width'] != null, 'Required key "CropParameters[width]" has a null value in JSON.');
assert(json.containsKey(r'x'), 'Required key "CropParameters[x]" is missing from JSON.');
assert(json[r'x'] != null, 'Required key "CropParameters[x]" has a null value in JSON.');
assert(json.containsKey(r'y'), 'Required key "CropParameters[y]" is missing from JSON.');
assert(json[r'y'] != null, 'Required key "CropParameters[y]" has a null value in JSON.');
return true;
}());
return CropParameters(
height: mapValueOfType<int>(json, r'height')!,
width: mapValueOfType<int>(json, r'width')!,
+13 -1
View File
@@ -58,10 +58,22 @@ class DatabaseBackupConfig {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DatabaseBackupConfig? fromJson(dynamic value) {
upgradeDto(value, "DatabaseBackupConfig");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'cronExpression'), 'Required key "DatabaseBackupConfig[cronExpression]" is missing from JSON.');
assert(json[r'cronExpression'] != null, 'Required key "DatabaseBackupConfig[cronExpression]" has a null value in JSON.');
assert(json.containsKey(r'enabled'), 'Required key "DatabaseBackupConfig[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "DatabaseBackupConfig[enabled]" has a null value in JSON.');
assert(json.containsKey(r'keepLastAmount'), 'Required key "DatabaseBackupConfig[keepLastAmount]" is missing from JSON.');
assert(json[r'keepLastAmount'] != null, 'Required key "DatabaseBackupConfig[keepLastAmount]" has a null value in JSON.');
return true;
}());
return DatabaseBackupConfig(
cronExpression: mapValueOfType<String>(json, r'cronExpression')!,
enabled: mapValueOfType<bool>(json, r'enabled')!,
+9 -1
View File
@@ -41,10 +41,18 @@ class DatabaseBackupDeleteDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DatabaseBackupDeleteDto? fromJson(dynamic value) {
upgradeDto(value, "DatabaseBackupDeleteDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'backups'), 'Required key "DatabaseBackupDeleteDto[backups]" is missing from JSON.');
assert(json[r'backups'] != null, 'Required key "DatabaseBackupDeleteDto[backups]" has a null value in JSON.');
return true;
}());
return DatabaseBackupDeleteDto(
backups: json[r'backups'] is Iterable
? (json[r'backups'] as Iterable).cast<String>().toList(growable: false)
+13 -1
View File
@@ -58,10 +58,22 @@ class DatabaseBackupDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DatabaseBackupDto? fromJson(dynamic value) {
upgradeDto(value, "DatabaseBackupDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'filename'), 'Required key "DatabaseBackupDto[filename]" is missing from JSON.');
assert(json[r'filename'] != null, 'Required key "DatabaseBackupDto[filename]" has a null value in JSON.');
assert(json.containsKey(r'filesize'), 'Required key "DatabaseBackupDto[filesize]" is missing from JSON.');
assert(json[r'filesize'] != null, 'Required key "DatabaseBackupDto[filesize]" has a null value in JSON.');
assert(json.containsKey(r'timezone'), 'Required key "DatabaseBackupDto[timezone]" is missing from JSON.');
assert(json[r'timezone'] != null, 'Required key "DatabaseBackupDto[timezone]" has a null value in JSON.');
return true;
}());
return DatabaseBackupDto(
filename: mapValueOfType<String>(json, r'filename')!,
filesize: mapValueOfType<int>(json, r'filesize')!,
@@ -41,10 +41,18 @@ class DatabaseBackupListResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DatabaseBackupListResponseDto? fromJson(dynamic value) {
upgradeDto(value, "DatabaseBackupListResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'backups'), 'Required key "DatabaseBackupListResponseDto[backups]" is missing from JSON.');
assert(json[r'backups'] != null, 'Required key "DatabaseBackupListResponseDto[backups]" has a null value in JSON.');
return true;
}());
return DatabaseBackupListResponseDto(
backups: DatabaseBackupDto.listFromJson(json[r'backups']),
);
+10 -2
View File
@@ -49,7 +49,7 @@ class DownloadArchiveDto {
if (this.edited != null) {
json[r'edited'] = this.edited;
} else {
// json[r'edited'] = null;
json[r'edited'] = null;
}
return json;
}
@@ -58,10 +58,18 @@ class DownloadArchiveDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadArchiveDto? fromJson(dynamic value) {
upgradeDto(value, "DownloadArchiveDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetIds'), 'Required key "DownloadArchiveDto[assetIds]" is missing from JSON.');
assert(json[r'assetIds'] != null, 'Required key "DownloadArchiveDto[assetIds]" has a null value in JSON.');
return true;
}());
return DownloadArchiveDto(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
+11 -1
View File
@@ -51,10 +51,20 @@ class DownloadArchiveInfo {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadArchiveInfo? fromJson(dynamic value) {
upgradeDto(value, "DownloadArchiveInfo");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetIds'), 'Required key "DownloadArchiveInfo[assetIds]" is missing from JSON.');
assert(json[r'assetIds'] != null, 'Required key "DownloadArchiveInfo[assetIds]" has a null value in JSON.');
assert(json.containsKey(r'size'), 'Required key "DownloadArchiveInfo[size]" is missing from JSON.');
assert(json[r'size'] != null, 'Required key "DownloadArchiveInfo[size]" has a null value in JSON.');
return true;
}());
return DownloadArchiveInfo(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
+10 -4
View File
@@ -75,18 +75,18 @@ class DownloadInfoDto {
if (this.albumId != null) {
json[r'albumId'] = this.albumId;
} else {
// json[r'albumId'] = null;
json[r'albumId'] = null;
}
if (this.archiveSize != null) {
json[r'archiveSize'] = this.archiveSize;
} else {
// json[r'archiveSize'] = null;
json[r'archiveSize'] = null;
}
json[r'assetIds'] = this.assetIds;
if (this.userId != null) {
json[r'userId'] = this.userId;
} else {
// json[r'userId'] = null;
json[r'userId'] = null;
}
return json;
}
@@ -95,10 +95,16 @@ class DownloadInfoDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadInfoDto? fromJson(dynamic value) {
upgradeDto(value, "DownloadInfoDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return DownloadInfoDto(
albumId: mapValueOfType<String>(json, r'albumId'),
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
+11 -1
View File
@@ -51,10 +51,20 @@ class DownloadResponse {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadResponse? fromJson(dynamic value) {
upgradeDto(value, "DownloadResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'archiveSize'), 'Required key "DownloadResponse[archiveSize]" is missing from JSON.');
assert(json[r'archiveSize'] != null, 'Required key "DownloadResponse[archiveSize]" has a null value in JSON.');
assert(json.containsKey(r'includeEmbeddedVideos'), 'Required key "DownloadResponse[includeEmbeddedVideos]" is missing from JSON.');
assert(json[r'includeEmbeddedVideos'] != null, 'Required key "DownloadResponse[includeEmbeddedVideos]" has a null value in JSON.');
return true;
}());
return DownloadResponse(
archiveSize: mapValueOfType<int>(json, r'archiveSize')!,
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos')!,
+11 -1
View File
@@ -51,10 +51,20 @@ class DownloadResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadResponseDto? fromJson(dynamic value) {
upgradeDto(value, "DownloadResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'archives'), 'Required key "DownloadResponseDto[archives]" is missing from JSON.');
assert(json[r'archives'] != null, 'Required key "DownloadResponseDto[archives]" has a null value in JSON.');
assert(json.containsKey(r'totalSize'), 'Required key "DownloadResponseDto[totalSize]" is missing from JSON.');
assert(json[r'totalSize'] != null, 'Required key "DownloadResponseDto[totalSize]" has a null value in JSON.');
return true;
}());
return DownloadResponseDto(
archives: DownloadArchiveInfo.listFromJson(json[r'archives']),
totalSize: mapValueOfType<int>(json, r'totalSize')!,
+9 -3
View File
@@ -57,12 +57,12 @@ class DownloadUpdate {
if (this.archiveSize != null) {
json[r'archiveSize'] = this.archiveSize;
} else {
// json[r'archiveSize'] = null;
json[r'archiveSize'] = null;
}
if (this.includeEmbeddedVideos != null) {
json[r'includeEmbeddedVideos'] = this.includeEmbeddedVideos;
} else {
// json[r'includeEmbeddedVideos'] = null;
json[r'includeEmbeddedVideos'] = null;
}
return json;
}
@@ -71,10 +71,16 @@ class DownloadUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DownloadUpdate? fromJson(dynamic value) {
upgradeDto(value, "DownloadUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return DownloadUpdate(
archiveSize: mapValueOfType<int>(json, r'archiveSize'),
includeEmbeddedVideos: mapValueOfType<bool>(json, r'includeEmbeddedVideos'),
+12 -2
View File
@@ -51,13 +51,23 @@ class DuplicateDetectionConfig {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DuplicateDetectionConfig? fromJson(dynamic value) {
upgradeDto(value, "DuplicateDetectionConfig");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'enabled'), 'Required key "DuplicateDetectionConfig[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "DuplicateDetectionConfig[enabled]" has a null value in JSON.');
assert(json.containsKey(r'maxDistance'), 'Required key "DuplicateDetectionConfig[maxDistance]" is missing from JSON.');
assert(json[r'maxDistance'] != null, 'Required key "DuplicateDetectionConfig[maxDistance]" has a null value in JSON.');
return true;
}());
return DuplicateDetectionConfig(
enabled: mapValueOfType<bool>(json, r'enabled')!,
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
maxDistance: mapValueOfType<double>(json, r'maxDistance')!,
);
}
return null;
+9 -1
View File
@@ -41,10 +41,18 @@ class DuplicateResolveDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DuplicateResolveDto? fromJson(dynamic value) {
upgradeDto(value, "DuplicateResolveDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'groups'), 'Required key "DuplicateResolveDto[groups]" is missing from JSON.');
assert(json[r'groups'] != null, 'Required key "DuplicateResolveDto[groups]" has a null value in JSON.');
return true;
}());
return DuplicateResolveDto(
groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']),
);
+13 -1
View File
@@ -54,10 +54,22 @@ class DuplicateResolveGroupDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DuplicateResolveGroupDto? fromJson(dynamic value) {
upgradeDto(value, "DuplicateResolveGroupDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'duplicateId'), 'Required key "DuplicateResolveGroupDto[duplicateId]" is missing from JSON.');
assert(json[r'duplicateId'] != null, 'Required key "DuplicateResolveGroupDto[duplicateId]" has a null value in JSON.');
assert(json.containsKey(r'keepAssetIds'), 'Required key "DuplicateResolveGroupDto[keepAssetIds]" is missing from JSON.');
assert(json[r'keepAssetIds'] != null, 'Required key "DuplicateResolveGroupDto[keepAssetIds]" has a null value in JSON.');
assert(json.containsKey(r'trashAssetIds'), 'Required key "DuplicateResolveGroupDto[trashAssetIds]" is missing from JSON.');
assert(json[r'trashAssetIds'] != null, 'Required key "DuplicateResolveGroupDto[trashAssetIds]" has a null value in JSON.');
return true;
}());
return DuplicateResolveGroupDto(
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
keepAssetIds: json[r'keepAssetIds'] is Iterable
+13 -1
View File
@@ -55,10 +55,22 @@ class DuplicateResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static DuplicateResponseDto? fromJson(dynamic value) {
upgradeDto(value, "DuplicateResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assets'), 'Required key "DuplicateResponseDto[assets]" is missing from JSON.');
assert(json[r'assets'] != null, 'Required key "DuplicateResponseDto[assets]" has a null value in JSON.');
assert(json.containsKey(r'duplicateId'), 'Required key "DuplicateResponseDto[duplicateId]" is missing from JSON.');
assert(json[r'duplicateId'] != null, 'Required key "DuplicateResponseDto[duplicateId]" has a null value in JSON.');
assert(json.containsKey(r'suggestedKeepAssetIds'), 'Required key "DuplicateResponseDto[suggestedKeepAssetIds]" is missing from JSON.');
assert(json[r'suggestedKeepAssetIds'] != null, 'Required key "DuplicateResponseDto[suggestedKeepAssetIds]" has a null value in JSON.');
return true;
}());
return DuplicateResponseDto(
assets: AssetResponseDto.listFromJson(json[r'assets']),
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
+13 -1
View File
@@ -55,10 +55,22 @@ class EmailNotificationsResponse {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static EmailNotificationsResponse? fromJson(dynamic value) {
upgradeDto(value, "EmailNotificationsResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'albumInvite'), 'Required key "EmailNotificationsResponse[albumInvite]" is missing from JSON.');
assert(json[r'albumInvite'] != null, 'Required key "EmailNotificationsResponse[albumInvite]" has a null value in JSON.');
assert(json.containsKey(r'albumUpdate'), 'Required key "EmailNotificationsResponse[albumUpdate]" is missing from JSON.');
assert(json[r'albumUpdate'] != null, 'Required key "EmailNotificationsResponse[albumUpdate]" has a null value in JSON.');
assert(json.containsKey(r'enabled'), 'Required key "EmailNotificationsResponse[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "EmailNotificationsResponse[enabled]" has a null value in JSON.');
return true;
}());
return EmailNotificationsResponse(
albumInvite: mapValueOfType<bool>(json, r'albumInvite')!,
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate')!,
+10 -4
View File
@@ -66,17 +66,17 @@ class EmailNotificationsUpdate {
if (this.albumInvite != null) {
json[r'albumInvite'] = this.albumInvite;
} else {
// json[r'albumInvite'] = null;
json[r'albumInvite'] = null;
}
if (this.albumUpdate != null) {
json[r'albumUpdate'] = this.albumUpdate;
} else {
// json[r'albumUpdate'] = null;
json[r'albumUpdate'] = null;
}
if (this.enabled != null) {
json[r'enabled'] = this.enabled;
} else {
// json[r'enabled'] = null;
json[r'enabled'] = null;
}
return json;
}
@@ -85,10 +85,16 @@ class EmailNotificationsUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static EmailNotificationsUpdate? fromJson(dynamic value) {
upgradeDto(value, "EmailNotificationsUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return EmailNotificationsUpdate(
albumInvite: mapValueOfType<bool>(json, r'albumInvite'),
albumUpdate: mapValueOfType<bool>(json, r'albumUpdate'),
+29 -23
View File
@@ -177,112 +177,112 @@ class ExifResponseDto {
if (this.city != null) {
json[r'city'] = this.city;
} else {
// json[r'city'] = null;
json[r'city'] = null;
}
if (this.country != null) {
json[r'country'] = this.country;
} else {
// json[r'country'] = null;
json[r'country'] = null;
}
if (this.dateTimeOriginal != null) {
json[r'dateTimeOriginal'] = this.dateTimeOriginal!.toUtc().toIso8601String();
} else {
// json[r'dateTimeOriginal'] = null;
json[r'dateTimeOriginal'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
json[r'description'] = null;
}
if (this.exifImageHeight != null) {
json[r'exifImageHeight'] = this.exifImageHeight;
} else {
// json[r'exifImageHeight'] = null;
json[r'exifImageHeight'] = null;
}
if (this.exifImageWidth != null) {
json[r'exifImageWidth'] = this.exifImageWidth;
} else {
// json[r'exifImageWidth'] = null;
json[r'exifImageWidth'] = null;
}
if (this.exposureTime != null) {
json[r'exposureTime'] = this.exposureTime;
} else {
// json[r'exposureTime'] = null;
json[r'exposureTime'] = null;
}
if (this.fNumber != null) {
json[r'fNumber'] = this.fNumber;
} else {
// json[r'fNumber'] = null;
json[r'fNumber'] = null;
}
if (this.fileSizeInByte != null) {
json[r'fileSizeInByte'] = this.fileSizeInByte;
} else {
// json[r'fileSizeInByte'] = null;
json[r'fileSizeInByte'] = null;
}
if (this.focalLength != null) {
json[r'focalLength'] = this.focalLength;
} else {
// json[r'focalLength'] = null;
json[r'focalLength'] = null;
}
if (this.iso != null) {
json[r'iso'] = this.iso;
} else {
// json[r'iso'] = null;
json[r'iso'] = null;
}
if (this.latitude != null) {
json[r'latitude'] = this.latitude;
} else {
// json[r'latitude'] = null;
json[r'latitude'] = null;
}
if (this.lensModel != null) {
json[r'lensModel'] = this.lensModel;
} else {
// json[r'lensModel'] = null;
json[r'lensModel'] = null;
}
if (this.longitude != null) {
json[r'longitude'] = this.longitude;
} else {
// json[r'longitude'] = null;
json[r'longitude'] = null;
}
if (this.make != null) {
json[r'make'] = this.make;
} else {
// json[r'make'] = null;
json[r'make'] = null;
}
if (this.model != null) {
json[r'model'] = this.model;
} else {
// json[r'model'] = null;
json[r'model'] = null;
}
if (this.modifyDate != null) {
json[r'modifyDate'] = this.modifyDate!.toUtc().toIso8601String();
} else {
// json[r'modifyDate'] = null;
json[r'modifyDate'] = null;
}
if (this.orientation != null) {
json[r'orientation'] = this.orientation;
} else {
// json[r'orientation'] = null;
json[r'orientation'] = null;
}
if (this.projectionType != null) {
json[r'projectionType'] = this.projectionType;
} else {
// json[r'projectionType'] = null;
json[r'projectionType'] = null;
}
if (this.rating != null) {
json[r'rating'] = this.rating;
} else {
// json[r'rating'] = null;
json[r'rating'] = null;
}
if (this.state != null) {
json[r'state'] = this.state;
} else {
// json[r'state'] = null;
json[r'state'] = null;
}
if (this.timeZone != null) {
json[r'timeZone'] = this.timeZone;
} else {
// json[r'timeZone'] = null;
json[r'timeZone'] = null;
}
return json;
}
@@ -291,10 +291,16 @@ class ExifResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static ExifResponseDto? fromJson(dynamic value) {
upgradeDto(value, "ExifResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return ExifResponseDto(
city: mapValueOfType<String>(json, r'city'),
country: mapValueOfType<String>(json, r'country'),
+9 -1
View File
@@ -41,10 +41,18 @@ class FaceDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FaceDto? fromJson(dynamic value) {
upgradeDto(value, "FaceDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'id'), 'Required key "FaceDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "FaceDto[id]" has a null value in JSON.');
return true;
}());
return FaceDto(
id: mapValueOfType<String>(json, r'id')!,
);
+19 -3
View File
@@ -78,15 +78,31 @@ class FacialRecognitionConfig {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FacialRecognitionConfig? fromJson(dynamic value) {
upgradeDto(value, "FacialRecognitionConfig");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'enabled'), 'Required key "FacialRecognitionConfig[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "FacialRecognitionConfig[enabled]" has a null value in JSON.');
assert(json.containsKey(r'maxDistance'), 'Required key "FacialRecognitionConfig[maxDistance]" is missing from JSON.');
assert(json[r'maxDistance'] != null, 'Required key "FacialRecognitionConfig[maxDistance]" has a null value in JSON.');
assert(json.containsKey(r'minFaces'), 'Required key "FacialRecognitionConfig[minFaces]" is missing from JSON.');
assert(json[r'minFaces'] != null, 'Required key "FacialRecognitionConfig[minFaces]" has a null value in JSON.');
assert(json.containsKey(r'minScore'), 'Required key "FacialRecognitionConfig[minScore]" is missing from JSON.');
assert(json[r'minScore'] != null, 'Required key "FacialRecognitionConfig[minScore]" has a null value in JSON.');
assert(json.containsKey(r'modelName'), 'Required key "FacialRecognitionConfig[modelName]" is missing from JSON.');
assert(json[r'modelName'] != null, 'Required key "FacialRecognitionConfig[modelName]" has a null value in JSON.');
return true;
}());
return FacialRecognitionConfig(
enabled: mapValueOfType<bool>(json, r'enabled')!,
maxDistance: (mapValueOfType<num>(json, r'maxDistance')!).toDouble(),
maxDistance: mapValueOfType<double>(json, r'maxDistance')!,
minFaces: mapValueOfType<int>(json, r'minFaces')!,
minScore: (mapValueOfType<num>(json, r'minScore')!).toDouble(),
minScore: mapValueOfType<double>(json, r'minScore')!,
modelName: mapValueOfType<String>(json, r'modelName')!,
);
}
+11 -1
View File
@@ -48,10 +48,20 @@ class FoldersResponse {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FoldersResponse? fromJson(dynamic value) {
upgradeDto(value, "FoldersResponse");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'enabled'), 'Required key "FoldersResponse[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "FoldersResponse[enabled]" has a null value in JSON.');
assert(json.containsKey(r'sidebarWeb'), 'Required key "FoldersResponse[sidebarWeb]" is missing from JSON.');
assert(json[r'sidebarWeb'] != null, 'Required key "FoldersResponse[sidebarWeb]" has a null value in JSON.');
return true;
}());
return FoldersResponse(
enabled: mapValueOfType<bool>(json, r'enabled')!,
sidebarWeb: mapValueOfType<bool>(json, r'sidebarWeb')!,
+9 -3
View File
@@ -54,12 +54,12 @@ class FoldersUpdate {
if (this.enabled != null) {
json[r'enabled'] = this.enabled;
} else {
// json[r'enabled'] = null;
json[r'enabled'] = null;
}
if (this.sidebarWeb != null) {
json[r'sidebarWeb'] = this.sidebarWeb;
} else {
// json[r'sidebarWeb'] = null;
json[r'sidebarWeb'] = null;
}
return json;
}
@@ -68,10 +68,16 @@ class FoldersUpdate {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static FoldersUpdate? fromJson(dynamic value) {
upgradeDto(value, "FoldersUpdate");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
return true;
}());
return FoldersUpdate(
enabled: mapValueOfType<bool>(json, r'enabled'),
sidebarWeb: mapValueOfType<bool>(json, r'sidebarWeb'),
+9 -1
View File
@@ -40,10 +40,18 @@ class JobCreateDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static JobCreateDto? fromJson(dynamic value) {
upgradeDto(value, "JobCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'name'), 'Required key "JobCreateDto[name]" is missing from JSON.');
assert(json[r'name'] != null, 'Required key "JobCreateDto[name]" has a null value in JSON.');
return true;
}());
return JobCreateDto(
name: ManualJobName.fromJson(json[r'name'])!,
);
+9 -1
View File
@@ -44,10 +44,18 @@ class JobSettingsDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static JobSettingsDto? fromJson(dynamic value) {
upgradeDto(value, "JobSettingsDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'concurrency'), 'Required key "JobSettingsDto[concurrency]" is missing from JSON.');
assert(json[r'concurrency'] != null, 'Required key "JobSettingsDto[concurrency]" has a null value in JSON.');
return true;
}());
return JobSettingsDto(
concurrency: mapValueOfType<int>(json, r'concurrency')!,
);
+25 -2
View File
@@ -98,7 +98,7 @@ class LibraryResponseDto {
? this.refreshedAt!.millisecondsSinceEpoch
: this.refreshedAt!.toUtc().toIso8601String();
} else {
// json[r'refreshedAt'] = null;
json[r'refreshedAt'] = null;
}
json[r'updatedAt'] = _isEpochMarker(r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')
? this.updatedAt.millisecondsSinceEpoch
@@ -110,10 +110,33 @@ class LibraryResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LibraryResponseDto? fromJson(dynamic value) {
upgradeDto(value, "LibraryResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'assetCount'), 'Required key "LibraryResponseDto[assetCount]" is missing from JSON.');
assert(json[r'assetCount'] != null, 'Required key "LibraryResponseDto[assetCount]" has a null value in JSON.');
assert(json.containsKey(r'createdAt'), 'Required key "LibraryResponseDto[createdAt]" is missing from JSON.');
assert(json[r'createdAt'] != null, 'Required key "LibraryResponseDto[createdAt]" has a null value in JSON.');
assert(json.containsKey(r'exclusionPatterns'), 'Required key "LibraryResponseDto[exclusionPatterns]" is missing from JSON.');
assert(json[r'exclusionPatterns'] != null, 'Required key "LibraryResponseDto[exclusionPatterns]" has a null value in JSON.');
assert(json.containsKey(r'id'), 'Required key "LibraryResponseDto[id]" is missing from JSON.');
assert(json[r'id'] != null, 'Required key "LibraryResponseDto[id]" has a null value in JSON.');
assert(json.containsKey(r'importPaths'), 'Required key "LibraryResponseDto[importPaths]" is missing from JSON.');
assert(json[r'importPaths'] != null, 'Required key "LibraryResponseDto[importPaths]" has a null value in JSON.');
assert(json.containsKey(r'name'), 'Required key "LibraryResponseDto[name]" is missing from JSON.');
assert(json[r'name'] != null, 'Required key "LibraryResponseDto[name]" has a null value in JSON.');
assert(json.containsKey(r'ownerId'), 'Required key "LibraryResponseDto[ownerId]" is missing from JSON.');
assert(json[r'ownerId'] != null, 'Required key "LibraryResponseDto[ownerId]" has a null value in JSON.');
assert(json.containsKey(r'refreshedAt'), 'Required key "LibraryResponseDto[refreshedAt]" is missing from JSON.');
assert(json.containsKey(r'updatedAt'), 'Required key "LibraryResponseDto[updatedAt]" is missing from JSON.');
assert(json[r'updatedAt'] != null, 'Required key "LibraryResponseDto[updatedAt]" has a null value in JSON.');
return true;
}());
return LibraryResponseDto(
assetCount: mapValueOfType<int>(json, r'assetCount')!,
createdAt: mapDateTime(json, r'createdAt', r'/^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$/')!,
+15 -1
View File
@@ -74,10 +74,24 @@ class LibraryStatsResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LibraryStatsResponseDto? fromJson(dynamic value) {
upgradeDto(value, "LibraryStatsResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'photos'), 'Required key "LibraryStatsResponseDto[photos]" is missing from JSON.');
assert(json[r'photos'] != null, 'Required key "LibraryStatsResponseDto[photos]" has a null value in JSON.');
assert(json.containsKey(r'total'), 'Required key "LibraryStatsResponseDto[total]" is missing from JSON.');
assert(json[r'total'] != null, 'Required key "LibraryStatsResponseDto[total]" has a null value in JSON.');
assert(json.containsKey(r'usage'), 'Required key "LibraryStatsResponseDto[usage]" is missing from JSON.');
assert(json[r'usage'] != null, 'Required key "LibraryStatsResponseDto[usage]" has a null value in JSON.');
assert(json.containsKey(r'videos'), 'Required key "LibraryStatsResponseDto[videos]" is missing from JSON.');
assert(json[r'videos'] != null, 'Required key "LibraryStatsResponseDto[videos]" has a null value in JSON.');
return true;
}());
return LibraryStatsResponseDto(
photos: mapValueOfType<int>(json, r'photos')!,
total: mapValueOfType<int>(json, r'total')!,
+11 -1
View File
@@ -48,10 +48,20 @@ class LicenseKeyDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LicenseKeyDto? fromJson(dynamic value) {
upgradeDto(value, "LicenseKeyDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'activationKey'), 'Required key "LicenseKeyDto[activationKey]" is missing from JSON.');
assert(json[r'activationKey'] != null, 'Required key "LicenseKeyDto[activationKey]" has a null value in JSON.');
assert(json.containsKey(r'licenseKey'), 'Required key "LicenseKeyDto[licenseKey]" is missing from JSON.');
assert(json[r'licenseKey'] != null, 'Required key "LicenseKeyDto[licenseKey]" has a null value in JSON.');
return true;
}());
return LicenseKeyDto(
activationKey: mapValueOfType<String>(json, r'activationKey')!,
licenseKey: mapValueOfType<String>(json, r'licenseKey')!,
+11 -1
View File
@@ -48,10 +48,20 @@ class LoginCredentialDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LoginCredentialDto? fromJson(dynamic value) {
upgradeDto(value, "LoginCredentialDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'email'), 'Required key "LoginCredentialDto[email]" is missing from JSON.');
assert(json[r'email'] != null, 'Required key "LoginCredentialDto[email]" has a null value in JSON.');
assert(json.containsKey(r'password'), 'Required key "LoginCredentialDto[password]" is missing from JSON.');
assert(json[r'password'] != null, 'Required key "LoginCredentialDto[password]" has a null value in JSON.');
return true;
}());
return LoginCredentialDto(
email: mapValueOfType<String>(json, r'email')!,
password: mapValueOfType<String>(json, r'password')!,
+23 -1
View File
@@ -90,10 +90,32 @@ class LoginResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LoginResponseDto? fromJson(dynamic value) {
upgradeDto(value, "LoginResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'accessToken'), 'Required key "LoginResponseDto[accessToken]" is missing from JSON.');
assert(json[r'accessToken'] != null, 'Required key "LoginResponseDto[accessToken]" has a null value in JSON.');
assert(json.containsKey(r'isAdmin'), 'Required key "LoginResponseDto[isAdmin]" is missing from JSON.');
assert(json[r'isAdmin'] != null, 'Required key "LoginResponseDto[isAdmin]" has a null value in JSON.');
assert(json.containsKey(r'isOnboarded'), 'Required key "LoginResponseDto[isOnboarded]" is missing from JSON.');
assert(json[r'isOnboarded'] != null, 'Required key "LoginResponseDto[isOnboarded]" has a null value in JSON.');
assert(json.containsKey(r'name'), 'Required key "LoginResponseDto[name]" is missing from JSON.');
assert(json[r'name'] != null, 'Required key "LoginResponseDto[name]" has a null value in JSON.');
assert(json.containsKey(r'profileImagePath'), 'Required key "LoginResponseDto[profileImagePath]" is missing from JSON.');
assert(json[r'profileImagePath'] != null, 'Required key "LoginResponseDto[profileImagePath]" has a null value in JSON.');
assert(json.containsKey(r'shouldChangePassword'), 'Required key "LoginResponseDto[shouldChangePassword]" is missing from JSON.');
assert(json[r'shouldChangePassword'] != null, 'Required key "LoginResponseDto[shouldChangePassword]" has a null value in JSON.');
assert(json.containsKey(r'userEmail'), 'Required key "LoginResponseDto[userEmail]" is missing from JSON.');
assert(json[r'userEmail'] != null, 'Required key "LoginResponseDto[userEmail]" has a null value in JSON.');
assert(json.containsKey(r'userId'), 'Required key "LoginResponseDto[userId]" is missing from JSON.');
assert(json[r'userId'] != null, 'Required key "LoginResponseDto[userId]" has a null value in JSON.');
return true;
}());
return LoginResponseDto(
accessToken: mapValueOfType<String>(json, r'accessToken')!,
isAdmin: mapValueOfType<bool>(json, r'isAdmin')!,
+11 -1
View File
@@ -48,10 +48,20 @@ class LogoutResponseDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static LogoutResponseDto? fromJson(dynamic value) {
upgradeDto(value, "LogoutResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'redirectUri'), 'Required key "LogoutResponseDto[redirectUri]" is missing from JSON.');
assert(json[r'redirectUri'] != null, 'Required key "LogoutResponseDto[redirectUri]" has a null value in JSON.');
assert(json.containsKey(r'successful'), 'Required key "LogoutResponseDto[successful]" is missing from JSON.');
assert(json[r'successful'] != null, 'Required key "LogoutResponseDto[successful]" has a null value in JSON.');
return true;
}());
return LogoutResponseDto(
redirectUri: mapValueOfType<String>(json, r'redirectUri')!,
successful: mapValueOfType<bool>(json, r'successful')!,
@@ -57,10 +57,22 @@ class MachineLearningAvailabilityChecksDto {
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static MachineLearningAvailabilityChecksDto? fromJson(dynamic value) {
upgradeDto(value, "MachineLearningAvailabilityChecksDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
// Ensure that the map contains the required keys.
// Note 1: the values aren't checked for validity beyond being non-null.
// Note 2: this code is stripped in release mode!
assert(() {
assert(json.containsKey(r'enabled'), 'Required key "MachineLearningAvailabilityChecksDto[enabled]" is missing from JSON.');
assert(json[r'enabled'] != null, 'Required key "MachineLearningAvailabilityChecksDto[enabled]" has a null value in JSON.');
assert(json.containsKey(r'interval'), 'Required key "MachineLearningAvailabilityChecksDto[interval]" is missing from JSON.');
assert(json[r'interval'] != null, 'Required key "MachineLearningAvailabilityChecksDto[interval]" has a null value in JSON.');
assert(json.containsKey(r'timeout'), 'Required key "MachineLearningAvailabilityChecksDto[timeout]" is missing from JSON.');
assert(json[r'timeout'] != null, 'Required key "MachineLearningAvailabilityChecksDto[timeout]" has a null value in JSON.');
return true;
}());
return MachineLearningAvailabilityChecksDto(
enabled: mapValueOfType<bool>(json, r'enabled')!,
interval: mapValueOfType<int>(json, r'interval')!,

Some files were not shown because too many files have changed in this diff Show More