-
Notifications
You must be signed in to change notification settings - Fork 534
/
Copy pathrequest_model.freezed.dart
478 lines (442 loc) · 16.7 KB
/
request_model.freezed.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
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'request_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
RequestModel _$RequestModelFromJson(Map<String, dynamic> json) {
return _RequestModel.fromJson(json);
}
/// @nodoc
mixin _$RequestModel {
String get id => throw _privateConstructorUsedError;
APIType get apiType => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
@JsonKey(includeToJson: false)
dynamic get requestTabIndex => throw _privateConstructorUsedError;
HttpRequestModel? get httpRequestModel => throw _privateConstructorUsedError;
AuthorizationModel? get authorizationModel =>
throw _privateConstructorUsedError;
int? get responseStatus => throw _privateConstructorUsedError;
String? get message => throw _privateConstructorUsedError;
HttpResponseModel? get httpResponseModel =>
throw _privateConstructorUsedError;
@JsonKey(includeToJson: false)
bool get isWorking => throw _privateConstructorUsedError;
@JsonKey(includeToJson: false)
DateTime? get sendingTime => throw _privateConstructorUsedError;
/// Serializes this RequestModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RequestModelCopyWith<RequestModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RequestModelCopyWith<$Res> {
factory $RequestModelCopyWith(
RequestModel value, $Res Function(RequestModel) then) =
_$RequestModelCopyWithImpl<$Res, RequestModel>;
@useResult
$Res call(
{String id,
APIType apiType,
String name,
String description,
@JsonKey(includeToJson: false) dynamic requestTabIndex,
HttpRequestModel? httpRequestModel,
AuthorizationModel? authorizationModel,
int? responseStatus,
String? message,
HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) bool isWorking,
@JsonKey(includeToJson: false) DateTime? sendingTime});
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
$AuthorizationModelCopyWith<$Res>? get authorizationModel;
$HttpResponseModelCopyWith<$Res>? get httpResponseModel;
}
/// @nodoc
class _$RequestModelCopyWithImpl<$Res, $Val extends RequestModel>
implements $RequestModelCopyWith<$Res> {
_$RequestModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? apiType = null,
Object? name = null,
Object? description = null,
Object? requestTabIndex = freezed,
Object? httpRequestModel = freezed,
Object? authorizationModel = freezed,
Object? responseStatus = freezed,
Object? message = freezed,
Object? httpResponseModel = freezed,
Object? isWorking = null,
Object? sendingTime = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
apiType: null == apiType
? _value.apiType
: apiType // ignore: cast_nullable_to_non_nullable
as APIType,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
requestTabIndex: freezed == requestTabIndex
? _value.requestTabIndex
: requestTabIndex // ignore: cast_nullable_to_non_nullable
as dynamic,
httpRequestModel: freezed == httpRequestModel
? _value.httpRequestModel
: httpRequestModel // ignore: cast_nullable_to_non_nullable
as HttpRequestModel?,
authorizationModel: freezed == authorizationModel
? _value.authorizationModel
: authorizationModel // ignore: cast_nullable_to_non_nullable
as AuthorizationModel?,
responseStatus: freezed == responseStatus
? _value.responseStatus
: responseStatus // ignore: cast_nullable_to_non_nullable
as int?,
message: freezed == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String?,
httpResponseModel: freezed == httpResponseModel
? _value.httpResponseModel
: httpResponseModel // ignore: cast_nullable_to_non_nullable
as HttpResponseModel?,
isWorking: null == isWorking
? _value.isWorking
: isWorking // ignore: cast_nullable_to_non_nullable
as bool,
sendingTime: freezed == sendingTime
? _value.sendingTime
: sendingTime // ignore: cast_nullable_to_non_nullable
as DateTime?,
) as $Val);
}
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$HttpRequestModelCopyWith<$Res>? get httpRequestModel {
if (_value.httpRequestModel == null) {
return null;
}
return $HttpRequestModelCopyWith<$Res>(_value.httpRequestModel!, (value) {
return _then(_value.copyWith(httpRequestModel: value) as $Val);
});
}
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorizationModelCopyWith<$Res>? get authorizationModel {
if (_value.authorizationModel == null) {
return null;
}
return $AuthorizationModelCopyWith<$Res>(_value.authorizationModel!,
(value) {
return _then(_value.copyWith(authorizationModel: value) as $Val);
});
}
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$HttpResponseModelCopyWith<$Res>? get httpResponseModel {
if (_value.httpResponseModel == null) {
return null;
}
return $HttpResponseModelCopyWith<$Res>(_value.httpResponseModel!, (value) {
return _then(_value.copyWith(httpResponseModel: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$RequestModelImplCopyWith<$Res>
implements $RequestModelCopyWith<$Res> {
factory _$$RequestModelImplCopyWith(
_$RequestModelImpl value, $Res Function(_$RequestModelImpl) then) =
__$$RequestModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{String id,
APIType apiType,
String name,
String description,
@JsonKey(includeToJson: false) dynamic requestTabIndex,
HttpRequestModel? httpRequestModel,
AuthorizationModel? authorizationModel,
int? responseStatus,
String? message,
HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) bool isWorking,
@JsonKey(includeToJson: false) DateTime? sendingTime});
@override
$HttpRequestModelCopyWith<$Res>? get httpRequestModel;
@override
$AuthorizationModelCopyWith<$Res>? get authorizationModel;
@override
$HttpResponseModelCopyWith<$Res>? get httpResponseModel;
}
/// @nodoc
class __$$RequestModelImplCopyWithImpl<$Res>
extends _$RequestModelCopyWithImpl<$Res, _$RequestModelImpl>
implements _$$RequestModelImplCopyWith<$Res> {
__$$RequestModelImplCopyWithImpl(
_$RequestModelImpl _value, $Res Function(_$RequestModelImpl) _then)
: super(_value, _then);
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? apiType = null,
Object? name = null,
Object? description = null,
Object? requestTabIndex = freezed,
Object? httpRequestModel = freezed,
Object? authorizationModel = freezed,
Object? responseStatus = freezed,
Object? message = freezed,
Object? httpResponseModel = freezed,
Object? isWorking = null,
Object? sendingTime = freezed,
}) {
return _then(_$RequestModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
apiType: null == apiType
? _value.apiType
: apiType // ignore: cast_nullable_to_non_nullable
as APIType,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
requestTabIndex: freezed == requestTabIndex
? _value.requestTabIndex!
: requestTabIndex,
httpRequestModel: freezed == httpRequestModel
? _value.httpRequestModel
: httpRequestModel // ignore: cast_nullable_to_non_nullable
as HttpRequestModel?,
authorizationModel: freezed == authorizationModel
? _value.authorizationModel
: authorizationModel // ignore: cast_nullable_to_non_nullable
as AuthorizationModel?,
responseStatus: freezed == responseStatus
? _value.responseStatus
: responseStatus // ignore: cast_nullable_to_non_nullable
as int?,
message: freezed == message
? _value.message
: message // ignore: cast_nullable_to_non_nullable
as String?,
httpResponseModel: freezed == httpResponseModel
? _value.httpResponseModel
: httpResponseModel // ignore: cast_nullable_to_non_nullable
as HttpResponseModel?,
isWorking: null == isWorking
? _value.isWorking
: isWorking // ignore: cast_nullable_to_non_nullable
as bool,
sendingTime: freezed == sendingTime
? _value.sendingTime
: sendingTime // ignore: cast_nullable_to_non_nullable
as DateTime?,
));
}
}
/// @nodoc
@JsonSerializable(explicitToJson: true, anyMap: true)
class _$RequestModelImpl implements _RequestModel {
const _$RequestModelImpl(
{required this.id,
this.apiType = APIType.rest,
this.name = "",
this.description = "",
@JsonKey(includeToJson: false) this.requestTabIndex = 0,
this.httpRequestModel,
this.authorizationModel,
this.responseStatus,
this.message,
this.httpResponseModel,
@JsonKey(includeToJson: false) this.isWorking = false,
@JsonKey(includeToJson: false) this.sendingTime});
factory _$RequestModelImpl.fromJson(Map<String, dynamic> json) =>
_$$RequestModelImplFromJson(json);
@override
final String id;
@override
@JsonKey()
final APIType apiType;
@override
@JsonKey()
final String name;
@override
@JsonKey()
final String description;
@override
@JsonKey(includeToJson: false)
final dynamic requestTabIndex;
@override
final HttpRequestModel? httpRequestModel;
@override
final AuthorizationModel? authorizationModel;
@override
final int? responseStatus;
@override
final String? message;
@override
final HttpResponseModel? httpResponseModel;
@override
@JsonKey(includeToJson: false)
final bool isWorking;
@override
@JsonKey(includeToJson: false)
final DateTime? sendingTime;
@override
String toString() {
return 'RequestModel(id: $id, apiType: $apiType, name: $name, description: $description, requestTabIndex: $requestTabIndex, httpRequestModel: $httpRequestModel, authorizationModel: $authorizationModel, responseStatus: $responseStatus, message: $message, httpResponseModel: $httpResponseModel, isWorking: $isWorking, sendingTime: $sendingTime)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RequestModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.apiType, apiType) || other.apiType == apiType) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.description, description) ||
other.description == description) &&
const DeepCollectionEquality()
.equals(other.requestTabIndex, requestTabIndex) &&
(identical(other.httpRequestModel, httpRequestModel) ||
other.httpRequestModel == httpRequestModel) &&
(identical(other.authorizationModel, authorizationModel) ||
other.authorizationModel == authorizationModel) &&
(identical(other.responseStatus, responseStatus) ||
other.responseStatus == responseStatus) &&
(identical(other.message, message) || other.message == message) &&
(identical(other.httpResponseModel, httpResponseModel) ||
other.httpResponseModel == httpResponseModel) &&
(identical(other.isWorking, isWorking) ||
other.isWorking == isWorking) &&
(identical(other.sendingTime, sendingTime) ||
other.sendingTime == sendingTime));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
apiType,
name,
description,
const DeepCollectionEquality().hash(requestTabIndex),
httpRequestModel,
authorizationModel,
responseStatus,
message,
httpResponseModel,
isWorking,
sendingTime);
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RequestModelImplCopyWith<_$RequestModelImpl> get copyWith =>
__$$RequestModelImplCopyWithImpl<_$RequestModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$RequestModelImplToJson(
this,
);
}
}
abstract class _RequestModel implements RequestModel {
const factory _RequestModel(
{required final String id,
final APIType apiType,
final String name,
final String description,
@JsonKey(includeToJson: false) final dynamic requestTabIndex,
final HttpRequestModel? httpRequestModel,
final AuthorizationModel? authorizationModel,
final int? responseStatus,
final String? message,
final HttpResponseModel? httpResponseModel,
@JsonKey(includeToJson: false) final bool isWorking,
@JsonKey(includeToJson: false) final DateTime? sendingTime}) =
_$RequestModelImpl;
factory _RequestModel.fromJson(Map<String, dynamic> json) =
_$RequestModelImpl.fromJson;
@override
String get id;
@override
APIType get apiType;
@override
String get name;
@override
String get description;
@override
@JsonKey(includeToJson: false)
dynamic get requestTabIndex;
@override
HttpRequestModel? get httpRequestModel;
@override
AuthorizationModel? get authorizationModel;
@override
int? get responseStatus;
@override
String? get message;
@override
HttpResponseModel? get httpResponseModel;
@override
@JsonKey(includeToJson: false)
bool get isWorking;
@override
@JsonKey(includeToJson: false)
DateTime? get sendingTime;
/// Create a copy of RequestModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RequestModelImplCopyWith<_$RequestModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}