You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-16 07:24:40 +02:00
6
mobile/openapi/lib/model/sync_entity_type.dart
generated
6
mobile/openapi/lib/model/sync_entity_type.dart
generated
@ -25,11 +25,15 @@ class SyncEntityType {
|
||||
|
||||
static const userV1 = SyncEntityType._(r'UserV1');
|
||||
static const userDeleteV1 = SyncEntityType._(r'UserDeleteV1');
|
||||
static const partnerV1 = SyncEntityType._(r'PartnerV1');
|
||||
static const partnerDeleteV1 = SyncEntityType._(r'PartnerDeleteV1');
|
||||
|
||||
/// List of all possible values in this [enum][SyncEntityType].
|
||||
static const values = <SyncEntityType>[
|
||||
userV1,
|
||||
userDeleteV1,
|
||||
partnerV1,
|
||||
partnerDeleteV1,
|
||||
];
|
||||
|
||||
static SyncEntityType? fromJson(dynamic value) => SyncEntityTypeTypeTransformer().decode(value);
|
||||
@ -70,6 +74,8 @@ class SyncEntityTypeTypeTransformer {
|
||||
switch (data) {
|
||||
case r'UserV1': return SyncEntityType.userV1;
|
||||
case r'UserDeleteV1': return SyncEntityType.userDeleteV1;
|
||||
case r'PartnerV1': return SyncEntityType.partnerV1;
|
||||
case r'PartnerDeleteV1': return SyncEntityType.partnerDeleteV1;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
107
mobile/openapi/lib/model/sync_partner_delete_v1.dart
generated
Normal file
107
mobile/openapi/lib/model/sync_partner_delete_v1.dart
generated
Normal 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 SyncPartnerDeleteV1 {
|
||||
/// Returns a new [SyncPartnerDeleteV1] instance.
|
||||
SyncPartnerDeleteV1({
|
||||
required this.sharedById,
|
||||
required this.sharedWithId,
|
||||
});
|
||||
|
||||
String sharedById;
|
||||
|
||||
String sharedWithId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SyncPartnerDeleteV1 &&
|
||||
other.sharedById == sharedById &&
|
||||
other.sharedWithId == sharedWithId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(sharedById.hashCode) +
|
||||
(sharedWithId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SyncPartnerDeleteV1[sharedById=$sharedById, sharedWithId=$sharedWithId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'sharedById'] = this.sharedById;
|
||||
json[r'sharedWithId'] = this.sharedWithId;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SyncPartnerDeleteV1] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SyncPartnerDeleteV1? fromJson(dynamic value) {
|
||||
upgradeDto(value, "SyncPartnerDeleteV1");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SyncPartnerDeleteV1(
|
||||
sharedById: mapValueOfType<String>(json, r'sharedById')!,
|
||||
sharedWithId: mapValueOfType<String>(json, r'sharedWithId')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SyncPartnerDeleteV1> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SyncPartnerDeleteV1>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SyncPartnerDeleteV1.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SyncPartnerDeleteV1> mapFromJson(dynamic json) {
|
||||
final map = <String, SyncPartnerDeleteV1>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SyncPartnerDeleteV1.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SyncPartnerDeleteV1-objects as value to a dart map
|
||||
static Map<String, List<SyncPartnerDeleteV1>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SyncPartnerDeleteV1>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SyncPartnerDeleteV1.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'sharedById',
|
||||
'sharedWithId',
|
||||
};
|
||||
}
|
||||
|
115
mobile/openapi/lib/model/sync_partner_v1.dart
generated
Normal file
115
mobile/openapi/lib/model/sync_partner_v1.dart
generated
Normal file
@ -0,0 +1,115 @@
|
||||
//
|
||||
// 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 SyncPartnerV1 {
|
||||
/// Returns a new [SyncPartnerV1] instance.
|
||||
SyncPartnerV1({
|
||||
required this.inTimeline,
|
||||
required this.sharedById,
|
||||
required this.sharedWithId,
|
||||
});
|
||||
|
||||
bool inTimeline;
|
||||
|
||||
String sharedById;
|
||||
|
||||
String sharedWithId;
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) => identical(this, other) || other is SyncPartnerV1 &&
|
||||
other.inTimeline == inTimeline &&
|
||||
other.sharedById == sharedById &&
|
||||
other.sharedWithId == sharedWithId;
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
// ignore: unnecessary_parenthesis
|
||||
(inTimeline.hashCode) +
|
||||
(sharedById.hashCode) +
|
||||
(sharedWithId.hashCode);
|
||||
|
||||
@override
|
||||
String toString() => 'SyncPartnerV1[inTimeline=$inTimeline, sharedById=$sharedById, sharedWithId=$sharedWithId]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
json[r'inTimeline'] = this.inTimeline;
|
||||
json[r'sharedById'] = this.sharedById;
|
||||
json[r'sharedWithId'] = this.sharedWithId;
|
||||
return json;
|
||||
}
|
||||
|
||||
/// Returns a new [SyncPartnerV1] instance and imports its values from
|
||||
/// [value] if it's a [Map], null otherwise.
|
||||
// ignore: prefer_constructors_over_static_methods
|
||||
static SyncPartnerV1? fromJson(dynamic value) {
|
||||
upgradeDto(value, "SyncPartnerV1");
|
||||
if (value is Map) {
|
||||
final json = value.cast<String, dynamic>();
|
||||
|
||||
return SyncPartnerV1(
|
||||
inTimeline: mapValueOfType<bool>(json, r'inTimeline')!,
|
||||
sharedById: mapValueOfType<String>(json, r'sharedById')!,
|
||||
sharedWithId: mapValueOfType<String>(json, r'sharedWithId')!,
|
||||
);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<SyncPartnerV1> listFromJson(dynamic json, {bool growable = false,}) {
|
||||
final result = <SyncPartnerV1>[];
|
||||
if (json is List && json.isNotEmpty) {
|
||||
for (final row in json) {
|
||||
final value = SyncPartnerV1.fromJson(row);
|
||||
if (value != null) {
|
||||
result.add(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result.toList(growable: growable);
|
||||
}
|
||||
|
||||
static Map<String, SyncPartnerV1> mapFromJson(dynamic json) {
|
||||
final map = <String, SyncPartnerV1>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
||||
for (final entry in json.entries) {
|
||||
final value = SyncPartnerV1.fromJson(entry.value);
|
||||
if (value != null) {
|
||||
map[entry.key] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
// maps a json object with a list of SyncPartnerV1-objects as value to a dart map
|
||||
static Map<String, List<SyncPartnerV1>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
||||
final map = <String, List<SyncPartnerV1>>{};
|
||||
if (json is Map && json.isNotEmpty) {
|
||||
// ignore: parameter_assignments
|
||||
json = json.cast<String, dynamic>();
|
||||
for (final entry in json.entries) {
|
||||
map[entry.key] = SyncPartnerV1.listFromJson(entry.value, growable: growable,);
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/// The list of required keys that must be present in a JSON.
|
||||
static const requiredKeys = <String>{
|
||||
'inTimeline',
|
||||
'sharedById',
|
||||
'sharedWithId',
|
||||
};
|
||||
}
|
||||
|
3
mobile/openapi/lib/model/sync_request_type.dart
generated
3
mobile/openapi/lib/model/sync_request_type.dart
generated
@ -24,10 +24,12 @@ class SyncRequestType {
|
||||
String toJson() => value;
|
||||
|
||||
static const usersV1 = SyncRequestType._(r'UsersV1');
|
||||
static const partnersV1 = SyncRequestType._(r'PartnersV1');
|
||||
|
||||
/// List of all possible values in this [enum][SyncRequestType].
|
||||
static const values = <SyncRequestType>[
|
||||
usersV1,
|
||||
partnersV1,
|
||||
];
|
||||
|
||||
static SyncRequestType? fromJson(dynamic value) => SyncRequestTypeTypeTransformer().decode(value);
|
||||
@ -67,6 +69,7 @@ class SyncRequestTypeTypeTransformer {
|
||||
if (data != null) {
|
||||
switch (data) {
|
||||
case r'UsersV1': return SyncRequestType.usersV1;
|
||||
case r'PartnersV1': return SyncRequestType.partnersV1;
|
||||
default:
|
||||
if (!allowNull) {
|
||||
throw ArgumentError('Unknown enum value to decode: $data');
|
||||
|
Reference in New Issue
Block a user