merge main

This commit is contained in:
Ben McCann
2026-03-29 09:33:19 -07:00
2621 changed files with 246878 additions and 69315 deletions
+4
View File
@@ -19,8 +19,10 @@ class ActivityCreateDto {
required this.type,
});
/// Album ID
String albumId;
/// Asset ID (if activity is for an asset)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -29,6 +31,7 @@ class ActivityCreateDto {
///
String? assetId;
/// Comment text (required if type is comment)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -37,6 +40,7 @@ class ActivityCreateDto {
///
String? comment;
/// Activity type (like or comment)
ReactionType type;
@override
+5
View File
@@ -21,14 +21,19 @@ class ActivityResponseDto {
required this.user,
});
/// Asset ID (if activity is for an asset)
String? assetId;
/// Comment text (for comment activities)
String? comment;
/// Creation date
DateTime createdAt;
/// Activity ID
String id;
/// Activity type
ReactionType type;
UserResponseDto user;
@@ -17,8 +17,10 @@ class ActivityStatisticsResponseDto {
required this.likes,
});
/// Number of comments
int comments;
/// Number of likes
int likes;
@override
+1
View File
@@ -16,6 +16,7 @@ class AddUsersDto {
this.albumUsers = const [],
});
/// Album users to add
List<AlbumUserAddDto> albumUsers;
@override
@@ -16,6 +16,7 @@ class AdminOnboardingUpdateDto {
required this.isOnboarded,
});
/// Is admin onboarded
bool isOnboarded;
@override
+15
View File
@@ -34,22 +34,28 @@ class AlbumResponseDto {
required this.updatedAt,
});
/// Album name
String albumName;
/// Thumbnail asset ID
String? albumThumbnailAssetId;
List<AlbumUserResponseDto> albumUsers;
/// Number of assets
int assetCount;
List<AssetResponseDto> assets;
List<ContributorCountResponseDto> contributorCounts;
/// Creation date
DateTime createdAt;
/// Album description
String description;
/// End date (latest asset)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -58,12 +64,16 @@ class AlbumResponseDto {
///
DateTime? endDate;
/// Has shared link
bool hasSharedLink;
/// Album ID
String id;
/// Activity feed enabled
bool isActivityEnabled;
/// Last modified asset timestamp
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -72,6 +82,7 @@ class AlbumResponseDto {
///
DateTime? lastModifiedAssetTimestamp;
/// Asset sort order
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -82,10 +93,13 @@ class AlbumResponseDto {
UserResponseDto owner;
/// Owner user ID
String ownerId;
/// Is shared album
bool shared;
/// Start date (earliest asset)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -94,6 +108,7 @@ class AlbumResponseDto {
///
DateTime? startDate;
/// Last update date
DateTime updatedAt;
@override
@@ -18,10 +18,13 @@ class AlbumStatisticsResponseDto {
required this.shared,
});
/// Number of non-shared albums
int notShared;
/// Number of owned albums
int owned;
/// Number of shared albums
int shared;
@override
+2
View File
@@ -17,8 +17,10 @@ class AlbumUserAddDto {
required this.userId,
});
/// Album user role
AlbumUserRole role;
/// User ID
String userId;
@override
+2
View File
@@ -17,8 +17,10 @@ class AlbumUserCreateDto {
required this.userId,
});
/// Album user role
AlbumUserRole role;
/// User ID
String userId;
@override
+1
View File
@@ -17,6 +17,7 @@ class AlbumUserResponseDto {
required this.user,
});
/// Album user role
AlbumUserRole role;
UserResponseDto user;
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Album user role
class AlbumUserRole {
/// Instantiate a new enum with the provided [value].
const AlbumUserRole._(this.value);
+2
View File
@@ -17,8 +17,10 @@ class AlbumsAddAssetsDto {
this.assetIds = const [],
});
/// Album IDs
List<String> albumIds;
/// Asset IDs
List<String> assetIds;
@override
@@ -17,6 +17,7 @@ class AlbumsAddAssetsResponseDto {
required this.success,
});
/// Error reason
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -25,6 +26,7 @@ class AlbumsAddAssetsResponseDto {
///
BulkIdErrorReason? error;
/// Operation success
bool success;
@override
+1
View File
@@ -16,6 +16,7 @@ class AlbumsResponse {
this.defaultAssetOrder = AssetOrder.desc,
});
/// Default asset order for albums
AssetOrder defaultAssetOrder;
@override
+1
View File
@@ -16,6 +16,7 @@ class AlbumsUpdate {
this.defaultAssetOrder,
});
/// Default asset order for albums
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+2
View File
@@ -17,6 +17,7 @@ class APIKeyCreateDto {
this.permissions = const [],
});
/// API key name
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -25,6 +26,7 @@ class APIKeyCreateDto {
///
String? name;
/// List of permissions
List<Permission> permissions;
@override
@@ -19,6 +19,7 @@ class APIKeyCreateResponseDto {
APIKeyResponseDto apiKey;
/// API key secret (only shown once)
String secret;
@override
+5
View File
@@ -20,14 +20,19 @@ class APIKeyResponseDto {
required this.updatedAt,
});
/// Creation date
DateTime createdAt;
/// API key ID
String id;
/// API key name
String name;
/// List of permissions
List<Permission> permissions;
/// Last update date
DateTime updatedAt;
@override
+2
View File
@@ -17,6 +17,7 @@ class APIKeyUpdateDto {
this.permissions = const [],
});
/// API key name
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -25,6 +26,7 @@ class APIKeyUpdateDto {
///
String? name;
/// List of permissions
List<Permission> permissions;
@override
+2
View File
@@ -17,6 +17,7 @@ class AssetBulkDeleteDto {
this.ids = const [],
});
/// Force delete even if in use
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -25,6 +26,7 @@ class AssetBulkDeleteDto {
///
bool? force;
/// IDs to process
List<String> ids;
@override
+15 -7
View File
@@ -26,6 +26,7 @@ class AssetBulkUpdateDto {
this.visibility,
});
/// Original date and time
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -34,6 +35,7 @@ class AssetBulkUpdateDto {
///
String? dateTimeOriginal;
/// Relative time offset in seconds
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -42,6 +44,7 @@ class AssetBulkUpdateDto {
///
num? dateTimeRelative;
/// Asset description
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -50,10 +53,13 @@ class AssetBulkUpdateDto {
///
String? description;
/// Duplicate ID
String? duplicateId;
/// Asset IDs to update
List<String> ids;
/// Mark as favorite
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -62,6 +68,7 @@ class AssetBulkUpdateDto {
///
bool? isFavorite;
/// Latitude coordinate
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -70,6 +77,7 @@ class AssetBulkUpdateDto {
///
num? latitude;
/// Longitude coordinate
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -78,16 +86,13 @@ class AssetBulkUpdateDto {
///
num? longitude;
/// Rating in range [1-5], or null for unrated
///
/// Minimum value: -1
/// Maximum value: 5
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
num? rating;
/// Time zone (IANA timezone)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -96,6 +101,7 @@ class AssetBulkUpdateDto {
///
String? timeZone;
/// Asset visibility
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -211,7 +217,9 @@ class AssetBulkUpdateDto {
isFavorite: mapValueOfType<bool>(json, r'isFavorite'),
latitude: num.parse('${json[r'latitude']}'),
longitude: num.parse('${json[r'longitude']}'),
rating: num.parse('${json[r'rating']}'),
rating: json[r'rating'] == null
? null
: num.parse('${json[r'rating']}'),
timeZone: mapValueOfType<String>(json, r'timeZone'),
visibility: AssetVisibility.fromJson(json[r'visibility']),
);
@@ -16,6 +16,7 @@ class AssetBulkUploadCheckDto {
this.assets = const [],
});
/// Assets to check
List<AssetBulkUploadCheckItem> assets;
@override
+2 -1
View File
@@ -17,9 +17,10 @@ class AssetBulkUploadCheckItem {
required this.id,
});
/// base64 or hex encoded sha1 hash
/// Base64 or hex encoded SHA1 hash
String checksum;
/// Asset ID
String id;
@override
@@ -16,6 +16,7 @@ class AssetBulkUploadCheckResponseDto {
this.results = const [],
});
/// Upload check results
List<AssetBulkUploadCheckResult> results;
@override
@@ -20,8 +20,10 @@ class AssetBulkUploadCheckResult {
this.reason,
});
/// Upload action
AssetBulkUploadCheckResultActionEnum action;
/// Existing asset ID if duplicate
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -30,8 +32,10 @@ class AssetBulkUploadCheckResult {
///
String? assetId;
/// Asset ID
String id;
/// Whether existing asset is trashed
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -40,6 +44,7 @@ class AssetBulkUploadCheckResult {
///
bool? isTrashed;
/// Rejection reason if rejected
AssetBulkUploadCheckResultReasonEnum? reason;
@override
@@ -150,7 +155,7 @@ class AssetBulkUploadCheckResult {
};
}
/// Upload action
class AssetBulkUploadCheckResultActionEnum {
/// Instantiate a new enum with the provided [value].
const AssetBulkUploadCheckResultActionEnum._(this.value);
@@ -224,7 +229,7 @@ class AssetBulkUploadCheckResultActionEnumTypeTransformer {
}
/// Rejection reason if rejected
class AssetBulkUploadCheckResultReasonEnum {
/// Instantiate a new enum with the provided [value].
const AssetBulkUploadCheckResultReasonEnum._(this.value);
+7
View File
@@ -22,18 +22,25 @@ class AssetCopyDto {
required this.targetId,
});
/// Copy album associations
bool albums;
/// Copy favorite status
bool favorite;
/// Copy shared links
bool sharedLinks;
/// Copy sidecar file
bool sidecar;
/// Source asset ID
String sourceId;
/// Copy stack association
bool stack;
/// Target asset ID
String targetId;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetDeltaSyncDto {
this.userIds = const [],
});
/// Sync assets updated after this date
DateTime updatedAfter;
/// User IDs to sync
List<String> userIds;
@override
@@ -18,10 +18,13 @@ class AssetDeltaSyncResponseDto {
this.upserted = const [],
});
/// Deleted asset IDs
List<String> deleted;
/// Whether full sync is needed
bool needsFullSync;
/// Upserted assets
List<AssetResponseDto> upserted;
@override
+88
View File
@@ -0,0 +1,88 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
/// Type of edit action to perform
class AssetEditAction {
/// Instantiate a new enum with the provided [value].
const AssetEditAction._(this.value);
/// The underlying value of this enum member.
final String value;
@override
String toString() => value;
String toJson() => value;
static const crop = AssetEditAction._(r'crop');
static const rotate = AssetEditAction._(r'rotate');
static const mirror = AssetEditAction._(r'mirror');
/// List of all possible values in this [enum][AssetEditAction].
static const values = <AssetEditAction>[
crop,
rotate,
mirror,
];
static AssetEditAction? fromJson(dynamic value) => AssetEditActionTypeTransformer().decode(value);
static List<AssetEditAction> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditAction>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditAction.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
}
/// Transformation class that can [encode] an instance of [AssetEditAction] to String,
/// and [decode] dynamic data back to [AssetEditAction].
class AssetEditActionTypeTransformer {
factory AssetEditActionTypeTransformer() => _instance ??= const AssetEditActionTypeTransformer._();
const AssetEditActionTypeTransformer._();
String encode(AssetEditAction data) => data.value;
/// Decodes a [dynamic value][data] to a AssetEditAction.
///
/// If [allowNull] is true and the [dynamic value][data] cannot be decoded successfully,
/// then null is returned. However, if [allowNull] is false and the [dynamic value][data]
/// cannot be decoded successfully, then an [UnimplementedError] is thrown.
///
/// The [allowNull] is very handy when an API changes and a new enum value is added or removed,
/// and users are still using an old app with the old code.
AssetEditAction? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'crop': return AssetEditAction.crop;
case r'rotate': return AssetEditAction.rotate;
case r'mirror': return AssetEditAction.mirror;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
}
}
}
return null;
}
/// Singleton [AssetEditActionTypeTransformer] instance.
static AssetEditActionTypeTransformer? _instance;
}
+108
View File
@@ -0,0 +1,108 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetEditActionItemDto {
/// Returns a new [AssetEditActionItemDto] instance.
AssetEditActionItemDto({
required this.action,
required this.parameters,
});
/// Type of edit action to perform
AssetEditAction action;
AssetEditActionItemDtoParameters parameters;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDto &&
other.action == action &&
other.parameters == parameters;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(action.hashCode) +
(parameters.hashCode);
@override
String toString() => 'AssetEditActionItemDto[action=$action, parameters=$parameters]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'action'] = this.action;
json[r'parameters'] = this.parameters;
return json;
}
/// Returns a new [AssetEditActionItemDto] instance and imports its values from
/// [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>();
return AssetEditActionItemDto(
action: AssetEditAction.fromJson(json[r'action'])!,
parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!,
);
}
return null;
}
static List<AssetEditActionItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemDto> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemDto-objects as value to a dart map
static Map<String, List<AssetEditActionItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'action',
'parameters',
};
}
@@ -0,0 +1,153 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetEditActionItemDtoParameters {
/// Returns a new [AssetEditActionItemDtoParameters] instance.
AssetEditActionItemDtoParameters({
required this.height,
required this.width,
required this.x,
required this.y,
required this.angle,
required this.axis,
});
/// Height of the crop
///
/// Minimum value: 1
num height;
/// Width of the crop
///
/// Minimum value: 1
num width;
/// Top-Left X coordinate of crop
///
/// Minimum value: 0
num x;
/// Top-Left Y coordinate of crop
///
/// Minimum value: 0
num y;
/// Rotation angle in degrees
num angle;
/// Axis to mirror along
MirrorAxis axis;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemDtoParameters &&
other.height == height &&
other.width == width &&
other.x == x &&
other.y == y &&
other.angle == angle &&
other.axis == axis;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(height.hashCode) +
(width.hashCode) +
(x.hashCode) +
(y.hashCode) +
(angle.hashCode) +
(axis.hashCode);
@override
String toString() => 'AssetEditActionItemDtoParameters[height=$height, width=$width, x=$x, y=$y, angle=$angle, axis=$axis]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'height'] = this.height;
json[r'width'] = this.width;
json[r'x'] = this.x;
json[r'y'] = this.y;
json[r'angle'] = this.angle;
json[r'axis'] = this.axis;
return json;
}
/// Returns a new [AssetEditActionItemDtoParameters] instance and imports its values from
/// [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>();
return AssetEditActionItemDtoParameters(
height: num.parse('${json[r'height']}'),
width: num.parse('${json[r'width']}'),
x: num.parse('${json[r'x']}'),
y: num.parse('${json[r'y']}'),
angle: num.parse('${json[r'angle']}'),
axis: MirrorAxis.fromJson(json[r'axis'])!,
);
}
return null;
}
static List<AssetEditActionItemDtoParameters> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemDtoParameters>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemDtoParameters.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemDtoParameters> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemDtoParameters>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemDtoParameters.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemDtoParameters-objects as value to a dart map
static Map<String, List<AssetEditActionItemDtoParameters>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemDtoParameters>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemDtoParameters.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'height',
'width',
'x',
'y',
'angle',
'axis',
};
}
@@ -0,0 +1,116 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetEditActionItemResponseDto {
/// Returns a new [AssetEditActionItemResponseDto] instance.
AssetEditActionItemResponseDto({
required this.action,
required this.id,
required this.parameters,
});
/// Type of edit action to perform
AssetEditAction action;
String id;
AssetEditActionItemDtoParameters parameters;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditActionItemResponseDto &&
other.action == action &&
other.id == id &&
other.parameters == parameters;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(action.hashCode) +
(id.hashCode) +
(parameters.hashCode);
@override
String toString() => 'AssetEditActionItemResponseDto[action=$action, id=$id, parameters=$parameters]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'action'] = this.action;
json[r'id'] = this.id;
json[r'parameters'] = this.parameters;
return json;
}
/// Returns a new [AssetEditActionItemResponseDto] instance and imports its values from
/// [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>();
return AssetEditActionItemResponseDto(
action: AssetEditAction.fromJson(json[r'action'])!,
id: mapValueOfType<String>(json, r'id')!,
parameters: AssetEditActionItemDtoParameters.fromJson(json[r'parameters'])!,
);
}
return null;
}
static List<AssetEditActionItemResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditActionItemResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditActionItemResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditActionItemResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetEditActionItemResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditActionItemResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditActionItemResponseDto-objects as value to a dart map
static Map<String, List<AssetEditActionItemResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditActionItemResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditActionItemResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'action',
'id',
'parameters',
};
}
+100
View File
@@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetEditsCreateDto {
/// Returns a new [AssetEditsCreateDto] instance.
AssetEditsCreateDto({
this.edits = const [],
});
/// List of edit actions to apply (crop, rotate, or mirror)
List<AssetEditActionItemDto> edits;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditsCreateDto &&
_deepEquality.equals(other.edits, edits);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(edits.hashCode);
@override
String toString() => 'AssetEditsCreateDto[edits=$edits]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'edits'] = this.edits;
return json;
}
/// Returns a new [AssetEditsCreateDto] instance and imports its values from
/// [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>();
return AssetEditsCreateDto(
edits: AssetEditActionItemDto.listFromJson(json[r'edits']),
);
}
return null;
}
static List<AssetEditsCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditsCreateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditsCreateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditsCreateDto> mapFromJson(dynamic json) {
final map = <String, AssetEditsCreateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditsCreateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditsCreateDto-objects as value to a dart map
static Map<String, List<AssetEditsCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditsCreateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditsCreateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'edits',
};
}
+109
View File
@@ -0,0 +1,109 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetEditsResponseDto {
/// Returns a new [AssetEditsResponseDto] instance.
AssetEditsResponseDto({
required this.assetId,
this.edits = const [],
});
/// Asset ID these edits belong to
String assetId;
/// List of edit actions applied to the asset
List<AssetEditActionItemResponseDto> edits;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetEditsResponseDto &&
other.assetId == assetId &&
_deepEquality.equals(other.edits, edits);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(edits.hashCode);
@override
String toString() => 'AssetEditsResponseDto[assetId=$assetId, edits=$edits]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'edits'] = this.edits;
return json;
}
/// Returns a new [AssetEditsResponseDto] instance and imports its values from
/// [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>();
return AssetEditsResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
edits: AssetEditActionItemResponseDto.listFromJson(json[r'edits']),
);
}
return null;
}
static List<AssetEditsResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetEditsResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetEditsResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetEditsResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetEditsResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetEditsResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetEditsResponseDto-objects as value to a dart map
static Map<String, List<AssetEditsResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetEditsResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetEditsResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'edits',
};
}
+8
View File
@@ -23,20 +23,28 @@ class AssetFaceCreateDto {
required this.y,
});
/// Asset ID
String assetId;
/// Face bounding box height
int height;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Person ID
String personId;
/// Face bounding box width
int width;
/// Face bounding box X coordinate
int x;
/// Face bounding box Y coordinate
int y;
@override
+1
View File
@@ -16,6 +16,7 @@ class AssetFaceDeleteDto {
required this.force,
});
/// Force delete even if person has other faces
bool force;
@override
+9
View File
@@ -24,22 +24,31 @@ class AssetFaceResponseDto {
this.sourceType,
});
/// Bounding box X1 coordinate
int boundingBoxX1;
/// Bounding box X2 coordinate
int boundingBoxX2;
/// Bounding box Y1 coordinate
int boundingBoxY1;
/// Bounding box Y2 coordinate
int boundingBoxY2;
/// Face ID
String id;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Person associated with face
PersonResponseDto? person;
/// Face detection source type
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+1
View File
@@ -16,6 +16,7 @@ class AssetFaceUpdateDto {
this.data = const [],
});
/// Face update items
List<AssetFaceUpdateItem> data;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetFaceUpdateItem {
required this.personId,
});
/// Asset ID
String assetId;
/// Person ID
String personId;
@override
@@ -23,20 +23,28 @@ class AssetFaceWithoutPersonResponseDto {
this.sourceType,
});
/// Bounding box X1 coordinate
int boundingBoxX1;
/// Bounding box X2 coordinate
int boundingBoxX2;
/// Bounding box Y1 coordinate
int boundingBoxY1;
/// Bounding box Y2 coordinate
int boundingBoxY2;
/// Face ID
String id;
/// Image height in pixels
int imageHeight;
/// Image width in pixels
int imageWidth;
/// Face detection source type
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+5
View File
@@ -19,6 +19,7 @@ class AssetFullSyncDto {
this.userId,
});
/// Last asset ID (pagination)
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -27,11 +28,15 @@ class AssetFullSyncDto {
///
String? lastId;
/// Maximum number of assets to return
///
/// Minimum value: 1
int limit;
/// Sync assets updated until this date
DateTime updatedUntil;
/// Filter by user ID
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+1
View File
@@ -16,6 +16,7 @@ class AssetIdsDto {
this.assetIds = const [],
});
/// Asset IDs
List<String> assetIds;
@override
+4 -1
View File
@@ -18,10 +18,13 @@ class AssetIdsResponseDto {
required this.success,
});
/// Asset ID
String assetId;
/// Error reason if failed
AssetIdsResponseDtoErrorEnum? error;
/// Whether operation succeeded
bool success;
@override
@@ -116,7 +119,7 @@ class AssetIdsResponseDto {
};
}
/// Error reason if failed
class AssetIdsResponseDtoErrorEnum {
/// Instantiate a new enum with the provided [value].
const AssetIdsResponseDtoErrorEnum._(this.value);
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Job name
class AssetJobName {
/// Instantiate a new enum with the provided [value].
const AssetJobName._(this.value);
+2
View File
@@ -17,8 +17,10 @@ class AssetJobsDto {
required this.name,
});
/// Asset IDs
List<String> assetIds;
/// Job name
AssetJobName name;
@override
+2
View File
@@ -17,8 +17,10 @@ class AssetMediaResponseDto {
required this.status,
});
/// Asset media ID
String id;
/// Upload status
AssetMediaStatus status;
@override
+3
View File
@@ -23,12 +23,14 @@ class AssetMediaSize {
String toJson() => value;
static const original = AssetMediaSize._(r'original');
static const fullsize = AssetMediaSize._(r'fullsize');
static const preview = AssetMediaSize._(r'preview');
static const thumbnail = AssetMediaSize._(r'thumbnail');
/// List of all possible values in this [enum][AssetMediaSize].
static const values = <AssetMediaSize>[
original,
fullsize,
preview,
thumbnail,
@@ -70,6 +72,7 @@ class AssetMediaSizeTypeTransformer {
AssetMediaSize? decode(dynamic data, {bool allowNull = true}) {
if (data != null) {
switch (data) {
case r'original': return AssetMediaSize.original;
case r'fullsize': return AssetMediaSize.fullsize;
case r'preview': return AssetMediaSize.preview;
case r'thumbnail': return AssetMediaSize.thumbnail;
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Upload status
class AssetMediaStatus {
/// Instantiate a new enum with the provided [value].
const AssetMediaStatus._(this.value);
@@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetMetadataBulkDeleteDto {
/// Returns a new [AssetMetadataBulkDeleteDto] instance.
AssetMetadataBulkDeleteDto({
this.items = const [],
});
/// Metadata items to delete
List<AssetMetadataBulkDeleteItemDto> items;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteDto &&
_deepEquality.equals(other.items, items);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(items.hashCode);
@override
String toString() => 'AssetMetadataBulkDeleteDto[items=$items]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'items'] = this.items;
return json;
}
/// Returns a new [AssetMetadataBulkDeleteDto] instance and imports its values from
/// [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>();
return AssetMetadataBulkDeleteDto(
items: AssetMetadataBulkDeleteItemDto.listFromJson(json[r'items']),
);
}
return null;
}
static List<AssetMetadataBulkDeleteDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkDeleteDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkDeleteDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkDeleteDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkDeleteDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkDeleteDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkDeleteDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkDeleteDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkDeleteDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkDeleteDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'items',
};
}
@@ -0,0 +1,109 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetMetadataBulkDeleteItemDto {
/// Returns a new [AssetMetadataBulkDeleteItemDto] instance.
AssetMetadataBulkDeleteItemDto({
required this.assetId,
required this.key,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkDeleteItemDto &&
other.assetId == assetId &&
other.key == key;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode);
@override
String toString() => 'AssetMetadataBulkDeleteItemDto[assetId=$assetId, key=$key]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
return json;
}
/// Returns a new [AssetMetadataBulkDeleteItemDto] instance and imports its values from
/// [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>();
return AssetMetadataBulkDeleteItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
);
}
return null;
}
static List<AssetMetadataBulkDeleteItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkDeleteItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkDeleteItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkDeleteItemDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkDeleteItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkDeleteItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkDeleteItemDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkDeleteItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkDeleteItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkDeleteItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
};
}
@@ -0,0 +1,127 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetMetadataBulkResponseDto {
/// Returns a new [AssetMetadataBulkResponseDto] instance.
AssetMetadataBulkResponseDto({
required this.assetId,
required this.key,
required this.updatedAt,
required this.value,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
/// Last update date
DateTime updatedAt;
/// Metadata value (object)
Object value;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkResponseDto &&
other.assetId == assetId &&
other.key == key &&
other.updatedAt == updatedAt &&
other.value == value;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode) +
(updatedAt.hashCode) +
(value.hashCode);
@override
String toString() => 'AssetMetadataBulkResponseDto[assetId=$assetId, key=$key, updatedAt=$updatedAt, value=$value]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'value'] = this.value;
return json;
}
/// Returns a new [AssetMetadataBulkResponseDto] instance and imports its values from
/// [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>();
return AssetMetadataBulkResponseDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
return null;
}
static List<AssetMetadataBulkResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkResponseDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkResponseDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
'updatedAt',
'value',
};
}
@@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetMetadataBulkUpsertDto {
/// Returns a new [AssetMetadataBulkUpsertDto] instance.
AssetMetadataBulkUpsertDto({
this.items = const [],
});
/// Metadata items to upsert
List<AssetMetadataBulkUpsertItemDto> items;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertDto &&
_deepEquality.equals(other.items, items);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(items.hashCode);
@override
String toString() => 'AssetMetadataBulkUpsertDto[items=$items]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'items'] = this.items;
return json;
}
/// Returns a new [AssetMetadataBulkUpsertDto] instance and imports its values from
/// [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>();
return AssetMetadataBulkUpsertDto(
items: AssetMetadataBulkUpsertItemDto.listFromJson(json[r'items']),
);
}
return null;
}
static List<AssetMetadataBulkUpsertDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkUpsertDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkUpsertDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkUpsertDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkUpsertDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkUpsertDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkUpsertDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkUpsertDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkUpsertDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkUpsertDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'items',
};
}
@@ -0,0 +1,118 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class AssetMetadataBulkUpsertItemDto {
/// Returns a new [AssetMetadataBulkUpsertItemDto] instance.
AssetMetadataBulkUpsertItemDto({
required this.assetId,
required this.key,
required this.value,
});
/// Asset ID
String assetId;
/// Metadata key
String key;
/// Metadata value (object)
Object value;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetMetadataBulkUpsertItemDto &&
other.assetId == assetId &&
other.key == key &&
other.value == value;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetId.hashCode) +
(key.hashCode) +
(value.hashCode);
@override
String toString() => 'AssetMetadataBulkUpsertItemDto[assetId=$assetId, key=$key, value=$value]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetId'] = this.assetId;
json[r'key'] = this.key;
json[r'value'] = this.value;
return json;
}
/// Returns a new [AssetMetadataBulkUpsertItemDto] instance and imports its values from
/// [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>();
return AssetMetadataBulkUpsertItemDto(
assetId: mapValueOfType<String>(json, r'assetId')!,
key: mapValueOfType<String>(json, r'key')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
return null;
}
static List<AssetMetadataBulkUpsertItemDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AssetMetadataBulkUpsertItemDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AssetMetadataBulkUpsertItemDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AssetMetadataBulkUpsertItemDto> mapFromJson(dynamic json) {
final map = <String, AssetMetadataBulkUpsertItemDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AssetMetadataBulkUpsertItemDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AssetMetadataBulkUpsertItemDto-objects as value to a dart map
static Map<String, List<AssetMetadataBulkUpsertItemDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AssetMetadataBulkUpsertItemDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AssetMetadataBulkUpsertItemDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetId',
'key',
'value',
};
}
+5 -2
View File
@@ -18,10 +18,13 @@ class AssetMetadataResponseDto {
required this.value,
});
AssetMetadataKey key;
/// Metadata key
String key;
/// Last update date
DateTime updatedAt;
/// Metadata value (object)
Object value;
@override
@@ -57,7 +60,7 @@ class AssetMetadataResponseDto {
final json = value.cast<String, dynamic>();
return AssetMetadataResponseDto(
key: AssetMetadataKey.fromJson(json[r'key'])!,
key: mapValueOfType<String>(json, r'key')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
value: mapValueOfType<Object>(json, r'value')!,
);
+1
View File
@@ -16,6 +16,7 @@ class AssetMetadataUpsertDto {
this.items = const [],
});
/// Metadata items to upsert
List<AssetMetadataUpsertItemDto> items;
@override
@@ -17,8 +17,10 @@ class AssetMetadataUpsertItemDto {
required this.value,
});
AssetMetadataKey key;
/// Metadata key
String key;
/// Metadata value (object)
Object value;
@override
@@ -51,7 +53,7 @@ class AssetMetadataUpsertItemDto {
final json = value.cast<String, dynamic>();
return AssetMetadataUpsertItemDto(
key: AssetMetadataKey.fromJson(json[r'key'])!,
key: mapValueOfType<String>(json, r'key')!,
value: mapValueOfType<Object>(json, r'value')!,
);
}
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Asset sort order
class AssetOrder {
/// Instantiate a new enum with the provided [value].
const AssetOrder._(this.value);
+63 -6
View File
@@ -23,8 +23,10 @@ class AssetResponseDto {
required this.fileCreatedAt,
required this.fileModifiedAt,
required this.hasMetadata,
required this.height,
required this.id,
required this.isArchived,
required this.isEdited,
required this.isFavorite,
required this.isOffline,
required this.isTrashed,
@@ -45,20 +47,25 @@ class AssetResponseDto {
this.unassignedFaces = const [],
required this.updatedAt,
required this.visibility,
required this.width,
});
/// base64 encoded sha1 hash
/// Base64 encoded SHA1 hash
String checksum;
/// The UTC timestamp when the asset was originally uploaded to Immich.
DateTime createdAt;
/// Device asset ID
String deviceAssetId;
/// Device ID
String deviceId;
/// Duplicate group ID
String? duplicateId;
/// Video duration (for videos)
String duration;
///
@@ -75,28 +82,43 @@ class AssetResponseDto {
/// The UTC timestamp when the file was last modified on the filesystem. This reflects the last time the physical file was changed, which may be different from when the photo was originally taken.
DateTime fileModifiedAt;
/// Whether asset has metadata
bool hasMetadata;
/// Asset height
num? height;
/// Asset ID
String id;
/// Is archived
bool isArchived;
/// Is edited
bool isEdited;
/// Is favorite
bool isFavorite;
/// Is offline
bool isOffline;
/// Is trashed
bool isTrashed;
/// This property was deprecated in v1.106.0
/// Library ID
String? libraryId;
/// Live photo video ID
String? livePhotoVideoId;
/// The local date and time when the photo/video was taken, derived from EXIF metadata. This represents the photographer's local time regardless of timezone, stored as a timezone-agnostic timestamp. Used for timeline grouping by \"local\" days and months.
DateTime localDateTime;
/// Original file name
String originalFileName;
/// Original MIME type
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -105,6 +127,7 @@ class AssetResponseDto {
///
String? originalMimeType;
/// Original file path
String originalPath;
///
@@ -115,11 +138,12 @@ class AssetResponseDto {
///
UserResponseDto? owner;
/// Owner user ID
String ownerId;
List<PersonWithFacesResponseDto> people;
/// This property was deprecated in v1.113.0
/// Is resized
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -132,8 +156,10 @@ class AssetResponseDto {
List<TagResponseDto> tags;
/// Thumbhash for thumbnail generation (base64) also used as the c query param for thumbnail cache busting.
String? thumbhash;
/// Asset type
AssetTypeEnum type;
List<AssetFaceWithoutPersonResponseDto> unassignedFaces;
@@ -141,8 +167,12 @@ class AssetResponseDto {
/// The UTC timestamp when the asset record was last updated in the database. This is automatically maintained by the database and reflects when any field in the asset was last modified.
DateTime updatedAt;
/// Asset visibility
AssetVisibility visibility;
/// Asset width
num? width;
@override
bool operator ==(Object other) => identical(this, other) || other is AssetResponseDto &&
other.checksum == checksum &&
@@ -155,8 +185,10 @@ class AssetResponseDto {
other.fileCreatedAt == fileCreatedAt &&
other.fileModifiedAt == fileModifiedAt &&
other.hasMetadata == hasMetadata &&
other.height == height &&
other.id == id &&
other.isArchived == isArchived &&
other.isEdited == isEdited &&
other.isFavorite == isFavorite &&
other.isOffline == isOffline &&
other.isTrashed == isTrashed &&
@@ -176,7 +208,8 @@ class AssetResponseDto {
other.type == type &&
_deepEquality.equals(other.unassignedFaces, unassignedFaces) &&
other.updatedAt == updatedAt &&
other.visibility == visibility;
other.visibility == visibility &&
other.width == width;
@override
int get hashCode =>
@@ -191,8 +224,10 @@ class AssetResponseDto {
(fileCreatedAt.hashCode) +
(fileModifiedAt.hashCode) +
(hasMetadata.hashCode) +
(height == null ? 0 : height!.hashCode) +
(id.hashCode) +
(isArchived.hashCode) +
(isEdited.hashCode) +
(isFavorite.hashCode) +
(isOffline.hashCode) +
(isTrashed.hashCode) +
@@ -212,10 +247,11 @@ class AssetResponseDto {
(type.hashCode) +
(unassignedFaces.hashCode) +
(updatedAt.hashCode) +
(visibility.hashCode);
(visibility.hashCode) +
(width == null ? 0 : width!.hashCode);
@override
String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, id=$id, isArchived=$isArchived, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, updatedAt=$updatedAt, visibility=$visibility]';
String toString() => 'AssetResponseDto[checksum=$checksum, createdAt=$createdAt, deviceAssetId=$deviceAssetId, deviceId=$deviceId, duplicateId=$duplicateId, duration=$duration, exifInfo=$exifInfo, fileCreatedAt=$fileCreatedAt, fileModifiedAt=$fileModifiedAt, hasMetadata=$hasMetadata, height=$height, id=$id, isArchived=$isArchived, isEdited=$isEdited, isFavorite=$isFavorite, isOffline=$isOffline, isTrashed=$isTrashed, libraryId=$libraryId, livePhotoVideoId=$livePhotoVideoId, localDateTime=$localDateTime, originalFileName=$originalFileName, originalMimeType=$originalMimeType, originalPath=$originalPath, owner=$owner, ownerId=$ownerId, people=$people, resized=$resized, stack=$stack, tags=$tags, thumbhash=$thumbhash, type=$type, unassignedFaces=$unassignedFaces, updatedAt=$updatedAt, visibility=$visibility, width=$width]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -237,8 +273,14 @@ class AssetResponseDto {
json[r'fileCreatedAt'] = this.fileCreatedAt.toUtc().toIso8601String();
json[r'fileModifiedAt'] = this.fileModifiedAt.toUtc().toIso8601String();
json[r'hasMetadata'] = this.hasMetadata;
if (this.height != null) {
json[r'height'] = this.height;
} else {
// json[r'height'] = null;
}
json[r'id'] = this.id;
json[r'isArchived'] = this.isArchived;
json[r'isEdited'] = this.isEdited;
json[r'isFavorite'] = this.isFavorite;
json[r'isOffline'] = this.isOffline;
json[r'isTrashed'] = this.isTrashed;
@@ -287,6 +329,11 @@ class AssetResponseDto {
json[r'unassignedFaces'] = this.unassignedFaces;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
json[r'visibility'] = this.visibility;
if (this.width != null) {
json[r'width'] = this.width;
} else {
// json[r'width'] = null;
}
return json;
}
@@ -309,8 +356,12 @@ class AssetResponseDto {
fileCreatedAt: mapDateTime(json, r'fileCreatedAt', r'')!,
fileModifiedAt: mapDateTime(json, r'fileModifiedAt', r'')!,
hasMetadata: mapValueOfType<bool>(json, r'hasMetadata')!,
height: json[r'height'] == null
? null
: num.parse('${json[r'height']}'),
id: mapValueOfType<String>(json, r'id')!,
isArchived: mapValueOfType<bool>(json, r'isArchived')!,
isEdited: mapValueOfType<bool>(json, r'isEdited')!,
isFavorite: mapValueOfType<bool>(json, r'isFavorite')!,
isOffline: mapValueOfType<bool>(json, r'isOffline')!,
isTrashed: mapValueOfType<bool>(json, r'isTrashed')!,
@@ -331,6 +382,9 @@ class AssetResponseDto {
unassignedFaces: AssetFaceWithoutPersonResponseDto.listFromJson(json[r'unassignedFaces']),
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
visibility: AssetVisibility.fromJson(json[r'visibility'])!,
width: json[r'width'] == null
? null
: num.parse('${json[r'width']}'),
);
}
return null;
@@ -386,8 +440,10 @@ class AssetResponseDto {
'fileCreatedAt',
'fileModifiedAt',
'hasMetadata',
'height',
'id',
'isArchived',
'isEdited',
'isFavorite',
'isOffline',
'isTrashed',
@@ -399,6 +455,7 @@ class AssetResponseDto {
'type',
'updatedAt',
'visibility',
'width',
};
}
+3
View File
@@ -18,10 +18,13 @@ class AssetStackResponseDto {
required this.primaryAssetId,
});
/// Number of assets in stack
int assetCount;
/// Stack ID
String id;
/// Primary asset ID
String primaryAssetId;
@override
+3
View File
@@ -18,10 +18,13 @@ class AssetStatsResponseDto {
required this.videos,
});
/// Number of images
int images;
/// Total number of assets
int total;
/// Number of videos
int videos;
@override
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Asset type
class AssetTypeEnum {
/// Instantiate a new enum with the provided [value].
const AssetTypeEnum._(this.value);
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Asset visibility
class AssetVisibility {
/// Instantiate a new enum with the provided [value].
const AssetVisibility._(this.value);
+4 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Target audio codec
class AudioCodec {
/// Instantiate a new enum with the provided [value].
const AudioCodec._(this.value);
@@ -26,6 +26,7 @@ class AudioCodec {
static const mp3 = AudioCodec._(r'mp3');
static const aac = AudioCodec._(r'aac');
static const libopus = AudioCodec._(r'libopus');
static const opus = AudioCodec._(r'opus');
static const pcmS16le = AudioCodec._(r'pcm_s16le');
/// List of all possible values in this [enum][AudioCodec].
@@ -33,6 +34,7 @@ class AudioCodec {
mp3,
aac,
libopus,
opus,
pcmS16le,
];
@@ -75,6 +77,7 @@ class AudioCodecTypeTransformer {
case r'mp3': return AudioCodec.mp3;
case r'aac': return AudioCodec.aac;
case r'libopus': return AudioCodec.libopus;
case r'opus': return AudioCodec.opus;
case r'pcm_s16le': return AudioCodec.pcmS16le;
default:
if (!allowNull) {
+5
View File
@@ -20,6 +20,7 @@ class AuthStatusResponseDto {
this.pinExpiresAt,
});
/// Session expiration date
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -28,12 +29,16 @@ class AuthStatusResponseDto {
///
String? expiresAt;
/// Is elevated session
bool isElevated;
/// Has password set
bool password;
/// Has PIN code set
bool pinCode;
/// PIN expiration date
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+1
View File
@@ -16,6 +16,7 @@ class AvatarUpdate {
this.color,
});
/// Avatar color
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+4 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Error reason
class BulkIdErrorReason {
/// Instantiate a new enum with the provided [value].
const BulkIdErrorReason._(this.value);
@@ -27,6 +27,7 @@ class BulkIdErrorReason {
static const noPermission = BulkIdErrorReason._(r'no_permission');
static const notFound = BulkIdErrorReason._(r'not_found');
static const unknown = BulkIdErrorReason._(r'unknown');
static const validation = BulkIdErrorReason._(r'validation');
/// List of all possible values in this [enum][BulkIdErrorReason].
static const values = <BulkIdErrorReason>[
@@ -34,6 +35,7 @@ class BulkIdErrorReason {
noPermission,
notFound,
unknown,
validation,
];
static BulkIdErrorReason? fromJson(dynamic value) => BulkIdErrorReasonTypeTransformer().decode(value);
@@ -76,6 +78,7 @@ class BulkIdErrorReasonTypeTransformer {
case r'no_permission': return BulkIdErrorReason.noPermission;
case r'not_found': return BulkIdErrorReason.notFound;
case r'unknown': return BulkIdErrorReason.unknown;
case r'validation': return BulkIdErrorReason.validation;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
+25 -2
View File
@@ -14,19 +14,32 @@ class BulkIdResponseDto {
/// Returns a new [BulkIdResponseDto] instance.
BulkIdResponseDto({
this.error,
this.errorMessage,
required this.id,
required this.success,
});
/// Error reason if failed
BulkIdResponseDtoErrorEnum? error;
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? errorMessage;
/// ID
String id;
/// Whether operation succeeded
bool success;
@override
bool operator ==(Object other) => identical(this, other) || other is BulkIdResponseDto &&
other.error == error &&
other.errorMessage == errorMessage &&
other.id == id &&
other.success == success;
@@ -34,11 +47,12 @@ class BulkIdResponseDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(error == null ? 0 : error!.hashCode) +
(errorMessage == null ? 0 : errorMessage!.hashCode) +
(id.hashCode) +
(success.hashCode);
@override
String toString() => 'BulkIdResponseDto[error=$error, id=$id, success=$success]';
String toString() => 'BulkIdResponseDto[error=$error, errorMessage=$errorMessage, id=$id, success=$success]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -46,6 +60,11 @@ class BulkIdResponseDto {
json[r'error'] = this.error;
} else {
// json[r'error'] = null;
}
if (this.errorMessage != null) {
json[r'errorMessage'] = this.errorMessage;
} else {
// json[r'errorMessage'] = null;
}
json[r'id'] = this.id;
json[r'success'] = this.success;
@@ -62,6 +81,7 @@ class BulkIdResponseDto {
return BulkIdResponseDto(
error: BulkIdResponseDtoErrorEnum.fromJson(json[r'error']),
errorMessage: mapValueOfType<String>(json, r'errorMessage'),
id: mapValueOfType<String>(json, r'id')!,
success: mapValueOfType<bool>(json, r'success')!,
);
@@ -116,7 +136,7 @@ class BulkIdResponseDto {
};
}
/// Error reason if failed
class BulkIdResponseDtoErrorEnum {
/// Instantiate a new enum with the provided [value].
const BulkIdResponseDtoErrorEnum._(this.value);
@@ -133,6 +153,7 @@ class BulkIdResponseDtoErrorEnum {
static const noPermission = BulkIdResponseDtoErrorEnum._(r'no_permission');
static const notFound = BulkIdResponseDtoErrorEnum._(r'not_found');
static const unknown = BulkIdResponseDtoErrorEnum._(r'unknown');
static const validation = BulkIdResponseDtoErrorEnum._(r'validation');
/// List of all possible values in this [enum][BulkIdResponseDtoErrorEnum].
static const values = <BulkIdResponseDtoErrorEnum>[
@@ -140,6 +161,7 @@ class BulkIdResponseDtoErrorEnum {
noPermission,
notFound,
unknown,
validation,
];
static BulkIdResponseDtoErrorEnum? fromJson(dynamic value) => BulkIdResponseDtoErrorEnumTypeTransformer().decode(value);
@@ -182,6 +204,7 @@ class BulkIdResponseDtoErrorEnumTypeTransformer {
case r'no_permission': return BulkIdResponseDtoErrorEnum.noPermission;
case r'not_found': return BulkIdResponseDtoErrorEnum.notFound;
case r'unknown': return BulkIdResponseDtoErrorEnum.unknown;
case r'validation': return BulkIdResponseDtoErrorEnum.validation;
default:
if (!allowNull) {
throw ArgumentError('Unknown enum value to decode: $data');
+1
View File
@@ -16,6 +16,7 @@ class BulkIdsDto {
this.ids = const [],
});
/// IDs to process
List<String> ids;
@override
+1
View File
@@ -16,6 +16,7 @@ class CastResponse {
this.gCastEnabled = false,
});
/// Whether Google Cast is enabled
bool gCastEnabled;
@override
+1
View File
@@ -16,6 +16,7 @@ class CastUpdate {
this.gCastEnabled,
});
/// Whether Google Cast is enabled
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+3
View File
@@ -18,10 +18,13 @@ class ChangePasswordDto {
required this.password,
});
/// Invalidate all other sessions
bool invalidateSessions;
/// New password (min 8 characters)
String newPassword;
/// Current password
String password;
@override
+2
View File
@@ -17,8 +17,10 @@ class CheckExistingAssetsDto {
required this.deviceId,
});
/// Device asset IDs to check
List<String> deviceAssetIds;
/// Device ID
String deviceId;
@override
@@ -16,6 +16,7 @@ class CheckExistingAssetsResponseDto {
this.existingIds = const [],
});
/// Existing asset IDs
List<String> existingIds;
@override
+2
View File
@@ -17,8 +17,10 @@ class CLIPConfig {
required this.modelName,
});
/// Whether the task is enabled
bool enabled;
/// Name of the model to use
String modelName;
@override
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// Colorspace
class Colorspace {
/// Instantiate a new enum with the provided [value].
const Colorspace._(this.value);
@@ -17,8 +17,10 @@ class ContributorCountResponseDto {
required this.userId,
});
/// Number of assets contributed
int assetCount;
/// User ID
String userId;
@override
+1 -1
View File
@@ -10,7 +10,7 @@
part of openapi.api;
/// CQ mode
class CQMode {
/// Instantiate a new enum with the provided [value].
const CQMode._(this.value);
+4
View File
@@ -19,12 +19,16 @@ class CreateAlbumDto {
this.description,
});
/// Album name
String albumName;
/// Album users
List<AlbumUserCreateDto> albumUsers;
/// Initial asset IDs
List<String> assetIds;
/// Album description
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+4
View File
@@ -19,10 +19,13 @@ class CreateLibraryDto {
required this.ownerId,
});
/// Exclusion patterns (max 128)
Set<String> exclusionPatterns;
/// Import paths (max 128)
Set<String> importPaths;
/// Library name
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -31,6 +34,7 @@ class CreateLibraryDto {
///
String? name;
/// Owner user ID
String ownerId;
@override
@@ -18,10 +18,13 @@ class CreateProfileImageResponseDto {
required this.userId,
});
/// Profile image change date
DateTime profileChangedAt;
/// Profile image file path
String profileImagePath;
/// User ID
String userId;
@override
+135
View File
@@ -0,0 +1,135 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class CropParameters {
/// Returns a new [CropParameters] instance.
CropParameters({
required this.height,
required this.width,
required this.x,
required this.y,
});
/// Height of the crop
///
/// Minimum value: 1
num height;
/// Width of the crop
///
/// Minimum value: 1
num width;
/// Top-Left X coordinate of crop
///
/// Minimum value: 0
num x;
/// Top-Left Y coordinate of crop
///
/// Minimum value: 0
num y;
@override
bool operator ==(Object other) => identical(this, other) || other is CropParameters &&
other.height == height &&
other.width == width &&
other.x == x &&
other.y == y;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(height.hashCode) +
(width.hashCode) +
(x.hashCode) +
(y.hashCode);
@override
String toString() => 'CropParameters[height=$height, width=$width, x=$x, y=$y]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'height'] = this.height;
json[r'width'] = this.width;
json[r'x'] = this.x;
json[r'y'] = this.y;
return json;
}
/// Returns a new [CropParameters] instance and imports its values from
/// [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>();
return CropParameters(
height: num.parse('${json[r'height']}'),
width: num.parse('${json[r'width']}'),
x: num.parse('${json[r'x']}'),
y: num.parse('${json[r'y']}'),
);
}
return null;
}
static List<CropParameters> listFromJson(dynamic json, {bool growable = false,}) {
final result = <CropParameters>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = CropParameters.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, CropParameters> mapFromJson(dynamic json) {
final map = <String, CropParameters>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = CropParameters.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of CropParameters-objects as value to a dart map
static Map<String, List<CropParameters>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<CropParameters>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = CropParameters.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'height',
'width',
'x',
'y',
};
}
+4
View File
@@ -18,10 +18,14 @@ class DatabaseBackupConfig {
required this.keepLastAmount,
});
/// Cron expression
String cronExpression;
/// Enabled
bool enabled;
/// Keep last amount
///
/// Minimum value: 1
num keepLastAmount;
+101
View File
@@ -0,0 +1,101 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DatabaseBackupDeleteDto {
/// Returns a new [DatabaseBackupDeleteDto] instance.
DatabaseBackupDeleteDto({
this.backups = const [],
});
List<String> backups;
@override
bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDeleteDto &&
_deepEquality.equals(other.backups, backups);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backups.hashCode);
@override
String toString() => 'DatabaseBackupDeleteDto[backups=$backups]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backups'] = this.backups;
return json;
}
/// Returns a new [DatabaseBackupDeleteDto] instance and imports its values from
/// [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>();
return DatabaseBackupDeleteDto(
backups: json[r'backups'] is Iterable
? (json[r'backups'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<DatabaseBackupDeleteDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DatabaseBackupDeleteDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DatabaseBackupDeleteDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DatabaseBackupDeleteDto> mapFromJson(dynamic json) {
final map = <String, DatabaseBackupDeleteDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DatabaseBackupDeleteDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DatabaseBackupDeleteDto-objects as value to a dart map
static Map<String, List<DatabaseBackupDeleteDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DatabaseBackupDeleteDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DatabaseBackupDeleteDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backups',
};
}
+107
View File
@@ -0,0 +1,107 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DatabaseBackupDto {
/// Returns a new [DatabaseBackupDto] instance.
DatabaseBackupDto({
required this.filename,
required this.filesize,
});
String filename;
num filesize;
@override
bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupDto &&
other.filename == filename &&
other.filesize == filesize;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(filename.hashCode) +
(filesize.hashCode);
@override
String toString() => 'DatabaseBackupDto[filename=$filename, filesize=$filesize]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'filename'] = this.filename;
json[r'filesize'] = this.filesize;
return json;
}
/// Returns a new [DatabaseBackupDto] instance and imports its values from
/// [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>();
return DatabaseBackupDto(
filename: mapValueOfType<String>(json, r'filename')!,
filesize: num.parse('${json[r'filesize']}'),
);
}
return null;
}
static List<DatabaseBackupDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DatabaseBackupDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DatabaseBackupDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DatabaseBackupDto> mapFromJson(dynamic json) {
final map = <String, DatabaseBackupDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DatabaseBackupDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DatabaseBackupDto-objects as value to a dart map
static Map<String, List<DatabaseBackupDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DatabaseBackupDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DatabaseBackupDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'filename',
'filesize',
};
}
@@ -0,0 +1,99 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DatabaseBackupListResponseDto {
/// Returns a new [DatabaseBackupListResponseDto] instance.
DatabaseBackupListResponseDto({
this.backups = const [],
});
List<DatabaseBackupDto> backups;
@override
bool operator ==(Object other) => identical(this, other) || other is DatabaseBackupListResponseDto &&
_deepEquality.equals(other.backups, backups);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(backups.hashCode);
@override
String toString() => 'DatabaseBackupListResponseDto[backups=$backups]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'backups'] = this.backups;
return json;
}
/// Returns a new [DatabaseBackupListResponseDto] instance and imports its values from
/// [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>();
return DatabaseBackupListResponseDto(
backups: DatabaseBackupDto.listFromJson(json[r'backups']),
);
}
return null;
}
static List<DatabaseBackupListResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DatabaseBackupListResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DatabaseBackupListResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DatabaseBackupListResponseDto> mapFromJson(dynamic json) {
final map = <String, DatabaseBackupListResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DatabaseBackupListResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DatabaseBackupListResponseDto-objects as value to a dart map
static Map<String, List<DatabaseBackupListResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DatabaseBackupListResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DatabaseBackupListResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'backups',
};
}
+120
View File
@@ -0,0 +1,120 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DownloadArchiveDto {
/// Returns a new [DownloadArchiveDto] instance.
DownloadArchiveDto({
this.assetIds = const [],
this.edited,
});
/// Asset IDs
List<String> assetIds;
/// Download edited asset if available
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
bool? edited;
@override
bool operator ==(Object other) => identical(this, other) || other is DownloadArchiveDto &&
_deepEquality.equals(other.assetIds, assetIds) &&
other.edited == edited;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assetIds.hashCode) +
(edited == null ? 0 : edited!.hashCode);
@override
String toString() => 'DownloadArchiveDto[assetIds=$assetIds, edited=$edited]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assetIds'] = this.assetIds;
if (this.edited != null) {
json[r'edited'] = this.edited;
} else {
// json[r'edited'] = null;
}
return json;
}
/// Returns a new [DownloadArchiveDto] instance and imports its values from
/// [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>();
return DownloadArchiveDto(
assetIds: json[r'assetIds'] is Iterable
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
edited: mapValueOfType<bool>(json, r'edited'),
);
}
return null;
}
static List<DownloadArchiveDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DownloadArchiveDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DownloadArchiveDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DownloadArchiveDto> mapFromJson(dynamic json) {
final map = <String, DownloadArchiveDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DownloadArchiveDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DownloadArchiveDto-objects as value to a dart map
static Map<String, List<DownloadArchiveDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DownloadArchiveDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DownloadArchiveDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'assetIds',
};
}
+2
View File
@@ -17,8 +17,10 @@ class DownloadArchiveInfo {
required this.size,
});
/// Asset IDs in this archive
List<String> assetIds;
/// Archive size in bytes
int size;
@override
+5
View File
@@ -19,6 +19,7 @@ class DownloadInfoDto {
this.userId,
});
/// Album ID to download
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -27,6 +28,8 @@ class DownloadInfoDto {
///
String? albumId;
/// Archive size limit in bytes
///
/// Minimum value: 1
///
/// Please note: This property should have been non-nullable! Since the specification file
@@ -36,8 +39,10 @@ class DownloadInfoDto {
///
int? archiveSize;
/// Asset IDs to download
List<String> assetIds;
/// User ID to download assets from
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+2
View File
@@ -17,8 +17,10 @@ class DownloadResponse {
this.includeEmbeddedVideos = false,
});
/// Maximum archive size in bytes
int archiveSize;
/// Whether to include embedded videos in downloads
bool includeEmbeddedVideos;
@override
+2
View File
@@ -17,8 +17,10 @@ class DownloadResponseDto {
required this.totalSize,
});
/// Archive information
List<DownloadArchiveInfo> archives;
/// Total size in bytes
int totalSize;
@override
+3
View File
@@ -17,6 +17,8 @@ class DownloadUpdate {
this.includeEmbeddedVideos,
});
/// Maximum archive size in bytes
///
/// Minimum value: 1
///
/// Please note: This property should have been non-nullable! Since the specification file
@@ -26,6 +28,7 @@ class DownloadUpdate {
///
int? archiveSize;
/// Whether to include embedded videos in downloads
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -17,8 +17,11 @@ class DuplicateDetectionConfig {
required this.maxDistance,
});
/// Whether the task is enabled
bool enabled;
/// Maximum distance threshold for duplicate detection
///
/// Minimum value: 0.001
/// Maximum value: 0.1
double maxDistance;
+100
View File
@@ -0,0 +1,100 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DuplicateResolveDto {
/// Returns a new [DuplicateResolveDto] instance.
DuplicateResolveDto({
this.groups = const [],
});
/// List of duplicate groups to resolve
List<DuplicateResolveGroupDto> groups;
@override
bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveDto &&
_deepEquality.equals(other.groups, groups);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(groups.hashCode);
@override
String toString() => 'DuplicateResolveDto[groups=$groups]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'groups'] = this.groups;
return json;
}
/// Returns a new [DuplicateResolveDto] instance and imports its values from
/// [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>();
return DuplicateResolveDto(
groups: DuplicateResolveGroupDto.listFromJson(json[r'groups']),
);
}
return null;
}
static List<DuplicateResolveDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DuplicateResolveDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DuplicateResolveDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DuplicateResolveDto> mapFromJson(dynamic json) {
final map = <String, DuplicateResolveDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DuplicateResolveDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DuplicateResolveDto-objects as value to a dart map
static Map<String, List<DuplicateResolveDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DuplicateResolveDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DuplicateResolveDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'groups',
};
}
+121
View File
@@ -0,0 +1,121 @@
//
// AUTO-GENERATED FILE, DO NOT MODIFY!
//
// @dart=2.18
// ignore_for_file: unused_element, unused_import
// ignore_for_file: always_put_required_named_parameters_first
// ignore_for_file: constant_identifier_names
// ignore_for_file: lines_longer_than_80_chars
part of openapi.api;
class DuplicateResolveGroupDto {
/// Returns a new [DuplicateResolveGroupDto] instance.
DuplicateResolveGroupDto({
required this.duplicateId,
this.keepAssetIds = const [],
this.trashAssetIds = const [],
});
String duplicateId;
/// Asset IDs to keep
List<String> keepAssetIds;
/// Asset IDs to trash or delete
List<String> trashAssetIds;
@override
bool operator ==(Object other) => identical(this, other) || other is DuplicateResolveGroupDto &&
other.duplicateId == duplicateId &&
_deepEquality.equals(other.keepAssetIds, keepAssetIds) &&
_deepEquality.equals(other.trashAssetIds, trashAssetIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(duplicateId.hashCode) +
(keepAssetIds.hashCode) +
(trashAssetIds.hashCode);
@override
String toString() => 'DuplicateResolveGroupDto[duplicateId=$duplicateId, keepAssetIds=$keepAssetIds, trashAssetIds=$trashAssetIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'duplicateId'] = this.duplicateId;
json[r'keepAssetIds'] = this.keepAssetIds;
json[r'trashAssetIds'] = this.trashAssetIds;
return json;
}
/// Returns a new [DuplicateResolveGroupDto] instance and imports its values from
/// [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>();
return DuplicateResolveGroupDto(
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
keepAssetIds: json[r'keepAssetIds'] is Iterable
? (json[r'keepAssetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
trashAssetIds: json[r'trashAssetIds'] is Iterable
? (json[r'trashAssetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<DuplicateResolveGroupDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <DuplicateResolveGroupDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = DuplicateResolveGroupDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, DuplicateResolveGroupDto> mapFromJson(dynamic json) {
final map = <String, DuplicateResolveGroupDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = DuplicateResolveGroupDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of DuplicateResolveGroupDto-objects as value to a dart map
static Map<String, List<DuplicateResolveGroupDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<DuplicateResolveGroupDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = DuplicateResolveGroupDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'duplicateId',
'keepAssetIds',
'trashAssetIds',
};
}
+16 -3
View File
@@ -15,30 +15,39 @@ class DuplicateResponseDto {
DuplicateResponseDto({
this.assets = const [],
required this.duplicateId,
this.suggestedKeepAssetIds = const [],
});
/// Duplicate assets
List<AssetResponseDto> assets;
/// Duplicate group ID
String duplicateId;
/// Suggested asset IDs to keep based on file size and EXIF data
List<String> suggestedKeepAssetIds;
@override
bool operator ==(Object other) => identical(this, other) || other is DuplicateResponseDto &&
_deepEquality.equals(other.assets, assets) &&
other.duplicateId == duplicateId;
other.duplicateId == duplicateId &&
_deepEquality.equals(other.suggestedKeepAssetIds, suggestedKeepAssetIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(assets.hashCode) +
(duplicateId.hashCode);
(duplicateId.hashCode) +
(suggestedKeepAssetIds.hashCode);
@override
String toString() => 'DuplicateResponseDto[assets=$assets, duplicateId=$duplicateId]';
String toString() => 'DuplicateResponseDto[assets=$assets, duplicateId=$duplicateId, suggestedKeepAssetIds=$suggestedKeepAssetIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'assets'] = this.assets;
json[r'duplicateId'] = this.duplicateId;
json[r'suggestedKeepAssetIds'] = this.suggestedKeepAssetIds;
return json;
}
@@ -53,6 +62,9 @@ class DuplicateResponseDto {
return DuplicateResponseDto(
assets: AssetResponseDto.listFromJson(json[r'assets']),
duplicateId: mapValueOfType<String>(json, r'duplicateId')!,
suggestedKeepAssetIds: json[r'suggestedKeepAssetIds'] is Iterable
? (json[r'suggestedKeepAssetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
@@ -102,6 +114,7 @@ class DuplicateResponseDto {
static const requiredKeys = <String>{
'assets',
'duplicateId',
'suggestedKeepAssetIds',
};
}
@@ -18,10 +18,13 @@ class EmailNotificationsResponse {
required this.enabled,
});
/// Whether to receive email notifications for album invites
bool albumInvite;
/// Whether to receive email notifications for album updates
bool albumUpdate;
/// Whether email notifications are enabled
bool enabled;
@override
@@ -18,6 +18,7 @@ class EmailNotificationsUpdate {
this.enabled,
});
/// Whether to receive email notifications for album invites
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -26,6 +27,7 @@ class EmailNotificationsUpdate {
///
bool? albumInvite;
/// Whether to receive email notifications for album updates
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
@@ -34,6 +36,7 @@ class EmailNotificationsUpdate {
///
bool? albumUpdate;
/// Whether email notifications are enabled
///
/// Please note: This property should have been non-nullable! Since the specification file
/// does not include a default value (using the "default:" property), however, the generated
+22
View File
@@ -37,48 +37,70 @@ class ExifResponseDto {
this.timeZone,
});
/// City name
String? city;
/// Country name
String? country;
/// Original date/time
DateTime? dateTimeOriginal;
/// Image description
String? description;
/// Image height in pixels
num? exifImageHeight;
/// Image width in pixels
num? exifImageWidth;
/// Exposure time
String? exposureTime;
/// F-number (aperture)
num? fNumber;
/// File size in bytes
int? fileSizeInByte;
/// Focal length in mm
num? focalLength;
/// ISO sensitivity
num? iso;
/// GPS latitude
num? latitude;
/// Lens model
String? lensModel;
/// GPS longitude
num? longitude;
/// Camera make
String? make;
/// Camera model
String? model;
/// Modification date/time
DateTime? modifyDate;
/// Image orientation
String? orientation;
/// Projection type
String? projectionType;
/// Rating
num? rating;
/// State/province name
String? state;
/// Time zone
String? timeZone;
@override
+1
View File
@@ -16,6 +16,7 @@ class FaceDto {
required this.id,
});
/// Face ID
String id;
@override
+8
View File
@@ -20,19 +20,27 @@ class FacialRecognitionConfig {
required this.modelName,
});
/// Whether the task is enabled
bool enabled;
/// Maximum distance threshold for face recognition
///
/// Minimum value: 0.1
/// Maximum value: 2
double maxDistance;
/// Minimum number of faces required for recognition
///
/// Minimum value: 1
int minFaces;
/// Minimum confidence score for face detection
///
/// Minimum value: 0.1
/// Maximum value: 1
double minScore;
/// Name of the model to use
String modelName;
@override

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