-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocator.freezed.dart
More file actions
1194 lines (1019 loc) · 58.2 KB
/
locator.freezed.dart
File metadata and controls
1194 lines (1019 loc) · 58.2 KB
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
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// GENERATED CODE - DO NOT MODIFY BY HAND
// coverage:ignore-file
// 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 'locator.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
// dart format off
T _$identity<T>(T value) => value;
/// @nodoc
mixin _$Locator {
/// [id] is the UUIDv4 identifier of the locator
String get id;/// [token] is the token used to access the locator
String get token;/// [mqttConfig] is the MQTT configuration for the locator
LocatorMqttConfig? get mqttConfig;/// [assets] is the list of assets associated with the locator
List<Asset>? get assets;/// [assetsIds] is the list of assets associated with the locator
List<String>? get assetsIds;/// [geofences] is the list of geofences associated with the locator
List<Geofence>? get geofences;/// [geofences] Idsis the list of geofences associated with the locator
List<String>? get geofencesIds;/// [triggers] is the list of triggers associated with the locator
List<Trigger>? get triggers;/// [triggers] Idsis the list of triggers associated with the locator
List<String>? get triggersIds;/// [expiresAt] is the expiration date of the locator, can be null for non-expiring locators
@TimestampOrNullConverter() DateTime? get expiresAt;/// [expiredBy] is the user who expired the locator, can be null if not expired
User? get expiredBy;/// [expiredById] is the ID of the user who expired the locator, can be null if not expired
String? get expiredById;/// [isExpired] indicates if the locator is expired
bool? get isExpired;/// [createdAt] is the creation date of the locator
@TimestampConverter() DateTime get createdAt;/// [createdBy] is the user who created the locator
User? get createdBy;/// [createdById] is the ID of the user who created the locator
String? get createdById;/// [updatedAt] is the last update date of the locator
@TimestampConverter() DateTime get updatedAt;/// [updatedBy] is the user who last updated the locator
User? get updatedBy;/// [updatedById] is the ID of the user who last updated the locator
String? get updatedById;/// [customization] is the registered app that will act as a customization for this locator
RegisteredApp? get customization;/// [customizationId] is the ID of the registered app that will act as a customization for this locator
String? get customizationId;/// [mapLayerId] is the id of the map layer to use for the locators that are using this layer.
String? get mapLayerId;/// [mapLayer] is the map layer to use for the locators that are using this layer.
MapLayer? get mapLayer;/// [pois] is the list of [Poi]s that are associated with the locator.
List<Poi>? get pois;/// [poisIds] is the list of [Poi]s that are associated with the locator.
List<String>? get poisIds;
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocatorCopyWith<Locator> get copyWith => _$LocatorCopyWithImpl<Locator>(this as Locator, _$identity);
/// Serializes this Locator to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is Locator&&(identical(other.id, id) || other.id == id)&&(identical(other.token, token) || other.token == token)&&(identical(other.mqttConfig, mqttConfig) || other.mqttConfig == mqttConfig)&&const DeepCollectionEquality().equals(other.assets, assets)&&const DeepCollectionEquality().equals(other.assetsIds, assetsIds)&&const DeepCollectionEquality().equals(other.geofences, geofences)&&const DeepCollectionEquality().equals(other.geofencesIds, geofencesIds)&&const DeepCollectionEquality().equals(other.triggers, triggers)&&const DeepCollectionEquality().equals(other.triggersIds, triggersIds)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)&&(identical(other.expiredBy, expiredBy) || other.expiredBy == expiredBy)&&(identical(other.expiredById, expiredById) || other.expiredById == expiredById)&&(identical(other.isExpired, isExpired) || other.isExpired == isExpired)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.createdById, createdById) || other.createdById == createdById)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.updatedBy, updatedBy) || other.updatedBy == updatedBy)&&(identical(other.updatedById, updatedById) || other.updatedById == updatedById)&&(identical(other.customization, customization) || other.customization == customization)&&(identical(other.customizationId, customizationId) || other.customizationId == customizationId)&&(identical(other.mapLayerId, mapLayerId) || other.mapLayerId == mapLayerId)&&(identical(other.mapLayer, mapLayer) || other.mapLayer == mapLayer)&&const DeepCollectionEquality().equals(other.pois, pois)&&const DeepCollectionEquality().equals(other.poisIds, poisIds));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,token,mqttConfig,const DeepCollectionEquality().hash(assets),const DeepCollectionEquality().hash(assetsIds),const DeepCollectionEquality().hash(geofences),const DeepCollectionEquality().hash(geofencesIds),const DeepCollectionEquality().hash(triggers),const DeepCollectionEquality().hash(triggersIds),expiresAt,expiredBy,expiredById,isExpired,createdAt,createdBy,createdById,updatedAt,updatedBy,updatedById,customization,customizationId,mapLayerId,mapLayer,const DeepCollectionEquality().hash(pois),const DeepCollectionEquality().hash(poisIds)]);
@override
String toString() {
return 'Locator(id: $id, token: $token, mqttConfig: $mqttConfig, assets: $assets, assetsIds: $assetsIds, geofences: $geofences, geofencesIds: $geofencesIds, triggers: $triggers, triggersIds: $triggersIds, expiresAt: $expiresAt, expiredBy: $expiredBy, expiredById: $expiredById, isExpired: $isExpired, createdAt: $createdAt, createdBy: $createdBy, createdById: $createdById, updatedAt: $updatedAt, updatedBy: $updatedBy, updatedById: $updatedById, customization: $customization, customizationId: $customizationId, mapLayerId: $mapLayerId, mapLayer: $mapLayer, pois: $pois, poisIds: $poisIds)';
}
}
/// @nodoc
abstract mixin class $LocatorCopyWith<$Res> {
factory $LocatorCopyWith(Locator value, $Res Function(Locator) _then) = _$LocatorCopyWithImpl;
@useResult
$Res call({
String id, String token, LocatorMqttConfig? mqttConfig, List<Asset>? assets, List<String>? assetsIds, List<Geofence>? geofences, List<String>? geofencesIds, List<Trigger>? triggers, List<String>? triggersIds,@TimestampOrNullConverter() DateTime? expiresAt, User? expiredBy, String? expiredById, bool? isExpired,@TimestampConverter() DateTime createdAt, User? createdBy, String? createdById,@TimestampConverter() DateTime updatedAt, User? updatedBy, String? updatedById, RegisteredApp? customization, String? customizationId, String? mapLayerId, MapLayer? mapLayer, List<Poi>? pois, List<String>? poisIds
});
$LocatorMqttConfigCopyWith<$Res>? get mqttConfig;$UserCopyWith<$Res>? get expiredBy;$UserCopyWith<$Res>? get createdBy;$UserCopyWith<$Res>? get updatedBy;$RegisteredAppCopyWith<$Res>? get customization;$MapLayerCopyWith<$Res>? get mapLayer;
}
/// @nodoc
class _$LocatorCopyWithImpl<$Res>
implements $LocatorCopyWith<$Res> {
_$LocatorCopyWithImpl(this._self, this._then);
final Locator _self;
final $Res Function(Locator) _then;
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = null,Object? token = null,Object? mqttConfig = freezed,Object? assets = freezed,Object? assetsIds = freezed,Object? geofences = freezed,Object? geofencesIds = freezed,Object? triggers = freezed,Object? triggersIds = freezed,Object? expiresAt = freezed,Object? expiredBy = freezed,Object? expiredById = freezed,Object? isExpired = freezed,Object? createdAt = null,Object? createdBy = freezed,Object? createdById = freezed,Object? updatedAt = null,Object? updatedBy = freezed,Object? updatedById = freezed,Object? customization = freezed,Object? customizationId = freezed,Object? mapLayerId = freezed,Object? mapLayer = freezed,Object? pois = freezed,Object? poisIds = freezed,}) {
return _then(_self.copyWith(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,token: null == token ? _self.token : token // ignore: cast_nullable_to_non_nullable
as String,mqttConfig: freezed == mqttConfig ? _self.mqttConfig : mqttConfig // ignore: cast_nullable_to_non_nullable
as LocatorMqttConfig?,assets: freezed == assets ? _self.assets : assets // ignore: cast_nullable_to_non_nullable
as List<Asset>?,assetsIds: freezed == assetsIds ? _self.assetsIds : assetsIds // ignore: cast_nullable_to_non_nullable
as List<String>?,geofences: freezed == geofences ? _self.geofences : geofences // ignore: cast_nullable_to_non_nullable
as List<Geofence>?,geofencesIds: freezed == geofencesIds ? _self.geofencesIds : geofencesIds // ignore: cast_nullable_to_non_nullable
as List<String>?,triggers: freezed == triggers ? _self.triggers : triggers // ignore: cast_nullable_to_non_nullable
as List<Trigger>?,triggersIds: freezed == triggersIds ? _self.triggersIds : triggersIds // ignore: cast_nullable_to_non_nullable
as List<String>?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime?,expiredBy: freezed == expiredBy ? _self.expiredBy : expiredBy // ignore: cast_nullable_to_non_nullable
as User?,expiredById: freezed == expiredById ? _self.expiredById : expiredById // ignore: cast_nullable_to_non_nullable
as String?,isExpired: freezed == isExpired ? _self.isExpired : isExpired // ignore: cast_nullable_to_non_nullable
as bool?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as User?,createdById: freezed == createdById ? _self.createdById : createdById // ignore: cast_nullable_to_non_nullable
as String?,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedBy: freezed == updatedBy ? _self.updatedBy : updatedBy // ignore: cast_nullable_to_non_nullable
as User?,updatedById: freezed == updatedById ? _self.updatedById : updatedById // ignore: cast_nullable_to_non_nullable
as String?,customization: freezed == customization ? _self.customization : customization // ignore: cast_nullable_to_non_nullable
as RegisteredApp?,customizationId: freezed == customizationId ? _self.customizationId : customizationId // ignore: cast_nullable_to_non_nullable
as String?,mapLayerId: freezed == mapLayerId ? _self.mapLayerId : mapLayerId // ignore: cast_nullable_to_non_nullable
as String?,mapLayer: freezed == mapLayer ? _self.mapLayer : mapLayer // ignore: cast_nullable_to_non_nullable
as MapLayer?,pois: freezed == pois ? _self.pois : pois // ignore: cast_nullable_to_non_nullable
as List<Poi>?,poisIds: freezed == poisIds ? _self.poisIds : poisIds // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LocatorMqttConfigCopyWith<$Res>? get mqttConfig {
if (_self.mqttConfig == null) {
return null;
}
return $LocatorMqttConfigCopyWith<$Res>(_self.mqttConfig!, (value) {
return _then(_self.copyWith(mqttConfig: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get expiredBy {
if (_self.expiredBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.expiredBy!, (value) {
return _then(_self.copyWith(expiredBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get createdBy {
if (_self.createdBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.createdBy!, (value) {
return _then(_self.copyWith(createdBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get updatedBy {
if (_self.updatedBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.updatedBy!, (value) {
return _then(_self.copyWith(updatedBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$RegisteredAppCopyWith<$Res>? get customization {
if (_self.customization == null) {
return null;
}
return $RegisteredAppCopyWith<$Res>(_self.customization!, (value) {
return _then(_self.copyWith(customization: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MapLayerCopyWith<$Res>? get mapLayer {
if (_self.mapLayer == null) {
return null;
}
return $MapLayerCopyWith<$Res>(_self.mapLayer!, (value) {
return _then(_self.copyWith(mapLayer: value));
});
}
}
/// Adds pattern-matching-related methods to [Locator].
extension LocatorPatterns on Locator {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _Locator value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _Locator() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _Locator value) $default,){
final _that = this;
switch (_that) {
case _Locator():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _Locator value)? $default,){
final _that = this;
switch (_that) {
case _Locator() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String id, String token, LocatorMqttConfig? mqttConfig, List<Asset>? assets, List<String>? assetsIds, List<Geofence>? geofences, List<String>? geofencesIds, List<Trigger>? triggers, List<String>? triggersIds, @TimestampOrNullConverter() DateTime? expiresAt, User? expiredBy, String? expiredById, bool? isExpired, @TimestampConverter() DateTime createdAt, User? createdBy, String? createdById, @TimestampConverter() DateTime updatedAt, User? updatedBy, String? updatedById, RegisteredApp? customization, String? customizationId, String? mapLayerId, MapLayer? mapLayer, List<Poi>? pois, List<String>? poisIds)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _Locator() when $default != null:
return $default(_that.id,_that.token,_that.mqttConfig,_that.assets,_that.assetsIds,_that.geofences,_that.geofencesIds,_that.triggers,_that.triggersIds,_that.expiresAt,_that.expiredBy,_that.expiredById,_that.isExpired,_that.createdAt,_that.createdBy,_that.createdById,_that.updatedAt,_that.updatedBy,_that.updatedById,_that.customization,_that.customizationId,_that.mapLayerId,_that.mapLayer,_that.pois,_that.poisIds);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String id, String token, LocatorMqttConfig? mqttConfig, List<Asset>? assets, List<String>? assetsIds, List<Geofence>? geofences, List<String>? geofencesIds, List<Trigger>? triggers, List<String>? triggersIds, @TimestampOrNullConverter() DateTime? expiresAt, User? expiredBy, String? expiredById, bool? isExpired, @TimestampConverter() DateTime createdAt, User? createdBy, String? createdById, @TimestampConverter() DateTime updatedAt, User? updatedBy, String? updatedById, RegisteredApp? customization, String? customizationId, String? mapLayerId, MapLayer? mapLayer, List<Poi>? pois, List<String>? poisIds) $default,) {final _that = this;
switch (_that) {
case _Locator():
return $default(_that.id,_that.token,_that.mqttConfig,_that.assets,_that.assetsIds,_that.geofences,_that.geofencesIds,_that.triggers,_that.triggersIds,_that.expiresAt,_that.expiredBy,_that.expiredById,_that.isExpired,_that.createdAt,_that.createdBy,_that.createdById,_that.updatedAt,_that.updatedBy,_that.updatedById,_that.customization,_that.customizationId,_that.mapLayerId,_that.mapLayer,_that.pois,_that.poisIds);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String id, String token, LocatorMqttConfig? mqttConfig, List<Asset>? assets, List<String>? assetsIds, List<Geofence>? geofences, List<String>? geofencesIds, List<Trigger>? triggers, List<String>? triggersIds, @TimestampOrNullConverter() DateTime? expiresAt, User? expiredBy, String? expiredById, bool? isExpired, @TimestampConverter() DateTime createdAt, User? createdBy, String? createdById, @TimestampConverter() DateTime updatedAt, User? updatedBy, String? updatedById, RegisteredApp? customization, String? customizationId, String? mapLayerId, MapLayer? mapLayer, List<Poi>? pois, List<String>? poisIds)? $default,) {final _that = this;
switch (_that) {
case _Locator() when $default != null:
return $default(_that.id,_that.token,_that.mqttConfig,_that.assets,_that.assetsIds,_that.geofences,_that.geofencesIds,_that.triggers,_that.triggersIds,_that.expiresAt,_that.expiredBy,_that.expiredById,_that.isExpired,_that.createdAt,_that.createdBy,_that.createdById,_that.updatedAt,_that.updatedBy,_that.updatedById,_that.customization,_that.customizationId,_that.mapLayerId,_that.mapLayer,_that.pois,_that.poisIds);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _Locator extends Locator {
const _Locator({required this.id, required this.token, this.mqttConfig, final List<Asset>? assets, final List<String>? assetsIds, final List<Geofence>? geofences, final List<String>? geofencesIds, final List<Trigger>? triggers, final List<String>? triggersIds, @TimestampOrNullConverter() this.expiresAt, this.expiredBy, this.expiredById, this.isExpired, @TimestampConverter() required this.createdAt, this.createdBy, this.createdById, @TimestampConverter() required this.updatedAt, this.updatedBy, this.updatedById, this.customization, this.customizationId, this.mapLayerId, this.mapLayer, final List<Poi>? pois, final List<String>? poisIds}): _assets = assets,_assetsIds = assetsIds,_geofences = geofences,_geofencesIds = geofencesIds,_triggers = triggers,_triggersIds = triggersIds,_pois = pois,_poisIds = poisIds,super._();
factory _Locator.fromJson(Map<String, dynamic> json) => _$LocatorFromJson(json);
/// [id] is the UUIDv4 identifier of the locator
@override final String id;
/// [token] is the token used to access the locator
@override final String token;
/// [mqttConfig] is the MQTT configuration for the locator
@override final LocatorMqttConfig? mqttConfig;
/// [assets] is the list of assets associated with the locator
final List<Asset>? _assets;
/// [assets] is the list of assets associated with the locator
@override List<Asset>? get assets {
final value = _assets;
if (value == null) return null;
if (_assets is EqualUnmodifiableListView) return _assets;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [assetsIds] is the list of assets associated with the locator
final List<String>? _assetsIds;
/// [assetsIds] is the list of assets associated with the locator
@override List<String>? get assetsIds {
final value = _assetsIds;
if (value == null) return null;
if (_assetsIds is EqualUnmodifiableListView) return _assetsIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [geofences] is the list of geofences associated with the locator
final List<Geofence>? _geofences;
/// [geofences] is the list of geofences associated with the locator
@override List<Geofence>? get geofences {
final value = _geofences;
if (value == null) return null;
if (_geofences is EqualUnmodifiableListView) return _geofences;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [geofences] Idsis the list of geofences associated with the locator
final List<String>? _geofencesIds;
/// [geofences] Idsis the list of geofences associated with the locator
@override List<String>? get geofencesIds {
final value = _geofencesIds;
if (value == null) return null;
if (_geofencesIds is EqualUnmodifiableListView) return _geofencesIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [triggers] is the list of triggers associated with the locator
final List<Trigger>? _triggers;
/// [triggers] is the list of triggers associated with the locator
@override List<Trigger>? get triggers {
final value = _triggers;
if (value == null) return null;
if (_triggers is EqualUnmodifiableListView) return _triggers;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [triggers] Idsis the list of triggers associated with the locator
final List<String>? _triggersIds;
/// [triggers] Idsis the list of triggers associated with the locator
@override List<String>? get triggersIds {
final value = _triggersIds;
if (value == null) return null;
if (_triggersIds is EqualUnmodifiableListView) return _triggersIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [expiresAt] is the expiration date of the locator, can be null for non-expiring locators
@override@TimestampOrNullConverter() final DateTime? expiresAt;
/// [expiredBy] is the user who expired the locator, can be null if not expired
@override final User? expiredBy;
/// [expiredById] is the ID of the user who expired the locator, can be null if not expired
@override final String? expiredById;
/// [isExpired] indicates if the locator is expired
@override final bool? isExpired;
/// [createdAt] is the creation date of the locator
@override@TimestampConverter() final DateTime createdAt;
/// [createdBy] is the user who created the locator
@override final User? createdBy;
/// [createdById] is the ID of the user who created the locator
@override final String? createdById;
/// [updatedAt] is the last update date of the locator
@override@TimestampConverter() final DateTime updatedAt;
/// [updatedBy] is the user who last updated the locator
@override final User? updatedBy;
/// [updatedById] is the ID of the user who last updated the locator
@override final String? updatedById;
/// [customization] is the registered app that will act as a customization for this locator
@override final RegisteredApp? customization;
/// [customizationId] is the ID of the registered app that will act as a customization for this locator
@override final String? customizationId;
/// [mapLayerId] is the id of the map layer to use for the locators that are using this layer.
@override final String? mapLayerId;
/// [mapLayer] is the map layer to use for the locators that are using this layer.
@override final MapLayer? mapLayer;
/// [pois] is the list of [Poi]s that are associated with the locator.
final List<Poi>? _pois;
/// [pois] is the list of [Poi]s that are associated with the locator.
@override List<Poi>? get pois {
final value = _pois;
if (value == null) return null;
if (_pois is EqualUnmodifiableListView) return _pois;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// [poisIds] is the list of [Poi]s that are associated with the locator.
final List<String>? _poisIds;
/// [poisIds] is the list of [Poi]s that are associated with the locator.
@override List<String>? get poisIds {
final value = _poisIds;
if (value == null) return null;
if (_poisIds is EqualUnmodifiableListView) return _poisIds;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LocatorCopyWith<_Locator> get copyWith => __$LocatorCopyWithImpl<_Locator>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$LocatorToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _Locator&&(identical(other.id, id) || other.id == id)&&(identical(other.token, token) || other.token == token)&&(identical(other.mqttConfig, mqttConfig) || other.mqttConfig == mqttConfig)&&const DeepCollectionEquality().equals(other._assets, _assets)&&const DeepCollectionEquality().equals(other._assetsIds, _assetsIds)&&const DeepCollectionEquality().equals(other._geofences, _geofences)&&const DeepCollectionEquality().equals(other._geofencesIds, _geofencesIds)&&const DeepCollectionEquality().equals(other._triggers, _triggers)&&const DeepCollectionEquality().equals(other._triggersIds, _triggersIds)&&(identical(other.expiresAt, expiresAt) || other.expiresAt == expiresAt)&&(identical(other.expiredBy, expiredBy) || other.expiredBy == expiredBy)&&(identical(other.expiredById, expiredById) || other.expiredById == expiredById)&&(identical(other.isExpired, isExpired) || other.isExpired == isExpired)&&(identical(other.createdAt, createdAt) || other.createdAt == createdAt)&&(identical(other.createdBy, createdBy) || other.createdBy == createdBy)&&(identical(other.createdById, createdById) || other.createdById == createdById)&&(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt)&&(identical(other.updatedBy, updatedBy) || other.updatedBy == updatedBy)&&(identical(other.updatedById, updatedById) || other.updatedById == updatedById)&&(identical(other.customization, customization) || other.customization == customization)&&(identical(other.customizationId, customizationId) || other.customizationId == customizationId)&&(identical(other.mapLayerId, mapLayerId) || other.mapLayerId == mapLayerId)&&(identical(other.mapLayer, mapLayer) || other.mapLayer == mapLayer)&&const DeepCollectionEquality().equals(other._pois, _pois)&&const DeepCollectionEquality().equals(other._poisIds, _poisIds));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([runtimeType,id,token,mqttConfig,const DeepCollectionEquality().hash(_assets),const DeepCollectionEquality().hash(_assetsIds),const DeepCollectionEquality().hash(_geofences),const DeepCollectionEquality().hash(_geofencesIds),const DeepCollectionEquality().hash(_triggers),const DeepCollectionEquality().hash(_triggersIds),expiresAt,expiredBy,expiredById,isExpired,createdAt,createdBy,createdById,updatedAt,updatedBy,updatedById,customization,customizationId,mapLayerId,mapLayer,const DeepCollectionEquality().hash(_pois),const DeepCollectionEquality().hash(_poisIds)]);
@override
String toString() {
return 'Locator(id: $id, token: $token, mqttConfig: $mqttConfig, assets: $assets, assetsIds: $assetsIds, geofences: $geofences, geofencesIds: $geofencesIds, triggers: $triggers, triggersIds: $triggersIds, expiresAt: $expiresAt, expiredBy: $expiredBy, expiredById: $expiredById, isExpired: $isExpired, createdAt: $createdAt, createdBy: $createdBy, createdById: $createdById, updatedAt: $updatedAt, updatedBy: $updatedBy, updatedById: $updatedById, customization: $customization, customizationId: $customizationId, mapLayerId: $mapLayerId, mapLayer: $mapLayer, pois: $pois, poisIds: $poisIds)';
}
}
/// @nodoc
abstract mixin class _$LocatorCopyWith<$Res> implements $LocatorCopyWith<$Res> {
factory _$LocatorCopyWith(_Locator value, $Res Function(_Locator) _then) = __$LocatorCopyWithImpl;
@override @useResult
$Res call({
String id, String token, LocatorMqttConfig? mqttConfig, List<Asset>? assets, List<String>? assetsIds, List<Geofence>? geofences, List<String>? geofencesIds, List<Trigger>? triggers, List<String>? triggersIds,@TimestampOrNullConverter() DateTime? expiresAt, User? expiredBy, String? expiredById, bool? isExpired,@TimestampConverter() DateTime createdAt, User? createdBy, String? createdById,@TimestampConverter() DateTime updatedAt, User? updatedBy, String? updatedById, RegisteredApp? customization, String? customizationId, String? mapLayerId, MapLayer? mapLayer, List<Poi>? pois, List<String>? poisIds
});
@override $LocatorMqttConfigCopyWith<$Res>? get mqttConfig;@override $UserCopyWith<$Res>? get expiredBy;@override $UserCopyWith<$Res>? get createdBy;@override $UserCopyWith<$Res>? get updatedBy;@override $RegisteredAppCopyWith<$Res>? get customization;@override $MapLayerCopyWith<$Res>? get mapLayer;
}
/// @nodoc
class __$LocatorCopyWithImpl<$Res>
implements _$LocatorCopyWith<$Res> {
__$LocatorCopyWithImpl(this._self, this._then);
final _Locator _self;
final $Res Function(_Locator) _then;
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? id = null,Object? token = null,Object? mqttConfig = freezed,Object? assets = freezed,Object? assetsIds = freezed,Object? geofences = freezed,Object? geofencesIds = freezed,Object? triggers = freezed,Object? triggersIds = freezed,Object? expiresAt = freezed,Object? expiredBy = freezed,Object? expiredById = freezed,Object? isExpired = freezed,Object? createdAt = null,Object? createdBy = freezed,Object? createdById = freezed,Object? updatedAt = null,Object? updatedBy = freezed,Object? updatedById = freezed,Object? customization = freezed,Object? customizationId = freezed,Object? mapLayerId = freezed,Object? mapLayer = freezed,Object? pois = freezed,Object? poisIds = freezed,}) {
return _then(_Locator(
id: null == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String,token: null == token ? _self.token : token // ignore: cast_nullable_to_non_nullable
as String,mqttConfig: freezed == mqttConfig ? _self.mqttConfig : mqttConfig // ignore: cast_nullable_to_non_nullable
as LocatorMqttConfig?,assets: freezed == assets ? _self._assets : assets // ignore: cast_nullable_to_non_nullable
as List<Asset>?,assetsIds: freezed == assetsIds ? _self._assetsIds : assetsIds // ignore: cast_nullable_to_non_nullable
as List<String>?,geofences: freezed == geofences ? _self._geofences : geofences // ignore: cast_nullable_to_non_nullable
as List<Geofence>?,geofencesIds: freezed == geofencesIds ? _self._geofencesIds : geofencesIds // ignore: cast_nullable_to_non_nullable
as List<String>?,triggers: freezed == triggers ? _self._triggers : triggers // ignore: cast_nullable_to_non_nullable
as List<Trigger>?,triggersIds: freezed == triggersIds ? _self._triggersIds : triggersIds // ignore: cast_nullable_to_non_nullable
as List<String>?,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime?,expiredBy: freezed == expiredBy ? _self.expiredBy : expiredBy // ignore: cast_nullable_to_non_nullable
as User?,expiredById: freezed == expiredById ? _self.expiredById : expiredById // ignore: cast_nullable_to_non_nullable
as String?,isExpired: freezed == isExpired ? _self.isExpired : isExpired // ignore: cast_nullable_to_non_nullable
as bool?,createdAt: null == createdAt ? _self.createdAt : createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,createdBy: freezed == createdBy ? _self.createdBy : createdBy // ignore: cast_nullable_to_non_nullable
as User?,createdById: freezed == createdById ? _self.createdById : createdById // ignore: cast_nullable_to_non_nullable
as String?,updatedAt: null == updatedAt ? _self.updatedAt : updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,updatedBy: freezed == updatedBy ? _self.updatedBy : updatedBy // ignore: cast_nullable_to_non_nullable
as User?,updatedById: freezed == updatedById ? _self.updatedById : updatedById // ignore: cast_nullable_to_non_nullable
as String?,customization: freezed == customization ? _self.customization : customization // ignore: cast_nullable_to_non_nullable
as RegisteredApp?,customizationId: freezed == customizationId ? _self.customizationId : customizationId // ignore: cast_nullable_to_non_nullable
as String?,mapLayerId: freezed == mapLayerId ? _self.mapLayerId : mapLayerId // ignore: cast_nullable_to_non_nullable
as String?,mapLayer: freezed == mapLayer ? _self.mapLayer : mapLayer // ignore: cast_nullable_to_non_nullable
as MapLayer?,pois: freezed == pois ? _self._pois : pois // ignore: cast_nullable_to_non_nullable
as List<Poi>?,poisIds: freezed == poisIds ? _self._poisIds : poisIds // ignore: cast_nullable_to_non_nullable
as List<String>?,
));
}
/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LocatorMqttConfigCopyWith<$Res>? get mqttConfig {
if (_self.mqttConfig == null) {
return null;
}
return $LocatorMqttConfigCopyWith<$Res>(_self.mqttConfig!, (value) {
return _then(_self.copyWith(mqttConfig: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get expiredBy {
if (_self.expiredBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.expiredBy!, (value) {
return _then(_self.copyWith(expiredBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get createdBy {
if (_self.createdBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.createdBy!, (value) {
return _then(_self.copyWith(createdBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res>? get updatedBy {
if (_self.updatedBy == null) {
return null;
}
return $UserCopyWith<$Res>(_self.updatedBy!, (value) {
return _then(_self.copyWith(updatedBy: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$RegisteredAppCopyWith<$Res>? get customization {
if (_self.customization == null) {
return null;
}
return $RegisteredAppCopyWith<$Res>(_self.customization!, (value) {
return _then(_self.copyWith(customization: value));
});
}/// Create a copy of Locator
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MapLayerCopyWith<$Res>? get mapLayer {
if (_self.mapLayer == null) {
return null;
}
return $MapLayerCopyWith<$Res>(_self.mapLayer!, (value) {
return _then(_self.copyWith(mapLayer: value));
});
}
}
/// @nodoc
mixin _$LocatorMqttConfig {
/// [host] is the MQTT broker host
String get host;/// [port] is the MQTT broker port
int get port;/// [username] is the MQTT broker username
String? get username;/// [password] is the MQTT broker password
String? get password;/// [topic] is the MQTT topic to subscribe
String get topic;
/// Create a copy of LocatorMqttConfig
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocatorMqttConfigCopyWith<LocatorMqttConfig> get copyWith => _$LocatorMqttConfigCopyWithImpl<LocatorMqttConfig>(this as LocatorMqttConfig, _$identity);
/// Serializes this LocatorMqttConfig to a JSON map.
Map<String, dynamic> toJson();
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is LocatorMqttConfig&&(identical(other.host, host) || other.host == host)&&(identical(other.port, port) || other.port == port)&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.topic, topic) || other.topic == topic));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,host,port,username,password,topic);
@override
String toString() {
return 'LocatorMqttConfig(host: $host, port: $port, username: $username, password: $password, topic: $topic)';
}
}
/// @nodoc
abstract mixin class $LocatorMqttConfigCopyWith<$Res> {
factory $LocatorMqttConfigCopyWith(LocatorMqttConfig value, $Res Function(LocatorMqttConfig) _then) = _$LocatorMqttConfigCopyWithImpl;
@useResult
$Res call({
String host, int port, String? username, String? password, String topic
});
}
/// @nodoc
class _$LocatorMqttConfigCopyWithImpl<$Res>
implements $LocatorMqttConfigCopyWith<$Res> {
_$LocatorMqttConfigCopyWithImpl(this._self, this._then);
final LocatorMqttConfig _self;
final $Res Function(LocatorMqttConfig) _then;
/// Create a copy of LocatorMqttConfig
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? host = null,Object? port = null,Object? username = freezed,Object? password = freezed,Object? topic = null,}) {
return _then(_self.copyWith(
host: null == host ? _self.host : host // ignore: cast_nullable_to_non_nullable
as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
as int,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,topic: null == topic ? _self.topic : topic // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// Adds pattern-matching-related methods to [LocatorMqttConfig].
extension LocatorMqttConfigPatterns on LocatorMqttConfig {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LocatorMqttConfig value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _LocatorMqttConfig() when $default != null:
return $default(_that);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// Callbacks receives the raw object, upcasted.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case final Subclass2 value:
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult map<TResult extends Object?>(TResult Function( _LocatorMqttConfig value) $default,){
final _that = this;
switch (_that) {
case _LocatorMqttConfig():
return $default(_that);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `map` that fallback to returning `null`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? mapOrNull<TResult extends Object?>(TResult? Function( _LocatorMqttConfig value)? $default,){
final _that = this;
switch (_that) {
case _LocatorMqttConfig() when $default != null:
return $default(_that);case _:
return null;
}
}
/// A variant of `when` that fallback to an `orElse` callback.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeWhen<TResult extends Object?>(TResult Function( String host, int port, String? username, String? password, String topic)? $default,{required TResult orElse(),}) {final _that = this;
switch (_that) {
case _LocatorMqttConfig() when $default != null:
return $default(_that.host,_that.port,_that.username,_that.password,_that.topic);case _:
return orElse();
}
}
/// A `switch`-like method, using callbacks.
///
/// As opposed to `map`, this offers destructuring.
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case Subclass2(:final field2):
/// return ...;
/// }
/// ```
@optionalTypeArgs TResult when<TResult extends Object?>(TResult Function( String host, int port, String? username, String? password, String topic) $default,) {final _that = this;
switch (_that) {
case _LocatorMqttConfig():
return $default(_that.host,_that.port,_that.username,_that.password,_that.topic);case _:
throw StateError('Unexpected subclass');
}
}
/// A variant of `when` that fallback to returning `null`
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case Subclass(:final field):
/// return ...;
/// case _:
/// return null;
/// }
/// ```
@optionalTypeArgs TResult? whenOrNull<TResult extends Object?>(TResult? Function( String host, int port, String? username, String? password, String topic)? $default,) {final _that = this;
switch (_that) {
case _LocatorMqttConfig() when $default != null:
return $default(_that.host,_that.port,_that.username,_that.password,_that.topic);case _:
return null;
}
}
}
/// @nodoc
@JsonSerializable()
class _LocatorMqttConfig extends LocatorMqttConfig {
const _LocatorMqttConfig({required this.host, required this.port, this.username, this.password, required this.topic}): super._();
factory _LocatorMqttConfig.fromJson(Map<String, dynamic> json) => _$LocatorMqttConfigFromJson(json);
/// [host] is the MQTT broker host
@override final String host;
/// [port] is the MQTT broker port
@override final int port;
/// [username] is the MQTT broker username
@override final String? username;
/// [password] is the MQTT broker password
@override final String? password;
/// [topic] is the MQTT topic to subscribe
@override final String topic;
/// Create a copy of LocatorMqttConfig
/// with the given fields replaced by the non-null parameter values.
@override @JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
_$LocatorMqttConfigCopyWith<_LocatorMqttConfig> get copyWith => __$LocatorMqttConfigCopyWithImpl<_LocatorMqttConfig>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$LocatorMqttConfigToJson(this, );
}
@override
bool operator ==(Object other) {
return identical(this, other) || (other.runtimeType == runtimeType&&other is _LocatorMqttConfig&&(identical(other.host, host) || other.host == host)&&(identical(other.port, port) || other.port == port)&&(identical(other.username, username) || other.username == username)&&(identical(other.password, password) || other.password == password)&&(identical(other.topic, topic) || other.topic == topic));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType,host,port,username,password,topic);
@override
String toString() {
return 'LocatorMqttConfig(host: $host, port: $port, username: $username, password: $password, topic: $topic)';
}
}
/// @nodoc
abstract mixin class _$LocatorMqttConfigCopyWith<$Res> implements $LocatorMqttConfigCopyWith<$Res> {
factory _$LocatorMqttConfigCopyWith(_LocatorMqttConfig value, $Res Function(_LocatorMqttConfig) _then) = __$LocatorMqttConfigCopyWithImpl;
@override @useResult
$Res call({
String host, int port, String? username, String? password, String topic
});
}
/// @nodoc
class __$LocatorMqttConfigCopyWithImpl<$Res>
implements _$LocatorMqttConfigCopyWith<$Res> {
__$LocatorMqttConfigCopyWithImpl(this._self, this._then);
final _LocatorMqttConfig _self;
final $Res Function(_LocatorMqttConfig) _then;
/// Create a copy of LocatorMqttConfig
/// with the given fields replaced by the non-null parameter values.
@override @pragma('vm:prefer-inline') $Res call({Object? host = null,Object? port = null,Object? username = freezed,Object? password = freezed,Object? topic = null,}) {
return _then(_LocatorMqttConfig(
host: null == host ? _self.host : host // ignore: cast_nullable_to_non_nullable
as String,port: null == port ? _self.port : port // ignore: cast_nullable_to_non_nullable
as int,username: freezed == username ? _self.username : username // ignore: cast_nullable_to_non_nullable
as String?,password: freezed == password ? _self.password : password // ignore: cast_nullable_to_non_nullable
as String?,topic: null == topic ? _self.topic : topic // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
mixin _$LocatorInput {
/// [id] is the UUIDv4 identifier of the locator
String? get id;/// [id] is the UUIDv4 identifier of the locator
set id(String? value);/// [assetsIds] is the list of assets associated with the locator
List<String> get assetsIds;/// [assetsIds] is the list of assets associated with the locator
set assetsIds(List<String> value);/// [geofencesIds] is the list of geofences associated with the locator
List<String> get geofencesIds;/// [geofencesIds] is the list of geofences associated with the locator
set geofencesIds(List<String> value);/// [triggersIds] is the list of triggers associated with the locator
List<String> get triggersIds;/// [triggersIds] is the list of triggers associated with the locator
set triggersIds(List<String> value);/// [expiresAt] is the expiration date of the locator, can be null for non-expiring locators
@TimestampOrNullConverter() DateTime? get expiresAt;/// [expiresAt] is the expiration date of the locator, can be null for non-expiring locators
@TimestampOrNullConverter() set expiresAt(DateTime? value);/// [customizationId] is the ID of the registered app that will act as a customization for this locator
String? get customizationId;/// [customizationId] is the ID of the registered app that will act as a customization for this locator
set customizationId(String? value);/// [poisIds] is the list of [Poi]s that are associated with the locator.
List<String> get poisIds;/// [poisIds] is the list of [Poi]s that are associated with the locator.
set poisIds(List<String> value);/// [mapLayerId] is the id of the map layer to use for the locators that are using this layer.
String? get mapLayerId;/// [mapLayerId] is the id of the map layer to use for the locators that are using this layer.
set mapLayerId(String? value);
/// Create a copy of LocatorInput
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@pragma('vm:prefer-inline')
$LocatorInputCopyWith<LocatorInput> get copyWith => _$LocatorInputCopyWithImpl<LocatorInput>(this as LocatorInput, _$identity);
/// Serializes this LocatorInput to a JSON map.
Map<String, dynamic> toJson();
@override
String toString() {
return 'LocatorInput(id: $id, assetsIds: $assetsIds, geofencesIds: $geofencesIds, triggersIds: $triggersIds, expiresAt: $expiresAt, customizationId: $customizationId, poisIds: $poisIds, mapLayerId: $mapLayerId)';
}
}
/// @nodoc
abstract mixin class $LocatorInputCopyWith<$Res> {
factory $LocatorInputCopyWith(LocatorInput value, $Res Function(LocatorInput) _then) = _$LocatorInputCopyWithImpl;
@useResult
$Res call({
String? id, List<String> assetsIds, List<String> geofencesIds, List<String> triggersIds,@TimestampOrNullConverter() DateTime? expiresAt, String? customizationId, List<String> poisIds, String? mapLayerId
});
}
/// @nodoc
class _$LocatorInputCopyWithImpl<$Res>
implements $LocatorInputCopyWith<$Res> {
_$LocatorInputCopyWithImpl(this._self, this._then);
final LocatorInput _self;
final $Res Function(LocatorInput) _then;
/// Create a copy of LocatorInput
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline') @override $Res call({Object? id = freezed,Object? assetsIds = null,Object? geofencesIds = null,Object? triggersIds = null,Object? expiresAt = freezed,Object? customizationId = freezed,Object? poisIds = null,Object? mapLayerId = freezed,}) {
return _then(_self.copyWith(
id: freezed == id ? _self.id : id // ignore: cast_nullable_to_non_nullable
as String?,assetsIds: null == assetsIds ? _self.assetsIds : assetsIds // ignore: cast_nullable_to_non_nullable
as List<String>,geofencesIds: null == geofencesIds ? _self.geofencesIds : geofencesIds // ignore: cast_nullable_to_non_nullable
as List<String>,triggersIds: null == triggersIds ? _self.triggersIds : triggersIds // ignore: cast_nullable_to_non_nullable
as List<String>,expiresAt: freezed == expiresAt ? _self.expiresAt : expiresAt // ignore: cast_nullable_to_non_nullable
as DateTime?,customizationId: freezed == customizationId ? _self.customizationId : customizationId // ignore: cast_nullable_to_non_nullable
as String?,poisIds: null == poisIds ? _self.poisIds : poisIds // ignore: cast_nullable_to_non_nullable
as List<String>,mapLayerId: freezed == mapLayerId ? _self.mapLayerId : mapLayerId // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// Adds pattern-matching-related methods to [LocatorInput].
extension LocatorInputPatterns on LocatorInput {
/// A variant of `map` that fallback to returning `orElse`.
///
/// It is equivalent to doing:
/// ```dart
/// switch (sealedClass) {
/// case final Subclass value:
/// return ...;
/// case _:
/// return orElse();
/// }
/// ```
@optionalTypeArgs TResult maybeMap<TResult extends Object?>(TResult Function( _LocatorInput value)? $default,{required TResult orElse(),}){
final _that = this;
switch (_that) {
case _LocatorInput() when $default != null:
return $default(_that);case _:
return orElse();