-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathogm.dart
120 lines (107 loc) · 3.85 KB
/
ogm.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// GENERATED CODE - DO NOT MODIFY BY HAND
import 'package:json_annotation/json_annotation.dart';
import 'package:model_generator_example/model/converter/date_time_converter.dart';
import 'package:model_generator_example/model/user/testing.dart';
part 'ogm.g.dart';
@JsonSerializable(explicitToJson: true)
@DateTimeConverter()
class OGM {
@JsonKey(name: 'beneficiary', required: true)
final String beneficiary;
@JsonKey(name: 'beneficiaryIBAN', required: true)
final String beneficiaryIBAN;
@JsonKey(name: 'test_Test', required: true)
final String testTest;
@JsonKey(name: 'some_Thing', required: true)
final String someThing;
@JsonKey(name: 'some_ThinG_huGE', required: true)
final String someThinGHuGE;
@JsonKey(name: 'simpleFields', required: true)
final List<Testing> simpleFields;
@JsonKey(name: 'listMap', required: true)
final Map<int, List<String>> listMap;
@JsonKey(name: 'structuredMessage', includeIfNull: false)
final String? structuredMessage;
@JsonKey(name: 'securityIndicator', includeIfNull: false)
final String? securityRole;
@JsonKey(name: 'mutableProperty', includeIfNull: false)
String? mutableProperty;
@JsonKey(name: 'dateChange', includeIfNull: false)
final DateTime? dateChange;
@JsonKey(name: 'fields', includeIfNull: false)
final List<List<Testing>>? fields;
@JsonKey(name: 'simpleMap', includeIfNull: false)
final Map<String, Testing>? simpleMap;
OGM({
required this.beneficiary,
required this.beneficiaryIBAN,
required this.testTest,
required this.someThing,
required this.someThinGHuGE,
required this.simpleFields,
required this.listMap,
this.structuredMessage,
this.securityRole,
this.mutableProperty,
this.dateChange,
this.fields,
this.simpleMap,
});
factory OGM.fromJson(Map<String, dynamic> json) => _$OGMFromJson(json);
Map<String, dynamic> toJson() => _$OGMToJson(this);
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is OGM &&
runtimeType == other.runtimeType &&
beneficiary == other.beneficiary &&
beneficiaryIBAN == other.beneficiaryIBAN &&
testTest == other.testTest &&
someThing == other.someThing &&
someThinGHuGE == other.someThinGHuGE &&
simpleFields == other.simpleFields &&
listMap == other.listMap &&
structuredMessage == other.structuredMessage &&
securityRole == other.securityRole &&
mutableProperty == other.mutableProperty &&
dateChange == other.dateChange &&
fields == other.fields &&
simpleMap == other.simpleMap;
@override
int get hashCode =>
beneficiary.hashCode ^
beneficiaryIBAN.hashCode ^
testTest.hashCode ^
someThing.hashCode ^
someThinGHuGE.hashCode ^
simpleFields.hashCode ^
listMap.hashCode ^
structuredMessage.hashCode ^
securityRole.hashCode ^
mutableProperty.hashCode ^
dateChange.hashCode ^
fields.hashCode ^
simpleMap.hashCode;
@override
String toString() => 'OGM{'
'beneficiary: $beneficiary, '
'beneficiaryIBAN: $beneficiaryIBAN, '
'testTest: $testTest, '
'someThing: $someThing, '
'someThinGHuGE: $someThinGHuGE, '
'simpleFields: $simpleFields, '
'listMap: $listMap, '
'structuredMessage: $structuredMessage, '
'securityRole: $securityRole, '
'mutableProperty: $mutableProperty, '
'dateChange: $dateChange, '
'fields: $fields, '
'simpleMap: $simpleMap'
'}';
}
const deserializeOGM = OGM.fromJson;
Map<String, dynamic> serializeOGM(OGM object) => object.toJson();
List<OGM> deserializeOGMList(List<Map<String, dynamic>> jsonList) =>
jsonList.map(OGM.fromJson).toList();
List<Map<String, dynamic>> serializeOGMList(List<OGM> objects) =>
objects.map((object) => object.toJson()).toList();