feat: groups

This commit is contained in:
Jason Rasmussen
2025-07-30 18:18:38 -04:00
parent 641a3baadd
commit 4a881022c3
76 changed files with 6515 additions and 124 deletions
+99
View File
@@ -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 AlbumGroupCreateAllDto {
/// Returns a new [AlbumGroupCreateAllDto] instance.
AlbumGroupCreateAllDto({
this.groups = const [],
});
List<AlbumGroupDto> groups;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupCreateAllDto &&
_deepEquality.equals(other.groups, groups);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(groups.hashCode);
@override
String toString() => 'AlbumGroupCreateAllDto[groups=$groups]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'groups'] = this.groups;
return json;
}
/// Returns a new [AlbumGroupCreateAllDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupCreateAllDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupCreateAllDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupCreateAllDto(
groups: AlbumGroupDto.listFromJson(json[r'groups']),
);
}
return null;
}
static List<AlbumGroupCreateAllDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupCreateAllDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupCreateAllDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupCreateAllDto> mapFromJson(dynamic json) {
final map = <String, AlbumGroupCreateAllDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupCreateAllDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupCreateAllDto-objects as value to a dart map
static Map<String, List<AlbumGroupCreateAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupCreateAllDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupCreateAllDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'groups',
};
}
+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 AlbumGroupDeleteAllDto {
/// Returns a new [AlbumGroupDeleteAllDto] instance.
AlbumGroupDeleteAllDto({
this.groupIds = const [],
});
List<String> groupIds;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupDeleteAllDto &&
_deepEquality.equals(other.groupIds, groupIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(groupIds.hashCode);
@override
String toString() => 'AlbumGroupDeleteAllDto[groupIds=$groupIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'groupIds'] = this.groupIds;
return json;
}
/// Returns a new [AlbumGroupDeleteAllDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupDeleteAllDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupDeleteAllDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupDeleteAllDto(
groupIds: json[r'groupIds'] is Iterable
? (json[r'groupIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<AlbumGroupDeleteAllDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupDeleteAllDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupDeleteAllDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupDeleteAllDto> mapFromJson(dynamic json) {
final map = <String, AlbumGroupDeleteAllDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupDeleteAllDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupDeleteAllDto-objects as value to a dart map
static Map<String, List<AlbumGroupDeleteAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupDeleteAllDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupDeleteAllDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'groupIds',
};
}
+116
View File
@@ -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 AlbumGroupDto {
/// Returns a new [AlbumGroupDto] instance.
AlbumGroupDto({
required this.groupId,
this.role,
});
String groupId;
///
/// 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.
///
AlbumUserRole? role;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupDto &&
other.groupId == groupId &&
other.role == role;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(groupId.hashCode) +
(role == null ? 0 : role!.hashCode);
@override
String toString() => 'AlbumGroupDto[groupId=$groupId, role=$role]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'groupId'] = this.groupId;
if (this.role != null) {
json[r'role'] = this.role;
} else {
// json[r'role'] = null;
}
return json;
}
/// Returns a new [AlbumGroupDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupDto(
groupId: mapValueOfType<String>(json, r'groupId')!,
role: AlbumUserRole.fromJson(json[r'role']),
);
}
return null;
}
static List<AlbumGroupDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupDto> mapFromJson(dynamic json) {
final map = <String, AlbumGroupDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupDto-objects as value to a dart map
static Map<String, List<AlbumGroupDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'groupId',
};
}
+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 AlbumGroupMetadata {
/// Returns a new [AlbumGroupMetadata] instance.
AlbumGroupMetadata({
required this.createdAt,
required this.updatedAt,
});
DateTime createdAt;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupMetadata &&
other.createdAt == createdAt &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(createdAt.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'AlbumGroupMetadata[createdAt=$createdAt, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [AlbumGroupMetadata] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupMetadata? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupMetadata");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupMetadata(
createdAt: mapDateTime(json, r'createdAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;
}
static List<AlbumGroupMetadata> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupMetadata>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupMetadata.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupMetadata> mapFromJson(dynamic json) {
final map = <String, AlbumGroupMetadata>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupMetadata.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupMetadata-objects as value to a dart map
static Map<String, List<AlbumGroupMetadata>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupMetadata>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupMetadata.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'createdAt',
'updatedAt',
};
}
+127
View File
@@ -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 AlbumGroupResponseDto {
/// Returns a new [AlbumGroupResponseDto] instance.
AlbumGroupResponseDto({
required this.description,
required this.id,
required this.metadata,
required this.name,
});
String? description;
String id;
AlbumGroupMetadata metadata;
String name;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupResponseDto &&
other.description == description &&
other.id == id &&
other.metadata == metadata &&
other.name == name;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(description == null ? 0 : description!.hashCode) +
(id.hashCode) +
(metadata.hashCode) +
(name.hashCode);
@override
String toString() => 'AlbumGroupResponseDto[description=$description, id=$id, metadata=$metadata, name=$name]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
json[r'id'] = this.id;
json[r'metadata'] = this.metadata;
json[r'name'] = this.name;
return json;
}
/// Returns a new [AlbumGroupResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupResponseDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupResponseDto(
description: mapValueOfType<String>(json, r'description'),
id: mapValueOfType<String>(json, r'id')!,
metadata: AlbumGroupMetadata.fromJson(json[r'metadata'])!,
name: mapValueOfType<String>(json, r'name')!,
);
}
return null;
}
static List<AlbumGroupResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupResponseDto> mapFromJson(dynamic json) {
final map = <String, AlbumGroupResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupResponseDto-objects as value to a dart map
static Map<String, List<AlbumGroupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'description',
'id',
'metadata',
'name',
};
}
+99
View File
@@ -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 AlbumGroupUpdateDto {
/// Returns a new [AlbumGroupUpdateDto] instance.
AlbumGroupUpdateDto({
required this.role,
});
AlbumUserRole role;
@override
bool operator ==(Object other) => identical(this, other) || other is AlbumGroupUpdateDto &&
other.role == role;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(role.hashCode);
@override
String toString() => 'AlbumGroupUpdateDto[role=$role]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'role'] = this.role;
return json;
}
/// Returns a new [AlbumGroupUpdateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static AlbumGroupUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "AlbumGroupUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return AlbumGroupUpdateDto(
role: AlbumUserRole.fromJson(json[r'role'])!,
);
}
return null;
}
static List<AlbumGroupUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <AlbumGroupUpdateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = AlbumGroupUpdateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, AlbumGroupUpdateDto> mapFromJson(dynamic json) {
final map = <String, AlbumGroupUpdateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = AlbumGroupUpdateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of AlbumGroupUpdateDto-objects as value to a dart map
static Map<String, List<AlbumGroupUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<AlbumGroupUpdateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = AlbumGroupUpdateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'role',
};
}
+10 -3
View File
@@ -17,6 +17,7 @@ class CreateAlbumDto {
this.albumUsers = const [],
this.assetIds = const [],
this.description,
this.groups = const [],
});
String albumName;
@@ -33,12 +34,15 @@ class CreateAlbumDto {
///
String? description;
List<AlbumGroupDto> groups;
@override
bool operator ==(Object other) => identical(this, other) || other is CreateAlbumDto &&
other.albumName == albumName &&
_deepEquality.equals(other.albumUsers, albumUsers) &&
_deepEquality.equals(other.assetIds, assetIds) &&
other.description == description;
other.description == description &&
_deepEquality.equals(other.groups, groups);
@override
int get hashCode =>
@@ -46,10 +50,11 @@ class CreateAlbumDto {
(albumName.hashCode) +
(albumUsers.hashCode) +
(assetIds.hashCode) +
(description == null ? 0 : description!.hashCode);
(description == null ? 0 : description!.hashCode) +
(groups.hashCode);
@override
String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description]';
String toString() => 'CreateAlbumDto[albumName=$albumName, albumUsers=$albumUsers, assetIds=$assetIds, description=$description, groups=$groups]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
@@ -61,6 +66,7 @@ class CreateAlbumDto {
} else {
// json[r'description'] = null;
}
json[r'groups'] = this.groups;
return json;
}
@@ -79,6 +85,7 @@ class CreateAlbumDto {
? (json[r'assetIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
description: mapValueOfType<String>(json, r'description'),
groups: AlbumGroupDto.listFromJson(json[r'groups']),
);
}
return null;
+117
View File
@@ -0,0 +1,117 @@
//
// 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 GroupAdminCreateDto {
/// Returns a new [GroupAdminCreateDto] instance.
GroupAdminCreateDto({
this.description,
required this.name,
this.users = const [],
});
String? description;
String name;
List<GroupUserDto> users;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupAdminCreateDto &&
other.description == description &&
other.name == name &&
_deepEquality.equals(other.users, users);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(description == null ? 0 : description!.hashCode) +
(name.hashCode) +
(users.hashCode);
@override
String toString() => 'GroupAdminCreateDto[description=$description, name=$name, users=$users]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
json[r'name'] = this.name;
json[r'users'] = this.users;
return json;
}
/// Returns a new [GroupAdminCreateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupAdminCreateDto? fromJson(dynamic value) {
upgradeDto(value, "GroupAdminCreateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupAdminCreateDto(
description: mapValueOfType<String>(json, r'description'),
name: mapValueOfType<String>(json, r'name')!,
users: GroupUserDto.listFromJson(json[r'users']),
);
}
return null;
}
static List<GroupAdminCreateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupAdminCreateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupAdminCreateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupAdminCreateDto> mapFromJson(dynamic json) {
final map = <String, GroupAdminCreateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupAdminCreateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupAdminCreateDto-objects as value to a dart map
static Map<String, List<GroupAdminCreateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupAdminCreateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupAdminCreateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'name',
};
}
+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 GroupAdminResponseDto {
/// Returns a new [GroupAdminResponseDto] instance.
GroupAdminResponseDto({
required this.createdAt,
required this.description,
required this.id,
required this.name,
required this.updatedAt,
});
DateTime createdAt;
String? description;
String id;
String name;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupAdminResponseDto &&
other.createdAt == createdAt &&
other.description == description &&
other.id == id &&
other.name == name &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(createdAt.hashCode) +
(description == null ? 0 : description!.hashCode) +
(id.hashCode) +
(name.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'GroupAdminResponseDto[createdAt=$createdAt, description=$description, id=$id, name=$name, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
json[r'id'] = this.id;
json[r'name'] = this.name;
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [GroupAdminResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupAdminResponseDto? fromJson(dynamic value) {
upgradeDto(value, "GroupAdminResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupAdminResponseDto(
createdAt: mapDateTime(json, r'createdAt', r'')!,
description: mapValueOfType<String>(json, r'description'),
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;
}
static List<GroupAdminResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupAdminResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupAdminResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupAdminResponseDto> mapFromJson(dynamic json) {
final map = <String, GroupAdminResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupAdminResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupAdminResponseDto-objects as value to a dart map
static Map<String, List<GroupAdminResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupAdminResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupAdminResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'createdAt',
'description',
'id',
'name',
'updatedAt',
};
}
+119
View File
@@ -0,0 +1,119 @@
//
// 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 GroupAdminUpdateDto {
/// Returns a new [GroupAdminUpdateDto] instance.
GroupAdminUpdateDto({
this.description,
this.name,
});
String? 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
/// source code must fall back to having a nullable type.
/// Consider adding a "default:" property in the specification file to hide this note.
///
String? name;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupAdminUpdateDto &&
other.description == description &&
other.name == name;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(description == null ? 0 : description!.hashCode) +
(name == null ? 0 : name!.hashCode);
@override
String toString() => 'GroupAdminUpdateDto[description=$description, name=$name]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
if (this.name != null) {
json[r'name'] = this.name;
} else {
// json[r'name'] = null;
}
return json;
}
/// Returns a new [GroupAdminUpdateDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupAdminUpdateDto? fromJson(dynamic value) {
upgradeDto(value, "GroupAdminUpdateDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupAdminUpdateDto(
description: mapValueOfType<String>(json, r'description'),
name: mapValueOfType<String>(json, r'name'),
);
}
return null;
}
static List<GroupAdminUpdateDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupAdminUpdateDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupAdminUpdateDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupAdminUpdateDto> mapFromJson(dynamic json) {
final map = <String, GroupAdminUpdateDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupAdminUpdateDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupAdminUpdateDto-objects as value to a dart map
static Map<String, List<GroupAdminUpdateDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupAdminUpdateDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupAdminUpdateDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
};
}
+119
View File
@@ -0,0 +1,119 @@
//
// 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 GroupResponseDto {
/// Returns a new [GroupResponseDto] instance.
GroupResponseDto({
required this.description,
required this.id,
required this.name,
});
String? description;
String id;
String name;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupResponseDto &&
other.description == description &&
other.id == id &&
other.name == name;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(description == null ? 0 : description!.hashCode) +
(id.hashCode) +
(name.hashCode);
@override
String toString() => 'GroupResponseDto[description=$description, id=$id, name=$name]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
if (this.description != null) {
json[r'description'] = this.description;
} else {
// json[r'description'] = null;
}
json[r'id'] = this.id;
json[r'name'] = this.name;
return json;
}
/// Returns a new [GroupResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupResponseDto? fromJson(dynamic value) {
upgradeDto(value, "GroupResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupResponseDto(
description: mapValueOfType<String>(json, r'description'),
id: mapValueOfType<String>(json, r'id')!,
name: mapValueOfType<String>(json, r'name')!,
);
}
return null;
}
static List<GroupResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupResponseDto> mapFromJson(dynamic json) {
final map = <String, GroupResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupResponseDto-objects as value to a dart map
static Map<String, List<GroupResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'description',
'id',
'name',
};
}
+99
View File
@@ -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 GroupUserCreateAllDto {
/// Returns a new [GroupUserCreateAllDto] instance.
GroupUserCreateAllDto({
this.users = const [],
});
List<GroupUserDto> users;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupUserCreateAllDto &&
_deepEquality.equals(other.users, users);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(users.hashCode);
@override
String toString() => 'GroupUserCreateAllDto[users=$users]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'users'] = this.users;
return json;
}
/// Returns a new [GroupUserCreateAllDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupUserCreateAllDto? fromJson(dynamic value) {
upgradeDto(value, "GroupUserCreateAllDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupUserCreateAllDto(
users: GroupUserDto.listFromJson(json[r'users']),
);
}
return null;
}
static List<GroupUserCreateAllDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupUserCreateAllDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupUserCreateAllDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupUserCreateAllDto> mapFromJson(dynamic json) {
final map = <String, GroupUserCreateAllDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupUserCreateAllDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupUserCreateAllDto-objects as value to a dart map
static Map<String, List<GroupUserCreateAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupUserCreateAllDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupUserCreateAllDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'users',
};
}
+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 GroupUserDeleteAllDto {
/// Returns a new [GroupUserDeleteAllDto] instance.
GroupUserDeleteAllDto({
this.userIds = const [],
});
List<String> userIds;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupUserDeleteAllDto &&
_deepEquality.equals(other.userIds, userIds);
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(userIds.hashCode);
@override
String toString() => 'GroupUserDeleteAllDto[userIds=$userIds]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'userIds'] = this.userIds;
return json;
}
/// Returns a new [GroupUserDeleteAllDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupUserDeleteAllDto? fromJson(dynamic value) {
upgradeDto(value, "GroupUserDeleteAllDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupUserDeleteAllDto(
userIds: json[r'userIds'] is Iterable
? (json[r'userIds'] as Iterable).cast<String>().toList(growable: false)
: const [],
);
}
return null;
}
static List<GroupUserDeleteAllDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupUserDeleteAllDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupUserDeleteAllDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupUserDeleteAllDto> mapFromJson(dynamic json) {
final map = <String, GroupUserDeleteAllDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupUserDeleteAllDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupUserDeleteAllDto-objects as value to a dart map
static Map<String, List<GroupUserDeleteAllDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupUserDeleteAllDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupUserDeleteAllDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'userIds',
};
}
+99
View File
@@ -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 GroupUserDto {
/// Returns a new [GroupUserDto] instance.
GroupUserDto({
required this.userId,
});
String userId;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupUserDto &&
other.userId == userId;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(userId.hashCode);
@override
String toString() => 'GroupUserDto[userId=$userId]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'userId'] = this.userId;
return json;
}
/// Returns a new [GroupUserDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupUserDto? fromJson(dynamic value) {
upgradeDto(value, "GroupUserDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupUserDto(
userId: mapValueOfType<String>(json, r'userId')!,
);
}
return null;
}
static List<GroupUserDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupUserDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupUserDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupUserDto> mapFromJson(dynamic json) {
final map = <String, GroupUserDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupUserDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupUserDto-objects as value to a dart map
static Map<String, List<GroupUserDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupUserDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupUserDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'userId',
};
}
+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 GroupUserMetadata {
/// Returns a new [GroupUserMetadata] instance.
GroupUserMetadata({
required this.createdAt,
required this.updatedAt,
});
DateTime createdAt;
DateTime updatedAt;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupUserMetadata &&
other.createdAt == createdAt &&
other.updatedAt == updatedAt;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(createdAt.hashCode) +
(updatedAt.hashCode);
@override
String toString() => 'GroupUserMetadata[createdAt=$createdAt, updatedAt=$updatedAt]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
return json;
}
/// Returns a new [GroupUserMetadata] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupUserMetadata? fromJson(dynamic value) {
upgradeDto(value, "GroupUserMetadata");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupUserMetadata(
createdAt: mapDateTime(json, r'createdAt', r'')!,
updatedAt: mapDateTime(json, r'updatedAt', r'')!,
);
}
return null;
}
static List<GroupUserMetadata> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupUserMetadata>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupUserMetadata.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupUserMetadata> mapFromJson(dynamic json) {
final map = <String, GroupUserMetadata>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupUserMetadata.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupUserMetadata-objects as value to a dart map
static Map<String, List<GroupUserMetadata>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupUserMetadata>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupUserMetadata.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'createdAt',
'updatedAt',
};
}
+147
View File
@@ -0,0 +1,147 @@
//
// 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 GroupUserResponseDto {
/// Returns a new [GroupUserResponseDto] instance.
GroupUserResponseDto({
required this.avatarColor,
required this.email,
required this.id,
required this.metadata,
required this.name,
required this.profileChangedAt,
required this.profileImagePath,
});
UserAvatarColor avatarColor;
String email;
String id;
GroupUserMetadata metadata;
String name;
DateTime profileChangedAt;
String profileImagePath;
@override
bool operator ==(Object other) => identical(this, other) || other is GroupUserResponseDto &&
other.avatarColor == avatarColor &&
other.email == email &&
other.id == id &&
other.metadata == metadata &&
other.name == name &&
other.profileChangedAt == profileChangedAt &&
other.profileImagePath == profileImagePath;
@override
int get hashCode =>
// ignore: unnecessary_parenthesis
(avatarColor.hashCode) +
(email.hashCode) +
(id.hashCode) +
(metadata.hashCode) +
(name.hashCode) +
(profileChangedAt.hashCode) +
(profileImagePath.hashCode);
@override
String toString() => 'GroupUserResponseDto[avatarColor=$avatarColor, email=$email, id=$id, metadata=$metadata, name=$name, profileChangedAt=$profileChangedAt, profileImagePath=$profileImagePath]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'avatarColor'] = this.avatarColor;
json[r'email'] = this.email;
json[r'id'] = this.id;
json[r'metadata'] = this.metadata;
json[r'name'] = this.name;
json[r'profileChangedAt'] = this.profileChangedAt.toUtc().toIso8601String();
json[r'profileImagePath'] = this.profileImagePath;
return json;
}
/// Returns a new [GroupUserResponseDto] instance and imports its values from
/// [value] if it's a [Map], null otherwise.
// ignore: prefer_constructors_over_static_methods
static GroupUserResponseDto? fromJson(dynamic value) {
upgradeDto(value, "GroupUserResponseDto");
if (value is Map) {
final json = value.cast<String, dynamic>();
return GroupUserResponseDto(
avatarColor: UserAvatarColor.fromJson(json[r'avatarColor'])!,
email: mapValueOfType<String>(json, r'email')!,
id: mapValueOfType<String>(json, r'id')!,
metadata: GroupUserMetadata.fromJson(json[r'metadata'])!,
name: mapValueOfType<String>(json, r'name')!,
profileChangedAt: mapDateTime(json, r'profileChangedAt', r'')!,
profileImagePath: mapValueOfType<String>(json, r'profileImagePath')!,
);
}
return null;
}
static List<GroupUserResponseDto> listFromJson(dynamic json, {bool growable = false,}) {
final result = <GroupUserResponseDto>[];
if (json is List && json.isNotEmpty) {
for (final row in json) {
final value = GroupUserResponseDto.fromJson(row);
if (value != null) {
result.add(value);
}
}
}
return result.toList(growable: growable);
}
static Map<String, GroupUserResponseDto> mapFromJson(dynamic json) {
final map = <String, GroupUserResponseDto>{};
if (json is Map && json.isNotEmpty) {
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
for (final entry in json.entries) {
final value = GroupUserResponseDto.fromJson(entry.value);
if (value != null) {
map[entry.key] = value;
}
}
}
return map;
}
// maps a json object with a list of GroupUserResponseDto-objects as value to a dart map
static Map<String, List<GroupUserResponseDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
final map = <String, List<GroupUserResponseDto>>{};
if (json is Map && json.isNotEmpty) {
// ignore: parameter_assignments
json = json.cast<String, dynamic>();
for (final entry in json.entries) {
map[entry.key] = GroupUserResponseDto.listFromJson(entry.value, growable: growable,);
}
}
return map;
}
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'avatarColor',
'email',
'id',
'metadata',
'name',
'profileChangedAt',
'profileImagePath',
};
}
+42
View File
@@ -54,6 +54,10 @@ class Permission {
static const albumUserPeriodCreate = Permission._(r'albumUser.create');
static const albumUserPeriodUpdate = Permission._(r'albumUser.update');
static const albumUserPeriodDelete = Permission._(r'albumUser.delete');
static const albumGroupPeriodCreate = Permission._(r'albumGroup.create');
static const albumGroupPeriodRead = Permission._(r'albumGroup.read');
static const albumGroupPeriodUpdate = Permission._(r'albumGroup.update');
static const albumGroupPeriodDelete = Permission._(r'albumGroup.delete');
static const authPeriodChangePassword = Permission._(r'auth.changePassword');
static const authDevicePeriodDelete = Permission._(r'authDevice.delete');
static const archivePeriodRead = Permission._(r'archive.read');
@@ -63,6 +67,8 @@ class Permission {
static const facePeriodRead = Permission._(r'face.read');
static const facePeriodUpdate = Permission._(r'face.update');
static const facePeriodDelete = Permission._(r'face.delete');
static const groupPeriodRead = Permission._(r'group.read');
static const groupPeriodDelete = Permission._(r'group.delete');
static const jobPeriodCreate = Permission._(r'job.create');
static const jobPeriodRead = Permission._(r'job.read');
static const libraryPeriodCreate = Permission._(r'library.create');
@@ -145,6 +151,14 @@ class Permission {
static const userProfileImagePeriodRead = Permission._(r'userProfileImage.read');
static const userProfileImagePeriodUpdate = Permission._(r'userProfileImage.update');
static const userProfileImagePeriodDelete = Permission._(r'userProfileImage.delete');
static const adminGroupPeriodCreate = Permission._(r'adminGroup.create');
static const adminGroupPeriodRead = Permission._(r'adminGroup.read');
static const adminGroupPeriodUpdate = Permission._(r'adminGroup.update');
static const adminGroupPeriodDelete = Permission._(r'adminGroup.delete');
static const adminGroupUserPeriodCreate = Permission._(r'adminGroupUser.create');
static const adminGroupUserPeriodRead = Permission._(r'adminGroupUser.read');
static const adminGroupUserPeriodUpdate = Permission._(r'adminGroupUser.update');
static const adminGroupUserPeriodDelete = Permission._(r'adminGroupUser.delete');
static const adminUserPeriodCreate = Permission._(r'adminUser.create');
static const adminUserPeriodRead = Permission._(r'adminUser.read');
static const adminUserPeriodUpdate = Permission._(r'adminUser.update');
@@ -183,6 +197,10 @@ class Permission {
albumUserPeriodCreate,
albumUserPeriodUpdate,
albumUserPeriodDelete,
albumGroupPeriodCreate,
albumGroupPeriodRead,
albumGroupPeriodUpdate,
albumGroupPeriodDelete,
authPeriodChangePassword,
authDevicePeriodDelete,
archivePeriodRead,
@@ -192,6 +210,8 @@ class Permission {
facePeriodRead,
facePeriodUpdate,
facePeriodDelete,
groupPeriodRead,
groupPeriodDelete,
jobPeriodCreate,
jobPeriodRead,
libraryPeriodCreate,
@@ -274,6 +294,14 @@ class Permission {
userProfileImagePeriodRead,
userProfileImagePeriodUpdate,
userProfileImagePeriodDelete,
adminGroupPeriodCreate,
adminGroupPeriodRead,
adminGroupPeriodUpdate,
adminGroupPeriodDelete,
adminGroupUserPeriodCreate,
adminGroupUserPeriodRead,
adminGroupUserPeriodUpdate,
adminGroupUserPeriodDelete,
adminUserPeriodCreate,
adminUserPeriodRead,
adminUserPeriodUpdate,
@@ -347,6 +375,10 @@ class PermissionTypeTransformer {
case r'albumUser.create': return Permission.albumUserPeriodCreate;
case r'albumUser.update': return Permission.albumUserPeriodUpdate;
case r'albumUser.delete': return Permission.albumUserPeriodDelete;
case r'albumGroup.create': return Permission.albumGroupPeriodCreate;
case r'albumGroup.read': return Permission.albumGroupPeriodRead;
case r'albumGroup.update': return Permission.albumGroupPeriodUpdate;
case r'albumGroup.delete': return Permission.albumGroupPeriodDelete;
case r'auth.changePassword': return Permission.authPeriodChangePassword;
case r'authDevice.delete': return Permission.authDevicePeriodDelete;
case r'archive.read': return Permission.archivePeriodRead;
@@ -356,6 +388,8 @@ class PermissionTypeTransformer {
case r'face.read': return Permission.facePeriodRead;
case r'face.update': return Permission.facePeriodUpdate;
case r'face.delete': return Permission.facePeriodDelete;
case r'group.read': return Permission.groupPeriodRead;
case r'group.delete': return Permission.groupPeriodDelete;
case r'job.create': return Permission.jobPeriodCreate;
case r'job.read': return Permission.jobPeriodRead;
case r'library.create': return Permission.libraryPeriodCreate;
@@ -438,6 +472,14 @@ class PermissionTypeTransformer {
case r'userProfileImage.read': return Permission.userProfileImagePeriodRead;
case r'userProfileImage.update': return Permission.userProfileImagePeriodUpdate;
case r'userProfileImage.delete': return Permission.userProfileImagePeriodDelete;
case r'adminGroup.create': return Permission.adminGroupPeriodCreate;
case r'adminGroup.read': return Permission.adminGroupPeriodRead;
case r'adminGroup.update': return Permission.adminGroupPeriodUpdate;
case r'adminGroup.delete': return Permission.adminGroupPeriodDelete;
case r'adminGroupUser.create': return Permission.adminGroupUserPeriodCreate;
case r'adminGroupUser.read': return Permission.adminGroupUserPeriodRead;
case r'adminGroupUser.update': return Permission.adminGroupUserPeriodUpdate;
case r'adminGroupUser.delete': return Permission.adminGroupUserPeriodDelete;
case r'adminUser.create': return Permission.adminUserPeriodCreate;
case r'adminUser.read': return Permission.adminUserPeriodRead;
case r'adminUser.update': return Permission.adminUserPeriodUpdate;