rename stuff
This commit is contained in:
+10
-10
@@ -14,7 +14,6 @@ class AlbumResponseDto {
|
||||
/// Returns a new [AlbumResponseDto] instance.
|
||||
AlbumResponseDto({
|
||||
required this.albumName,
|
||||
this.albumPermissions = const [],
|
||||
required this.albumThumbnailAssetId,
|
||||
required this.assetCount,
|
||||
this.assets = const [],
|
||||
@@ -30,14 +29,13 @@ class AlbumResponseDto {
|
||||
required this.ownerId,
|
||||
required this.shared,
|
||||
this.sharedUsers = const [],
|
||||
this.sharedUsersV2 = const [],
|
||||
this.startDate,
|
||||
required this.updatedAt,
|
||||
});
|
||||
|
||||
String albumName;
|
||||
|
||||
List<AlbumPermissionResponseDto> albumPermissions;
|
||||
|
||||
String? albumThumbnailAssetId;
|
||||
|
||||
int assetCount;
|
||||
@@ -84,9 +82,11 @@ class AlbumResponseDto {
|
||||
|
||||
bool shared;
|
||||
|
||||
/// Deprecated in favor of albumPermissions
|
||||
/// Deprecated in favor of users
|
||||
List<UserResponseDto> sharedUsers;
|
||||
|
||||
List<AlbumUserResponseDto> sharedUsersV2;
|
||||
|
||||
///
|
||||
/// 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
|
||||
@@ -100,7 +100,6 @@ class AlbumResponseDto {
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumResponseDto &&
|
||||
other.albumName == albumName &&
|
||||
_deepEquality.equals(other.albumPermissions, albumPermissions) &&
|
||||
other.albumThumbnailAssetId == albumThumbnailAssetId &&
|
||||
other.assetCount == assetCount &&
|
||||
_deepEquality.equals(other.assets, assets) &&
|
||||
@@ -116,6 +115,7 @@ class AlbumResponseDto {
|
||||
other.ownerId == ownerId &&
|
||||
other.shared == shared &&
|
||||
_deepEquality.equals(other.sharedUsers, sharedUsers) &&
|
||||
_deepEquality.equals(other.sharedUsersV2, sharedUsersV2) &&
|
||||
other.startDate == startDate &&
|
||||
other.updatedAt == updatedAt;
|
||||
|
||||
@@ -123,7 +123,6 @@ class AlbumResponseDto {
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(albumName.hashCode) +
|
||||
(albumPermissions.hashCode) +
|
||||
(albumThumbnailAssetId == null ? 0 : albumThumbnailAssetId!.hashCode) +
|
||||
(assetCount.hashCode) +
|
||||
(assets.hashCode) +
|
||||
@@ -139,16 +138,16 @@ class AlbumResponseDto {
|
||||
(ownerId.hashCode) +
|
||||
(shared.hashCode) +
|
||||
(sharedUsers.hashCode) +
|
||||
(sharedUsersV2.hashCode) +
|
||||
(startDate == null ? 0 : startDate!.hashCode) +
|
||||
(updatedAt.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumPermissions=$albumPermissions, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, startDate=$startDate, updatedAt=$updatedAt]';
|
||||
String toString() => 'AlbumResponseDto[albumName=$albumName, albumThumbnailAssetId=$albumThumbnailAssetId, assetCount=$assetCount, assets=$assets, createdAt=$createdAt, description=$description, endDate=$endDate, hasSharedLink=$hasSharedLink, id=$id, isActivityEnabled=$isActivityEnabled, lastModifiedAssetTimestamp=$lastModifiedAssetTimestamp, order=$order, owner=$owner, ownerId=$ownerId, shared=$shared, sharedUsers=$sharedUsers, sharedUsersV2=$sharedUsersV2, startDate=$startDate, updatedAt=$updatedAt]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'albumName'] = this.albumName;
|
||||
json[r'albumPermissions'] = this.albumPermissions;
|
||||
if (this.albumThumbnailAssetId != null) {
|
||||
json[r'albumThumbnailAssetId'] = this.albumThumbnailAssetId;
|
||||
} else {
|
||||
@@ -180,6 +179,7 @@ class AlbumResponseDto {
|
||||
json[r'ownerId'] = this.ownerId;
|
||||
json[r'shared'] = this.shared;
|
||||
json[r'sharedUsers'] = this.sharedUsers;
|
||||
json[r'sharedUsersV2'] = this.sharedUsersV2;
|
||||
if (this.startDate != null) {
|
||||
json[r'startDate'] = this.startDate!.toUtc().toIso8601String();
|
||||
} else {
|
||||
@@ -198,7 +198,6 @@ class AlbumResponseDto {
|
||||
|
||||
return AlbumResponseDto(
|
||||
albumName: mapValueOfType<String>(json, r'albumName')!,
|
||||
albumPermissions: AlbumPermissionResponseDto.listFromJson(json[r'albumPermissions']),
|
||||
albumThumbnailAssetId: mapValueOfType<String>(json, r'albumThumbnailAssetId'),
|
||||
assetCount: mapValueOfType<int>(json, r'assetCount')!,
|
||||
assets: AssetResponseDto.listFromJson(json[r'assets']),
|
||||
@@ -214,6 +213,7 @@ class AlbumResponseDto {
|
||||
ownerId: mapValueOfType<String>(json, r'ownerId')!,
|
||||
shared: mapValueOfType<bool>(json, r'shared')!,
|
||||
sharedUsers: UserResponseDto.listFromJson(json[r'sharedUsers']),
|
||||
sharedUsersV2: AlbumUserResponseDto.listFromJson(json[r'sharedUsersV2']),
|
||||
startDate: mapDateTime(json, r'startDate', r''),
|
||||
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
|
||||
);
|
||||
@@ -264,7 +264,6 @@ class AlbumResponseDto {
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'albumName',
|
||||
'albumPermissions',
|
||||
'albumThumbnailAssetId',
|
||||
'assetCount',
|
||||
'assets',
|
||||
@@ -277,6 +276,7 @@ class AlbumResponseDto {
|
||||
'ownerId',
|
||||
'shared',
|
||||
'sharedUsers',
|
||||
'sharedUsersV2',
|
||||
'updatedAt',
|
||||
};
|
||||
}
|
||||
|
||||
+18
-18
@@ -10,9 +10,9 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class AlbumPermissionResponseDto {
|
||||
/// Returns a new [AlbumPermissionResponseDto] instance.
|
||||
AlbumPermissionResponseDto({
|
||||
class AlbumUserResponseDto {
|
||||
/// Returns a new [AlbumUserResponseDto] instance.
|
||||
AlbumUserResponseDto({
|
||||
required this.readonly,
|
||||
required this.user,
|
||||
});
|
||||
@@ -22,7 +22,7 @@ class AlbumPermissionResponseDto {
|
||||
UserResponseDto user;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumPermissionResponseDto &&
|
||||
bool operator ==(Object other) => identical(this, other) || other is AlbumUserResponseDto &&
|
||||
other.readonly == readonly &&
|
||||
other.user == user;
|
||||
|
||||
@@ -33,7 +33,7 @@ class AlbumPermissionResponseDto {
|
||||
(user.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'AlbumPermissionResponseDto[readonly=$readonly, user=$user]';
|
||||
String toString() => 'AlbumUserResponseDto[readonly=$readonly, user=$user]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -42,14 +42,14 @@ class AlbumPermissionResponseDto {
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [AlbumPermissionResponseDto] instance and imports its values from
|
||||
/// Returns a new [AlbumUserResponseDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static AlbumPermissionResponseDto? fromJson(dynamic value) {
|
||||
static AlbumUserResponseDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return AlbumPermissionResponseDto(
|
||||
return AlbumUserResponseDto(
|
||||
readonly: mapValueOfType<bool>(json, r'readonly')!,
|
||||
user: UserResponseDto.fromJson(json[r'user'])!,
|
||||
);
|
||||
@@ -57,11 +57,11 @@ class AlbumPermissionResponseDto {
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<AlbumPermissionResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumPermissionResponseDto>[];
|
||||
static List<AlbumUserResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <AlbumUserResponseDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = AlbumPermissionResponseDto.fromJson(row);
|
||||
final value = AlbumUserResponseDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
@@ -70,12 +70,12 @@ class AlbumPermissionResponseDto {
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, AlbumPermissionResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumPermissionResponseDto>{};
|
||||
static Map<String, AlbumUserResponseDto> mapFromJson(dynamic json) {
|
||||
final map = <String, AlbumUserResponseDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = AlbumPermissionResponseDto.fromJson(entry.value);
|
||||
final value = AlbumUserResponseDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
@@ -84,14 +84,14 @@ class AlbumPermissionResponseDto {
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of AlbumPermissionResponseDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumPermissionResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumPermissionResponseDto>>{};
|
||||
// maps a json object with a list of AlbumUserResponseDto-objects as value to a dart map
|
||||
static Map<String, List<AlbumUserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<AlbumUserResponseDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = AlbumPermissionResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
map[entry.key] = AlbumUserResponseDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
+18
-18
@@ -10,16 +10,16 @@
|
||||
|
||||
part of openapi.api;
|
||||
|
||||
class SetAlbumPermissionDto {
|
||||
/// Returns a new [SetAlbumPermissionDto] instance.
|
||||
SetAlbumPermissionDto({
|
||||
class UpdateAlbumUserDto {
|
||||
/// Returns a new [UpdateAlbumUserDto] instance.
|
||||
UpdateAlbumUserDto({
|
||||
required this.readonly,
|
||||
});
|
||||
|
||||
bool readonly;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SetAlbumPermissionDto &&
|
||||
bool operator ==(Object other) => identical(this, other) || other is UpdateAlbumUserDto &&
|
||||
other.readonly == readonly;
|
||||
|
||||
@override
|
||||
@@ -28,7 +28,7 @@ class SetAlbumPermissionDto {
|
||||
(readonly.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SetAlbumPermissionDto[readonly=$readonly]';
|
||||
String toString() => 'UpdateAlbumUserDto[readonly=$readonly]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@@ -36,25 +36,25 @@ class SetAlbumPermissionDto {
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SetAlbumPermissionDto] instance and imports its values from
|
||||
/// Returns a new [UpdateAlbumUserDto] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SetAlbumPermissionDto? fromJson(dynamic value) {
|
||||
static UpdateAlbumUserDto? fromJson(dynamic value) {
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SetAlbumPermissionDto(
|
||||
return UpdateAlbumUserDto(
|
||||
readonly: mapValueOfType<bool>(json, r'readonly')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SetAlbumPermissionDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SetAlbumPermissionDto>[];
|
||||
static List<UpdateAlbumUserDto> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <UpdateAlbumUserDto>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SetAlbumPermissionDto.fromJson(row);
|
||||
final value = UpdateAlbumUserDto.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
@@ -63,12 +63,12 @@ class SetAlbumPermissionDto {
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SetAlbumPermissionDto> mapFromJson(dynamic json) {
|
||||
final map = <String, SetAlbumPermissionDto>{};
|
||||
static Map<String, UpdateAlbumUserDto> mapFromJson(dynamic json) {
|
||||
final map = <String, UpdateAlbumUserDto>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SetAlbumPermissionDto.fromJson(entry.value);
|
||||
final value = UpdateAlbumUserDto.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
@@ -77,14 +77,14 @@ class SetAlbumPermissionDto {
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SetAlbumPermissionDto-objects as value to a dart map
|
||||
static Map<String, List<SetAlbumPermissionDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SetAlbumPermissionDto>>{};
|
||||
// maps a json object with a list of UpdateAlbumUserDto-objects as value to a dart map
|
||||
static Map<String, List<UpdateAlbumUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<UpdateAlbumUserDto>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SetAlbumPermissionDto.listFromJson(entry.value, growable: growable,);
|
||||
map[entry.key] = UpdateAlbumUserDto.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
Reference in New Issue
Block a user