1 // GENERATED CODE - DO NOT MODIFY BY HAND
2 // coverage:ignore-file
3 // ignore_for_file: type=lint
4 // 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
5
6 part of 'api.dart';
7
8 // **************************************************************************
9 // FreezedGenerator
10 // **************************************************************************
11
12 // dart format off
13 T _$identity<T>(T value) => value;
14 /// @nodoc
15 mixin _$OndeError {
16
17
18
19
20
21 @override
22 bool operator ==(Object other) {
23 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError);
24 }
25
26
27 @override
28 int get hashCode => runtimeType.hashCode;
29
30 @override
31 String toString() {
32 return 'OndeError()';
33 }
34
35
36 }
37
38 /// @nodoc
39 class $OndeErrorCopyWith<$Res> {
40 $OndeErrorCopyWith(OndeError _, $Res Function(OndeError) __);
41 }
42
43
44 /// Adds pattern-matching-related methods to [OndeError].
45 extension OndeErrorPatterns on OndeError {
46 /// A variant of `map` that fallback to returning `orElse`.
47 ///
48 /// It is equivalent to doing:
49 /// ```dart
50 /// switch (sealedClass) {
51 /// case final Subclass value:
52 /// return ...;
53 /// case _:
54 /// return orElse();
55 /// }
56 /// ```
57
58 @optionalTypeArgs TResult maybeMap<TResult extends Object?>({TResult Function( OndeError_NoModelLoaded value)? noModelLoaded,TResult Function( OndeError_AlreadyLoaded value)? alreadyLoaded,TResult Function( OndeError_ModelBuild value)? modelBuild,TResult Function( OndeError_Inference value)? inference,TResult Function( OndeError_Cancelled value)? cancelled,TResult Function( OndeError_Other value)? other,required TResult orElse(),}){
59 final _that = this;
60 switch (_that) {
61 case OndeError_NoModelLoaded() when noModelLoaded != null:
62 return noModelLoaded(_that);case OndeError_AlreadyLoaded() when alreadyLoaded != null:
63 return alreadyLoaded(_that);case OndeError_ModelBuild() when modelBuild != null:
64 return modelBuild(_that);case OndeError_Inference() when inference != null:
65 return inference(_that);case OndeError_Cancelled() when cancelled != null:
66 return cancelled(_that);case OndeError_Other() when other != null:
67 return other(_that);case _:
68 return orElse();
69
70 }
71 }
72 /// A `switch`-like method, using callbacks.
73 ///
74 /// Callbacks receives the raw object, upcasted.
75 /// It is equivalent to doing:
76 /// ```dart
77 /// switch (sealedClass) {
78 /// case final Subclass value:
79 /// return ...;
80 /// case final Subclass2 value:
81 /// return ...;
82 /// }
83 /// ```
84
85 @optionalTypeArgs TResult map<TResult extends Object?>({required TResult Function( OndeError_NoModelLoaded value) noModelLoaded,required TResult Function( OndeError_AlreadyLoaded value) alreadyLoaded,required TResult Function( OndeError_ModelBuild value) modelBuild,required TResult Function( OndeError_Inference value) inference,required TResult Function( OndeError_Cancelled value) cancelled,required TResult Function( OndeError_Other value) other,}){
86 final _that = this;
87 switch (_that) {
88 case OndeError_NoModelLoaded():
89 return noModelLoaded(_that);case OndeError_AlreadyLoaded():
90 return alreadyLoaded(_that);case OndeError_ModelBuild():
91 return modelBuild(_that);case OndeError_Inference():
92 return inference(_that);case OndeError_Cancelled():
93 return cancelled(_that);case OndeError_Other():
94 return other(_that);}
95 }
96 /// A variant of `map` that fallback to returning `null`.
97 ///
98 /// It is equivalent to doing:
99 /// ```dart
100 /// switch (sealedClass) {
101 /// case final Subclass value:
102 /// return ...;
103 /// case _:
104 /// return null;
105 /// }
106 /// ```
107
108 @optionalTypeArgs TResult? mapOrNull<TResult extends Object?>({TResult? Function( OndeError_NoModelLoaded value)? noModelLoaded,TResult? Function( OndeError_AlreadyLoaded value)? alreadyLoaded,TResult? Function( OndeError_ModelBuild value)? modelBuild,TResult? Function( OndeError_Inference value)? inference,TResult? Function( OndeError_Cancelled value)? cancelled,TResult? Function( OndeError_Other value)? other,}){
109 final _that = this;
110 switch (_that) {
111 case OndeError_NoModelLoaded() when noModelLoaded != null:
112 return noModelLoaded(_that);case OndeError_AlreadyLoaded() when alreadyLoaded != null:
113 return alreadyLoaded(_that);case OndeError_ModelBuild() when modelBuild != null:
114 return modelBuild(_that);case OndeError_Inference() when inference != null:
115 return inference(_that);case OndeError_Cancelled() when cancelled != null:
116 return cancelled(_that);case OndeError_Other() when other != null:
117 return other(_that);case _:
118 return null;
119
120 }
121 }
122 /// A variant of `when` that fallback to an `orElse` callback.
123 ///
124 /// It is equivalent to doing:
125 /// ```dart
126 /// switch (sealedClass) {
127 /// case Subclass(:final field):
128 /// return ...;
129 /// case _:
130 /// return orElse();
131 /// }
132 /// ```
133
134 @optionalTypeArgs TResult maybeWhen<TResult extends Object?>({TResult Function()? noModelLoaded,TResult Function( String modelName)? alreadyLoaded,TResult Function( String reason)? modelBuild,TResult Function( String reason)? inference,TResult Function()? cancelled,TResult Function( String reason)? other,required TResult orElse(),}) {final _that = this;
135 switch (_that) {
136 case OndeError_NoModelLoaded() when noModelLoaded != null:
137 return noModelLoaded();case OndeError_AlreadyLoaded() when alreadyLoaded != null:
138 return alreadyLoaded(_that.modelName);case OndeError_ModelBuild() when modelBuild != null:
139 return modelBuild(_that.reason);case OndeError_Inference() when inference != null:
140 return inference(_that.reason);case OndeError_Cancelled() when cancelled != null:
141 return cancelled();case OndeError_Other() when other != null:
142 return other(_that.reason);case _:
143 return orElse();
144
145 }
146 }
147 /// A `switch`-like method, using callbacks.
148 ///
149 /// As opposed to `map`, this offers destructuring.
150 /// It is equivalent to doing:
151 /// ```dart
152 /// switch (sealedClass) {
153 /// case Subclass(:final field):
154 /// return ...;
155 /// case Subclass2(:final field2):
156 /// return ...;
157 /// }
158 /// ```
159
160 @optionalTypeArgs TResult when<TResult extends Object?>({required TResult Function() noModelLoaded,required TResult Function( String modelName) alreadyLoaded,required TResult Function( String reason) modelBuild,required TResult Function( String reason) inference,required TResult Function() cancelled,required TResult Function( String reason) other,}) {final _that = this;
161 switch (_that) {
162 case OndeError_NoModelLoaded():
163 return noModelLoaded();case OndeError_AlreadyLoaded():
164 return alreadyLoaded(_that.modelName);case OndeError_ModelBuild():
165 return modelBuild(_that.reason);case OndeError_Inference():
166 return inference(_that.reason);case OndeError_Cancelled():
167 return cancelled();case OndeError_Other():
168 return other(_that.reason);}
169 }
170 /// A variant of `when` that fallback to returning `null`
171 ///
172 /// It is equivalent to doing:
173 /// ```dart
174 /// switch (sealedClass) {
175 /// case Subclass(:final field):
176 /// return ...;
177 /// case _:
178 /// return null;
179 /// }
180 /// ```
181
182 @optionalTypeArgs TResult? whenOrNull<TResult extends Object?>({TResult? Function()? noModelLoaded,TResult? Function( String modelName)? alreadyLoaded,TResult? Function( String reason)? modelBuild,TResult? Function( String reason)? inference,TResult? Function()? cancelled,TResult? Function( String reason)? other,}) {final _that = this;
183 switch (_that) {
184 case OndeError_NoModelLoaded() when noModelLoaded != null:
185 return noModelLoaded();case OndeError_AlreadyLoaded() when alreadyLoaded != null:
186 return alreadyLoaded(_that.modelName);case OndeError_ModelBuild() when modelBuild != null:
187 return modelBuild(_that.reason);case OndeError_Inference() when inference != null:
188 return inference(_that.reason);case OndeError_Cancelled() when cancelled != null:
189 return cancelled();case OndeError_Other() when other != null:
190 return other(_that.reason);case _:
191 return null;
192
193 }
194 }
195
196 }
197
198 /// @nodoc
199
200
201 class OndeError_NoModelLoaded extends OndeError {
202 const OndeError_NoModelLoaded(): super._();
203
204
205
206
207
208
209
210 @override
211 bool operator ==(Object other) {
212 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_NoModelLoaded);
213 }
214
215
216 @override
217 int get hashCode => runtimeType.hashCode;
218
219 @override
220 String toString() {
221 return 'OndeError.noModelLoaded()';
222 }
223
224
225 }
226
227
228
229
230 /// @nodoc
231
232
233 class OndeError_AlreadyLoaded extends OndeError {
234 const OndeError_AlreadyLoaded({required this.modelName}): super._();
235
236
237 final String modelName;
238
239 /// Create a copy of OndeError
240 /// with the given fields replaced by the non-null parameter values.
241 @JsonKey(includeFromJson: false, includeToJson: false)
242 @pragma('vm:prefer-inline')
243 $OndeError_AlreadyLoadedCopyWith<OndeError_AlreadyLoaded> get copyWith => _$OndeError_AlreadyLoadedCopyWithImpl<OndeError_AlreadyLoaded>(this, _$identity);
244
245
246
247 @override
248 bool operator ==(Object other) {
249 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_AlreadyLoaded&&(identical(other.modelName, modelName) || other.modelName == modelName));
250 }
251
252
253 @override
254 int get hashCode => Object.hash(runtimeType,modelName);
255
256 @override
257 String toString() {
258 return 'OndeError.alreadyLoaded(modelName: $modelName)';
259 }
260
261
262 }
263
264 /// @nodoc
265 abstract mixin class $OndeError_AlreadyLoadedCopyWith<$Res> implements $OndeErrorCopyWith<$Res> {
266 factory $OndeError_AlreadyLoadedCopyWith(OndeError_AlreadyLoaded value, $Res Function(OndeError_AlreadyLoaded) _then) = _$OndeError_AlreadyLoadedCopyWithImpl;
267 @useResult
268 $Res call({
269 String modelName
270 });
271
272
273
274
275 }
276 /// @nodoc
277 class _$OndeError_AlreadyLoadedCopyWithImpl<$Res>
278 implements $OndeError_AlreadyLoadedCopyWith<$Res> {
279 _$OndeError_AlreadyLoadedCopyWithImpl(this._self, this._then);
280
281 final OndeError_AlreadyLoaded _self;
282 final $Res Function(OndeError_AlreadyLoaded) _then;
283
284 /// Create a copy of OndeError
285 /// with the given fields replaced by the non-null parameter values.
286 @pragma('vm:prefer-inline') $Res call({Object? modelName = null,}) {
287 return _then(OndeError_AlreadyLoaded(
288 modelName: null == modelName ? _self.modelName : modelName // ignore: cast_nullable_to_non_nullable
289 as String,
290 ));
291 }
292
293
294 }
295
296 /// @nodoc
297
298
299 class OndeError_ModelBuild extends OndeError {
300 const OndeError_ModelBuild({required this.reason}): super._();
301
302
303 final String reason;
304
305 /// Create a copy of OndeError
306 /// with the given fields replaced by the non-null parameter values.
307 @JsonKey(includeFromJson: false, includeToJson: false)
308 @pragma('vm:prefer-inline')
309 $OndeError_ModelBuildCopyWith<OndeError_ModelBuild> get copyWith => _$OndeError_ModelBuildCopyWithImpl<OndeError_ModelBuild>(this, _$identity);
310
311
312
313 @override
314 bool operator ==(Object other) {
315 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_ModelBuild&&(identical(other.reason, reason) || other.reason == reason));
316 }
317
318
319 @override
320 int get hashCode => Object.hash(runtimeType,reason);
321
322 @override
323 String toString() {
324 return 'OndeError.modelBuild(reason: $reason)';
325 }
326
327
328 }
329
330 /// @nodoc
331 abstract mixin class $OndeError_ModelBuildCopyWith<$Res> implements $OndeErrorCopyWith<$Res> {
332 factory $OndeError_ModelBuildCopyWith(OndeError_ModelBuild value, $Res Function(OndeError_ModelBuild) _then) = _$OndeError_ModelBuildCopyWithImpl;
333 @useResult
334 $Res call({
335 String reason
336 });
337
338
339
340
341 }
342 /// @nodoc
343 class _$OndeError_ModelBuildCopyWithImpl<$Res>
344 implements $OndeError_ModelBuildCopyWith<$Res> {
345 _$OndeError_ModelBuildCopyWithImpl(this._self, this._then);
346
347 final OndeError_ModelBuild _self;
348 final $Res Function(OndeError_ModelBuild) _then;
349
350 /// Create a copy of OndeError
351 /// with the given fields replaced by the non-null parameter values.
352 @pragma('vm:prefer-inline') $Res call({Object? reason = null,}) {
353 return _then(OndeError_ModelBuild(
354 reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
355 as String,
356 ));
357 }
358
359
360 }
361
362 /// @nodoc
363
364
365 class OndeError_Inference extends OndeError {
366 const OndeError_Inference({required this.reason}): super._();
367
368
369 final String reason;
370
371 /// Create a copy of OndeError
372 /// with the given fields replaced by the non-null parameter values.
373 @JsonKey(includeFromJson: false, includeToJson: false)
374 @pragma('vm:prefer-inline')
375 $OndeError_InferenceCopyWith<OndeError_Inference> get copyWith => _$OndeError_InferenceCopyWithImpl<OndeError_Inference>(this, _$identity);
376
377
378
379 @override
380 bool operator ==(Object other) {
381 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_Inference&&(identical(other.reason, reason) || other.reason == reason));
382 }
383
384
385 @override
386 int get hashCode => Object.hash(runtimeType,reason);
387
388 @override
389 String toString() {
390 return 'OndeError.inference(reason: $reason)';
391 }
392
393
394 }
395
396 /// @nodoc
397 abstract mixin class $OndeError_InferenceCopyWith<$Res> implements $OndeErrorCopyWith<$Res> {
398 factory $OndeError_InferenceCopyWith(OndeError_Inference value, $Res Function(OndeError_Inference) _then) = _$OndeError_InferenceCopyWithImpl;
399 @useResult
400 $Res call({
401 String reason
402 });
403
404
405
406
407 }
408 /// @nodoc
409 class _$OndeError_InferenceCopyWithImpl<$Res>
410 implements $OndeError_InferenceCopyWith<$Res> {
411 _$OndeError_InferenceCopyWithImpl(this._self, this._then);
412
413 final OndeError_Inference _self;
414 final $Res Function(OndeError_Inference) _then;
415
416 /// Create a copy of OndeError
417 /// with the given fields replaced by the non-null parameter values.
418 @pragma('vm:prefer-inline') $Res call({Object? reason = null,}) {
419 return _then(OndeError_Inference(
420 reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
421 as String,
422 ));
423 }
424
425
426 }
427
428 /// @nodoc
429
430
431 class OndeError_Cancelled extends OndeError {
432 const OndeError_Cancelled(): super._();
433
434
435
436
437
438
439
440 @override
441 bool operator ==(Object other) {
442 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_Cancelled);
443 }
444
445
446 @override
447 int get hashCode => runtimeType.hashCode;
448
449 @override
450 String toString() {
451 return 'OndeError.cancelled()';
452 }
453
454
455 }
456
457
458
459
460 /// @nodoc
461
462
463 class OndeError_Other extends OndeError {
464 const OndeError_Other({required this.reason}): super._();
465
466
467 final String reason;
468
469 /// Create a copy of OndeError
470 /// with the given fields replaced by the non-null parameter values.
471 @JsonKey(includeFromJson: false, includeToJson: false)
472 @pragma('vm:prefer-inline')
473 $OndeError_OtherCopyWith<OndeError_Other> get copyWith => _$OndeError_OtherCopyWithImpl<OndeError_Other>(this, _$identity);
474
475
476
477 @override
478 bool operator ==(Object other) {
479 return identical(this, other) || (other.runtimeType == runtimeType&&other is OndeError_Other&&(identical(other.reason, reason) || other.reason == reason));
480 }
481
482
483 @override
484 int get hashCode => Object.hash(runtimeType,reason);
485
486 @override
487 String toString() {
488 return 'OndeError.other(reason: $reason)';
489 }
490
491
492 }
493
494 /// @nodoc
495 abstract mixin class $OndeError_OtherCopyWith<$Res> implements $OndeErrorCopyWith<$Res> {
496 factory $OndeError_OtherCopyWith(OndeError_Other value, $Res Function(OndeError_Other) _then) = _$OndeError_OtherCopyWithImpl;
497 @useResult
498 $Res call({
499 String reason
500 });
501
502
503
504
505 }
506 /// @nodoc
507 class _$OndeError_OtherCopyWithImpl<$Res>
508 implements $OndeError_OtherCopyWith<$Res> {
509 _$OndeError_OtherCopyWithImpl(this._self, this._then);
510
511 final OndeError_Other _self;
512 final $Res Function(OndeError_Other) _then;
513
514 /// Create a copy of OndeError
515 /// with the given fields replaced by the non-null parameter values.
516 @pragma('vm:prefer-inline') $Res call({Object? reason = null,}) {
517 return _then(OndeError_Other(
518 reason: null == reason ? _self.reason : reason // ignore: cast_nullable_to_non_nullable
519 as String,
520 ));
521 }
522
523
524 }
525
526 // dart format on