forked from google/built_value.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalues.g.dart
394 lines (336 loc) · 10.6 KB
/
values.g.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'values.dart';
// **************************************************************************
// BuiltValueGenerator
// **************************************************************************
class _$SimpleValue extends SimpleValue {
@override
final int anInt;
@override
final BuiltList<String> list;
@override
final BuiltListMultimap<int, bool> multimap;
@override
final BuiltMap<String, int> map;
@override
final BuiltSet<int> aSet;
@override
final BuiltSetMultimap<int, bool> setMultimap;
factory _$SimpleValue([void Function(SimpleValueBuilder)? updates]) =>
(new SimpleValueBuilder()..update(updates))._build();
_$SimpleValue._(
{required this.anInt,
required this.list,
required this.multimap,
required this.map,
required this.aSet,
required this.setMultimap})
: super._() {
BuiltValueNullFieldError.checkNotNull(anInt, r'SimpleValue', 'anInt');
BuiltValueNullFieldError.checkNotNull(list, r'SimpleValue', 'list');
BuiltValueNullFieldError.checkNotNull(multimap, r'SimpleValue', 'multimap');
BuiltValueNullFieldError.checkNotNull(map, r'SimpleValue', 'map');
BuiltValueNullFieldError.checkNotNull(aSet, r'SimpleValue', 'aSet');
BuiltValueNullFieldError.checkNotNull(
setMultimap, r'SimpleValue', 'setMultimap');
}
@override
SimpleValue rebuild(void Function(SimpleValueBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
SimpleValueBuilder toBuilder() => new SimpleValueBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is SimpleValue &&
anInt == other.anInt &&
list == other.list &&
multimap == other.multimap &&
map == other.map &&
aSet == other.aSet &&
setMultimap == other.setMultimap;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, anInt.hashCode);
_$hash = $jc(_$hash, list.hashCode);
_$hash = $jc(_$hash, multimap.hashCode);
_$hash = $jc(_$hash, map.hashCode);
_$hash = $jc(_$hash, aSet.hashCode);
_$hash = $jc(_$hash, setMultimap.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'SimpleValue')
..add('anInt', anInt)
..add('list', list)
..add('multimap', multimap)
..add('map', map)
..add('aSet', aSet)
..add('setMultimap', setMultimap))
.toString();
}
}
class SimpleValueBuilder implements Builder<SimpleValue, SimpleValueBuilder> {
_$SimpleValue? _$v;
int? _anInt;
int? get anInt => _$this._anInt;
set anInt(int? anInt) => _$this._anInt = anInt;
ListBuilder<String>? _list;
ListBuilder<String> get list => _$this._list ??= new ListBuilder<String>();
set list(ListBuilder<String>? list) => _$this._list = list;
ListMultimapBuilder<int, bool>? _multimap;
ListMultimapBuilder<int, bool> get multimap =>
_$this._multimap ??= new ListMultimapBuilder<int, bool>();
set multimap(ListMultimapBuilder<int, bool>? multimap) =>
_$this._multimap = multimap;
MapBuilder<String, int>? _map;
MapBuilder<String, int> get map =>
_$this._map ??= new MapBuilder<String, int>();
set map(MapBuilder<String, int>? map) => _$this._map = map;
SetBuilder<int>? _aSet;
SetBuilder<int> get aSet => _$this._aSet ??= new SetBuilder<int>();
set aSet(SetBuilder<int>? aSet) => _$this._aSet = aSet;
SetMultimapBuilder<int, bool>? _setMultimap;
SetMultimapBuilder<int, bool> get setMultimap =>
_$this._setMultimap ??= new SetMultimapBuilder<int, bool>();
set setMultimap(SetMultimapBuilder<int, bool>? setMultimap) =>
_$this._setMultimap = setMultimap;
SimpleValueBuilder();
SimpleValueBuilder get _$this {
final $v = _$v;
if ($v != null) {
_anInt = $v.anInt;
_list = $v.list.toBuilder();
_multimap = $v.multimap.toBuilder();
_map = $v.map.toBuilder();
_aSet = $v.aSet.toBuilder();
_setMultimap = $v.setMultimap.toBuilder();
_$v = null;
}
return this;
}
@override
void replace(SimpleValue other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$SimpleValue;
}
@override
void update(void Function(SimpleValueBuilder)? updates) {
if (updates != null) updates(this);
}
@override
SimpleValue build() => _build();
_$SimpleValue _build() {
_$SimpleValue _$result;
try {
_$result = _$v ??
new _$SimpleValue._(
anInt: BuiltValueNullFieldError.checkNotNull(
anInt, r'SimpleValue', 'anInt'),
list: list.build(),
multimap: multimap.build(),
map: map.build(),
aSet: aSet.build(),
setMultimap: setMultimap.build(),
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'list';
list.build();
_$failedField = 'multimap';
multimap.build();
_$failedField = 'map';
map.build();
_$failedField = 'aSet';
aSet.build();
_$failedField = 'setMultimap';
setMultimap.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
r'SimpleValue', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
class _$CompoundValue extends CompoundValue {
@override
final SimpleValue simpleValue;
@override
final String? string;
factory _$CompoundValue([void Function(CompoundValueBuilder)? updates]) =>
(new CompoundValueBuilder()..update(updates))._build();
_$CompoundValue._({required this.simpleValue, this.string}) : super._() {
BuiltValueNullFieldError.checkNotNull(
simpleValue, r'CompoundValue', 'simpleValue');
}
@override
CompoundValue rebuild(void Function(CompoundValueBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
CompoundValueBuilder toBuilder() => new CompoundValueBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is CompoundValue &&
simpleValue == other.simpleValue &&
string == other.string;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, simpleValue.hashCode);
_$hash = $jc(_$hash, string.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'CompoundValue')
..add('simpleValue', simpleValue)
..add('string', string))
.toString();
}
}
class CompoundValueBuilder
implements Builder<CompoundValue, CompoundValueBuilder> {
_$CompoundValue? _$v;
SimpleValueBuilder? _simpleValue;
SimpleValueBuilder get simpleValue =>
_$this._simpleValue ??= new SimpleValueBuilder();
set simpleValue(SimpleValueBuilder? simpleValue) =>
_$this._simpleValue = simpleValue;
String? _string;
String? get string => _$this._string;
set string(String? string) => _$this._string = string;
CompoundValueBuilder();
CompoundValueBuilder get _$this {
final $v = _$v;
if ($v != null) {
_simpleValue = $v.simpleValue.toBuilder();
_string = $v.string;
_$v = null;
}
return this;
}
@override
void replace(CompoundValue other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$CompoundValue;
}
@override
void update(void Function(CompoundValueBuilder)? updates) {
if (updates != null) updates(this);
}
@override
CompoundValue build() => _build();
_$CompoundValue _build() {
_$CompoundValue _$result;
try {
_$result = _$v ??
new _$CompoundValue._(
simpleValue: simpleValue.build(),
string: string,
);
} catch (_) {
late String _$failedField;
try {
_$failedField = 'simpleValue';
simpleValue.build();
} catch (e) {
throw new BuiltValueNestedFieldError(
r'CompoundValue', _$failedField, e.toString());
}
rethrow;
}
replace(_$result);
return _$result;
}
}
class _$ComparedValue extends ComparedValue {
@override
final String name;
@override
final Function onChanged;
factory _$ComparedValue([void Function(ComparedValueBuilder)? updates]) =>
(new ComparedValueBuilder()..update(updates))._build();
_$ComparedValue._({required this.name, required this.onChanged}) : super._() {
BuiltValueNullFieldError.checkNotNull(name, r'ComparedValue', 'name');
BuiltValueNullFieldError.checkNotNull(
onChanged, r'ComparedValue', 'onChanged');
}
@override
ComparedValue rebuild(void Function(ComparedValueBuilder) updates) =>
(toBuilder()..update(updates)).build();
@override
ComparedValueBuilder toBuilder() => new ComparedValueBuilder()..replace(this);
@override
bool operator ==(Object other) {
if (identical(other, this)) return true;
return other is ComparedValue && name == other.name;
}
@override
int get hashCode {
var _$hash = 0;
_$hash = $jc(_$hash, name.hashCode);
_$hash = $jf(_$hash);
return _$hash;
}
@override
String toString() {
return (newBuiltValueToStringHelper(r'ComparedValue')
..add('name', name)
..add('onChanged', onChanged))
.toString();
}
}
class ComparedValueBuilder
implements Builder<ComparedValue, ComparedValueBuilder> {
_$ComparedValue? _$v;
String? _name;
String? get name => _$this._name;
set name(String? name) => _$this._name = name;
Function? _onChanged;
Function? get onChanged => _$this._onChanged;
set onChanged(Function? onChanged) => _$this._onChanged = onChanged;
ComparedValueBuilder();
ComparedValueBuilder get _$this {
final $v = _$v;
if ($v != null) {
_name = $v.name;
_onChanged = $v.onChanged;
_$v = null;
}
return this;
}
@override
void replace(ComparedValue other) {
ArgumentError.checkNotNull(other, 'other');
_$v = other as _$ComparedValue;
}
@override
void update(void Function(ComparedValueBuilder)? updates) {
if (updates != null) updates(this);
}
@override
ComparedValue build() => _build();
_$ComparedValue _build() {
final _$result = _$v ??
new _$ComparedValue._(
name: BuiltValueNullFieldError.checkNotNull(
name, r'ComparedValue', 'name'),
onChanged: BuiltValueNullFieldError.checkNotNull(
onChanged, r'ComparedValue', 'onChanged'),
);
replace(_$result);
return _$result;
}
}
// ignore_for_file: deprecated_member_use_from_same_package,type=lint