-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSchema.cs
More file actions
2250 lines (1965 loc) · 74.5 KB
/
Schema.cs
File metadata and controls
2250 lines (1965 loc) · 74.5 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
using System;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Globalization;
namespace Schema.v14
{
/// <summary>
/// SpaceAPI v14
/// </summary>
public class SpaceApi
{
/// <summary>
/// The versions your SpaceAPI endpoint supports
/// </summary>
[JsonPropertyName("api_compatibility")]
public string[] ApiCompatibility => ["14"];
/// <summary>
/// URL(s) of webcams in your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("cam")]
public string[] Cam { get; set; }
/// <summary>
/// Contact information about your space
/// </summary>
[JsonPropertyName("contact")]
public Contact Contact { get; set; }
/// <summary>
/// Events which happened recently in your space and which could be interesting to the
/// public, like 'User X has entered/triggered/did something at timestamp Z'
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("events")]
public Event[] Events { get; set; }
/// <summary>
/// Feeds where users can get updates of your space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("feeds")]
public Feeds Feeds { get; set; }
/// <summary>
/// Arbitrary links that you'd like to share
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("links")]
public Link[] Links { get; set; }
/// <summary>
/// Position data such as a postal address or geographic coordinates
/// </summary>
[JsonPropertyName("location")]
public Location Location { get; set; }
/// <summary>
/// URL to your space logo
/// </summary>
[JsonPropertyName("logo")]
public string Logo { get; set; }
/// <summary>
/// A list of the different membership plans your hackerspace might have. Set the value
/// according to your billing process. For example, if your membership fee is 10€ per month,
/// but you bill it yearly (aka. the member pays the fee once per year), set the amount to
/// 120 an the billing_interval to yearly.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("membership_plans")]
public MembershipPlan[] MembershipPlans { get; set; }
/// <summary>
/// Your project sites (links to GitHub, wikis or wherever your projects are hosted)
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("projects")]
public string[] Projects { get; set; }
/// <summary>
/// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate
/// left, …). The only canonical property is the <em>temp</em> property, additional sensor
/// types may be defined by you. In this case, you are requested to share your definition for
/// inclusion in this specification.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("sensors")]
public Sensors Sensors { get; set; }
/// <summary>
/// The name of your space
/// </summary>
[JsonPropertyName("space")]
public string Space { get; set; }
/// <summary>
/// A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that
/// visiting hackers can use the space WiFi with their home space credentials.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("spacefed")]
public Spacefed Spacefed { get; set; }
/// <summary>
/// A collection of status-related data: actual open/closed status, icons, last change
/// timestamp etc.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("state")]
public State State { get; set; }
/// <summary>
/// URL to your space website
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
}
/// <summary>
/// Contact information about your space
/// </summary>
public partial class Contact
{
/// <summary>
/// E-mail address for contacting your space. If this is a mailing list consider to use the
/// contact/ml field.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("email")]
public string Email { get; set; }
/// <summary>
/// Facebook account URL
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("facebook")]
public string Facebook { get; set; }
/// <summary>
/// Foursquare ID, in the form <samp>4d8a9114d85f3704eab301dc</samp>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("foursquare")]
public string Foursquare { get; set; }
/// <summary>
/// A URL to find information about the Space in the Gopherspace
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("gopher")]
public string Gopher { get; set; }
/// <summary>
/// Identi.ca or StatusNet account, in the form <samp>yourspace@example.org</samp>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("identica")]
public string Identica { get; set; }
/// <summary>
/// URL of the IRC channel
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("irc")]
public string Irc { get; set; }
/// <summary>
/// A separate email address for issue reports. This value can be Base64-encoded.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("issue_mail")]
public string IssueMail { get; set; }
/// <summary>
/// Persons who carry a key and are able to open the space upon request. One of the fields
/// irc_nick, phone, email or twitter must be specified.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("keymasters")]
public Keymaster[] Keymasters { get; set; }
/// <summary>
/// Mastodon username
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("mastodon")]
public string Mastodon { get; set; }
/// <summary>
/// Matrix channel/community for the Hackerspace
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("matrix")]
public string Matrix { get; set; }
/// <summary>
/// The e-mail address of your mailing list. If you use Google Groups then the e-mail looks
/// like <samp>your-group@googlegroups.com</samp>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("ml")]
public string Ml { get; set; }
/// <summary>
/// URL to a Mumble server/channel, as specified in https://wiki.mumble.info/wiki/Mumble_URL
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("mumble")]
public string Mumble { get; set; }
/// <summary>
/// Phone number, including country code with a leading plus sign
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("phone")]
public string Phone { get; set; }
/// <summary>
/// URI for Voice-over-IP via SIP
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("sip")]
public string Sip { get; set; }
/// <summary>
/// Twitter username with leading <code>@</code>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("twitter")]
public string Twitter { get; set; }
/// <summary>
/// A public Jabber/XMPP multi-user chatroom in the form
/// <samp>chatroom@conference.example.net</samp>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("xmpp")]
public string Xmpp { get; set; }
}
public partial class Keymaster
{
/// <summary>
/// Email address which can be base64 encoded
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("email")]
public string Email { get; set; }
/// <summary>
/// Contact the person with this nickname directly in irc if available. The irc channel to be
/// used is defined in the contact/irc field.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("irc_nick")]
public string IrcNick { get; set; }
/// <summary>
/// Mastodon username
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("mastodon")]
public string Mastodon { get; set; }
/// <summary>
/// Matrix username (including domain)
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("matrix")]
public string Matrix { get; set; }
/// <summary>
/// Real name
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Phone number, including country code with a leading plus sign
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("phone")]
public string Phone { get; set; }
/// <summary>
/// Twitter username with leading <code>@</code>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("twitter")]
public string Twitter { get; set; }
/// <summary>
/// XMPP (Jabber) ID
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("xmpp")]
public string Xmpp { get; set; }
}
public partial class Event
{
/// <summary>
/// A custom text field to give more information about the event
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("extra")]
public string Extra { get; set; }
/// <summary>
/// Name or other identity of the subject (e.g. <samp>J. Random Hacker</samp>,
/// <samp>fridge</samp>, <samp>3D printer</samp>, …)
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// Unix timestamp when the event occurred
/// </summary>
[JsonPropertyName("timestamp")]
public double Timestamp { get; set; }
/// <summary>
/// Action (e.g. <samp>check-in</samp>, <samp>check-out</samp>, <samp>finish-print</samp>,
/// …). Define your own actions and use them consistently, canonical actions are not (yet)
/// specified
/// </summary>
[JsonPropertyName("type")]
public string Type { get; set; }
}
/// <summary>
/// Feeds where users can get updates of your space
/// </summary>
public partial class Feeds
{
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("blog")]
public Blog Blog { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("calendar")]
public Calendar Calendar { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("flickr")]
public Flickr Flickr { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("wiki")]
public Wiki Wiki { get; set; }
}
public partial class Blog
{
/// <summary>
/// Type of the feed
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("type")]
public string Type { get; set; }
/// <summary>
/// Feed URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
public partial class Calendar
{
/// <summary>
/// Type of the feed
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("type")]
public string Type { get; set; }
/// <summary>
/// Feed URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
public partial class Flickr
{
/// <summary>
/// Type of the feed
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("type")]
public string Type { get; set; }
/// <summary>
/// Feed URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
public partial class Wiki
{
/// <summary>
/// Type of the feed
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("type")]
public string Type { get; set; }
/// <summary>
/// Feed URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
public partial class Link
{
/// <summary>
/// An extra field for a more detailed description of the link
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The link name
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// The URL
/// </summary>
[JsonPropertyName("url")]
public string Url { get; set; }
}
/// <summary>
/// Position data such as a postal address or geographic coordinates
/// </summary>
public partial class Location
{
/// <summary>
/// The postal address of your space (street, block, housenumber, zip code, city, whatever
/// you usually need in your country, and the country itself).<br>Examples: <ul><li>Netzladen
/// e.V., Breite Straße 74, 53111 Bonn, Germany</li></ul>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("address")]
public string Address { get; set; }
/// <summary>
/// Latitude of your space location, in degree with decimal places. Use positive values for
/// locations north of the equator, negative values for locations south of equator.
/// </summary>
[JsonPropertyName("lat")]
public double Lat { get; set; }
/// <summary>
/// Longitude of your space location, in degree with decimal places. Use positive values for
/// locations east of Greenwich, and negative values for locations west of Greenwich.
/// </summary>
[JsonPropertyName("lon")]
public double Lon { get; set; }
/// <summary>
/// The timezone the space is located in. It should be formatted according to the <a
/// target="_blank" href="https://en.wikipedia.org/wiki/List_of_tz_database_time_zones">TZ
/// database location names</a>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("timezone")]
public string Timezone { get; set; }
}
public partial class MembershipPlan
{
/// <summary>
/// How often is the membership billed? If you select other, please specify in the
/// description what your billing interval is.
/// </summary>
[JsonPropertyName("billing_interval")]
public BillingInterval BillingInterval { get; set; }
/// <summary>
/// What's the currency? It should be formatted according to <a
/// href="https://en.wikipedia.org/wiki/ISO_4217" target="_blank">ISO 4217</a> short-code
/// format.
/// </summary>
[JsonPropertyName("currency")]
public string Currency { get; set; }
/// <summary>
/// A free form string
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The name of the membership plan
/// </summary>
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// How much does this plan cost?
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
/// <summary>
/// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate
/// left, …). The only canonical property is the <em>temp</em> property, additional sensor
/// types may be defined by you. In this case, you are requested to share your definition for
/// inclusion in this specification.
/// </summary>
public partial class Sensors
{
/// <summary>
/// How rich is your hackerspace?
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("account_balance")]
public AccountBalance[] AccountBalance { get; set; }
/// <summary>
/// Barometer sensor
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("barometer")]
public Barometer[] Barometer { get; set; }
/// <summary>
/// How much Mate and beer is in your fridge?
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("beverage_supply")]
public BeverageSupply[] BeverageSupply { get; set; }
/// <summary>
/// Sensor type to indicate if a certain door is locked
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("door_locked")]
public DoorLocked[] DoorLocked { get; set; }
/// <summary>
/// Humidity sensor
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("humidity")]
public Humidity[] Humidity { get; set; }
/// <summary>
/// This sensor type is to specify the currently active ethernet or wireless network devices.
/// You can create different instances for each network type.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("network_connections")]
public NetworkConnection[] NetworkConnections { get; set; }
/// <summary>
/// The current network traffic, in bits/second or packets/second (or both)
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("network_traffic")]
public NetworkTraffic[] NetworkTraffic { get; set; }
/// <summary>
/// Specify the number of people that are currently in your space. Optionally you can define
/// a list of names.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("people_now_present")]
public PeopleNowPresent[] PeopleNowPresent { get; set; }
/// <summary>
/// The power consumption of a specific device or of your whole space
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("power_consumption")]
public PowerConsumption[] PowerConsumption { get; set; }
/// <summary>
/// Compound radiation sensor. Check this <a rel="nofollow"
/// href="https://sites.google.com/site/diygeigercounter/technical/gm-tubes-supported"
/// target="_blank">resource</a>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("radiation")]
public Radiation Radiation { get; set; }
/// <summary>
/// Temperature sensor. To convert from one unit of temperature to another consider <a
/// href="http://en.wikipedia.org/wiki/Temperature_conversion_formulas"
/// target="_blank">Wikipedia</a>.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("temperature")]
public Temperature[] Temperature { get; set; }
/// <summary>
/// Specify the number of space members.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("total_member_count")]
public TotalMemberCount[] TotalMemberCount { get; set; }
/// <summary>
/// Your wind sensor
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("wind")]
public Wind[] Wind { get; set; }
}
public partial class AccountBalance
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// If you have more than one account you can use this field to specify where it is.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// Give your sensor instance a name.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// What's the currency? It should be formatted according to <a
/// href="https://en.wikipedia.org/wiki/ISO_4217" target="_blank">ISO 4217</a> short-code
/// format.
/// </summary>
[JsonPropertyName("unit")]
public string Unit { get; set; }
/// <summary>
/// How much?
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class Barometer
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// This field is an additional field to give your sensor a name. This can be useful if you
/// have multiple sensors in the same location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// The unit of pressure used by your sensor<br>Note: The <code>hPA</code> unit is deprecated
/// and should not be used anymore. Use the correct <code>hPa</code> unit instead.
/// </summary>
[JsonPropertyName("unit")]
public BarometerUnit Unit { get; set; }
/// <summary>
/// The sensor value
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class BeverageSupply
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// This field is an additional field to give your sensor a name. This can be useful if you
/// have multiple sensors in the same location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// The unit, either <samp>btl</samp> for bottles or <samp>crt</samp> for crates
/// </summary>
[JsonPropertyName("unit")]
public BeverageSupplyUnit Unit { get; set; }
/// <summary>
/// The sensor value
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class DoorLocked
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// This field is an additional field to give your sensor a name. This can be useful if you
/// have multiple sensors in the same location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// The sensor value
/// </summary>
[JsonPropertyName("value")]
public bool Value { get; set; }
}
public partial class Humidity
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// This field is an additional field to give your sensor a name. This can be useful if you
/// have multiple sensors in the same location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// The unit of the sensor value. You should always define the unit though if the sensor is a
/// flag of a boolean type then you can of course omit it.
/// </summary>
[JsonPropertyName("unit")]
public HumidityUnit Unit { get; set; }
/// <summary>
/// The sensor value
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class NetworkConnection
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// The machines that are currently connected with the network.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("machines")]
public Machine[] Machines { get; set; }
/// <summary>
/// This field is an additional field to give your sensor a name. This can be useful if you
/// have multiple sensors in the same location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// This field is optional but you can use it to the network type such as <samp>wifi</samp>
/// or <samp>cable</samp>. You can even expose the number of <a
/// href="https://spacefed.net/wiki/index.php/Spacenet"
/// target="_blank">spacenet</a>-authenticated connections.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("type")]
public TypeEnum? Type { get; set; }
/// <summary>
/// The amount of network connections.
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class Machine
{
/// <summary>
/// The machine's MAC address of the format <samp>D3:3A:DB:EE:FF:00</samp>.
/// </summary>
[JsonPropertyName("mac")]
public string Mac { get; set; }
/// <summary>
/// The machine name.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
}
public partial class NetworkTraffic
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// Location the measurement relates to, e.g. <samp>WiFi</samp> or <samp>Uplink</samp>
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// Name of the measurement, e.g. to distinguish between upstream and downstream traffic
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("properties")]
public NetworkTrafficProperties Properties { get; set; }
}
public partial class NetworkTrafficProperties
{
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("bits_per_second")]
public BitsPerSecond BitsPerSecond { get; set; }
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("packets_per_second")]
public PacketsPerSecond PacketsPerSecond { get; set; }
}
public partial class BitsPerSecond
{
/// <summary>
/// The maximum available throughput in bits/second, e.g. as sold by your ISP
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("maximum")]
[JsonConverter(typeof(MinMaxValueCheckConverter))]
public double? Maximum { get; set; }
/// <summary>
/// The measurement value, in bits/second
/// </summary>
[JsonPropertyName("value")]
[JsonConverter(typeof(MinMaxValueCheckConverter))]
public double Value { get; set; }
}
public partial class PacketsPerSecond
{
/// <summary>
/// The measurement value, in packets/second
/// </summary>
[JsonPropertyName("value")]
[JsonConverter(typeof(MinMaxValueCheckConverter))]
public double Value { get; set; }
}
public partial class PeopleNowPresent
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// If you use multiple sensor instances for different rooms, use this field to indicate the
/// location.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>
/// Give this sensor a name if necessary at all. Use the location field for the rooms. This
/// field is not intended to be used for names of hackerspace members. Use the field 'names'
/// instead.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("name")]
public string Name { get; set; }
/// <summary>
/// List of hackerspace members that are currently occupying the space.
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("names")]
public string[] Names { get; set; }
/// <summary>
/// The amount of present people.
/// </summary>
[JsonPropertyName("value")]
public double Value { get; set; }
}
public partial class PowerConsumption
{
/// <summary>
/// An extra field that you can use to attach some additional information to this sensor
/// instance
/// </summary>
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyName("description")]
public string Description { get; set; }
/// <summary>
/// The location of your sensor
/// </summary>
[JsonPropertyName("location")]
public string Location { get; set; }
/// <summary>