-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathuser_profile_data_extended.dart
91 lines (78 loc) · 3 KB
/
user_profile_data_extended.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:flutter/foundation.dart';
import 'package:json_annotation/json_annotation.dart';
import 'package:model_generator_example/model/ogm.dart';
import 'package:model_generator_example/model/user/person/person.dart';
import 'package:model_generator_example/model/user/profile/user_profile_data.dart';
import 'package:model_generator_example/model/user/testing.dart';
part 'user_profile_data_extended.g.dart';
@JsonSerializable(explicitToJson: true)
@immutable
class UserProfileDataExtended extends UserProfileData {
@JsonKey(name: 'additionalField', required: true, includeIfNull: false)
final String additionalField;
const UserProfileDataExtended({
required this.additionalField,
required String firstName,
required String lastName,
required String standardLanguage,
required String mainAccountNumber,
required String legalEmail,
required Testing phones,
required OGM legalAddress,
List<String>? offTrack,
List<OGM>? onTrack,
List<Person>? persons,
Map<String, Person>? personsById,
}) : super(
firstName: firstName,
lastName: lastName,
standardLanguage: standardLanguage,
mainAccountNumber: mainAccountNumber,
legalEmail: legalEmail,
phones: phones,
legalAddress: legalAddress,
offTrack: offTrack,
onTrack: onTrack,
persons: persons,
personsById: personsById,
);
factory UserProfileDataExtended.fromJson(Map<String, dynamic> json) =>
_$UserProfileDataExtendedFromJson(json);
@override
Map<String, dynamic> toJson() => _$UserProfileDataExtendedToJson(this);
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is UserProfileDataExtended &&
runtimeType == other.runtimeType &&
additionalField == other.additionalField &&
super == other;
@override
int get hashCode => additionalField.hashCode ^ super.hashCode;
@override
String toString() => 'UserProfileDataExtended{'
'additionalField: $additionalField, '
'firstName: $firstName, '
'lastName: $lastName, '
'standardLanguage: $standardLanguage, '
'mainAccountNumber: $mainAccountNumber, '
'legalEmail: $legalEmail, '
'phones: $phones, '
'legalAddress: $legalAddress, '
'offTrack: $offTrack, '
'onTrack: $onTrack, '
'persons: $persons, '
'personsById: $personsById'
'}';
}
const deserializeUserProfileDataExtended = UserProfileDataExtended.fromJson;
Map<String, dynamic> serializeUserProfileDataExtended(
UserProfileDataExtended object) =>
object.toJson();
List<UserProfileDataExtended> deserializeUserProfileDataExtendedList(
List<Map<String, dynamic>> jsonList) =>
jsonList.map(UserProfileDataExtended.fromJson).toList();
List<Map<String, dynamic>> serializeUserProfileDataExtendedList(
List<UserProfileDataExtended> objects) =>
objects.map((object) => object.toJson()).toList();