add role to addUsersToAlbum endpoint

This commit is contained in:
mgabor
2024-04-24 11:36:09 +02:00
parent dd149e5235
commit 5bb3ddb1f5
14 changed files with 246 additions and 11 deletions
+10 -2
View File
@@ -13,25 +13,32 @@ part of openapi.api;
class AddUsersDto {
/// Returns a new [AddUsersDto] instance.
AddUsersDto({
this.albumUsers = const [],
this.sharedUserIds = const [],
});
List<AddUserDto> albumUsers;
/// Deprecated in favor of albumUsers
List<String> sharedUserIds;
@override
bool operator ==(Object other) => identical(this, other) || other is AddUsersDto &&
_deepEquality.equals(other.albumUsers, albumUsers) &&
_deepEquality.equals(other.sharedUserIds, sharedUserIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(albumUsers.hashCode) +
(sharedUserIds.hashCode);
@override
String toString() => 'AddUsersDto[sharedUserIds=$sharedUserIds]';
String toString() => 'AddUsersDto[albumUsers=$albumUsers, sharedUserIds=$sharedUserIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'albumUsers'] = this.albumUsers;
json[r'sharedUserIds'] = this.sharedUserIds;
return json;
}
@@ -44,6 +51,7 @@ class AddUsersDto {
final json = value.cast<String, dynamic>();
return AddUsersDto(
albumUsers: AddUserDto.listFromJson(json[r'albumUsers']),
sharedUserIds: json[r'sharedUserIds'] is Iterable
? (json[r'sharedUserIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
@@ -94,7 +102,7 @@ class AddUsersDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'sharedUserIds',
'albumUsers',
};
}