|
1 | | -// <auto-generated /> |
2 | | -// |
3 | | -// To parse this JSON data, add NuGet 'System.Text.Json' then do: |
4 | | -// |
5 | | -// using SpaceApi; |
6 | | -// |
7 | | -// var coordinate = Coordinate.FromJson(jsonString); |
| 1 | +using System; |
8 | 2 |
|
9 | | -using System; |
10 | | -using System.Collections.Generic; |
11 | 3 |
|
12 | 4 | using System.Text.Json; |
13 | 5 | using System.Text.Json.Serialization; |
14 | 6 | using System.Globalization; |
15 | 7 |
|
16 | | -/// <summary> |
17 | | -/// SpaceAPI v14 |
18 | | -/// </summary> |
19 | | -public partial class SpaceApi |
| 8 | +namespace Schema.v14 |
20 | 9 | { |
21 | 10 | /// <summary> |
22 | | - /// The versions your SpaceAPI endpoint supports |
23 | | - /// </summary> |
24 | | - [JsonPropertyName("api_compatibility")] |
25 | | - public string[] ApiCompatibility { get; set; } |
26 | | - |
27 | | - /// <summary> |
28 | | - /// URL(s) of webcams in your space |
29 | | - /// </summary> |
30 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
31 | | - [JsonPropertyName("cam")] |
32 | | - public string[] Cam { get; set; } |
33 | | - |
34 | | - /// <summary> |
35 | | - /// Contact information about your space |
36 | | - /// </summary> |
37 | | - [JsonPropertyName("contact")] |
38 | | - public Contact Contact { get; set; } |
39 | | - |
40 | | - /// <summary> |
41 | | - /// Events which happened recently in your space and which could be interesting to the |
42 | | - /// public, like 'User X has entered/triggered/did something at timestamp Z' |
43 | | - /// </summary> |
44 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
45 | | - [JsonPropertyName("events")] |
46 | | - public Event[] Events { get; set; } |
47 | | - |
48 | | - /// <summary> |
49 | | - /// Feeds where users can get updates of your space |
50 | | - /// </summary> |
51 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
52 | | - [JsonPropertyName("feeds")] |
53 | | - public Feeds Feeds { get; set; } |
54 | | - |
55 | | - /// <summary> |
56 | | - /// Arbitrary links that you'd like to share |
57 | | - /// </summary> |
58 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
59 | | - [JsonPropertyName("links")] |
60 | | - public Link[] Links { get; set; } |
61 | | - |
62 | | - /// <summary> |
63 | | - /// Position data such as a postal address or geographic coordinates |
64 | | - /// </summary> |
65 | | - [JsonPropertyName("location")] |
66 | | - public Location Location { get; set; } |
67 | | - |
68 | | - /// <summary> |
69 | | - /// URL to your space logo |
70 | | - /// </summary> |
71 | | - [JsonPropertyName("logo")] |
72 | | - public string Logo { get; set; } |
73 | | - |
74 | | - /// <summary> |
75 | | - /// A list of the different membership plans your hackerspace might have. Set the value |
76 | | - /// according to your billing process. For example, if your membership fee is 10€ per month, |
77 | | - /// but you bill it yearly (aka. the member pays the fee once per year), set the amount to |
78 | | - /// 120 an the billing_interval to yearly. |
79 | | - /// </summary> |
80 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
81 | | - [JsonPropertyName("membership_plans")] |
82 | | - public MembershipPlan[] MembershipPlans { get; set; } |
83 | | - |
84 | | - /// <summary> |
85 | | - /// Your project sites (links to GitHub, wikis or wherever your projects are hosted) |
| 11 | + /// SpaceAPI v14 |
86 | 12 | /// </summary> |
87 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
88 | | - [JsonPropertyName("projects")] |
89 | | - public string[] Projects { get; set; } |
90 | | - |
91 | | - /// <summary> |
92 | | - /// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate |
93 | | - /// left, …). The only canonical property is the <em>temp</em> property, additional sensor |
94 | | - /// types may be defined by you. In this case, you are requested to share your definition for |
95 | | - /// inclusion in this specification. |
96 | | - /// </summary> |
97 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
98 | | - [JsonPropertyName("sensors")] |
99 | | - public Sensors Sensors { get; set; } |
100 | | - |
101 | | - /// <summary> |
102 | | - /// The name of your space |
103 | | - /// </summary> |
104 | | - [JsonPropertyName("space")] |
105 | | - public string Space { get; set; } |
106 | | - |
107 | | - /// <summary> |
108 | | - /// A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that |
109 | | - /// visiting hackers can use the space WiFi with their home space credentials. |
110 | | - /// </summary> |
111 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
112 | | - [JsonPropertyName("spacefed")] |
113 | | - public Spacefed Spacefed { get; set; } |
114 | | - |
115 | | - /// <summary> |
116 | | - /// A collection of status-related data: actual open/closed status, icons, last change |
117 | | - /// timestamp etc. |
118 | | - /// </summary> |
119 | | - [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
120 | | - [JsonPropertyName("state")] |
121 | | - public State State { get; set; } |
122 | | - |
123 | | - /// <summary> |
124 | | - /// URL to your space website |
125 | | - /// </summary> |
126 | | - [JsonPropertyName("url")] |
127 | | - public string Url { get; set; } |
| 13 | + public class SpaceApi |
| 14 | + { |
| 15 | + /// <summary> |
| 16 | + /// The versions your SpaceAPI endpoint supports |
| 17 | + /// </summary> |
| 18 | + [JsonPropertyName("api_compatibility")] |
| 19 | + public string[] ApiCompatibility => ["14"]; |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// URL(s) of webcams in your space |
| 23 | + /// </summary> |
| 24 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 25 | + [JsonPropertyName("cam")] |
| 26 | + public string[] Cam { get; set; } |
| 27 | + |
| 28 | + /// <summary> |
| 29 | + /// Contact information about your space |
| 30 | + /// </summary> |
| 31 | + [JsonPropertyName("contact")] |
| 32 | + public Contact Contact { get; set; } |
| 33 | + |
| 34 | + /// <summary> |
| 35 | + /// Events which happened recently in your space and which could be interesting to the |
| 36 | + /// public, like 'User X has entered/triggered/did something at timestamp Z' |
| 37 | + /// </summary> |
| 38 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 39 | + [JsonPropertyName("events")] |
| 40 | + public Event[] Events { get; set; } |
| 41 | + |
| 42 | + /// <summary> |
| 43 | + /// Feeds where users can get updates of your space |
| 44 | + /// </summary> |
| 45 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 46 | + [JsonPropertyName("feeds")] |
| 47 | + public Feeds Feeds { get; set; } |
| 48 | + |
| 49 | + /// <summary> |
| 50 | + /// Arbitrary links that you'd like to share |
| 51 | + /// </summary> |
| 52 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 53 | + [JsonPropertyName("links")] |
| 54 | + public Link[] Links { get; set; } |
| 55 | + |
| 56 | + /// <summary> |
| 57 | + /// Position data such as a postal address or geographic coordinates |
| 58 | + /// </summary> |
| 59 | + [JsonPropertyName("location")] |
| 60 | + public Location Location { get; set; } |
| 61 | + |
| 62 | + /// <summary> |
| 63 | + /// URL to your space logo |
| 64 | + /// </summary> |
| 65 | + [JsonPropertyName("logo")] |
| 66 | + public string Logo { get; set; } |
| 67 | + |
| 68 | + /// <summary> |
| 69 | + /// A list of the different membership plans your hackerspace might have. Set the value |
| 70 | + /// according to your billing process. For example, if your membership fee is 10€ per month, |
| 71 | + /// but you bill it yearly (aka. the member pays the fee once per year), set the amount to |
| 72 | + /// 120 an the billing_interval to yearly. |
| 73 | + /// </summary> |
| 74 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 75 | + [JsonPropertyName("membership_plans")] |
| 76 | + public MembershipPlan[] MembershipPlans { get; set; } |
| 77 | + |
| 78 | + /// <summary> |
| 79 | + /// Your project sites (links to GitHub, wikis or wherever your projects are hosted) |
| 80 | + /// </summary> |
| 81 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 82 | + [JsonPropertyName("projects")] |
| 83 | + public string[] Projects { get; set; } |
| 84 | + |
| 85 | + /// <summary> |
| 86 | + /// Data of various sensors in your space (e.g. temperature, humidity, amount of Club-Mate |
| 87 | + /// left, …). The only canonical property is the <em>temp</em> property, additional sensor |
| 88 | + /// types may be defined by you. In this case, you are requested to share your definition for |
| 89 | + /// inclusion in this specification. |
| 90 | + /// </summary> |
| 91 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 92 | + [JsonPropertyName("sensors")] |
| 93 | + public Sensors Sensors { get; set; } |
| 94 | + |
| 95 | + /// <summary> |
| 96 | + /// The name of your space |
| 97 | + /// </summary> |
| 98 | + [JsonPropertyName("space")] |
| 99 | + public string Space { get; set; } |
| 100 | + |
| 101 | + /// <summary> |
| 102 | + /// A flag indicating if the hackerspace uses SpaceFED, a federated login scheme so that |
| 103 | + /// visiting hackers can use the space WiFi with their home space credentials. |
| 104 | + /// </summary> |
| 105 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 106 | + [JsonPropertyName("spacefed")] |
| 107 | + public Spacefed Spacefed { get; set; } |
| 108 | + |
| 109 | + /// <summary> |
| 110 | + /// A collection of status-related data: actual open/closed status, icons, last change |
| 111 | + /// timestamp etc. |
| 112 | + /// </summary> |
| 113 | + [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)] |
| 114 | + [JsonPropertyName("state")] |
| 115 | + public State State { get; set; } |
| 116 | + |
| 117 | + /// <summary> |
| 118 | + /// URL to your space website |
| 119 | + /// </summary> |
| 120 | + [JsonPropertyName("url")] |
| 121 | + public string Url { get; set; } |
| 122 | + } |
128 | 123 | } |
129 | 124 |
|
130 | 125 | /// <summary> |
|
0 commit comments