Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
46test cases
220files differ
87modified
133new
0deleted
29,751changed lines
+29,093 −658insertions / deletions
Base 66df8a7480383ad7d4784464b395df83fd482c7f · PR merge 6b964cd481c0080f47d577c698dc275a9f106d08 · Head 18ebf2d8fcde951496ab73ca9c48ca92369f5cce · raw patch
Test case

test/inputs/json/misc/0a91a.json

1 generated file · +28 −4
Melixirdefault / QuickType.ex+28 −4
@@ -1591,6 +1591,12 @@ defmodule Payload do
15911591 def encode_before(value) when is_binary(value), do: value
15921592 def encode_before(_), do: {:error, "Unexpected type when encoding Payload.before"}
15931593
1594+ def decode_distinct_size(value) when is_integer(value), do: value
1595+ def decode_distinct_size(_), do: {:error, "Unexpected type when decoding Payload.distinct_size"}
1596+
1597+ def encode_distinct_size(value) when is_integer(value), do: value
1598+ def encode_distinct_size(_), do: {:error, "Unexpected type when encoding Payload.distinct_size"}
1599+
15941600 def decode_head(value) when is_binary(value), do: value
15951601 def decode_head(_), do: {:error, "Unexpected type when decoding Payload.head"}
15961602
@@ -1603,6 +1609,18 @@ defmodule Payload do
16031609 def encode_master_branch(value) when is_binary(value), do: value
16041610 def encode_master_branch(_), do: {:error, "Unexpected type when encoding Payload.master_branch"}
16051611
1612+ def decode_number(value) when is_integer(value), do: value
1613+ def decode_number(_), do: {:error, "Unexpected type when decoding Payload.number"}
1614+
1615+ def encode_number(value) when is_integer(value), do: value
1616+ def encode_number(_), do: {:error, "Unexpected type when encoding Payload.number"}
1617+
1618+ def decode_push_id(value) when is_integer(value), do: value
1619+ def decode_push_id(_), do: {:error, "Unexpected type when decoding Payload.push_id"}
1620+
1621+ def encode_push_id(value) when is_integer(value), do: value
1622+ def encode_push_id(_), do: {:error, "Unexpected type when encoding Payload.push_id"}
1623+
16061624 def decode_pusher_type(value) when is_binary(value), do: value
16071625 def decode_pusher_type(_), do: {:error, "Unexpected type when decoding Payload.pusher_type"}
16081626
@@ -1621,22 +1639,28 @@ defmodule Payload do
16211639 def encode_ref_type(value) when is_binary(value), do: value
16221640 def encode_ref_type(_), do: {:error, "Unexpected type when encoding Payload.ref_type"}
16231641
1642+ def decode_size(value) when is_integer(value), do: value
1643+ def decode_size(_), do: {:error, "Unexpected type when decoding Payload.size"}
1644+
1645+ def encode_size(value) when is_integer(value), do: value
1646+ def encode_size(_), do: {:error, "Unexpected type when encoding Payload.size"}
1647+
16241648 def from_map(m) do
16251649 %Payload{
16261650 action: m["action"] && decode_action(m["action"]),
16271651 before: m["before"] && decode_before(m["before"]),
16281652 commits: m["commits"] && Enum.map(m["commits"], &Commit.from_map/1),
16291653 description: m["description"],
1630- distinct_size: m["distinct_size"],
1654+ distinct_size: m["distinct_size"] && decode_distinct_size(m["distinct_size"]),
16311655 head: m["head"] && decode_head(m["head"]),
16321656 master_branch: m["master_branch"] && decode_master_branch(m["master_branch"]),
1633- number: m["number"],
1657+ number: m["number"] && decode_number(m["number"]),
16341658 pull_request: m["pull_request"] && PullRequest.from_map(m["pull_request"]),
1635- push_id: m["push_id"],
1659+ push_id: m["push_id"] && decode_push_id(m["push_id"]),
16361660 pusher_type: m["pusher_type"] && decode_pusher_type(m["pusher_type"]),
16371661 ref: m["ref"] && decode_ref(m["ref"]),
16381662 ref_type: m["ref_type"] && decode_ref_type(m["ref_type"]),
1639- size: m["size"],
1663+ size: m["size"] && decode_size(m["size"]),
16401664 }
16411665 end
Test case

test/inputs/json/misc/0b91a.json

1 generated file · +3 −3
Mdartdefault / TopLevel.dart+3 −3
@@ -142,8 +142,8 @@ class Result {
142142 title: json["title"],
143143 topic: List<dynamic>.from(json["topic"].map((x) => x)),
144144 url: json["url"],
145- uuid: json["uuid"],
146- vuuid: json["vuuid"],
145+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
146+ vuuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["vuuid"]),
147147 );
148148
149149 Map<String, dynamic> toJson() => {
@@ -175,7 +175,7 @@ class Component {
175175
176176 factory Component.fromJson(Map<String, dynamic> json) => Component(
177177 name: json["name"],
178- uuid: json["uuid"],
178+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
179179 );
180180
181181 Map<String, dynamic> toJson() => {
Test case

test/inputs/json/misc/26c9c.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -265,6 +265,18 @@ defmodule Column do
265265 def encode_render_type_name(value) when is_binary(value), do: value
266266 def encode_render_type_name(_), do: {:error, "Unexpected type when encoding Column.render_type_name"}
267267
268+ def decode_table_column_id(value) when is_integer(value), do: value
269+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
270+
271+ def encode_table_column_id(value) when is_integer(value), do: value
272+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
273+
274+ def decode_width(value) when is_integer(value), do: value
275+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
276+
277+ def encode_width(value) when is_integer(value), do: value
278+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
279+
268280 def from_map(m) do
269281 %Column{
270282 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -276,8 +288,8 @@ defmodule Column do
276288 name: decode_name(m["name"]),
277289 position: decode_position(m["position"]),
278290 render_type_name: decode_render_type_name(m["renderTypeName"]),
279- table_column_id: m["tableColumnId"],
280- width: m["width"],
291+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
292+ width: m["width"] && decode_width(m["width"]),
281293 }
282294 end
Test case

test/inputs/json/misc/27332.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -243,12 +243,24 @@ defmodule MediaEmbed do
243243 def encode_content(value) when is_binary(value), do: value
244244 def encode_content(_), do: {:error, "Unexpected type when encoding MediaEmbed.content"}
245245
246+ def decode_height(value) when is_integer(value), do: value
247+ def decode_height(_), do: {:error, "Unexpected type when decoding MediaEmbed.height"}
248+
249+ def encode_height(value) when is_integer(value), do: value
250+ def encode_height(_), do: {:error, "Unexpected type when encoding MediaEmbed.height"}
251+
252+ def decode_width(value) when is_integer(value), do: value
253+ def decode_width(_), do: {:error, "Unexpected type when decoding MediaEmbed.width"}
254+
255+ def encode_width(value) when is_integer(value), do: value
256+ def encode_width(_), do: {:error, "Unexpected type when encoding MediaEmbed.width"}
257+
246258 def from_map(m) do
247259 %MediaEmbed{
248260 content: m["content"] && decode_content(m["content"]),
249- height: m["height"],
261+ height: m["height"] && decode_height(m["height"]),
250262 scrolling: m["scrolling"],
251- width: m["width"],
263+ width: m["width"] && decode_width(m["width"]),
252264 }
253265 end
Test case

test/inputs/json/misc/31189.json

1 generated file · +45 −5
Melixirdefault / QuickType.ex+45 −5
@@ -18,6 +18,38 @@ defmodule Rates do
1818 super_reduced: float() | nil
1919 }
2020
21+ def decode_parking(value) when is_float(value), do: value
22+ def decode_parking(value) when is_integer(value), do: value
23+ def decode_parking(_), do: {:error, "Unexpected type when decoding Rates.parking"}
24+
25+ def encode_parking(value) when is_float(value), do: value
26+ def encode_parking(value) when is_integer(value), do: value
27+ def encode_parking(_), do: {:error, "Unexpected type when encoding Rates.parking"}
28+
29+ def decode_reduced(value) when is_float(value), do: value
30+ def decode_reduced(value) when is_integer(value), do: value
31+ def decode_reduced(_), do: {:error, "Unexpected type when decoding Rates.reduced"}
32+
33+ def encode_reduced(value) when is_float(value), do: value
34+ def encode_reduced(value) when is_integer(value), do: value
35+ def encode_reduced(_), do: {:error, "Unexpected type when encoding Rates.reduced"}
36+
37+ def decode_reduced1(value) when is_float(value), do: value
38+ def decode_reduced1(value) when is_integer(value), do: value
39+ def decode_reduced1(_), do: {:error, "Unexpected type when decoding Rates.reduced1"}
40+
41+ def encode_reduced1(value) when is_float(value), do: value
42+ def encode_reduced1(value) when is_integer(value), do: value
43+ def encode_reduced1(_), do: {:error, "Unexpected type when encoding Rates.reduced1"}
44+
45+ def decode_reduced2(value) when is_float(value), do: value
46+ def decode_reduced2(value) when is_integer(value), do: value
47+ def decode_reduced2(_), do: {:error, "Unexpected type when decoding Rates.reduced2"}
48+
49+ def encode_reduced2(value) when is_float(value), do: value
50+ def encode_reduced2(value) when is_integer(value), do: value
51+ def encode_reduced2(_), do: {:error, "Unexpected type when encoding Rates.reduced2"}
52+
2153 def decode_standard(value) when is_float(value), do: value
2254 def decode_standard(value) when is_integer(value), do: value
2355 def decode_standard(_), do: {:error, "Unexpected type when decoding Rates.standard"}
@@ -26,14 +58,22 @@ defmodule Rates do
2658 def encode_standard(value) when is_integer(value), do: value
2759 def encode_standard(_), do: {:error, "Unexpected type when encoding Rates.standard"}
2860
61+ def decode_super_reduced(value) when is_float(value), do: value
62+ def decode_super_reduced(value) when is_integer(value), do: value
63+ def decode_super_reduced(_), do: {:error, "Unexpected type when decoding Rates.super_reduced"}
64+
65+ def encode_super_reduced(value) when is_float(value), do: value
66+ def encode_super_reduced(value) when is_integer(value), do: value
67+ def encode_super_reduced(_), do: {:error, "Unexpected type when encoding Rates.super_reduced"}
68+
2969 def from_map(m) do
3070 %Rates{
31- parking: m["parking"],
32- reduced: m["reduced"],
33- reduced1: m["reduced1"],
34- reduced2: m["reduced2"],
71+ parking: m["parking"] && decode_parking(m["parking"]),
72+ reduced: m["reduced"] && decode_reduced(m["reduced"]),
73+ reduced1: m["reduced1"] && decode_reduced1(m["reduced1"]),
74+ reduced2: m["reduced2"] && decode_reduced2(m["reduced2"]),
3575 standard: decode_standard(m["standard"]),
36- super_reduced: m["super_reduced"],
76+ super_reduced: m["super_reduced"] && decode_super_reduced(m["super_reduced"]),
3777 }
3878 end
Test case

test/inputs/json/misc/421d4.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -223,6 +223,18 @@ defmodule Column do
223223 def encode_render_type_name(value) when is_binary(value), do: value
224224 def encode_render_type_name(_), do: {:error, "Unexpected type when encoding Column.render_type_name"}
225225
226+ def decode_table_column_id(value) when is_integer(value), do: value
227+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
228+
229+ def encode_table_column_id(value) when is_integer(value), do: value
230+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
231+
232+ def decode_width(value) when is_integer(value), do: value
233+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
234+
235+ def encode_width(value) when is_integer(value), do: value
236+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
237+
226238 def from_map(m) do
227239 %Column{
228240 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -234,8 +246,8 @@ defmodule Column do
234246 name: decode_name(m["name"]),
235247 position: decode_position(m["position"]),
236248 render_type_name: decode_render_type_name(m["renderTypeName"]),
237- table_column_id: m["tableColumnId"],
238- width: m["width"],
249+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
250+ width: m["width"] && decode_width(m["width"]),
239251 }
240252 end
Test case

test/inputs/json/misc/458db.json

1 generated file · +3 −3
Mdartdefault / TopLevel.dart+3 −3
@@ -139,8 +139,8 @@ class Result {
139139 title: json["title"],
140140 topic: List<dynamic>.from(json["topic"].map((x) => x)),
141141 url: json["url"],
142- uuid: json["uuid"],
143- vuuid: json["vuuid"],
142+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
143+ vuuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["vuuid"]),
144144 );
145145
146146 Map<String, dynamic> toJson() => {
@@ -171,7 +171,7 @@ class Component {
171171
172172 factory Component.fromJson(Map<String, dynamic> json) => Component(
173173 name: nameValues.map[json["name"]]!,
174- uuid: json["uuid"],
174+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
175175 );
176176
177177 Map<String, dynamic> toJson() => {
Test case

test/inputs/json/misc/4d6fb.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -210,12 +210,24 @@ defmodule MediaEmbed do
210210 def encode_content(value) when is_binary(value), do: value
211211 def encode_content(_), do: {:error, "Unexpected type when encoding MediaEmbed.content"}
212212
213+ def decode_height(value) when is_integer(value), do: value
214+ def decode_height(_), do: {:error, "Unexpected type when decoding MediaEmbed.height"}
215+
216+ def encode_height(value) when is_integer(value), do: value
217+ def encode_height(_), do: {:error, "Unexpected type when encoding MediaEmbed.height"}
218+
219+ def decode_width(value) when is_integer(value), do: value
220+ def decode_width(_), do: {:error, "Unexpected type when decoding MediaEmbed.width"}
221+
222+ def encode_width(value) when is_integer(value), do: value
223+ def encode_width(_), do: {:error, "Unexpected type when encoding MediaEmbed.width"}
224+
213225 def from_map(m) do
214226 %MediaEmbed{
215227 content: m["content"] && decode_content(m["content"]),
216- height: m["height"],
228+ height: m["height"] && decode_height(m["height"]),
217229 scrolling: m["scrolling"],
218- width: m["width"],
230+ width: m["width"] && decode_width(m["width"]),
219231 }
220232 end
Test case

test/inputs/json/misc/5f7fe.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -264,6 +264,18 @@ defmodule Column do
264264 def encode_position(value) when is_integer(value), do: value
265265 def encode_position(_), do: {:error, "Unexpected type when encoding Column.position"}
266266
267+ def decode_table_column_id(value) when is_integer(value), do: value
268+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
269+
270+ def encode_table_column_id(value) when is_integer(value), do: value
271+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
272+
273+ def decode_width(value) when is_integer(value), do: value
274+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
275+
276+ def encode_width(value) when is_integer(value), do: value
277+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
278+
267279 def from_map(m) do
268280 %Column{
269281 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -275,8 +287,8 @@ defmodule Column do
275287 name: decode_name(m["name"]),
276288 position: decode_position(m["position"]),
277289 render_type_name: TypeName.decode(m["renderTypeName"]),
278- table_column_id: m["tableColumnId"],
279- width: m["width"],
290+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
291+ width: m["width"] && decode_width(m["width"]),
280292 }
281293 end
Test case

test/inputs/json/misc/617e8.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -271,6 +271,18 @@ defmodule Column do
271271 def encode_position(value) when is_integer(value), do: value
272272 def encode_position(_), do: {:error, "Unexpected type when encoding Column.position"}
273273
274+ def decode_table_column_id(value) when is_integer(value), do: value
275+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
276+
277+ def encode_table_column_id(value) when is_integer(value), do: value
278+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
279+
280+ def decode_width(value) when is_integer(value), do: value
281+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
282+
283+ def encode_width(value) when is_integer(value), do: value
284+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
285+
274286 def from_map(m) do
275287 %Column{
276288 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -283,8 +295,8 @@ defmodule Column do
283295 name: decode_name(m["name"]),
284296 position: decode_position(m["position"]),
285297 render_type_name: TypeName.decode(m["renderTypeName"]),
286- table_column_id: m["tableColumnId"],
287- width: m["width"],
298+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
299+ width: m["width"] && decode_width(m["width"]),
288300 }
289301 end
Test case

test/inputs/json/misc/6c155.json

1 generated file · +3 −3
Mdartdefault / TopLevel.dart+3 −3
@@ -142,8 +142,8 @@ class Result {
142142 title: json["title"],
143143 topic: List<dynamic>.from(json["topic"].map((x) => x)),
144144 url: json["url"],
145- uuid: json["uuid"],
146- vuuid: json["vuuid"],
145+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
146+ vuuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["vuuid"]),
147147 );
148148
149149 Map<String, dynamic> toJson() => {
@@ -175,7 +175,7 @@ class Component {
175175
176176 factory Component.fromJson(Map<String, dynamic> json) => Component(
177177 name: json["name"],
178- uuid: json["uuid"],
178+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
179179 );
180180
181181 Map<String, dynamic> toJson() => {
Test case

test/inputs/json/misc/6de06.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -201,12 +201,24 @@ defmodule MediaEmbed do
201201 def encode_content(value) when is_binary(value), do: value
202202 def encode_content(_), do: {:error, "Unexpected type when encoding MediaEmbed.content"}
203203
204+ def decode_height(value) when is_integer(value), do: value
205+ def decode_height(_), do: {:error, "Unexpected type when decoding MediaEmbed.height"}
206+
207+ def encode_height(value) when is_integer(value), do: value
208+ def encode_height(_), do: {:error, "Unexpected type when encoding MediaEmbed.height"}
209+
210+ def decode_width(value) when is_integer(value), do: value
211+ def decode_width(_), do: {:error, "Unexpected type when decoding MediaEmbed.width"}
212+
213+ def encode_width(value) when is_integer(value), do: value
214+ def encode_width(_), do: {:error, "Unexpected type when encoding MediaEmbed.width"}
215+
204216 def from_map(m) do
205217 %MediaEmbed{
206218 content: m["content"] && decode_content(m["content"]),
207- height: m["height"],
219+ height: m["height"] && decode_height(m["height"]),
208220 scrolling: m["scrolling"],
209- width: m["width"],
221+ width: m["width"] && decode_width(m["width"]),
210222 }
211223 end
Test case

test/inputs/json/misc/a3d8c.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -264,6 +264,18 @@ defmodule Column do
264264 def encode_position(value) when is_integer(value), do: value
265265 def encode_position(_), do: {:error, "Unexpected type when encoding Column.position"}
266266
267+ def decode_table_column_id(value) when is_integer(value), do: value
268+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
269+
270+ def encode_table_column_id(value) when is_integer(value), do: value
271+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
272+
273+ def decode_width(value) when is_integer(value), do: value
274+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
275+
276+ def encode_width(value) when is_integer(value), do: value
277+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
278+
267279 def from_map(m) do
268280 %Column{
269281 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -275,8 +287,8 @@ defmodule Column do
275287 name: decode_name(m["name"]),
276288 position: decode_position(m["position"]),
277289 render_type_name: TypeName.decode(m["renderTypeName"]),
278- table_column_id: m["tableColumnId"],
279- width: m["width"],
290+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
291+ width: m["width"] && decode_width(m["width"]),
280292 }
281293 end
Test case

test/inputs/json/misc/be234.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -244,12 +244,24 @@ defmodule MediaEmbed do
244244 def encode_content(value) when is_binary(value), do: value
245245 def encode_content(_), do: {:error, "Unexpected type when encoding MediaEmbed.content"}
246246
247+ def decode_height(value) when is_integer(value), do: value
248+ def decode_height(_), do: {:error, "Unexpected type when decoding MediaEmbed.height"}
249+
250+ def encode_height(value) when is_integer(value), do: value
251+ def encode_height(_), do: {:error, "Unexpected type when encoding MediaEmbed.height"}
252+
253+ def decode_width(value) when is_integer(value), do: value
254+ def decode_width(_), do: {:error, "Unexpected type when decoding MediaEmbed.width"}
255+
256+ def encode_width(value) when is_integer(value), do: value
257+ def encode_width(_), do: {:error, "Unexpected type when encoding MediaEmbed.width"}
258+
247259 def from_map(m) do
248260 %MediaEmbed{
249261 content: m["content"] && decode_content(m["content"]),
250- height: m["height"],
262+ height: m["height"] && decode_height(m["height"]),
251263 scrolling: m["scrolling"],
252- width: m["width"],
264+ width: m["width"] && decode_width(m["width"]),
253265 }
254266 end
Test case

test/inputs/json/misc/dec3a.json

1 generated file · +3 −3
Mdartdefault / TopLevel.dart+3 −3
@@ -166,8 +166,8 @@ class Result {
166166 title: json["title"],
167167 travel: json["travel"],
168168 url: json["url"],
169- uuid: json["uuid"],
170- vuuid: json["vuuid"],
169+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
170+ vuuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["vuuid"]),
171171 );
172172
173173 Map<String, dynamic> toJson() => {
@@ -207,7 +207,7 @@ class HiringOrg {
207207
208208 factory HiringOrg.fromJson(Map<String, dynamic> json) => HiringOrg(
209209 name: json["name"],
210- uuid: json["uuid"],
210+ uuid: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuid"]),
211211 );
212212
213213 Map<String, dynamic> toJson() => {
Test case

test/inputs/json/misc/e8b04.json

1 generated file · +49 −7
Melixirdefault / QuickType.ex+49 −7
@@ -634,14 +634,26 @@ defmodule ChildMetadata do
634634 unified_version: integer() | nil
635635 }
636636
637+ def decode_include_auto(value) when is_integer(value), do: value
638+ def decode_include_auto(_), do: {:error, "Unexpected type when decoding ChildMetadata.include_auto"}
639+
640+ def encode_include_auto(value) when is_integer(value), do: value
641+ def encode_include_auto(_), do: {:error, "Unexpected type when encoding ChildMetadata.include_auto"}
642+
643+ def decode_unified_version(value) when is_integer(value), do: value
644+ def decode_unified_version(_), do: {:error, "Unexpected type when decoding ChildMetadata.unified_version"}
645+
646+ def encode_unified_version(value) when is_integer(value), do: value
647+ def encode_unified_version(_), do: {:error, "Unexpected type when encoding ChildMetadata.unified_version"}
648+
637649 def from_map(m) do
638650 %ChildMetadata{
639651 custom_values: m["customValues"],
640652 freeform: m["freeform"],
641- include_auto: m["includeAuto"],
653+ include_auto: m["includeAuto"] && decode_include_auto(m["includeAuto"]),
642654 operator: m["operator"] && MetadataOperator.decode(m["operator"]),
643655 table_column_id: m["tableColumnId"] && TableColumnID.from_map(m["tableColumnId"]),
644- unified_version: m["unifiedVersion"],
656+ unified_version: m["unifiedVersion"] && decode_unified_version(m["unifiedVersion"]),
645657 }
646658 end
647659
@@ -1650,6 +1662,12 @@ defmodule Owner do
16501662 def encode_id(value) when is_binary(value), do: value
16511663 def encode_id(_), do: {:error, "Unexpected type when encoding Owner.id"}
16521664
1665+ def decode_last_notification_seen_at(value) when is_integer(value), do: value
1666+ def decode_last_notification_seen_at(_), do: {:error, "Unexpected type when decoding Owner.last_notification_seen_at"}
1667+
1668+ def encode_last_notification_seen_at(value) when is_integer(value), do: value
1669+ def encode_last_notification_seen_at(_), do: {:error, "Unexpected type when encoding Owner.last_notification_seen_at"}
1670+
16531671 def decode_profile_image_url_large(value) when is_binary(value), do: value
16541672 def decode_profile_image_url_large(_), do: {:error, "Unexpected type when decoding Owner.profile_image_url_large"}
16551673
@@ -1679,7 +1697,7 @@ defmodule Owner do
16791697 display_name: decode_display_name(m["displayName"]),
16801698 flags: m["flags"],
16811699 id: decode_id(m["id"]),
1682- last_notification_seen_at: m["lastNotificationSeenAt"],
1700+ last_notification_seen_at: m["lastNotificationSeenAt"] && decode_last_notification_seen_at(m["lastNotificationSeenAt"]),
16831701 profile_image_url_large: m["profileImageUrlLarge"] && decode_profile_image_url_large(m["profileImageUrlLarge"]),
16841702 profile_image_url_medium: m["profileImageUrlMedium"] && decode_profile_image_url_medium(m["profileImageUrlMedium"]),
16851703 profile_image_url_small: m["profileImageUrlSmall"] && decode_profile_image_url_small(m["profileImageUrlSmall"]),
@@ -2148,6 +2166,12 @@ defmodule TopLevelElement do
21482166 def encode_id(value) when is_binary(value), do: value
21492167 def encode_id(_), do: {:error, "Unexpected type when encoding TopLevelElement.id"}
21502168
2169+ def decode_index_updated_at(value) when is_integer(value), do: value
2170+ def decode_index_updated_at(_), do: {:error, "Unexpected type when decoding TopLevelElement.index_updated_at"}
2171+
2172+ def encode_index_updated_at(value) when is_integer(value), do: value
2173+ def encode_index_updated_at(_), do: {:error, "Unexpected type when encoding TopLevelElement.index_updated_at"}
2174+
21512175 def decode_locale(value) when is_binary(value), do: value
21522176 def decode_locale(_), do: {:error, "Unexpected type when decoding TopLevelElement.locale"}
21532177
@@ -2184,6 +2208,12 @@ defmodule TopLevelElement do
21842208 def encode_publication_append_enabled(value) when is_boolean(value), do: value
21852209 def encode_publication_append_enabled(_), do: {:error, "Unexpected type when encoding TopLevelElement.publication_append_enabled"}
21862210
2211+ def decode_publication_date(value) when is_integer(value), do: value
2212+ def decode_publication_date(_), do: {:error, "Unexpected type when decoding TopLevelElement.publication_date"}
2213+
2214+ def encode_publication_date(value) when is_integer(value), do: value
2215+ def encode_publication_date(_), do: {:error, "Unexpected type when encoding TopLevelElement.publication_date"}
2216+
21872217 def decode_publication_group(value) when is_integer(value), do: value
21882218 def decode_publication_group(_), do: {:error, "Unexpected type when decoding TopLevelElement.publication_group"}
21892219
@@ -2208,6 +2238,18 @@ defmodule TopLevelElement do
22082238 def encode_row_class(value) when is_binary(value), do: value
22092239 def encode_row_class(_), do: {:error, "Unexpected type when encoding TopLevelElement.row_class"}
22102240
2241+ def decode_row_identifier_column_id(value) when is_integer(value), do: value
2242+ def decode_row_identifier_column_id(_), do: {:error, "Unexpected type when decoding TopLevelElement.row_identifier_column_id"}
2243+
2244+ def encode_row_identifier_column_id(value) when is_integer(value), do: value
2245+ def encode_row_identifier_column_id(_), do: {:error, "Unexpected type when encoding TopLevelElement.row_identifier_column_id"}
2246+
2247+ def decode_rows_updated_at(value) when is_integer(value), do: value
2248+ def decode_rows_updated_at(_), do: {:error, "Unexpected type when decoding TopLevelElement.rows_updated_at"}
2249+
2250+ def encode_rows_updated_at(value) when is_integer(value), do: value
2251+ def encode_rows_updated_at(_), do: {:error, "Unexpected type when encoding TopLevelElement.rows_updated_at"}
2252+
22112253 def decode_table_id(value) when is_integer(value), do: value
22122254 def decode_table_id(_), do: {:error, "Unexpected type when decoding TopLevelElement.table_id"}
22132255
@@ -2245,7 +2287,7 @@ defmodule TopLevelElement do
22452287 hide_from_catalog: decode_hide_from_catalog(m["hideFromCatalog"]),
22462288 hide_from_data_json: decode_hide_from_data_json(m["hideFromDataJson"]),
22472289 id: decode_id(m["id"]),
2248- index_updated_at: m["indexUpdatedAt"],
2290+ index_updated_at: m["indexUpdatedAt"] && decode_index_updated_at(m["indexUpdatedAt"]),
22492291 locale: decode_locale(m["locale"]),
22502292 metadata: TopLevelMetadata.from_map(m["metadata"]),
22512293 moderation_status: m["moderationStatus"],
@@ -2257,15 +2299,15 @@ defmodule TopLevelElement do
22572299 owner: Owner.from_map(m["owner"]),
22582300 provenance: Provenance.decode(m["provenance"]),
22592301 publication_append_enabled: decode_publication_append_enabled(m["publicationAppendEnabled"]),
2260- publication_date: m["publicationDate"],
2302+ publication_date: m["publicationDate"] && decode_publication_date(m["publicationDate"]),
22612303 publication_group: decode_publication_group(m["publicationGroup"]),
22622304 publication_stage: PublicationStage.decode(m["publicationStage"]),
22632305 ratings: m["ratings"] && Ratings.from_map(m["ratings"]),
22642306 resource_name: m["resourceName"] && decode_resource_name(m["resourceName"]),
22652307 rights: Enum.map(m["rights"], &Right.decode/1),
22662308 row_class: m["rowClass"] && decode_row_class(m["rowClass"]),
2267- row_identifier_column_id: m["rowIdentifierColumnId"],
2268- rows_updated_at: m["rowsUpdatedAt"],
2309+ row_identifier_column_id: m["rowIdentifierColumnId"] && decode_row_identifier_column_id(m["rowIdentifierColumnId"]),
2310+ rows_updated_at: m["rowsUpdatedAt"] && decode_rows_updated_at(m["rowsUpdatedAt"]),
22692311 rows_updated_by: m["rowsUpdatedBy"] && RowsUpdatedBy.decode(m["rowsUpdatedBy"]),
22702312 table_author: TableAuthor.from_map(m["tableAuthor"]),
22712313 table_id: decode_table_id(m["tableId"]),
Test case

test/inputs/json/misc/f74d5.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -264,6 +264,18 @@ defmodule Column do
264264 def encode_position(value) when is_integer(value), do: value
265265 def encode_position(_), do: {:error, "Unexpected type when encoding Column.position"}
266266
267+ def decode_table_column_id(value) when is_integer(value), do: value
268+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
269+
270+ def encode_table_column_id(value) when is_integer(value), do: value
271+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
272+
273+ def decode_width(value) when is_integer(value), do: value
274+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
275+
276+ def encode_width(value) when is_integer(value), do: value
277+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
278+
267279 def from_map(m) do
268280 %Column{
269281 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -275,8 +287,8 @@ defmodule Column do
275287 name: decode_name(m["name"]),
276288 position: decode_position(m["position"]),
277289 render_type_name: TypeName.decode(m["renderTypeName"]),
278- table_column_id: m["tableColumnId"],
279- width: m["width"],
290+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
291+ width: m["width"] && decode_width(m["width"]),
280292 }
281293 end
Test case

test/inputs/json/misc/fcca3.json

1 generated file · +14 −2
Melixirdefault / QuickType.ex+14 −2
@@ -298,6 +298,18 @@ defmodule Column do
298298 def encode_position(value) when is_integer(value), do: value
299299 def encode_position(_), do: {:error, "Unexpected type when encoding Column.position"}
300300
301+ def decode_table_column_id(value) when is_integer(value), do: value
302+ def decode_table_column_id(_), do: {:error, "Unexpected type when decoding Column.table_column_id"}
303+
304+ def encode_table_column_id(value) when is_integer(value), do: value
305+ def encode_table_column_id(_), do: {:error, "Unexpected type when encoding Column.table_column_id"}
306+
307+ def decode_width(value) when is_integer(value), do: value
308+ def decode_width(_), do: {:error, "Unexpected type when decoding Column.width"}
309+
310+ def encode_width(value) when is_integer(value), do: value
311+ def encode_width(_), do: {:error, "Unexpected type when encoding Column.width"}
312+
301313 def from_map(m) do
302314 %Column{
303315 cached_contents: m["cachedContents"] && CachedContents.from_map(m["cachedContents"]),
@@ -310,8 +322,8 @@ defmodule Column do
310322 name: decode_name(m["name"]),
311323 position: decode_position(m["position"]),
312324 render_type_name: TypeName.decode(m["renderTypeName"]),
313- table_column_id: m["tableColumnId"],
314- width: m["width"],
325+ table_column_id: m["tableColumnId"] && decode_table_column_id(m["tableColumnId"]),
326+ width: m["width"] && decode_width(m["width"]),
315327 }
316328 end
Test case

test/inputs/json/priority/bug427.json

1 generated file · +49 −7
Melixirdefault / QuickType.ex+49 −7
@@ -1719,6 +1719,12 @@ defmodule ExtendedBy do
17191719 type_arguments: [ExtendedBy.t()] | nil
17201720 }
17211721
1722+ def decode_id(value) when is_integer(value), do: value
1723+ def decode_id(_), do: {:error, "Unexpected type when decoding ExtendedBy.id"}
1724+
1725+ def encode_id(value) when is_integer(value), do: value
1726+ def encode_id(_), do: {:error, "Unexpected type when encoding ExtendedBy.id"}
1727+
17221728 def decode_name(value) when is_binary(value), do: value
17231729 def decode_name(_), do: {:error, "Unexpected type when decoding ExtendedBy.name"}
17241730
@@ -1728,7 +1734,7 @@ defmodule ExtendedBy do
17281734 def from_map(m) do
17291735 %ExtendedBy{
17301736 constraint: m["constraint"] && ExtendedBy.from_map(m["constraint"]),
1731- id: m["id"],
1737+ id: m["id"] && decode_id(m["id"]),
17321738 name: decode_name(m["name"]),
17331739 type: TypeEnum.decode(m["type"]),
17341740 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &ExtendedBy.from_map/1),
@@ -1808,6 +1814,12 @@ defmodule Type4 do
18081814 type_arguments: [ElementType.t()] | nil
18091815 }
18101816
1817+ def decode_id(value) when is_integer(value), do: value
1818+ def decode_id(_), do: {:error, "Unexpected type when decoding Type4.id"}
1819+
1820+ def encode_id(value) when is_integer(value), do: value
1821+ def encode_id(_), do: {:error, "Unexpected type when encoding Type4.id"}
1822+
18111823 def decode_name(value) when is_binary(value), do: value
18121824 def decode_name(_), do: {:error, "Unexpected type when decoding Type4.name"}
18131825
@@ -1820,7 +1832,7 @@ defmodule Type4 do
18201832 declaration: m["declaration"] && GetSignature.from_map(m["declaration"]),
18211833 element_type: m["elementType"] && ElementType.from_map(m["elementType"]),
18221834 elements: m["elements"] && Enum.map(m["elements"], &ExtendedBy.from_map/1),
1823- id: m["id"],
1835+ id: m["id"] && decode_id(m["id"]),
18241836 name: m["name"] && decode_name(m["name"]),
18251837 type: TypeEnum.decode(m["type"]),
18261838 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &ElementType.from_map/1),
@@ -2598,6 +2610,12 @@ defmodule Type5 do
25982610 types: [TypeElement.t()] | nil
25992611 }
26002612
2613+ def decode_id(value) when is_integer(value), do: value
2614+ def decode_id(_), do: {:error, "Unexpected type when decoding Type5.id"}
2615+
2616+ def encode_id(value) when is_integer(value), do: value
2617+ def encode_id(_), do: {:error, "Unexpected type when encoding Type5.id"}
2618+
26012619 def decode_name(value) when is_binary(value), do: value
26022620 def decode_name(_), do: {:error, "Unexpected type when decoding Type5.name"}
26032621
@@ -2610,7 +2628,7 @@ defmodule Type5 do
26102628 declaration: m["declaration"] && Declaration2.from_map(m["declaration"]),
26112629 element_type: m["elementType"] && ExtendedBy.from_map(m["elementType"]),
26122630 elements: m["elements"] && Enum.map(m["elements"], &ElementType.from_map/1),
2613- id: m["id"],
2631+ id: m["id"] && decode_id(m["id"]),
26142632 name: m["name"] && decode_name(m["name"]),
26152633 type: TypeEnum.decode(m["type"]),
26162634 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &TypeArgument1.from_map/1),
@@ -3048,6 +3066,12 @@ defmodule Type8 do
30483066 type_arguments: [ElementType.t()] | nil
30493067 }
30503068
3069+ def decode_id(value) when is_integer(value), do: value
3070+ def decode_id(_), do: {:error, "Unexpected type when decoding Type8.id"}
3071+
3072+ def encode_id(value) when is_integer(value), do: value
3073+ def encode_id(_), do: {:error, "Unexpected type when encoding Type8.id"}
3074+
30513075 def decode_name(value) when is_binary(value), do: value
30523076 def decode_name(_), do: {:error, "Unexpected type when decoding Type8.name"}
30533077
@@ -3058,7 +3082,7 @@ defmodule Type8 do
30583082 %Type8{
30593083 declaration: m["declaration"] && Declaration3.from_map(m["declaration"]),
30603084 element_type: m["elementType"] && ElementType.from_map(m["elementType"]),
3061- id: m["id"],
3085+ id: m["id"] && decode_id(m["id"]),
30623086 name: m["name"] && decode_name(m["name"]),
30633087 type: TypeEnum.decode(m["type"]),
30643088 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &ElementType.from_map/1),
@@ -3188,10 +3212,16 @@ defmodule Type9 do
31883212 type_arguments: [ElementType.t()] | nil
31893213 }
31903214
3215+ def decode_id(value) when is_integer(value), do: value
3216+ def decode_id(_), do: {:error, "Unexpected type when decoding Type9.id"}
3217+
3218+ def encode_id(value) when is_integer(value), do: value
3219+ def encode_id(_), do: {:error, "Unexpected type when encoding Type9.id"}
3220+
31913221 def from_map(m) do
31923222 %Type9{
31933223 declaration: m["declaration"] && Declaration1.from_map(m["declaration"]),
3194- id: m["id"],
3224+ id: m["id"] && decode_id(m["id"]),
31953225 name: m["name"] && Name.decode(m["name"]),
31963226 type: TypeEnum.decode(m["type"]),
31973227 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &ElementType.from_map/1),
@@ -3648,6 +3678,12 @@ defmodule Type10 do
36483678 value: String.t() | nil
36493679 }
36503680
3681+ def decode_id(value) when is_integer(value), do: value
3682+ def decode_id(_), do: {:error, "Unexpected type when decoding Type10.id"}
3683+
3684+ def encode_id(value) when is_integer(value), do: value
3685+ def encode_id(_), do: {:error, "Unexpected type when encoding Type10.id"}
3686+
36513687 def decode_name(value) when is_binary(value), do: value
36523688 def decode_name(_), do: {:error, "Unexpected type when decoding Type10.name"}
36533689
@@ -3665,7 +3701,7 @@ defmodule Type10 do
36653701 declaration: m["declaration"] && Declaration4.from_map(m["declaration"]),
36663702 element_type: m["elementType"] && ElementType.from_map(m["elementType"]),
36673703 elements: m["elements"] && Enum.map(m["elements"], &ExtendedBy.from_map/1),
3668- id: m["id"],
3704+ id: m["id"] && decode_id(m["id"]),
36693705 name: m["name"] && decode_name(m["name"]),
36703706 type: TypeEnum.decode(m["type"]),
36713707 type_arguments: m["typeArguments"] && Enum.map(m["typeArguments"], &TypeArgument2.from_map/1),
@@ -3713,6 +3749,12 @@ defmodule Type12 do
37133749 type: String.t()
37143750 }
37153751
3752+ def decode_id(value) when is_integer(value), do: value
3753+ def decode_id(_), do: {:error, "Unexpected type when decoding Type12.id"}
3754+
3755+ def encode_id(value) when is_integer(value), do: value
3756+ def encode_id(_), do: {:error, "Unexpected type when encoding Type12.id"}
3757+
37163758 def decode_operator(value) when is_binary(value), do: value
37173759 def decode_operator(_), do: {:error, "Unexpected type when decoding Type12.operator"}
37183760
@@ -3727,7 +3769,7 @@ defmodule Type12 do
37273769
37283770 def from_map(m) do
37293771 %Type12{
3730- id: m["id"],
3772+ id: m["id"] && decode_id(m["id"]),
37313773 name: m["name"] && Name.decode(m["name"]),
37323774 operator: m["operator"] && decode_operator(m["operator"]),
37333775 target: m["target"] && ElementType.from_map(m["target"]),
Test case

test/inputs/json/priority/combinations1.json

4 generated files · +2,687 −6
Adartcopy-with-true--bb7e994c05fe / TopLevel.dart+1,975 −0
@@ -0,0 +1,1975 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final String centrodesmose;
13+ final List<dynamic> cerograph;
14+ final List<dynamic> chemotherapeutics;
15+ final List<dynamic> cimelia;
16+ final int citrated;
17+ final List<dynamic> clinodome;
18+ final List<dynamic> coadjust;
19+ final List<dynamic> consilience;
20+ final List<dynamic> constructor;
21+ final List<dynamic> continuative;
22+ final List<dynamic> credulity;
23+ final List<dynamic> creviced;
24+ final List<List<int?>> cubiculum;
25+ final List<dynamic> deruralize;
26+ final List<dynamic> diaereses;
27+ final List<List<dynamic>?> dissolution;
28+ final List<dynamic> downstroke;
29+ final List<double?> electrotautomerism;
30+ final List<dynamic> eleutheromania;
31+ final Encrust encrust;
32+ final List<dynamic> entomoid;
33+ final List<dynamic> epipaleolithic;
34+ final List<dynamic> expropriable;
35+ final List<dynamic> faggingly;
36+ final List<dynamic> fenks;
37+ final List<dynamic> flagmaking;
38+ final List<dynamic> fluorometer;
39+ final List<int?> fulsome;
40+ final List<dynamic> fuzzy;
41+ final List<dynamic> gardenwards;
42+ final List<dynamic> generalissimo;
43+ final List<Map<String, int>?> habeas;
44+ final List<dynamic> hemicrystalline;
45+ final List<dynamic> hemocoele;
46+ final List<dynamic> hoister;
47+ final List<dynamic> hyperpiesis;
48+ final List<dynamic> hyppish;
49+ final List<dynamic> idealizer;
50+ final List<dynamic> incrustator;
51+ final List<dynamic> intentiveness;
52+ final Interacinar interacinar;
53+ final List<List<int>?> intercorrelation;
54+ final List<dynamic> jacutinga;
55+
56+ TopLevel({
57+ required this.centrodesmose,
58+ required this.cerograph,
59+ required this.chemotherapeutics,
60+ required this.cimelia,
61+ required this.citrated,
62+ required this.clinodome,
63+ required this.coadjust,
64+ required this.consilience,
65+ required this.constructor,
66+ required this.continuative,
67+ required this.credulity,
68+ required this.creviced,
69+ required this.cubiculum,
70+ required this.deruralize,
71+ required this.diaereses,
72+ required this.dissolution,
73+ required this.downstroke,
74+ required this.electrotautomerism,
75+ required this.eleutheromania,
76+ required this.encrust,
77+ required this.entomoid,
78+ required this.epipaleolithic,
79+ required this.expropriable,
80+ required this.faggingly,
81+ required this.fenks,
82+ required this.flagmaking,
83+ required this.fluorometer,
84+ required this.fulsome,
85+ required this.fuzzy,
86+ required this.gardenwards,
87+ required this.generalissimo,
88+ required this.habeas,
89+ required this.hemicrystalline,
90+ required this.hemocoele,
91+ required this.hoister,
92+ required this.hyperpiesis,
93+ required this.hyppish,
94+ required this.idealizer,
95+ required this.incrustator,
96+ required this.intentiveness,
97+ required this.interacinar,
98+ required this.intercorrelation,
99+ required this.jacutinga,
100+ });
101+
102+ TopLevel copyWith({
103+ String? centrodesmose,
104+ List<dynamic>? cerograph,
105+ List<dynamic>? chemotherapeutics,
106+ List<dynamic>? cimelia,
107+ int? citrated,
108+ List<dynamic>? clinodome,
109+ List<dynamic>? coadjust,
110+ List<dynamic>? consilience,
111+ List<dynamic>? constructor,
112+ List<dynamic>? continuative,
113+ List<dynamic>? credulity,
114+ List<dynamic>? creviced,
115+ List<List<int?>>? cubiculum,
116+ List<dynamic>? deruralize,
117+ List<dynamic>? diaereses,
118+ List<List<dynamic>?>? dissolution,
119+ List<dynamic>? downstroke,
120+ List<double?>? electrotautomerism,
121+ List<dynamic>? eleutheromania,
122+ Encrust? encrust,
123+ List<dynamic>? entomoid,
124+ List<dynamic>? epipaleolithic,
125+ List<dynamic>? expropriable,
126+ List<dynamic>? faggingly,
127+ List<dynamic>? fenks,
128+ List<dynamic>? flagmaking,
129+ List<dynamic>? fluorometer,
130+ List<int?>? fulsome,
131+ List<dynamic>? fuzzy,
132+ List<dynamic>? gardenwards,
133+ List<dynamic>? generalissimo,
134+ List<Map<String, int>?>? habeas,
135+ List<dynamic>? hemicrystalline,
136+ List<dynamic>? hemocoele,
137+ List<dynamic>? hoister,
138+ List<dynamic>? hyperpiesis,
139+ List<dynamic>? hyppish,
140+ List<dynamic>? idealizer,
141+ List<dynamic>? incrustator,
142+ List<dynamic>? intentiveness,
143+ Interacinar? interacinar,
144+ List<List<int>?>? intercorrelation,
145+ List<dynamic>? jacutinga,
146+ }) =>
147+ TopLevel(
148+ centrodesmose: centrodesmose ?? this.centrodesmose,
149+ cerograph: cerograph ?? this.cerograph,
150+ chemotherapeutics: chemotherapeutics ?? this.chemotherapeutics,
151+ cimelia: cimelia ?? this.cimelia,
152+ citrated: citrated ?? this.citrated,
153+ clinodome: clinodome ?? this.clinodome,
154+ coadjust: coadjust ?? this.coadjust,
155+ consilience: consilience ?? this.consilience,
156+ constructor: constructor ?? this.constructor,
157+ continuative: continuative ?? this.continuative,
158+ credulity: credulity ?? this.credulity,
159+ creviced: creviced ?? this.creviced,
160+ cubiculum: cubiculum ?? this.cubiculum,
161+ deruralize: deruralize ?? this.deruralize,
162+ diaereses: diaereses ?? this.diaereses,
163+ dissolution: dissolution ?? this.dissolution,
164+ downstroke: downstroke ?? this.downstroke,
165+ electrotautomerism: electrotautomerism ?? this.electrotautomerism,
166+ eleutheromania: eleutheromania ?? this.eleutheromania,
167+ encrust: encrust ?? this.encrust,
168+ entomoid: entomoid ?? this.entomoid,
169+ epipaleolithic: epipaleolithic ?? this.epipaleolithic,
170+ expropriable: expropriable ?? this.expropriable,
171+ faggingly: faggingly ?? this.faggingly,
172+ fenks: fenks ?? this.fenks,
173+ flagmaking: flagmaking ?? this.flagmaking,
174+ fluorometer: fluorometer ?? this.fluorometer,
175+ fulsome: fulsome ?? this.fulsome,
176+ fuzzy: fuzzy ?? this.fuzzy,
177+ gardenwards: gardenwards ?? this.gardenwards,
178+ generalissimo: generalissimo ?? this.generalissimo,
179+ habeas: habeas ?? this.habeas,
180+ hemicrystalline: hemicrystalline ?? this.hemicrystalline,
181+ hemocoele: hemocoele ?? this.hemocoele,
182+ hoister: hoister ?? this.hoister,
183+ hyperpiesis: hyperpiesis ?? this.hyperpiesis,
184+ hyppish: hyppish ?? this.hyppish,
185+ idealizer: idealizer ?? this.idealizer,
186+ incrustator: incrustator ?? this.incrustator,
187+ intentiveness: intentiveness ?? this.intentiveness,
188+ interacinar: interacinar ?? this.interacinar,
189+ intercorrelation: intercorrelation ?? this.intercorrelation,
190+ jacutinga: jacutinga ?? this.jacutinga,
191+ );
192+
193+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
194+ centrodesmose: json["centrodesmose"],
195+ cerograph: List<dynamic>.from(json["cerograph"].map((x) => x)),
196+ chemotherapeutics: List<dynamic>.from(json["chemotherapeutics"].map((x) => x)),
197+ cimelia: List<dynamic>.from(json["cimelia"].map((x) => x)),
198+ citrated: json["citrated"],
199+ clinodome: List<dynamic>.from(json["clinodome"].map((x) => x)),
200+ coadjust: List<dynamic>.from(json["coadjust"].map((x) => x)),
201+ consilience: List<dynamic>.from(json["consilience"].map((x) => x)),
202+ constructor: List<dynamic>.from(json["constructor"].map((x) => x)),
203+ continuative: List<dynamic>.from(json["continuative"].map((x) => x)),
204+ credulity: List<dynamic>.from(json["credulity"].map((x) => x)),
205+ creviced: List<dynamic>.from(json["creviced"].map((x) => x)),
206+ cubiculum: List<List<int?>>.from(json["cubiculum"].map((x) => List<int?>.from(x.map((x) => x)))),
207+ deruralize: List<dynamic>.from(json["deruralize"].map((x) => x)),
208+ diaereses: List<dynamic>.from(json["diaereses"].map((x) => x)),
209+ dissolution: List<List<dynamic>?>.from(json["dissolution"].map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
210+ downstroke: List<dynamic>.from(json["downstroke"].map((x) => x)),
211+ electrotautomerism: List<double?>.from(json["electrotautomerism"].map((x) => x?.toDouble())),
212+ eleutheromania: List<dynamic>.from(json["eleutheromania"].map((x) => x)),
213+ encrust: Encrust.fromJson(json["encrust"]),
214+ entomoid: List<dynamic>.from(json["entomoid"].map((x) => x)),
215+ epipaleolithic: List<dynamic>.from(json["epipaleolithic"].map((x) => x)),
216+ expropriable: List<dynamic>.from(json["expropriable"].map((x) => x)),
217+ faggingly: List<dynamic>.from(json["faggingly"].map((x) => x)),
218+ fenks: List<dynamic>.from(json["fenks"].map((x) => x)),
219+ flagmaking: List<dynamic>.from(json["flagmaking"].map((x) => x)),
220+ fluorometer: List<dynamic>.from(json["fluorometer"].map((x) => x)),
221+ fulsome: List<int?>.from(json["fulsome"].map((x) => x)),
222+ fuzzy: List<dynamic>.from(json["fuzzy"].map((x) => x)),
223+ gardenwards: List<dynamic>.from(json["gardenwards"].map((x) => x)),
224+ generalissimo: List<dynamic>.from(json["generalissimo"].map((x) => x)),
225+ habeas: List<Map<String, int>?>.from(json["habeas"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int>(k, v)))),
226+ hemicrystalline: List<dynamic>.from(json["hemicrystalline"].map((x) => x)),
227+ hemocoele: List<dynamic>.from(json["hemocoele"].map((x) => x)),
228+ hoister: List<dynamic>.from(json["hoister"].map((x) => x)),
229+ hyperpiesis: List<dynamic>.from(json["hyperpiesis"].map((x) => x)),
230+ hyppish: List<dynamic>.from(json["hyppish"].map((x) => x)),
231+ idealizer: List<dynamic>.from(json["idealizer"].map((x) => x)),
232+ incrustator: List<dynamic>.from(json["incrustator"].map((x) => x)),
233+ intentiveness: List<dynamic>.from(json["intentiveness"].map((x) => x)),
234+ interacinar: Interacinar.fromJson(json["interacinar"]),
235+ intercorrelation: List<List<int>?>.from(json["intercorrelation"].map((x) => x == null ? null : List<int>.from(x!.map((x) => x)))),
236+ jacutinga: List<dynamic>.from(json["jacutinga"].map((x) => x)),
237+ );
238+
239+ Map<String, dynamic> toJson() => {
240+ "centrodesmose": centrodesmose,
241+ "cerograph": List<dynamic>.from(cerograph.map((x) => x)),
242+ "chemotherapeutics": List<dynamic>.from(chemotherapeutics.map((x) => x)),
243+ "cimelia": List<dynamic>.from(cimelia.map((x) => x)),
244+ "citrated": citrated,
245+ "clinodome": List<dynamic>.from(clinodome.map((x) => x)),
246+ "coadjust": List<dynamic>.from(coadjust.map((x) => x)),
247+ "consilience": List<dynamic>.from(consilience.map((x) => x)),
248+ "constructor": List<dynamic>.from(constructor.map((x) => x)),
249+ "continuative": List<dynamic>.from(continuative.map((x) => x)),
250+ "credulity": List<dynamic>.from(credulity.map((x) => x)),
251+ "creviced": List<dynamic>.from(creviced.map((x) => x)),
252+ "cubiculum": List<dynamic>.from(cubiculum.map((x) => List<dynamic>.from(x.map((x) => x)))),
253+ "deruralize": List<dynamic>.from(deruralize.map((x) => x)),
254+ "diaereses": List<dynamic>.from(diaereses.map((x) => x)),
255+ "dissolution": List<dynamic>.from(dissolution.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
256+ "downstroke": List<dynamic>.from(downstroke.map((x) => x)),
257+ "electrotautomerism": List<dynamic>.from(electrotautomerism.map((x) => x)),
258+ "eleutheromania": List<dynamic>.from(eleutheromania.map((x) => x)),
259+ "encrust": encrust.toJson(),
260+ "entomoid": List<dynamic>.from(entomoid.map((x) => x)),
261+ "epipaleolithic": List<dynamic>.from(epipaleolithic.map((x) => x)),
262+ "expropriable": List<dynamic>.from(expropriable.map((x) => x)),
263+ "faggingly": List<dynamic>.from(faggingly.map((x) => x)),
264+ "fenks": List<dynamic>.from(fenks.map((x) => x)),
265+ "flagmaking": List<dynamic>.from(flagmaking.map((x) => x)),
266+ "fluorometer": List<dynamic>.from(fluorometer.map((x) => x)),
267+ "fulsome": List<dynamic>.from(fulsome.map((x) => x)),
268+ "fuzzy": List<dynamic>.from(fuzzy.map((x) => x)),
269+ "gardenwards": List<dynamic>.from(gardenwards.map((x) => x)),
270+ "generalissimo": List<dynamic>.from(generalissimo.map((x) => x)),
271+ "habeas": List<dynamic>.from(habeas.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
272+ "hemicrystalline": List<dynamic>.from(hemicrystalline.map((x) => x)),
273+ "hemocoele": List<dynamic>.from(hemocoele.map((x) => x)),
274+ "hoister": List<dynamic>.from(hoister.map((x) => x)),
275+ "hyperpiesis": List<dynamic>.from(hyperpiesis.map((x) => x)),
276+ "hyppish": List<dynamic>.from(hyppish.map((x) => x)),
277+ "idealizer": List<dynamic>.from(idealizer.map((x) => x)),
278+ "incrustator": List<dynamic>.from(incrustator.map((x) => x)),
279+ "intentiveness": List<dynamic>.from(intentiveness.map((x) => x)),
280+ "interacinar": interacinar.toJson(),
281+ "intercorrelation": List<dynamic>.from(intercorrelation.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
282+ "jacutinga": List<dynamic>.from(jacutinga.map((x) => x)),
283+ };
284+}
285+
286+class CerographClass {
287+ final dynamic apotropaion;
288+ final dynamic casuary;
289+ final dynamic creaker;
290+ final dynamic disqualification;
291+ final dynamic imperatorious;
292+ final dynamic impermeabilize;
293+ final dynamic metastoma;
294+ final dynamic noctidiurnal;
295+ final dynamic nonreserve;
296+ final dynamic ophthalmotonometry;
297+ final dynamic pailful;
298+ final dynamic pigfish;
299+ final dynamic pongee;
300+ final dynamic prosodical;
301+ final dynamic scrofuloderm;
302+ final dynamic storekeeping;
303+ final dynamic therologist;
304+ final dynamic tolowa;
305+ final dynamic tradeful;
306+ final dynamic unriveting;
307+
308+ CerographClass({
309+ required this.apotropaion,
310+ required this.casuary,
311+ required this.creaker,
312+ required this.disqualification,
313+ required this.imperatorious,
314+ required this.impermeabilize,
315+ required this.metastoma,
316+ required this.noctidiurnal,
317+ required this.nonreserve,
318+ required this.ophthalmotonometry,
319+ required this.pailful,
320+ required this.pigfish,
321+ required this.pongee,
322+ required this.prosodical,
323+ required this.scrofuloderm,
324+ required this.storekeeping,
325+ required this.therologist,
326+ required this.tolowa,
327+ required this.tradeful,
328+ required this.unriveting,
329+ });
330+
331+ CerographClass copyWith({
332+ dynamic apotropaion,
333+ dynamic casuary,
334+ dynamic creaker,
335+ dynamic disqualification,
336+ dynamic imperatorious,
337+ dynamic impermeabilize,
338+ dynamic metastoma,
339+ dynamic noctidiurnal,
340+ dynamic nonreserve,
341+ dynamic ophthalmotonometry,
342+ dynamic pailful,
343+ dynamic pigfish,
344+ dynamic pongee,
345+ dynamic prosodical,
346+ dynamic scrofuloderm,
347+ dynamic storekeeping,
348+ dynamic therologist,
349+ dynamic tolowa,
350+ dynamic tradeful,
351+ dynamic unriveting,
352+ }) =>
353+ CerographClass(
354+ apotropaion: apotropaion ?? this.apotropaion,
355+ casuary: casuary ?? this.casuary,
356+ creaker: creaker ?? this.creaker,
357+ disqualification: disqualification ?? this.disqualification,
358+ imperatorious: imperatorious ?? this.imperatorious,
359+ impermeabilize: impermeabilize ?? this.impermeabilize,
360+ metastoma: metastoma ?? this.metastoma,
361+ noctidiurnal: noctidiurnal ?? this.noctidiurnal,
362+ nonreserve: nonreserve ?? this.nonreserve,
363+ ophthalmotonometry: ophthalmotonometry ?? this.ophthalmotonometry,
364+ pailful: pailful ?? this.pailful,
365+ pigfish: pigfish ?? this.pigfish,
366+ pongee: pongee ?? this.pongee,
367+ prosodical: prosodical ?? this.prosodical,
368+ scrofuloderm: scrofuloderm ?? this.scrofuloderm,
369+ storekeeping: storekeeping ?? this.storekeeping,
370+ therologist: therologist ?? this.therologist,
371+ tolowa: tolowa ?? this.tolowa,
372+ tradeful: tradeful ?? this.tradeful,
373+ unriveting: unriveting ?? this.unriveting,
374+ );
375+
376+ factory CerographClass.fromJson(Map<String, dynamic> json) => CerographClass(
377+ apotropaion: (json.containsKey("apotropaion") ? json["apotropaion"] : throw FormatException('Missing required property')),
378+ casuary: (json.containsKey("casuary") ? json["casuary"] : throw FormatException('Missing required property')),
379+ creaker: (json.containsKey("creaker") ? json["creaker"] : throw FormatException('Missing required property')),
380+ disqualification: (json.containsKey("disqualification") ? json["disqualification"] : throw FormatException('Missing required property')),
381+ imperatorious: (json.containsKey("imperatorious") ? json["imperatorious"] : throw FormatException('Missing required property')),
382+ impermeabilize: (json.containsKey("impermeabilize") ? json["impermeabilize"] : throw FormatException('Missing required property')),
383+ metastoma: (json.containsKey("metastoma") ? json["metastoma"] : throw FormatException('Missing required property')),
384+ noctidiurnal: (json.containsKey("noctidiurnal") ? json["noctidiurnal"] : throw FormatException('Missing required property')),
385+ nonreserve: (json.containsKey("nonreserve") ? json["nonreserve"] : throw FormatException('Missing required property')),
386+ ophthalmotonometry: (json.containsKey("ophthalmotonometry") ? json["ophthalmotonometry"] : throw FormatException('Missing required property')),
387+ pailful: (json.containsKey("pailful") ? json["pailful"] : throw FormatException('Missing required property')),
388+ pigfish: (json.containsKey("pigfish") ? json["pigfish"] : throw FormatException('Missing required property')),
389+ pongee: (json.containsKey("pongee") ? json["pongee"] : throw FormatException('Missing required property')),
390+ prosodical: (json.containsKey("prosodical") ? json["prosodical"] : throw FormatException('Missing required property')),
391+ scrofuloderm: (json.containsKey("scrofuloderm") ? json["scrofuloderm"] : throw FormatException('Missing required property')),
392+ storekeeping: (json.containsKey("storekeeping") ? json["storekeeping"] : throw FormatException('Missing required property')),
393+ therologist: (json.containsKey("therologist") ? json["therologist"] : throw FormatException('Missing required property')),
394+ tolowa: (json.containsKey("Tolowa") ? json["Tolowa"] : throw FormatException('Missing required property')),
395+ tradeful: (json.containsKey("tradeful") ? json["tradeful"] : throw FormatException('Missing required property')),
396+ unriveting: (json.containsKey("unriveting") ? json["unriveting"] : throw FormatException('Missing required property')),
397+ );
398+
399+ Map<String, dynamic> toJson() => {
400+ "apotropaion": apotropaion,
401+ "casuary": casuary,
402+ "creaker": creaker,
403+ "disqualification": disqualification,
404+ "imperatorious": imperatorious,
405+ "impermeabilize": impermeabilize,
406+ "metastoma": metastoma,
407+ "noctidiurnal": noctidiurnal,
408+ "nonreserve": nonreserve,
409+ "ophthalmotonometry": ophthalmotonometry,
410+ "pailful": pailful,
411+ "pigfish": pigfish,
412+ "pongee": pongee,
413+ "prosodical": prosodical,
414+ "scrofuloderm": scrofuloderm,
415+ "storekeeping": storekeeping,
416+ "therologist": therologist,
417+ "Tolowa": tolowa,
418+ "tradeful": tradeful,
419+ "unriveting": unriveting,
420+ };
421+}
422+
423+class ChemotherapeuticClass {
424+ final dynamic angioneurotic;
425+ final dynamic availment;
426+ final dynamic bladelet;
427+ final double? catharticalness;
428+ final dynamic caulis;
429+ final dynamic chalcus;
430+ final int? chirotherium;
431+ final String? disdiapason;
432+ final dynamic enteradenological;
433+ final bool? homocerc;
434+ final dynamic imporosity;
435+ final dynamic insistently;
436+ final dynamic intraparietal;
437+ final dynamic ivied;
438+ final dynamic maureen;
439+ final dynamic nonbookish;
440+ final dynamic nostochine;
441+ final dynamic nutcracker;
442+ final dynamic ofttimes;
443+ final dynamic phenocryst;
444+ final dynamic precoincident;
445+ final dynamic ramiferous;
446+ final dynamic stagmometer;
447+ final dynamic tetherball;
448+ final dynamic unshy;
449+
450+ ChemotherapeuticClass({
451+ this.angioneurotic,
452+ this.availment,
453+ this.bladelet,
454+ this.catharticalness,
455+ this.caulis,
456+ this.chalcus,
457+ this.chirotherium,
458+ this.disdiapason,
459+ this.enteradenological,
460+ this.homocerc,
461+ this.imporosity,
462+ this.insistently,
463+ this.intraparietal,
464+ this.ivied,
465+ this.maureen,
466+ this.nonbookish,
467+ this.nostochine,
468+ this.nutcracker,
469+ this.ofttimes,
470+ this.phenocryst,
471+ this.precoincident,
472+ this.ramiferous,
473+ this.stagmometer,
474+ this.tetherball,
475+ this.unshy,
476+ });
477+
478+ ChemotherapeuticClass copyWith({
479+ dynamic angioneurotic,
480+ dynamic availment,
481+ dynamic bladelet,
482+ double? catharticalness,
483+ dynamic caulis,
484+ dynamic chalcus,
485+ int? chirotherium,
486+ String? disdiapason,
487+ dynamic enteradenological,
488+ bool? homocerc,
489+ dynamic imporosity,
490+ dynamic insistently,
491+ dynamic intraparietal,
492+ dynamic ivied,
493+ dynamic maureen,
494+ dynamic nonbookish,
495+ dynamic nostochine,
496+ dynamic nutcracker,
497+ dynamic ofttimes,
498+ dynamic phenocryst,
499+ dynamic precoincident,
500+ dynamic ramiferous,
501+ dynamic stagmometer,
502+ dynamic tetherball,
503+ dynamic unshy,
504+ }) =>
505+ ChemotherapeuticClass(
506+ angioneurotic: angioneurotic ?? this.angioneurotic,
507+ availment: availment ?? this.availment,
508+ bladelet: bladelet ?? this.bladelet,
509+ catharticalness: catharticalness ?? this.catharticalness,
510+ caulis: caulis ?? this.caulis,
511+ chalcus: chalcus ?? this.chalcus,
512+ chirotherium: chirotherium ?? this.chirotherium,
513+ disdiapason: disdiapason ?? this.disdiapason,
514+ enteradenological: enteradenological ?? this.enteradenological,
515+ homocerc: homocerc ?? this.homocerc,
516+ imporosity: imporosity ?? this.imporosity,
517+ insistently: insistently ?? this.insistently,
518+ intraparietal: intraparietal ?? this.intraparietal,
519+ ivied: ivied ?? this.ivied,
520+ maureen: maureen ?? this.maureen,
521+ nonbookish: nonbookish ?? this.nonbookish,
522+ nostochine: nostochine ?? this.nostochine,
523+ nutcracker: nutcracker ?? this.nutcracker,
524+ ofttimes: ofttimes ?? this.ofttimes,
525+ phenocryst: phenocryst ?? this.phenocryst,
526+ precoincident: precoincident ?? this.precoincident,
527+ ramiferous: ramiferous ?? this.ramiferous,
528+ stagmometer: stagmometer ?? this.stagmometer,
529+ tetherball: tetherball ?? this.tetherball,
530+ unshy: unshy ?? this.unshy,
531+ );
532+
533+ factory ChemotherapeuticClass.fromJson(Map<String, dynamic> json) => ChemotherapeuticClass(
534+ angioneurotic: json["angioneurotic"],
535+ availment: json["availment"],
536+ bladelet: json["bladelet"],
537+ catharticalness: json["catharticalness"]?.toDouble(),
538+ caulis: json["caulis"],
539+ chalcus: json["chalcus"],
540+ chirotherium: json["Chirotherium"],
541+ disdiapason: json["disdiapason"],
542+ enteradenological: json["enteradenological"],
543+ homocerc: json["homocerc"],
544+ imporosity: json["imporosity"],
545+ insistently: json["insistently"],
546+ intraparietal: json["intraparietal"],
547+ ivied: json["ivied"],
548+ maureen: json["Maureen"],
549+ nonbookish: json["nonbookish"],
550+ nostochine: json["nostochine"],
551+ nutcracker: json["nutcracker"],
552+ ofttimes: json["ofttimes"],
553+ phenocryst: json["phenocryst"],
554+ precoincident: json["precoincident"],
555+ ramiferous: json["ramiferous"],
556+ stagmometer: json["stagmometer"],
557+ tetherball: json["tetherball"],
558+ unshy: json["unshy"],
559+ );
560+
561+ Map<String, dynamic> toJson() => {
562+ "angioneurotic": angioneurotic,
563+ "availment": availment,
564+ "bladelet": bladelet,
565+ "catharticalness": catharticalness,
566+ "caulis": caulis,
567+ "chalcus": chalcus,
568+ "Chirotherium": chirotherium,
569+ "disdiapason": disdiapason,
570+ "enteradenological": enteradenological,
571+ "homocerc": homocerc,
572+ "imporosity": imporosity,
573+ "insistently": insistently,
574+ "intraparietal": intraparietal,
575+ "ivied": ivied,
576+ "Maureen": maureen,
577+ "nonbookish": nonbookish,
578+ "nostochine": nostochine,
579+ "nutcracker": nutcracker,
580+ "ofttimes": ofttimes,
581+ "phenocryst": phenocryst,
582+ "precoincident": precoincident,
583+ "ramiferous": ramiferous,
584+ "stagmometer": stagmometer,
585+ "tetherball": tetherball,
586+ "unshy": unshy,
587+ };
588+}
589+
590+class CimeliaClass {
591+ final double catharticalness;
592+ final int chirotherium;
593+ final String disdiapason;
594+ final bool homocerc;
595+ final dynamic nonbookish;
596+
597+ CimeliaClass({
598+ required this.catharticalness,
599+ required this.chirotherium,
600+ required this.disdiapason,
601+ required this.homocerc,
602+ required this.nonbookish,
603+ });
604+
605+ CimeliaClass copyWith({
606+ double? catharticalness,
607+ int? chirotherium,
608+ String? disdiapason,
609+ bool? homocerc,
610+ dynamic nonbookish,
611+ }) =>
612+ CimeliaClass(
613+ catharticalness: catharticalness ?? this.catharticalness,
614+ chirotherium: chirotherium ?? this.chirotherium,
615+ disdiapason: disdiapason ?? this.disdiapason,
616+ homocerc: homocerc ?? this.homocerc,
617+ nonbookish: nonbookish ?? this.nonbookish,
618+ );
619+
620+ factory CimeliaClass.fromJson(Map<String, dynamic> json) => CimeliaClass(
621+ catharticalness: json["catharticalness"]?.toDouble(),
622+ chirotherium: json["Chirotherium"],
623+ disdiapason: json["disdiapason"],
624+ homocerc: json["homocerc"],
625+ nonbookish: (json.containsKey("nonbookish") ? json["nonbookish"] : throw FormatException('Missing required property')),
626+ );
627+
628+ Map<String, dynamic> toJson() => {
629+ "catharticalness": catharticalness,
630+ "Chirotherium": chirotherium,
631+ "disdiapason": disdiapason,
632+ "homocerc": homocerc,
633+ "nonbookish": nonbookish,
634+ };
635+}
636+
637+class CoadjustClass {
638+ final dynamic amidosulphonal;
639+ final dynamic benny;
640+ final double? catharticalness;
641+ final int? chirotherium;
642+ final String? disdiapason;
643+ final dynamic ensnare;
644+ final bool? homocerc;
645+ final dynamic hybridizer;
646+ final dynamic leastwise;
647+ final dynamic lof;
648+ final dynamic monkhood;
649+ final dynamic netherlandish;
650+ final dynamic nonbookish;
651+ final dynamic peonism;
652+ final dynamic phonelescope;
653+ final dynamic porphyrogeniture;
654+ final dynamic preindemnify;
655+ final dynamic rosal;
656+ final dynamic scalenous;
657+ final dynamic scopine;
658+ final dynamic sedaceae;
659+ final dynamic suberinize;
660+ final dynamic symbiot;
661+ final dynamic tablefellow;
662+ final dynamic unchargeable;
663+
664+ CoadjustClass({
665+ this.amidosulphonal,
666+ this.benny,
667+ this.catharticalness,
668+ this.chirotherium,
669+ this.disdiapason,
670+ this.ensnare,
671+ this.homocerc,
672+ this.hybridizer,
673+ this.leastwise,
674+ this.lof,
675+ this.monkhood,
676+ this.netherlandish,
677+ this.nonbookish,
678+ this.peonism,
679+ this.phonelescope,
680+ this.porphyrogeniture,
681+ this.preindemnify,
682+ this.rosal,
683+ this.scalenous,
684+ this.scopine,
685+ this.sedaceae,
686+ this.suberinize,
687+ this.symbiot,
688+ this.tablefellow,
689+ this.unchargeable,
690+ });
691+
692+ CoadjustClass copyWith({
693+ dynamic amidosulphonal,
694+ dynamic benny,
695+ double? catharticalness,
696+ int? chirotherium,
697+ String? disdiapason,
698+ dynamic ensnare,
699+ bool? homocerc,
700+ dynamic hybridizer,
701+ dynamic leastwise,
702+ dynamic lof,
703+ dynamic monkhood,
704+ dynamic netherlandish,
705+ dynamic nonbookish,
706+ dynamic peonism,
707+ dynamic phonelescope,
708+ dynamic porphyrogeniture,
709+ dynamic preindemnify,
710+ dynamic rosal,
711+ dynamic scalenous,
712+ dynamic scopine,
713+ dynamic sedaceae,
714+ dynamic suberinize,
715+ dynamic symbiot,
716+ dynamic tablefellow,
717+ dynamic unchargeable,
718+ }) =>
719+ CoadjustClass(
720+ amidosulphonal: amidosulphonal ?? this.amidosulphonal,
721+ benny: benny ?? this.benny,
722+ catharticalness: catharticalness ?? this.catharticalness,
723+ chirotherium: chirotherium ?? this.chirotherium,
724+ disdiapason: disdiapason ?? this.disdiapason,
725+ ensnare: ensnare ?? this.ensnare,
726+ homocerc: homocerc ?? this.homocerc,
727+ hybridizer: hybridizer ?? this.hybridizer,
728+ leastwise: leastwise ?? this.leastwise,
729+ lof: lof ?? this.lof,
730+ monkhood: monkhood ?? this.monkhood,
731+ netherlandish: netherlandish ?? this.netherlandish,
732+ nonbookish: nonbookish ?? this.nonbookish,
733+ peonism: peonism ?? this.peonism,
734+ phonelescope: phonelescope ?? this.phonelescope,
735+ porphyrogeniture: porphyrogeniture ?? this.porphyrogeniture,
736+ preindemnify: preindemnify ?? this.preindemnify,
737+ rosal: rosal ?? this.rosal,
738+ scalenous: scalenous ?? this.scalenous,
739+ scopine: scopine ?? this.scopine,
740+ sedaceae: sedaceae ?? this.sedaceae,
741+ suberinize: suberinize ?? this.suberinize,
742+ symbiot: symbiot ?? this.symbiot,
743+ tablefellow: tablefellow ?? this.tablefellow,
744+ unchargeable: unchargeable ?? this.unchargeable,
745+ );
746+
747+ factory CoadjustClass.fromJson(Map<String, dynamic> json) => CoadjustClass(
748+ amidosulphonal: json["amidosulphonal"],
749+ benny: json["Benny"],
750+ catharticalness: json["catharticalness"]?.toDouble(),
751+ chirotherium: json["Chirotherium"],
752+ disdiapason: json["disdiapason"],
753+ ensnare: json["ensnare"],
754+ homocerc: json["homocerc"],
755+ hybridizer: json["hybridizer"],
756+ leastwise: json["leastwise"],
757+ lof: json["lof"],
758+ monkhood: json["monkhood"],
759+ netherlandish: json["Netherlandish"],
760+ nonbookish: json["nonbookish"],
761+ peonism: json["peonism"],
762+ phonelescope: json["Phonelescope"],
763+ porphyrogeniture: json["porphyrogeniture"],
764+ preindemnify: json["preindemnify"],
765+ rosal: json["rosal"],
766+ scalenous: json["scalenous"],
767+ scopine: json["scopine"],
768+ sedaceae: json["Sedaceae"],
769+ suberinize: json["suberinize"],
770+ symbiot: json["symbiot"],
771+ tablefellow: json["tablefellow"],
772+ unchargeable: json["unchargeable"],
773+ );
774+
775+ Map<String, dynamic> toJson() => {
776+ "amidosulphonal": amidosulphonal,
777+ "Benny": benny,
778+ "catharticalness": catharticalness,
779+ "Chirotherium": chirotherium,
780+ "disdiapason": disdiapason,
781+ "ensnare": ensnare,
782+ "homocerc": homocerc,
783+ "hybridizer": hybridizer,
784+ "leastwise": leastwise,
785+ "lof": lof,
786+ "monkhood": monkhood,
787+ "Netherlandish": netherlandish,
788+ "nonbookish": nonbookish,
789+ "peonism": peonism,
790+ "Phonelescope": phonelescope,
791+ "porphyrogeniture": porphyrogeniture,
792+ "preindemnify": preindemnify,
793+ "rosal": rosal,
794+ "scalenous": scalenous,
795+ "scopine": scopine,
796+ "Sedaceae": sedaceae,
797+ "suberinize": suberinize,
798+ "symbiot": symbiot,
799+ "tablefellow": tablefellow,
800+ "unchargeable": unchargeable,
801+ };
802+}
803+
804+class CredulityClass {
805+ final dynamic ammonolytic;
806+ final dynamic bushmaster;
807+ final dynamic considering;
808+ final dynamic consuetudinary;
809+ final dynamic embarras;
810+ final dynamic fineness;
811+ final dynamic flaithship;
812+ final dynamic flavia;
813+ final dynamic gruffly;
814+ final dynamic hedychium;
815+ final dynamic leadwort;
816+ final dynamic overseriously;
817+ final dynamic parabola;
818+ final dynamic pectinatodenticulate;
819+ final dynamic popean;
820+ final dynamic pornocrat;
821+ final dynamic quadrisect;
822+ final dynamic seriality;
823+ final dynamic vamphorn;
824+ final dynamic wharp;
825+
826+ CredulityClass({
827+ required this.ammonolytic,
828+ required this.bushmaster,
829+ required this.considering,
830+ required this.consuetudinary,
831+ required this.embarras,
832+ required this.fineness,
833+ required this.flaithship,
834+ required this.flavia,
835+ required this.gruffly,
836+ required this.hedychium,
837+ required this.leadwort,
838+ required this.overseriously,
839+ required this.parabola,
840+ required this.pectinatodenticulate,
841+ required this.popean,
842+ required this.pornocrat,
843+ required this.quadrisect,
844+ required this.seriality,
845+ required this.vamphorn,
846+ required this.wharp,
847+ });
848+
849+ CredulityClass copyWith({
850+ dynamic ammonolytic,
851+ dynamic bushmaster,
852+ dynamic considering,
853+ dynamic consuetudinary,
854+ dynamic embarras,
855+ dynamic fineness,
856+ dynamic flaithship,
857+ dynamic flavia,
858+ dynamic gruffly,
859+ dynamic hedychium,
860+ dynamic leadwort,
861+ dynamic overseriously,
862+ dynamic parabola,
863+ dynamic pectinatodenticulate,
864+ dynamic popean,
865+ dynamic pornocrat,
866+ dynamic quadrisect,
867+ dynamic seriality,
868+ dynamic vamphorn,
869+ dynamic wharp,
870+ }) =>
871+ CredulityClass(
872+ ammonolytic: ammonolytic ?? this.ammonolytic,
873+ bushmaster: bushmaster ?? this.bushmaster,
874+ considering: considering ?? this.considering,
875+ consuetudinary: consuetudinary ?? this.consuetudinary,
876+ embarras: embarras ?? this.embarras,
877+ fineness: fineness ?? this.fineness,
878+ flaithship: flaithship ?? this.flaithship,
879+ flavia: flavia ?? this.flavia,
880+ gruffly: gruffly ?? this.gruffly,
881+ hedychium: hedychium ?? this.hedychium,
882+ leadwort: leadwort ?? this.leadwort,
883+ overseriously: overseriously ?? this.overseriously,
884+ parabola: parabola ?? this.parabola,
885+ pectinatodenticulate: pectinatodenticulate ?? this.pectinatodenticulate,
886+ popean: popean ?? this.popean,
887+ pornocrat: pornocrat ?? this.pornocrat,
888+ quadrisect: quadrisect ?? this.quadrisect,
889+ seriality: seriality ?? this.seriality,
890+ vamphorn: vamphorn ?? this.vamphorn,
891+ wharp: wharp ?? this.wharp,
892+ );
893+
894+ factory CredulityClass.fromJson(Map<String, dynamic> json) => CredulityClass(
895+ ammonolytic: (json.containsKey("ammonolytic") ? json["ammonolytic"] : throw FormatException('Missing required property')),
896+ bushmaster: (json.containsKey("bushmaster") ? json["bushmaster"] : throw FormatException('Missing required property')),
897+ considering: (json.containsKey("considering") ? json["considering"] : throw FormatException('Missing required property')),
898+ consuetudinary: (json.containsKey("consuetudinary") ? json["consuetudinary"] : throw FormatException('Missing required property')),
899+ embarras: (json.containsKey("embarras") ? json["embarras"] : throw FormatException('Missing required property')),
900+ fineness: (json.containsKey("fineness") ? json["fineness"] : throw FormatException('Missing required property')),
901+ flaithship: (json.containsKey("flaithship") ? json["flaithship"] : throw FormatException('Missing required property')),
902+ flavia: (json.containsKey("Flavia") ? json["Flavia"] : throw FormatException('Missing required property')),
903+ gruffly: (json.containsKey("gruffly") ? json["gruffly"] : throw FormatException('Missing required property')),
904+ hedychium: (json.containsKey("Hedychium") ? json["Hedychium"] : throw FormatException('Missing required property')),
905+ leadwort: (json.containsKey("leadwort") ? json["leadwort"] : throw FormatException('Missing required property')),
906+ overseriously: (json.containsKey("overseriously") ? json["overseriously"] : throw FormatException('Missing required property')),
907+ parabola: (json.containsKey("parabola") ? json["parabola"] : throw FormatException('Missing required property')),
908+ pectinatodenticulate: (json.containsKey("pectinatodenticulate") ? json["pectinatodenticulate"] : throw FormatException('Missing required property')),
909+ popean: (json.containsKey("Popean") ? json["Popean"] : throw FormatException('Missing required property')),
910+ pornocrat: (json.containsKey("pornocrat") ? json["pornocrat"] : throw FormatException('Missing required property')),
911+ quadrisect: (json.containsKey("quadrisect") ? json["quadrisect"] : throw FormatException('Missing required property')),
912+ seriality: (json.containsKey("seriality") ? json["seriality"] : throw FormatException('Missing required property')),
913+ vamphorn: (json.containsKey("vamphorn") ? json["vamphorn"] : throw FormatException('Missing required property')),
914+ wharp: (json.containsKey("wharp") ? json["wharp"] : throw FormatException('Missing required property')),
915+ );
916+
917+ Map<String, dynamic> toJson() => {
918+ "ammonolytic": ammonolytic,
919+ "bushmaster": bushmaster,
920+ "considering": considering,
921+ "consuetudinary": consuetudinary,
922+ "embarras": embarras,
923+ "fineness": fineness,
924+ "flaithship": flaithship,
925+ "Flavia": flavia,
926+ "gruffly": gruffly,
927+ "Hedychium": hedychium,
928+ "leadwort": leadwort,
929+ "overseriously": overseriously,
930+ "parabola": parabola,
931+ "pectinatodenticulate": pectinatodenticulate,
932+ "Popean": popean,
933+ "pornocrat": pornocrat,
934+ "quadrisect": quadrisect,
935+ "seriality": seriality,
936+ "vamphorn": vamphorn,
937+ "wharp": wharp,
938+ };
939+}
940+
941+class DeruralizeClass {
942+ final dynamic bockerel;
943+ final dynamic boulder;
944+ final dynamic churrus;
945+ final dynamic counterdigged;
946+ final dynamic dialogite;
947+ final dynamic digenic;
948+ final dynamic dunbird;
949+ final dynamic ergatogyne;
950+ final dynamic fiendful;
951+ final dynamic jackrod;
952+ final dynamic jehovistic;
953+ final dynamic paninean;
954+ final dynamic panther;
955+ final dynamic placentigerous;
956+ final dynamic romney;
957+ final dynamic sparm;
958+ final dynamic tocsin;
959+ final dynamic unnicked;
960+ final dynamic unstavable;
961+ final dynamic windfirm;
962+
963+ DeruralizeClass({
964+ required this.bockerel,
965+ required this.boulder,
966+ required this.churrus,
967+ required this.counterdigged,
968+ required this.dialogite,
969+ required this.digenic,
970+ required this.dunbird,
971+ required this.ergatogyne,
972+ required this.fiendful,
973+ required this.jackrod,
974+ required this.jehovistic,
975+ required this.paninean,
976+ required this.panther,
977+ required this.placentigerous,
978+ required this.romney,
979+ required this.sparm,
980+ required this.tocsin,
981+ required this.unnicked,
982+ required this.unstavable,
983+ required this.windfirm,
984+ });
985+
986+ DeruralizeClass copyWith({
987+ dynamic bockerel,
988+ dynamic boulder,
989+ dynamic churrus,
990+ dynamic counterdigged,
991+ dynamic dialogite,
992+ dynamic digenic,
993+ dynamic dunbird,
994+ dynamic ergatogyne,
995+ dynamic fiendful,
996+ dynamic jackrod,
997+ dynamic jehovistic,
998+ dynamic paninean,
999+ dynamic panther,
1000+ dynamic placentigerous,
1001+ dynamic romney,
1002+ dynamic sparm,
1003+ dynamic tocsin,
1004+ dynamic unnicked,
1005+ dynamic unstavable,
1006+ dynamic windfirm,
1007+ }) =>
1008+ DeruralizeClass(
1009+ bockerel: bockerel ?? this.bockerel,
1010+ boulder: boulder ?? this.boulder,
1011+ churrus: churrus ?? this.churrus,
1012+ counterdigged: counterdigged ?? this.counterdigged,
1013+ dialogite: dialogite ?? this.dialogite,
1014+ digenic: digenic ?? this.digenic,
1015+ dunbird: dunbird ?? this.dunbird,
1016+ ergatogyne: ergatogyne ?? this.ergatogyne,
1017+ fiendful: fiendful ?? this.fiendful,
1018+ jackrod: jackrod ?? this.jackrod,
1019+ jehovistic: jehovistic ?? this.jehovistic,
1020+ paninean: paninean ?? this.paninean,
1021+ panther: panther ?? this.panther,
1022+ placentigerous: placentigerous ?? this.placentigerous,
1023+ romney: romney ?? this.romney,
1024+ sparm: sparm ?? this.sparm,
1025+ tocsin: tocsin ?? this.tocsin,
1026+ unnicked: unnicked ?? this.unnicked,
1027+ unstavable: unstavable ?? this.unstavable,
1028+ windfirm: windfirm ?? this.windfirm,
1029+ );
1030+
1031+ factory DeruralizeClass.fromJson(Map<String, dynamic> json) => DeruralizeClass(
1032+ bockerel: (json.containsKey("bockerel") ? json["bockerel"] : throw FormatException('Missing required property')),
1033+ boulder: (json.containsKey("boulder") ? json["boulder"] : throw FormatException('Missing required property')),
1034+ churrus: (json.containsKey("churrus") ? json["churrus"] : throw FormatException('Missing required property')),
1035+ counterdigged: (json.containsKey("counterdigged") ? json["counterdigged"] : throw FormatException('Missing required property')),
1036+ dialogite: (json.containsKey("dialogite") ? json["dialogite"] : throw FormatException('Missing required property')),
1037+ digenic: (json.containsKey("digenic") ? json["digenic"] : throw FormatException('Missing required property')),
1038+ dunbird: (json.containsKey("dunbird") ? json["dunbird"] : throw FormatException('Missing required property')),
1039+ ergatogyne: (json.containsKey("ergatogyne") ? json["ergatogyne"] : throw FormatException('Missing required property')),
1040+ fiendful: (json.containsKey("fiendful") ? json["fiendful"] : throw FormatException('Missing required property')),
1041+ jackrod: (json.containsKey("jackrod") ? json["jackrod"] : throw FormatException('Missing required property')),
1042+ jehovistic: (json.containsKey("Jehovistic") ? json["Jehovistic"] : throw FormatException('Missing required property')),
1043+ paninean: (json.containsKey("Paninean") ? json["Paninean"] : throw FormatException('Missing required property')),
1044+ panther: (json.containsKey("panther") ? json["panther"] : throw FormatException('Missing required property')),
1045+ placentigerous: (json.containsKey("placentigerous") ? json["placentigerous"] : throw FormatException('Missing required property')),
1046+ romney: (json.containsKey("Romney") ? json["Romney"] : throw FormatException('Missing required property')),
1047+ sparm: (json.containsKey("sparm") ? json["sparm"] : throw FormatException('Missing required property')),
1048+ tocsin: (json.containsKey("tocsin") ? json["tocsin"] : throw FormatException('Missing required property')),
1049+ unnicked: (json.containsKey("unnicked") ? json["unnicked"] : throw FormatException('Missing required property')),
1050+ unstavable: (json.containsKey("unstavable") ? json["unstavable"] : throw FormatException('Missing required property')),
1051+ windfirm: (json.containsKey("windfirm") ? json["windfirm"] : throw FormatException('Missing required property')),
1052+ );
1053+
1054+ Map<String, dynamic> toJson() => {
1055+ "bockerel": bockerel,
1056+ "boulder": boulder,
1057+ "churrus": churrus,
1058+ "counterdigged": counterdigged,
1059+ "dialogite": dialogite,
1060+ "digenic": digenic,
1061+ "dunbird": dunbird,
1062+ "ergatogyne": ergatogyne,
1063+ "fiendful": fiendful,
1064+ "jackrod": jackrod,
1065+ "Jehovistic": jehovistic,
1066+ "Paninean": paninean,
1067+ "panther": panther,
1068+ "placentigerous": placentigerous,
1069+ "Romney": romney,
1070+ "sparm": sparm,
1071+ "tocsin": tocsin,
1072+ "unnicked": unnicked,
1073+ "unstavable": unstavable,
1074+ "windfirm": windfirm,
1075+ };
1076+}
1077+
1078+class DiaereseClass {
1079+ final dynamic amoreuxia;
1080+ final dynamic ani;
1081+ final dynamic bernicle;
1082+ final dynamic blackwasher;
1083+ final dynamic blowhard;
1084+ final dynamic broma;
1085+ final dynamic closecross;
1086+ final dynamic congregationalism;
1087+ final dynamic grayly;
1088+ final dynamic historically;
1089+ final dynamic hoast;
1090+ final dynamic irretentive;
1091+ final dynamic parcener;
1092+ final dynamic pedder;
1093+ final dynamic pseudoanatomic;
1094+ final dynamic rhizocarpian;
1095+ final dynamic samel;
1096+ final dynamic silker;
1097+ final dynamic subdentated;
1098+ final dynamic subobscure;
1099+
1100+ DiaereseClass({
1101+ required this.amoreuxia,
1102+ required this.ani,
1103+ required this.bernicle,
1104+ required this.blackwasher,
1105+ required this.blowhard,
1106+ required this.broma,
1107+ required this.closecross,
1108+ required this.congregationalism,
1109+ required this.grayly,
1110+ required this.historically,
1111+ required this.hoast,
1112+ required this.irretentive,
1113+ required this.parcener,
1114+ required this.pedder,
1115+ required this.pseudoanatomic,
1116+ required this.rhizocarpian,
1117+ required this.samel,
1118+ required this.silker,
1119+ required this.subdentated,
1120+ required this.subobscure,
1121+ });
1122+
1123+ DiaereseClass copyWith({
1124+ dynamic amoreuxia,
1125+ dynamic ani,
1126+ dynamic bernicle,
1127+ dynamic blackwasher,
1128+ dynamic blowhard,
1129+ dynamic broma,
1130+ dynamic closecross,
1131+ dynamic congregationalism,
1132+ dynamic grayly,
1133+ dynamic historically,
1134+ dynamic hoast,
1135+ dynamic irretentive,
1136+ dynamic parcener,
1137+ dynamic pedder,
1138+ dynamic pseudoanatomic,
1139+ dynamic rhizocarpian,
1140+ dynamic samel,
1141+ dynamic silker,
1142+ dynamic subdentated,
1143+ dynamic subobscure,
1144+ }) =>
1145+ DiaereseClass(
1146+ amoreuxia: amoreuxia ?? this.amoreuxia,
1147+ ani: ani ?? this.ani,
1148+ bernicle: bernicle ?? this.bernicle,
1149+ blackwasher: blackwasher ?? this.blackwasher,
1150+ blowhard: blowhard ?? this.blowhard,
1151+ broma: broma ?? this.broma,
1152+ closecross: closecross ?? this.closecross,
1153+ congregationalism: congregationalism ?? this.congregationalism,
1154+ grayly: grayly ?? this.grayly,
1155+ historically: historically ?? this.historically,
1156+ hoast: hoast ?? this.hoast,
1157+ irretentive: irretentive ?? this.irretentive,
1158+ parcener: parcener ?? this.parcener,
1159+ pedder: pedder ?? this.pedder,
1160+ pseudoanatomic: pseudoanatomic ?? this.pseudoanatomic,
1161+ rhizocarpian: rhizocarpian ?? this.rhizocarpian,
1162+ samel: samel ?? this.samel,
1163+ silker: silker ?? this.silker,
1164+ subdentated: subdentated ?? this.subdentated,
1165+ subobscure: subobscure ?? this.subobscure,
1166+ );
1167+
1168+ factory DiaereseClass.fromJson(Map<String, dynamic> json) => DiaereseClass(
1169+ amoreuxia: (json.containsKey("Amoreuxia") ? json["Amoreuxia"] : throw FormatException('Missing required property')),
1170+ ani: (json.containsKey("ani") ? json["ani"] : throw FormatException('Missing required property')),
1171+ bernicle: (json.containsKey("bernicle") ? json["bernicle"] : throw FormatException('Missing required property')),
1172+ blackwasher: (json.containsKey("blackwasher") ? json["blackwasher"] : throw FormatException('Missing required property')),
1173+ blowhard: (json.containsKey("blowhard") ? json["blowhard"] : throw FormatException('Missing required property')),
1174+ broma: (json.containsKey("broma") ? json["broma"] : throw FormatException('Missing required property')),
1175+ closecross: (json.containsKey("closecross") ? json["closecross"] : throw FormatException('Missing required property')),
1176+ congregationalism: (json.containsKey("congregationalism") ? json["congregationalism"] : throw FormatException('Missing required property')),
1177+ grayly: (json.containsKey("grayly") ? json["grayly"] : throw FormatException('Missing required property')),
1178+ historically: (json.containsKey("historically") ? json["historically"] : throw FormatException('Missing required property')),
1179+ hoast: (json.containsKey("hoast") ? json["hoast"] : throw FormatException('Missing required property')),
1180+ irretentive: (json.containsKey("irretentive") ? json["irretentive"] : throw FormatException('Missing required property')),
1181+ parcener: (json.containsKey("parcener") ? json["parcener"] : throw FormatException('Missing required property')),
1182+ pedder: (json.containsKey("pedder") ? json["pedder"] : throw FormatException('Missing required property')),
1183+ pseudoanatomic: (json.containsKey("pseudoanatomic") ? json["pseudoanatomic"] : throw FormatException('Missing required property')),
1184+ rhizocarpian: (json.containsKey("rhizocarpian") ? json["rhizocarpian"] : throw FormatException('Missing required property')),
1185+ samel: (json.containsKey("samel") ? json["samel"] : throw FormatException('Missing required property')),
1186+ silker: (json.containsKey("silker") ? json["silker"] : throw FormatException('Missing required property')),
1187+ subdentated: (json.containsKey("subdentated") ? json["subdentated"] : throw FormatException('Missing required property')),
1188+ subobscure: (json.containsKey("subobscure") ? json["subobscure"] : throw FormatException('Missing required property')),
1189+ );
1190+
1191+ Map<String, dynamic> toJson() => {
1192+ "Amoreuxia": amoreuxia,
1193+ "ani": ani,
1194+ "bernicle": bernicle,
1195+ "blackwasher": blackwasher,
1196+ "blowhard": blowhard,
1197+ "broma": broma,
1198+ "closecross": closecross,
1199+ "congregationalism": congregationalism,
1200+ "grayly": grayly,
1201+ "historically": historically,
1202+ "hoast": hoast,
1203+ "irretentive": irretentive,
1204+ "parcener": parcener,
1205+ "pedder": pedder,
1206+ "pseudoanatomic": pseudoanatomic,
1207+ "rhizocarpian": rhizocarpian,
1208+ "samel": samel,
1209+ "silker": silker,
1210+ "subdentated": subdentated,
1211+ "subobscure": subobscure,
1212+ };
1213+}
1214+
1215+class Encrust {
1216+ final dynamic comradely;
1217+ final dynamic diacanthous;
1218+ final dynamic feminineness;
1219+ final dynamic gossamered;
1220+ final dynamic hibernia;
1221+ final dynamic hibiscus;
1222+ final dynamic lepidosauria;
1223+ final dynamic lollingly;
1224+ final dynamic manager;
1225+ final dynamic mechanic;
1226+ final dynamic overminuteness;
1227+ final dynamic papelonne;
1228+ final dynamic plebification;
1229+ final dynamic pugmiller;
1230+ final dynamic recoveror;
1231+ final dynamic spermatoblastic;
1232+ final dynamic syllidae;
1233+ final dynamic ungyved;
1234+ final dynamic whirlabout;
1235+ final dynamic woodenware;
1236+
1237+ Encrust({
1238+ required this.comradely,
1239+ required this.diacanthous,
1240+ required this.feminineness,
1241+ required this.gossamered,
1242+ required this.hibernia,
1243+ required this.hibiscus,
1244+ required this.lepidosauria,
1245+ required this.lollingly,
1246+ required this.manager,
1247+ required this.mechanic,
1248+ required this.overminuteness,
1249+ required this.papelonne,
1250+ required this.plebification,
1251+ required this.pugmiller,
1252+ required this.recoveror,
1253+ required this.spermatoblastic,
1254+ required this.syllidae,
1255+ required this.ungyved,
1256+ required this.whirlabout,
1257+ required this.woodenware,
1258+ });
1259+
1260+ Encrust copyWith({
1261+ dynamic comradely,
1262+ dynamic diacanthous,
1263+ dynamic feminineness,
1264+ dynamic gossamered,
1265+ dynamic hibernia,
1266+ dynamic hibiscus,
1267+ dynamic lepidosauria,
1268+ dynamic lollingly,
1269+ dynamic manager,
1270+ dynamic mechanic,
1271+ dynamic overminuteness,
1272+ dynamic papelonne,
1273+ dynamic plebification,
1274+ dynamic pugmiller,
1275+ dynamic recoveror,
1276+ dynamic spermatoblastic,
1277+ dynamic syllidae,
1278+ dynamic ungyved,
1279+ dynamic whirlabout,
1280+ dynamic woodenware,
1281+ }) =>
1282+ Encrust(
1283+ comradely: comradely ?? this.comradely,
1284+ diacanthous: diacanthous ?? this.diacanthous,
1285+ feminineness: feminineness ?? this.feminineness,
1286+ gossamered: gossamered ?? this.gossamered,
1287+ hibernia: hibernia ?? this.hibernia,
1288+ hibiscus: hibiscus ?? this.hibiscus,
1289+ lepidosauria: lepidosauria ?? this.lepidosauria,
1290+ lollingly: lollingly ?? this.lollingly,
1291+ manager: manager ?? this.manager,
1292+ mechanic: mechanic ?? this.mechanic,
1293+ overminuteness: overminuteness ?? this.overminuteness,
1294+ papelonne: papelonne ?? this.papelonne,
1295+ plebification: plebification ?? this.plebification,
1296+ pugmiller: pugmiller ?? this.pugmiller,
1297+ recoveror: recoveror ?? this.recoveror,
1298+ spermatoblastic: spermatoblastic ?? this.spermatoblastic,
1299+ syllidae: syllidae ?? this.syllidae,
1300+ ungyved: ungyved ?? this.ungyved,
1301+ whirlabout: whirlabout ?? this.whirlabout,
1302+ woodenware: woodenware ?? this.woodenware,
1303+ );
1304+
1305+ factory Encrust.fromJson(Map<String, dynamic> json) => Encrust(
1306+ comradely: (json.containsKey("comradely") ? json["comradely"] : throw FormatException('Missing required property')),
1307+ diacanthous: (json.containsKey("diacanthous") ? json["diacanthous"] : throw FormatException('Missing required property')),
1308+ feminineness: (json.containsKey("feminineness") ? json["feminineness"] : throw FormatException('Missing required property')),
1309+ gossamered: (json.containsKey("gossamered") ? json["gossamered"] : throw FormatException('Missing required property')),
1310+ hibernia: (json.containsKey("Hibernia") ? json["Hibernia"] : throw FormatException('Missing required property')),
1311+ hibiscus: (json.containsKey("Hibiscus") ? json["Hibiscus"] : throw FormatException('Missing required property')),
1312+ lepidosauria: (json.containsKey("Lepidosauria") ? json["Lepidosauria"] : throw FormatException('Missing required property')),
1313+ lollingly: (json.containsKey("lollingly") ? json["lollingly"] : throw FormatException('Missing required property')),
1314+ manager: (json.containsKey("manager") ? json["manager"] : throw FormatException('Missing required property')),
1315+ mechanic: (json.containsKey("mechanic") ? json["mechanic"] : throw FormatException('Missing required property')),
1316+ overminuteness: (json.containsKey("overminuteness") ? json["overminuteness"] : throw FormatException('Missing required property')),
1317+ papelonne: (json.containsKey("papelonne") ? json["papelonne"] : throw FormatException('Missing required property')),
1318+ plebification: (json.containsKey("plebification") ? json["plebification"] : throw FormatException('Missing required property')),
1319+ pugmiller: (json.containsKey("pugmiller") ? json["pugmiller"] : throw FormatException('Missing required property')),
1320+ recoveror: (json.containsKey("recoveror") ? json["recoveror"] : throw FormatException('Missing required property')),
1321+ spermatoblastic: (json.containsKey("spermatoblastic") ? json["spermatoblastic"] : throw FormatException('Missing required property')),
1322+ syllidae: (json.containsKey("Syllidae") ? json["Syllidae"] : throw FormatException('Missing required property')),
1323+ ungyved: (json.containsKey("ungyved") ? json["ungyved"] : throw FormatException('Missing required property')),
1324+ whirlabout: (json.containsKey("whirlabout") ? json["whirlabout"] : throw FormatException('Missing required property')),
1325+ woodenware: (json.containsKey("woodenware") ? json["woodenware"] : throw FormatException('Missing required property')),
1326+ );
1327+
1328+ Map<String, dynamic> toJson() => {
1329+ "comradely": comradely,
1330+ "diacanthous": diacanthous,
1331+ "feminineness": feminineness,
1332+ "gossamered": gossamered,
1333+ "Hibernia": hibernia,
1334+ "Hibiscus": hibiscus,
1335+ "Lepidosauria": lepidosauria,
1336+ "lollingly": lollingly,
1337+ "manager": manager,
1338+ "mechanic": mechanic,
1339+ "overminuteness": overminuteness,
1340+ "papelonne": papelonne,
1341+ "plebification": plebification,
1342+ "pugmiller": pugmiller,
1343+ "recoveror": recoveror,
1344+ "spermatoblastic": spermatoblastic,
1345+ "Syllidae": syllidae,
1346+ "ungyved": ungyved,
1347+ "whirlabout": whirlabout,
1348+ "woodenware": woodenware,
1349+ };
1350+}
1351+
1352+class FagginglyClass {
1353+ final dynamic abranchian;
1354+ final dynamic aculeiform;
1355+ final dynamic adiaphoristic;
1356+ final dynamic adoptionism;
1357+ final dynamic anglic;
1358+ final dynamic antrotomy;
1359+ final dynamic coerciveness;
1360+ final dynamic decorist;
1361+ final dynamic duckhood;
1362+ final dynamic heteromeri;
1363+ final dynamic hypochnose;
1364+ final dynamic lochage;
1365+ final dynamic melee;
1366+ final dynamic nonconformitant;
1367+ final dynamic poinsettia;
1368+ final dynamic putatively;
1369+ final dynamic semivolatile;
1370+ final dynamic soleas;
1371+ final dynamic unfastenable;
1372+ final dynamic unmillinered;
1373+
1374+ FagginglyClass({
1375+ required this.abranchian,
1376+ required this.aculeiform,
1377+ required this.adiaphoristic,
1378+ required this.adoptionism,
1379+ required this.anglic,
1380+ required this.antrotomy,
1381+ required this.coerciveness,
1382+ required this.decorist,
1383+ required this.duckhood,
1384+ required this.heteromeri,
1385+ required this.hypochnose,
1386+ required this.lochage,
1387+ required this.melee,
1388+ required this.nonconformitant,
1389+ required this.poinsettia,
1390+ required this.putatively,
1391+ required this.semivolatile,
1392+ required this.soleas,
1393+ required this.unfastenable,
1394+ required this.unmillinered,
1395+ });
1396+
1397+ FagginglyClass copyWith({
1398+ dynamic abranchian,
1399+ dynamic aculeiform,
1400+ dynamic adiaphoristic,
1401+ dynamic adoptionism,
1402+ dynamic anglic,
1403+ dynamic antrotomy,
1404+ dynamic coerciveness,
1405+ dynamic decorist,
1406+ dynamic duckhood,
1407+ dynamic heteromeri,
1408+ dynamic hypochnose,
1409+ dynamic lochage,
1410+ dynamic melee,
1411+ dynamic nonconformitant,
1412+ dynamic poinsettia,
1413+ dynamic putatively,
1414+ dynamic semivolatile,
1415+ dynamic soleas,
1416+ dynamic unfastenable,
1417+ dynamic unmillinered,
1418+ }) =>
1419+ FagginglyClass(
1420+ abranchian: abranchian ?? this.abranchian,
1421+ aculeiform: aculeiform ?? this.aculeiform,
1422+ adiaphoristic: adiaphoristic ?? this.adiaphoristic,
1423+ adoptionism: adoptionism ?? this.adoptionism,
1424+ anglic: anglic ?? this.anglic,
1425+ antrotomy: antrotomy ?? this.antrotomy,
1426+ coerciveness: coerciveness ?? this.coerciveness,
1427+ decorist: decorist ?? this.decorist,
1428+ duckhood: duckhood ?? this.duckhood,
1429+ heteromeri: heteromeri ?? this.heteromeri,
1430+ hypochnose: hypochnose ?? this.hypochnose,
1431+ lochage: lochage ?? this.lochage,
1432+ melee: melee ?? this.melee,
1433+ nonconformitant: nonconformitant ?? this.nonconformitant,
1434+ poinsettia: poinsettia ?? this.poinsettia,
1435+ putatively: putatively ?? this.putatively,
1436+ semivolatile: semivolatile ?? this.semivolatile,
1437+ soleas: soleas ?? this.soleas,
1438+ unfastenable: unfastenable ?? this.unfastenable,
1439+ unmillinered: unmillinered ?? this.unmillinered,
1440+ );
1441+
1442+ factory FagginglyClass.fromJson(Map<String, dynamic> json) => FagginglyClass(
1443+ abranchian: (json.containsKey("abranchian") ? json["abranchian"] : throw FormatException('Missing required property')),
1444+ aculeiform: (json.containsKey("aculeiform") ? json["aculeiform"] : throw FormatException('Missing required property')),
1445+ adiaphoristic: (json.containsKey("adiaphoristic") ? json["adiaphoristic"] : throw FormatException('Missing required property')),
1446+ adoptionism: (json.containsKey("adoptionism") ? json["adoptionism"] : throw FormatException('Missing required property')),
1447+ anglic: (json.containsKey("Anglic") ? json["Anglic"] : throw FormatException('Missing required property')),
1448+ antrotomy: (json.containsKey("antrotomy") ? json["antrotomy"] : throw FormatException('Missing required property')),
1449+ coerciveness: (json.containsKey("coerciveness") ? json["coerciveness"] : throw FormatException('Missing required property')),
1450+ decorist: (json.containsKey("decorist") ? json["decorist"] : throw FormatException('Missing required property')),
1451+ duckhood: (json.containsKey("duckhood") ? json["duckhood"] : throw FormatException('Missing required property')),
1452+ heteromeri: (json.containsKey("Heteromeri") ? json["Heteromeri"] : throw FormatException('Missing required property')),
1453+ hypochnose: (json.containsKey("hypochnose") ? json["hypochnose"] : throw FormatException('Missing required property')),
1454+ lochage: (json.containsKey("lochage") ? json["lochage"] : throw FormatException('Missing required property')),
1455+ melee: (json.containsKey("melee") ? json["melee"] : throw FormatException('Missing required property')),
1456+ nonconformitant: (json.containsKey("nonconformitant") ? json["nonconformitant"] : throw FormatException('Missing required property')),
1457+ poinsettia: (json.containsKey("Poinsettia") ? json["Poinsettia"] : throw FormatException('Missing required property')),
1458+ putatively: (json.containsKey("putatively") ? json["putatively"] : throw FormatException('Missing required property')),
1459+ semivolatile: (json.containsKey("semivolatile") ? json["semivolatile"] : throw FormatException('Missing required property')),
1460+ soleas: (json.containsKey("soleas") ? json["soleas"] : throw FormatException('Missing required property')),
1461+ unfastenable: (json.containsKey("unfastenable") ? json["unfastenable"] : throw FormatException('Missing required property')),
1462+ unmillinered: (json.containsKey("unmillinered") ? json["unmillinered"] : throw FormatException('Missing required property')),
1463+ );
1464+
1465+ Map<String, dynamic> toJson() => {
1466+ "abranchian": abranchian,
1467+ "aculeiform": aculeiform,
1468+ "adiaphoristic": adiaphoristic,
1469+ "adoptionism": adoptionism,
1470+ "Anglic": anglic,
1471+ "antrotomy": antrotomy,
1472+ "coerciveness": coerciveness,
1473+ "decorist": decorist,
1474+ "duckhood": duckhood,
1475+ "Heteromeri": heteromeri,
1476+ "hypochnose": hypochnose,
1477+ "lochage": lochage,
1478+ "melee": melee,
1479+ "nonconformitant": nonconformitant,
1480+ "Poinsettia": poinsettia,
1481+ "putatively": putatively,
1482+ "semivolatile": semivolatile,
1483+ "soleas": soleas,
1484+ "unfastenable": unfastenable,
1485+ "unmillinered": unmillinered,
1486+ };
1487+}
1488+
1489+class FenkClass {
1490+ final dynamic apoise;
1491+ final dynamic astronomize;
1492+ final dynamic cockhorse;
1493+ final dynamic copular;
1494+ final dynamic dagomba;
1495+ final dynamic draffy;
1496+ final dynamic foreigner;
1497+ final dynamic guyandot;
1498+ final dynamic neurogliosis;
1499+ final dynamic osmious;
1500+ final dynamic palpitate;
1501+ final dynamic rebukeable;
1502+ final dynamic reinwardtia;
1503+ final dynamic reservatory;
1504+ final dynamic scalt;
1505+ final dynamic scripturalize;
1506+ final dynamic tintometer;
1507+ final dynamic tritoness;
1508+ final dynamic undergrade;
1509+ final dynamic undermountain;
1510+
1511+ FenkClass({
1512+ required this.apoise,
1513+ required this.astronomize,
1514+ required this.cockhorse,
1515+ required this.copular,
1516+ required this.dagomba,
1517+ required this.draffy,
1518+ required this.foreigner,
1519+ required this.guyandot,
1520+ required this.neurogliosis,
1521+ required this.osmious,
1522+ required this.palpitate,
1523+ required this.rebukeable,
1524+ required this.reinwardtia,
1525+ required this.reservatory,
1526+ required this.scalt,
1527+ required this.scripturalize,
1528+ required this.tintometer,
1529+ required this.tritoness,
1530+ required this.undergrade,
1531+ required this.undermountain,
1532+ });
1533+
1534+ FenkClass copyWith({
1535+ dynamic apoise,
1536+ dynamic astronomize,
1537+ dynamic cockhorse,
1538+ dynamic copular,
1539+ dynamic dagomba,
1540+ dynamic draffy,
1541+ dynamic foreigner,
1542+ dynamic guyandot,
1543+ dynamic neurogliosis,
1544+ dynamic osmious,
1545+ dynamic palpitate,
1546+ dynamic rebukeable,
1547+ dynamic reinwardtia,
1548+ dynamic reservatory,
1549+ dynamic scalt,
1550+ dynamic scripturalize,
1551+ dynamic tintometer,
1552+ dynamic tritoness,
1553+ dynamic undergrade,
1554+ dynamic undermountain,
1555+ }) =>
1556+ FenkClass(
1557+ apoise: apoise ?? this.apoise,
1558+ astronomize: astronomize ?? this.astronomize,
1559+ cockhorse: cockhorse ?? this.cockhorse,
1560+ copular: copular ?? this.copular,
1561+ dagomba: dagomba ?? this.dagomba,
1562+ draffy: draffy ?? this.draffy,
1563+ foreigner: foreigner ?? this.foreigner,
1564+ guyandot: guyandot ?? this.guyandot,
1565+ neurogliosis: neurogliosis ?? this.neurogliosis,
1566+ osmious: osmious ?? this.osmious,
1567+ palpitate: palpitate ?? this.palpitate,
1568+ rebukeable: rebukeable ?? this.rebukeable,
1569+ reinwardtia: reinwardtia ?? this.reinwardtia,
1570+ reservatory: reservatory ?? this.reservatory,
1571+ scalt: scalt ?? this.scalt,
1572+ scripturalize: scripturalize ?? this.scripturalize,
1573+ tintometer: tintometer ?? this.tintometer,
1574+ tritoness: tritoness ?? this.tritoness,
1575+ undergrade: undergrade ?? this.undergrade,
1576+ undermountain: undermountain ?? this.undermountain,
1577+ );
1578+
1579+ factory FenkClass.fromJson(Map<String, dynamic> json) => FenkClass(
1580+ apoise: (json.containsKey("apoise") ? json["apoise"] : throw FormatException('Missing required property')),
1581+ astronomize: (json.containsKey("astronomize") ? json["astronomize"] : throw FormatException('Missing required property')),
1582+ cockhorse: (json.containsKey("cockhorse") ? json["cockhorse"] : throw FormatException('Missing required property')),
1583+ copular: (json.containsKey("copular") ? json["copular"] : throw FormatException('Missing required property')),
1584+ dagomba: (json.containsKey("Dagomba") ? json["Dagomba"] : throw FormatException('Missing required property')),
1585+ draffy: (json.containsKey("draffy") ? json["draffy"] : throw FormatException('Missing required property')),
1586+ foreigner: (json.containsKey("foreigner") ? json["foreigner"] : throw FormatException('Missing required property')),
1587+ guyandot: (json.containsKey("Guyandot") ? json["Guyandot"] : throw FormatException('Missing required property')),
1588+ neurogliosis: (json.containsKey("neurogliosis") ? json["neurogliosis"] : throw FormatException('Missing required property')),
1589+ osmious: (json.containsKey("osmious") ? json["osmious"] : throw FormatException('Missing required property')),
1590+ palpitate: (json.containsKey("palpitate") ? json["palpitate"] : throw FormatException('Missing required property')),
1591+ rebukeable: (json.containsKey("rebukeable") ? json["rebukeable"] : throw FormatException('Missing required property')),
1592+ reinwardtia: (json.containsKey("Reinwardtia") ? json["Reinwardtia"] : throw FormatException('Missing required property')),
1593+ reservatory: (json.containsKey("reservatory") ? json["reservatory"] : throw FormatException('Missing required property')),
1594+ scalt: (json.containsKey("scalt") ? json["scalt"] : throw FormatException('Missing required property')),
1595+ scripturalize: (json.containsKey("scripturalize") ? json["scripturalize"] : throw FormatException('Missing required property')),
1596+ tintometer: (json.containsKey("tintometer") ? json["tintometer"] : throw FormatException('Missing required property')),
1597+ tritoness: (json.containsKey("Tritoness") ? json["Tritoness"] : throw FormatException('Missing required property')),
1598+ undergrade: (json.containsKey("undergrade") ? json["undergrade"] : throw FormatException('Missing required property')),
1599+ undermountain: (json.containsKey("undermountain") ? json["undermountain"] : throw FormatException('Missing required property')),
1600+ );
1601+
1602+ Map<String, dynamic> toJson() => {
1603+ "apoise": apoise,
1604+ "astronomize": astronomize,
1605+ "cockhorse": cockhorse,
1606+ "copular": copular,
1607+ "Dagomba": dagomba,
1608+ "draffy": draffy,
1609+ "foreigner": foreigner,
1610+ "Guyandot": guyandot,
1611+ "neurogliosis": neurogliosis,
1612+ "osmious": osmious,
1613+ "palpitate": palpitate,
1614+ "rebukeable": rebukeable,
1615+ "Reinwardtia": reinwardtia,
1616+ "reservatory": reservatory,
1617+ "scalt": scalt,
1618+ "scripturalize": scripturalize,
1619+ "tintometer": tintometer,
1620+ "Tritoness": tritoness,
1621+ "undergrade": undergrade,
1622+ "undermountain": undermountain,
1623+ };
1624+}
1625+
1626+class FlagmakingClass {
1627+ final dynamic albarco;
1628+ final dynamic bunodonta;
1629+ final dynamic hornify;
1630+ final dynamic hydrocorisae;
1631+ final dynamic hypoglossus;
1632+ final dynamic inexpiably;
1633+ final dynamic ingratitude;
1634+ final dynamic ladyfly;
1635+ final dynamic medicament;
1636+ final dynamic monogrammatic;
1637+ final dynamic nobbut;
1638+ final dynamic notacanthidae;
1639+ final dynamic polyplacophore;
1640+ final dynamic proexercise;
1641+ final dynamic protoplast;
1642+ final dynamic puzzling;
1643+ final dynamic splanchnoskeleton;
1644+ final dynamic unloveliness;
1645+ final dynamic unquarantined;
1646+ final dynamic unrenounceable;
1647+
1648+ FlagmakingClass({
1649+ required this.albarco,
1650+ required this.bunodonta,
1651+ required this.hornify,
1652+ required this.hydrocorisae,
1653+ required this.hypoglossus,
1654+ required this.inexpiably,
1655+ required this.ingratitude,
1656+ required this.ladyfly,
1657+ required this.medicament,
1658+ required this.monogrammatic,
1659+ required this.nobbut,
1660+ required this.notacanthidae,
1661+ required this.polyplacophore,
1662+ required this.proexercise,
1663+ required this.protoplast,
1664+ required this.puzzling,
1665+ required this.splanchnoskeleton,
1666+ required this.unloveliness,
1667+ required this.unquarantined,
1668+ required this.unrenounceable,
1669+ });
1670+
1671+ FlagmakingClass copyWith({
1672+ dynamic albarco,
1673+ dynamic bunodonta,
1674+ dynamic hornify,
1675+ dynamic hydrocorisae,
1676+ dynamic hypoglossus,
1677+ dynamic inexpiably,
1678+ dynamic ingratitude,
1679+ dynamic ladyfly,
1680+ dynamic medicament,
1681+ dynamic monogrammatic,
1682+ dynamic nobbut,
1683+ dynamic notacanthidae,
1684+ dynamic polyplacophore,
1685+ dynamic proexercise,
1686+ dynamic protoplast,
1687+ dynamic puzzling,
1688+ dynamic splanchnoskeleton,
1689+ dynamic unloveliness,
1690+ dynamic unquarantined,
1691+ dynamic unrenounceable,
1692+ }) =>
1693+ FlagmakingClass(
1694+ albarco: albarco ?? this.albarco,
1695+ bunodonta: bunodonta ?? this.bunodonta,
1696+ hornify: hornify ?? this.hornify,
1697+ hydrocorisae: hydrocorisae ?? this.hydrocorisae,
1698+ hypoglossus: hypoglossus ?? this.hypoglossus,
1699+ inexpiably: inexpiably ?? this.inexpiably,
1700+ ingratitude: ingratitude ?? this.ingratitude,
1701+ ladyfly: ladyfly ?? this.ladyfly,
1702+ medicament: medicament ?? this.medicament,
1703+ monogrammatic: monogrammatic ?? this.monogrammatic,
1704+ nobbut: nobbut ?? this.nobbut,
1705+ notacanthidae: notacanthidae ?? this.notacanthidae,
1706+ polyplacophore: polyplacophore ?? this.polyplacophore,
1707+ proexercise: proexercise ?? this.proexercise,
1708+ protoplast: protoplast ?? this.protoplast,
1709+ puzzling: puzzling ?? this.puzzling,
1710+ splanchnoskeleton: splanchnoskeleton ?? this.splanchnoskeleton,
1711+ unloveliness: unloveliness ?? this.unloveliness,
1712+ unquarantined: unquarantined ?? this.unquarantined,
1713+ unrenounceable: unrenounceable ?? this.unrenounceable,
1714+ );
1715+
1716+ factory FlagmakingClass.fromJson(Map<String, dynamic> json) => FlagmakingClass(
1717+ albarco: (json.containsKey("albarco") ? json["albarco"] : throw FormatException('Missing required property')),
1718+ bunodonta: (json.containsKey("Bunodonta") ? json["Bunodonta"] : throw FormatException('Missing required property')),
1719+ hornify: (json.containsKey("hornify") ? json["hornify"] : throw FormatException('Missing required property')),
1720+ hydrocorisae: (json.containsKey("Hydrocorisae") ? json["Hydrocorisae"] : throw FormatException('Missing required property')),
1721+ hypoglossus: (json.containsKey("hypoglossus") ? json["hypoglossus"] : throw FormatException('Missing required property')),
1722+ inexpiably: (json.containsKey("inexpiably") ? json["inexpiably"] : throw FormatException('Missing required property')),
1723+ ingratitude: (json.containsKey("ingratitude") ? json["ingratitude"] : throw FormatException('Missing required property')),
1724+ ladyfly: (json.containsKey("ladyfly") ? json["ladyfly"] : throw FormatException('Missing required property')),
1725+ medicament: (json.containsKey("medicament") ? json["medicament"] : throw FormatException('Missing required property')),
1726+ monogrammatic: (json.containsKey("monogrammatic") ? json["monogrammatic"] : throw FormatException('Missing required property')),
1727+ nobbut: (json.containsKey("nobbut") ? json["nobbut"] : throw FormatException('Missing required property')),
1728+ notacanthidae: (json.containsKey("Notacanthidae") ? json["Notacanthidae"] : throw FormatException('Missing required property')),
1729+ polyplacophore: (json.containsKey("polyplacophore") ? json["polyplacophore"] : throw FormatException('Missing required property')),
1730+ proexercise: (json.containsKey("proexercise") ? json["proexercise"] : throw FormatException('Missing required property')),
1731+ protoplast: (json.containsKey("protoplast") ? json["protoplast"] : throw FormatException('Missing required property')),
1732+ puzzling: (json.containsKey("puzzling") ? json["puzzling"] : throw FormatException('Missing required property')),
1733+ splanchnoskeleton: (json.containsKey("splanchnoskeleton") ? json["splanchnoskeleton"] : throw FormatException('Missing required property')),
1734+ unloveliness: (json.containsKey("unloveliness") ? json["unloveliness"] : throw FormatException('Missing required property')),
1735+ unquarantined: (json.containsKey("unquarantined") ? json["unquarantined"] : throw FormatException('Missing required property')),
1736+ unrenounceable: (json.containsKey("unrenounceable") ? json["unrenounceable"] : throw FormatException('Missing required property')),
1737+ );
1738+
1739+ Map<String, dynamic> toJson() => {
1740+ "albarco": albarco,
1741+ "Bunodonta": bunodonta,
1742+ "hornify": hornify,
1743+ "Hydrocorisae": hydrocorisae,
1744+ "hypoglossus": hypoglossus,
1745+ "inexpiably": inexpiably,
1746+ "ingratitude": ingratitude,
1747+ "ladyfly": ladyfly,
1748+ "medicament": medicament,
1749+ "monogrammatic": monogrammatic,
1750+ "nobbut": nobbut,
1751+ "Notacanthidae": notacanthidae,
1752+ "polyplacophore": polyplacophore,
1753+ "proexercise": proexercise,
1754+ "protoplast": protoplast,
1755+ "puzzling": puzzling,
1756+ "splanchnoskeleton": splanchnoskeleton,
1757+ "unloveliness": unloveliness,
1758+ "unquarantined": unquarantined,
1759+ "unrenounceable": unrenounceable,
1760+ };
1761+}
1762+
1763+class HemocoeleClass {
1764+ final dynamic acrogamy;
1765+ final dynamic amelification;
1766+ final dynamic autobiographic;
1767+ final dynamic berat;
1768+ final double? catharticalness;
1769+ final int? chirotherium;
1770+ final String? disdiapason;
1771+ final dynamic disproportionably;
1772+ final dynamic erythrite;
1773+ final dynamic graphic;
1774+ final dynamic hepatological;
1775+ final bool? homocerc;
1776+ final dynamic incommensurably;
1777+ final dynamic misaffirm;
1778+ final dynamic nonbookish;
1779+ final dynamic pocketbook;
1780+ final dynamic sclerometric;
1781+ final dynamic stambouline;
1782+ final dynamic stickpin;
1783+ final dynamic tubulure;
1784+ final dynamic undelated;
1785+ final dynamic unsalt;
1786+ final dynamic untutelar;
1787+ final dynamic vagrant;
1788+ final dynamic walt;
1789+
1790+ HemocoeleClass({
1791+ this.acrogamy,
1792+ this.amelification,
1793+ this.autobiographic,
1794+ this.berat,
1795+ this.catharticalness,
1796+ this.chirotherium,
1797+ this.disdiapason,
1798+ this.disproportionably,
1799+ this.erythrite,
1800+ this.graphic,
1801+ this.hepatological,
1802+ this.homocerc,
1803+ this.incommensurably,
1804+ this.misaffirm,
1805+ this.nonbookish,
1806+ this.pocketbook,
1807+ this.sclerometric,
1808+ this.stambouline,
1809+ this.stickpin,
1810+ this.tubulure,
1811+ this.undelated,
1812+ this.unsalt,
1813+ this.untutelar,
1814+ this.vagrant,
1815+ this.walt,
1816+ });
1817+
1818+ HemocoeleClass copyWith({
1819+ dynamic acrogamy,
1820+ dynamic amelification,
1821+ dynamic autobiographic,
1822+ dynamic berat,
1823+ double? catharticalness,
1824+ int? chirotherium,
1825+ String? disdiapason,
1826+ dynamic disproportionably,
1827+ dynamic erythrite,
1828+ dynamic graphic,
1829+ dynamic hepatological,
1830+ bool? homocerc,
1831+ dynamic incommensurably,
1832+ dynamic misaffirm,
1833+ dynamic nonbookish,
1834+ dynamic pocketbook,
1835+ dynamic sclerometric,
1836+ dynamic stambouline,
1837+ dynamic stickpin,
1838+ dynamic tubulure,
1839+ dynamic undelated,
1840+ dynamic unsalt,
1841+ dynamic untutelar,
1842+ dynamic vagrant,
1843+ dynamic walt,
1844+ }) =>
1845+ HemocoeleClass(
1846+ acrogamy: acrogamy ?? this.acrogamy,
1847+ amelification: amelification ?? this.amelification,
1848+ autobiographic: autobiographic ?? this.autobiographic,
1849+ berat: berat ?? this.berat,
1850+ catharticalness: catharticalness ?? this.catharticalness,
1851+ chirotherium: chirotherium ?? this.chirotherium,
1852+ disdiapason: disdiapason ?? this.disdiapason,
1853+ disproportionably: disproportionably ?? this.disproportionably,
1854+ erythrite: erythrite ?? this.erythrite,
1855+ graphic: graphic ?? this.graphic,
1856+ hepatological: hepatological ?? this.hepatological,
1857+ homocerc: homocerc ?? this.homocerc,
1858+ incommensurably: incommensurably ?? this.incommensurably,
1859+ misaffirm: misaffirm ?? this.misaffirm,
1860+ nonbookish: nonbookish ?? this.nonbookish,
1861+ pocketbook: pocketbook ?? this.pocketbook,
1862+ sclerometric: sclerometric ?? this.sclerometric,
1863+ stambouline: stambouline ?? this.stambouline,
1864+ stickpin: stickpin ?? this.stickpin,
1865+ tubulure: tubulure ?? this.tubulure,
1866+ undelated: undelated ?? this.undelated,
1867+ unsalt: unsalt ?? this.unsalt,
1868+ untutelar: untutelar ?? this.untutelar,
1869+ vagrant: vagrant ?? this.vagrant,
1870+ walt: walt ?? this.walt,
1871+ );
1872+
1873+ factory HemocoeleClass.fromJson(Map<String, dynamic> json) => HemocoeleClass(
1874+ acrogamy: json["acrogamy"],
1875+ amelification: json["amelification"],
1876+ autobiographic: json["autobiographic"],
1877+ berat: json["berat"],
1878+ catharticalness: json["catharticalness"]?.toDouble(),
1879+ chirotherium: json["Chirotherium"],
1880+ disdiapason: json["disdiapason"],
1881+ disproportionably: json["disproportionably"],
1882+ erythrite: json["erythrite"],
1883+ graphic: json["graphic"],
1884+ hepatological: json["hepatological"],
1885+ homocerc: json["homocerc"],
1886+ incommensurably: json["incommensurably"],
1887+ misaffirm: json["misaffirm"],
1888+ nonbookish: json["nonbookish"],
1889+ pocketbook: json["pocketbook"],
1890+ sclerometric: json["sclerometric"],
1891+ stambouline: json["stambouline"],
1892+ stickpin: json["stickpin"],
1893+ tubulure: json["tubulure"],
1894+ undelated: json["undelated"],
1895+ unsalt: json["unsalt"],
1896+ untutelar: json["untutelar"],
1897+ vagrant: json["vagrant"],
1898+ walt: json["Walt"],
1899+ );
1900+
1901+ Map<String, dynamic> toJson() => {
1902+ "acrogamy": acrogamy,
1903+ "amelification": amelification,
1904+ "autobiographic": autobiographic,
1905+ "berat": berat,
1906+ "catharticalness": catharticalness,
1907+ "Chirotherium": chirotherium,
1908+ "disdiapason": disdiapason,
1909+ "disproportionably": disproportionably,
1910+ "erythrite": erythrite,
1911+ "graphic": graphic,
1912+ "hepatological": hepatological,
1913+ "homocerc": homocerc,
1914+ "incommensurably": incommensurably,
1915+ "misaffirm": misaffirm,
1916+ "nonbookish": nonbookish,
1917+ "pocketbook": pocketbook,
1918+ "sclerometric": sclerometric,
1919+ "stambouline": stambouline,
1920+ "stickpin": stickpin,
1921+ "tubulure": tubulure,
1922+ "undelated": undelated,
1923+ "unsalt": unsalt,
1924+ "untutelar": untutelar,
1925+ "vagrant": vagrant,
1926+ "Walt": walt,
1927+ };
1928+}
1929+
1930+class Interacinar {
1931+ final double assapan;
1932+ final bool benefactorship;
1933+ final String triseriatim;
1934+ final int tubbing;
1935+ final dynamic untrimmed;
1936+
1937+ Interacinar({
1938+ required this.assapan,
1939+ required this.benefactorship,
1940+ required this.triseriatim,
1941+ required this.tubbing,
1942+ required this.untrimmed,
1943+ });
1944+
1945+ Interacinar copyWith({
1946+ double? assapan,
1947+ bool? benefactorship,
1948+ String? triseriatim,
1949+ int? tubbing,
1950+ dynamic untrimmed,
1951+ }) =>
1952+ Interacinar(
1953+ assapan: assapan ?? this.assapan,
1954+ benefactorship: benefactorship ?? this.benefactorship,
1955+ triseriatim: triseriatim ?? this.triseriatim,
1956+ tubbing: tubbing ?? this.tubbing,
1957+ untrimmed: untrimmed ?? this.untrimmed,
1958+ );
1959+
1960+ factory Interacinar.fromJson(Map<String, dynamic> json) => Interacinar(
1961+ assapan: json["assapan"]?.toDouble(),
1962+ benefactorship: json["benefactorship"],
1963+ triseriatim: json["triseriatim"],
1964+ tubbing: json["tubbing"],
1965+ untrimmed: (json.containsKey("untrimmed") ? json["untrimmed"] : throw FormatException('Missing required property')),
1966+ );
1967+
1968+ Map<String, dynamic> toJson() => {
1969+ "assapan": assapan,
1970+ "benefactorship": benefactorship,
1971+ "triseriatim": triseriatim,
1972+ "tubbing": tubbing,
1973+ "untrimmed": untrimmed,
1974+ };
1975+}
Melixirdefault / QuickType.ex+48 −6
@@ -246,6 +246,20 @@ defmodule ChemotherapeuticClass do
246246 unshy: nil | nil
247247 }
248248
249+ def decode_catharticalness(value) when is_float(value), do: value
250+ def decode_catharticalness(value) when is_integer(value), do: value
251+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding ChemotherapeuticClass.catharticalness"}
252+
253+ def encode_catharticalness(value) when is_float(value), do: value
254+ def encode_catharticalness(value) when is_integer(value), do: value
255+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding ChemotherapeuticClass.catharticalness"}
256+
257+ def decode_chirotherium(value) when is_integer(value), do: value
258+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding ChemotherapeuticClass.chirotherium"}
259+
260+ def encode_chirotherium(value) when is_integer(value), do: value
261+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding ChemotherapeuticClass.chirotherium"}
262+
249263 def decode_disdiapason(value) when is_binary(value), do: value
250264 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding ChemotherapeuticClass.disdiapason"}
251265
@@ -257,10 +271,10 @@ defmodule ChemotherapeuticClass do
257271 angioneurotic: m["angioneurotic"],
258272 availment: m["availment"],
259273 bladelet: m["bladelet"],
260- catharticalness: m["catharticalness"],
274+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
261275 caulis: m["caulis"],
262276 chalcus: m["chalcus"],
263- chirotherium: m["Chirotherium"],
277+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
264278 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
265279 enteradenological: m["enteradenological"],
266280 homocerc: m["homocerc"],
@@ -433,6 +447,20 @@ defmodule CoadjustClass do
433447 unchargeable: nil | nil
434448 }
435449
450+ def decode_catharticalness(value) when is_float(value), do: value
451+ def decode_catharticalness(value) when is_integer(value), do: value
452+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding CoadjustClass.catharticalness"}
453+
454+ def encode_catharticalness(value) when is_float(value), do: value
455+ def encode_catharticalness(value) when is_integer(value), do: value
456+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding CoadjustClass.catharticalness"}
457+
458+ def decode_chirotherium(value) when is_integer(value), do: value
459+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding CoadjustClass.chirotherium"}
460+
461+ def encode_chirotherium(value) when is_integer(value), do: value
462+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding CoadjustClass.chirotherium"}
463+
436464 def decode_disdiapason(value) when is_binary(value), do: value
437465 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding CoadjustClass.disdiapason"}
438466
@@ -443,8 +471,8 @@ defmodule CoadjustClass do
443471 %CoadjustClass{
444472 amidosulphonal: m["amidosulphonal"],
445473 benny: m["Benny"],
446- catharticalness: m["catharticalness"],
447- chirotherium: m["Chirotherium"],
474+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
475+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
448476 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
449477 ensnare: m["ensnare"],
450478 homocerc: m["homocerc"],
@@ -2013,6 +2041,20 @@ defmodule HemocoeleClass do
20132041 walt: nil | nil
20142042 }
20152043
2044+ def decode_catharticalness(value) when is_float(value), do: value
2045+ def decode_catharticalness(value) when is_integer(value), do: value
2046+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding HemocoeleClass.catharticalness"}
2047+
2048+ def encode_catharticalness(value) when is_float(value), do: value
2049+ def encode_catharticalness(value) when is_integer(value), do: value
2050+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding HemocoeleClass.catharticalness"}
2051+
2052+ def decode_chirotherium(value) when is_integer(value), do: value
2053+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding HemocoeleClass.chirotherium"}
2054+
2055+ def encode_chirotherium(value) when is_integer(value), do: value
2056+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding HemocoeleClass.chirotherium"}
2057+
20162058 def decode_disdiapason(value) when is_binary(value), do: value
20172059 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding HemocoeleClass.disdiapason"}
20182060
@@ -2025,8 +2067,8 @@ defmodule HemocoeleClass do
20252067 amelification: m["amelification"],
20262068 autobiographic: m["autobiographic"],
20272069 berat: m["berat"],
2028- catharticalness: m["catharticalness"],
2029- chirotherium: m["Chirotherium"],
2070+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
2071+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
20302072 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
20312073 disproportionably: m["disproportionably"],
20322074 erythrite: m["erythrite"],
Atypescript-effect-schemajust-schema-true--8c4ca457bcba / TopLevel.ts+332 −0
@@ -0,0 +1,332 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class Interacinar extends S.Class<Interacinar>("Interacinar")({
5+ "assapan": S.Number,
6+ "benefactorship": S.Boolean,
7+ "triseriatim": S.String,
8+ "tubbing": S.Int,
9+ "untrimmed": S.Null,
10+}) {}
11+
12+export class HemocoeleClass extends S.Class<HemocoeleClass>("HemocoeleClass")({
13+ "acrogamy": S.optional(S.Null),
14+ "amelification": S.optional(S.Null),
15+ "autobiographic": S.optional(S.Null),
16+ "berat": S.optional(S.Null),
17+ "catharticalness": S.optional(S.NullOr(S.Number)),
18+ "Chirotherium": S.optional(S.NullOr(S.Int)),
19+ "disdiapason": S.optional(S.NullOr(S.String)),
20+ "disproportionably": S.optional(S.Null),
21+ "erythrite": S.optional(S.Null),
22+ "graphic": S.optional(S.Null),
23+ "hepatological": S.optional(S.Null),
24+ "homocerc": S.optional(S.NullOr(S.Boolean)),
25+ "incommensurably": S.optional(S.Null),
26+ "misaffirm": S.optional(S.Null),
27+ "nonbookish": S.optional(S.Null),
28+ "pocketbook": S.optional(S.Null),
29+ "sclerometric": S.optional(S.Null),
30+ "stambouline": S.optional(S.Null),
31+ "stickpin": S.optional(S.Null),
32+ "tubulure": S.optional(S.Null),
33+ "undelated": S.optional(S.Null),
34+ "unsalt": S.optional(S.Null),
35+ "untutelar": S.optional(S.Null),
36+ "vagrant": S.optional(S.Null),
37+ "Walt": S.optional(S.Null),
38+}) {}
39+
40+export class FlagmakingClass extends S.Class<FlagmakingClass>("FlagmakingClass")({
41+ "albarco": S.Null,
42+ "Bunodonta": S.Null,
43+ "hornify": S.Null,
44+ "Hydrocorisae": S.Null,
45+ "hypoglossus": S.Null,
46+ "inexpiably": S.Null,
47+ "ingratitude": S.Null,
48+ "ladyfly": S.Null,
49+ "medicament": S.Null,
50+ "monogrammatic": S.Null,
51+ "nobbut": S.Null,
52+ "Notacanthidae": S.Null,
53+ "polyplacophore": S.Null,
54+ "proexercise": S.Null,
55+ "protoplast": S.Null,
56+ "puzzling": S.Null,
57+ "splanchnoskeleton": S.Null,
58+ "unloveliness": S.Null,
59+ "unquarantined": S.Null,
60+ "unrenounceable": S.Null,
61+}) {}
62+
63+export class FenkClass extends S.Class<FenkClass>("FenkClass")({
64+ "apoise": S.Null,
65+ "astronomize": S.Null,
66+ "cockhorse": S.Null,
67+ "copular": S.Null,
68+ "Dagomba": S.Null,
69+ "draffy": S.Null,
70+ "foreigner": S.Null,
71+ "Guyandot": S.Null,
72+ "neurogliosis": S.Null,
73+ "osmious": S.Null,
74+ "palpitate": S.Null,
75+ "rebukeable": S.Null,
76+ "Reinwardtia": S.Null,
77+ "reservatory": S.Null,
78+ "scalt": S.Null,
79+ "scripturalize": S.Null,
80+ "tintometer": S.Null,
81+ "Tritoness": S.Null,
82+ "undergrade": S.Null,
83+ "undermountain": S.Null,
84+}) {}
85+
86+export class FagginglyClass extends S.Class<FagginglyClass>("FagginglyClass")({
87+ "abranchian": S.Null,
88+ "aculeiform": S.Null,
89+ "adiaphoristic": S.Null,
90+ "adoptionism": S.Null,
91+ "Anglic": S.Null,
92+ "antrotomy": S.Null,
93+ "coerciveness": S.Null,
94+ "decorist": S.Null,
95+ "duckhood": S.Null,
96+ "Heteromeri": S.Null,
97+ "hypochnose": S.Null,
98+ "lochage": S.Null,
99+ "melee": S.Null,
100+ "nonconformitant": S.Null,
101+ "Poinsettia": S.Null,
102+ "putatively": S.Null,
103+ "semivolatile": S.Null,
104+ "soleas": S.Null,
105+ "unfastenable": S.Null,
106+ "unmillinered": S.Null,
107+}) {}
108+
109+export class Encrust extends S.Class<Encrust>("Encrust")({
110+ "comradely": S.Null,
111+ "diacanthous": S.Null,
112+ "feminineness": S.Null,
113+ "gossamered": S.Null,
114+ "Hibernia": S.Null,
115+ "Hibiscus": S.Null,
116+ "Lepidosauria": S.Null,
117+ "lollingly": S.Null,
118+ "manager": S.Null,
119+ "mechanic": S.Null,
120+ "overminuteness": S.Null,
121+ "papelonne": S.Null,
122+ "plebification": S.Null,
123+ "pugmiller": S.Null,
124+ "recoveror": S.Null,
125+ "spermatoblastic": S.Null,
126+ "Syllidae": S.Null,
127+ "ungyved": S.Null,
128+ "whirlabout": S.Null,
129+ "woodenware": S.Null,
130+}) {}
131+
132+export class DiaereseClass extends S.Class<DiaereseClass>("DiaereseClass")({
133+ "Amoreuxia": S.Null,
134+ "ani": S.Null,
135+ "bernicle": S.Null,
136+ "blackwasher": S.Null,
137+ "blowhard": S.Null,
138+ "broma": S.Null,
139+ "closecross": S.Null,
140+ "congregationalism": S.Null,
141+ "grayly": S.Null,
142+ "historically": S.Null,
143+ "hoast": S.Null,
144+ "irretentive": S.Null,
145+ "parcener": S.Null,
146+ "pedder": S.Null,
147+ "pseudoanatomic": S.Null,
148+ "rhizocarpian": S.Null,
149+ "samel": S.Null,
150+ "silker": S.Null,
151+ "subdentated": S.Null,
152+ "subobscure": S.Null,
153+}) {}
154+
155+export class DeruralizeClass extends S.Class<DeruralizeClass>("DeruralizeClass")({
156+ "bockerel": S.Null,
157+ "boulder": S.Null,
158+ "churrus": S.Null,
159+ "counterdigged": S.Null,
160+ "dialogite": S.Null,
161+ "digenic": S.Null,
162+ "dunbird": S.Null,
163+ "ergatogyne": S.Null,
164+ "fiendful": S.Null,
165+ "jackrod": S.Null,
166+ "Jehovistic": S.Null,
167+ "Paninean": S.Null,
168+ "panther": S.Null,
169+ "placentigerous": S.Null,
170+ "Romney": S.Null,
171+ "sparm": S.Null,
172+ "tocsin": S.Null,
173+ "unnicked": S.Null,
174+ "unstavable": S.Null,
175+ "windfirm": S.Null,
176+}) {}
177+
178+export class CredulityClass extends S.Class<CredulityClass>("CredulityClass")({
179+ "ammonolytic": S.Null,
180+ "bushmaster": S.Null,
181+ "considering": S.Null,
182+ "consuetudinary": S.Null,
183+ "embarras": S.Null,
184+ "fineness": S.Null,
185+ "flaithship": S.Null,
186+ "Flavia": S.Null,
187+ "gruffly": S.Null,
188+ "Hedychium": S.Null,
189+ "leadwort": S.Null,
190+ "overseriously": S.Null,
191+ "parabola": S.Null,
192+ "pectinatodenticulate": S.Null,
193+ "Popean": S.Null,
194+ "pornocrat": S.Null,
195+ "quadrisect": S.Null,
196+ "seriality": S.Null,
197+ "vamphorn": S.Null,
198+ "wharp": S.Null,
199+}) {}
200+
201+export class CoadjustClass extends S.Class<CoadjustClass>("CoadjustClass")({
202+ "amidosulphonal": S.optional(S.Null),
203+ "Benny": S.optional(S.Null),
204+ "catharticalness": S.optional(S.NullOr(S.Number)),
205+ "Chirotherium": S.optional(S.NullOr(S.Int)),
206+ "disdiapason": S.optional(S.NullOr(S.String)),
207+ "ensnare": S.optional(S.Null),
208+ "homocerc": S.optional(S.NullOr(S.Boolean)),
209+ "hybridizer": S.optional(S.Null),
210+ "leastwise": S.optional(S.Null),
211+ "lof": S.optional(S.Null),
212+ "monkhood": S.optional(S.Null),
213+ "Netherlandish": S.optional(S.Null),
214+ "nonbookish": S.optional(S.Null),
215+ "peonism": S.optional(S.Null),
216+ "Phonelescope": S.optional(S.Null),
217+ "porphyrogeniture": S.optional(S.Null),
218+ "preindemnify": S.optional(S.Null),
219+ "rosal": S.optional(S.Null),
220+ "scalenous": S.optional(S.Null),
221+ "scopine": S.optional(S.Null),
222+ "Sedaceae": S.optional(S.Null),
223+ "suberinize": S.optional(S.Null),
224+ "symbiot": S.optional(S.Null),
225+ "tablefellow": S.optional(S.Null),
226+ "unchargeable": S.optional(S.Null),
227+}) {}
228+
229+export class CimeliaClass extends S.Class<CimeliaClass>("CimeliaClass")({
230+ "catharticalness": S.Number,
231+ "Chirotherium": S.Int,
232+ "disdiapason": S.String,
233+ "homocerc": S.Boolean,
234+ "nonbookish": S.Null,
235+}) {}
236+
237+export class ChemotherapeuticClass extends S.Class<ChemotherapeuticClass>("ChemotherapeuticClass")({
238+ "angioneurotic": S.optional(S.Null),
239+ "availment": S.optional(S.Null),
240+ "bladelet": S.optional(S.Null),
241+ "catharticalness": S.optional(S.NullOr(S.Number)),
242+ "caulis": S.optional(S.Null),
243+ "chalcus": S.optional(S.Null),
244+ "Chirotherium": S.optional(S.NullOr(S.Int)),
245+ "disdiapason": S.optional(S.NullOr(S.String)),
246+ "enteradenological": S.optional(S.Null),
247+ "homocerc": S.optional(S.NullOr(S.Boolean)),
248+ "imporosity": S.optional(S.Null),
249+ "insistently": S.optional(S.Null),
250+ "intraparietal": S.optional(S.Null),
251+ "ivied": S.optional(S.Null),
252+ "Maureen": S.optional(S.Null),
253+ "nonbookish": S.optional(S.Null),
254+ "nostochine": S.optional(S.Null),
255+ "nutcracker": S.optional(S.Null),
256+ "ofttimes": S.optional(S.Null),
257+ "phenocryst": S.optional(S.Null),
258+ "precoincident": S.optional(S.Null),
259+ "ramiferous": S.optional(S.Null),
260+ "stagmometer": S.optional(S.Null),
261+ "tetherball": S.optional(S.Null),
262+ "unshy": S.optional(S.Null),
263+}) {}
264+
265+export class CerographClass extends S.Class<CerographClass>("CerographClass")({
266+ "apotropaion": S.Null,
267+ "casuary": S.Null,
268+ "creaker": S.Null,
269+ "disqualification": S.Null,
270+ "imperatorious": S.Null,
271+ "impermeabilize": S.Null,
272+ "metastoma": S.Null,
273+ "noctidiurnal": S.Null,
274+ "nonreserve": S.Null,
275+ "ophthalmotonometry": S.Null,
276+ "pailful": S.Null,
277+ "pigfish": S.Null,
278+ "pongee": S.Null,
279+ "prosodical": S.Null,
280+ "scrofuloderm": S.Null,
281+ "storekeeping": S.Null,
282+ "therologist": S.Null,
283+ "Tolowa": S.Null,
284+ "tradeful": S.Null,
285+ "unriveting": S.Null,
286+}) {}
287+
288+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
289+ "centrodesmose": S.String,
290+ "cerograph": S.Array(S.Union(S.String, CerographClass, S.Null)),
291+ "chemotherapeutics": S.Array(S.Union(S.Int, ChemotherapeuticClass)),
292+ "cimelia": S.Array(S.Union(S.Array(S.Int), CimeliaClass, S.Null)),
293+ "citrated": S.Int,
294+ "clinodome": S.Array(S.Union(S.Number, S.String)),
295+ "coadjust": S.Array(S.Union(S.Number, CoadjustClass)),
296+ "consilience": S.Array(S.Union(S.Number, S.Record({ key: S.String, value: S.Int}))),
297+ "constructor": S.Array(S.Union(S.Boolean, S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
298+ "continuative": S.Array(S.Union(S.Record({ key: S.String, value: S.Int}), S.String)),
299+ "credulity": S.Array(S.Union(S.Int, S.String, CredulityClass)),
300+ "creviced": S.Array(S.Union(S.Boolean, S.Record({ key: S.String, value: S.Int}), S.String)),
301+ "cubiculum": S.Array(S.Array(S.NullOr(S.Int))),
302+ "deruralize": S.Array(S.Union(S.Array(S.Null), S.Boolean, DeruralizeClass)),
303+ "diaereses": S.Array(S.Union(S.Array(S.Int), S.Boolean, DiaereseClass)),
304+ "dissolution": S.Array(S.NullOr(S.Array(S.Null))),
305+ "downstroke": S.Array(S.Union(S.Array(S.Null), S.Boolean, S.String)),
306+ "electrotautomerism": S.Array(S.NullOr(S.Number)),
307+ "eleutheromania": S.Array(S.Union(S.Number, S.Record({ key: S.String, value: S.Int}), S.String)),
308+ "encrust": Encrust,
309+ "entomoid": S.Array(S.Union(S.Int, CimeliaClass)),
310+ "epipaleolithic": S.Array(S.Union(S.Array(S.Int), S.Number)),
311+ "expropriable": S.Array(S.Union(S.Array(S.Null), S.Number, CimeliaClass)),
312+ "faggingly": S.Array(S.Union(S.Number, FagginglyClass)),
313+ "fenks": S.Array(S.Union(S.String, FenkClass)),
314+ "flagmaking": S.Array(S.Union(S.Boolean, S.Number, FlagmakingClass)),
315+ "fluorometer": S.Array(S.Union(S.Int, S.String, S.Null)),
316+ "fulsome": S.Array(S.NullOr(S.Int)),
317+ "fuzzy": S.Array(S.Union(S.Int, S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
318+ "gardenwards": S.Array(S.Union(S.Array(S.Int), S.Boolean, S.String)),
319+ "generalissimo": S.Array(S.Union(S.Boolean, S.Record({ key: S.String, value: S.Int}), S.Null)),
320+ "habeas": S.Array(S.NullOr(S.Record({ key: S.String, value: S.Int}))),
321+ "hemicrystalline": S.Array(S.Union(S.String, CimeliaClass)),
322+ "hemocoele": S.Array(S.Union(S.Array(S.Int), HemocoeleClass)),
323+ "hoister": S.Array(S.Union(S.String, CimeliaClass, S.Null)),
324+ "hyperpiesis": S.Array(S.Union(S.Array(S.Null), CimeliaClass, S.Null)),
325+ "hyppish": S.Array(S.Union(S.Boolean, S.String, S.Null)),
326+ "idealizer": S.Array(S.Union(S.Array(S.Null), S.Int, CimeliaClass)),
327+ "incrustator": S.Array(S.Union(S.Array(S.Int), S.Int, S.String)),
328+ "intentiveness": S.Array(S.Union(S.Number, S.String, CimeliaClass)),
329+ "interacinar": Interacinar,
330+ "intercorrelation": S.Array(S.NullOr(S.Array(S.Int))),
331+ "jacutinga": S.Array(S.Union(S.Array(S.Int), S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
332+}) {}
Atypescript-zodjust-schema-true--8c4ca457bcba / TopLevel.ts+332 −0
@@ -0,0 +1,332 @@
1+import * as z from "zod";
2+
3+
4+export const CerographClassSchema = z.object({
5+ "apotropaion": z.null(),
6+ "casuary": z.null(),
7+ "creaker": z.null(),
8+ "disqualification": z.null(),
9+ "imperatorious": z.null(),
10+ "impermeabilize": z.null(),
11+ "metastoma": z.null(),
12+ "noctidiurnal": z.null(),
13+ "nonreserve": z.null(),
14+ "ophthalmotonometry": z.null(),
15+ "pailful": z.null(),
16+ "pigfish": z.null(),
17+ "pongee": z.null(),
18+ "prosodical": z.null(),
19+ "scrofuloderm": z.null(),
20+ "storekeeping": z.null(),
21+ "therologist": z.null(),
22+ "Tolowa": z.null(),
23+ "tradeful": z.null(),
24+ "unriveting": z.null(),
25+});
26+
27+export const ChemotherapeuticClassSchema = z.object({
28+ "angioneurotic": z.null().optional(),
29+ "availment": z.null().optional(),
30+ "bladelet": z.null().optional(),
31+ "catharticalness": z.number().optional(),
32+ "caulis": z.null().optional(),
33+ "chalcus": z.null().optional(),
34+ "Chirotherium": z.number().int().optional(),
35+ "disdiapason": z.string().optional(),
36+ "enteradenological": z.null().optional(),
37+ "homocerc": z.boolean().optional(),
38+ "imporosity": z.null().optional(),
39+ "insistently": z.null().optional(),
40+ "intraparietal": z.null().optional(),
41+ "ivied": z.null().optional(),
42+ "Maureen": z.null().optional(),
43+ "nonbookish": z.null().optional(),
44+ "nostochine": z.null().optional(),
45+ "nutcracker": z.null().optional(),
46+ "ofttimes": z.null().optional(),
47+ "phenocryst": z.null().optional(),
48+ "precoincident": z.null().optional(),
49+ "ramiferous": z.null().optional(),
50+ "stagmometer": z.null().optional(),
51+ "tetherball": z.null().optional(),
52+ "unshy": z.null().optional(),
53+});
54+
55+export const CimeliaClassSchema = z.object({
56+ "catharticalness": z.number(),
57+ "Chirotherium": z.number().int(),
58+ "disdiapason": z.string(),
59+ "homocerc": z.boolean(),
60+ "nonbookish": z.null(),
61+});
62+
63+export const CoadjustClassSchema = z.object({
64+ "amidosulphonal": z.null().optional(),
65+ "Benny": z.null().optional(),
66+ "catharticalness": z.number().optional(),
67+ "Chirotherium": z.number().int().optional(),
68+ "disdiapason": z.string().optional(),
69+ "ensnare": z.null().optional(),
70+ "homocerc": z.boolean().optional(),
71+ "hybridizer": z.null().optional(),
72+ "leastwise": z.null().optional(),
73+ "lof": z.null().optional(),
74+ "monkhood": z.null().optional(),
75+ "Netherlandish": z.null().optional(),
76+ "nonbookish": z.null().optional(),
77+ "peonism": z.null().optional(),
78+ "Phonelescope": z.null().optional(),
79+ "porphyrogeniture": z.null().optional(),
80+ "preindemnify": z.null().optional(),
81+ "rosal": z.null().optional(),
82+ "scalenous": z.null().optional(),
83+ "scopine": z.null().optional(),
84+ "Sedaceae": z.null().optional(),
85+ "suberinize": z.null().optional(),
86+ "symbiot": z.null().optional(),
87+ "tablefellow": z.null().optional(),
88+ "unchargeable": z.null().optional(),
89+});
90+
91+export const CredulityClassSchema = z.object({
92+ "ammonolytic": z.null(),
93+ "bushmaster": z.null(),
94+ "considering": z.null(),
95+ "consuetudinary": z.null(),
96+ "embarras": z.null(),
97+ "fineness": z.null(),
98+ "flaithship": z.null(),
99+ "Flavia": z.null(),
100+ "gruffly": z.null(),
101+ "Hedychium": z.null(),
102+ "leadwort": z.null(),
103+ "overseriously": z.null(),
104+ "parabola": z.null(),
105+ "pectinatodenticulate": z.null(),
106+ "Popean": z.null(),
107+ "pornocrat": z.null(),
108+ "quadrisect": z.null(),
109+ "seriality": z.null(),
110+ "vamphorn": z.null(),
111+ "wharp": z.null(),
112+});
113+
114+export const DeruralizeClassSchema = z.object({
115+ "bockerel": z.null(),
116+ "boulder": z.null(),
117+ "churrus": z.null(),
118+ "counterdigged": z.null(),
119+ "dialogite": z.null(),
120+ "digenic": z.null(),
121+ "dunbird": z.null(),
122+ "ergatogyne": z.null(),
123+ "fiendful": z.null(),
124+ "jackrod": z.null(),
125+ "Jehovistic": z.null(),
126+ "Paninean": z.null(),
127+ "panther": z.null(),
128+ "placentigerous": z.null(),
129+ "Romney": z.null(),
130+ "sparm": z.null(),
131+ "tocsin": z.null(),
132+ "unnicked": z.null(),
133+ "unstavable": z.null(),
134+ "windfirm": z.null(),
135+});
136+
137+export const DiaereseClassSchema = z.object({
138+ "Amoreuxia": z.null(),
139+ "ani": z.null(),
140+ "bernicle": z.null(),
141+ "blackwasher": z.null(),
142+ "blowhard": z.null(),
143+ "broma": z.null(),
144+ "closecross": z.null(),
145+ "congregationalism": z.null(),
146+ "grayly": z.null(),
147+ "historically": z.null(),
148+ "hoast": z.null(),
149+ "irretentive": z.null(),
150+ "parcener": z.null(),
151+ "pedder": z.null(),
152+ "pseudoanatomic": z.null(),
153+ "rhizocarpian": z.null(),
154+ "samel": z.null(),
155+ "silker": z.null(),
156+ "subdentated": z.null(),
157+ "subobscure": z.null(),
158+});
159+
160+export const EncrustSchema = z.object({
161+ "comradely": z.null(),
162+ "diacanthous": z.null(),
163+ "feminineness": z.null(),
164+ "gossamered": z.null(),
165+ "Hibernia": z.null(),
166+ "Hibiscus": z.null(),
167+ "Lepidosauria": z.null(),
168+ "lollingly": z.null(),
169+ "manager": z.null(),
170+ "mechanic": z.null(),
171+ "overminuteness": z.null(),
172+ "papelonne": z.null(),
173+ "plebification": z.null(),
174+ "pugmiller": z.null(),
175+ "recoveror": z.null(),
176+ "spermatoblastic": z.null(),
177+ "Syllidae": z.null(),
178+ "ungyved": z.null(),
179+ "whirlabout": z.null(),
180+ "woodenware": z.null(),
181+});
182+
183+export const FagginglyClassSchema = z.object({
184+ "abranchian": z.null(),
185+ "aculeiform": z.null(),
186+ "adiaphoristic": z.null(),
187+ "adoptionism": z.null(),
188+ "Anglic": z.null(),
189+ "antrotomy": z.null(),
190+ "coerciveness": z.null(),
191+ "decorist": z.null(),
192+ "duckhood": z.null(),
193+ "Heteromeri": z.null(),
194+ "hypochnose": z.null(),
195+ "lochage": z.null(),
196+ "melee": z.null(),
197+ "nonconformitant": z.null(),
198+ "Poinsettia": z.null(),
199+ "putatively": z.null(),
200+ "semivolatile": z.null(),
201+ "soleas": z.null(),
202+ "unfastenable": z.null(),
203+ "unmillinered": z.null(),
204+});
205+
206+export const FenkClassSchema = z.object({
207+ "apoise": z.null(),
208+ "astronomize": z.null(),
209+ "cockhorse": z.null(),
210+ "copular": z.null(),
211+ "Dagomba": z.null(),
212+ "draffy": z.null(),
213+ "foreigner": z.null(),
214+ "Guyandot": z.null(),
215+ "neurogliosis": z.null(),
216+ "osmious": z.null(),
217+ "palpitate": z.null(),
218+ "rebukeable": z.null(),
219+ "Reinwardtia": z.null(),
220+ "reservatory": z.null(),
221+ "scalt": z.null(),
222+ "scripturalize": z.null(),
223+ "tintometer": z.null(),
224+ "Tritoness": z.null(),
225+ "undergrade": z.null(),
226+ "undermountain": z.null(),
227+});
228+
229+export const FlagmakingClassSchema = z.object({
230+ "albarco": z.null(),
231+ "Bunodonta": z.null(),
232+ "hornify": z.null(),
233+ "Hydrocorisae": z.null(),
234+ "hypoglossus": z.null(),
235+ "inexpiably": z.null(),
236+ "ingratitude": z.null(),
237+ "ladyfly": z.null(),
238+ "medicament": z.null(),
239+ "monogrammatic": z.null(),
240+ "nobbut": z.null(),
241+ "Notacanthidae": z.null(),
242+ "polyplacophore": z.null(),
243+ "proexercise": z.null(),
244+ "protoplast": z.null(),
245+ "puzzling": z.null(),
246+ "splanchnoskeleton": z.null(),
247+ "unloveliness": z.null(),
248+ "unquarantined": z.null(),
249+ "unrenounceable": z.null(),
250+});
251+
252+export const HemocoeleClassSchema = z.object({
253+ "acrogamy": z.null().optional(),
254+ "amelification": z.null().optional(),
255+ "autobiographic": z.null().optional(),
256+ "berat": z.null().optional(),
257+ "catharticalness": z.number().optional(),
258+ "Chirotherium": z.number().int().optional(),
259+ "disdiapason": z.string().optional(),
260+ "disproportionably": z.null().optional(),
261+ "erythrite": z.null().optional(),
262+ "graphic": z.null().optional(),
263+ "hepatological": z.null().optional(),
264+ "homocerc": z.boolean().optional(),
265+ "incommensurably": z.null().optional(),
266+ "misaffirm": z.null().optional(),
267+ "nonbookish": z.null().optional(),
268+ "pocketbook": z.null().optional(),
269+ "sclerometric": z.null().optional(),
270+ "stambouline": z.null().optional(),
271+ "stickpin": z.null().optional(),
272+ "tubulure": z.null().optional(),
273+ "undelated": z.null().optional(),
274+ "unsalt": z.null().optional(),
275+ "untutelar": z.null().optional(),
276+ "vagrant": z.null().optional(),
277+ "Walt": z.null().optional(),
278+});
279+
280+export const InteracinarSchema = z.object({
281+ "assapan": z.number(),
282+ "benefactorship": z.boolean(),
283+ "triseriatim": z.string(),
284+ "tubbing": z.number().int(),
285+ "untrimmed": z.null(),
286+});
287+
288+export const TopLevelSchema = z.object({
289+ "centrodesmose": z.string(),
290+ "cerograph": z.array(z.union([z.null(), CerographClassSchema, z.string()])),
291+ "chemotherapeutics": z.array(z.union([ChemotherapeuticClassSchema, z.number().int()])),
292+ "cimelia": z.array(z.union([z.null(), z.array(z.number().int()), CimeliaClassSchema])),
293+ "citrated": z.number().int(),
294+ "clinodome": z.array(z.union([z.number(), z.string()])),
295+ "coadjust": z.array(z.union([CoadjustClassSchema, z.number()])),
296+ "consilience": z.array(z.union([z.number(), z.record(z.string(), z.number().int())])),
297+ "constructor": z.array(z.union([z.boolean(), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
298+ "continuative": z.array(z.union([z.record(z.string(), z.number().int()), z.string()])),
299+ "credulity": z.array(z.union([CredulityClassSchema, z.number().int(), z.string()])),
300+ "creviced": z.array(z.union([z.boolean(), z.record(z.string(), z.number().int()), z.string()])),
301+ "cubiculum": z.array(z.array(z.union([z.null(), z.number().int()]))),
302+ "deruralize": z.array(z.union([z.array(z.null()), z.boolean(), DeruralizeClassSchema])),
303+ "diaereses": z.array(z.union([z.array(z.number().int()), z.boolean(), DiaereseClassSchema])),
304+ "dissolution": z.array(z.union([z.null(), z.array(z.null())])),
305+ "downstroke": z.array(z.union([z.array(z.null()), z.boolean(), z.string()])),
306+ "electrotautomerism": z.array(z.union([z.null(), z.number()])),
307+ "eleutheromania": z.array(z.union([z.number(), z.record(z.string(), z.number().int()), z.string()])),
308+ "encrust": EncrustSchema,
309+ "entomoid": z.array(z.union([CimeliaClassSchema, z.number().int()])),
310+ "epipaleolithic": z.array(z.union([z.array(z.number().int()), z.number()])),
311+ "expropriable": z.array(z.union([z.array(z.null()), CimeliaClassSchema, z.number()])),
312+ "faggingly": z.array(z.union([FagginglyClassSchema, z.number()])),
313+ "fenks": z.array(z.union([FenkClassSchema, z.string()])),
314+ "flagmaking": z.array(z.union([z.boolean(), FlagmakingClassSchema, z.number()])),
315+ "fluorometer": z.array(z.union([z.null(), z.number().int(), z.string()])),
316+ "fulsome": z.array(z.union([z.null(), z.number().int()])),
317+ "fuzzy": z.array(z.union([z.number().int(), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
318+ "gardenwards": z.array(z.union([z.array(z.number().int()), z.boolean(), z.string()])),
319+ "generalissimo": z.array(z.union([z.null(), z.boolean(), z.record(z.string(), z.number().int())])),
320+ "habeas": z.array(z.union([z.null(), z.record(z.string(), z.number().int())])),
321+ "hemicrystalline": z.array(z.union([CimeliaClassSchema, z.string()])),
322+ "hemocoele": z.array(z.union([z.array(z.number().int()), HemocoeleClassSchema])),
323+ "hoister": z.array(z.union([z.null(), CimeliaClassSchema, z.string()])),
324+ "hyperpiesis": z.array(z.union([z.null(), z.array(z.null()), CimeliaClassSchema])),
325+ "hyppish": z.array(z.union([z.null(), z.boolean(), z.string()])),
326+ "idealizer": z.array(z.union([z.array(z.null()), CimeliaClassSchema, z.number().int()])),
327+ "incrustator": z.array(z.union([z.array(z.number().int()), z.number().int(), z.string()])),
328+ "intentiveness": z.array(z.union([CimeliaClassSchema, z.number(), z.string()])),
329+ "interacinar": InteracinarSchema,
330+ "intercorrelation": z.array(z.union([z.null(), z.array(z.number().int())])),
331+ "jacutinga": z.array(z.union([z.array(z.number().int()), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
332+});
Test case

test/inputs/json/priority/combinations2.json

4 generated files · +2,694 −66
Adartcopy-with-true--bb7e994c05fe / TopLevel.dart+1,666 −0
@@ -0,0 +1,1666 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final List<dynamic> abranchiata;
13+ final List<dynamic> academe;
14+ final List<dynamic> acquirable;
15+ final List<dynamic> aerometry;
16+ final List<dynamic> alexin;
17+ final List<dynamic> alleviate;
18+ final List<dynamic> amaas;
19+ final List<dynamic> ambassage;
20+ final List<Amphithyron?> amphithyron;
21+ final List<String?> andriana;
22+ final List<dynamic> ankee;
23+ final List<Map<String, int?>?> annihilator;
24+ final dynamic annulose;
25+ final List<dynamic> ansarie;
26+ final List<dynamic> aphasia;
27+ final List<dynamic> asprawl;
28+ final List<bool?> attractive;
29+ final Map<String, int> barksome;
30+ final List<dynamic> bedesman;
31+ final List<dynamic> belard;
32+ final List<dynamic> bocking;
33+ final List<dynamic> brawlingly;
34+ final List<dynamic> brookie;
35+ final List<dynamic> bumboatman;
36+ final List<dynamic> bystreet;
37+ final List<dynamic> calaverite;
38+ final List<dynamic> catallactic;
39+ final List<dynamic> cemental;
40+ final List<dynamic> chytridiaceae;
41+ final List<dynamic> discordia;
42+ final List<dynamic> endomyces;
43+ final List<dynamic> epinephelidae;
44+ final List<dynamic> eupatorium;
45+ final List<dynamic> gryphosaurus;
46+ final List<dynamic> koryak;
47+ final List<dynamic> lavinia;
48+ final List<dynamic> oskar;
49+ final List<dynamic> rebecca;
50+ final List<dynamic> rhomboganoidei;
51+ final bool rigsmal;
52+ final List<dynamic> ruellia;
53+ final List<dynamic> school;
54+ final List<dynamic> shakespearolater;
55+ final List<double> svan;
56+ final Map<String, double> wayao;
57+
58+ TopLevel({
59+ required this.abranchiata,
60+ required this.academe,
61+ required this.acquirable,
62+ required this.aerometry,
63+ required this.alexin,
64+ required this.alleviate,
65+ required this.amaas,
66+ required this.ambassage,
67+ required this.amphithyron,
68+ required this.andriana,
69+ required this.ankee,
70+ required this.annihilator,
71+ required this.annulose,
72+ required this.ansarie,
73+ required this.aphasia,
74+ required this.asprawl,
75+ required this.attractive,
76+ required this.barksome,
77+ required this.bedesman,
78+ required this.belard,
79+ required this.bocking,
80+ required this.brawlingly,
81+ required this.brookie,
82+ required this.bumboatman,
83+ required this.bystreet,
84+ required this.calaverite,
85+ required this.catallactic,
86+ required this.cemental,
87+ required this.chytridiaceae,
88+ required this.discordia,
89+ required this.endomyces,
90+ required this.epinephelidae,
91+ required this.eupatorium,
92+ required this.gryphosaurus,
93+ required this.koryak,
94+ required this.lavinia,
95+ required this.oskar,
96+ required this.rebecca,
97+ required this.rhomboganoidei,
98+ required this.rigsmal,
99+ required this.ruellia,
100+ required this.school,
101+ required this.shakespearolater,
102+ required this.svan,
103+ required this.wayao,
104+ });
105+
106+ TopLevel copyWith({
107+ List<dynamic>? abranchiata,
108+ List<dynamic>? academe,
109+ List<dynamic>? acquirable,
110+ List<dynamic>? aerometry,
111+ List<dynamic>? alexin,
112+ List<dynamic>? alleviate,
113+ List<dynamic>? amaas,
114+ List<dynamic>? ambassage,
115+ List<Amphithyron?>? amphithyron,
116+ List<String?>? andriana,
117+ List<dynamic>? ankee,
118+ List<Map<String, int?>?>? annihilator,
119+ dynamic annulose,
120+ List<dynamic>? ansarie,
121+ List<dynamic>? aphasia,
122+ List<dynamic>? asprawl,
123+ List<bool?>? attractive,
124+ Map<String, int>? barksome,
125+ List<dynamic>? bedesman,
126+ List<dynamic>? belard,
127+ List<dynamic>? bocking,
128+ List<dynamic>? brawlingly,
129+ List<dynamic>? brookie,
130+ List<dynamic>? bumboatman,
131+ List<dynamic>? bystreet,
132+ List<dynamic>? calaverite,
133+ List<dynamic>? catallactic,
134+ List<dynamic>? cemental,
135+ List<dynamic>? chytridiaceae,
136+ List<dynamic>? discordia,
137+ List<dynamic>? endomyces,
138+ List<dynamic>? epinephelidae,
139+ List<dynamic>? eupatorium,
140+ List<dynamic>? gryphosaurus,
141+ List<dynamic>? koryak,
142+ List<dynamic>? lavinia,
143+ List<dynamic>? oskar,
144+ List<dynamic>? rebecca,
145+ List<dynamic>? rhomboganoidei,
146+ bool? rigsmal,
147+ List<dynamic>? ruellia,
148+ List<dynamic>? school,
149+ List<dynamic>? shakespearolater,
150+ List<double>? svan,
151+ Map<String, double>? wayao,
152+ }) =>
153+ TopLevel(
154+ abranchiata: abranchiata ?? this.abranchiata,
155+ academe: academe ?? this.academe,
156+ acquirable: acquirable ?? this.acquirable,
157+ aerometry: aerometry ?? this.aerometry,
158+ alexin: alexin ?? this.alexin,
159+ alleviate: alleviate ?? this.alleviate,
160+ amaas: amaas ?? this.amaas,
161+ ambassage: ambassage ?? this.ambassage,
162+ amphithyron: amphithyron ?? this.amphithyron,
163+ andriana: andriana ?? this.andriana,
164+ ankee: ankee ?? this.ankee,
165+ annihilator: annihilator ?? this.annihilator,
166+ annulose: annulose ?? this.annulose,
167+ ansarie: ansarie ?? this.ansarie,
168+ aphasia: aphasia ?? this.aphasia,
169+ asprawl: asprawl ?? this.asprawl,
170+ attractive: attractive ?? this.attractive,
171+ barksome: barksome ?? this.barksome,
172+ bedesman: bedesman ?? this.bedesman,
173+ belard: belard ?? this.belard,
174+ bocking: bocking ?? this.bocking,
175+ brawlingly: brawlingly ?? this.brawlingly,
176+ brookie: brookie ?? this.brookie,
177+ bumboatman: bumboatman ?? this.bumboatman,
178+ bystreet: bystreet ?? this.bystreet,
179+ calaverite: calaverite ?? this.calaverite,
180+ catallactic: catallactic ?? this.catallactic,
181+ cemental: cemental ?? this.cemental,
182+ chytridiaceae: chytridiaceae ?? this.chytridiaceae,
183+ discordia: discordia ?? this.discordia,
184+ endomyces: endomyces ?? this.endomyces,
185+ epinephelidae: epinephelidae ?? this.epinephelidae,
186+ eupatorium: eupatorium ?? this.eupatorium,
187+ gryphosaurus: gryphosaurus ?? this.gryphosaurus,
188+ koryak: koryak ?? this.koryak,
189+ lavinia: lavinia ?? this.lavinia,
190+ oskar: oskar ?? this.oskar,
191+ rebecca: rebecca ?? this.rebecca,
192+ rhomboganoidei: rhomboganoidei ?? this.rhomboganoidei,
193+ rigsmal: rigsmal ?? this.rigsmal,
194+ ruellia: ruellia ?? this.ruellia,
195+ school: school ?? this.school,
196+ shakespearolater: shakespearolater ?? this.shakespearolater,
197+ svan: svan ?? this.svan,
198+ wayao: wayao ?? this.wayao,
199+ );
200+
201+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
202+ abranchiata: List<dynamic>.from(json["Abranchiata"].map((x) => x)),
203+ academe: List<dynamic>.from(json["academe"].map((x) => x)),
204+ acquirable: List<dynamic>.from(json["acquirable"].map((x) => x)),
205+ aerometry: List<dynamic>.from(json["aerometry"].map((x) => x)),
206+ alexin: List<dynamic>.from(json["alexin"].map((x) => x)),
207+ alleviate: List<dynamic>.from(json["alleviate"].map((x) => x)),
208+ amaas: List<dynamic>.from(json["amaas"].map((x) => x)),
209+ ambassage: List<dynamic>.from(json["ambassage"].map((x) => x)),
210+ amphithyron: List<Amphithyron?>.from(json["amphithyron"].map((x) => x == null ? null : Amphithyron.fromJson(x))),
211+ andriana: List<String?>.from(json["Andriana"].map((x) => x)),
212+ ankee: List<dynamic>.from(json["ankee"].map((x) => x)),
213+ annihilator: List<Map<String, int?>?>.from(json["annihilator"].map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, int?>(k, v)))),
214+ annulose: (json.containsKey("annulose") ? json["annulose"] : throw FormatException('Missing required property')),
215+ ansarie: List<dynamic>.from(json["Ansarie"].map((x) => x)),
216+ aphasia: List<dynamic>.from(json["aphasia"].map((x) => x)),
217+ asprawl: List<dynamic>.from(json["asprawl"].map((x) => x)),
218+ attractive: List<bool?>.from(json["attractive"].map((x) => x)),
219+ barksome: Map.from(json["barksome"]).map((k, v) => MapEntry<String, int>(k, v)),
220+ bedesman: List<dynamic>.from(json["bedesman"].map((x) => x)),
221+ belard: List<dynamic>.from(json["belard"].map((x) => x)),
222+ bocking: List<dynamic>.from(json["bocking"].map((x) => x)),
223+ brawlingly: List<dynamic>.from(json["brawlingly"].map((x) => x)),
224+ brookie: List<dynamic>.from(json["brookie"].map((x) => x)),
225+ bumboatman: List<dynamic>.from(json["bumboatman"].map((x) => x)),
226+ bystreet: List<dynamic>.from(json["bystreet"].map((x) => x)),
227+ calaverite: List<dynamic>.from(json["calaverite"].map((x) => x)),
228+ catallactic: List<dynamic>.from(json["catallactic"].map((x) => x)),
229+ cemental: List<dynamic>.from(json["cemental"].map((x) => x)),
230+ chytridiaceae: List<dynamic>.from(json["Chytridiaceae"].map((x) => x)),
231+ discordia: List<dynamic>.from(json["Discordia"].map((x) => x)),
232+ endomyces: List<dynamic>.from(json["Endomyces"].map((x) => x)),
233+ epinephelidae: List<dynamic>.from(json["Epinephelidae"].map((x) => x)),
234+ eupatorium: List<dynamic>.from(json["Eupatorium"].map((x) => x)),
235+ gryphosaurus: List<dynamic>.from(json["Gryphosaurus"].map((x) => x)),
236+ koryak: List<dynamic>.from(json["Koryak"].map((x) => x)),
237+ lavinia: List<dynamic>.from(json["Lavinia"].map((x) => x)),
238+ oskar: List<dynamic>.from(json["Oskar"].map((x) => x)),
239+ rebecca: List<dynamic>.from(json["Rebecca"].map((x) => x)),
240+ rhomboganoidei: List<dynamic>.from(json["Rhomboganoidei"].map((x) => x)),
241+ rigsmal: json["Rigsmal"],
242+ ruellia: List<dynamic>.from(json["Ruellia"].map((x) => x)),
243+ school: List<dynamic>.from(json["School"].map((x) => x)),
244+ shakespearolater: List<dynamic>.from(json["Shakespearolater"].map((x) => x)),
245+ svan: List<double>.from(json["Svan"].map((x) => x?.toDouble())),
246+ wayao: Map.from(json["Wayao"]).map((k, v) => MapEntry<String, double>(k, v?.toDouble())),
247+ );
248+
249+ Map<String, dynamic> toJson() => {
250+ "Abranchiata": List<dynamic>.from(abranchiata.map((x) => x)),
251+ "academe": List<dynamic>.from(academe.map((x) => x)),
252+ "acquirable": List<dynamic>.from(acquirable.map((x) => x)),
253+ "aerometry": List<dynamic>.from(aerometry.map((x) => x)),
254+ "alexin": List<dynamic>.from(alexin.map((x) => x)),
255+ "alleviate": List<dynamic>.from(alleviate.map((x) => x)),
256+ "amaas": List<dynamic>.from(amaas.map((x) => x)),
257+ "ambassage": List<dynamic>.from(ambassage.map((x) => x)),
258+ "amphithyron": List<dynamic>.from(amphithyron.map((x) => x?.toJson())),
259+ "Andriana": List<dynamic>.from(andriana.map((x) => x)),
260+ "ankee": List<dynamic>.from(ankee.map((x) => x)),
261+ "annihilator": List<dynamic>.from(annihilator.map((x) => x == null ? null : Map.from(x!).map((k, v) => MapEntry<String, dynamic>(k, v)))),
262+ "annulose": annulose,
263+ "Ansarie": List<dynamic>.from(ansarie.map((x) => x)),
264+ "aphasia": List<dynamic>.from(aphasia.map((x) => x)),
265+ "asprawl": List<dynamic>.from(asprawl.map((x) => x)),
266+ "attractive": List<dynamic>.from(attractive.map((x) => x)),
267+ "barksome": Map.from(barksome).map((k, v) => MapEntry<String, dynamic>(k, v)),
268+ "bedesman": List<dynamic>.from(bedesman.map((x) => x)),
269+ "belard": List<dynamic>.from(belard.map((x) => x)),
270+ "bocking": List<dynamic>.from(bocking.map((x) => x)),
271+ "brawlingly": List<dynamic>.from(brawlingly.map((x) => x)),
272+ "brookie": List<dynamic>.from(brookie.map((x) => x)),
273+ "bumboatman": List<dynamic>.from(bumboatman.map((x) => x)),
274+ "bystreet": List<dynamic>.from(bystreet.map((x) => x)),
275+ "calaverite": List<dynamic>.from(calaverite.map((x) => x)),
276+ "catallactic": List<dynamic>.from(catallactic.map((x) => x)),
277+ "cemental": List<dynamic>.from(cemental.map((x) => x)),
278+ "Chytridiaceae": List<dynamic>.from(chytridiaceae.map((x) => x)),
279+ "Discordia": List<dynamic>.from(discordia.map((x) => x)),
280+ "Endomyces": List<dynamic>.from(endomyces.map((x) => x)),
281+ "Epinephelidae": List<dynamic>.from(epinephelidae.map((x) => x)),
282+ "Eupatorium": List<dynamic>.from(eupatorium.map((x) => x)),
283+ "Gryphosaurus": List<dynamic>.from(gryphosaurus.map((x) => x)),
284+ "Koryak": List<dynamic>.from(koryak.map((x) => x)),
285+ "Lavinia": List<dynamic>.from(lavinia.map((x) => x)),
286+ "Oskar": List<dynamic>.from(oskar.map((x) => x)),
287+ "Rebecca": List<dynamic>.from(rebecca.map((x) => x)),
288+ "Rhomboganoidei": List<dynamic>.from(rhomboganoidei.map((x) => x)),
289+ "Rigsmal": rigsmal,
290+ "Ruellia": List<dynamic>.from(ruellia.map((x) => x)),
291+ "School": List<dynamic>.from(school.map((x) => x)),
292+ "Shakespearolater": List<dynamic>.from(shakespearolater.map((x) => x)),
293+ "Svan": List<dynamic>.from(svan.map((x) => x)),
294+ "Wayao": Map.from(wayao).map((k, v) => MapEntry<String, dynamic>(k, v)),
295+ };
296+}
297+
298+class AlleviateClass {
299+ final dynamic apriori;
300+ final dynamic beggarer;
301+ final dynamic brokenheartedly;
302+ final dynamic debilitation;
303+ final dynamic frike;
304+ final dynamic gastrolith;
305+ final dynamic hulsean;
306+ final dynamic orthocentric;
307+ final dynamic petaly;
308+ final dynamic probudgeting;
309+ final dynamic reacquire;
310+ final dynamic scow;
311+ final dynamic shutoff;
312+ final dynamic subcontiguous;
313+ final dynamic suffumigate;
314+ final dynamic transformable;
315+ final dynamic uncoroneted;
316+ final dynamic unparking;
317+ final dynamic unvarnishedness;
318+ final dynamic wherewithal;
319+
320+ AlleviateClass({
321+ required this.apriori,
322+ required this.beggarer,
323+ required this.brokenheartedly,
324+ required this.debilitation,
325+ required this.frike,
326+ required this.gastrolith,
327+ required this.hulsean,
328+ required this.orthocentric,
329+ required this.petaly,
330+ required this.probudgeting,
331+ required this.reacquire,
332+ required this.scow,
333+ required this.shutoff,
334+ required this.subcontiguous,
335+ required this.suffumigate,
336+ required this.transformable,
337+ required this.uncoroneted,
338+ required this.unparking,
339+ required this.unvarnishedness,
340+ required this.wherewithal,
341+ });
342+
343+ AlleviateClass copyWith({
344+ dynamic apriori,
345+ dynamic beggarer,
346+ dynamic brokenheartedly,
347+ dynamic debilitation,
348+ dynamic frike,
349+ dynamic gastrolith,
350+ dynamic hulsean,
351+ dynamic orthocentric,
352+ dynamic petaly,
353+ dynamic probudgeting,
354+ dynamic reacquire,
355+ dynamic scow,
356+ dynamic shutoff,
357+ dynamic subcontiguous,
358+ dynamic suffumigate,
359+ dynamic transformable,
360+ dynamic uncoroneted,
361+ dynamic unparking,
362+ dynamic unvarnishedness,
363+ dynamic wherewithal,
364+ }) =>
365+ AlleviateClass(
366+ apriori: apriori ?? this.apriori,
367+ beggarer: beggarer ?? this.beggarer,
368+ brokenheartedly: brokenheartedly ?? this.brokenheartedly,
369+ debilitation: debilitation ?? this.debilitation,
370+ frike: frike ?? this.frike,
371+ gastrolith: gastrolith ?? this.gastrolith,
372+ hulsean: hulsean ?? this.hulsean,
373+ orthocentric: orthocentric ?? this.orthocentric,
374+ petaly: petaly ?? this.petaly,
375+ probudgeting: probudgeting ?? this.probudgeting,
376+ reacquire: reacquire ?? this.reacquire,
377+ scow: scow ?? this.scow,
378+ shutoff: shutoff ?? this.shutoff,
379+ subcontiguous: subcontiguous ?? this.subcontiguous,
380+ suffumigate: suffumigate ?? this.suffumigate,
381+ transformable: transformable ?? this.transformable,
382+ uncoroneted: uncoroneted ?? this.uncoroneted,
383+ unparking: unparking ?? this.unparking,
384+ unvarnishedness: unvarnishedness ?? this.unvarnishedness,
385+ wherewithal: wherewithal ?? this.wherewithal,
386+ );
387+
388+ factory AlleviateClass.fromJson(Map<String, dynamic> json) => AlleviateClass(
389+ apriori: (json.containsKey("apriori") ? json["apriori"] : throw FormatException('Missing required property')),
390+ beggarer: (json.containsKey("beggarer") ? json["beggarer"] : throw FormatException('Missing required property')),
391+ brokenheartedly: (json.containsKey("brokenheartedly") ? json["brokenheartedly"] : throw FormatException('Missing required property')),
392+ debilitation: (json.containsKey("debilitation") ? json["debilitation"] : throw FormatException('Missing required property')),
393+ frike: (json.containsKey("frike") ? json["frike"] : throw FormatException('Missing required property')),
394+ gastrolith: (json.containsKey("gastrolith") ? json["gastrolith"] : throw FormatException('Missing required property')),
395+ hulsean: (json.containsKey("Hulsean") ? json["Hulsean"] : throw FormatException('Missing required property')),
396+ orthocentric: (json.containsKey("orthocentric") ? json["orthocentric"] : throw FormatException('Missing required property')),
397+ petaly: (json.containsKey("petaly") ? json["petaly"] : throw FormatException('Missing required property')),
398+ probudgeting: (json.containsKey("probudgeting") ? json["probudgeting"] : throw FormatException('Missing required property')),
399+ reacquire: (json.containsKey("reacquire") ? json["reacquire"] : throw FormatException('Missing required property')),
400+ scow: (json.containsKey("scow") ? json["scow"] : throw FormatException('Missing required property')),
401+ shutoff: (json.containsKey("shutoff") ? json["shutoff"] : throw FormatException('Missing required property')),
402+ subcontiguous: (json.containsKey("subcontiguous") ? json["subcontiguous"] : throw FormatException('Missing required property')),
403+ suffumigate: (json.containsKey("suffumigate") ? json["suffumigate"] : throw FormatException('Missing required property')),
404+ transformable: (json.containsKey("transformable") ? json["transformable"] : throw FormatException('Missing required property')),
405+ uncoroneted: (json.containsKey("uncoroneted") ? json["uncoroneted"] : throw FormatException('Missing required property')),
406+ unparking: (json.containsKey("unparking") ? json["unparking"] : throw FormatException('Missing required property')),
407+ unvarnishedness: (json.containsKey("unvarnishedness") ? json["unvarnishedness"] : throw FormatException('Missing required property')),
408+ wherewithal: (json.containsKey("wherewithal") ? json["wherewithal"] : throw FormatException('Missing required property')),
409+ );
410+
411+ Map<String, dynamic> toJson() => {
412+ "apriori": apriori,
413+ "beggarer": beggarer,
414+ "brokenheartedly": brokenheartedly,
415+ "debilitation": debilitation,
416+ "frike": frike,
417+ "gastrolith": gastrolith,
418+ "Hulsean": hulsean,
419+ "orthocentric": orthocentric,
420+ "petaly": petaly,
421+ "probudgeting": probudgeting,
422+ "reacquire": reacquire,
423+ "scow": scow,
424+ "shutoff": shutoff,
425+ "subcontiguous": subcontiguous,
426+ "suffumigate": suffumigate,
427+ "transformable": transformable,
428+ "uncoroneted": uncoroneted,
429+ "unparking": unparking,
430+ "unvarnishedness": unvarnishedness,
431+ "wherewithal": wherewithal,
432+ };
433+}
434+
435+class Rebecca {
436+ final double catharticalness;
437+ final int chirotherium;
438+ final String disdiapason;
439+ final bool homocerc;
440+ final dynamic nonbookish;
441+
442+ Rebecca({
443+ required this.catharticalness,
444+ required this.chirotherium,
445+ required this.disdiapason,
446+ required this.homocerc,
447+ required this.nonbookish,
448+ });
449+
450+ Rebecca copyWith({
451+ double? catharticalness,
452+ int? chirotherium,
453+ String? disdiapason,
454+ bool? homocerc,
455+ dynamic nonbookish,
456+ }) =>
457+ Rebecca(
458+ catharticalness: catharticalness ?? this.catharticalness,
459+ chirotherium: chirotherium ?? this.chirotherium,
460+ disdiapason: disdiapason ?? this.disdiapason,
461+ homocerc: homocerc ?? this.homocerc,
462+ nonbookish: nonbookish ?? this.nonbookish,
463+ );
464+
465+ factory Rebecca.fromJson(Map<String, dynamic> json) => Rebecca(
466+ catharticalness: json["catharticalness"]?.toDouble(),
467+ chirotherium: json["Chirotherium"],
468+ disdiapason: json["disdiapason"],
469+ homocerc: json["homocerc"],
470+ nonbookish: (json.containsKey("nonbookish") ? json["nonbookish"] : throw FormatException('Missing required property')),
471+ );
472+
473+ Map<String, dynamic> toJson() => {
474+ "catharticalness": catharticalness,
475+ "Chirotherium": chirotherium,
476+ "disdiapason": disdiapason,
477+ "homocerc": homocerc,
478+ "nonbookish": nonbookish,
479+ };
480+}
481+
482+class Amphithyron {
483+ final int? akroasis;
484+ final int? antiphonical;
485+ final int? basebred;
486+ final double? catharticalness;
487+ final int? chirotherium;
488+ final int? conductometric;
489+ final String? disdiapason;
490+ final int? ensilation;
491+ final int? eyebolt;
492+ final int? fistulated;
493+ final int? heteropod;
494+ final bool? homocerc;
495+ final int? juniperus;
496+ final int? labyrinthically;
497+ final int? martyrization;
498+ final int? mispolicy;
499+ final int? multipara;
500+ final int? nazirite;
501+ final dynamic nonbookish;
502+ final int? possessorial;
503+ final int? shamed;
504+ final int? shelfworn;
505+ final int? stagnum;
506+ final int? those;
507+ final int? undecimal;
508+
509+ Amphithyron({
510+ this.akroasis,
511+ this.antiphonical,
512+ this.basebred,
513+ this.catharticalness,
514+ this.chirotherium,
515+ this.conductometric,
516+ this.disdiapason,
517+ this.ensilation,
518+ this.eyebolt,
519+ this.fistulated,
520+ this.heteropod,
521+ this.homocerc,
522+ this.juniperus,
523+ this.labyrinthically,
524+ this.martyrization,
525+ this.mispolicy,
526+ this.multipara,
527+ this.nazirite,
528+ this.nonbookish,
529+ this.possessorial,
530+ this.shamed,
531+ this.shelfworn,
532+ this.stagnum,
533+ this.those,
534+ this.undecimal,
535+ });
536+
537+ Amphithyron copyWith({
538+ int? akroasis,
539+ int? antiphonical,
540+ int? basebred,
541+ double? catharticalness,
542+ int? chirotherium,
543+ int? conductometric,
544+ String? disdiapason,
545+ int? ensilation,
546+ int? eyebolt,
547+ int? fistulated,
548+ int? heteropod,
549+ bool? homocerc,
550+ int? juniperus,
551+ int? labyrinthically,
552+ int? martyrization,
553+ int? mispolicy,
554+ int? multipara,
555+ int? nazirite,
556+ dynamic nonbookish,
557+ int? possessorial,
558+ int? shamed,
559+ int? shelfworn,
560+ int? stagnum,
561+ int? those,
562+ int? undecimal,
563+ }) =>
564+ Amphithyron(
565+ akroasis: akroasis ?? this.akroasis,
566+ antiphonical: antiphonical ?? this.antiphonical,
567+ basebred: basebred ?? this.basebred,
568+ catharticalness: catharticalness ?? this.catharticalness,
569+ chirotherium: chirotherium ?? this.chirotherium,
570+ conductometric: conductometric ?? this.conductometric,
571+ disdiapason: disdiapason ?? this.disdiapason,
572+ ensilation: ensilation ?? this.ensilation,
573+ eyebolt: eyebolt ?? this.eyebolt,
574+ fistulated: fistulated ?? this.fistulated,
575+ heteropod: heteropod ?? this.heteropod,
576+ homocerc: homocerc ?? this.homocerc,
577+ juniperus: juniperus ?? this.juniperus,
578+ labyrinthically: labyrinthically ?? this.labyrinthically,
579+ martyrization: martyrization ?? this.martyrization,
580+ mispolicy: mispolicy ?? this.mispolicy,
581+ multipara: multipara ?? this.multipara,
582+ nazirite: nazirite ?? this.nazirite,
583+ nonbookish: nonbookish ?? this.nonbookish,
584+ possessorial: possessorial ?? this.possessorial,
585+ shamed: shamed ?? this.shamed,
586+ shelfworn: shelfworn ?? this.shelfworn,
587+ stagnum: stagnum ?? this.stagnum,
588+ those: those ?? this.those,
589+ undecimal: undecimal ?? this.undecimal,
590+ );
591+
592+ factory Amphithyron.fromJson(Map<String, dynamic> json) => Amphithyron(
593+ akroasis: json["akroasis"],
594+ antiphonical: json["antiphonical"],
595+ basebred: json["basebred"],
596+ catharticalness: json["catharticalness"]?.toDouble(),
597+ chirotherium: json["Chirotherium"],
598+ conductometric: json["conductometric"],
599+ disdiapason: json["disdiapason"],
600+ ensilation: json["ensilation"],
601+ eyebolt: json["eyebolt"],
602+ fistulated: json["fistulated"],
603+ heteropod: json["heteropod"],
604+ homocerc: json["homocerc"],
605+ juniperus: json["Juniperus"],
606+ labyrinthically: json["labyrinthically"],
607+ martyrization: json["martyrization"],
608+ mispolicy: json["mispolicy"],
609+ multipara: json["multipara"],
610+ nazirite: json["Nazirite"],
611+ nonbookish: json["nonbookish"],
612+ possessorial: json["possessorial"],
613+ shamed: json["shamed"],
614+ shelfworn: json["shelfworn"],
615+ stagnum: json["stagnum"],
616+ those: json["Those"],
617+ undecimal: json["undecimal"],
618+ );
619+
620+ Map<String, dynamic> toJson() => {
621+ "akroasis": akroasis,
622+ "antiphonical": antiphonical,
623+ "basebred": basebred,
624+ "catharticalness": catharticalness,
625+ "Chirotherium": chirotherium,
626+ "conductometric": conductometric,
627+ "disdiapason": disdiapason,
628+ "ensilation": ensilation,
629+ "eyebolt": eyebolt,
630+ "fistulated": fistulated,
631+ "heteropod": heteropod,
632+ "homocerc": homocerc,
633+ "Juniperus": juniperus,
634+ "labyrinthically": labyrinthically,
635+ "martyrization": martyrization,
636+ "mispolicy": mispolicy,
637+ "multipara": multipara,
638+ "Nazirite": nazirite,
639+ "nonbookish": nonbookish,
640+ "possessorial": possessorial,
641+ "shamed": shamed,
642+ "shelfworn": shelfworn,
643+ "stagnum": stagnum,
644+ "Those": those,
645+ "undecimal": undecimal,
646+ };
647+}
648+
649+class AnkeeClass {
650+ final dynamic anomoean;
651+ final dynamic barleyhood;
652+ final dynamic befriender;
653+ final dynamic brutishness;
654+ final dynamic cephalalgy;
655+ final dynamic cirurgian;
656+ final dynamic conventionally;
657+ final dynamic jackshay;
658+ final dynamic milammeter;
659+ final dynamic naja;
660+ final dynamic ombrological;
661+ final dynamic phonasthenia;
662+ final dynamic retrievableness;
663+ final dynamic snakily;
664+ final dynamic swot;
665+ final dynamic tartlet;
666+ final dynamic thiofuran;
667+ final dynamic tracheophone;
668+ final dynamic tuglike;
669+ final dynamic unscratchingly;
670+
671+ AnkeeClass({
672+ required this.anomoean,
673+ required this.barleyhood,
674+ required this.befriender,
675+ required this.brutishness,
676+ required this.cephalalgy,
677+ required this.cirurgian,
678+ required this.conventionally,
679+ required this.jackshay,
680+ required this.milammeter,
681+ required this.naja,
682+ required this.ombrological,
683+ required this.phonasthenia,
684+ required this.retrievableness,
685+ required this.snakily,
686+ required this.swot,
687+ required this.tartlet,
688+ required this.thiofuran,
689+ required this.tracheophone,
690+ required this.tuglike,
691+ required this.unscratchingly,
692+ });
693+
694+ AnkeeClass copyWith({
695+ dynamic anomoean,
696+ dynamic barleyhood,
697+ dynamic befriender,
698+ dynamic brutishness,
699+ dynamic cephalalgy,
700+ dynamic cirurgian,
701+ dynamic conventionally,
702+ dynamic jackshay,
703+ dynamic milammeter,
704+ dynamic naja,
705+ dynamic ombrological,
706+ dynamic phonasthenia,
707+ dynamic retrievableness,
708+ dynamic snakily,
709+ dynamic swot,
710+ dynamic tartlet,
711+ dynamic thiofuran,
712+ dynamic tracheophone,
713+ dynamic tuglike,
714+ dynamic unscratchingly,
715+ }) =>
716+ AnkeeClass(
717+ anomoean: anomoean ?? this.anomoean,
718+ barleyhood: barleyhood ?? this.barleyhood,
719+ befriender: befriender ?? this.befriender,
720+ brutishness: brutishness ?? this.brutishness,
721+ cephalalgy: cephalalgy ?? this.cephalalgy,
722+ cirurgian: cirurgian ?? this.cirurgian,
723+ conventionally: conventionally ?? this.conventionally,
724+ jackshay: jackshay ?? this.jackshay,
725+ milammeter: milammeter ?? this.milammeter,
726+ naja: naja ?? this.naja,
727+ ombrological: ombrological ?? this.ombrological,
728+ phonasthenia: phonasthenia ?? this.phonasthenia,
729+ retrievableness: retrievableness ?? this.retrievableness,
730+ snakily: snakily ?? this.snakily,
731+ swot: swot ?? this.swot,
732+ tartlet: tartlet ?? this.tartlet,
733+ thiofuran: thiofuran ?? this.thiofuran,
734+ tracheophone: tracheophone ?? this.tracheophone,
735+ tuglike: tuglike ?? this.tuglike,
736+ unscratchingly: unscratchingly ?? this.unscratchingly,
737+ );
738+
739+ factory AnkeeClass.fromJson(Map<String, dynamic> json) => AnkeeClass(
740+ anomoean: (json.containsKey("Anomoean") ? json["Anomoean"] : throw FormatException('Missing required property')),
741+ barleyhood: (json.containsKey("barleyhood") ? json["barleyhood"] : throw FormatException('Missing required property')),
742+ befriender: (json.containsKey("befriender") ? json["befriender"] : throw FormatException('Missing required property')),
743+ brutishness: (json.containsKey("brutishness") ? json["brutishness"] : throw FormatException('Missing required property')),
744+ cephalalgy: (json.containsKey("cephalalgy") ? json["cephalalgy"] : throw FormatException('Missing required property')),
745+ cirurgian: (json.containsKey("cirurgian") ? json["cirurgian"] : throw FormatException('Missing required property')),
746+ conventionally: (json.containsKey("conventionally") ? json["conventionally"] : throw FormatException('Missing required property')),
747+ jackshay: (json.containsKey("jackshay") ? json["jackshay"] : throw FormatException('Missing required property')),
748+ milammeter: (json.containsKey("milammeter") ? json["milammeter"] : throw FormatException('Missing required property')),
749+ naja: (json.containsKey("Naja") ? json["Naja"] : throw FormatException('Missing required property')),
750+ ombrological: (json.containsKey("ombrological") ? json["ombrological"] : throw FormatException('Missing required property')),
751+ phonasthenia: (json.containsKey("phonasthenia") ? json["phonasthenia"] : throw FormatException('Missing required property')),
752+ retrievableness: (json.containsKey("retrievableness") ? json["retrievableness"] : throw FormatException('Missing required property')),
753+ snakily: (json.containsKey("snakily") ? json["snakily"] : throw FormatException('Missing required property')),
754+ swot: (json.containsKey("swot") ? json["swot"] : throw FormatException('Missing required property')),
755+ tartlet: (json.containsKey("tartlet") ? json["tartlet"] : throw FormatException('Missing required property')),
756+ thiofuran: (json.containsKey("thiofuran") ? json["thiofuran"] : throw FormatException('Missing required property')),
757+ tracheophone: (json.containsKey("tracheophone") ? json["tracheophone"] : throw FormatException('Missing required property')),
758+ tuglike: (json.containsKey("tuglike") ? json["tuglike"] : throw FormatException('Missing required property')),
759+ unscratchingly: (json.containsKey("unscratchingly") ? json["unscratchingly"] : throw FormatException('Missing required property')),
760+ );
761+
762+ Map<String, dynamic> toJson() => {
763+ "Anomoean": anomoean,
764+ "barleyhood": barleyhood,
765+ "befriender": befriender,
766+ "brutishness": brutishness,
767+ "cephalalgy": cephalalgy,
768+ "cirurgian": cirurgian,
769+ "conventionally": conventionally,
770+ "jackshay": jackshay,
771+ "milammeter": milammeter,
772+ "Naja": naja,
773+ "ombrological": ombrological,
774+ "phonasthenia": phonasthenia,
775+ "retrievableness": retrievableness,
776+ "snakily": snakily,
777+ "swot": swot,
778+ "tartlet": tartlet,
779+ "thiofuran": thiofuran,
780+ "tracheophone": tracheophone,
781+ "tuglike": tuglike,
782+ "unscratchingly": unscratchingly,
783+ };
784+}
785+
786+class AnsarieClass {
787+ final dynamic accension;
788+ final dynamic alida;
789+ final dynamic asteria;
790+ final dynamic beriberic;
791+ final dynamic edgebone;
792+ final dynamic gastrodialysis;
793+ final dynamic geographic;
794+ final dynamic ictonyx;
795+ final dynamic metrocele;
796+ final dynamic misgraft;
797+ final dynamic monteith;
798+ final dynamic notcher;
799+ final dynamic prorestriction;
800+ final dynamic ramist;
801+ final dynamic throatlet;
802+ final dynamic unfair;
803+ final dynamic unsynonymous;
804+ final dynamic water;
805+ final dynamic zestfully;
806+ final dynamic zincic;
807+
808+ AnsarieClass({
809+ required this.accension,
810+ required this.alida,
811+ required this.asteria,
812+ required this.beriberic,
813+ required this.edgebone,
814+ required this.gastrodialysis,
815+ required this.geographic,
816+ required this.ictonyx,
817+ required this.metrocele,
818+ required this.misgraft,
819+ required this.monteith,
820+ required this.notcher,
821+ required this.prorestriction,
822+ required this.ramist,
823+ required this.throatlet,
824+ required this.unfair,
825+ required this.unsynonymous,
826+ required this.water,
827+ required this.zestfully,
828+ required this.zincic,
829+ });
830+
831+ AnsarieClass copyWith({
832+ dynamic accension,
833+ dynamic alida,
834+ dynamic asteria,
835+ dynamic beriberic,
836+ dynamic edgebone,
837+ dynamic gastrodialysis,
838+ dynamic geographic,
839+ dynamic ictonyx,
840+ dynamic metrocele,
841+ dynamic misgraft,
842+ dynamic monteith,
843+ dynamic notcher,
844+ dynamic prorestriction,
845+ dynamic ramist,
846+ dynamic throatlet,
847+ dynamic unfair,
848+ dynamic unsynonymous,
849+ dynamic water,
850+ dynamic zestfully,
851+ dynamic zincic,
852+ }) =>
853+ AnsarieClass(
854+ accension: accension ?? this.accension,
855+ alida: alida ?? this.alida,
856+ asteria: asteria ?? this.asteria,
857+ beriberic: beriberic ?? this.beriberic,
858+ edgebone: edgebone ?? this.edgebone,
859+ gastrodialysis: gastrodialysis ?? this.gastrodialysis,
860+ geographic: geographic ?? this.geographic,
861+ ictonyx: ictonyx ?? this.ictonyx,
862+ metrocele: metrocele ?? this.metrocele,
863+ misgraft: misgraft ?? this.misgraft,
864+ monteith: monteith ?? this.monteith,
865+ notcher: notcher ?? this.notcher,
866+ prorestriction: prorestriction ?? this.prorestriction,
867+ ramist: ramist ?? this.ramist,
868+ throatlet: throatlet ?? this.throatlet,
869+ unfair: unfair ?? this.unfair,
870+ unsynonymous: unsynonymous ?? this.unsynonymous,
871+ water: water ?? this.water,
872+ zestfully: zestfully ?? this.zestfully,
873+ zincic: zincic ?? this.zincic,
874+ );
875+
876+ factory AnsarieClass.fromJson(Map<String, dynamic> json) => AnsarieClass(
877+ accension: (json.containsKey("accension") ? json["accension"] : throw FormatException('Missing required property')),
878+ alida: (json.containsKey("Alida") ? json["Alida"] : throw FormatException('Missing required property')),
879+ asteria: (json.containsKey("asteria") ? json["asteria"] : throw FormatException('Missing required property')),
880+ beriberic: (json.containsKey("beriberic") ? json["beriberic"] : throw FormatException('Missing required property')),
881+ edgebone: (json.containsKey("edgebone") ? json["edgebone"] : throw FormatException('Missing required property')),
882+ gastrodialysis: (json.containsKey("gastrodialysis") ? json["gastrodialysis"] : throw FormatException('Missing required property')),
883+ geographic: (json.containsKey("geographic") ? json["geographic"] : throw FormatException('Missing required property')),
884+ ictonyx: (json.containsKey("Ictonyx") ? json["Ictonyx"] : throw FormatException('Missing required property')),
885+ metrocele: (json.containsKey("metrocele") ? json["metrocele"] : throw FormatException('Missing required property')),
886+ misgraft: (json.containsKey("misgraft") ? json["misgraft"] : throw FormatException('Missing required property')),
887+ monteith: (json.containsKey("monteith") ? json["monteith"] : throw FormatException('Missing required property')),
888+ notcher: (json.containsKey("notcher") ? json["notcher"] : throw FormatException('Missing required property')),
889+ prorestriction: (json.containsKey("prorestriction") ? json["prorestriction"] : throw FormatException('Missing required property')),
890+ ramist: (json.containsKey("Ramist") ? json["Ramist"] : throw FormatException('Missing required property')),
891+ throatlet: (json.containsKey("throatlet") ? json["throatlet"] : throw FormatException('Missing required property')),
892+ unfair: (json.containsKey("unfair") ? json["unfair"] : throw FormatException('Missing required property')),
893+ unsynonymous: (json.containsKey("unsynonymous") ? json["unsynonymous"] : throw FormatException('Missing required property')),
894+ water: (json.containsKey("water") ? json["water"] : throw FormatException('Missing required property')),
895+ zestfully: (json.containsKey("zestfully") ? json["zestfully"] : throw FormatException('Missing required property')),
896+ zincic: (json.containsKey("zincic") ? json["zincic"] : throw FormatException('Missing required property')),
897+ );
898+
899+ Map<String, dynamic> toJson() => {
900+ "accension": accension,
901+ "Alida": alida,
902+ "asteria": asteria,
903+ "beriberic": beriberic,
904+ "edgebone": edgebone,
905+ "gastrodialysis": gastrodialysis,
906+ "geographic": geographic,
907+ "Ictonyx": ictonyx,
908+ "metrocele": metrocele,
909+ "misgraft": misgraft,
910+ "monteith": monteith,
911+ "notcher": notcher,
912+ "prorestriction": prorestriction,
913+ "Ramist": ramist,
914+ "throatlet": throatlet,
915+ "unfair": unfair,
916+ "unsynonymous": unsynonymous,
917+ "water": water,
918+ "zestfully": zestfully,
919+ "zincic": zincic,
920+ };
921+}
922+
923+class ChytridiaceaeClass {
924+ final dynamic batidaceae;
925+ final dynamic brechites;
926+ final dynamic codespairer;
927+ final dynamic emery;
928+ final dynamic enervative;
929+ final dynamic excriminate;
930+ final dynamic goshenite;
931+ final dynamic grime;
932+ final dynamic gritten;
933+ final dynamic hectorly;
934+ final dynamic intermediation;
935+ final dynamic meeterly;
936+ final dynamic narraganset;
937+ final dynamic onymatic;
938+ final dynamic paddlecock;
939+ final dynamic thana;
940+ final dynamic thornily;
941+ final dynamic uckia;
942+ final dynamic unmettle;
943+ final dynamic vorticellid;
944+
945+ ChytridiaceaeClass({
946+ required this.batidaceae,
947+ required this.brechites,
948+ required this.codespairer,
949+ required this.emery,
950+ required this.enervative,
951+ required this.excriminate,
952+ required this.goshenite,
953+ required this.grime,
954+ required this.gritten,
955+ required this.hectorly,
956+ required this.intermediation,
957+ required this.meeterly,
958+ required this.narraganset,
959+ required this.onymatic,
960+ required this.paddlecock,
961+ required this.thana,
962+ required this.thornily,
963+ required this.uckia,
964+ required this.unmettle,
965+ required this.vorticellid,
966+ });
967+
968+ ChytridiaceaeClass copyWith({
969+ dynamic batidaceae,
970+ dynamic brechites,
971+ dynamic codespairer,
972+ dynamic emery,
973+ dynamic enervative,
974+ dynamic excriminate,
975+ dynamic goshenite,
976+ dynamic grime,
977+ dynamic gritten,
978+ dynamic hectorly,
979+ dynamic intermediation,
980+ dynamic meeterly,
981+ dynamic narraganset,
982+ dynamic onymatic,
983+ dynamic paddlecock,
984+ dynamic thana,
985+ dynamic thornily,
986+ dynamic uckia,
987+ dynamic unmettle,
988+ dynamic vorticellid,
989+ }) =>
990+ ChytridiaceaeClass(
991+ batidaceae: batidaceae ?? this.batidaceae,
992+ brechites: brechites ?? this.brechites,
993+ codespairer: codespairer ?? this.codespairer,
994+ emery: emery ?? this.emery,
995+ enervative: enervative ?? this.enervative,
996+ excriminate: excriminate ?? this.excriminate,
997+ goshenite: goshenite ?? this.goshenite,
998+ grime: grime ?? this.grime,
999+ gritten: gritten ?? this.gritten,
1000+ hectorly: hectorly ?? this.hectorly,
1001+ intermediation: intermediation ?? this.intermediation,
1002+ meeterly: meeterly ?? this.meeterly,
1003+ narraganset: narraganset ?? this.narraganset,
1004+ onymatic: onymatic ?? this.onymatic,
1005+ paddlecock: paddlecock ?? this.paddlecock,
1006+ thana: thana ?? this.thana,
1007+ thornily: thornily ?? this.thornily,
1008+ uckia: uckia ?? this.uckia,
1009+ unmettle: unmettle ?? this.unmettle,
1010+ vorticellid: vorticellid ?? this.vorticellid,
1011+ );
1012+
1013+ factory ChytridiaceaeClass.fromJson(Map<String, dynamic> json) => ChytridiaceaeClass(
1014+ batidaceae: (json.containsKey("Batidaceae") ? json["Batidaceae"] : throw FormatException('Missing required property')),
1015+ brechites: (json.containsKey("Brechites") ? json["Brechites"] : throw FormatException('Missing required property')),
1016+ codespairer: (json.containsKey("codespairer") ? json["codespairer"] : throw FormatException('Missing required property')),
1017+ emery: (json.containsKey("Emery") ? json["Emery"] : throw FormatException('Missing required property')),
1018+ enervative: (json.containsKey("enervative") ? json["enervative"] : throw FormatException('Missing required property')),
1019+ excriminate: (json.containsKey("excriminate") ? json["excriminate"] : throw FormatException('Missing required property')),
1020+ goshenite: (json.containsKey("goshenite") ? json["goshenite"] : throw FormatException('Missing required property')),
1021+ grime: (json.containsKey("grime") ? json["grime"] : throw FormatException('Missing required property')),
1022+ gritten: (json.containsKey("gritten") ? json["gritten"] : throw FormatException('Missing required property')),
1023+ hectorly: (json.containsKey("hectorly") ? json["hectorly"] : throw FormatException('Missing required property')),
1024+ intermediation: (json.containsKey("intermediation") ? json["intermediation"] : throw FormatException('Missing required property')),
1025+ meeterly: (json.containsKey("meeterly") ? json["meeterly"] : throw FormatException('Missing required property')),
1026+ narraganset: (json.containsKey("Narraganset") ? json["Narraganset"] : throw FormatException('Missing required property')),
1027+ onymatic: (json.containsKey("onymatic") ? json["onymatic"] : throw FormatException('Missing required property')),
1028+ paddlecock: (json.containsKey("paddlecock") ? json["paddlecock"] : throw FormatException('Missing required property')),
1029+ thana: (json.containsKey("thana") ? json["thana"] : throw FormatException('Missing required property')),
1030+ thornily: (json.containsKey("thornily") ? json["thornily"] : throw FormatException('Missing required property')),
1031+ uckia: (json.containsKey("uckia") ? json["uckia"] : throw FormatException('Missing required property')),
1032+ unmettle: (json.containsKey("unmettle") ? json["unmettle"] : throw FormatException('Missing required property')),
1033+ vorticellid: (json.containsKey("vorticellid") ? json["vorticellid"] : throw FormatException('Missing required property')),
1034+ );
1035+
1036+ Map<String, dynamic> toJson() => {
1037+ "Batidaceae": batidaceae,
1038+ "Brechites": brechites,
1039+ "codespairer": codespairer,
1040+ "Emery": emery,
1041+ "enervative": enervative,
1042+ "excriminate": excriminate,
1043+ "goshenite": goshenite,
1044+ "grime": grime,
1045+ "gritten": gritten,
1046+ "hectorly": hectorly,
1047+ "intermediation": intermediation,
1048+ "meeterly": meeterly,
1049+ "Narraganset": narraganset,
1050+ "onymatic": onymatic,
1051+ "paddlecock": paddlecock,
1052+ "thana": thana,
1053+ "thornily": thornily,
1054+ "uckia": uckia,
1055+ "unmettle": unmettle,
1056+ "vorticellid": vorticellid,
1057+ };
1058+}
1059+
1060+class DiscordiaClass {
1061+ final int? altaic;
1062+ final int? amoristic;
1063+ final int? blennophthalmia;
1064+ final double? catharticalness;
1065+ final int? chirotherium;
1066+ final int? disciplinability;
1067+ final String? disdiapason;
1068+ final int? goofer;
1069+ final bool? homocerc;
1070+ final int? laryngograph;
1071+ final int? leucitis;
1072+ final int? lymphocyst;
1073+ final int? microcosmology;
1074+ final int? nauseation;
1075+ final dynamic nonbookish;
1076+ final int? patarin;
1077+ final int? preliberal;
1078+ final int? prettifier;
1079+ final int? rangework;
1080+ final int? redient;
1081+ final int? subfusiform;
1082+ final int? suicidical;
1083+ final int? swow;
1084+ final int? wastrel;
1085+ final int? wingle;
1086+
1087+ DiscordiaClass({
1088+ this.altaic,
1089+ this.amoristic,
1090+ this.blennophthalmia,
1091+ this.catharticalness,
1092+ this.chirotherium,
1093+ this.disciplinability,
1094+ this.disdiapason,
1095+ this.goofer,
1096+ this.homocerc,
1097+ this.laryngograph,
1098+ this.leucitis,
1099+ this.lymphocyst,
1100+ this.microcosmology,
1101+ this.nauseation,
1102+ this.nonbookish,
1103+ this.patarin,
1104+ this.preliberal,
1105+ this.prettifier,
1106+ this.rangework,
1107+ this.redient,
1108+ this.subfusiform,
1109+ this.suicidical,
1110+ this.swow,
1111+ this.wastrel,
1112+ this.wingle,
1113+ });
1114+
1115+ DiscordiaClass copyWith({
1116+ int? altaic,
1117+ int? amoristic,
1118+ int? blennophthalmia,
1119+ double? catharticalness,
1120+ int? chirotherium,
1121+ int? disciplinability,
1122+ String? disdiapason,
1123+ int? goofer,
1124+ bool? homocerc,
1125+ int? laryngograph,
1126+ int? leucitis,
1127+ int? lymphocyst,
1128+ int? microcosmology,
1129+ int? nauseation,
1130+ dynamic nonbookish,
1131+ int? patarin,
1132+ int? preliberal,
1133+ int? prettifier,
1134+ int? rangework,
1135+ int? redient,
1136+ int? subfusiform,
1137+ int? suicidical,
1138+ int? swow,
1139+ int? wastrel,
1140+ int? wingle,
1141+ }) =>
1142+ DiscordiaClass(
1143+ altaic: altaic ?? this.altaic,
1144+ amoristic: amoristic ?? this.amoristic,
1145+ blennophthalmia: blennophthalmia ?? this.blennophthalmia,
1146+ catharticalness: catharticalness ?? this.catharticalness,
1147+ chirotherium: chirotherium ?? this.chirotherium,
1148+ disciplinability: disciplinability ?? this.disciplinability,
1149+ disdiapason: disdiapason ?? this.disdiapason,
1150+ goofer: goofer ?? this.goofer,
1151+ homocerc: homocerc ?? this.homocerc,
1152+ laryngograph: laryngograph ?? this.laryngograph,
1153+ leucitis: leucitis ?? this.leucitis,
1154+ lymphocyst: lymphocyst ?? this.lymphocyst,
1155+ microcosmology: microcosmology ?? this.microcosmology,
1156+ nauseation: nauseation ?? this.nauseation,
1157+ nonbookish: nonbookish ?? this.nonbookish,
1158+ patarin: patarin ?? this.patarin,
1159+ preliberal: preliberal ?? this.preliberal,
1160+ prettifier: prettifier ?? this.prettifier,
1161+ rangework: rangework ?? this.rangework,
1162+ redient: redient ?? this.redient,
1163+ subfusiform: subfusiform ?? this.subfusiform,
1164+ suicidical: suicidical ?? this.suicidical,
1165+ swow: swow ?? this.swow,
1166+ wastrel: wastrel ?? this.wastrel,
1167+ wingle: wingle ?? this.wingle,
1168+ );
1169+
1170+ factory DiscordiaClass.fromJson(Map<String, dynamic> json) => DiscordiaClass(
1171+ altaic: json["Altaic"],
1172+ amoristic: json["amoristic"],
1173+ blennophthalmia: json["blennophthalmia"],
1174+ catharticalness: json["catharticalness"]?.toDouble(),
1175+ chirotherium: json["Chirotherium"],
1176+ disciplinability: json["disciplinability"],
1177+ disdiapason: json["disdiapason"],
1178+ goofer: json["goofer"],
1179+ homocerc: json["homocerc"],
1180+ laryngograph: json["laryngograph"],
1181+ leucitis: json["leucitis"],
1182+ lymphocyst: json["lymphocyst"],
1183+ microcosmology: json["microcosmology"],
1184+ nauseation: json["nauseation"],
1185+ nonbookish: json["nonbookish"],
1186+ patarin: json["Patarin"],
1187+ preliberal: json["preliberal"],
1188+ prettifier: json["prettifier"],
1189+ rangework: json["rangework"],
1190+ redient: json["redient"],
1191+ subfusiform: json["subfusiform"],
1192+ suicidical: json["suicidical"],
1193+ swow: json["swow"],
1194+ wastrel: json["wastrel"],
1195+ wingle: json["wingle"],
1196+ );
1197+
1198+ Map<String, dynamic> toJson() => {
1199+ "Altaic": altaic,
1200+ "amoristic": amoristic,
1201+ "blennophthalmia": blennophthalmia,
1202+ "catharticalness": catharticalness,
1203+ "Chirotherium": chirotherium,
1204+ "disciplinability": disciplinability,
1205+ "disdiapason": disdiapason,
1206+ "goofer": goofer,
1207+ "homocerc": homocerc,
1208+ "laryngograph": laryngograph,
1209+ "leucitis": leucitis,
1210+ "lymphocyst": lymphocyst,
1211+ "microcosmology": microcosmology,
1212+ "nauseation": nauseation,
1213+ "nonbookish": nonbookish,
1214+ "Patarin": patarin,
1215+ "preliberal": preliberal,
1216+ "prettifier": prettifier,
1217+ "rangework": rangework,
1218+ "redient": redient,
1219+ "subfusiform": subfusiform,
1220+ "suicidical": suicidical,
1221+ "swow": swow,
1222+ "wastrel": wastrel,
1223+ "wingle": wingle,
1224+ };
1225+}
1226+
1227+class GryphosaurusClass {
1228+ final dynamic amissibility;
1229+ final dynamic burushaski;
1230+ final dynamic citronin;
1231+ final dynamic coplaintiff;
1232+ final dynamic disquisitionary;
1233+ final dynamic enoplan;
1234+ final dynamic faintness;
1235+ final dynamic hebetomy;
1236+ final dynamic islandry;
1237+ final dynamic lameduck;
1238+ final dynamic overbattle;
1239+ final dynamic overinterested;
1240+ final dynamic phrenologic;
1241+ final dynamic rainband;
1242+ final dynamic shiningly;
1243+ final dynamic stamineous;
1244+ final dynamic subscapularis;
1245+ final dynamic tahami;
1246+ final dynamic undaubed;
1247+ final dynamic underntime;
1248+
1249+ GryphosaurusClass({
1250+ required this.amissibility,
1251+ required this.burushaski,
1252+ required this.citronin,
1253+ required this.coplaintiff,
1254+ required this.disquisitionary,
1255+ required this.enoplan,
1256+ required this.faintness,
1257+ required this.hebetomy,
1258+ required this.islandry,
1259+ required this.lameduck,
1260+ required this.overbattle,
1261+ required this.overinterested,
1262+ required this.phrenologic,
1263+ required this.rainband,
1264+ required this.shiningly,
1265+ required this.stamineous,
1266+ required this.subscapularis,
1267+ required this.tahami,
1268+ required this.undaubed,
1269+ required this.underntime,
1270+ });
1271+
1272+ GryphosaurusClass copyWith({
1273+ dynamic amissibility,
1274+ dynamic burushaski,
1275+ dynamic citronin,
1276+ dynamic coplaintiff,
1277+ dynamic disquisitionary,
1278+ dynamic enoplan,
1279+ dynamic faintness,
1280+ dynamic hebetomy,
1281+ dynamic islandry,
1282+ dynamic lameduck,
1283+ dynamic overbattle,
1284+ dynamic overinterested,
1285+ dynamic phrenologic,
1286+ dynamic rainband,
1287+ dynamic shiningly,
1288+ dynamic stamineous,
1289+ dynamic subscapularis,
1290+ dynamic tahami,
1291+ dynamic undaubed,
1292+ dynamic underntime,
1293+ }) =>
1294+ GryphosaurusClass(
1295+ amissibility: amissibility ?? this.amissibility,
1296+ burushaski: burushaski ?? this.burushaski,
1297+ citronin: citronin ?? this.citronin,
1298+ coplaintiff: coplaintiff ?? this.coplaintiff,
1299+ disquisitionary: disquisitionary ?? this.disquisitionary,
1300+ enoplan: enoplan ?? this.enoplan,
1301+ faintness: faintness ?? this.faintness,
1302+ hebetomy: hebetomy ?? this.hebetomy,
1303+ islandry: islandry ?? this.islandry,
1304+ lameduck: lameduck ?? this.lameduck,
1305+ overbattle: overbattle ?? this.overbattle,
1306+ overinterested: overinterested ?? this.overinterested,
1307+ phrenologic: phrenologic ?? this.phrenologic,
1308+ rainband: rainband ?? this.rainband,
1309+ shiningly: shiningly ?? this.shiningly,
1310+ stamineous: stamineous ?? this.stamineous,
1311+ subscapularis: subscapularis ?? this.subscapularis,
1312+ tahami: tahami ?? this.tahami,
1313+ undaubed: undaubed ?? this.undaubed,
1314+ underntime: underntime ?? this.underntime,
1315+ );
1316+
1317+ factory GryphosaurusClass.fromJson(Map<String, dynamic> json) => GryphosaurusClass(
1318+ amissibility: (json.containsKey("amissibility") ? json["amissibility"] : throw FormatException('Missing required property')),
1319+ burushaski: (json.containsKey("Burushaski") ? json["Burushaski"] : throw FormatException('Missing required property')),
1320+ citronin: (json.containsKey("citronin") ? json["citronin"] : throw FormatException('Missing required property')),
1321+ coplaintiff: (json.containsKey("coplaintiff") ? json["coplaintiff"] : throw FormatException('Missing required property')),
1322+ disquisitionary: (json.containsKey("disquisitionary") ? json["disquisitionary"] : throw FormatException('Missing required property')),
1323+ enoplan: (json.containsKey("enoplan") ? json["enoplan"] : throw FormatException('Missing required property')),
1324+ faintness: (json.containsKey("faintness") ? json["faintness"] : throw FormatException('Missing required property')),
1325+ hebetomy: (json.containsKey("hebetomy") ? json["hebetomy"] : throw FormatException('Missing required property')),
1326+ islandry: (json.containsKey("islandry") ? json["islandry"] : throw FormatException('Missing required property')),
1327+ lameduck: (json.containsKey("lameduck") ? json["lameduck"] : throw FormatException('Missing required property')),
1328+ overbattle: (json.containsKey("overbattle") ? json["overbattle"] : throw FormatException('Missing required property')),
1329+ overinterested: (json.containsKey("overinterested") ? json["overinterested"] : throw FormatException('Missing required property')),
1330+ phrenologic: (json.containsKey("phrenologic") ? json["phrenologic"] : throw FormatException('Missing required property')),
1331+ rainband: (json.containsKey("rainband") ? json["rainband"] : throw FormatException('Missing required property')),
1332+ shiningly: (json.containsKey("shiningly") ? json["shiningly"] : throw FormatException('Missing required property')),
1333+ stamineous: (json.containsKey("stamineous") ? json["stamineous"] : throw FormatException('Missing required property')),
1334+ subscapularis: (json.containsKey("subscapularis") ? json["subscapularis"] : throw FormatException('Missing required property')),
1335+ tahami: (json.containsKey("Tahami") ? json["Tahami"] : throw FormatException('Missing required property')),
1336+ undaubed: (json.containsKey("undaubed") ? json["undaubed"] : throw FormatException('Missing required property')),
1337+ underntime: (json.containsKey("underntime") ? json["underntime"] : throw FormatException('Missing required property')),
1338+ );
1339+
1340+ Map<String, dynamic> toJson() => {
1341+ "amissibility": amissibility,
1342+ "Burushaski": burushaski,
1343+ "citronin": citronin,
1344+ "coplaintiff": coplaintiff,
1345+ "disquisitionary": disquisitionary,
1346+ "enoplan": enoplan,
1347+ "faintness": faintness,
1348+ "hebetomy": hebetomy,
1349+ "islandry": islandry,
1350+ "lameduck": lameduck,
1351+ "overbattle": overbattle,
1352+ "overinterested": overinterested,
1353+ "phrenologic": phrenologic,
1354+ "rainband": rainband,
1355+ "shiningly": shiningly,
1356+ "stamineous": stamineous,
1357+ "subscapularis": subscapularis,
1358+ "Tahami": tahami,
1359+ "undaubed": undaubed,
1360+ "underntime": underntime,
1361+ };
1362+}
1363+
1364+class LaviniaClass {
1365+ final int? agitable;
1366+ final int? asininity;
1367+ final int? benefiter;
1368+ final int? bronzelike;
1369+ final double? catharticalness;
1370+ final int? chirotherium;
1371+ final int? cholesteatomatous;
1372+ final int? deprivement;
1373+ final String? disdiapason;
1374+ final int? flippantness;
1375+ final int? fogproof;
1376+ final bool? homocerc;
1377+ final int? merrymeeting;
1378+ final dynamic nonbookish;
1379+ final int? overcareful;
1380+ final int? panaris;
1381+ final int? preacceptance;
1382+ final int? quinoxaline;
1383+ final int? sig;
1384+ final int? superconfusion;
1385+ final int? tacana;
1386+ final int? tillotter;
1387+ final int? tranquillize;
1388+ final int? unquestionable;
1389+ final int? uproute;
1390+
1391+ LaviniaClass({
1392+ this.agitable,
1393+ this.asininity,
1394+ this.benefiter,
1395+ this.bronzelike,
1396+ this.catharticalness,
1397+ this.chirotherium,
1398+ this.cholesteatomatous,
1399+ this.deprivement,
1400+ this.disdiapason,
1401+ this.flippantness,
1402+ this.fogproof,
1403+ this.homocerc,
1404+ this.merrymeeting,
1405+ this.nonbookish,
1406+ this.overcareful,
1407+ this.panaris,
1408+ this.preacceptance,
1409+ this.quinoxaline,
1410+ this.sig,
1411+ this.superconfusion,
1412+ this.tacana,
1413+ this.tillotter,
1414+ this.tranquillize,
1415+ this.unquestionable,
1416+ this.uproute,
1417+ });
1418+
1419+ LaviniaClass copyWith({
1420+ int? agitable,
1421+ int? asininity,
1422+ int? benefiter,
1423+ int? bronzelike,
1424+ double? catharticalness,
1425+ int? chirotherium,
1426+ int? cholesteatomatous,
1427+ int? deprivement,
1428+ String? disdiapason,
1429+ int? flippantness,
1430+ int? fogproof,
1431+ bool? homocerc,
1432+ int? merrymeeting,
1433+ dynamic nonbookish,
1434+ int? overcareful,
1435+ int? panaris,
1436+ int? preacceptance,
1437+ int? quinoxaline,
1438+ int? sig,
1439+ int? superconfusion,
1440+ int? tacana,
1441+ int? tillotter,
1442+ int? tranquillize,
1443+ int? unquestionable,
1444+ int? uproute,
1445+ }) =>
1446+ LaviniaClass(
1447+ agitable: agitable ?? this.agitable,
1448+ asininity: asininity ?? this.asininity,
1449+ benefiter: benefiter ?? this.benefiter,
1450+ bronzelike: bronzelike ?? this.bronzelike,
1451+ catharticalness: catharticalness ?? this.catharticalness,
1452+ chirotherium: chirotherium ?? this.chirotherium,
1453+ cholesteatomatous: cholesteatomatous ?? this.cholesteatomatous,
1454+ deprivement: deprivement ?? this.deprivement,
1455+ disdiapason: disdiapason ?? this.disdiapason,
1456+ flippantness: flippantness ?? this.flippantness,
1457+ fogproof: fogproof ?? this.fogproof,
1458+ homocerc: homocerc ?? this.homocerc,
1459+ merrymeeting: merrymeeting ?? this.merrymeeting,
1460+ nonbookish: nonbookish ?? this.nonbookish,
1461+ overcareful: overcareful ?? this.overcareful,
1462+ panaris: panaris ?? this.panaris,
1463+ preacceptance: preacceptance ?? this.preacceptance,
1464+ quinoxaline: quinoxaline ?? this.quinoxaline,
1465+ sig: sig ?? this.sig,
1466+ superconfusion: superconfusion ?? this.superconfusion,
1467+ tacana: tacana ?? this.tacana,
1468+ tillotter: tillotter ?? this.tillotter,
1469+ tranquillize: tranquillize ?? this.tranquillize,
1470+ unquestionable: unquestionable ?? this.unquestionable,
1471+ uproute: uproute ?? this.uproute,
1472+ );
1473+
1474+ factory LaviniaClass.fromJson(Map<String, dynamic> json) => LaviniaClass(
1475+ agitable: json["agitable"],
1476+ asininity: json["asininity"],
1477+ benefiter: json["benefiter"],
1478+ bronzelike: json["bronzelike"],
1479+ catharticalness: json["catharticalness"]?.toDouble(),
1480+ chirotherium: json["Chirotherium"],
1481+ cholesteatomatous: json["cholesteatomatous"],
1482+ deprivement: json["deprivement"],
1483+ disdiapason: json["disdiapason"],
1484+ flippantness: json["flippantness"],
1485+ fogproof: json["fogproof"],
1486+ homocerc: json["homocerc"],
1487+ merrymeeting: json["merrymeeting"],
1488+ nonbookish: json["nonbookish"],
1489+ overcareful: json["overcareful"],
1490+ panaris: json["panaris"],
1491+ preacceptance: json["preacceptance"],
1492+ quinoxaline: json["quinoxaline"],
1493+ sig: json["sig"],
1494+ superconfusion: json["superconfusion"],
1495+ tacana: json["Tacana"],
1496+ tillotter: json["tillotter"],
1497+ tranquillize: json["tranquillize"],
1498+ unquestionable: json["unquestionable"],
1499+ uproute: json["uproute"],
1500+ );
1501+
1502+ Map<String, dynamic> toJson() => {
1503+ "agitable": agitable,
1504+ "asininity": asininity,
1505+ "benefiter": benefiter,
1506+ "bronzelike": bronzelike,
1507+ "catharticalness": catharticalness,
1508+ "Chirotherium": chirotherium,
1509+ "cholesteatomatous": cholesteatomatous,
1510+ "deprivement": deprivement,
1511+ "disdiapason": disdiapason,
1512+ "flippantness": flippantness,
1513+ "fogproof": fogproof,
1514+ "homocerc": homocerc,
1515+ "merrymeeting": merrymeeting,
1516+ "nonbookish": nonbookish,
1517+ "overcareful": overcareful,
1518+ "panaris": panaris,
1519+ "preacceptance": preacceptance,
1520+ "quinoxaline": quinoxaline,
1521+ "sig": sig,
1522+ "superconfusion": superconfusion,
1523+ "Tacana": tacana,
1524+ "tillotter": tillotter,
1525+ "tranquillize": tranquillize,
1526+ "unquestionable": unquestionable,
1527+ "uproute": uproute,
1528+ };
1529+}
1530+
1531+class OskarClass {
1532+ final dynamic acrobates;
1533+ final dynamic beanshooter;
1534+ final dynamic bearhound;
1535+ final dynamic cayuga;
1536+ final dynamic guarneri;
1537+ final dynamic hypochondriacism;
1538+ final dynamic indication;
1539+ final dynamic jaculative;
1540+ final dynamic nagana;
1541+ final dynamic netherlandish;
1542+ final dynamic noctivagous;
1543+ final dynamic nonphysiological;
1544+ final dynamic praxis;
1545+ final dynamic provision;
1546+ final dynamic subterhuman;
1547+ final dynamic sunlit;
1548+ final dynamic syncraniate;
1549+ final dynamic teachment;
1550+ final dynamic unmutinous;
1551+ final dynamic unstoppable;
1552+
1553+ OskarClass({
1554+ required this.acrobates,
1555+ required this.beanshooter,
1556+ required this.bearhound,
1557+ required this.cayuga,
1558+ required this.guarneri,
1559+ required this.hypochondriacism,
1560+ required this.indication,
1561+ required this.jaculative,
1562+ required this.nagana,
1563+ required this.netherlandish,
1564+ required this.noctivagous,
1565+ required this.nonphysiological,
1566+ required this.praxis,
1567+ required this.provision,
1568+ required this.subterhuman,
1569+ required this.sunlit,
1570+ required this.syncraniate,
1571+ required this.teachment,
1572+ required this.unmutinous,
1573+ required this.unstoppable,
1574+ });
1575+
1576+ OskarClass copyWith({
1577+ dynamic acrobates,
1578+ dynamic beanshooter,
1579+ dynamic bearhound,
1580+ dynamic cayuga,
1581+ dynamic guarneri,
1582+ dynamic hypochondriacism,
1583+ dynamic indication,
1584+ dynamic jaculative,
1585+ dynamic nagana,
1586+ dynamic netherlandish,
1587+ dynamic noctivagous,
1588+ dynamic nonphysiological,
1589+ dynamic praxis,
1590+ dynamic provision,
1591+ dynamic subterhuman,
1592+ dynamic sunlit,
1593+ dynamic syncraniate,
1594+ dynamic teachment,
1595+ dynamic unmutinous,
1596+ dynamic unstoppable,
1597+ }) =>
1598+ OskarClass(
1599+ acrobates: acrobates ?? this.acrobates,
1600+ beanshooter: beanshooter ?? this.beanshooter,
1601+ bearhound: bearhound ?? this.bearhound,
1602+ cayuga: cayuga ?? this.cayuga,
1603+ guarneri: guarneri ?? this.guarneri,
1604+ hypochondriacism: hypochondriacism ?? this.hypochondriacism,
1605+ indication: indication ?? this.indication,
1606+ jaculative: jaculative ?? this.jaculative,
1607+ nagana: nagana ?? this.nagana,
1608+ netherlandish: netherlandish ?? this.netherlandish,
1609+ noctivagous: noctivagous ?? this.noctivagous,
1610+ nonphysiological: nonphysiological ?? this.nonphysiological,
1611+ praxis: praxis ?? this.praxis,
1612+ provision: provision ?? this.provision,
1613+ subterhuman: subterhuman ?? this.subterhuman,
1614+ sunlit: sunlit ?? this.sunlit,
1615+ syncraniate: syncraniate ?? this.syncraniate,
1616+ teachment: teachment ?? this.teachment,
1617+ unmutinous: unmutinous ?? this.unmutinous,
1618+ unstoppable: unstoppable ?? this.unstoppable,
1619+ );
1620+
1621+ factory OskarClass.fromJson(Map<String, dynamic> json) => OskarClass(
1622+ acrobates: (json.containsKey("Acrobates") ? json["Acrobates"] : throw FormatException('Missing required property')),
1623+ beanshooter: (json.containsKey("beanshooter") ? json["beanshooter"] : throw FormatException('Missing required property')),
1624+ bearhound: (json.containsKey("bearhound") ? json["bearhound"] : throw FormatException('Missing required property')),
1625+ cayuga: (json.containsKey("Cayuga") ? json["Cayuga"] : throw FormatException('Missing required property')),
1626+ guarneri: (json.containsKey("guarneri") ? json["guarneri"] : throw FormatException('Missing required property')),
1627+ hypochondriacism: (json.containsKey("hypochondriacism") ? json["hypochondriacism"] : throw FormatException('Missing required property')),
1628+ indication: (json.containsKey("indication") ? json["indication"] : throw FormatException('Missing required property')),
1629+ jaculative: (json.containsKey("jaculative") ? json["jaculative"] : throw FormatException('Missing required property')),
1630+ nagana: (json.containsKey("nagana") ? json["nagana"] : throw FormatException('Missing required property')),
1631+ netherlandish: (json.containsKey("Netherlandish") ? json["Netherlandish"] : throw FormatException('Missing required property')),
1632+ noctivagous: (json.containsKey("noctivagous") ? json["noctivagous"] : throw FormatException('Missing required property')),
1633+ nonphysiological: (json.containsKey("nonphysiological") ? json["nonphysiological"] : throw FormatException('Missing required property')),
1634+ praxis: (json.containsKey("praxis") ? json["praxis"] : throw FormatException('Missing required property')),
1635+ provision: (json.containsKey("provision") ? json["provision"] : throw FormatException('Missing required property')),
1636+ subterhuman: (json.containsKey("subterhuman") ? json["subterhuman"] : throw FormatException('Missing required property')),
1637+ sunlit: (json.containsKey("sunlit") ? json["sunlit"] : throw FormatException('Missing required property')),
1638+ syncraniate: (json.containsKey("syncraniate") ? json["syncraniate"] : throw FormatException('Missing required property')),
1639+ teachment: (json.containsKey("teachment") ? json["teachment"] : throw FormatException('Missing required property')),
1640+ unmutinous: (json.containsKey("unmutinous") ? json["unmutinous"] : throw FormatException('Missing required property')),
1641+ unstoppable: (json.containsKey("unstoppable") ? json["unstoppable"] : throw FormatException('Missing required property')),
1642+ );
1643+
1644+ Map<String, dynamic> toJson() => {
1645+ "Acrobates": acrobates,
1646+ "beanshooter": beanshooter,
1647+ "bearhound": bearhound,
1648+ "Cayuga": cayuga,
1649+ "guarneri": guarneri,
1650+ "hypochondriacism": hypochondriacism,
1651+ "indication": indication,
1652+ "jaculative": jaculative,
1653+ "nagana": nagana,
1654+ "Netherlandish": netherlandish,
1655+ "noctivagous": noctivagous,
1656+ "nonphysiological": nonphysiological,
1657+ "praxis": praxis,
1658+ "provision": provision,
1659+ "subterhuman": subterhuman,
1660+ "sunlit": sunlit,
1661+ "syncraniate": syncraniate,
1662+ "teachment": teachment,
1663+ "unmutinous": unmutinous,
1664+ "unstoppable": unstoppable,
1665+ };
1666+}
Melixirdefault / QuickType.ex+468 −66
@@ -323,39 +323,173 @@ defmodule Amphithyron do
323323 undecimal: integer() | nil
324324 }
325325
326+ def decode_akroasis(value) when is_integer(value), do: value
327+ def decode_akroasis(_), do: {:error, "Unexpected type when decoding Amphithyron.akroasis"}
328+
329+ def encode_akroasis(value) when is_integer(value), do: value
330+ def encode_akroasis(_), do: {:error, "Unexpected type when encoding Amphithyron.akroasis"}
331+
332+ def decode_antiphonical(value) when is_integer(value), do: value
333+ def decode_antiphonical(_), do: {:error, "Unexpected type when decoding Amphithyron.antiphonical"}
334+
335+ def encode_antiphonical(value) when is_integer(value), do: value
336+ def encode_antiphonical(_), do: {:error, "Unexpected type when encoding Amphithyron.antiphonical"}
337+
338+ def decode_basebred(value) when is_integer(value), do: value
339+ def decode_basebred(_), do: {:error, "Unexpected type when decoding Amphithyron.basebred"}
340+
341+ def encode_basebred(value) when is_integer(value), do: value
342+ def encode_basebred(_), do: {:error, "Unexpected type when encoding Amphithyron.basebred"}
343+
344+ def decode_catharticalness(value) when is_float(value), do: value
345+ def decode_catharticalness(value) when is_integer(value), do: value
346+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding Amphithyron.catharticalness"}
347+
348+ def encode_catharticalness(value) when is_float(value), do: value
349+ def encode_catharticalness(value) when is_integer(value), do: value
350+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding Amphithyron.catharticalness"}
351+
352+ def decode_chirotherium(value) when is_integer(value), do: value
353+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding Amphithyron.chirotherium"}
354+
355+ def encode_chirotherium(value) when is_integer(value), do: value
356+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding Amphithyron.chirotherium"}
357+
358+ def decode_conductometric(value) when is_integer(value), do: value
359+ def decode_conductometric(_), do: {:error, "Unexpected type when decoding Amphithyron.conductometric"}
360+
361+ def encode_conductometric(value) when is_integer(value), do: value
362+ def encode_conductometric(_), do: {:error, "Unexpected type when encoding Amphithyron.conductometric"}
363+
326364 def decode_disdiapason(value) when is_binary(value), do: value
327365 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding Amphithyron.disdiapason"}
328366
329367 def encode_disdiapason(value) when is_binary(value), do: value
330368 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding Amphithyron.disdiapason"}
331369
370+ def decode_ensilation(value) when is_integer(value), do: value
371+ def decode_ensilation(_), do: {:error, "Unexpected type when decoding Amphithyron.ensilation"}
372+
373+ def encode_ensilation(value) when is_integer(value), do: value
374+ def encode_ensilation(_), do: {:error, "Unexpected type when encoding Amphithyron.ensilation"}
375+
376+ def decode_eyebolt(value) when is_integer(value), do: value
377+ def decode_eyebolt(_), do: {:error, "Unexpected type when decoding Amphithyron.eyebolt"}
378+
379+ def encode_eyebolt(value) when is_integer(value), do: value
380+ def encode_eyebolt(_), do: {:error, "Unexpected type when encoding Amphithyron.eyebolt"}
381+
382+ def decode_fistulated(value) when is_integer(value), do: value
383+ def decode_fistulated(_), do: {:error, "Unexpected type when decoding Amphithyron.fistulated"}
384+
385+ def encode_fistulated(value) when is_integer(value), do: value
386+ def encode_fistulated(_), do: {:error, "Unexpected type when encoding Amphithyron.fistulated"}
387+
388+ def decode_heteropod(value) when is_integer(value), do: value
389+ def decode_heteropod(_), do: {:error, "Unexpected type when decoding Amphithyron.heteropod"}
390+
391+ def encode_heteropod(value) when is_integer(value), do: value
392+ def encode_heteropod(_), do: {:error, "Unexpected type when encoding Amphithyron.heteropod"}
393+
394+ def decode_juniperus(value) when is_integer(value), do: value
395+ def decode_juniperus(_), do: {:error, "Unexpected type when decoding Amphithyron.juniperus"}
396+
397+ def encode_juniperus(value) when is_integer(value), do: value
398+ def encode_juniperus(_), do: {:error, "Unexpected type when encoding Amphithyron.juniperus"}
399+
400+ def decode_labyrinthically(value) when is_integer(value), do: value
401+ def decode_labyrinthically(_), do: {:error, "Unexpected type when decoding Amphithyron.labyrinthically"}
402+
403+ def encode_labyrinthically(value) when is_integer(value), do: value
404+ def encode_labyrinthically(_), do: {:error, "Unexpected type when encoding Amphithyron.labyrinthically"}
405+
406+ def decode_martyrization(value) when is_integer(value), do: value
407+ def decode_martyrization(_), do: {:error, "Unexpected type when decoding Amphithyron.martyrization"}
408+
409+ def encode_martyrization(value) when is_integer(value), do: value
410+ def encode_martyrization(_), do: {:error, "Unexpected type when encoding Amphithyron.martyrization"}
411+
412+ def decode_mispolicy(value) when is_integer(value), do: value
413+ def decode_mispolicy(_), do: {:error, "Unexpected type when decoding Amphithyron.mispolicy"}
414+
415+ def encode_mispolicy(value) when is_integer(value), do: value
416+ def encode_mispolicy(_), do: {:error, "Unexpected type when encoding Amphithyron.mispolicy"}
417+
418+ def decode_multipara(value) when is_integer(value), do: value
419+ def decode_multipara(_), do: {:error, "Unexpected type when decoding Amphithyron.multipara"}
420+
421+ def encode_multipara(value) when is_integer(value), do: value
422+ def encode_multipara(_), do: {:error, "Unexpected type when encoding Amphithyron.multipara"}
423+
424+ def decode_nazirite(value) when is_integer(value), do: value
425+ def decode_nazirite(_), do: {:error, "Unexpected type when decoding Amphithyron.nazirite"}
426+
427+ def encode_nazirite(value) when is_integer(value), do: value
428+ def encode_nazirite(_), do: {:error, "Unexpected type when encoding Amphithyron.nazirite"}
429+
430+ def decode_possessorial(value) when is_integer(value), do: value
431+ def decode_possessorial(_), do: {:error, "Unexpected type when decoding Amphithyron.possessorial"}
432+
433+ def encode_possessorial(value) when is_integer(value), do: value
434+ def encode_possessorial(_), do: {:error, "Unexpected type when encoding Amphithyron.possessorial"}
435+
436+ def decode_shamed(value) when is_integer(value), do: value
437+ def decode_shamed(_), do: {:error, "Unexpected type when decoding Amphithyron.shamed"}
438+
439+ def encode_shamed(value) when is_integer(value), do: value
440+ def encode_shamed(_), do: {:error, "Unexpected type when encoding Amphithyron.shamed"}
441+
442+ def decode_shelfworn(value) when is_integer(value), do: value
443+ def decode_shelfworn(_), do: {:error, "Unexpected type when decoding Amphithyron.shelfworn"}
444+
445+ def encode_shelfworn(value) when is_integer(value), do: value
446+ def encode_shelfworn(_), do: {:error, "Unexpected type when encoding Amphithyron.shelfworn"}
447+
448+ def decode_stagnum(value) when is_integer(value), do: value
449+ def decode_stagnum(_), do: {:error, "Unexpected type when decoding Amphithyron.stagnum"}
450+
451+ def encode_stagnum(value) when is_integer(value), do: value
452+ def encode_stagnum(_), do: {:error, "Unexpected type when encoding Amphithyron.stagnum"}
453+
454+ def decode_those(value) when is_integer(value), do: value
455+ def decode_those(_), do: {:error, "Unexpected type when decoding Amphithyron.those"}
456+
457+ def encode_those(value) when is_integer(value), do: value
458+ def encode_those(_), do: {:error, "Unexpected type when encoding Amphithyron.those"}
459+
460+ def decode_undecimal(value) when is_integer(value), do: value
461+ def decode_undecimal(_), do: {:error, "Unexpected type when decoding Amphithyron.undecimal"}
462+
463+ def encode_undecimal(value) when is_integer(value), do: value
464+ def encode_undecimal(_), do: {:error, "Unexpected type when encoding Amphithyron.undecimal"}
465+
332466 def from_map(m) do
333467 %Amphithyron{
334- akroasis: m["akroasis"],
335- antiphonical: m["antiphonical"],
336- basebred: m["basebred"],
337- catharticalness: m["catharticalness"],
338- chirotherium: m["Chirotherium"],
339- conductometric: m["conductometric"],
468+ akroasis: m["akroasis"] && decode_akroasis(m["akroasis"]),
469+ antiphonical: m["antiphonical"] && decode_antiphonical(m["antiphonical"]),
470+ basebred: m["basebred"] && decode_basebred(m["basebred"]),
471+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
472+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
473+ conductometric: m["conductometric"] && decode_conductometric(m["conductometric"]),
340474 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
341- ensilation: m["ensilation"],
342- eyebolt: m["eyebolt"],
343- fistulated: m["fistulated"],
344- heteropod: m["heteropod"],
475+ ensilation: m["ensilation"] && decode_ensilation(m["ensilation"]),
476+ eyebolt: m["eyebolt"] && decode_eyebolt(m["eyebolt"]),
477+ fistulated: m["fistulated"] && decode_fistulated(m["fistulated"]),
478+ heteropod: m["heteropod"] && decode_heteropod(m["heteropod"]),
345479 homocerc: m["homocerc"],
346- juniperus: m["Juniperus"],
347- labyrinthically: m["labyrinthically"],
348- martyrization: m["martyrization"],
349- mispolicy: m["mispolicy"],
350- multipara: m["multipara"],
351- nazirite: m["Nazirite"],
480+ juniperus: m["Juniperus"] && decode_juniperus(m["Juniperus"]),
481+ labyrinthically: m["labyrinthically"] && decode_labyrinthically(m["labyrinthically"]),
482+ martyrization: m["martyrization"] && decode_martyrization(m["martyrization"]),
483+ mispolicy: m["mispolicy"] && decode_mispolicy(m["mispolicy"]),
484+ multipara: m["multipara"] && decode_multipara(m["multipara"]),
485+ nazirite: m["Nazirite"] && decode_nazirite(m["Nazirite"]),
352486 nonbookish: m["nonbookish"],
353- possessorial: m["possessorial"],
354- shamed: m["shamed"],
355- shelfworn: m["shelfworn"],
356- stagnum: m["stagnum"],
357- those: m["Those"],
358- undecimal: m["undecimal"],
487+ possessorial: m["possessorial"] && decode_possessorial(m["possessorial"]),
488+ shamed: m["shamed"] && decode_shamed(m["shamed"]),
489+ shelfworn: m["shelfworn"] && decode_shelfworn(m["shelfworn"]),
490+ stagnum: m["stagnum"] && decode_stagnum(m["stagnum"]),
491+ those: m["Those"] && decode_those(m["Those"]),
492+ undecimal: m["undecimal"] && decode_undecimal(m["undecimal"]),
359493 }
360494 end
361495
@@ -1063,39 +1197,173 @@ defmodule DiscordiaClass do
10631197 wingle: integer() | nil
10641198 }
10651199
1200+ def decode_altaic(value) when is_integer(value), do: value
1201+ def decode_altaic(_), do: {:error, "Unexpected type when decoding DiscordiaClass.altaic"}
1202+
1203+ def encode_altaic(value) when is_integer(value), do: value
1204+ def encode_altaic(_), do: {:error, "Unexpected type when encoding DiscordiaClass.altaic"}
1205+
1206+ def decode_amoristic(value) when is_integer(value), do: value
1207+ def decode_amoristic(_), do: {:error, "Unexpected type when decoding DiscordiaClass.amoristic"}
1208+
1209+ def encode_amoristic(value) when is_integer(value), do: value
1210+ def encode_amoristic(_), do: {:error, "Unexpected type when encoding DiscordiaClass.amoristic"}
1211+
1212+ def decode_blennophthalmia(value) when is_integer(value), do: value
1213+ def decode_blennophthalmia(_), do: {:error, "Unexpected type when decoding DiscordiaClass.blennophthalmia"}
1214+
1215+ def encode_blennophthalmia(value) when is_integer(value), do: value
1216+ def encode_blennophthalmia(_), do: {:error, "Unexpected type when encoding DiscordiaClass.blennophthalmia"}
1217+
1218+ def decode_catharticalness(value) when is_float(value), do: value
1219+ def decode_catharticalness(value) when is_integer(value), do: value
1220+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding DiscordiaClass.catharticalness"}
1221+
1222+ def encode_catharticalness(value) when is_float(value), do: value
1223+ def encode_catharticalness(value) when is_integer(value), do: value
1224+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding DiscordiaClass.catharticalness"}
1225+
1226+ def decode_chirotherium(value) when is_integer(value), do: value
1227+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding DiscordiaClass.chirotherium"}
1228+
1229+ def encode_chirotherium(value) when is_integer(value), do: value
1230+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding DiscordiaClass.chirotherium"}
1231+
1232+ def decode_disciplinability(value) when is_integer(value), do: value
1233+ def decode_disciplinability(_), do: {:error, "Unexpected type when decoding DiscordiaClass.disciplinability"}
1234+
1235+ def encode_disciplinability(value) when is_integer(value), do: value
1236+ def encode_disciplinability(_), do: {:error, "Unexpected type when encoding DiscordiaClass.disciplinability"}
1237+
10661238 def decode_disdiapason(value) when is_binary(value), do: value
10671239 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding DiscordiaClass.disdiapason"}
10681240
10691241 def encode_disdiapason(value) when is_binary(value), do: value
10701242 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding DiscordiaClass.disdiapason"}
10711243
1244+ def decode_goofer(value) when is_integer(value), do: value
1245+ def decode_goofer(_), do: {:error, "Unexpected type when decoding DiscordiaClass.goofer"}
1246+
1247+ def encode_goofer(value) when is_integer(value), do: value
1248+ def encode_goofer(_), do: {:error, "Unexpected type when encoding DiscordiaClass.goofer"}
1249+
1250+ def decode_laryngograph(value) when is_integer(value), do: value
1251+ def decode_laryngograph(_), do: {:error, "Unexpected type when decoding DiscordiaClass.laryngograph"}
1252+
1253+ def encode_laryngograph(value) when is_integer(value), do: value
1254+ def encode_laryngograph(_), do: {:error, "Unexpected type when encoding DiscordiaClass.laryngograph"}
1255+
1256+ def decode_leucitis(value) when is_integer(value), do: value
1257+ def decode_leucitis(_), do: {:error, "Unexpected type when decoding DiscordiaClass.leucitis"}
1258+
1259+ def encode_leucitis(value) when is_integer(value), do: value
1260+ def encode_leucitis(_), do: {:error, "Unexpected type when encoding DiscordiaClass.leucitis"}
1261+
1262+ def decode_lymphocyst(value) when is_integer(value), do: value
1263+ def decode_lymphocyst(_), do: {:error, "Unexpected type when decoding DiscordiaClass.lymphocyst"}
1264+
1265+ def encode_lymphocyst(value) when is_integer(value), do: value
1266+ def encode_lymphocyst(_), do: {:error, "Unexpected type when encoding DiscordiaClass.lymphocyst"}
1267+
1268+ def decode_microcosmology(value) when is_integer(value), do: value
1269+ def decode_microcosmology(_), do: {:error, "Unexpected type when decoding DiscordiaClass.microcosmology"}
1270+
1271+ def encode_microcosmology(value) when is_integer(value), do: value
1272+ def encode_microcosmology(_), do: {:error, "Unexpected type when encoding DiscordiaClass.microcosmology"}
1273+
1274+ def decode_nauseation(value) when is_integer(value), do: value
1275+ def decode_nauseation(_), do: {:error, "Unexpected type when decoding DiscordiaClass.nauseation"}
1276+
1277+ def encode_nauseation(value) when is_integer(value), do: value
1278+ def encode_nauseation(_), do: {:error, "Unexpected type when encoding DiscordiaClass.nauseation"}
1279+
1280+ def decode_patarin(value) when is_integer(value), do: value
1281+ def decode_patarin(_), do: {:error, "Unexpected type when decoding DiscordiaClass.patarin"}
1282+
1283+ def encode_patarin(value) when is_integer(value), do: value
1284+ def encode_patarin(_), do: {:error, "Unexpected type when encoding DiscordiaClass.patarin"}
1285+
1286+ def decode_preliberal(value) when is_integer(value), do: value
1287+ def decode_preliberal(_), do: {:error, "Unexpected type when decoding DiscordiaClass.preliberal"}
1288+
1289+ def encode_preliberal(value) when is_integer(value), do: value
1290+ def encode_preliberal(_), do: {:error, "Unexpected type when encoding DiscordiaClass.preliberal"}
1291+
1292+ def decode_prettifier(value) when is_integer(value), do: value
1293+ def decode_prettifier(_), do: {:error, "Unexpected type when decoding DiscordiaClass.prettifier"}
1294+
1295+ def encode_prettifier(value) when is_integer(value), do: value
1296+ def encode_prettifier(_), do: {:error, "Unexpected type when encoding DiscordiaClass.prettifier"}
1297+
1298+ def decode_rangework(value) when is_integer(value), do: value
1299+ def decode_rangework(_), do: {:error, "Unexpected type when decoding DiscordiaClass.rangework"}
1300+
1301+ def encode_rangework(value) when is_integer(value), do: value
1302+ def encode_rangework(_), do: {:error, "Unexpected type when encoding DiscordiaClass.rangework"}
1303+
1304+ def decode_redient(value) when is_integer(value), do: value
1305+ def decode_redient(_), do: {:error, "Unexpected type when decoding DiscordiaClass.redient"}
1306+
1307+ def encode_redient(value) when is_integer(value), do: value
1308+ def encode_redient(_), do: {:error, "Unexpected type when encoding DiscordiaClass.redient"}
1309+
1310+ def decode_subfusiform(value) when is_integer(value), do: value
1311+ def decode_subfusiform(_), do: {:error, "Unexpected type when decoding DiscordiaClass.subfusiform"}
1312+
1313+ def encode_subfusiform(value) when is_integer(value), do: value
1314+ def encode_subfusiform(_), do: {:error, "Unexpected type when encoding DiscordiaClass.subfusiform"}
1315+
1316+ def decode_suicidical(value) when is_integer(value), do: value
1317+ def decode_suicidical(_), do: {:error, "Unexpected type when decoding DiscordiaClass.suicidical"}
1318+
1319+ def encode_suicidical(value) when is_integer(value), do: value
1320+ def encode_suicidical(_), do: {:error, "Unexpected type when encoding DiscordiaClass.suicidical"}
1321+
1322+ def decode_swow(value) when is_integer(value), do: value
1323+ def decode_swow(_), do: {:error, "Unexpected type when decoding DiscordiaClass.swow"}
1324+
1325+ def encode_swow(value) when is_integer(value), do: value
1326+ def encode_swow(_), do: {:error, "Unexpected type when encoding DiscordiaClass.swow"}
1327+
1328+ def decode_wastrel(value) when is_integer(value), do: value
1329+ def decode_wastrel(_), do: {:error, "Unexpected type when decoding DiscordiaClass.wastrel"}
1330+
1331+ def encode_wastrel(value) when is_integer(value), do: value
1332+ def encode_wastrel(_), do: {:error, "Unexpected type when encoding DiscordiaClass.wastrel"}
1333+
1334+ def decode_wingle(value) when is_integer(value), do: value
1335+ def decode_wingle(_), do: {:error, "Unexpected type when decoding DiscordiaClass.wingle"}
1336+
1337+ def encode_wingle(value) when is_integer(value), do: value
1338+ def encode_wingle(_), do: {:error, "Unexpected type when encoding DiscordiaClass.wingle"}
1339+
10721340 def from_map(m) do
10731341 %DiscordiaClass{
1074- altaic: m["Altaic"],
1075- amoristic: m["amoristic"],
1076- blennophthalmia: m["blennophthalmia"],
1077- catharticalness: m["catharticalness"],
1078- chirotherium: m["Chirotherium"],
1079- disciplinability: m["disciplinability"],
1342+ altaic: m["Altaic"] && decode_altaic(m["Altaic"]),
1343+ amoristic: m["amoristic"] && decode_amoristic(m["amoristic"]),
1344+ blennophthalmia: m["blennophthalmia"] && decode_blennophthalmia(m["blennophthalmia"]),
1345+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
1346+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
1347+ disciplinability: m["disciplinability"] && decode_disciplinability(m["disciplinability"]),
10801348 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
1081- goofer: m["goofer"],
1349+ goofer: m["goofer"] && decode_goofer(m["goofer"]),
10821350 homocerc: m["homocerc"],
1083- laryngograph: m["laryngograph"],
1084- leucitis: m["leucitis"],
1085- lymphocyst: m["lymphocyst"],
1086- microcosmology: m["microcosmology"],
1087- nauseation: m["nauseation"],
1351+ laryngograph: m["laryngograph"] && decode_laryngograph(m["laryngograph"]),
1352+ leucitis: m["leucitis"] && decode_leucitis(m["leucitis"]),
1353+ lymphocyst: m["lymphocyst"] && decode_lymphocyst(m["lymphocyst"]),
1354+ microcosmology: m["microcosmology"] && decode_microcosmology(m["microcosmology"]),
1355+ nauseation: m["nauseation"] && decode_nauseation(m["nauseation"]),
10881356 nonbookish: m["nonbookish"],
1089- patarin: m["Patarin"],
1090- preliberal: m["preliberal"],
1091- prettifier: m["prettifier"],
1092- rangework: m["rangework"],
1093- redient: m["redient"],
1094- subfusiform: m["subfusiform"],
1095- suicidical: m["suicidical"],
1096- swow: m["swow"],
1097- wastrel: m["wastrel"],
1098- wingle: m["wingle"],
1357+ patarin: m["Patarin"] && decode_patarin(m["Patarin"]),
1358+ preliberal: m["preliberal"] && decode_preliberal(m["preliberal"]),
1359+ prettifier: m["prettifier"] && decode_prettifier(m["prettifier"]),
1360+ rangework: m["rangework"] && decode_rangework(m["rangework"]),
1361+ redient: m["redient"] && decode_redient(m["redient"]),
1362+ subfusiform: m["subfusiform"] && decode_subfusiform(m["subfusiform"]),
1363+ suicidical: m["suicidical"] && decode_suicidical(m["suicidical"]),
1364+ swow: m["swow"] && decode_swow(m["swow"]),
1365+ wastrel: m["wastrel"] && decode_wastrel(m["wastrel"]),
1366+ wingle: m["wingle"] && decode_wingle(m["wingle"]),
10991367 }
11001368 end
11011369
@@ -1383,39 +1651,173 @@ defmodule LaviniaClass do
13831651 uproute: integer() | nil
13841652 }
13851653
1654+ def decode_agitable(value) when is_integer(value), do: value
1655+ def decode_agitable(_), do: {:error, "Unexpected type when decoding LaviniaClass.agitable"}
1656+
1657+ def encode_agitable(value) when is_integer(value), do: value
1658+ def encode_agitable(_), do: {:error, "Unexpected type when encoding LaviniaClass.agitable"}
1659+
1660+ def decode_asininity(value) when is_integer(value), do: value
1661+ def decode_asininity(_), do: {:error, "Unexpected type when decoding LaviniaClass.asininity"}
1662+
1663+ def encode_asininity(value) when is_integer(value), do: value
1664+ def encode_asininity(_), do: {:error, "Unexpected type when encoding LaviniaClass.asininity"}
1665+
1666+ def decode_benefiter(value) when is_integer(value), do: value
1667+ def decode_benefiter(_), do: {:error, "Unexpected type when decoding LaviniaClass.benefiter"}
1668+
1669+ def encode_benefiter(value) when is_integer(value), do: value
1670+ def encode_benefiter(_), do: {:error, "Unexpected type when encoding LaviniaClass.benefiter"}
1671+
1672+ def decode_bronzelike(value) when is_integer(value), do: value
1673+ def decode_bronzelike(_), do: {:error, "Unexpected type when decoding LaviniaClass.bronzelike"}
1674+
1675+ def encode_bronzelike(value) when is_integer(value), do: value
1676+ def encode_bronzelike(_), do: {:error, "Unexpected type when encoding LaviniaClass.bronzelike"}
1677+
1678+ def decode_catharticalness(value) when is_float(value), do: value
1679+ def decode_catharticalness(value) when is_integer(value), do: value
1680+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding LaviniaClass.catharticalness"}
1681+
1682+ def encode_catharticalness(value) when is_float(value), do: value
1683+ def encode_catharticalness(value) when is_integer(value), do: value
1684+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding LaviniaClass.catharticalness"}
1685+
1686+ def decode_chirotherium(value) when is_integer(value), do: value
1687+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding LaviniaClass.chirotherium"}
1688+
1689+ def encode_chirotherium(value) when is_integer(value), do: value
1690+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding LaviniaClass.chirotherium"}
1691+
1692+ def decode_cholesteatomatous(value) when is_integer(value), do: value
1693+ def decode_cholesteatomatous(_), do: {:error, "Unexpected type when decoding LaviniaClass.cholesteatomatous"}
1694+
1695+ def encode_cholesteatomatous(value) when is_integer(value), do: value
1696+ def encode_cholesteatomatous(_), do: {:error, "Unexpected type when encoding LaviniaClass.cholesteatomatous"}
1697+
1698+ def decode_deprivement(value) when is_integer(value), do: value
1699+ def decode_deprivement(_), do: {:error, "Unexpected type when decoding LaviniaClass.deprivement"}
1700+
1701+ def encode_deprivement(value) when is_integer(value), do: value
1702+ def encode_deprivement(_), do: {:error, "Unexpected type when encoding LaviniaClass.deprivement"}
1703+
13861704 def decode_disdiapason(value) when is_binary(value), do: value
13871705 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding LaviniaClass.disdiapason"}
13881706
13891707 def encode_disdiapason(value) when is_binary(value), do: value
13901708 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding LaviniaClass.disdiapason"}
13911709
1710+ def decode_flippantness(value) when is_integer(value), do: value
1711+ def decode_flippantness(_), do: {:error, "Unexpected type when decoding LaviniaClass.flippantness"}
1712+
1713+ def encode_flippantness(value) when is_integer(value), do: value
1714+ def encode_flippantness(_), do: {:error, "Unexpected type when encoding LaviniaClass.flippantness"}
1715+
1716+ def decode_fogproof(value) when is_integer(value), do: value
1717+ def decode_fogproof(_), do: {:error, "Unexpected type when decoding LaviniaClass.fogproof"}
1718+
1719+ def encode_fogproof(value) when is_integer(value), do: value
1720+ def encode_fogproof(_), do: {:error, "Unexpected type when encoding LaviniaClass.fogproof"}
1721+
1722+ def decode_merrymeeting(value) when is_integer(value), do: value
1723+ def decode_merrymeeting(_), do: {:error, "Unexpected type when decoding LaviniaClass.merrymeeting"}
1724+
1725+ def encode_merrymeeting(value) when is_integer(value), do: value
1726+ def encode_merrymeeting(_), do: {:error, "Unexpected type when encoding LaviniaClass.merrymeeting"}
1727+
1728+ def decode_overcareful(value) when is_integer(value), do: value
1729+ def decode_overcareful(_), do: {:error, "Unexpected type when decoding LaviniaClass.overcareful"}
1730+
1731+ def encode_overcareful(value) when is_integer(value), do: value
1732+ def encode_overcareful(_), do: {:error, "Unexpected type when encoding LaviniaClass.overcareful"}
1733+
1734+ def decode_panaris(value) when is_integer(value), do: value
1735+ def decode_panaris(_), do: {:error, "Unexpected type when decoding LaviniaClass.panaris"}
1736+
1737+ def encode_panaris(value) when is_integer(value), do: value
1738+ def encode_panaris(_), do: {:error, "Unexpected type when encoding LaviniaClass.panaris"}
1739+
1740+ def decode_preacceptance(value) when is_integer(value), do: value
1741+ def decode_preacceptance(_), do: {:error, "Unexpected type when decoding LaviniaClass.preacceptance"}
1742+
1743+ def encode_preacceptance(value) when is_integer(value), do: value
1744+ def encode_preacceptance(_), do: {:error, "Unexpected type when encoding LaviniaClass.preacceptance"}
1745+
1746+ def decode_quinoxaline(value) when is_integer(value), do: value
1747+ def decode_quinoxaline(_), do: {:error, "Unexpected type when decoding LaviniaClass.quinoxaline"}
1748+
1749+ def encode_quinoxaline(value) when is_integer(value), do: value
1750+ def encode_quinoxaline(_), do: {:error, "Unexpected type when encoding LaviniaClass.quinoxaline"}
1751+
1752+ def decode_sig(value) when is_integer(value), do: value
1753+ def decode_sig(_), do: {:error, "Unexpected type when decoding LaviniaClass.sig"}
1754+
1755+ def encode_sig(value) when is_integer(value), do: value
1756+ def encode_sig(_), do: {:error, "Unexpected type when encoding LaviniaClass.sig"}
1757+
1758+ def decode_superconfusion(value) when is_integer(value), do: value
1759+ def decode_superconfusion(_), do: {:error, "Unexpected type when decoding LaviniaClass.superconfusion"}
1760+
1761+ def encode_superconfusion(value) when is_integer(value), do: value
1762+ def encode_superconfusion(_), do: {:error, "Unexpected type when encoding LaviniaClass.superconfusion"}
1763+
1764+ def decode_tacana(value) when is_integer(value), do: value
1765+ def decode_tacana(_), do: {:error, "Unexpected type when decoding LaviniaClass.tacana"}
1766+
1767+ def encode_tacana(value) when is_integer(value), do: value
1768+ def encode_tacana(_), do: {:error, "Unexpected type when encoding LaviniaClass.tacana"}
1769+
1770+ def decode_tillotter(value) when is_integer(value), do: value
1771+ def decode_tillotter(_), do: {:error, "Unexpected type when decoding LaviniaClass.tillotter"}
1772+
1773+ def encode_tillotter(value) when is_integer(value), do: value
1774+ def encode_tillotter(_), do: {:error, "Unexpected type when encoding LaviniaClass.tillotter"}
1775+
1776+ def decode_tranquillize(value) when is_integer(value), do: value
1777+ def decode_tranquillize(_), do: {:error, "Unexpected type when decoding LaviniaClass.tranquillize"}
1778+
1779+ def encode_tranquillize(value) when is_integer(value), do: value
1780+ def encode_tranquillize(_), do: {:error, "Unexpected type when encoding LaviniaClass.tranquillize"}
1781+
1782+ def decode_unquestionable(value) when is_integer(value), do: value
1783+ def decode_unquestionable(_), do: {:error, "Unexpected type when decoding LaviniaClass.unquestionable"}
1784+
1785+ def encode_unquestionable(value) when is_integer(value), do: value
1786+ def encode_unquestionable(_), do: {:error, "Unexpected type when encoding LaviniaClass.unquestionable"}
1787+
1788+ def decode_uproute(value) when is_integer(value), do: value
1789+ def decode_uproute(_), do: {:error, "Unexpected type when decoding LaviniaClass.uproute"}
1790+
1791+ def encode_uproute(value) when is_integer(value), do: value
1792+ def encode_uproute(_), do: {:error, "Unexpected type when encoding LaviniaClass.uproute"}
1793+
13921794 def from_map(m) do
13931795 %LaviniaClass{
1394- agitable: m["agitable"],
1395- asininity: m["asininity"],
1396- benefiter: m["benefiter"],
1397- bronzelike: m["bronzelike"],
1398- catharticalness: m["catharticalness"],
1399- chirotherium: m["Chirotherium"],
1400- cholesteatomatous: m["cholesteatomatous"],
1401- deprivement: m["deprivement"],
1796+ agitable: m["agitable"] && decode_agitable(m["agitable"]),
1797+ asininity: m["asininity"] && decode_asininity(m["asininity"]),
1798+ benefiter: m["benefiter"] && decode_benefiter(m["benefiter"]),
1799+ bronzelike: m["bronzelike"] && decode_bronzelike(m["bronzelike"]),
1800+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
1801+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
1802+ cholesteatomatous: m["cholesteatomatous"] && decode_cholesteatomatous(m["cholesteatomatous"]),
1803+ deprivement: m["deprivement"] && decode_deprivement(m["deprivement"]),
14021804 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
1403- flippantness: m["flippantness"],
1404- fogproof: m["fogproof"],
1805+ flippantness: m["flippantness"] && decode_flippantness(m["flippantness"]),
1806+ fogproof: m["fogproof"] && decode_fogproof(m["fogproof"]),
14051807 homocerc: m["homocerc"],
1406- merrymeeting: m["merrymeeting"],
1808+ merrymeeting: m["merrymeeting"] && decode_merrymeeting(m["merrymeeting"]),
14071809 nonbookish: m["nonbookish"],
1408- overcareful: m["overcareful"],
1409- panaris: m["panaris"],
1410- preacceptance: m["preacceptance"],
1411- quinoxaline: m["quinoxaline"],
1412- sig: m["sig"],
1413- superconfusion: m["superconfusion"],
1414- tacana: m["Tacana"],
1415- tillotter: m["tillotter"],
1416- tranquillize: m["tranquillize"],
1417- unquestionable: m["unquestionable"],
1418- uproute: m["uproute"],
1810+ overcareful: m["overcareful"] && decode_overcareful(m["overcareful"]),
1811+ panaris: m["panaris"] && decode_panaris(m["panaris"]),
1812+ preacceptance: m["preacceptance"] && decode_preacceptance(m["preacceptance"]),
1813+ quinoxaline: m["quinoxaline"] && decode_quinoxaline(m["quinoxaline"]),
1814+ sig: m["sig"] && decode_sig(m["sig"]),
1815+ superconfusion: m["superconfusion"] && decode_superconfusion(m["superconfusion"]),
1816+ tacana: m["Tacana"] && decode_tacana(m["Tacana"]),
1817+ tillotter: m["tillotter"] && decode_tillotter(m["tillotter"]),
1818+ tranquillize: m["tranquillize"] && decode_tranquillize(m["tranquillize"]),
1819+ unquestionable: m["unquestionable"] && decode_unquestionable(m["unquestionable"]),
1820+ uproute: m["uproute"] && decode_uproute(m["uproute"]),
14191821 }
14201822 end
Atypescript-effect-schemajust-schema-true--8c4ca457bcba / TopLevel.ts+280 −0
@@ -0,0 +1,280 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class OskarClass extends S.Class<OskarClass>("OskarClass")({
5+ "Acrobates": S.Null,
6+ "beanshooter": S.Null,
7+ "bearhound": S.Null,
8+ "Cayuga": S.Null,
9+ "guarneri": S.Null,
10+ "hypochondriacism": S.Null,
11+ "indication": S.Null,
12+ "jaculative": S.Null,
13+ "nagana": S.Null,
14+ "Netherlandish": S.Null,
15+ "noctivagous": S.Null,
16+ "nonphysiological": S.Null,
17+ "praxis": S.Null,
18+ "provision": S.Null,
19+ "subterhuman": S.Null,
20+ "sunlit": S.Null,
21+ "syncraniate": S.Null,
22+ "teachment": S.Null,
23+ "unmutinous": S.Null,
24+ "unstoppable": S.Null,
25+}) {}
26+
27+export class LaviniaClass extends S.Class<LaviniaClass>("LaviniaClass")({
28+ "agitable": S.optional(S.NullOr(S.Int)),
29+ "asininity": S.optional(S.NullOr(S.Int)),
30+ "benefiter": S.optional(S.NullOr(S.Int)),
31+ "bronzelike": S.optional(S.NullOr(S.Int)),
32+ "catharticalness": S.optional(S.NullOr(S.Number)),
33+ "Chirotherium": S.optional(S.NullOr(S.Int)),
34+ "cholesteatomatous": S.optional(S.NullOr(S.Int)),
35+ "deprivement": S.optional(S.NullOr(S.Int)),
36+ "disdiapason": S.optional(S.NullOr(S.String)),
37+ "flippantness": S.optional(S.NullOr(S.Int)),
38+ "fogproof": S.optional(S.NullOr(S.Int)),
39+ "homocerc": S.optional(S.NullOr(S.Boolean)),
40+ "merrymeeting": S.optional(S.NullOr(S.Int)),
41+ "nonbookish": S.optional(S.Null),
42+ "overcareful": S.optional(S.NullOr(S.Int)),
43+ "panaris": S.optional(S.NullOr(S.Int)),
44+ "preacceptance": S.optional(S.NullOr(S.Int)),
45+ "quinoxaline": S.optional(S.NullOr(S.Int)),
46+ "sig": S.optional(S.NullOr(S.Int)),
47+ "superconfusion": S.optional(S.NullOr(S.Int)),
48+ "Tacana": S.optional(S.NullOr(S.Int)),
49+ "tillotter": S.optional(S.NullOr(S.Int)),
50+ "tranquillize": S.optional(S.NullOr(S.Int)),
51+ "unquestionable": S.optional(S.NullOr(S.Int)),
52+ "uproute": S.optional(S.NullOr(S.Int)),
53+}) {}
54+
55+export class GryphosaurusClass extends S.Class<GryphosaurusClass>("GryphosaurusClass")({
56+ "amissibility": S.Null,
57+ "Burushaski": S.Null,
58+ "citronin": S.Null,
59+ "coplaintiff": S.Null,
60+ "disquisitionary": S.Null,
61+ "enoplan": S.Null,
62+ "faintness": S.Null,
63+ "hebetomy": S.Null,
64+ "islandry": S.Null,
65+ "lameduck": S.Null,
66+ "overbattle": S.Null,
67+ "overinterested": S.Null,
68+ "phrenologic": S.Null,
69+ "rainband": S.Null,
70+ "shiningly": S.Null,
71+ "stamineous": S.Null,
72+ "subscapularis": S.Null,
73+ "Tahami": S.Null,
74+ "undaubed": S.Null,
75+ "underntime": S.Null,
76+}) {}
77+
78+export class DiscordiaClass extends S.Class<DiscordiaClass>("DiscordiaClass")({
79+ "Altaic": S.optional(S.NullOr(S.Int)),
80+ "amoristic": S.optional(S.NullOr(S.Int)),
81+ "blennophthalmia": S.optional(S.NullOr(S.Int)),
82+ "catharticalness": S.optional(S.NullOr(S.Number)),
83+ "Chirotherium": S.optional(S.NullOr(S.Int)),
84+ "disciplinability": S.optional(S.NullOr(S.Int)),
85+ "disdiapason": S.optional(S.NullOr(S.String)),
86+ "goofer": S.optional(S.NullOr(S.Int)),
87+ "homocerc": S.optional(S.NullOr(S.Boolean)),
88+ "laryngograph": S.optional(S.NullOr(S.Int)),
89+ "leucitis": S.optional(S.NullOr(S.Int)),
90+ "lymphocyst": S.optional(S.NullOr(S.Int)),
91+ "microcosmology": S.optional(S.NullOr(S.Int)),
92+ "nauseation": S.optional(S.NullOr(S.Int)),
93+ "nonbookish": S.optional(S.Null),
94+ "Patarin": S.optional(S.NullOr(S.Int)),
95+ "preliberal": S.optional(S.NullOr(S.Int)),
96+ "prettifier": S.optional(S.NullOr(S.Int)),
97+ "rangework": S.optional(S.NullOr(S.Int)),
98+ "redient": S.optional(S.NullOr(S.Int)),
99+ "subfusiform": S.optional(S.NullOr(S.Int)),
100+ "suicidical": S.optional(S.NullOr(S.Int)),
101+ "swow": S.optional(S.NullOr(S.Int)),
102+ "wastrel": S.optional(S.NullOr(S.Int)),
103+ "wingle": S.optional(S.NullOr(S.Int)),
104+}) {}
105+
106+export class ChytridiaceaeClass extends S.Class<ChytridiaceaeClass>("ChytridiaceaeClass")({
107+ "Batidaceae": S.Null,
108+ "Brechites": S.Null,
109+ "codespairer": S.Null,
110+ "Emery": S.Null,
111+ "enervative": S.Null,
112+ "excriminate": S.Null,
113+ "goshenite": S.Null,
114+ "grime": S.Null,
115+ "gritten": S.Null,
116+ "hectorly": S.Null,
117+ "intermediation": S.Null,
118+ "meeterly": S.Null,
119+ "Narraganset": S.Null,
120+ "onymatic": S.Null,
121+ "paddlecock": S.Null,
122+ "thana": S.Null,
123+ "thornily": S.Null,
124+ "uckia": S.Null,
125+ "unmettle": S.Null,
126+ "vorticellid": S.Null,
127+}) {}
128+
129+export class AnsarieClass extends S.Class<AnsarieClass>("AnsarieClass")({
130+ "accension": S.Null,
131+ "Alida": S.Null,
132+ "asteria": S.Null,
133+ "beriberic": S.Null,
134+ "edgebone": S.Null,
135+ "gastrodialysis": S.Null,
136+ "geographic": S.Null,
137+ "Ictonyx": S.Null,
138+ "metrocele": S.Null,
139+ "misgraft": S.Null,
140+ "monteith": S.Null,
141+ "notcher": S.Null,
142+ "prorestriction": S.Null,
143+ "Ramist": S.Null,
144+ "throatlet": S.Null,
145+ "unfair": S.Null,
146+ "unsynonymous": S.Null,
147+ "water": S.Null,
148+ "zestfully": S.Null,
149+ "zincic": S.Null,
150+}) {}
151+
152+export class AnkeeClass extends S.Class<AnkeeClass>("AnkeeClass")({
153+ "Anomoean": S.Null,
154+ "barleyhood": S.Null,
155+ "befriender": S.Null,
156+ "brutishness": S.Null,
157+ "cephalalgy": S.Null,
158+ "cirurgian": S.Null,
159+ "conventionally": S.Null,
160+ "jackshay": S.Null,
161+ "milammeter": S.Null,
162+ "Naja": S.Null,
163+ "ombrological": S.Null,
164+ "phonasthenia": S.Null,
165+ "retrievableness": S.Null,
166+ "snakily": S.Null,
167+ "swot": S.Null,
168+ "tartlet": S.Null,
169+ "thiofuran": S.Null,
170+ "tracheophone": S.Null,
171+ "tuglike": S.Null,
172+ "unscratchingly": S.Null,
173+}) {}
174+
175+export class Amphithyron extends S.Class<Amphithyron>("Amphithyron")({
176+ "akroasis": S.optional(S.NullOr(S.Int)),
177+ "antiphonical": S.optional(S.NullOr(S.Int)),
178+ "basebred": S.optional(S.NullOr(S.Int)),
179+ "catharticalness": S.optional(S.NullOr(S.Number)),
180+ "Chirotherium": S.optional(S.NullOr(S.Int)),
181+ "conductometric": S.optional(S.NullOr(S.Int)),
182+ "disdiapason": S.optional(S.NullOr(S.String)),
183+ "ensilation": S.optional(S.NullOr(S.Int)),
184+ "eyebolt": S.optional(S.NullOr(S.Int)),
185+ "fistulated": S.optional(S.NullOr(S.Int)),
186+ "heteropod": S.optional(S.NullOr(S.Int)),
187+ "homocerc": S.optional(S.NullOr(S.Boolean)),
188+ "Juniperus": S.optional(S.NullOr(S.Int)),
189+ "labyrinthically": S.optional(S.NullOr(S.Int)),
190+ "martyrization": S.optional(S.NullOr(S.Int)),
191+ "mispolicy": S.optional(S.NullOr(S.Int)),
192+ "multipara": S.optional(S.NullOr(S.Int)),
193+ "Nazirite": S.optional(S.NullOr(S.Int)),
194+ "nonbookish": S.optional(S.Null),
195+ "possessorial": S.optional(S.NullOr(S.Int)),
196+ "shamed": S.optional(S.NullOr(S.Int)),
197+ "shelfworn": S.optional(S.NullOr(S.Int)),
198+ "stagnum": S.optional(S.NullOr(S.Int)),
199+ "Those": S.optional(S.NullOr(S.Int)),
200+ "undecimal": S.optional(S.NullOr(S.Int)),
201+}) {}
202+
203+export class Rebecca extends S.Class<Rebecca>("Rebecca")({
204+ "catharticalness": S.Number,
205+ "Chirotherium": S.Int,
206+ "disdiapason": S.String,
207+ "homocerc": S.Boolean,
208+ "nonbookish": S.Null,
209+}) {}
210+
211+export class AlleviateClass extends S.Class<AlleviateClass>("AlleviateClass")({
212+ "apriori": S.Null,
213+ "beggarer": S.Null,
214+ "brokenheartedly": S.Null,
215+ "debilitation": S.Null,
216+ "frike": S.Null,
217+ "gastrolith": S.Null,
218+ "Hulsean": S.Null,
219+ "orthocentric": S.Null,
220+ "petaly": S.Null,
221+ "probudgeting": S.Null,
222+ "reacquire": S.Null,
223+ "scow": S.Null,
224+ "shutoff": S.Null,
225+ "subcontiguous": S.Null,
226+ "suffumigate": S.Null,
227+ "transformable": S.Null,
228+ "uncoroneted": S.Null,
229+ "unparking": S.Null,
230+ "unvarnishedness": S.Null,
231+ "wherewithal": S.Null,
232+}) {}
233+
234+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
235+ "Abranchiata": S.Array(S.Union(S.Array(S.Int), S.Int, S.Null)),
236+ "academe": S.Array(S.Union(S.Array(S.Int), S.Int, S.Record({ key: S.String, value: S.Int}))),
237+ "acquirable": S.Array(S.Union(S.Array(S.NullOr(S.Int)), S.Record({ key: S.String, value: S.Int}))),
238+ "aerometry": S.Array(S.Union(S.Boolean, S.Number)),
239+ "alexin": S.Array(S.Union(S.Array(S.Int), S.Boolean)),
240+ "alleviate": S.Array(S.Union(S.Array(S.NullOr(S.Int)), AlleviateClass)),
241+ "amaas": S.Array(S.Union(S.Boolean, S.Int, Rebecca)),
242+ "ambassage": S.Array(S.Union(S.Array(S.Null), S.String)),
243+ "amphithyron": S.Array(S.NullOr(Amphithyron)),
244+ "Andriana": S.Array(S.NullOr(S.String)),
245+ "ankee": S.Array(S.Union(S.Array(S.Int), S.Int, AnkeeClass)),
246+ "annihilator": S.Array(S.NullOr(S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
247+ "annulose": S.Null,
248+ "Ansarie": S.Array(S.Union(S.Array(S.Int), AnsarieClass, S.Null)),
249+ "aphasia": S.Array(S.Union(S.Array(S.Int), S.Int)),
250+ "asprawl": S.Array(S.Union(S.Number, S.String)),
251+ "attractive": S.Array(S.NullOr(S.Boolean)),
252+ "barksome": S.Record({ key: S.String, value: S.Int}),
253+ "bedesman": S.Array(S.Union(S.Boolean, S.Number, S.String)),
254+ "belard": S.Array(S.Union(S.Array(S.Int), S.Number, Rebecca)),
255+ "bocking": S.Array(S.Union(S.Array(S.Int), S.Boolean, S.Record({ key: S.String, value: S.Int}))),
256+ "brawlingly": S.Array(S.Union(S.Array(S.Null), S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
257+ "brookie": S.Array(S.Union(S.Array(S.Int), Rebecca)),
258+ "bumboatman": S.Array(S.Union(S.Array(S.Null), S.String, S.Null)),
259+ "bystreet": S.Array(S.Null),
260+ "calaverite": S.Array(S.Union(S.Array(S.Int), S.String)),
261+ "catallactic": S.Array(S.Union(S.Array(S.Null), S.Boolean, S.Record({ key: S.String, value: S.Int}))),
262+ "cemental": S.Array(S.Union(S.Array(S.Int), S.Number, S.Record({ key: S.String, value: S.Int}))),
263+ "Chytridiaceae": S.Array(S.Union(S.Boolean, ChytridiaceaeClass, S.Null)),
264+ "Discordia": S.Array(S.Union(S.Array(S.Int), DiscordiaClass)),
265+ "Endomyces": S.Array(S.Union(S.Int, S.String)),
266+ "Epinephelidae": S.Array(S.Union(S.Boolean, S.Int, S.String)),
267+ "Eupatorium": S.Array(S.Union(S.Array(S.Null), S.Record({ key: S.String, value: S.Int}))),
268+ "Gryphosaurus": S.Array(S.Union(S.Array(S.Int), S.String, GryphosaurusClass)),
269+ "Koryak": S.Array(S.Union(S.Record({ key: S.String, value: S.NullOr(S.Int)}), S.String)),
270+ "Lavinia": S.Array(S.Union(S.String, LaviniaClass)),
271+ "Oskar": S.Array(S.Union(S.Array(S.Int), OskarClass)),
272+ "Rebecca": S.Array(S.Union(S.Int, S.String, Rebecca)),
273+ "Rhomboganoidei": S.Array(S.Union(S.Array(S.Int), S.String, Rebecca)),
274+ "Rigsmal": S.Boolean,
275+ "Ruellia": S.Array(S.Union(S.Boolean, S.String, Rebecca)),
276+ "School": S.Array(S.Union(S.Int, S.Record({ key: S.String, value: S.Int}), S.Null)),
277+ "Shakespearolater": S.Array(S.Union(S.Array(S.Int), S.Number, S.String)),
278+ "Svan": S.Array(S.Number),
279+ "Wayao": S.Record({ key: S.String, value: S.Number}),
280+}) {}
Atypescript-zodjust-schema-true--8c4ca457bcba / TopLevel.ts+280 −0
@@ -0,0 +1,280 @@
1+import * as z from "zod";
2+
3+
4+export const AlleviateClassSchema = z.object({
5+ "apriori": z.null(),
6+ "beggarer": z.null(),
7+ "brokenheartedly": z.null(),
8+ "debilitation": z.null(),
9+ "frike": z.null(),
10+ "gastrolith": z.null(),
11+ "Hulsean": z.null(),
12+ "orthocentric": z.null(),
13+ "petaly": z.null(),
14+ "probudgeting": z.null(),
15+ "reacquire": z.null(),
16+ "scow": z.null(),
17+ "shutoff": z.null(),
18+ "subcontiguous": z.null(),
19+ "suffumigate": z.null(),
20+ "transformable": z.null(),
21+ "uncoroneted": z.null(),
22+ "unparking": z.null(),
23+ "unvarnishedness": z.null(),
24+ "wherewithal": z.null(),
25+});
26+
27+export const RebeccaSchema = z.object({
28+ "catharticalness": z.number(),
29+ "Chirotherium": z.number().int(),
30+ "disdiapason": z.string(),
31+ "homocerc": z.boolean(),
32+ "nonbookish": z.null(),
33+});
34+
35+export const AmphithyronSchema = z.object({
36+ "akroasis": z.number().int().optional(),
37+ "antiphonical": z.number().int().optional(),
38+ "basebred": z.number().int().optional(),
39+ "catharticalness": z.number().optional(),
40+ "Chirotherium": z.number().int().optional(),
41+ "conductometric": z.number().int().optional(),
42+ "disdiapason": z.string().optional(),
43+ "ensilation": z.number().int().optional(),
44+ "eyebolt": z.number().int().optional(),
45+ "fistulated": z.number().int().optional(),
46+ "heteropod": z.number().int().optional(),
47+ "homocerc": z.boolean().optional(),
48+ "Juniperus": z.number().int().optional(),
49+ "labyrinthically": z.number().int().optional(),
50+ "martyrization": z.number().int().optional(),
51+ "mispolicy": z.number().int().optional(),
52+ "multipara": z.number().int().optional(),
53+ "Nazirite": z.number().int().optional(),
54+ "nonbookish": z.null().optional(),
55+ "possessorial": z.number().int().optional(),
56+ "shamed": z.number().int().optional(),
57+ "shelfworn": z.number().int().optional(),
58+ "stagnum": z.number().int().optional(),
59+ "Those": z.number().int().optional(),
60+ "undecimal": z.number().int().optional(),
61+});
62+
63+export const AnkeeClassSchema = z.object({
64+ "Anomoean": z.null(),
65+ "barleyhood": z.null(),
66+ "befriender": z.null(),
67+ "brutishness": z.null(),
68+ "cephalalgy": z.null(),
69+ "cirurgian": z.null(),
70+ "conventionally": z.null(),
71+ "jackshay": z.null(),
72+ "milammeter": z.null(),
73+ "Naja": z.null(),
74+ "ombrological": z.null(),
75+ "phonasthenia": z.null(),
76+ "retrievableness": z.null(),
77+ "snakily": z.null(),
78+ "swot": z.null(),
79+ "tartlet": z.null(),
80+ "thiofuran": z.null(),
81+ "tracheophone": z.null(),
82+ "tuglike": z.null(),
83+ "unscratchingly": z.null(),
84+});
85+
86+export const AnsarieClassSchema = z.object({
87+ "accension": z.null(),
88+ "Alida": z.null(),
89+ "asteria": z.null(),
90+ "beriberic": z.null(),
91+ "edgebone": z.null(),
92+ "gastrodialysis": z.null(),
93+ "geographic": z.null(),
94+ "Ictonyx": z.null(),
95+ "metrocele": z.null(),
96+ "misgraft": z.null(),
97+ "monteith": z.null(),
98+ "notcher": z.null(),
99+ "prorestriction": z.null(),
100+ "Ramist": z.null(),
101+ "throatlet": z.null(),
102+ "unfair": z.null(),
103+ "unsynonymous": z.null(),
104+ "water": z.null(),
105+ "zestfully": z.null(),
106+ "zincic": z.null(),
107+});
108+
109+export const ChytridiaceaeClassSchema = z.object({
110+ "Batidaceae": z.null(),
111+ "Brechites": z.null(),
112+ "codespairer": z.null(),
113+ "Emery": z.null(),
114+ "enervative": z.null(),
115+ "excriminate": z.null(),
116+ "goshenite": z.null(),
117+ "grime": z.null(),
118+ "gritten": z.null(),
119+ "hectorly": z.null(),
120+ "intermediation": z.null(),
121+ "meeterly": z.null(),
122+ "Narraganset": z.null(),
123+ "onymatic": z.null(),
124+ "paddlecock": z.null(),
125+ "thana": z.null(),
126+ "thornily": z.null(),
127+ "uckia": z.null(),
128+ "unmettle": z.null(),
129+ "vorticellid": z.null(),
130+});
131+
132+export const DiscordiaClassSchema = z.object({
133+ "Altaic": z.number().int().optional(),
134+ "amoristic": z.number().int().optional(),
135+ "blennophthalmia": z.number().int().optional(),
136+ "catharticalness": z.number().optional(),
137+ "Chirotherium": z.number().int().optional(),
138+ "disciplinability": z.number().int().optional(),
139+ "disdiapason": z.string().optional(),
140+ "goofer": z.number().int().optional(),
141+ "homocerc": z.boolean().optional(),
142+ "laryngograph": z.number().int().optional(),
143+ "leucitis": z.number().int().optional(),
144+ "lymphocyst": z.number().int().optional(),
145+ "microcosmology": z.number().int().optional(),
146+ "nauseation": z.number().int().optional(),
147+ "nonbookish": z.null().optional(),
148+ "Patarin": z.number().int().optional(),
149+ "preliberal": z.number().int().optional(),
150+ "prettifier": z.number().int().optional(),
151+ "rangework": z.number().int().optional(),
152+ "redient": z.number().int().optional(),
153+ "subfusiform": z.number().int().optional(),
154+ "suicidical": z.number().int().optional(),
155+ "swow": z.number().int().optional(),
156+ "wastrel": z.number().int().optional(),
157+ "wingle": z.number().int().optional(),
158+});
159+
160+export const GryphosaurusClassSchema = z.object({
161+ "amissibility": z.null(),
162+ "Burushaski": z.null(),
163+ "citronin": z.null(),
164+ "coplaintiff": z.null(),
165+ "disquisitionary": z.null(),
166+ "enoplan": z.null(),
167+ "faintness": z.null(),
168+ "hebetomy": z.null(),
169+ "islandry": z.null(),
170+ "lameduck": z.null(),
171+ "overbattle": z.null(),
172+ "overinterested": z.null(),
173+ "phrenologic": z.null(),
174+ "rainband": z.null(),
175+ "shiningly": z.null(),
176+ "stamineous": z.null(),
177+ "subscapularis": z.null(),
178+ "Tahami": z.null(),
179+ "undaubed": z.null(),
180+ "underntime": z.null(),
181+});
182+
183+export const LaviniaClassSchema = z.object({
184+ "agitable": z.number().int().optional(),
185+ "asininity": z.number().int().optional(),
186+ "benefiter": z.number().int().optional(),
187+ "bronzelike": z.number().int().optional(),
188+ "catharticalness": z.number().optional(),
189+ "Chirotherium": z.number().int().optional(),
190+ "cholesteatomatous": z.number().int().optional(),
191+ "deprivement": z.number().int().optional(),
192+ "disdiapason": z.string().optional(),
193+ "flippantness": z.number().int().optional(),
194+ "fogproof": z.number().int().optional(),
195+ "homocerc": z.boolean().optional(),
196+ "merrymeeting": z.number().int().optional(),
197+ "nonbookish": z.null().optional(),
198+ "overcareful": z.number().int().optional(),
199+ "panaris": z.number().int().optional(),
200+ "preacceptance": z.number().int().optional(),
201+ "quinoxaline": z.number().int().optional(),
202+ "sig": z.number().int().optional(),
203+ "superconfusion": z.number().int().optional(),
204+ "Tacana": z.number().int().optional(),
205+ "tillotter": z.number().int().optional(),
206+ "tranquillize": z.number().int().optional(),
207+ "unquestionable": z.number().int().optional(),
208+ "uproute": z.number().int().optional(),
209+});
210+
211+export const OskarClassSchema = z.object({
212+ "Acrobates": z.null(),
213+ "beanshooter": z.null(),
214+ "bearhound": z.null(),
215+ "Cayuga": z.null(),
216+ "guarneri": z.null(),
217+ "hypochondriacism": z.null(),
218+ "indication": z.null(),
219+ "jaculative": z.null(),
220+ "nagana": z.null(),
221+ "Netherlandish": z.null(),
222+ "noctivagous": z.null(),
223+ "nonphysiological": z.null(),
224+ "praxis": z.null(),
225+ "provision": z.null(),
226+ "subterhuman": z.null(),
227+ "sunlit": z.null(),
228+ "syncraniate": z.null(),
229+ "teachment": z.null(),
230+ "unmutinous": z.null(),
231+ "unstoppable": z.null(),
232+});
233+
234+export const TopLevelSchema = z.object({
235+ "Abranchiata": z.array(z.union([z.null(), z.array(z.number().int()), z.number().int()])),
236+ "academe": z.array(z.union([z.array(z.number().int()), z.number().int(), z.record(z.string(), z.number().int())])),
237+ "acquirable": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), z.record(z.string(), z.number().int())])),
238+ "aerometry": z.array(z.union([z.boolean(), z.number()])),
239+ "alexin": z.array(z.union([z.array(z.number().int()), z.boolean()])),
240+ "alleviate": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), AlleviateClassSchema])),
241+ "amaas": z.array(z.union([z.boolean(), RebeccaSchema, z.number().int()])),
242+ "ambassage": z.array(z.union([z.array(z.null()), z.string()])),
243+ "amphithyron": z.array(z.union([z.null(), AmphithyronSchema])),
244+ "Andriana": z.array(z.union([z.null(), z.string()])),
245+ "ankee": z.array(z.union([z.array(z.number().int()), AnkeeClassSchema, z.number().int()])),
246+ "annihilator": z.array(z.union([z.null(), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
247+ "annulose": z.null(),
248+ "Ansarie": z.array(z.union([z.null(), z.array(z.number().int()), AnsarieClassSchema])),
249+ "aphasia": z.array(z.union([z.array(z.number().int()), z.number().int()])),
250+ "asprawl": z.array(z.union([z.number(), z.string()])),
251+ "attractive": z.array(z.union([z.null(), z.boolean()])),
252+ "barksome": z.record(z.string(), z.number().int()),
253+ "bedesman": z.array(z.union([z.boolean(), z.number(), z.string()])),
254+ "belard": z.array(z.union([z.array(z.number().int()), RebeccaSchema, z.number()])),
255+ "bocking": z.array(z.union([z.array(z.number().int()), z.boolean(), z.record(z.string(), z.number().int())])),
256+ "brawlingly": z.array(z.union([z.array(z.null()), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
257+ "brookie": z.array(z.union([z.array(z.number().int()), RebeccaSchema])),
258+ "bumboatman": z.array(z.union([z.null(), z.array(z.null()), z.string()])),
259+ "bystreet": z.array(z.null()),
260+ "calaverite": z.array(z.union([z.array(z.number().int()), z.string()])),
261+ "catallactic": z.array(z.union([z.array(z.null()), z.boolean(), z.record(z.string(), z.number().int())])),
262+ "cemental": z.array(z.union([z.array(z.number().int()), z.number(), z.record(z.string(), z.number().int())])),
263+ "Chytridiaceae": z.array(z.union([z.null(), z.boolean(), ChytridiaceaeClassSchema])),
264+ "Discordia": z.array(z.union([z.array(z.number().int()), DiscordiaClassSchema])),
265+ "Endomyces": z.array(z.union([z.number().int(), z.string()])),
266+ "Epinephelidae": z.array(z.union([z.boolean(), z.number().int(), z.string()])),
267+ "Eupatorium": z.array(z.union([z.array(z.null()), z.record(z.string(), z.number().int())])),
268+ "Gryphosaurus": z.array(z.union([z.array(z.number().int()), GryphosaurusClassSchema, z.string()])),
269+ "Koryak": z.array(z.union([z.record(z.string(), z.union([z.null(), z.number().int()])), z.string()])),
270+ "Lavinia": z.array(z.union([LaviniaClassSchema, z.string()])),
271+ "Oskar": z.array(z.union([z.array(z.number().int()), OskarClassSchema])),
272+ "Rebecca": z.array(z.union([RebeccaSchema, z.number().int(), z.string()])),
273+ "Rhomboganoidei": z.array(z.union([z.array(z.number().int()), RebeccaSchema, z.string()])),
274+ "Rigsmal": z.boolean(),
275+ "Ruellia": z.array(z.union([z.boolean(), RebeccaSchema, z.string()])),
276+ "School": z.array(z.union([z.null(), z.number().int(), z.record(z.string(), z.number().int())])),
277+ "Shakespearolater": z.array(z.union([z.array(z.number().int()), z.number(), z.string()])),
278+ "Svan": z.array(z.number()),
279+ "Wayao": z.record(z.string(), z.number()),
280+});
Test case

test/inputs/json/priority/combinations3.json

4 generated files · +3,554 −70
Adartcopy-with-true--bb7e994c05fe / TopLevel.dart+2,286 −0
@@ -0,0 +1,2286 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final List<dynamic> juror;
13+ final List<dynamic> kongoni;
14+ final List<dynamic> ladronism;
15+ final List<dynamic> landlubberly;
16+ final List<dynamic> listener;
17+ final List<dynamic> lupus;
18+ final List<Maslin> maslin;
19+ final List<dynamic> monazite;
20+ final List<dynamic> monoliteral;
21+ final List<dynamic> monotheistically;
22+ final List<dynamic> montage;
23+ final List<dynamic> moralness;
24+ final List<MonaziteClass?> mowra;
25+ final List<dynamic> mulishly;
26+ final List<dynamic> myoscope;
27+ final List<List<int?>?> nach;
28+ final List<dynamic> neuromastic;
29+ final List<Noncontributing> noncontributing;
30+ final List<dynamic> nonnervous;
31+ final List<dynamic> nonvaluation;
32+ final List<dynamic> occupationalist;
33+ final List<dynamic> outrival;
34+ final List<dynamic> paleographically;
35+ final List<dynamic> pamphletwise;
36+ final List<dynamic> pediatrics;
37+ final List<bool> perceptive;
38+ final List<dynamic> piaculum;
39+ final List<dynamic> piccadilly;
40+ final List<dynamic> piffler;
41+ final List<dynamic> pithful;
42+ final List<dynamic> placuntitis;
43+ final List<dynamic> plectopterous;
44+ final List<Pneumocele?> pneumocele;
45+ final List<dynamic> poliorcetic;
46+ final List<dynamic> poormaster;
47+ final List<dynamic> potwhisky;
48+ final List<dynamic> practicalizer;
49+ final List<dynamic> prefreshman;
50+ final List<dynamic> prehensility;
51+ final List<dynamic> prevoidance;
52+ final List<Map<String, int?>> probant;
53+ final List<dynamic> protext;
54+
55+ TopLevel({
56+ required this.juror,
57+ required this.kongoni,
58+ required this.ladronism,
59+ required this.landlubberly,
60+ required this.listener,
61+ required this.lupus,
62+ required this.maslin,
63+ required this.monazite,
64+ required this.monoliteral,
65+ required this.monotheistically,
66+ required this.montage,
67+ required this.moralness,
68+ required this.mowra,
69+ required this.mulishly,
70+ required this.myoscope,
71+ required this.nach,
72+ required this.neuromastic,
73+ required this.noncontributing,
74+ required this.nonnervous,
75+ required this.nonvaluation,
76+ required this.occupationalist,
77+ required this.outrival,
78+ required this.paleographically,
79+ required this.pamphletwise,
80+ required this.pediatrics,
81+ required this.perceptive,
82+ required this.piaculum,
83+ required this.piccadilly,
84+ required this.piffler,
85+ required this.pithful,
86+ required this.placuntitis,
87+ required this.plectopterous,
88+ required this.pneumocele,
89+ required this.poliorcetic,
90+ required this.poormaster,
91+ required this.potwhisky,
92+ required this.practicalizer,
93+ required this.prefreshman,
94+ required this.prehensility,
95+ required this.prevoidance,
96+ required this.probant,
97+ required this.protext,
98+ });
99+
100+ TopLevel copyWith({
101+ List<dynamic>? juror,
102+ List<dynamic>? kongoni,
103+ List<dynamic>? ladronism,
104+ List<dynamic>? landlubberly,
105+ List<dynamic>? listener,
106+ List<dynamic>? lupus,
107+ List<Maslin>? maslin,
108+ List<dynamic>? monazite,
109+ List<dynamic>? monoliteral,
110+ List<dynamic>? monotheistically,
111+ List<dynamic>? montage,
112+ List<dynamic>? moralness,
113+ List<MonaziteClass?>? mowra,
114+ List<dynamic>? mulishly,
115+ List<dynamic>? myoscope,
116+ List<List<int?>?>? nach,
117+ List<dynamic>? neuromastic,
118+ List<Noncontributing>? noncontributing,
119+ List<dynamic>? nonnervous,
120+ List<dynamic>? nonvaluation,
121+ List<dynamic>? occupationalist,
122+ List<dynamic>? outrival,
123+ List<dynamic>? paleographically,
124+ List<dynamic>? pamphletwise,
125+ List<dynamic>? pediatrics,
126+ List<bool>? perceptive,
127+ List<dynamic>? piaculum,
128+ List<dynamic>? piccadilly,
129+ List<dynamic>? piffler,
130+ List<dynamic>? pithful,
131+ List<dynamic>? placuntitis,
132+ List<dynamic>? plectopterous,
133+ List<Pneumocele?>? pneumocele,
134+ List<dynamic>? poliorcetic,
135+ List<dynamic>? poormaster,
136+ List<dynamic>? potwhisky,
137+ List<dynamic>? practicalizer,
138+ List<dynamic>? prefreshman,
139+ List<dynamic>? prehensility,
140+ List<dynamic>? prevoidance,
141+ List<Map<String, int?>>? probant,
142+ List<dynamic>? protext,
143+ }) =>
144+ TopLevel(
145+ juror: juror ?? this.juror,
146+ kongoni: kongoni ?? this.kongoni,
147+ ladronism: ladronism ?? this.ladronism,
148+ landlubberly: landlubberly ?? this.landlubberly,
149+ listener: listener ?? this.listener,
150+ lupus: lupus ?? this.lupus,
151+ maslin: maslin ?? this.maslin,
152+ monazite: monazite ?? this.monazite,
153+ monoliteral: monoliteral ?? this.monoliteral,
154+ monotheistically: monotheistically ?? this.monotheistically,
155+ montage: montage ?? this.montage,
156+ moralness: moralness ?? this.moralness,
157+ mowra: mowra ?? this.mowra,
158+ mulishly: mulishly ?? this.mulishly,
159+ myoscope: myoscope ?? this.myoscope,
160+ nach: nach ?? this.nach,
161+ neuromastic: neuromastic ?? this.neuromastic,
162+ noncontributing: noncontributing ?? this.noncontributing,
163+ nonnervous: nonnervous ?? this.nonnervous,
164+ nonvaluation: nonvaluation ?? this.nonvaluation,
165+ occupationalist: occupationalist ?? this.occupationalist,
166+ outrival: outrival ?? this.outrival,
167+ paleographically: paleographically ?? this.paleographically,
168+ pamphletwise: pamphletwise ?? this.pamphletwise,
169+ pediatrics: pediatrics ?? this.pediatrics,
170+ perceptive: perceptive ?? this.perceptive,
171+ piaculum: piaculum ?? this.piaculum,
172+ piccadilly: piccadilly ?? this.piccadilly,
173+ piffler: piffler ?? this.piffler,
174+ pithful: pithful ?? this.pithful,
175+ placuntitis: placuntitis ?? this.placuntitis,
176+ plectopterous: plectopterous ?? this.plectopterous,
177+ pneumocele: pneumocele ?? this.pneumocele,
178+ poliorcetic: poliorcetic ?? this.poliorcetic,
179+ poormaster: poormaster ?? this.poormaster,
180+ potwhisky: potwhisky ?? this.potwhisky,
181+ practicalizer: practicalizer ?? this.practicalizer,
182+ prefreshman: prefreshman ?? this.prefreshman,
183+ prehensility: prehensility ?? this.prehensility,
184+ prevoidance: prevoidance ?? this.prevoidance,
185+ probant: probant ?? this.probant,
186+ protext: protext ?? this.protext,
187+ );
188+
189+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
190+ juror: List<dynamic>.from(json["juror"].map((x) => x)),
191+ kongoni: List<dynamic>.from(json["kongoni"].map((x) => x)),
192+ ladronism: List<dynamic>.from(json["ladronism"].map((x) => x)),
193+ landlubberly: List<dynamic>.from(json["landlubberly"].map((x) => x)),
194+ listener: List<dynamic>.from(json["listener"].map((x) => x)),
195+ lupus: List<dynamic>.from(json["lupus"].map((x) => x)),
196+ maslin: List<Maslin>.from(json["maslin"].map((x) => Maslin.fromJson(x))),
197+ monazite: List<dynamic>.from(json["monazite"].map((x) => x)),
198+ monoliteral: List<dynamic>.from(json["monoliteral"].map((x) => x)),
199+ monotheistically: List<dynamic>.from(json["monotheistically"].map((x) => x)),
200+ montage: List<dynamic>.from(json["montage"].map((x) => x)),
201+ moralness: List<dynamic>.from(json["moralness"].map((x) => x)),
202+ mowra: List<MonaziteClass?>.from(json["mowra"].map((x) => x == null ? null : MonaziteClass.fromJson(x))),
203+ mulishly: List<dynamic>.from(json["mulishly"].map((x) => x)),
204+ myoscope: List<dynamic>.from(json["myoscope"].map((x) => x)),
205+ nach: List<List<int?>?>.from(json["nach"].map((x) => x == null ? null : List<int?>.from(x!.map((x) => x)))),
206+ neuromastic: List<dynamic>.from(json["neuromastic"].map((x) => x)),
207+ noncontributing: List<Noncontributing>.from(json["noncontributing"].map((x) => Noncontributing.fromJson(x))),
208+ nonnervous: List<dynamic>.from(json["nonnervous"].map((x) => x)),
209+ nonvaluation: List<dynamic>.from(json["nonvaluation"].map((x) => x)),
210+ occupationalist: List<dynamic>.from(json["occupationalist"].map((x) => x)),
211+ outrival: List<dynamic>.from(json["outrival"].map((x) => x)),
212+ paleographically: List<dynamic>.from(json["paleographically"].map((x) => x)),
213+ pamphletwise: List<dynamic>.from(json["pamphletwise"].map((x) => x)),
214+ pediatrics: List<dynamic>.from(json["pediatrics"].map((x) => x)),
215+ perceptive: List<bool>.from(json["perceptive"].map((x) => x)),
216+ piaculum: List<dynamic>.from(json["piaculum"].map((x) => x)),
217+ piccadilly: List<dynamic>.from(json["piccadilly"].map((x) => x)),
218+ piffler: List<dynamic>.from(json["piffler"].map((x) => x)),
219+ pithful: List<dynamic>.from(json["pithful"].map((x) => x)),
220+ placuntitis: List<dynamic>.from(json["placuntitis"].map((x) => x)),
221+ plectopterous: List<dynamic>.from(json["plectopterous"].map((x) => x)),
222+ pneumocele: List<Pneumocele?>.from(json["pneumocele"].map((x) => x == null ? null : Pneumocele.fromJson(x))),
223+ poliorcetic: List<dynamic>.from(json["poliorcetic"].map((x) => x)),
224+ poormaster: List<dynamic>.from(json["poormaster"].map((x) => x)),
225+ potwhisky: List<dynamic>.from(json["potwhisky"].map((x) => x)),
226+ practicalizer: List<dynamic>.from(json["practicalizer"].map((x) => x)),
227+ prefreshman: List<dynamic>.from(json["prefreshman"].map((x) => x)),
228+ prehensility: List<dynamic>.from(json["prehensility"].map((x) => x)),
229+ prevoidance: List<dynamic>.from(json["prevoidance"].map((x) => x)),
230+ probant: List<Map<String, int?>>.from(json["probant"].map((x) => Map.from(x).map((k, v) => MapEntry<String, int?>(k, v)))),
231+ protext: List<dynamic>.from(json["protext"].map((x) => x)),
232+ );
233+
234+ Map<String, dynamic> toJson() => {
235+ "juror": List<dynamic>.from(juror.map((x) => x)),
236+ "kongoni": List<dynamic>.from(kongoni.map((x) => x)),
237+ "ladronism": List<dynamic>.from(ladronism.map((x) => x)),
238+ "landlubberly": List<dynamic>.from(landlubberly.map((x) => x)),
239+ "listener": List<dynamic>.from(listener.map((x) => x)),
240+ "lupus": List<dynamic>.from(lupus.map((x) => x)),
241+ "maslin": List<dynamic>.from(maslin.map((x) => x.toJson())),
242+ "monazite": List<dynamic>.from(monazite.map((x) => x)),
243+ "monoliteral": List<dynamic>.from(monoliteral.map((x) => x)),
244+ "monotheistically": List<dynamic>.from(monotheistically.map((x) => x)),
245+ "montage": List<dynamic>.from(montage.map((x) => x)),
246+ "moralness": List<dynamic>.from(moralness.map((x) => x)),
247+ "mowra": List<dynamic>.from(mowra.map((x) => x?.toJson())),
248+ "mulishly": List<dynamic>.from(mulishly.map((x) => x)),
249+ "myoscope": List<dynamic>.from(myoscope.map((x) => x)),
250+ "nach": List<dynamic>.from(nach.map((x) => x == null ? null : List<dynamic>.from(x!.map((x) => x)))),
251+ "neuromastic": List<dynamic>.from(neuromastic.map((x) => x)),
252+ "noncontributing": List<dynamic>.from(noncontributing.map((x) => x.toJson())),
253+ "nonnervous": List<dynamic>.from(nonnervous.map((x) => x)),
254+ "nonvaluation": List<dynamic>.from(nonvaluation.map((x) => x)),
255+ "occupationalist": List<dynamic>.from(occupationalist.map((x) => x)),
256+ "outrival": List<dynamic>.from(outrival.map((x) => x)),
257+ "paleographically": List<dynamic>.from(paleographically.map((x) => x)),
258+ "pamphletwise": List<dynamic>.from(pamphletwise.map((x) => x)),
259+ "pediatrics": List<dynamic>.from(pediatrics.map((x) => x)),
260+ "perceptive": List<dynamic>.from(perceptive.map((x) => x)),
261+ "piaculum": List<dynamic>.from(piaculum.map((x) => x)),
262+ "piccadilly": List<dynamic>.from(piccadilly.map((x) => x)),
263+ "piffler": List<dynamic>.from(piffler.map((x) => x)),
264+ "pithful": List<dynamic>.from(pithful.map((x) => x)),
265+ "placuntitis": List<dynamic>.from(placuntitis.map((x) => x)),
266+ "plectopterous": List<dynamic>.from(plectopterous.map((x) => x)),
267+ "pneumocele": List<dynamic>.from(pneumocele.map((x) => x?.toJson())),
268+ "poliorcetic": List<dynamic>.from(poliorcetic.map((x) => x)),
269+ "poormaster": List<dynamic>.from(poormaster.map((x) => x)),
270+ "potwhisky": List<dynamic>.from(potwhisky.map((x) => x)),
271+ "practicalizer": List<dynamic>.from(practicalizer.map((x) => x)),
272+ "prefreshman": List<dynamic>.from(prefreshman.map((x) => x)),
273+ "prehensility": List<dynamic>.from(prehensility.map((x) => x)),
274+ "prevoidance": List<dynamic>.from(prevoidance.map((x) => x)),
275+ "probant": List<dynamic>.from(probant.map((x) => Map.from(x).map((k, v) => MapEntry<String, dynamic>(k, v)))),
276+ "protext": List<dynamic>.from(protext.map((x) => x)),
277+ };
278+}
279+
280+class JurorClass {
281+ final dynamic adipsy;
282+ final dynamic auxiliator;
283+ final dynamic benda;
284+ final dynamic benjamin;
285+ final dynamic brandling;
286+ final dynamic epicurishly;
287+ final dynamic eremochaetous;
288+ final dynamic marten;
289+ final dynamic monocline;
290+ final dynamic olea;
291+ final dynamic palgat;
292+ final dynamic pennyworth;
293+ final dynamic pioury;
294+ final dynamic pragmatistic;
295+ final dynamic stylelessness;
296+ final dynamic systematical;
297+ final dynamic thready;
298+ final dynamic uncontemporary;
299+ final dynamic uncouched;
300+ final dynamic uninhabitedness;
301+
302+ JurorClass({
303+ required this.adipsy,
304+ required this.auxiliator,
305+ required this.benda,
306+ required this.benjamin,
307+ required this.brandling,
308+ required this.epicurishly,
309+ required this.eremochaetous,
310+ required this.marten,
311+ required this.monocline,
312+ required this.olea,
313+ required this.palgat,
314+ required this.pennyworth,
315+ required this.pioury,
316+ required this.pragmatistic,
317+ required this.stylelessness,
318+ required this.systematical,
319+ required this.thready,
320+ required this.uncontemporary,
321+ required this.uncouched,
322+ required this.uninhabitedness,
323+ });
324+
325+ JurorClass copyWith({
326+ dynamic adipsy,
327+ dynamic auxiliator,
328+ dynamic benda,
329+ dynamic benjamin,
330+ dynamic brandling,
331+ dynamic epicurishly,
332+ dynamic eremochaetous,
333+ dynamic marten,
334+ dynamic monocline,
335+ dynamic olea,
336+ dynamic palgat,
337+ dynamic pennyworth,
338+ dynamic pioury,
339+ dynamic pragmatistic,
340+ dynamic stylelessness,
341+ dynamic systematical,
342+ dynamic thready,
343+ dynamic uncontemporary,
344+ dynamic uncouched,
345+ dynamic uninhabitedness,
346+ }) =>
347+ JurorClass(
348+ adipsy: adipsy ?? this.adipsy,
349+ auxiliator: auxiliator ?? this.auxiliator,
350+ benda: benda ?? this.benda,
351+ benjamin: benjamin ?? this.benjamin,
352+ brandling: brandling ?? this.brandling,
353+ epicurishly: epicurishly ?? this.epicurishly,
354+ eremochaetous: eremochaetous ?? this.eremochaetous,
355+ marten: marten ?? this.marten,
356+ monocline: monocline ?? this.monocline,
357+ olea: olea ?? this.olea,
358+ palgat: palgat ?? this.palgat,
359+ pennyworth: pennyworth ?? this.pennyworth,
360+ pioury: pioury ?? this.pioury,
361+ pragmatistic: pragmatistic ?? this.pragmatistic,
362+ stylelessness: stylelessness ?? this.stylelessness,
363+ systematical: systematical ?? this.systematical,
364+ thready: thready ?? this.thready,
365+ uncontemporary: uncontemporary ?? this.uncontemporary,
366+ uncouched: uncouched ?? this.uncouched,
367+ uninhabitedness: uninhabitedness ?? this.uninhabitedness,
368+ );
369+
370+ factory JurorClass.fromJson(Map<String, dynamic> json) => JurorClass(
371+ adipsy: (json.containsKey("adipsy") ? json["adipsy"] : throw FormatException('Missing required property')),
372+ auxiliator: (json.containsKey("auxiliator") ? json["auxiliator"] : throw FormatException('Missing required property')),
373+ benda: (json.containsKey("benda") ? json["benda"] : throw FormatException('Missing required property')),
374+ benjamin: (json.containsKey("benjamin") ? json["benjamin"] : throw FormatException('Missing required property')),
375+ brandling: (json.containsKey("brandling") ? json["brandling"] : throw FormatException('Missing required property')),
376+ epicurishly: (json.containsKey("epicurishly") ? json["epicurishly"] : throw FormatException('Missing required property')),
377+ eremochaetous: (json.containsKey("eremochaetous") ? json["eremochaetous"] : throw FormatException('Missing required property')),
378+ marten: (json.containsKey("marten") ? json["marten"] : throw FormatException('Missing required property')),
379+ monocline: (json.containsKey("monocline") ? json["monocline"] : throw FormatException('Missing required property')),
380+ olea: (json.containsKey("Olea") ? json["Olea"] : throw FormatException('Missing required property')),
381+ palgat: (json.containsKey("palgat") ? json["palgat"] : throw FormatException('Missing required property')),
382+ pennyworth: (json.containsKey("pennyworth") ? json["pennyworth"] : throw FormatException('Missing required property')),
383+ pioury: (json.containsKey("pioury") ? json["pioury"] : throw FormatException('Missing required property')),
384+ pragmatistic: (json.containsKey("pragmatistic") ? json["pragmatistic"] : throw FormatException('Missing required property')),
385+ stylelessness: (json.containsKey("stylelessness") ? json["stylelessness"] : throw FormatException('Missing required property')),
386+ systematical: (json.containsKey("systematical") ? json["systematical"] : throw FormatException('Missing required property')),
387+ thready: (json.containsKey("thready") ? json["thready"] : throw FormatException('Missing required property')),
388+ uncontemporary: (json.containsKey("uncontemporary") ? json["uncontemporary"] : throw FormatException('Missing required property')),
389+ uncouched: (json.containsKey("uncouched") ? json["uncouched"] : throw FormatException('Missing required property')),
390+ uninhabitedness: (json.containsKey("uninhabitedness") ? json["uninhabitedness"] : throw FormatException('Missing required property')),
391+ );
392+
393+ Map<String, dynamic> toJson() => {
394+ "adipsy": adipsy,
395+ "auxiliator": auxiliator,
396+ "benda": benda,
397+ "benjamin": benjamin,
398+ "brandling": brandling,
399+ "epicurishly": epicurishly,
400+ "eremochaetous": eremochaetous,
401+ "marten": marten,
402+ "monocline": monocline,
403+ "Olea": olea,
404+ "palgat": palgat,
405+ "pennyworth": pennyworth,
406+ "pioury": pioury,
407+ "pragmatistic": pragmatistic,
408+ "stylelessness": stylelessness,
409+ "systematical": systematical,
410+ "thready": thready,
411+ "uncontemporary": uncontemporary,
412+ "uncouched": uncouched,
413+ "uninhabitedness": uninhabitedness,
414+ };
415+}
416+
417+class LadronismClass {
418+ final dynamic acclaimer;
419+ final dynamic achree;
420+ final dynamic base;
421+ final dynamic conundrumize;
422+ final dynamic degerminator;
423+ final dynamic describable;
424+ final dynamic exasperatedly;
425+ final dynamic heroine;
426+ final dynamic indazin;
427+ final dynamic luteous;
428+ final dynamic papular;
429+ final dynamic pritch;
430+ final dynamic prodenia;
431+ final dynamic seege;
432+ final dynamic shopgirl;
433+ final dynamic tragedietta;
434+ final dynamic unsparse;
435+ final dynamic uplook;
436+ final dynamic vermiformis;
437+ final dynamic whafabout;
438+
439+ LadronismClass({
440+ required this.acclaimer,
441+ required this.achree,
442+ required this.base,
443+ required this.conundrumize,
444+ required this.degerminator,
445+ required this.describable,
446+ required this.exasperatedly,
447+ required this.heroine,
448+ required this.indazin,
449+ required this.luteous,
450+ required this.papular,
451+ required this.pritch,
452+ required this.prodenia,
453+ required this.seege,
454+ required this.shopgirl,
455+ required this.tragedietta,
456+ required this.unsparse,
457+ required this.uplook,
458+ required this.vermiformis,
459+ required this.whafabout,
460+ });
461+
462+ LadronismClass copyWith({
463+ dynamic acclaimer,
464+ dynamic achree,
465+ dynamic base,
466+ dynamic conundrumize,
467+ dynamic degerminator,
468+ dynamic describable,
469+ dynamic exasperatedly,
470+ dynamic heroine,
471+ dynamic indazin,
472+ dynamic luteous,
473+ dynamic papular,
474+ dynamic pritch,
475+ dynamic prodenia,
476+ dynamic seege,
477+ dynamic shopgirl,
478+ dynamic tragedietta,
479+ dynamic unsparse,
480+ dynamic uplook,
481+ dynamic vermiformis,
482+ dynamic whafabout,
483+ }) =>
484+ LadronismClass(
485+ acclaimer: acclaimer ?? this.acclaimer,
486+ achree: achree ?? this.achree,
487+ base: base ?? this.base,
488+ conundrumize: conundrumize ?? this.conundrumize,
489+ degerminator: degerminator ?? this.degerminator,
490+ describable: describable ?? this.describable,
491+ exasperatedly: exasperatedly ?? this.exasperatedly,
492+ heroine: heroine ?? this.heroine,
493+ indazin: indazin ?? this.indazin,
494+ luteous: luteous ?? this.luteous,
495+ papular: papular ?? this.papular,
496+ pritch: pritch ?? this.pritch,
497+ prodenia: prodenia ?? this.prodenia,
498+ seege: seege ?? this.seege,
499+ shopgirl: shopgirl ?? this.shopgirl,
500+ tragedietta: tragedietta ?? this.tragedietta,
501+ unsparse: unsparse ?? this.unsparse,
502+ uplook: uplook ?? this.uplook,
503+ vermiformis: vermiformis ?? this.vermiformis,
504+ whafabout: whafabout ?? this.whafabout,
505+ );
506+
507+ factory LadronismClass.fromJson(Map<String, dynamic> json) => LadronismClass(
508+ acclaimer: (json.containsKey("acclaimer") ? json["acclaimer"] : throw FormatException('Missing required property')),
509+ achree: (json.containsKey("achree") ? json["achree"] : throw FormatException('Missing required property')),
510+ base: (json.containsKey("base") ? json["base"] : throw FormatException('Missing required property')),
511+ conundrumize: (json.containsKey("conundrumize") ? json["conundrumize"] : throw FormatException('Missing required property')),
512+ degerminator: (json.containsKey("degerminator") ? json["degerminator"] : throw FormatException('Missing required property')),
513+ describable: (json.containsKey("describable") ? json["describable"] : throw FormatException('Missing required property')),
514+ exasperatedly: (json.containsKey("exasperatedly") ? json["exasperatedly"] : throw FormatException('Missing required property')),
515+ heroine: (json.containsKey("heroine") ? json["heroine"] : throw FormatException('Missing required property')),
516+ indazin: (json.containsKey("indazin") ? json["indazin"] : throw FormatException('Missing required property')),
517+ luteous: (json.containsKey("luteous") ? json["luteous"] : throw FormatException('Missing required property')),
518+ papular: (json.containsKey("papular") ? json["papular"] : throw FormatException('Missing required property')),
519+ pritch: (json.containsKey("pritch") ? json["pritch"] : throw FormatException('Missing required property')),
520+ prodenia: (json.containsKey("Prodenia") ? json["Prodenia"] : throw FormatException('Missing required property')),
521+ seege: (json.containsKey("seege") ? json["seege"] : throw FormatException('Missing required property')),
522+ shopgirl: (json.containsKey("shopgirl") ? json["shopgirl"] : throw FormatException('Missing required property')),
523+ tragedietta: (json.containsKey("tragedietta") ? json["tragedietta"] : throw FormatException('Missing required property')),
524+ unsparse: (json.containsKey("unsparse") ? json["unsparse"] : throw FormatException('Missing required property')),
525+ uplook: (json.containsKey("uplook") ? json["uplook"] : throw FormatException('Missing required property')),
526+ vermiformis: (json.containsKey("vermiformis") ? json["vermiformis"] : throw FormatException('Missing required property')),
527+ whafabout: (json.containsKey("whafabout") ? json["whafabout"] : throw FormatException('Missing required property')),
528+ );
529+
530+ Map<String, dynamic> toJson() => {
531+ "acclaimer": acclaimer,
532+ "achree": achree,
533+ "base": base,
534+ "conundrumize": conundrumize,
535+ "degerminator": degerminator,
536+ "describable": describable,
537+ "exasperatedly": exasperatedly,
538+ "heroine": heroine,
539+ "indazin": indazin,
540+ "luteous": luteous,
541+ "papular": papular,
542+ "pritch": pritch,
543+ "Prodenia": prodenia,
544+ "seege": seege,
545+ "shopgirl": shopgirl,
546+ "tragedietta": tragedietta,
547+ "unsparse": unsparse,
548+ "uplook": uplook,
549+ "vermiformis": vermiformis,
550+ "whafabout": whafabout,
551+ };
552+}
553+
554+class LandlubberlyClass {
555+ final dynamic acropoleis;
556+ final dynamic aminate;
557+ final dynamic amyraldism;
558+ final dynamic bipenniform;
559+ final dynamic bugre;
560+ final dynamic calycule;
561+ final dynamic caoutchouc;
562+ final dynamic disprover;
563+ final dynamic fitroot;
564+ final dynamic fulgently;
565+ final dynamic kickup;
566+ final dynamic laevoversion;
567+ final dynamic moter;
568+ final dynamic objectivity;
569+ final dynamic posterity;
570+ final dynamic postnuptial;
571+ final dynamic precedentary;
572+ final dynamic saddling;
573+ final dynamic subcurrent;
574+ final dynamic unrecriminative;
575+
576+ LandlubberlyClass({
577+ required this.acropoleis,
578+ required this.aminate,
579+ required this.amyraldism,
580+ required this.bipenniform,
581+ required this.bugre,
582+ required this.calycule,
583+ required this.caoutchouc,
584+ required this.disprover,
585+ required this.fitroot,
586+ required this.fulgently,
587+ required this.kickup,
588+ required this.laevoversion,
589+ required this.moter,
590+ required this.objectivity,
591+ required this.posterity,
592+ required this.postnuptial,
593+ required this.precedentary,
594+ required this.saddling,
595+ required this.subcurrent,
596+ required this.unrecriminative,
597+ });
598+
599+ LandlubberlyClass copyWith({
600+ dynamic acropoleis,
601+ dynamic aminate,
602+ dynamic amyraldism,
603+ dynamic bipenniform,
604+ dynamic bugre,
605+ dynamic calycule,
606+ dynamic caoutchouc,
607+ dynamic disprover,
608+ dynamic fitroot,
609+ dynamic fulgently,
610+ dynamic kickup,
611+ dynamic laevoversion,
612+ dynamic moter,
613+ dynamic objectivity,
614+ dynamic posterity,
615+ dynamic postnuptial,
616+ dynamic precedentary,
617+ dynamic saddling,
618+ dynamic subcurrent,
619+ dynamic unrecriminative,
620+ }) =>
621+ LandlubberlyClass(
622+ acropoleis: acropoleis ?? this.acropoleis,
623+ aminate: aminate ?? this.aminate,
624+ amyraldism: amyraldism ?? this.amyraldism,
625+ bipenniform: bipenniform ?? this.bipenniform,
626+ bugre: bugre ?? this.bugre,
627+ calycule: calycule ?? this.calycule,
628+ caoutchouc: caoutchouc ?? this.caoutchouc,
629+ disprover: disprover ?? this.disprover,
630+ fitroot: fitroot ?? this.fitroot,
631+ fulgently: fulgently ?? this.fulgently,
632+ kickup: kickup ?? this.kickup,
633+ laevoversion: laevoversion ?? this.laevoversion,
634+ moter: moter ?? this.moter,
635+ objectivity: objectivity ?? this.objectivity,
636+ posterity: posterity ?? this.posterity,
637+ postnuptial: postnuptial ?? this.postnuptial,
638+ precedentary: precedentary ?? this.precedentary,
639+ saddling: saddling ?? this.saddling,
640+ subcurrent: subcurrent ?? this.subcurrent,
641+ unrecriminative: unrecriminative ?? this.unrecriminative,
642+ );
643+
644+ factory LandlubberlyClass.fromJson(Map<String, dynamic> json) => LandlubberlyClass(
645+ acropoleis: (json.containsKey("acropoleis") ? json["acropoleis"] : throw FormatException('Missing required property')),
646+ aminate: (json.containsKey("aminate") ? json["aminate"] : throw FormatException('Missing required property')),
647+ amyraldism: (json.containsKey("Amyraldism") ? json["Amyraldism"] : throw FormatException('Missing required property')),
648+ bipenniform: (json.containsKey("bipenniform") ? json["bipenniform"] : throw FormatException('Missing required property')),
649+ bugre: (json.containsKey("bugre") ? json["bugre"] : throw FormatException('Missing required property')),
650+ calycule: (json.containsKey("calycule") ? json["calycule"] : throw FormatException('Missing required property')),
651+ caoutchouc: (json.containsKey("caoutchouc") ? json["caoutchouc"] : throw FormatException('Missing required property')),
652+ disprover: (json.containsKey("disprover") ? json["disprover"] : throw FormatException('Missing required property')),
653+ fitroot: (json.containsKey("fitroot") ? json["fitroot"] : throw FormatException('Missing required property')),
654+ fulgently: (json.containsKey("fulgently") ? json["fulgently"] : throw FormatException('Missing required property')),
655+ kickup: (json.containsKey("kickup") ? json["kickup"] : throw FormatException('Missing required property')),
656+ laevoversion: (json.containsKey("laevoversion") ? json["laevoversion"] : throw FormatException('Missing required property')),
657+ moter: (json.containsKey("moter") ? json["moter"] : throw FormatException('Missing required property')),
658+ objectivity: (json.containsKey("objectivity") ? json["objectivity"] : throw FormatException('Missing required property')),
659+ posterity: (json.containsKey("posterity") ? json["posterity"] : throw FormatException('Missing required property')),
660+ postnuptial: (json.containsKey("postnuptial") ? json["postnuptial"] : throw FormatException('Missing required property')),
661+ precedentary: (json.containsKey("precedentary") ? json["precedentary"] : throw FormatException('Missing required property')),
662+ saddling: (json.containsKey("saddling") ? json["saddling"] : throw FormatException('Missing required property')),
663+ subcurrent: (json.containsKey("subcurrent") ? json["subcurrent"] : throw FormatException('Missing required property')),
664+ unrecriminative: (json.containsKey("unrecriminative") ? json["unrecriminative"] : throw FormatException('Missing required property')),
665+ );
666+
667+ Map<String, dynamic> toJson() => {
668+ "acropoleis": acropoleis,
669+ "aminate": aminate,
670+ "Amyraldism": amyraldism,
671+ "bipenniform": bipenniform,
672+ "bugre": bugre,
673+ "calycule": calycule,
674+ "caoutchouc": caoutchouc,
675+ "disprover": disprover,
676+ "fitroot": fitroot,
677+ "fulgently": fulgently,
678+ "kickup": kickup,
679+ "laevoversion": laevoversion,
680+ "moter": moter,
681+ "objectivity": objectivity,
682+ "posterity": posterity,
683+ "postnuptial": postnuptial,
684+ "precedentary": precedentary,
685+ "saddling": saddling,
686+ "subcurrent": subcurrent,
687+ "unrecriminative": unrecriminative,
688+ };
689+}
690+
691+class LupusClass {
692+ final double? catharticalness;
693+ final int? chirotherium;
694+ final int? chlorioninae;
695+ final int? corvinae;
696+ final int? crassina;
697+ final String? disdiapason;
698+ final int? exiguity;
699+ final int? farcist;
700+ final int? holographical;
701+ final bool? homocerc;
702+ final int? ichthyophagan;
703+ final int? implacable;
704+ final dynamic nonbookish;
705+ final int? outshiner;
706+ final int? overweather;
707+ final int? protonegroid;
708+ final int? shallowish;
709+ final int? snoke;
710+ final int? snout;
711+ final int? surveillance;
712+ final int? threshingtime;
713+ final int? thysanocarpus;
714+ final int? unsignificantly;
715+ final int? unsnap;
716+ final int? vendible;
717+
718+ LupusClass({
719+ this.catharticalness,
720+ this.chirotherium,
721+ this.chlorioninae,
722+ this.corvinae,
723+ this.crassina,
724+ this.disdiapason,
725+ this.exiguity,
726+ this.farcist,
727+ this.holographical,
728+ this.homocerc,
729+ this.ichthyophagan,
730+ this.implacable,
731+ this.nonbookish,
732+ this.outshiner,
733+ this.overweather,
734+ this.protonegroid,
735+ this.shallowish,
736+ this.snoke,
737+ this.snout,
738+ this.surveillance,
739+ this.threshingtime,
740+ this.thysanocarpus,
741+ this.unsignificantly,
742+ this.unsnap,
743+ this.vendible,
744+ });
745+
746+ LupusClass copyWith({
747+ double? catharticalness,
748+ int? chirotherium,
749+ int? chlorioninae,
750+ int? corvinae,
751+ int? crassina,
752+ String? disdiapason,
753+ int? exiguity,
754+ int? farcist,
755+ int? holographical,
756+ bool? homocerc,
757+ int? ichthyophagan,
758+ int? implacable,
759+ dynamic nonbookish,
760+ int? outshiner,
761+ int? overweather,
762+ int? protonegroid,
763+ int? shallowish,
764+ int? snoke,
765+ int? snout,
766+ int? surveillance,
767+ int? threshingtime,
768+ int? thysanocarpus,
769+ int? unsignificantly,
770+ int? unsnap,
771+ int? vendible,
772+ }) =>
773+ LupusClass(
774+ catharticalness: catharticalness ?? this.catharticalness,
775+ chirotherium: chirotherium ?? this.chirotherium,
776+ chlorioninae: chlorioninae ?? this.chlorioninae,
777+ corvinae: corvinae ?? this.corvinae,
778+ crassina: crassina ?? this.crassina,
779+ disdiapason: disdiapason ?? this.disdiapason,
780+ exiguity: exiguity ?? this.exiguity,
781+ farcist: farcist ?? this.farcist,
782+ holographical: holographical ?? this.holographical,
783+ homocerc: homocerc ?? this.homocerc,
784+ ichthyophagan: ichthyophagan ?? this.ichthyophagan,
785+ implacable: implacable ?? this.implacable,
786+ nonbookish: nonbookish ?? this.nonbookish,
787+ outshiner: outshiner ?? this.outshiner,
788+ overweather: overweather ?? this.overweather,
789+ protonegroid: protonegroid ?? this.protonegroid,
790+ shallowish: shallowish ?? this.shallowish,
791+ snoke: snoke ?? this.snoke,
792+ snout: snout ?? this.snout,
793+ surveillance: surveillance ?? this.surveillance,
794+ threshingtime: threshingtime ?? this.threshingtime,
795+ thysanocarpus: thysanocarpus ?? this.thysanocarpus,
796+ unsignificantly: unsignificantly ?? this.unsignificantly,
797+ unsnap: unsnap ?? this.unsnap,
798+ vendible: vendible ?? this.vendible,
799+ );
800+
801+ factory LupusClass.fromJson(Map<String, dynamic> json) => LupusClass(
802+ catharticalness: json["catharticalness"]?.toDouble(),
803+ chirotherium: json["Chirotherium"],
804+ chlorioninae: json["Chlorioninae"],
805+ corvinae: json["Corvinae"],
806+ crassina: json["Crassina"],
807+ disdiapason: json["disdiapason"],
808+ exiguity: json["exiguity"],
809+ farcist: json["farcist"],
810+ holographical: json["holographical"],
811+ homocerc: json["homocerc"],
812+ ichthyophagan: json["ichthyophagan"],
813+ implacable: json["implacable"],
814+ nonbookish: json["nonbookish"],
815+ outshiner: json["outshiner"],
816+ overweather: json["overweather"],
817+ protonegroid: json["protonegroid"],
818+ shallowish: json["shallowish"],
819+ snoke: json["snoke"],
820+ snout: json["snout"],
821+ surveillance: json["surveillance"],
822+ threshingtime: json["threshingtime"],
823+ thysanocarpus: json["Thysanocarpus"],
824+ unsignificantly: json["unsignificantly"],
825+ unsnap: json["unsnap"],
826+ vendible: json["vendible"],
827+ );
828+
829+ Map<String, dynamic> toJson() => {
830+ "catharticalness": catharticalness,
831+ "Chirotherium": chirotherium,
832+ "Chlorioninae": chlorioninae,
833+ "Corvinae": corvinae,
834+ "Crassina": crassina,
835+ "disdiapason": disdiapason,
836+ "exiguity": exiguity,
837+ "farcist": farcist,
838+ "holographical": holographical,
839+ "homocerc": homocerc,
840+ "ichthyophagan": ichthyophagan,
841+ "implacable": implacable,
842+ "nonbookish": nonbookish,
843+ "outshiner": outshiner,
844+ "overweather": overweather,
845+ "protonegroid": protonegroid,
846+ "shallowish": shallowish,
847+ "snoke": snoke,
848+ "snout": snout,
849+ "surveillance": surveillance,
850+ "threshingtime": threshingtime,
851+ "Thysanocarpus": thysanocarpus,
852+ "unsignificantly": unsignificantly,
853+ "unsnap": unsnap,
854+ "vendible": vendible,
855+ };
856+}
857+
858+class Maslin {
859+ final int? alicant;
860+ final dynamic antiatonement;
861+ final int? anticorrosive;
862+ final dynamic aphidozer;
863+ final dynamic bakuninist;
864+ final int? be;
865+ final double? catharticalness;
866+ final int? chirotherium;
867+ final int? chub;
868+ final int? cuprosilicon;
869+ final int? curtailedly;
870+ final int? dellenite;
871+ final int? dimitry;
872+ final String? disdiapason;
873+ final dynamic edifying;
874+ final int? ethmoiditis;
875+ final dynamic gastralgy;
876+ final int? goatherd;
877+ final int? hammerdress;
878+ final dynamic hangfire;
879+ final bool? homocerc;
880+ final int? lacunosity;
881+ final dynamic longiloquence;
882+ final int? mameliere;
883+ final dynamic motherless;
884+ final dynamic nonbookish;
885+ final dynamic noncorrodible;
886+ final dynamic nonsensicality;
887+ final int? oafishly;
888+ final dynamic pfund;
889+ final dynamic preadvisory;
890+ final dynamic retroflexed;
891+ final int? saccharulmic;
892+ final int? scowlful;
893+ final dynamic secluded;
894+ final dynamic slackage;
895+ final int? sphaeridial;
896+ final dynamic spondulics;
897+ final int? subsecive;
898+ final dynamic swellmobsman;
899+ final int? trachyglossate;
900+ final dynamic trialogue;
901+ final int? unassuaged;
902+ final dynamic ungross;
903+ final dynamic unjudiciously;
904+
905+ Maslin({
906+ this.alicant,
907+ this.antiatonement,
908+ this.anticorrosive,
909+ this.aphidozer,
910+ this.bakuninist,
911+ this.be,
912+ this.catharticalness,
913+ this.chirotherium,
914+ this.chub,
915+ this.cuprosilicon,
916+ this.curtailedly,
917+ this.dellenite,
918+ this.dimitry,
919+ this.disdiapason,
920+ this.edifying,
921+ this.ethmoiditis,
922+ this.gastralgy,
923+ this.goatherd,
924+ this.hammerdress,
925+ this.hangfire,
926+ this.homocerc,
927+ this.lacunosity,
928+ this.longiloquence,
929+ this.mameliere,
930+ this.motherless,
931+ this.nonbookish,
932+ this.noncorrodible,
933+ this.nonsensicality,
934+ this.oafishly,
935+ this.pfund,
936+ this.preadvisory,
937+ this.retroflexed,
938+ this.saccharulmic,
939+ this.scowlful,
940+ this.secluded,
941+ this.slackage,
942+ this.sphaeridial,
943+ this.spondulics,
944+ this.subsecive,
945+ this.swellmobsman,
946+ this.trachyglossate,
947+ this.trialogue,
948+ this.unassuaged,
949+ this.ungross,
950+ this.unjudiciously,
951+ });
952+
953+ Maslin copyWith({
954+ int? alicant,
955+ dynamic antiatonement,
956+ int? anticorrosive,
957+ dynamic aphidozer,
958+ dynamic bakuninist,
959+ int? be,
960+ double? catharticalness,
961+ int? chirotherium,
962+ int? chub,
963+ int? cuprosilicon,
964+ int? curtailedly,
965+ int? dellenite,
966+ int? dimitry,
967+ String? disdiapason,
968+ dynamic edifying,
969+ int? ethmoiditis,
970+ dynamic gastralgy,
971+ int? goatherd,
972+ int? hammerdress,
973+ dynamic hangfire,
974+ bool? homocerc,
975+ int? lacunosity,
976+ dynamic longiloquence,
977+ int? mameliere,
978+ dynamic motherless,
979+ dynamic nonbookish,
980+ dynamic noncorrodible,
981+ dynamic nonsensicality,
982+ int? oafishly,
983+ dynamic pfund,
984+ dynamic preadvisory,
985+ dynamic retroflexed,
986+ int? saccharulmic,
987+ int? scowlful,
988+ dynamic secluded,
989+ dynamic slackage,
990+ int? sphaeridial,
991+ dynamic spondulics,
992+ int? subsecive,
993+ dynamic swellmobsman,
994+ int? trachyglossate,
995+ dynamic trialogue,
996+ int? unassuaged,
997+ dynamic ungross,
998+ dynamic unjudiciously,
999+ }) =>
1000+ Maslin(
1001+ alicant: alicant ?? this.alicant,
1002+ antiatonement: antiatonement ?? this.antiatonement,
1003+ anticorrosive: anticorrosive ?? this.anticorrosive,
1004+ aphidozer: aphidozer ?? this.aphidozer,
1005+ bakuninist: bakuninist ?? this.bakuninist,
1006+ be: be ?? this.be,
1007+ catharticalness: catharticalness ?? this.catharticalness,
1008+ chirotherium: chirotherium ?? this.chirotherium,
1009+ chub: chub ?? this.chub,
1010+ cuprosilicon: cuprosilicon ?? this.cuprosilicon,
1011+ curtailedly: curtailedly ?? this.curtailedly,
1012+ dellenite: dellenite ?? this.dellenite,
1013+ dimitry: dimitry ?? this.dimitry,
1014+ disdiapason: disdiapason ?? this.disdiapason,
1015+ edifying: edifying ?? this.edifying,
1016+ ethmoiditis: ethmoiditis ?? this.ethmoiditis,
1017+ gastralgy: gastralgy ?? this.gastralgy,
1018+ goatherd: goatherd ?? this.goatherd,
1019+ hammerdress: hammerdress ?? this.hammerdress,
1020+ hangfire: hangfire ?? this.hangfire,
1021+ homocerc: homocerc ?? this.homocerc,
1022+ lacunosity: lacunosity ?? this.lacunosity,
1023+ longiloquence: longiloquence ?? this.longiloquence,
1024+ mameliere: mameliere ?? this.mameliere,
1025+ motherless: motherless ?? this.motherless,
1026+ nonbookish: nonbookish ?? this.nonbookish,
1027+ noncorrodible: noncorrodible ?? this.noncorrodible,
1028+ nonsensicality: nonsensicality ?? this.nonsensicality,
1029+ oafishly: oafishly ?? this.oafishly,
1030+ pfund: pfund ?? this.pfund,
1031+ preadvisory: preadvisory ?? this.preadvisory,
1032+ retroflexed: retroflexed ?? this.retroflexed,
1033+ saccharulmic: saccharulmic ?? this.saccharulmic,
1034+ scowlful: scowlful ?? this.scowlful,
1035+ secluded: secluded ?? this.secluded,
1036+ slackage: slackage ?? this.slackage,
1037+ sphaeridial: sphaeridial ?? this.sphaeridial,
1038+ spondulics: spondulics ?? this.spondulics,
1039+ subsecive: subsecive ?? this.subsecive,
1040+ swellmobsman: swellmobsman ?? this.swellmobsman,
1041+ trachyglossate: trachyglossate ?? this.trachyglossate,
1042+ trialogue: trialogue ?? this.trialogue,
1043+ unassuaged: unassuaged ?? this.unassuaged,
1044+ ungross: ungross ?? this.ungross,
1045+ unjudiciously: unjudiciously ?? this.unjudiciously,
1046+ );
1047+
1048+ factory Maslin.fromJson(Map<String, dynamic> json) => Maslin(
1049+ alicant: json["Alicant"],
1050+ antiatonement: json["antiatonement"],
1051+ anticorrosive: json["anticorrosive"],
1052+ aphidozer: json["aphidozer"],
1053+ bakuninist: json["Bakuninist"],
1054+ be: json["be"],
1055+ catharticalness: json["catharticalness"]?.toDouble(),
1056+ chirotherium: json["Chirotherium"],
1057+ chub: json["chub"],
1058+ cuprosilicon: json["cuprosilicon"],
1059+ curtailedly: json["curtailedly"],
1060+ dellenite: json["dellenite"],
1061+ dimitry: json["Dimitry"],
1062+ disdiapason: json["disdiapason"],
1063+ edifying: json["edifying"],
1064+ ethmoiditis: json["ethmoiditis"],
1065+ gastralgy: json["gastralgy"],
1066+ goatherd: json["goatherd"],
1067+ hammerdress: json["hammerdress"],
1068+ hangfire: json["hangfire"],
1069+ homocerc: json["homocerc"],
1070+ lacunosity: json["lacunosity"],
1071+ longiloquence: json["longiloquence"],
1072+ mameliere: json["mameliere"],
1073+ motherless: json["motherless"],
1074+ nonbookish: json["nonbookish"],
1075+ noncorrodible: json["noncorrodible"],
1076+ nonsensicality: json["nonsensicality"],
1077+ oafishly: json["oafishly"],
1078+ pfund: json["pfund"],
1079+ preadvisory: json["preadvisory"],
1080+ retroflexed: json["retroflexed"],
1081+ saccharulmic: json["saccharulmic"],
1082+ scowlful: json["scowlful"],
1083+ secluded: json["secluded"],
1084+ slackage: json["slackage"],
1085+ sphaeridial: json["sphaeridial"],
1086+ spondulics: json["spondulics"],
1087+ subsecive: json["subsecive"],
1088+ swellmobsman: json["swellmobsman"],
1089+ trachyglossate: json["trachyglossate"],
1090+ trialogue: json["trialogue"],
1091+ unassuaged: json["unassuaged"],
1092+ ungross: json["ungross"],
1093+ unjudiciously: json["unjudiciously"],
1094+ );
1095+
1096+ Map<String, dynamic> toJson() => {
1097+ "Alicant": alicant,
1098+ "antiatonement": antiatonement,
1099+ "anticorrosive": anticorrosive,
1100+ "aphidozer": aphidozer,
1101+ "Bakuninist": bakuninist,
1102+ "be": be,
1103+ "catharticalness": catharticalness,
1104+ "Chirotherium": chirotherium,
1105+ "chub": chub,
1106+ "cuprosilicon": cuprosilicon,
1107+ "curtailedly": curtailedly,
1108+ "dellenite": dellenite,
1109+ "Dimitry": dimitry,
1110+ "disdiapason": disdiapason,
1111+ "edifying": edifying,
1112+ "ethmoiditis": ethmoiditis,
1113+ "gastralgy": gastralgy,
1114+ "goatherd": goatherd,
1115+ "hammerdress": hammerdress,
1116+ "hangfire": hangfire,
1117+ "homocerc": homocerc,
1118+ "lacunosity": lacunosity,
1119+ "longiloquence": longiloquence,
1120+ "mameliere": mameliere,
1121+ "motherless": motherless,
1122+ "nonbookish": nonbookish,
1123+ "noncorrodible": noncorrodible,
1124+ "nonsensicality": nonsensicality,
1125+ "oafishly": oafishly,
1126+ "pfund": pfund,
1127+ "preadvisory": preadvisory,
1128+ "retroflexed": retroflexed,
1129+ "saccharulmic": saccharulmic,
1130+ "scowlful": scowlful,
1131+ "secluded": secluded,
1132+ "slackage": slackage,
1133+ "sphaeridial": sphaeridial,
1134+ "spondulics": spondulics,
1135+ "subsecive": subsecive,
1136+ "swellmobsman": swellmobsman,
1137+ "trachyglossate": trachyglossate,
1138+ "trialogue": trialogue,
1139+ "unassuaged": unassuaged,
1140+ "ungross": ungross,
1141+ "unjudiciously": unjudiciously,
1142+ };
1143+}
1144+
1145+class MonaziteClass {
1146+ final double catharticalness;
1147+ final int chirotherium;
1148+ final String disdiapason;
1149+ final bool homocerc;
1150+ final dynamic nonbookish;
1151+
1152+ MonaziteClass({
1153+ required this.catharticalness,
1154+ required this.chirotherium,
1155+ required this.disdiapason,
1156+ required this.homocerc,
1157+ required this.nonbookish,
1158+ });
1159+
1160+ MonaziteClass copyWith({
1161+ double? catharticalness,
1162+ int? chirotherium,
1163+ String? disdiapason,
1164+ bool? homocerc,
1165+ dynamic nonbookish,
1166+ }) =>
1167+ MonaziteClass(
1168+ catharticalness: catharticalness ?? this.catharticalness,
1169+ chirotherium: chirotherium ?? this.chirotherium,
1170+ disdiapason: disdiapason ?? this.disdiapason,
1171+ homocerc: homocerc ?? this.homocerc,
1172+ nonbookish: nonbookish ?? this.nonbookish,
1173+ );
1174+
1175+ factory MonaziteClass.fromJson(Map<String, dynamic> json) => MonaziteClass(
1176+ catharticalness: json["catharticalness"]?.toDouble(),
1177+ chirotherium: json["Chirotherium"],
1178+ disdiapason: json["disdiapason"],
1179+ homocerc: json["homocerc"],
1180+ nonbookish: (json.containsKey("nonbookish") ? json["nonbookish"] : throw FormatException('Missing required property')),
1181+ );
1182+
1183+ Map<String, dynamic> toJson() => {
1184+ "catharticalness": catharticalness,
1185+ "Chirotherium": chirotherium,
1186+ "disdiapason": disdiapason,
1187+ "homocerc": homocerc,
1188+ "nonbookish": nonbookish,
1189+ };
1190+}
1191+
1192+class MonotheisticallyClass {
1193+ final dynamic blaspheme;
1194+ final double? catharticalness;
1195+ final dynamic celiosalpingectomy;
1196+ final int? chirotherium;
1197+ final dynamic consummativeness;
1198+ final String? disdiapason;
1199+ final dynamic egestive;
1200+ final dynamic enchylema;
1201+ final dynamic gasconade;
1202+ final dynamic holidayer;
1203+ final bool? homocerc;
1204+ final dynamic intuitionalism;
1205+ final dynamic lophiostomate;
1206+ final dynamic nonbookish;
1207+ final dynamic nonvolition;
1208+ final dynamic palatableness;
1209+ final dynamic pimpery;
1210+ final dynamic previolation;
1211+ final dynamic reconveyance;
1212+ final dynamic registership;
1213+ final dynamic rhyacolite;
1214+ final dynamic smithereens;
1215+ final dynamic superedification;
1216+ final dynamic trust;
1217+ final dynamic whitestone;
1218+
1219+ MonotheisticallyClass({
1220+ this.blaspheme,
1221+ this.catharticalness,
1222+ this.celiosalpingectomy,
1223+ this.chirotherium,
1224+ this.consummativeness,
1225+ this.disdiapason,
1226+ this.egestive,
1227+ this.enchylema,
1228+ this.gasconade,
1229+ this.holidayer,
1230+ this.homocerc,
1231+ this.intuitionalism,
1232+ this.lophiostomate,
1233+ this.nonbookish,
1234+ this.nonvolition,
1235+ this.palatableness,
1236+ this.pimpery,
1237+ this.previolation,
1238+ this.reconveyance,
1239+ this.registership,
1240+ this.rhyacolite,
1241+ this.smithereens,
1242+ this.superedification,
1243+ this.trust,
1244+ this.whitestone,
1245+ });
1246+
1247+ MonotheisticallyClass copyWith({
1248+ dynamic blaspheme,
1249+ double? catharticalness,
1250+ dynamic celiosalpingectomy,
1251+ int? chirotherium,
1252+ dynamic consummativeness,
1253+ String? disdiapason,
1254+ dynamic egestive,
1255+ dynamic enchylema,
1256+ dynamic gasconade,
1257+ dynamic holidayer,
1258+ bool? homocerc,
1259+ dynamic intuitionalism,
1260+ dynamic lophiostomate,
1261+ dynamic nonbookish,
1262+ dynamic nonvolition,
1263+ dynamic palatableness,
1264+ dynamic pimpery,
1265+ dynamic previolation,
1266+ dynamic reconveyance,
1267+ dynamic registership,
1268+ dynamic rhyacolite,
1269+ dynamic smithereens,
1270+ dynamic superedification,
1271+ dynamic trust,
1272+ dynamic whitestone,
1273+ }) =>
1274+ MonotheisticallyClass(
1275+ blaspheme: blaspheme ?? this.blaspheme,
1276+ catharticalness: catharticalness ?? this.catharticalness,
1277+ celiosalpingectomy: celiosalpingectomy ?? this.celiosalpingectomy,
1278+ chirotherium: chirotherium ?? this.chirotherium,
1279+ consummativeness: consummativeness ?? this.consummativeness,
1280+ disdiapason: disdiapason ?? this.disdiapason,
1281+ egestive: egestive ?? this.egestive,
1282+ enchylema: enchylema ?? this.enchylema,
1283+ gasconade: gasconade ?? this.gasconade,
1284+ holidayer: holidayer ?? this.holidayer,
1285+ homocerc: homocerc ?? this.homocerc,
1286+ intuitionalism: intuitionalism ?? this.intuitionalism,
1287+ lophiostomate: lophiostomate ?? this.lophiostomate,
1288+ nonbookish: nonbookish ?? this.nonbookish,
1289+ nonvolition: nonvolition ?? this.nonvolition,
1290+ palatableness: palatableness ?? this.palatableness,
1291+ pimpery: pimpery ?? this.pimpery,
1292+ previolation: previolation ?? this.previolation,
1293+ reconveyance: reconveyance ?? this.reconveyance,
1294+ registership: registership ?? this.registership,
1295+ rhyacolite: rhyacolite ?? this.rhyacolite,
1296+ smithereens: smithereens ?? this.smithereens,
1297+ superedification: superedification ?? this.superedification,
1298+ trust: trust ?? this.trust,
1299+ whitestone: whitestone ?? this.whitestone,
1300+ );
1301+
1302+ factory MonotheisticallyClass.fromJson(Map<String, dynamic> json) => MonotheisticallyClass(
1303+ blaspheme: json["blaspheme"],
1304+ catharticalness: json["catharticalness"]?.toDouble(),
1305+ celiosalpingectomy: json["celiosalpingectomy"],
1306+ chirotherium: json["Chirotherium"],
1307+ consummativeness: json["consummativeness"],
1308+ disdiapason: json["disdiapason"],
1309+ egestive: json["egestive"],
1310+ enchylema: json["enchylema"],
1311+ gasconade: json["gasconade"],
1312+ holidayer: json["holidayer"],
1313+ homocerc: json["homocerc"],
1314+ intuitionalism: json["intuitionalism"],
1315+ lophiostomate: json["lophiostomate"],
1316+ nonbookish: json["nonbookish"],
1317+ nonvolition: json["nonvolition"],
1318+ palatableness: json["palatableness"],
1319+ pimpery: json["pimpery"],
1320+ previolation: json["previolation"],
1321+ reconveyance: json["reconveyance"],
1322+ registership: json["registership"],
1323+ rhyacolite: json["rhyacolite"],
1324+ smithereens: json["smithereens"],
1325+ superedification: json["superedification"],
1326+ trust: json["trust"],
1327+ whitestone: json["whitestone"],
1328+ );
1329+
1330+ Map<String, dynamic> toJson() => {
1331+ "blaspheme": blaspheme,
1332+ "catharticalness": catharticalness,
1333+ "celiosalpingectomy": celiosalpingectomy,
1334+ "Chirotherium": chirotherium,
1335+ "consummativeness": consummativeness,
1336+ "disdiapason": disdiapason,
1337+ "egestive": egestive,
1338+ "enchylema": enchylema,
1339+ "gasconade": gasconade,
1340+ "holidayer": holidayer,
1341+ "homocerc": homocerc,
1342+ "intuitionalism": intuitionalism,
1343+ "lophiostomate": lophiostomate,
1344+ "nonbookish": nonbookish,
1345+ "nonvolition": nonvolition,
1346+ "palatableness": palatableness,
1347+ "pimpery": pimpery,
1348+ "previolation": previolation,
1349+ "reconveyance": reconveyance,
1350+ "registership": registership,
1351+ "rhyacolite": rhyacolite,
1352+ "smithereens": smithereens,
1353+ "superedification": superedification,
1354+ "trust": trust,
1355+ "whitestone": whitestone,
1356+ };
1357+}
1358+
1359+class Noncontributing {
1360+ final String estevin;
1361+ final double jolterhead;
1362+ final int sauternes;
1363+ final bool sparsely;
1364+ final dynamic unrequested;
1365+
1366+ Noncontributing({
1367+ required this.estevin,
1368+ required this.jolterhead,
1369+ required this.sauternes,
1370+ required this.sparsely,
1371+ required this.unrequested,
1372+ });
1373+
1374+ Noncontributing copyWith({
1375+ String? estevin,
1376+ double? jolterhead,
1377+ int? sauternes,
1378+ bool? sparsely,
1379+ dynamic unrequested,
1380+ }) =>
1381+ Noncontributing(
1382+ estevin: estevin ?? this.estevin,
1383+ jolterhead: jolterhead ?? this.jolterhead,
1384+ sauternes: sauternes ?? this.sauternes,
1385+ sparsely: sparsely ?? this.sparsely,
1386+ unrequested: unrequested ?? this.unrequested,
1387+ );
1388+
1389+ factory Noncontributing.fromJson(Map<String, dynamic> json) => Noncontributing(
1390+ estevin: json["estevin"],
1391+ jolterhead: json["jolterhead"]?.toDouble(),
1392+ sauternes: json["sauternes"],
1393+ sparsely: json["sparsely"],
1394+ unrequested: (json.containsKey("unrequested") ? json["unrequested"] : throw FormatException('Missing required property')),
1395+ );
1396+
1397+ Map<String, dynamic> toJson() => {
1398+ "estevin": estevin,
1399+ "jolterhead": jolterhead,
1400+ "sauternes": sauternes,
1401+ "sparsely": sparsely,
1402+ "unrequested": unrequested,
1403+ };
1404+}
1405+
1406+class OccupationalistClass {
1407+ final dynamic beholdable;
1408+ final dynamic brotuliform;
1409+ final dynamic chimakum;
1410+ final dynamic doodler;
1411+ final dynamic emulsin;
1412+ final dynamic fin;
1413+ final dynamic flourishing;
1414+ final dynamic flueless;
1415+ final dynamic furtively;
1416+ final dynamic gritter;
1417+ final dynamic interwish;
1418+ final dynamic monoxylic;
1419+ final dynamic myristic;
1420+ final dynamic nightwear;
1421+ final dynamic peruser;
1422+ final dynamic theoastrological;
1423+ final dynamic thumby;
1424+ final dynamic tingitid;
1425+ final dynamic trailless;
1426+ final dynamic unpocketed;
1427+
1428+ OccupationalistClass({
1429+ required this.beholdable,
1430+ required this.brotuliform,
1431+ required this.chimakum,
1432+ required this.doodler,
1433+ required this.emulsin,
1434+ required this.fin,
1435+ required this.flourishing,
1436+ required this.flueless,
1437+ required this.furtively,
1438+ required this.gritter,
1439+ required this.interwish,
1440+ required this.monoxylic,
1441+ required this.myristic,
1442+ required this.nightwear,
1443+ required this.peruser,
1444+ required this.theoastrological,
1445+ required this.thumby,
1446+ required this.tingitid,
1447+ required this.trailless,
1448+ required this.unpocketed,
1449+ });
1450+
1451+ OccupationalistClass copyWith({
1452+ dynamic beholdable,
1453+ dynamic brotuliform,
1454+ dynamic chimakum,
1455+ dynamic doodler,
1456+ dynamic emulsin,
1457+ dynamic fin,
1458+ dynamic flourishing,
1459+ dynamic flueless,
1460+ dynamic furtively,
1461+ dynamic gritter,
1462+ dynamic interwish,
1463+ dynamic monoxylic,
1464+ dynamic myristic,
1465+ dynamic nightwear,
1466+ dynamic peruser,
1467+ dynamic theoastrological,
1468+ dynamic thumby,
1469+ dynamic tingitid,
1470+ dynamic trailless,
1471+ dynamic unpocketed,
1472+ }) =>
1473+ OccupationalistClass(
1474+ beholdable: beholdable ?? this.beholdable,
1475+ brotuliform: brotuliform ?? this.brotuliform,
1476+ chimakum: chimakum ?? this.chimakum,
1477+ doodler: doodler ?? this.doodler,
1478+ emulsin: emulsin ?? this.emulsin,
1479+ fin: fin ?? this.fin,
1480+ flourishing: flourishing ?? this.flourishing,
1481+ flueless: flueless ?? this.flueless,
1482+ furtively: furtively ?? this.furtively,
1483+ gritter: gritter ?? this.gritter,
1484+ interwish: interwish ?? this.interwish,
1485+ monoxylic: monoxylic ?? this.monoxylic,
1486+ myristic: myristic ?? this.myristic,
1487+ nightwear: nightwear ?? this.nightwear,
1488+ peruser: peruser ?? this.peruser,
1489+ theoastrological: theoastrological ?? this.theoastrological,
1490+ thumby: thumby ?? this.thumby,
1491+ tingitid: tingitid ?? this.tingitid,
1492+ trailless: trailless ?? this.trailless,
1493+ unpocketed: unpocketed ?? this.unpocketed,
1494+ );
1495+
1496+ factory OccupationalistClass.fromJson(Map<String, dynamic> json) => OccupationalistClass(
1497+ beholdable: (json.containsKey("beholdable") ? json["beholdable"] : throw FormatException('Missing required property')),
1498+ brotuliform: (json.containsKey("brotuliform") ? json["brotuliform"] : throw FormatException('Missing required property')),
1499+ chimakum: (json.containsKey("Chimakum") ? json["Chimakum"] : throw FormatException('Missing required property')),
1500+ doodler: (json.containsKey("doodler") ? json["doodler"] : throw FormatException('Missing required property')),
1501+ emulsin: (json.containsKey("emulsin") ? json["emulsin"] : throw FormatException('Missing required property')),
1502+ fin: (json.containsKey("Fin") ? json["Fin"] : throw FormatException('Missing required property')),
1503+ flourishing: (json.containsKey("flourishing") ? json["flourishing"] : throw FormatException('Missing required property')),
1504+ flueless: (json.containsKey("flueless") ? json["flueless"] : throw FormatException('Missing required property')),
1505+ furtively: (json.containsKey("furtively") ? json["furtively"] : throw FormatException('Missing required property')),
1506+ gritter: (json.containsKey("gritter") ? json["gritter"] : throw FormatException('Missing required property')),
1507+ interwish: (json.containsKey("interwish") ? json["interwish"] : throw FormatException('Missing required property')),
1508+ monoxylic: (json.containsKey("monoxylic") ? json["monoxylic"] : throw FormatException('Missing required property')),
1509+ myristic: (json.containsKey("myristic") ? json["myristic"] : throw FormatException('Missing required property')),
1510+ nightwear: (json.containsKey("nightwear") ? json["nightwear"] : throw FormatException('Missing required property')),
1511+ peruser: (json.containsKey("peruser") ? json["peruser"] : throw FormatException('Missing required property')),
1512+ theoastrological: (json.containsKey("theoastrological") ? json["theoastrological"] : throw FormatException('Missing required property')),
1513+ thumby: (json.containsKey("thumby") ? json["thumby"] : throw FormatException('Missing required property')),
1514+ tingitid: (json.containsKey("tingitid") ? json["tingitid"] : throw FormatException('Missing required property')),
1515+ trailless: (json.containsKey("trailless") ? json["trailless"] : throw FormatException('Missing required property')),
1516+ unpocketed: (json.containsKey("unpocketed") ? json["unpocketed"] : throw FormatException('Missing required property')),
1517+ );
1518+
1519+ Map<String, dynamic> toJson() => {
1520+ "beholdable": beholdable,
1521+ "brotuliform": brotuliform,
1522+ "Chimakum": chimakum,
1523+ "doodler": doodler,
1524+ "emulsin": emulsin,
1525+ "Fin": fin,
1526+ "flourishing": flourishing,
1527+ "flueless": flueless,
1528+ "furtively": furtively,
1529+ "gritter": gritter,
1530+ "interwish": interwish,
1531+ "monoxylic": monoxylic,
1532+ "myristic": myristic,
1533+ "nightwear": nightwear,
1534+ "peruser": peruser,
1535+ "theoastrological": theoastrological,
1536+ "thumby": thumby,
1537+ "tingitid": tingitid,
1538+ "trailless": trailless,
1539+ "unpocketed": unpocketed,
1540+ };
1541+}
1542+
1543+class OutrivalClass {
1544+ final dynamic adroitly;
1545+ final dynamic bridehood;
1546+ final dynamic castoroides;
1547+ final dynamic czechoslovak;
1548+ final dynamic diagenesis;
1549+ final dynamic dihexahedron;
1550+ final dynamic dopester;
1551+ final dynamic eumerism;
1552+ final dynamic flyness;
1553+ final dynamic fouler;
1554+ final dynamic laudanosine;
1555+ final dynamic lingulidae;
1556+ final dynamic minutary;
1557+ final dynamic mitra;
1558+ final dynamic opisthorchiasis;
1559+ final dynamic pensively;
1560+ final dynamic pubigerous;
1561+ final dynamic rebellious;
1562+ final dynamic recodify;
1563+ final dynamic unpaced;
1564+
1565+ OutrivalClass({
1566+ required this.adroitly,
1567+ required this.bridehood,
1568+ required this.castoroides,
1569+ required this.czechoslovak,
1570+ required this.diagenesis,
1571+ required this.dihexahedron,
1572+ required this.dopester,
1573+ required this.eumerism,
1574+ required this.flyness,
1575+ required this.fouler,
1576+ required this.laudanosine,
1577+ required this.lingulidae,
1578+ required this.minutary,
1579+ required this.mitra,
1580+ required this.opisthorchiasis,
1581+ required this.pensively,
1582+ required this.pubigerous,
1583+ required this.rebellious,
1584+ required this.recodify,
1585+ required this.unpaced,
1586+ });
1587+
1588+ OutrivalClass copyWith({
1589+ dynamic adroitly,
1590+ dynamic bridehood,
1591+ dynamic castoroides,
1592+ dynamic czechoslovak,
1593+ dynamic diagenesis,
1594+ dynamic dihexahedron,
1595+ dynamic dopester,
1596+ dynamic eumerism,
1597+ dynamic flyness,
1598+ dynamic fouler,
1599+ dynamic laudanosine,
1600+ dynamic lingulidae,
1601+ dynamic minutary,
1602+ dynamic mitra,
1603+ dynamic opisthorchiasis,
1604+ dynamic pensively,
1605+ dynamic pubigerous,
1606+ dynamic rebellious,
1607+ dynamic recodify,
1608+ dynamic unpaced,
1609+ }) =>
1610+ OutrivalClass(
1611+ adroitly: adroitly ?? this.adroitly,
1612+ bridehood: bridehood ?? this.bridehood,
1613+ castoroides: castoroides ?? this.castoroides,
1614+ czechoslovak: czechoslovak ?? this.czechoslovak,
1615+ diagenesis: diagenesis ?? this.diagenesis,
1616+ dihexahedron: dihexahedron ?? this.dihexahedron,
1617+ dopester: dopester ?? this.dopester,
1618+ eumerism: eumerism ?? this.eumerism,
1619+ flyness: flyness ?? this.flyness,
1620+ fouler: fouler ?? this.fouler,
1621+ laudanosine: laudanosine ?? this.laudanosine,
1622+ lingulidae: lingulidae ?? this.lingulidae,
1623+ minutary: minutary ?? this.minutary,
1624+ mitra: mitra ?? this.mitra,
1625+ opisthorchiasis: opisthorchiasis ?? this.opisthorchiasis,
1626+ pensively: pensively ?? this.pensively,
1627+ pubigerous: pubigerous ?? this.pubigerous,
1628+ rebellious: rebellious ?? this.rebellious,
1629+ recodify: recodify ?? this.recodify,
1630+ unpaced: unpaced ?? this.unpaced,
1631+ );
1632+
1633+ factory OutrivalClass.fromJson(Map<String, dynamic> json) => OutrivalClass(
1634+ adroitly: (json.containsKey("adroitly") ? json["adroitly"] : throw FormatException('Missing required property')),
1635+ bridehood: (json.containsKey("bridehood") ? json["bridehood"] : throw FormatException('Missing required property')),
1636+ castoroides: (json.containsKey("Castoroides") ? json["Castoroides"] : throw FormatException('Missing required property')),
1637+ czechoslovak: (json.containsKey("Czechoslovak") ? json["Czechoslovak"] : throw FormatException('Missing required property')),
1638+ diagenesis: (json.containsKey("diagenesis") ? json["diagenesis"] : throw FormatException('Missing required property')),
1639+ dihexahedron: (json.containsKey("dihexahedron") ? json["dihexahedron"] : throw FormatException('Missing required property')),
1640+ dopester: (json.containsKey("dopester") ? json["dopester"] : throw FormatException('Missing required property')),
1641+ eumerism: (json.containsKey("eumerism") ? json["eumerism"] : throw FormatException('Missing required property')),
1642+ flyness: (json.containsKey("flyness") ? json["flyness"] : throw FormatException('Missing required property')),
1643+ fouler: (json.containsKey("fouler") ? json["fouler"] : throw FormatException('Missing required property')),
1644+ laudanosine: (json.containsKey("laudanosine") ? json["laudanosine"] : throw FormatException('Missing required property')),
1645+ lingulidae: (json.containsKey("Lingulidae") ? json["Lingulidae"] : throw FormatException('Missing required property')),
1646+ minutary: (json.containsKey("minutary") ? json["minutary"] : throw FormatException('Missing required property')),
1647+ mitra: (json.containsKey("mitra") ? json["mitra"] : throw FormatException('Missing required property')),
1648+ opisthorchiasis: (json.containsKey("opisthorchiasis") ? json["opisthorchiasis"] : throw FormatException('Missing required property')),
1649+ pensively: (json.containsKey("pensively") ? json["pensively"] : throw FormatException('Missing required property')),
1650+ pubigerous: (json.containsKey("pubigerous") ? json["pubigerous"] : throw FormatException('Missing required property')),
1651+ rebellious: (json.containsKey("rebellious") ? json["rebellious"] : throw FormatException('Missing required property')),
1652+ recodify: (json.containsKey("recodify") ? json["recodify"] : throw FormatException('Missing required property')),
1653+ unpaced: (json.containsKey("unpaced") ? json["unpaced"] : throw FormatException('Missing required property')),
1654+ );
1655+
1656+ Map<String, dynamic> toJson() => {
1657+ "adroitly": adroitly,
1658+ "bridehood": bridehood,
1659+ "Castoroides": castoroides,
1660+ "Czechoslovak": czechoslovak,
1661+ "diagenesis": diagenesis,
1662+ "dihexahedron": dihexahedron,
1663+ "dopester": dopester,
1664+ "eumerism": eumerism,
1665+ "flyness": flyness,
1666+ "fouler": fouler,
1667+ "laudanosine": laudanosine,
1668+ "Lingulidae": lingulidae,
1669+ "minutary": minutary,
1670+ "mitra": mitra,
1671+ "opisthorchiasis": opisthorchiasis,
1672+ "pensively": pensively,
1673+ "pubigerous": pubigerous,
1674+ "rebellious": rebellious,
1675+ "recodify": recodify,
1676+ "unpaced": unpaced,
1677+ };
1678+}
1679+
1680+class PiaculumClass {
1681+ final int? alada;
1682+ final int? amphistomous;
1683+ final int? boysenberry;
1684+ final double? catharticalness;
1685+ final int? chirotherium;
1686+ final int? decardinalize;
1687+ final int? discouragement;
1688+ final String? disdiapason;
1689+ final int? doitrified;
1690+ final int? hexaspermous;
1691+ final bool? homocerc;
1692+ final int? insinking;
1693+ final int? loathfulness;
1694+ final int? miasmatical;
1695+ final int? neurofibril;
1696+ final dynamic nonbookish;
1697+ final int? phonendoscope;
1698+ final int? pilferment;
1699+ final int? predismissory;
1700+ final int? preinscription;
1701+ final int? quotative;
1702+ final int? sienna;
1703+ final int? thorax;
1704+ final int? yachting;
1705+ final int? zipper;
1706+
1707+ PiaculumClass({
1708+ this.alada,
1709+ this.amphistomous,
1710+ this.boysenberry,
1711+ this.catharticalness,
1712+ this.chirotherium,
1713+ this.decardinalize,
1714+ this.discouragement,
1715+ this.disdiapason,
1716+ this.doitrified,
1717+ this.hexaspermous,
1718+ this.homocerc,
1719+ this.insinking,
1720+ this.loathfulness,
1721+ this.miasmatical,
1722+ this.neurofibril,
1723+ this.nonbookish,
1724+ this.phonendoscope,
1725+ this.pilferment,
1726+ this.predismissory,
1727+ this.preinscription,
1728+ this.quotative,
1729+ this.sienna,
1730+ this.thorax,
1731+ this.yachting,
1732+ this.zipper,
1733+ });
1734+
1735+ PiaculumClass copyWith({
1736+ int? alada,
1737+ int? amphistomous,
1738+ int? boysenberry,
1739+ double? catharticalness,
1740+ int? chirotherium,
1741+ int? decardinalize,
1742+ int? discouragement,
1743+ String? disdiapason,
1744+ int? doitrified,
1745+ int? hexaspermous,
1746+ bool? homocerc,
1747+ int? insinking,
1748+ int? loathfulness,
1749+ int? miasmatical,
1750+ int? neurofibril,
1751+ dynamic nonbookish,
1752+ int? phonendoscope,
1753+ int? pilferment,
1754+ int? predismissory,
1755+ int? preinscription,
1756+ int? quotative,
1757+ int? sienna,
1758+ int? thorax,
1759+ int? yachting,
1760+ int? zipper,
1761+ }) =>
1762+ PiaculumClass(
1763+ alada: alada ?? this.alada,
1764+ amphistomous: amphistomous ?? this.amphistomous,
1765+ boysenberry: boysenberry ?? this.boysenberry,
1766+ catharticalness: catharticalness ?? this.catharticalness,
1767+ chirotherium: chirotherium ?? this.chirotherium,
1768+ decardinalize: decardinalize ?? this.decardinalize,
1769+ discouragement: discouragement ?? this.discouragement,
1770+ disdiapason: disdiapason ?? this.disdiapason,
1771+ doitrified: doitrified ?? this.doitrified,
1772+ hexaspermous: hexaspermous ?? this.hexaspermous,
1773+ homocerc: homocerc ?? this.homocerc,
1774+ insinking: insinking ?? this.insinking,
1775+ loathfulness: loathfulness ?? this.loathfulness,
1776+ miasmatical: miasmatical ?? this.miasmatical,
1777+ neurofibril: neurofibril ?? this.neurofibril,
1778+ nonbookish: nonbookish ?? this.nonbookish,
1779+ phonendoscope: phonendoscope ?? this.phonendoscope,
1780+ pilferment: pilferment ?? this.pilferment,
1781+ predismissory: predismissory ?? this.predismissory,
1782+ preinscription: preinscription ?? this.preinscription,
1783+ quotative: quotative ?? this.quotative,
1784+ sienna: sienna ?? this.sienna,
1785+ thorax: thorax ?? this.thorax,
1786+ yachting: yachting ?? this.yachting,
1787+ zipper: zipper ?? this.zipper,
1788+ );
1789+
1790+ factory PiaculumClass.fromJson(Map<String, dynamic> json) => PiaculumClass(
1791+ alada: json["alada"],
1792+ amphistomous: json["amphistomous"],
1793+ boysenberry: json["boysenberry"],
1794+ catharticalness: json["catharticalness"]?.toDouble(),
1795+ chirotherium: json["Chirotherium"],
1796+ decardinalize: json["decardinalize"],
1797+ discouragement: json["discouragement"],
1798+ disdiapason: json["disdiapason"],
1799+ doitrified: json["doitrified"],
1800+ hexaspermous: json["hexaspermous"],
1801+ homocerc: json["homocerc"],
1802+ insinking: json["insinking"],
1803+ loathfulness: json["loathfulness"],
1804+ miasmatical: json["miasmatical"],
1805+ neurofibril: json["neurofibril"],
1806+ nonbookish: json["nonbookish"],
1807+ phonendoscope: json["phonendoscope"],
1808+ pilferment: json["pilferment"],
1809+ predismissory: json["predismissory"],
1810+ preinscription: json["preinscription"],
1811+ quotative: json["quotative"],
1812+ sienna: json["sienna"],
1813+ thorax: json["thorax"],
1814+ yachting: json["yachting"],
1815+ zipper: json["Zipper"],
1816+ );
1817+
1818+ Map<String, dynamic> toJson() => {
1819+ "alada": alada,
1820+ "amphistomous": amphistomous,
1821+ "boysenberry": boysenberry,
1822+ "catharticalness": catharticalness,
1823+ "Chirotherium": chirotherium,
1824+ "decardinalize": decardinalize,
1825+ "discouragement": discouragement,
1826+ "disdiapason": disdiapason,
1827+ "doitrified": doitrified,
1828+ "hexaspermous": hexaspermous,
1829+ "homocerc": homocerc,
1830+ "insinking": insinking,
1831+ "loathfulness": loathfulness,
1832+ "miasmatical": miasmatical,
1833+ "neurofibril": neurofibril,
1834+ "nonbookish": nonbookish,
1835+ "phonendoscope": phonendoscope,
1836+ "pilferment": pilferment,
1837+ "predismissory": predismissory,
1838+ "preinscription": preinscription,
1839+ "quotative": quotative,
1840+ "sienna": sienna,
1841+ "thorax": thorax,
1842+ "yachting": yachting,
1843+ "Zipper": zipper,
1844+ };
1845+}
1846+
1847+class Pneumocele {
1848+ final dynamic carbonarism;
1849+ final double? catharticalness;
1850+ final int? chirotherium;
1851+ final dynamic cineolic;
1852+ final dynamic cobbly;
1853+ final dynamic conchyliferous;
1854+ final dynamic congregation;
1855+ final String? disdiapason;
1856+ final dynamic enterotomy;
1857+ final dynamic entophytal;
1858+ final dynamic fewtrils;
1859+ final dynamic herem;
1860+ final bool? homocerc;
1861+ final dynamic koniga;
1862+ final dynamic meticulosity;
1863+ final dynamic micky;
1864+ final dynamic mismarriage;
1865+ final dynamic neurotrophic;
1866+ final dynamic nonbookish;
1867+ final dynamic persuasively;
1868+ final dynamic replaceable;
1869+ final dynamic silex;
1870+ final dynamic taillight;
1871+ final dynamic unjealous;
1872+ final dynamic visitorial;
1873+
1874+ Pneumocele({
1875+ this.carbonarism,
1876+ this.catharticalness,
1877+ this.chirotherium,
1878+ this.cineolic,
1879+ this.cobbly,
1880+ this.conchyliferous,
1881+ this.congregation,
1882+ this.disdiapason,
1883+ this.enterotomy,
1884+ this.entophytal,
1885+ this.fewtrils,
1886+ this.herem,
1887+ this.homocerc,
1888+ this.koniga,
1889+ this.meticulosity,
1890+ this.micky,
1891+ this.mismarriage,
1892+ this.neurotrophic,
1893+ this.nonbookish,
1894+ this.persuasively,
1895+ this.replaceable,
1896+ this.silex,
1897+ this.taillight,
1898+ this.unjealous,
1899+ this.visitorial,
1900+ });
1901+
1902+ Pneumocele copyWith({
1903+ dynamic carbonarism,
1904+ double? catharticalness,
1905+ int? chirotherium,
1906+ dynamic cineolic,
1907+ dynamic cobbly,
1908+ dynamic conchyliferous,
1909+ dynamic congregation,
1910+ String? disdiapason,
1911+ dynamic enterotomy,
1912+ dynamic entophytal,
1913+ dynamic fewtrils,
1914+ dynamic herem,
1915+ bool? homocerc,
1916+ dynamic koniga,
1917+ dynamic meticulosity,
1918+ dynamic micky,
1919+ dynamic mismarriage,
1920+ dynamic neurotrophic,
1921+ dynamic nonbookish,
1922+ dynamic persuasively,
1923+ dynamic replaceable,
1924+ dynamic silex,
1925+ dynamic taillight,
1926+ dynamic unjealous,
1927+ dynamic visitorial,
1928+ }) =>
1929+ Pneumocele(
1930+ carbonarism: carbonarism ?? this.carbonarism,
1931+ catharticalness: catharticalness ?? this.catharticalness,
1932+ chirotherium: chirotherium ?? this.chirotherium,
1933+ cineolic: cineolic ?? this.cineolic,
1934+ cobbly: cobbly ?? this.cobbly,
1935+ conchyliferous: conchyliferous ?? this.conchyliferous,
1936+ congregation: congregation ?? this.congregation,
1937+ disdiapason: disdiapason ?? this.disdiapason,
1938+ enterotomy: enterotomy ?? this.enterotomy,
1939+ entophytal: entophytal ?? this.entophytal,
1940+ fewtrils: fewtrils ?? this.fewtrils,
1941+ herem: herem ?? this.herem,
1942+ homocerc: homocerc ?? this.homocerc,
1943+ koniga: koniga ?? this.koniga,
1944+ meticulosity: meticulosity ?? this.meticulosity,
1945+ micky: micky ?? this.micky,
1946+ mismarriage: mismarriage ?? this.mismarriage,
1947+ neurotrophic: neurotrophic ?? this.neurotrophic,
1948+ nonbookish: nonbookish ?? this.nonbookish,
1949+ persuasively: persuasively ?? this.persuasively,
1950+ replaceable: replaceable ?? this.replaceable,
1951+ silex: silex ?? this.silex,
1952+ taillight: taillight ?? this.taillight,
1953+ unjealous: unjealous ?? this.unjealous,
1954+ visitorial: visitorial ?? this.visitorial,
1955+ );
1956+
1957+ factory Pneumocele.fromJson(Map<String, dynamic> json) => Pneumocele(
1958+ carbonarism: json["Carbonarism"],
1959+ catharticalness: json["catharticalness"]?.toDouble(),
1960+ chirotherium: json["Chirotherium"],
1961+ cineolic: json["cineolic"],
1962+ cobbly: json["cobbly"],
1963+ conchyliferous: json["conchyliferous"],
1964+ congregation: json["congregation"],
1965+ disdiapason: json["disdiapason"],
1966+ enterotomy: json["enterotomy"],
1967+ entophytal: json["entophytal"],
1968+ fewtrils: json["fewtrils"],
1969+ herem: json["herem"],
1970+ homocerc: json["homocerc"],
1971+ koniga: json["Koniga"],
1972+ meticulosity: json["meticulosity"],
1973+ micky: json["Micky"],
1974+ mismarriage: json["mismarriage"],
1975+ neurotrophic: json["neurotrophic"],
1976+ nonbookish: json["nonbookish"],
1977+ persuasively: json["persuasively"],
1978+ replaceable: json["replaceable"],
1979+ silex: json["silex"],
1980+ taillight: json["taillight"],
1981+ unjealous: json["unjealous"],
1982+ visitorial: json["visitorial"],
1983+ );
1984+
1985+ Map<String, dynamic> toJson() => {
1986+ "Carbonarism": carbonarism,
1987+ "catharticalness": catharticalness,
1988+ "Chirotherium": chirotherium,
1989+ "cineolic": cineolic,
1990+ "cobbly": cobbly,
1991+ "conchyliferous": conchyliferous,
1992+ "congregation": congregation,
1993+ "disdiapason": disdiapason,
1994+ "enterotomy": enterotomy,
1995+ "entophytal": entophytal,
1996+ "fewtrils": fewtrils,
1997+ "herem": herem,
1998+ "homocerc": homocerc,
1999+ "Koniga": koniga,
2000+ "meticulosity": meticulosity,
2001+ "Micky": micky,
2002+ "mismarriage": mismarriage,
2003+ "neurotrophic": neurotrophic,
2004+ "nonbookish": nonbookish,
2005+ "persuasively": persuasively,
2006+ "replaceable": replaceable,
2007+ "silex": silex,
2008+ "taillight": taillight,
2009+ "unjealous": unjealous,
2010+ "visitorial": visitorial,
2011+ };
2012+}
2013+
2014+class PotwhiskyClass {
2015+ final dynamic arciform;
2016+ final dynamic cresolin;
2017+ final dynamic disheartener;
2018+ final dynamic disproportionable;
2019+ final dynamic euchorda;
2020+ final dynamic ferryway;
2021+ final dynamic filamentiferous;
2022+ final dynamic flemish;
2023+ final dynamic forgainst;
2024+ final dynamic grainering;
2025+ final dynamic irrevoluble;
2026+ final dynamic kindredship;
2027+ final dynamic pinguitudinous;
2028+ final dynamic simpletonic;
2029+ final dynamic singsong;
2030+ final dynamic submergement;
2031+ final dynamic supraoesophagal;
2032+ final dynamic thrashel;
2033+ final dynamic tyremesis;
2034+ final dynamic yoruba;
2035+
2036+ PotwhiskyClass({
2037+ required this.arciform,
2038+ required this.cresolin,
2039+ required this.disheartener,
2040+ required this.disproportionable,
2041+ required this.euchorda,
2042+ required this.ferryway,
2043+ required this.filamentiferous,
2044+ required this.flemish,
2045+ required this.forgainst,
2046+ required this.grainering,
2047+ required this.irrevoluble,
2048+ required this.kindredship,
2049+ required this.pinguitudinous,
2050+ required this.simpletonic,
2051+ required this.singsong,
2052+ required this.submergement,
2053+ required this.supraoesophagal,
2054+ required this.thrashel,
2055+ required this.tyremesis,
2056+ required this.yoruba,
2057+ });
2058+
2059+ PotwhiskyClass copyWith({
2060+ dynamic arciform,
2061+ dynamic cresolin,
2062+ dynamic disheartener,
2063+ dynamic disproportionable,
2064+ dynamic euchorda,
2065+ dynamic ferryway,
2066+ dynamic filamentiferous,
2067+ dynamic flemish,
2068+ dynamic forgainst,
2069+ dynamic grainering,
2070+ dynamic irrevoluble,
2071+ dynamic kindredship,
2072+ dynamic pinguitudinous,
2073+ dynamic simpletonic,
2074+ dynamic singsong,
2075+ dynamic submergement,
2076+ dynamic supraoesophagal,
2077+ dynamic thrashel,
2078+ dynamic tyremesis,
2079+ dynamic yoruba,
2080+ }) =>
2081+ PotwhiskyClass(
2082+ arciform: arciform ?? this.arciform,
2083+ cresolin: cresolin ?? this.cresolin,
2084+ disheartener: disheartener ?? this.disheartener,
2085+ disproportionable: disproportionable ?? this.disproportionable,
2086+ euchorda: euchorda ?? this.euchorda,
2087+ ferryway: ferryway ?? this.ferryway,
2088+ filamentiferous: filamentiferous ?? this.filamentiferous,
2089+ flemish: flemish ?? this.flemish,
2090+ forgainst: forgainst ?? this.forgainst,
2091+ grainering: grainering ?? this.grainering,
2092+ irrevoluble: irrevoluble ?? this.irrevoluble,
2093+ kindredship: kindredship ?? this.kindredship,
2094+ pinguitudinous: pinguitudinous ?? this.pinguitudinous,
2095+ simpletonic: simpletonic ?? this.simpletonic,
2096+ singsong: singsong ?? this.singsong,
2097+ submergement: submergement ?? this.submergement,
2098+ supraoesophagal: supraoesophagal ?? this.supraoesophagal,
2099+ thrashel: thrashel ?? this.thrashel,
2100+ tyremesis: tyremesis ?? this.tyremesis,
2101+ yoruba: yoruba ?? this.yoruba,
2102+ );
2103+
2104+ factory PotwhiskyClass.fromJson(Map<String, dynamic> json) => PotwhiskyClass(
2105+ arciform: (json.containsKey("arciform") ? json["arciform"] : throw FormatException('Missing required property')),
2106+ cresolin: (json.containsKey("cresolin") ? json["cresolin"] : throw FormatException('Missing required property')),
2107+ disheartener: (json.containsKey("disheartener") ? json["disheartener"] : throw FormatException('Missing required property')),
2108+ disproportionable: (json.containsKey("disproportionable") ? json["disproportionable"] : throw FormatException('Missing required property')),
2109+ euchorda: (json.containsKey("Euchorda") ? json["Euchorda"] : throw FormatException('Missing required property')),
2110+ ferryway: (json.containsKey("ferryway") ? json["ferryway"] : throw FormatException('Missing required property')),
2111+ filamentiferous: (json.containsKey("filamentiferous") ? json["filamentiferous"] : throw FormatException('Missing required property')),
2112+ flemish: (json.containsKey("flemish") ? json["flemish"] : throw FormatException('Missing required property')),
2113+ forgainst: (json.containsKey("forgainst") ? json["forgainst"] : throw FormatException('Missing required property')),
2114+ grainering: (json.containsKey("grainering") ? json["grainering"] : throw FormatException('Missing required property')),
2115+ irrevoluble: (json.containsKey("irrevoluble") ? json["irrevoluble"] : throw FormatException('Missing required property')),
2116+ kindredship: (json.containsKey("kindredship") ? json["kindredship"] : throw FormatException('Missing required property')),
2117+ pinguitudinous: (json.containsKey("pinguitudinous") ? json["pinguitudinous"] : throw FormatException('Missing required property')),
2118+ simpletonic: (json.containsKey("simpletonic") ? json["simpletonic"] : throw FormatException('Missing required property')),
2119+ singsong: (json.containsKey("singsong") ? json["singsong"] : throw FormatException('Missing required property')),
2120+ submergement: (json.containsKey("submergement") ? json["submergement"] : throw FormatException('Missing required property')),
2121+ supraoesophagal: (json.containsKey("supraoesophagal") ? json["supraoesophagal"] : throw FormatException('Missing required property')),
2122+ thrashel: (json.containsKey("thrashel") ? json["thrashel"] : throw FormatException('Missing required property')),
2123+ tyremesis: (json.containsKey("tyremesis") ? json["tyremesis"] : throw FormatException('Missing required property')),
2124+ yoruba: (json.containsKey("Yoruba") ? json["Yoruba"] : throw FormatException('Missing required property')),
2125+ );
2126+
2127+ Map<String, dynamic> toJson() => {
2128+ "arciform": arciform,
2129+ "cresolin": cresolin,
2130+ "disheartener": disheartener,
2131+ "disproportionable": disproportionable,
2132+ "Euchorda": euchorda,
2133+ "ferryway": ferryway,
2134+ "filamentiferous": filamentiferous,
2135+ "flemish": flemish,
2136+ "forgainst": forgainst,
2137+ "grainering": grainering,
2138+ "irrevoluble": irrevoluble,
2139+ "kindredship": kindredship,
2140+ "pinguitudinous": pinguitudinous,
2141+ "simpletonic": simpletonic,
2142+ "singsong": singsong,
2143+ "submergement": submergement,
2144+ "supraoesophagal": supraoesophagal,
2145+ "thrashel": thrashel,
2146+ "tyremesis": tyremesis,
2147+ "Yoruba": yoruba,
2148+ };
2149+}
2150+
2151+class PrefreshmanClass {
2152+ final dynamic azorubine;
2153+ final dynamic choroiditis;
2154+ final dynamic coagulatory;
2155+ final dynamic cyclorama;
2156+ final dynamic dolphus;
2157+ final dynamic duckhearted;
2158+ final dynamic ficus;
2159+ final dynamic gemaric;
2160+ final dynamic jugation;
2161+ final dynamic myoliposis;
2162+ final dynamic nonnomination;
2163+ final dynamic palay;
2164+ final dynamic pentactinal;
2165+ final dynamic phaet;
2166+ final dynamic piquant;
2167+ final dynamic registration;
2168+ final dynamic remancipation;
2169+ final dynamic scutatiform;
2170+ final dynamic theodolite;
2171+ final dynamic underward;
2172+
2173+ PrefreshmanClass({
2174+ required this.azorubine,
2175+ required this.choroiditis,
2176+ required this.coagulatory,
2177+ required this.cyclorama,
2178+ required this.dolphus,
2179+ required this.duckhearted,
2180+ required this.ficus,
2181+ required this.gemaric,
2182+ required this.jugation,
2183+ required this.myoliposis,
2184+ required this.nonnomination,
2185+ required this.palay,
2186+ required this.pentactinal,
2187+ required this.phaet,
2188+ required this.piquant,
2189+ required this.registration,
2190+ required this.remancipation,
2191+ required this.scutatiform,
2192+ required this.theodolite,
2193+ required this.underward,
2194+ });
2195+
2196+ PrefreshmanClass copyWith({
2197+ dynamic azorubine,
2198+ dynamic choroiditis,
2199+ dynamic coagulatory,
2200+ dynamic cyclorama,
2201+ dynamic dolphus,
2202+ dynamic duckhearted,
2203+ dynamic ficus,
2204+ dynamic gemaric,
2205+ dynamic jugation,
2206+ dynamic myoliposis,
2207+ dynamic nonnomination,
2208+ dynamic palay,
2209+ dynamic pentactinal,
2210+ dynamic phaet,
2211+ dynamic piquant,
2212+ dynamic registration,
2213+ dynamic remancipation,
2214+ dynamic scutatiform,
2215+ dynamic theodolite,
2216+ dynamic underward,
2217+ }) =>
2218+ PrefreshmanClass(
2219+ azorubine: azorubine ?? this.azorubine,
2220+ choroiditis: choroiditis ?? this.choroiditis,
2221+ coagulatory: coagulatory ?? this.coagulatory,
2222+ cyclorama: cyclorama ?? this.cyclorama,
2223+ dolphus: dolphus ?? this.dolphus,
2224+ duckhearted: duckhearted ?? this.duckhearted,
2225+ ficus: ficus ?? this.ficus,
2226+ gemaric: gemaric ?? this.gemaric,
2227+ jugation: jugation ?? this.jugation,
2228+ myoliposis: myoliposis ?? this.myoliposis,
2229+ nonnomination: nonnomination ?? this.nonnomination,
2230+ palay: palay ?? this.palay,
2231+ pentactinal: pentactinal ?? this.pentactinal,
2232+ phaet: phaet ?? this.phaet,
2233+ piquant: piquant ?? this.piquant,
2234+ registration: registration ?? this.registration,
2235+ remancipation: remancipation ?? this.remancipation,
2236+ scutatiform: scutatiform ?? this.scutatiform,
2237+ theodolite: theodolite ?? this.theodolite,
2238+ underward: underward ?? this.underward,
2239+ );
2240+
2241+ factory PrefreshmanClass.fromJson(Map<String, dynamic> json) => PrefreshmanClass(
2242+ azorubine: (json.containsKey("azorubine") ? json["azorubine"] : throw FormatException('Missing required property')),
2243+ choroiditis: (json.containsKey("choroiditis") ? json["choroiditis"] : throw FormatException('Missing required property')),
2244+ coagulatory: (json.containsKey("coagulatory") ? json["coagulatory"] : throw FormatException('Missing required property')),
2245+ cyclorama: (json.containsKey("cyclorama") ? json["cyclorama"] : throw FormatException('Missing required property')),
2246+ dolphus: (json.containsKey("Dolphus") ? json["Dolphus"] : throw FormatException('Missing required property')),
2247+ duckhearted: (json.containsKey("duckhearted") ? json["duckhearted"] : throw FormatException('Missing required property')),
2248+ ficus: (json.containsKey("Ficus") ? json["Ficus"] : throw FormatException('Missing required property')),
2249+ gemaric: (json.containsKey("Gemaric") ? json["Gemaric"] : throw FormatException('Missing required property')),
2250+ jugation: (json.containsKey("jugation") ? json["jugation"] : throw FormatException('Missing required property')),
2251+ myoliposis: (json.containsKey("myoliposis") ? json["myoliposis"] : throw FormatException('Missing required property')),
2252+ nonnomination: (json.containsKey("nonnomination") ? json["nonnomination"] : throw FormatException('Missing required property')),
2253+ palay: (json.containsKey("palay") ? json["palay"] : throw FormatException('Missing required property')),
2254+ pentactinal: (json.containsKey("pentactinal") ? json["pentactinal"] : throw FormatException('Missing required property')),
2255+ phaet: (json.containsKey("Phaet") ? json["Phaet"] : throw FormatException('Missing required property')),
2256+ piquant: (json.containsKey("piquant") ? json["piquant"] : throw FormatException('Missing required property')),
2257+ registration: (json.containsKey("registration") ? json["registration"] : throw FormatException('Missing required property')),
2258+ remancipation: (json.containsKey("remancipation") ? json["remancipation"] : throw FormatException('Missing required property')),
2259+ scutatiform: (json.containsKey("scutatiform") ? json["scutatiform"] : throw FormatException('Missing required property')),
2260+ theodolite: (json.containsKey("theodolite") ? json["theodolite"] : throw FormatException('Missing required property')),
2261+ underward: (json.containsKey("underward") ? json["underward"] : throw FormatException('Missing required property')),
2262+ );
2263+
2264+ Map<String, dynamic> toJson() => {
2265+ "azorubine": azorubine,
2266+ "choroiditis": choroiditis,
2267+ "coagulatory": coagulatory,
2268+ "cyclorama": cyclorama,
2269+ "Dolphus": dolphus,
2270+ "duckhearted": duckhearted,
2271+ "Ficus": ficus,
2272+ "Gemaric": gemaric,
2273+ "jugation": jugation,
2274+ "myoliposis": myoliposis,
2275+ "nonnomination": nonnomination,
2276+ "palay": palay,
2277+ "pentactinal": pentactinal,
2278+ "Phaet": phaet,
2279+ "piquant": piquant,
2280+ "registration": registration,
2281+ "remancipation": remancipation,
2282+ "scutatiform": scutatiform,
2283+ "theodolite": theodolite,
2284+ "underward": underward,
2285+ };
2286+}
Melixirdefault / QuickType.ex+500 −70
@@ -666,39 +666,173 @@ defmodule LupusClass do
666666 vendible: integer() | nil
667667 }
668668
669+ def decode_catharticalness(value) when is_float(value), do: value
670+ def decode_catharticalness(value) when is_integer(value), do: value
671+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding LupusClass.catharticalness"}
672+
673+ def encode_catharticalness(value) when is_float(value), do: value
674+ def encode_catharticalness(value) when is_integer(value), do: value
675+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding LupusClass.catharticalness"}
676+
677+ def decode_chirotherium(value) when is_integer(value), do: value
678+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding LupusClass.chirotherium"}
679+
680+ def encode_chirotherium(value) when is_integer(value), do: value
681+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding LupusClass.chirotherium"}
682+
683+ def decode_chlorioninae(value) when is_integer(value), do: value
684+ def decode_chlorioninae(_), do: {:error, "Unexpected type when decoding LupusClass.chlorioninae"}
685+
686+ def encode_chlorioninae(value) when is_integer(value), do: value
687+ def encode_chlorioninae(_), do: {:error, "Unexpected type when encoding LupusClass.chlorioninae"}
688+
689+ def decode_corvinae(value) when is_integer(value), do: value
690+ def decode_corvinae(_), do: {:error, "Unexpected type when decoding LupusClass.corvinae"}
691+
692+ def encode_corvinae(value) when is_integer(value), do: value
693+ def encode_corvinae(_), do: {:error, "Unexpected type when encoding LupusClass.corvinae"}
694+
695+ def decode_crassina(value) when is_integer(value), do: value
696+ def decode_crassina(_), do: {:error, "Unexpected type when decoding LupusClass.crassina"}
697+
698+ def encode_crassina(value) when is_integer(value), do: value
699+ def encode_crassina(_), do: {:error, "Unexpected type when encoding LupusClass.crassina"}
700+
669701 def decode_disdiapason(value) when is_binary(value), do: value
670702 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding LupusClass.disdiapason"}
671703
672704 def encode_disdiapason(value) when is_binary(value), do: value
673705 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding LupusClass.disdiapason"}
674706
707+ def decode_exiguity(value) when is_integer(value), do: value
708+ def decode_exiguity(_), do: {:error, "Unexpected type when decoding LupusClass.exiguity"}
709+
710+ def encode_exiguity(value) when is_integer(value), do: value
711+ def encode_exiguity(_), do: {:error, "Unexpected type when encoding LupusClass.exiguity"}
712+
713+ def decode_farcist(value) when is_integer(value), do: value
714+ def decode_farcist(_), do: {:error, "Unexpected type when decoding LupusClass.farcist"}
715+
716+ def encode_farcist(value) when is_integer(value), do: value
717+ def encode_farcist(_), do: {:error, "Unexpected type when encoding LupusClass.farcist"}
718+
719+ def decode_holographical(value) when is_integer(value), do: value
720+ def decode_holographical(_), do: {:error, "Unexpected type when decoding LupusClass.holographical"}
721+
722+ def encode_holographical(value) when is_integer(value), do: value
723+ def encode_holographical(_), do: {:error, "Unexpected type when encoding LupusClass.holographical"}
724+
725+ def decode_ichthyophagan(value) when is_integer(value), do: value
726+ def decode_ichthyophagan(_), do: {:error, "Unexpected type when decoding LupusClass.ichthyophagan"}
727+
728+ def encode_ichthyophagan(value) when is_integer(value), do: value
729+ def encode_ichthyophagan(_), do: {:error, "Unexpected type when encoding LupusClass.ichthyophagan"}
730+
731+ def decode_implacable(value) when is_integer(value), do: value
732+ def decode_implacable(_), do: {:error, "Unexpected type when decoding LupusClass.implacable"}
733+
734+ def encode_implacable(value) when is_integer(value), do: value
735+ def encode_implacable(_), do: {:error, "Unexpected type when encoding LupusClass.implacable"}
736+
737+ def decode_outshiner(value) when is_integer(value), do: value
738+ def decode_outshiner(_), do: {:error, "Unexpected type when decoding LupusClass.outshiner"}
739+
740+ def encode_outshiner(value) when is_integer(value), do: value
741+ def encode_outshiner(_), do: {:error, "Unexpected type when encoding LupusClass.outshiner"}
742+
743+ def decode_overweather(value) when is_integer(value), do: value
744+ def decode_overweather(_), do: {:error, "Unexpected type when decoding LupusClass.overweather"}
745+
746+ def encode_overweather(value) when is_integer(value), do: value
747+ def encode_overweather(_), do: {:error, "Unexpected type when encoding LupusClass.overweather"}
748+
749+ def decode_protonegroid(value) when is_integer(value), do: value
750+ def decode_protonegroid(_), do: {:error, "Unexpected type when decoding LupusClass.protonegroid"}
751+
752+ def encode_protonegroid(value) when is_integer(value), do: value
753+ def encode_protonegroid(_), do: {:error, "Unexpected type when encoding LupusClass.protonegroid"}
754+
755+ def decode_shallowish(value) when is_integer(value), do: value
756+ def decode_shallowish(_), do: {:error, "Unexpected type when decoding LupusClass.shallowish"}
757+
758+ def encode_shallowish(value) when is_integer(value), do: value
759+ def encode_shallowish(_), do: {:error, "Unexpected type when encoding LupusClass.shallowish"}
760+
761+ def decode_snoke(value) when is_integer(value), do: value
762+ def decode_snoke(_), do: {:error, "Unexpected type when decoding LupusClass.snoke"}
763+
764+ def encode_snoke(value) when is_integer(value), do: value
765+ def encode_snoke(_), do: {:error, "Unexpected type when encoding LupusClass.snoke"}
766+
767+ def decode_snout(value) when is_integer(value), do: value
768+ def decode_snout(_), do: {:error, "Unexpected type when decoding LupusClass.snout"}
769+
770+ def encode_snout(value) when is_integer(value), do: value
771+ def encode_snout(_), do: {:error, "Unexpected type when encoding LupusClass.snout"}
772+
773+ def decode_surveillance(value) when is_integer(value), do: value
774+ def decode_surveillance(_), do: {:error, "Unexpected type when decoding LupusClass.surveillance"}
775+
776+ def encode_surveillance(value) when is_integer(value), do: value
777+ def encode_surveillance(_), do: {:error, "Unexpected type when encoding LupusClass.surveillance"}
778+
779+ def decode_threshingtime(value) when is_integer(value), do: value
780+ def decode_threshingtime(_), do: {:error, "Unexpected type when decoding LupusClass.threshingtime"}
781+
782+ def encode_threshingtime(value) when is_integer(value), do: value
783+ def encode_threshingtime(_), do: {:error, "Unexpected type when encoding LupusClass.threshingtime"}
784+
785+ def decode_thysanocarpus(value) when is_integer(value), do: value
786+ def decode_thysanocarpus(_), do: {:error, "Unexpected type when decoding LupusClass.thysanocarpus"}
787+
788+ def encode_thysanocarpus(value) when is_integer(value), do: value
789+ def encode_thysanocarpus(_), do: {:error, "Unexpected type when encoding LupusClass.thysanocarpus"}
790+
791+ def decode_unsignificantly(value) when is_integer(value), do: value
792+ def decode_unsignificantly(_), do: {:error, "Unexpected type when decoding LupusClass.unsignificantly"}
793+
794+ def encode_unsignificantly(value) when is_integer(value), do: value
795+ def encode_unsignificantly(_), do: {:error, "Unexpected type when encoding LupusClass.unsignificantly"}
796+
797+ def decode_unsnap(value) when is_integer(value), do: value
798+ def decode_unsnap(_), do: {:error, "Unexpected type when decoding LupusClass.unsnap"}
799+
800+ def encode_unsnap(value) when is_integer(value), do: value
801+ def encode_unsnap(_), do: {:error, "Unexpected type when encoding LupusClass.unsnap"}
802+
803+ def decode_vendible(value) when is_integer(value), do: value
804+ def decode_vendible(_), do: {:error, "Unexpected type when decoding LupusClass.vendible"}
805+
806+ def encode_vendible(value) when is_integer(value), do: value
807+ def encode_vendible(_), do: {:error, "Unexpected type when encoding LupusClass.vendible"}
808+
675809 def from_map(m) do
676810 %LupusClass{
677- catharticalness: m["catharticalness"],
678- chirotherium: m["Chirotherium"],
679- chlorioninae: m["Chlorioninae"],
680- corvinae: m["Corvinae"],
681- crassina: m["Crassina"],
811+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
812+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
813+ chlorioninae: m["Chlorioninae"] && decode_chlorioninae(m["Chlorioninae"]),
814+ corvinae: m["Corvinae"] && decode_corvinae(m["Corvinae"]),
815+ crassina: m["Crassina"] && decode_crassina(m["Crassina"]),
682816 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
683- exiguity: m["exiguity"],
684- farcist: m["farcist"],
685- holographical: m["holographical"],
817+ exiguity: m["exiguity"] && decode_exiguity(m["exiguity"]),
818+ farcist: m["farcist"] && decode_farcist(m["farcist"]),
819+ holographical: m["holographical"] && decode_holographical(m["holographical"]),
686820 homocerc: m["homocerc"],
687- ichthyophagan: m["ichthyophagan"],
688- implacable: m["implacable"],
821+ ichthyophagan: m["ichthyophagan"] && decode_ichthyophagan(m["ichthyophagan"]),
822+ implacable: m["implacable"] && decode_implacable(m["implacable"]),
689823 nonbookish: m["nonbookish"],
690- outshiner: m["outshiner"],
691- overweather: m["overweather"],
692- protonegroid: m["protonegroid"],
693- shallowish: m["shallowish"],
694- snoke: m["snoke"],
695- snout: m["snout"],
696- surveillance: m["surveillance"],
697- threshingtime: m["threshingtime"],
698- thysanocarpus: m["Thysanocarpus"],
699- unsignificantly: m["unsignificantly"],
700- unsnap: m["unsnap"],
701- vendible: m["vendible"],
824+ outshiner: m["outshiner"] && decode_outshiner(m["outshiner"]),
825+ overweather: m["overweather"] && decode_overweather(m["overweather"]),
826+ protonegroid: m["protonegroid"] && decode_protonegroid(m["protonegroid"]),
827+ shallowish: m["shallowish"] && decode_shallowish(m["shallowish"]),
828+ snoke: m["snoke"] && decode_snoke(m["snoke"]),
829+ snout: m["snout"] && decode_snout(m["snout"]),
830+ surveillance: m["surveillance"] && decode_surveillance(m["surveillance"]),
831+ threshingtime: m["threshingtime"] && decode_threshingtime(m["threshingtime"]),
832+ thysanocarpus: m["Thysanocarpus"] && decode_thysanocarpus(m["Thysanocarpus"]),
833+ unsignificantly: m["unsignificantly"] && decode_unsignificantly(m["unsignificantly"]),
834+ unsnap: m["unsnap"] && decode_unsnap(m["unsnap"]),
835+ vendible: m["vendible"] && decode_vendible(m["vendible"]),
702836 }
703837 end
704838
@@ -796,57 +930,191 @@ defmodule Maslin do
796930 unjudiciously: nil | nil
797931 }
798932
933+ def decode_alicant(value) when is_integer(value), do: value
934+ def decode_alicant(_), do: {:error, "Unexpected type when decoding Maslin.alicant"}
935+
936+ def encode_alicant(value) when is_integer(value), do: value
937+ def encode_alicant(_), do: {:error, "Unexpected type when encoding Maslin.alicant"}
938+
939+ def decode_anticorrosive(value) when is_integer(value), do: value
940+ def decode_anticorrosive(_), do: {:error, "Unexpected type when decoding Maslin.anticorrosive"}
941+
942+ def encode_anticorrosive(value) when is_integer(value), do: value
943+ def encode_anticorrosive(_), do: {:error, "Unexpected type when encoding Maslin.anticorrosive"}
944+
945+ def decode_be(value) when is_integer(value), do: value
946+ def decode_be(_), do: {:error, "Unexpected type when decoding Maslin.be"}
947+
948+ def encode_be(value) when is_integer(value), do: value
949+ def encode_be(_), do: {:error, "Unexpected type when encoding Maslin.be"}
950+
951+ def decode_catharticalness(value) when is_float(value), do: value
952+ def decode_catharticalness(value) when is_integer(value), do: value
953+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding Maslin.catharticalness"}
954+
955+ def encode_catharticalness(value) when is_float(value), do: value
956+ def encode_catharticalness(value) when is_integer(value), do: value
957+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding Maslin.catharticalness"}
958+
959+ def decode_chirotherium(value) when is_integer(value), do: value
960+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding Maslin.chirotherium"}
961+
962+ def encode_chirotherium(value) when is_integer(value), do: value
963+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding Maslin.chirotherium"}
964+
965+ def decode_chub(value) when is_integer(value), do: value
966+ def decode_chub(_), do: {:error, "Unexpected type when decoding Maslin.chub"}
967+
968+ def encode_chub(value) when is_integer(value), do: value
969+ def encode_chub(_), do: {:error, "Unexpected type when encoding Maslin.chub"}
970+
971+ def decode_cuprosilicon(value) when is_integer(value), do: value
972+ def decode_cuprosilicon(_), do: {:error, "Unexpected type when decoding Maslin.cuprosilicon"}
973+
974+ def encode_cuprosilicon(value) when is_integer(value), do: value
975+ def encode_cuprosilicon(_), do: {:error, "Unexpected type when encoding Maslin.cuprosilicon"}
976+
977+ def decode_curtailedly(value) when is_integer(value), do: value
978+ def decode_curtailedly(_), do: {:error, "Unexpected type when decoding Maslin.curtailedly"}
979+
980+ def encode_curtailedly(value) when is_integer(value), do: value
981+ def encode_curtailedly(_), do: {:error, "Unexpected type when encoding Maslin.curtailedly"}
982+
983+ def decode_dellenite(value) when is_integer(value), do: value
984+ def decode_dellenite(_), do: {:error, "Unexpected type when decoding Maslin.dellenite"}
985+
986+ def encode_dellenite(value) when is_integer(value), do: value
987+ def encode_dellenite(_), do: {:error, "Unexpected type when encoding Maslin.dellenite"}
988+
989+ def decode_dimitry(value) when is_integer(value), do: value
990+ def decode_dimitry(_), do: {:error, "Unexpected type when decoding Maslin.dimitry"}
991+
992+ def encode_dimitry(value) when is_integer(value), do: value
993+ def encode_dimitry(_), do: {:error, "Unexpected type when encoding Maslin.dimitry"}
994+
799995 def decode_disdiapason(value) when is_binary(value), do: value
800996 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding Maslin.disdiapason"}
801997
802998 def encode_disdiapason(value) when is_binary(value), do: value
803999 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding Maslin.disdiapason"}
8041000
1001+ def decode_ethmoiditis(value) when is_integer(value), do: value
1002+ def decode_ethmoiditis(_), do: {:error, "Unexpected type when decoding Maslin.ethmoiditis"}
1003+
1004+ def encode_ethmoiditis(value) when is_integer(value), do: value
1005+ def encode_ethmoiditis(_), do: {:error, "Unexpected type when encoding Maslin.ethmoiditis"}
1006+
1007+ def decode_goatherd(value) when is_integer(value), do: value
1008+ def decode_goatherd(_), do: {:error, "Unexpected type when decoding Maslin.goatherd"}
1009+
1010+ def encode_goatherd(value) when is_integer(value), do: value
1011+ def encode_goatherd(_), do: {:error, "Unexpected type when encoding Maslin.goatherd"}
1012+
1013+ def decode_hammerdress(value) when is_integer(value), do: value
1014+ def decode_hammerdress(_), do: {:error, "Unexpected type when decoding Maslin.hammerdress"}
1015+
1016+ def encode_hammerdress(value) when is_integer(value), do: value
1017+ def encode_hammerdress(_), do: {:error, "Unexpected type when encoding Maslin.hammerdress"}
1018+
1019+ def decode_lacunosity(value) when is_integer(value), do: value
1020+ def decode_lacunosity(_), do: {:error, "Unexpected type when decoding Maslin.lacunosity"}
1021+
1022+ def encode_lacunosity(value) when is_integer(value), do: value
1023+ def encode_lacunosity(_), do: {:error, "Unexpected type when encoding Maslin.lacunosity"}
1024+
1025+ def decode_mameliere(value) when is_integer(value), do: value
1026+ def decode_mameliere(_), do: {:error, "Unexpected type when decoding Maslin.mameliere"}
1027+
1028+ def encode_mameliere(value) when is_integer(value), do: value
1029+ def encode_mameliere(_), do: {:error, "Unexpected type when encoding Maslin.mameliere"}
1030+
1031+ def decode_oafishly(value) when is_integer(value), do: value
1032+ def decode_oafishly(_), do: {:error, "Unexpected type when decoding Maslin.oafishly"}
1033+
1034+ def encode_oafishly(value) when is_integer(value), do: value
1035+ def encode_oafishly(_), do: {:error, "Unexpected type when encoding Maslin.oafishly"}
1036+
1037+ def decode_saccharulmic(value) when is_integer(value), do: value
1038+ def decode_saccharulmic(_), do: {:error, "Unexpected type when decoding Maslin.saccharulmic"}
1039+
1040+ def encode_saccharulmic(value) when is_integer(value), do: value
1041+ def encode_saccharulmic(_), do: {:error, "Unexpected type when encoding Maslin.saccharulmic"}
1042+
1043+ def decode_scowlful(value) when is_integer(value), do: value
1044+ def decode_scowlful(_), do: {:error, "Unexpected type when decoding Maslin.scowlful"}
1045+
1046+ def encode_scowlful(value) when is_integer(value), do: value
1047+ def encode_scowlful(_), do: {:error, "Unexpected type when encoding Maslin.scowlful"}
1048+
1049+ def decode_sphaeridial(value) when is_integer(value), do: value
1050+ def decode_sphaeridial(_), do: {:error, "Unexpected type when decoding Maslin.sphaeridial"}
1051+
1052+ def encode_sphaeridial(value) when is_integer(value), do: value
1053+ def encode_sphaeridial(_), do: {:error, "Unexpected type when encoding Maslin.sphaeridial"}
1054+
1055+ def decode_subsecive(value) when is_integer(value), do: value
1056+ def decode_subsecive(_), do: {:error, "Unexpected type when decoding Maslin.subsecive"}
1057+
1058+ def encode_subsecive(value) when is_integer(value), do: value
1059+ def encode_subsecive(_), do: {:error, "Unexpected type when encoding Maslin.subsecive"}
1060+
1061+ def decode_trachyglossate(value) when is_integer(value), do: value
1062+ def decode_trachyglossate(_), do: {:error, "Unexpected type when decoding Maslin.trachyglossate"}
1063+
1064+ def encode_trachyglossate(value) when is_integer(value), do: value
1065+ def encode_trachyglossate(_), do: {:error, "Unexpected type when encoding Maslin.trachyglossate"}
1066+
1067+ def decode_unassuaged(value) when is_integer(value), do: value
1068+ def decode_unassuaged(_), do: {:error, "Unexpected type when decoding Maslin.unassuaged"}
1069+
1070+ def encode_unassuaged(value) when is_integer(value), do: value
1071+ def encode_unassuaged(_), do: {:error, "Unexpected type when encoding Maslin.unassuaged"}
1072+
8051073 def from_map(m) do
8061074 %Maslin{
807- alicant: m["Alicant"],
1075+ alicant: m["Alicant"] && decode_alicant(m["Alicant"]),
8081076 antiatonement: m["antiatonement"],
809- anticorrosive: m["anticorrosive"],
1077+ anticorrosive: m["anticorrosive"] && decode_anticorrosive(m["anticorrosive"]),
8101078 aphidozer: m["aphidozer"],
8111079 bakuninist: m["Bakuninist"],
812- be: m["be"],
813- catharticalness: m["catharticalness"],
814- chirotherium: m["Chirotherium"],
815- chub: m["chub"],
816- cuprosilicon: m["cuprosilicon"],
817- curtailedly: m["curtailedly"],
818- dellenite: m["dellenite"],
819- dimitry: m["Dimitry"],
1080+ be: m["be"] && decode_be(m["be"]),
1081+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
1082+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
1083+ chub: m["chub"] && decode_chub(m["chub"]),
1084+ cuprosilicon: m["cuprosilicon"] && decode_cuprosilicon(m["cuprosilicon"]),
1085+ curtailedly: m["curtailedly"] && decode_curtailedly(m["curtailedly"]),
1086+ dellenite: m["dellenite"] && decode_dellenite(m["dellenite"]),
1087+ dimitry: m["Dimitry"] && decode_dimitry(m["Dimitry"]),
8201088 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
8211089 edifying: m["edifying"],
822- ethmoiditis: m["ethmoiditis"],
1090+ ethmoiditis: m["ethmoiditis"] && decode_ethmoiditis(m["ethmoiditis"]),
8231091 gastralgy: m["gastralgy"],
824- goatherd: m["goatherd"],
825- hammerdress: m["hammerdress"],
1092+ goatherd: m["goatherd"] && decode_goatherd(m["goatherd"]),
1093+ hammerdress: m["hammerdress"] && decode_hammerdress(m["hammerdress"]),
8261094 hangfire: m["hangfire"],
8271095 homocerc: m["homocerc"],
828- lacunosity: m["lacunosity"],
1096+ lacunosity: m["lacunosity"] && decode_lacunosity(m["lacunosity"]),
8291097 longiloquence: m["longiloquence"],
830- mameliere: m["mameliere"],
1098+ mameliere: m["mameliere"] && decode_mameliere(m["mameliere"]),
8311099 motherless: m["motherless"],
8321100 nonbookish: m["nonbookish"],
8331101 noncorrodible: m["noncorrodible"],
8341102 nonsensicality: m["nonsensicality"],
835- oafishly: m["oafishly"],
1103+ oafishly: m["oafishly"] && decode_oafishly(m["oafishly"]),
8361104 pfund: m["pfund"],
8371105 preadvisory: m["preadvisory"],
8381106 retroflexed: m["retroflexed"],
839- saccharulmic: m["saccharulmic"],
840- scowlful: m["scowlful"],
1107+ saccharulmic: m["saccharulmic"] && decode_saccharulmic(m["saccharulmic"]),
1108+ scowlful: m["scowlful"] && decode_scowlful(m["scowlful"]),
8411109 secluded: m["secluded"],
8421110 slackage: m["slackage"],
843- sphaeridial: m["sphaeridial"],
1111+ sphaeridial: m["sphaeridial"] && decode_sphaeridial(m["sphaeridial"]),
8441112 spondulics: m["spondulics"],
845- subsecive: m["subsecive"],
1113+ subsecive: m["subsecive"] && decode_subsecive(m["subsecive"]),
8461114 swellmobsman: m["swellmobsman"],
847- trachyglossate: m["trachyglossate"],
1115+ trachyglossate: m["trachyglossate"] && decode_trachyglossate(m["trachyglossate"]),
8481116 trialogue: m["trialogue"],
849- unassuaged: m["unassuaged"],
1117+ unassuaged: m["unassuaged"] && decode_unassuaged(m["unassuaged"]),
8501118 ungross: m["ungross"],
8511119 unjudiciously: m["unjudiciously"],
8521120 }
@@ -1023,6 +1291,20 @@ defmodule MonotheisticallyClass do
10231291 whitestone: nil | nil
10241292 }
10251293
1294+ def decode_catharticalness(value) when is_float(value), do: value
1295+ def decode_catharticalness(value) when is_integer(value), do: value
1296+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding MonotheisticallyClass.catharticalness"}
1297+
1298+ def encode_catharticalness(value) when is_float(value), do: value
1299+ def encode_catharticalness(value) when is_integer(value), do: value
1300+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding MonotheisticallyClass.catharticalness"}
1301+
1302+ def decode_chirotherium(value) when is_integer(value), do: value
1303+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding MonotheisticallyClass.chirotherium"}
1304+
1305+ def encode_chirotherium(value) when is_integer(value), do: value
1306+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding MonotheisticallyClass.chirotherium"}
1307+
10261308 def decode_disdiapason(value) when is_binary(value), do: value
10271309 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding MonotheisticallyClass.disdiapason"}
10281310
@@ -1032,9 +1314,9 @@ defmodule MonotheisticallyClass do
10321314 def from_map(m) do
10331315 %MonotheisticallyClass{
10341316 blaspheme: m["blaspheme"],
1035- catharticalness: m["catharticalness"],
1317+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
10361318 celiosalpingectomy: m["celiosalpingectomy"],
1037- chirotherium: m["Chirotherium"],
1319+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
10381320 consummativeness: m["consummativeness"],
10391321 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
10401322 egestive: m["egestive"],
@@ -1630,39 +1912,173 @@ defmodule PiaculumClass do
16301912 zipper: integer() | nil
16311913 }
16321914
1915+ def decode_alada(value) when is_integer(value), do: value
1916+ def decode_alada(_), do: {:error, "Unexpected type when decoding PiaculumClass.alada"}
1917+
1918+ def encode_alada(value) when is_integer(value), do: value
1919+ def encode_alada(_), do: {:error, "Unexpected type when encoding PiaculumClass.alada"}
1920+
1921+ def decode_amphistomous(value) when is_integer(value), do: value
1922+ def decode_amphistomous(_), do: {:error, "Unexpected type when decoding PiaculumClass.amphistomous"}
1923+
1924+ def encode_amphistomous(value) when is_integer(value), do: value
1925+ def encode_amphistomous(_), do: {:error, "Unexpected type when encoding PiaculumClass.amphistomous"}
1926+
1927+ def decode_boysenberry(value) when is_integer(value), do: value
1928+ def decode_boysenberry(_), do: {:error, "Unexpected type when decoding PiaculumClass.boysenberry"}
1929+
1930+ def encode_boysenberry(value) when is_integer(value), do: value
1931+ def encode_boysenberry(_), do: {:error, "Unexpected type when encoding PiaculumClass.boysenberry"}
1932+
1933+ def decode_catharticalness(value) when is_float(value), do: value
1934+ def decode_catharticalness(value) when is_integer(value), do: value
1935+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding PiaculumClass.catharticalness"}
1936+
1937+ def encode_catharticalness(value) when is_float(value), do: value
1938+ def encode_catharticalness(value) when is_integer(value), do: value
1939+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding PiaculumClass.catharticalness"}
1940+
1941+ def decode_chirotherium(value) when is_integer(value), do: value
1942+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding PiaculumClass.chirotherium"}
1943+
1944+ def encode_chirotherium(value) when is_integer(value), do: value
1945+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding PiaculumClass.chirotherium"}
1946+
1947+ def decode_decardinalize(value) when is_integer(value), do: value
1948+ def decode_decardinalize(_), do: {:error, "Unexpected type when decoding PiaculumClass.decardinalize"}
1949+
1950+ def encode_decardinalize(value) when is_integer(value), do: value
1951+ def encode_decardinalize(_), do: {:error, "Unexpected type when encoding PiaculumClass.decardinalize"}
1952+
1953+ def decode_discouragement(value) when is_integer(value), do: value
1954+ def decode_discouragement(_), do: {:error, "Unexpected type when decoding PiaculumClass.discouragement"}
1955+
1956+ def encode_discouragement(value) when is_integer(value), do: value
1957+ def encode_discouragement(_), do: {:error, "Unexpected type when encoding PiaculumClass.discouragement"}
1958+
16331959 def decode_disdiapason(value) when is_binary(value), do: value
16341960 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding PiaculumClass.disdiapason"}
16351961
16361962 def encode_disdiapason(value) when is_binary(value), do: value
16371963 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding PiaculumClass.disdiapason"}
16381964
1965+ def decode_doitrified(value) when is_integer(value), do: value
1966+ def decode_doitrified(_), do: {:error, "Unexpected type when decoding PiaculumClass.doitrified"}
1967+
1968+ def encode_doitrified(value) when is_integer(value), do: value
1969+ def encode_doitrified(_), do: {:error, "Unexpected type when encoding PiaculumClass.doitrified"}
1970+
1971+ def decode_hexaspermous(value) when is_integer(value), do: value
1972+ def decode_hexaspermous(_), do: {:error, "Unexpected type when decoding PiaculumClass.hexaspermous"}
1973+
1974+ def encode_hexaspermous(value) when is_integer(value), do: value
1975+ def encode_hexaspermous(_), do: {:error, "Unexpected type when encoding PiaculumClass.hexaspermous"}
1976+
1977+ def decode_insinking(value) when is_integer(value), do: value
1978+ def decode_insinking(_), do: {:error, "Unexpected type when decoding PiaculumClass.insinking"}
1979+
1980+ def encode_insinking(value) when is_integer(value), do: value
1981+ def encode_insinking(_), do: {:error, "Unexpected type when encoding PiaculumClass.insinking"}
1982+
1983+ def decode_loathfulness(value) when is_integer(value), do: value
1984+ def decode_loathfulness(_), do: {:error, "Unexpected type when decoding PiaculumClass.loathfulness"}
1985+
1986+ def encode_loathfulness(value) when is_integer(value), do: value
1987+ def encode_loathfulness(_), do: {:error, "Unexpected type when encoding PiaculumClass.loathfulness"}
1988+
1989+ def decode_miasmatical(value) when is_integer(value), do: value
1990+ def decode_miasmatical(_), do: {:error, "Unexpected type when decoding PiaculumClass.miasmatical"}
1991+
1992+ def encode_miasmatical(value) when is_integer(value), do: value
1993+ def encode_miasmatical(_), do: {:error, "Unexpected type when encoding PiaculumClass.miasmatical"}
1994+
1995+ def decode_neurofibril(value) when is_integer(value), do: value
1996+ def decode_neurofibril(_), do: {:error, "Unexpected type when decoding PiaculumClass.neurofibril"}
1997+
1998+ def encode_neurofibril(value) when is_integer(value), do: value
1999+ def encode_neurofibril(_), do: {:error, "Unexpected type when encoding PiaculumClass.neurofibril"}
2000+
2001+ def decode_phonendoscope(value) when is_integer(value), do: value
2002+ def decode_phonendoscope(_), do: {:error, "Unexpected type when decoding PiaculumClass.phonendoscope"}
2003+
2004+ def encode_phonendoscope(value) when is_integer(value), do: value
2005+ def encode_phonendoscope(_), do: {:error, "Unexpected type when encoding PiaculumClass.phonendoscope"}
2006+
2007+ def decode_pilferment(value) when is_integer(value), do: value
2008+ def decode_pilferment(_), do: {:error, "Unexpected type when decoding PiaculumClass.pilferment"}
2009+
2010+ def encode_pilferment(value) when is_integer(value), do: value
2011+ def encode_pilferment(_), do: {:error, "Unexpected type when encoding PiaculumClass.pilferment"}
2012+
2013+ def decode_predismissory(value) when is_integer(value), do: value
2014+ def decode_predismissory(_), do: {:error, "Unexpected type when decoding PiaculumClass.predismissory"}
2015+
2016+ def encode_predismissory(value) when is_integer(value), do: value
2017+ def encode_predismissory(_), do: {:error, "Unexpected type when encoding PiaculumClass.predismissory"}
2018+
2019+ def decode_preinscription(value) when is_integer(value), do: value
2020+ def decode_preinscription(_), do: {:error, "Unexpected type when decoding PiaculumClass.preinscription"}
2021+
2022+ def encode_preinscription(value) when is_integer(value), do: value
2023+ def encode_preinscription(_), do: {:error, "Unexpected type when encoding PiaculumClass.preinscription"}
2024+
2025+ def decode_quotative(value) when is_integer(value), do: value
2026+ def decode_quotative(_), do: {:error, "Unexpected type when decoding PiaculumClass.quotative"}
2027+
2028+ def encode_quotative(value) when is_integer(value), do: value
2029+ def encode_quotative(_), do: {:error, "Unexpected type when encoding PiaculumClass.quotative"}
2030+
2031+ def decode_sienna(value) when is_integer(value), do: value
2032+ def decode_sienna(_), do: {:error, "Unexpected type when decoding PiaculumClass.sienna"}
2033+
2034+ def encode_sienna(value) when is_integer(value), do: value
2035+ def encode_sienna(_), do: {:error, "Unexpected type when encoding PiaculumClass.sienna"}
2036+
2037+ def decode_thorax(value) when is_integer(value), do: value
2038+ def decode_thorax(_), do: {:error, "Unexpected type when decoding PiaculumClass.thorax"}
2039+
2040+ def encode_thorax(value) when is_integer(value), do: value
2041+ def encode_thorax(_), do: {:error, "Unexpected type when encoding PiaculumClass.thorax"}
2042+
2043+ def decode_yachting(value) when is_integer(value), do: value
2044+ def decode_yachting(_), do: {:error, "Unexpected type when decoding PiaculumClass.yachting"}
2045+
2046+ def encode_yachting(value) when is_integer(value), do: value
2047+ def encode_yachting(_), do: {:error, "Unexpected type when encoding PiaculumClass.yachting"}
2048+
2049+ def decode_zipper(value) when is_integer(value), do: value
2050+ def decode_zipper(_), do: {:error, "Unexpected type when decoding PiaculumClass.zipper"}
2051+
2052+ def encode_zipper(value) when is_integer(value), do: value
2053+ def encode_zipper(_), do: {:error, "Unexpected type when encoding PiaculumClass.zipper"}
2054+
16392055 def from_map(m) do
16402056 %PiaculumClass{
1641- alada: m["alada"],
1642- amphistomous: m["amphistomous"],
1643- boysenberry: m["boysenberry"],
1644- catharticalness: m["catharticalness"],
1645- chirotherium: m["Chirotherium"],
1646- decardinalize: m["decardinalize"],
1647- discouragement: m["discouragement"],
2057+ alada: m["alada"] && decode_alada(m["alada"]),
2058+ amphistomous: m["amphistomous"] && decode_amphistomous(m["amphistomous"]),
2059+ boysenberry: m["boysenberry"] && decode_boysenberry(m["boysenberry"]),
2060+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
2061+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
2062+ decardinalize: m["decardinalize"] && decode_decardinalize(m["decardinalize"]),
2063+ discouragement: m["discouragement"] && decode_discouragement(m["discouragement"]),
16482064 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
1649- doitrified: m["doitrified"],
1650- hexaspermous: m["hexaspermous"],
2065+ doitrified: m["doitrified"] && decode_doitrified(m["doitrified"]),
2066+ hexaspermous: m["hexaspermous"] && decode_hexaspermous(m["hexaspermous"]),
16512067 homocerc: m["homocerc"],
1652- insinking: m["insinking"],
1653- loathfulness: m["loathfulness"],
1654- miasmatical: m["miasmatical"],
1655- neurofibril: m["neurofibril"],
2068+ insinking: m["insinking"] && decode_insinking(m["insinking"]),
2069+ loathfulness: m["loathfulness"] && decode_loathfulness(m["loathfulness"]),
2070+ miasmatical: m["miasmatical"] && decode_miasmatical(m["miasmatical"]),
2071+ neurofibril: m["neurofibril"] && decode_neurofibril(m["neurofibril"]),
16562072 nonbookish: m["nonbookish"],
1657- phonendoscope: m["phonendoscope"],
1658- pilferment: m["pilferment"],
1659- predismissory: m["predismissory"],
1660- preinscription: m["preinscription"],
1661- quotative: m["quotative"],
1662- sienna: m["sienna"],
1663- thorax: m["thorax"],
1664- yachting: m["yachting"],
1665- zipper: m["Zipper"],
2073+ phonendoscope: m["phonendoscope"] && decode_phonendoscope(m["phonendoscope"]),
2074+ pilferment: m["pilferment"] && decode_pilferment(m["pilferment"]),
2075+ predismissory: m["predismissory"] && decode_predismissory(m["predismissory"]),
2076+ preinscription: m["preinscription"] && decode_preinscription(m["preinscription"]),
2077+ quotative: m["quotative"] && decode_quotative(m["quotative"]),
2078+ sienna: m["sienna"] && decode_sienna(m["sienna"]),
2079+ thorax: m["thorax"] && decode_thorax(m["thorax"]),
2080+ yachting: m["yachting"] && decode_yachting(m["yachting"]),
2081+ zipper: m["Zipper"] && decode_zipper(m["Zipper"]),
16662082 }
16672083 end
16682084
@@ -1740,6 +2156,20 @@ defmodule Pneumocele do
17402156 visitorial: nil | nil
17412157 }
17422158
2159+ def decode_catharticalness(value) when is_float(value), do: value
2160+ def decode_catharticalness(value) when is_integer(value), do: value
2161+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding Pneumocele.catharticalness"}
2162+
2163+ def encode_catharticalness(value) when is_float(value), do: value
2164+ def encode_catharticalness(value) when is_integer(value), do: value
2165+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding Pneumocele.catharticalness"}
2166+
2167+ def decode_chirotherium(value) when is_integer(value), do: value
2168+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding Pneumocele.chirotherium"}
2169+
2170+ def encode_chirotherium(value) when is_integer(value), do: value
2171+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding Pneumocele.chirotherium"}
2172+
17432173 def decode_disdiapason(value) when is_binary(value), do: value
17442174 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding Pneumocele.disdiapason"}
17452175
@@ -1749,8 +2179,8 @@ defmodule Pneumocele do
17492179 def from_map(m) do
17502180 %Pneumocele{
17512181 carbonarism: m["Carbonarism"],
1752- catharticalness: m["catharticalness"],
1753- chirotherium: m["Chirotherium"],
2182+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
2183+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
17542184 cineolic: m["cineolic"],
17552185 cobbly: m["cobbly"],
17562186 conchyliferous: m["conchyliferous"],
Atypescript-effect-schemajust-schema-true--8c4ca457bcba / TopLevel.ts+384 −0
@@ -0,0 +1,384 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class PrefreshmanClass extends S.Class<PrefreshmanClass>("PrefreshmanClass")({
5+ "azorubine": S.Null,
6+ "choroiditis": S.Null,
7+ "coagulatory": S.Null,
8+ "cyclorama": S.Null,
9+ "Dolphus": S.Null,
10+ "duckhearted": S.Null,
11+ "Ficus": S.Null,
12+ "Gemaric": S.Null,
13+ "jugation": S.Null,
14+ "myoliposis": S.Null,
15+ "nonnomination": S.Null,
16+ "palay": S.Null,
17+ "pentactinal": S.Null,
18+ "Phaet": S.Null,
19+ "piquant": S.Null,
20+ "registration": S.Null,
21+ "remancipation": S.Null,
22+ "scutatiform": S.Null,
23+ "theodolite": S.Null,
24+ "underward": S.Null,
25+}) {}
26+
27+export class PotwhiskyClass extends S.Class<PotwhiskyClass>("PotwhiskyClass")({
28+ "arciform": S.Null,
29+ "cresolin": S.Null,
30+ "disheartener": S.Null,
31+ "disproportionable": S.Null,
32+ "Euchorda": S.Null,
33+ "ferryway": S.Null,
34+ "filamentiferous": S.Null,
35+ "flemish": S.Null,
36+ "forgainst": S.Null,
37+ "grainering": S.Null,
38+ "irrevoluble": S.Null,
39+ "kindredship": S.Null,
40+ "pinguitudinous": S.Null,
41+ "simpletonic": S.Null,
42+ "singsong": S.Null,
43+ "submergement": S.Null,
44+ "supraoesophagal": S.Null,
45+ "thrashel": S.Null,
46+ "tyremesis": S.Null,
47+ "Yoruba": S.Null,
48+}) {}
49+
50+export class Pneumocele extends S.Class<Pneumocele>("Pneumocele")({
51+ "Carbonarism": S.optional(S.Null),
52+ "catharticalness": S.optional(S.NullOr(S.Number)),
53+ "Chirotherium": S.optional(S.NullOr(S.Int)),
54+ "cineolic": S.optional(S.Null),
55+ "cobbly": S.optional(S.Null),
56+ "conchyliferous": S.optional(S.Null),
57+ "congregation": S.optional(S.Null),
58+ "disdiapason": S.optional(S.NullOr(S.String)),
59+ "enterotomy": S.optional(S.Null),
60+ "entophytal": S.optional(S.Null),
61+ "fewtrils": S.optional(S.Null),
62+ "herem": S.optional(S.Null),
63+ "homocerc": S.optional(S.NullOr(S.Boolean)),
64+ "Koniga": S.optional(S.Null),
65+ "meticulosity": S.optional(S.Null),
66+ "Micky": S.optional(S.Null),
67+ "mismarriage": S.optional(S.Null),
68+ "neurotrophic": S.optional(S.Null),
69+ "nonbookish": S.optional(S.Null),
70+ "persuasively": S.optional(S.Null),
71+ "replaceable": S.optional(S.Null),
72+ "silex": S.optional(S.Null),
73+ "taillight": S.optional(S.Null),
74+ "unjealous": S.optional(S.Null),
75+ "visitorial": S.optional(S.Null),
76+}) {}
77+
78+export class PiaculumClass extends S.Class<PiaculumClass>("PiaculumClass")({
79+ "alada": S.optional(S.NullOr(S.Int)),
80+ "amphistomous": S.optional(S.NullOr(S.Int)),
81+ "boysenberry": S.optional(S.NullOr(S.Int)),
82+ "catharticalness": S.optional(S.NullOr(S.Number)),
83+ "Chirotherium": S.optional(S.NullOr(S.Int)),
84+ "decardinalize": S.optional(S.NullOr(S.Int)),
85+ "discouragement": S.optional(S.NullOr(S.Int)),
86+ "disdiapason": S.optional(S.NullOr(S.String)),
87+ "doitrified": S.optional(S.NullOr(S.Int)),
88+ "hexaspermous": S.optional(S.NullOr(S.Int)),
89+ "homocerc": S.optional(S.NullOr(S.Boolean)),
90+ "insinking": S.optional(S.NullOr(S.Int)),
91+ "loathfulness": S.optional(S.NullOr(S.Int)),
92+ "miasmatical": S.optional(S.NullOr(S.Int)),
93+ "neurofibril": S.optional(S.NullOr(S.Int)),
94+ "nonbookish": S.optional(S.Null),
95+ "phonendoscope": S.optional(S.NullOr(S.Int)),
96+ "pilferment": S.optional(S.NullOr(S.Int)),
97+ "predismissory": S.optional(S.NullOr(S.Int)),
98+ "preinscription": S.optional(S.NullOr(S.Int)),
99+ "quotative": S.optional(S.NullOr(S.Int)),
100+ "sienna": S.optional(S.NullOr(S.Int)),
101+ "thorax": S.optional(S.NullOr(S.Int)),
102+ "yachting": S.optional(S.NullOr(S.Int)),
103+ "Zipper": S.optional(S.NullOr(S.Int)),
104+}) {}
105+
106+export class OutrivalClass extends S.Class<OutrivalClass>("OutrivalClass")({
107+ "adroitly": S.Null,
108+ "bridehood": S.Null,
109+ "Castoroides": S.Null,
110+ "Czechoslovak": S.Null,
111+ "diagenesis": S.Null,
112+ "dihexahedron": S.Null,
113+ "dopester": S.Null,
114+ "eumerism": S.Null,
115+ "flyness": S.Null,
116+ "fouler": S.Null,
117+ "laudanosine": S.Null,
118+ "Lingulidae": S.Null,
119+ "minutary": S.Null,
120+ "mitra": S.Null,
121+ "opisthorchiasis": S.Null,
122+ "pensively": S.Null,
123+ "pubigerous": S.Null,
124+ "rebellious": S.Null,
125+ "recodify": S.Null,
126+ "unpaced": S.Null,
127+}) {}
128+
129+export class OccupationalistClass extends S.Class<OccupationalistClass>("OccupationalistClass")({
130+ "beholdable": S.Null,
131+ "brotuliform": S.Null,
132+ "Chimakum": S.Null,
133+ "doodler": S.Null,
134+ "emulsin": S.Null,
135+ "Fin": S.Null,
136+ "flourishing": S.Null,
137+ "flueless": S.Null,
138+ "furtively": S.Null,
139+ "gritter": S.Null,
140+ "interwish": S.Null,
141+ "monoxylic": S.Null,
142+ "myristic": S.Null,
143+ "nightwear": S.Null,
144+ "peruser": S.Null,
145+ "theoastrological": S.Null,
146+ "thumby": S.Null,
147+ "tingitid": S.Null,
148+ "trailless": S.Null,
149+ "unpocketed": S.Null,
150+}) {}
151+
152+export class Noncontributing extends S.Class<Noncontributing>("Noncontributing")({
153+ "estevin": S.String,
154+ "jolterhead": S.Number,
155+ "sauternes": S.Int,
156+ "sparsely": S.Boolean,
157+ "unrequested": S.Null,
158+}) {}
159+
160+export class MonotheisticallyClass extends S.Class<MonotheisticallyClass>("MonotheisticallyClass")({
161+ "blaspheme": S.optional(S.Null),
162+ "catharticalness": S.optional(S.NullOr(S.Number)),
163+ "celiosalpingectomy": S.optional(S.Null),
164+ "Chirotherium": S.optional(S.NullOr(S.Int)),
165+ "consummativeness": S.optional(S.Null),
166+ "disdiapason": S.optional(S.NullOr(S.String)),
167+ "egestive": S.optional(S.Null),
168+ "enchylema": S.optional(S.Null),
169+ "gasconade": S.optional(S.Null),
170+ "holidayer": S.optional(S.Null),
171+ "homocerc": S.optional(S.NullOr(S.Boolean)),
172+ "intuitionalism": S.optional(S.Null),
173+ "lophiostomate": S.optional(S.Null),
174+ "nonbookish": S.optional(S.Null),
175+ "nonvolition": S.optional(S.Null),
176+ "palatableness": S.optional(S.Null),
177+ "pimpery": S.optional(S.Null),
178+ "previolation": S.optional(S.Null),
179+ "reconveyance": S.optional(S.Null),
180+ "registership": S.optional(S.Null),
181+ "rhyacolite": S.optional(S.Null),
182+ "smithereens": S.optional(S.Null),
183+ "superedification": S.optional(S.Null),
184+ "trust": S.optional(S.Null),
185+ "whitestone": S.optional(S.Null),
186+}) {}
187+
188+export class MonaziteClass extends S.Class<MonaziteClass>("MonaziteClass")({
189+ "catharticalness": S.Number,
190+ "Chirotherium": S.Int,
191+ "disdiapason": S.String,
192+ "homocerc": S.Boolean,
193+ "nonbookish": S.Null,
194+}) {}
195+
196+export class Maslin extends S.Class<Maslin>("Maslin")({
197+ "Alicant": S.optional(S.NullOr(S.Int)),
198+ "antiatonement": S.optional(S.Null),
199+ "anticorrosive": S.optional(S.NullOr(S.Int)),
200+ "aphidozer": S.optional(S.Null),
201+ "Bakuninist": S.optional(S.Null),
202+ "be": S.optional(S.NullOr(S.Int)),
203+ "catharticalness": S.optional(S.NullOr(S.Number)),
204+ "Chirotherium": S.optional(S.NullOr(S.Int)),
205+ "chub": S.optional(S.NullOr(S.Int)),
206+ "cuprosilicon": S.optional(S.NullOr(S.Int)),
207+ "curtailedly": S.optional(S.NullOr(S.Int)),
208+ "dellenite": S.optional(S.NullOr(S.Int)),
209+ "Dimitry": S.optional(S.NullOr(S.Int)),
210+ "disdiapason": S.optional(S.NullOr(S.String)),
211+ "edifying": S.optional(S.Null),
212+ "ethmoiditis": S.optional(S.NullOr(S.Int)),
213+ "gastralgy": S.optional(S.Null),
214+ "goatherd": S.optional(S.NullOr(S.Int)),
215+ "hammerdress": S.optional(S.NullOr(S.Int)),
216+ "hangfire": S.optional(S.Null),
217+ "homocerc": S.optional(S.NullOr(S.Boolean)),
218+ "lacunosity": S.optional(S.NullOr(S.Int)),
219+ "longiloquence": S.optional(S.Null),
220+ "mameliere": S.optional(S.NullOr(S.Int)),
221+ "motherless": S.optional(S.Null),
222+ "nonbookish": S.optional(S.Null),
223+ "noncorrodible": S.optional(S.Null),
224+ "nonsensicality": S.optional(S.Null),
225+ "oafishly": S.optional(S.NullOr(S.Int)),
226+ "pfund": S.optional(S.Null),
227+ "preadvisory": S.optional(S.Null),
228+ "retroflexed": S.optional(S.Null),
229+ "saccharulmic": S.optional(S.NullOr(S.Int)),
230+ "scowlful": S.optional(S.NullOr(S.Int)),
231+ "secluded": S.optional(S.Null),
232+ "slackage": S.optional(S.Null),
233+ "sphaeridial": S.optional(S.NullOr(S.Int)),
234+ "spondulics": S.optional(S.Null),
235+ "subsecive": S.optional(S.NullOr(S.Int)),
236+ "swellmobsman": S.optional(S.Null),
237+ "trachyglossate": S.optional(S.NullOr(S.Int)),
238+ "trialogue": S.optional(S.Null),
239+ "unassuaged": S.optional(S.NullOr(S.Int)),
240+ "ungross": S.optional(S.Null),
241+ "unjudiciously": S.optional(S.Null),
242+}) {}
243+
244+export class LupusClass extends S.Class<LupusClass>("LupusClass")({
245+ "catharticalness": S.optional(S.NullOr(S.Number)),
246+ "Chirotherium": S.optional(S.NullOr(S.Int)),
247+ "Chlorioninae": S.optional(S.NullOr(S.Int)),
248+ "Corvinae": S.optional(S.NullOr(S.Int)),
249+ "Crassina": S.optional(S.NullOr(S.Int)),
250+ "disdiapason": S.optional(S.NullOr(S.String)),
251+ "exiguity": S.optional(S.NullOr(S.Int)),
252+ "farcist": S.optional(S.NullOr(S.Int)),
253+ "holographical": S.optional(S.NullOr(S.Int)),
254+ "homocerc": S.optional(S.NullOr(S.Boolean)),
255+ "ichthyophagan": S.optional(S.NullOr(S.Int)),
256+ "implacable": S.optional(S.NullOr(S.Int)),
257+ "nonbookish": S.optional(S.Null),
258+ "outshiner": S.optional(S.NullOr(S.Int)),
259+ "overweather": S.optional(S.NullOr(S.Int)),
260+ "protonegroid": S.optional(S.NullOr(S.Int)),
261+ "shallowish": S.optional(S.NullOr(S.Int)),
262+ "snoke": S.optional(S.NullOr(S.Int)),
263+ "snout": S.optional(S.NullOr(S.Int)),
264+ "surveillance": S.optional(S.NullOr(S.Int)),
265+ "threshingtime": S.optional(S.NullOr(S.Int)),
266+ "Thysanocarpus": S.optional(S.NullOr(S.Int)),
267+ "unsignificantly": S.optional(S.NullOr(S.Int)),
268+ "unsnap": S.optional(S.NullOr(S.Int)),
269+ "vendible": S.optional(S.NullOr(S.Int)),
270+}) {}
271+
272+export class LandlubberlyClass extends S.Class<LandlubberlyClass>("LandlubberlyClass")({
273+ "acropoleis": S.Null,
274+ "aminate": S.Null,
275+ "Amyraldism": S.Null,
276+ "bipenniform": S.Null,
277+ "bugre": S.Null,
278+ "calycule": S.Null,
279+ "caoutchouc": S.Null,
280+ "disprover": S.Null,
281+ "fitroot": S.Null,
282+ "fulgently": S.Null,
283+ "kickup": S.Null,
284+ "laevoversion": S.Null,
285+ "moter": S.Null,
286+ "objectivity": S.Null,
287+ "posterity": S.Null,
288+ "postnuptial": S.Null,
289+ "precedentary": S.Null,
290+ "saddling": S.Null,
291+ "subcurrent": S.Null,
292+ "unrecriminative": S.Null,
293+}) {}
294+
295+export class LadronismClass extends S.Class<LadronismClass>("LadronismClass")({
296+ "acclaimer": S.Null,
297+ "achree": S.Null,
298+ "base": S.Null,
299+ "conundrumize": S.Null,
300+ "degerminator": S.Null,
301+ "describable": S.Null,
302+ "exasperatedly": S.Null,
303+ "heroine": S.Null,
304+ "indazin": S.Null,
305+ "luteous": S.Null,
306+ "papular": S.Null,
307+ "pritch": S.Null,
308+ "Prodenia": S.Null,
309+ "seege": S.Null,
310+ "shopgirl": S.Null,
311+ "tragedietta": S.Null,
312+ "unsparse": S.Null,
313+ "uplook": S.Null,
314+ "vermiformis": S.Null,
315+ "whafabout": S.Null,
316+}) {}
317+
318+export class JurorClass extends S.Class<JurorClass>("JurorClass")({
319+ "adipsy": S.Null,
320+ "auxiliator": S.Null,
321+ "benda": S.Null,
322+ "benjamin": S.Null,
323+ "brandling": S.Null,
324+ "epicurishly": S.Null,
325+ "eremochaetous": S.Null,
326+ "marten": S.Null,
327+ "monocline": S.Null,
328+ "Olea": S.Null,
329+ "palgat": S.Null,
330+ "pennyworth": S.Null,
331+ "pioury": S.Null,
332+ "pragmatistic": S.Null,
333+ "stylelessness": S.Null,
334+ "systematical": S.Null,
335+ "thready": S.Null,
336+ "uncontemporary": S.Null,
337+ "uncouched": S.Null,
338+ "uninhabitedness": S.Null,
339+}) {}
340+
341+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
342+ "juror": S.Array(S.Union(S.Boolean, JurorClass)),
343+ "kongoni": S.Array(S.Union(S.Array(S.Int), S.Record({ key: S.String, value: S.Int}))),
344+ "ladronism": S.Array(S.Union(S.Number, S.String, LadronismClass)),
345+ "landlubberly": S.Array(S.Union(S.Boolean, S.Int, LandlubberlyClass)),
346+ "listener": S.Array(S.Union(S.Array(S.Null), S.Int)),
347+ "lupus": S.Array(S.Union(S.Int, LupusClass)),
348+ "maslin": S.Array(Maslin),
349+ "monazite": S.Array(S.Union(S.Number, MonaziteClass)),
350+ "monoliteral": S.Array(S.Union(S.Array(S.Null), S.Boolean)),
351+ "monotheistically": S.Array(S.Union(S.Array(S.Null), MonotheisticallyClass)),
352+ "montage": S.Array(S.Union(S.Array(S.Null), S.Number, S.String)),
353+ "moralness": S.Array(S.Union(S.Array(S.Null), S.Number, S.Null)),
354+ "mowra": S.Array(S.NullOr(MonaziteClass)),
355+ "mulishly": S.Array(S.Union(S.Array(S.Int), S.Number, S.Null)),
356+ "myoscope": S.Array(S.Union(S.Array(S.Null), S.Boolean, S.Int)),
357+ "nach": S.Array(S.NullOr(S.Array(S.NullOr(S.Int)))),
358+ "neuromastic": S.Array(S.Union(S.Array(S.Null), S.Number)),
359+ "noncontributing": S.Array(Noncontributing),
360+ "nonnervous": S.Array(S.Union(S.Boolean, S.Int)),
361+ "nonvaluation": S.Array(S.Union(S.Array(S.Null), S.Boolean, S.Number)),
362+ "occupationalist": S.Array(S.Union(S.Array(S.Null), OccupationalistClass, S.Null)),
363+ "outrival": S.Array(S.Union(S.Number, OutrivalClass, S.Null)),
364+ "paleographically": S.Array(S.Union(S.Number, S.Record({ key: S.String, value: S.NullOr(S.Int)}))),
365+ "pamphletwise": S.Array(S.Union(S.Int, S.Record({ key: S.String, value: S.Int}), S.String)),
366+ "pediatrics": S.Array(S.Union(S.Boolean, S.Number, S.Null)),
367+ "perceptive": S.Array(S.Boolean),
368+ "piaculum": S.Array(S.Union(S.Number, PiaculumClass)),
369+ "piccadilly": S.Array(S.Union(S.Number, S.String, S.Null)),
370+ "piffler": S.Array(S.Union(S.Array(S.Null), MonaziteClass)),
371+ "pithful": S.Array(S.Union(S.Boolean, S.Int, S.Null)),
372+ "placuntitis": S.Array(S.Union(S.Int, S.Record({ key: S.String, value: S.Int}))),
373+ "plectopterous": S.Array(S.Union(S.Number, S.Record({ key: S.String, value: S.Int}))),
374+ "pneumocele": S.Array(S.NullOr(Pneumocele)),
375+ "poliorcetic": S.Array(S.Union(S.Boolean, MonaziteClass)),
376+ "poormaster": S.Array(S.Union(S.Array(S.Int), S.Record({ key: S.String, value: S.Int}), S.Null)),
377+ "potwhisky": S.Array(S.Union(S.Int, PotwhiskyClass, S.Null)),
378+ "practicalizer": S.Array(S.Union(S.Array(S.Null), S.String, MonaziteClass)),
379+ "prefreshman": S.Array(S.Union(S.Array(S.Null), S.String, PrefreshmanClass)),
380+ "prehensility": S.Array(S.Union(S.Array(S.Null), S.Boolean, MonaziteClass)),
381+ "prevoidance": S.Array(S.Union(S.Array(S.Int), S.Int, MonaziteClass)),
382+ "probant": S.Array(S.Record({ key: S.String, value: S.NullOr(S.Int)})),
383+ "protext": S.Array(S.Union(S.Array(S.Int), S.Boolean, MonaziteClass)),
384+}) {}
Atypescript-zodjust-schema-true--8c4ca457bcba / TopLevel.ts+384 −0
@@ -0,0 +1,384 @@
1+import * as z from "zod";
2+
3+
4+export const JurorClassSchema = z.object({
5+ "adipsy": z.null(),
6+ "auxiliator": z.null(),
7+ "benda": z.null(),
8+ "benjamin": z.null(),
9+ "brandling": z.null(),
10+ "epicurishly": z.null(),
11+ "eremochaetous": z.null(),
12+ "marten": z.null(),
13+ "monocline": z.null(),
14+ "Olea": z.null(),
15+ "palgat": z.null(),
16+ "pennyworth": z.null(),
17+ "pioury": z.null(),
18+ "pragmatistic": z.null(),
19+ "stylelessness": z.null(),
20+ "systematical": z.null(),
21+ "thready": z.null(),
22+ "uncontemporary": z.null(),
23+ "uncouched": z.null(),
24+ "uninhabitedness": z.null(),
25+});
26+
27+export const LadronismClassSchema = z.object({
28+ "acclaimer": z.null(),
29+ "achree": z.null(),
30+ "base": z.null(),
31+ "conundrumize": z.null(),
32+ "degerminator": z.null(),
33+ "describable": z.null(),
34+ "exasperatedly": z.null(),
35+ "heroine": z.null(),
36+ "indazin": z.null(),
37+ "luteous": z.null(),
38+ "papular": z.null(),
39+ "pritch": z.null(),
40+ "Prodenia": z.null(),
41+ "seege": z.null(),
42+ "shopgirl": z.null(),
43+ "tragedietta": z.null(),
44+ "unsparse": z.null(),
45+ "uplook": z.null(),
46+ "vermiformis": z.null(),
47+ "whafabout": z.null(),
48+});
49+
50+export const LandlubberlyClassSchema = z.object({
51+ "acropoleis": z.null(),
52+ "aminate": z.null(),
53+ "Amyraldism": z.null(),
54+ "bipenniform": z.null(),
55+ "bugre": z.null(),
56+ "calycule": z.null(),
57+ "caoutchouc": z.null(),
58+ "disprover": z.null(),
59+ "fitroot": z.null(),
60+ "fulgently": z.null(),
61+ "kickup": z.null(),
62+ "laevoversion": z.null(),
63+ "moter": z.null(),
64+ "objectivity": z.null(),
65+ "posterity": z.null(),
66+ "postnuptial": z.null(),
67+ "precedentary": z.null(),
68+ "saddling": z.null(),
69+ "subcurrent": z.null(),
70+ "unrecriminative": z.null(),
71+});
72+
73+export const LupusClassSchema = z.object({
74+ "catharticalness": z.number().optional(),
75+ "Chirotherium": z.number().int().optional(),
76+ "Chlorioninae": z.number().int().optional(),
77+ "Corvinae": z.number().int().optional(),
78+ "Crassina": z.number().int().optional(),
79+ "disdiapason": z.string().optional(),
80+ "exiguity": z.number().int().optional(),
81+ "farcist": z.number().int().optional(),
82+ "holographical": z.number().int().optional(),
83+ "homocerc": z.boolean().optional(),
84+ "ichthyophagan": z.number().int().optional(),
85+ "implacable": z.number().int().optional(),
86+ "nonbookish": z.null().optional(),
87+ "outshiner": z.number().int().optional(),
88+ "overweather": z.number().int().optional(),
89+ "protonegroid": z.number().int().optional(),
90+ "shallowish": z.number().int().optional(),
91+ "snoke": z.number().int().optional(),
92+ "snout": z.number().int().optional(),
93+ "surveillance": z.number().int().optional(),
94+ "threshingtime": z.number().int().optional(),
95+ "Thysanocarpus": z.number().int().optional(),
96+ "unsignificantly": z.number().int().optional(),
97+ "unsnap": z.number().int().optional(),
98+ "vendible": z.number().int().optional(),
99+});
100+
101+export const MaslinSchema = z.object({
102+ "Alicant": z.number().int().optional(),
103+ "antiatonement": z.null().optional(),
104+ "anticorrosive": z.number().int().optional(),
105+ "aphidozer": z.null().optional(),
106+ "Bakuninist": z.null().optional(),
107+ "be": z.number().int().optional(),
108+ "catharticalness": z.number().optional(),
109+ "Chirotherium": z.number().int().optional(),
110+ "chub": z.number().int().optional(),
111+ "cuprosilicon": z.number().int().optional(),
112+ "curtailedly": z.number().int().optional(),
113+ "dellenite": z.number().int().optional(),
114+ "Dimitry": z.number().int().optional(),
115+ "disdiapason": z.string().optional(),
116+ "edifying": z.null().optional(),
117+ "ethmoiditis": z.number().int().optional(),
118+ "gastralgy": z.null().optional(),
119+ "goatherd": z.number().int().optional(),
120+ "hammerdress": z.number().int().optional(),
121+ "hangfire": z.null().optional(),
122+ "homocerc": z.boolean().optional(),
123+ "lacunosity": z.number().int().optional(),
124+ "longiloquence": z.null().optional(),
125+ "mameliere": z.number().int().optional(),
126+ "motherless": z.null().optional(),
127+ "nonbookish": z.null().optional(),
128+ "noncorrodible": z.null().optional(),
129+ "nonsensicality": z.null().optional(),
130+ "oafishly": z.number().int().optional(),
131+ "pfund": z.null().optional(),
132+ "preadvisory": z.null().optional(),
133+ "retroflexed": z.null().optional(),
134+ "saccharulmic": z.number().int().optional(),
135+ "scowlful": z.number().int().optional(),
136+ "secluded": z.null().optional(),
137+ "slackage": z.null().optional(),
138+ "sphaeridial": z.number().int().optional(),
139+ "spondulics": z.null().optional(),
140+ "subsecive": z.number().int().optional(),
141+ "swellmobsman": z.null().optional(),
142+ "trachyglossate": z.number().int().optional(),
143+ "trialogue": z.null().optional(),
144+ "unassuaged": z.number().int().optional(),
145+ "ungross": z.null().optional(),
146+ "unjudiciously": z.null().optional(),
147+});
148+
149+export const MonaziteClassSchema = z.object({
150+ "catharticalness": z.number(),
151+ "Chirotherium": z.number().int(),
152+ "disdiapason": z.string(),
153+ "homocerc": z.boolean(),
154+ "nonbookish": z.null(),
155+});
156+
157+export const MonotheisticallyClassSchema = z.object({
158+ "blaspheme": z.null().optional(),
159+ "catharticalness": z.number().optional(),
160+ "celiosalpingectomy": z.null().optional(),
161+ "Chirotherium": z.number().int().optional(),
162+ "consummativeness": z.null().optional(),
163+ "disdiapason": z.string().optional(),
164+ "egestive": z.null().optional(),
165+ "enchylema": z.null().optional(),
166+ "gasconade": z.null().optional(),
167+ "holidayer": z.null().optional(),
168+ "homocerc": z.boolean().optional(),
169+ "intuitionalism": z.null().optional(),
170+ "lophiostomate": z.null().optional(),
171+ "nonbookish": z.null().optional(),
172+ "nonvolition": z.null().optional(),
173+ "palatableness": z.null().optional(),
174+ "pimpery": z.null().optional(),
175+ "previolation": z.null().optional(),
176+ "reconveyance": z.null().optional(),
177+ "registership": z.null().optional(),
178+ "rhyacolite": z.null().optional(),
179+ "smithereens": z.null().optional(),
180+ "superedification": z.null().optional(),
181+ "trust": z.null().optional(),
182+ "whitestone": z.null().optional(),
183+});
184+
185+export const NoncontributingSchema = z.object({
186+ "estevin": z.string(),
187+ "jolterhead": z.number(),
188+ "sauternes": z.number().int(),
189+ "sparsely": z.boolean(),
190+ "unrequested": z.null(),
191+});
192+
193+export const OccupationalistClassSchema = z.object({
194+ "beholdable": z.null(),
195+ "brotuliform": z.null(),
196+ "Chimakum": z.null(),
197+ "doodler": z.null(),
198+ "emulsin": z.null(),
199+ "Fin": z.null(),
200+ "flourishing": z.null(),
201+ "flueless": z.null(),
202+ "furtively": z.null(),
203+ "gritter": z.null(),
204+ "interwish": z.null(),
205+ "monoxylic": z.null(),
206+ "myristic": z.null(),
207+ "nightwear": z.null(),
208+ "peruser": z.null(),
209+ "theoastrological": z.null(),
210+ "thumby": z.null(),
211+ "tingitid": z.null(),
212+ "trailless": z.null(),
213+ "unpocketed": z.null(),
214+});
215+
216+export const OutrivalClassSchema = z.object({
217+ "adroitly": z.null(),
218+ "bridehood": z.null(),
219+ "Castoroides": z.null(),
220+ "Czechoslovak": z.null(),
221+ "diagenesis": z.null(),
222+ "dihexahedron": z.null(),
223+ "dopester": z.null(),
224+ "eumerism": z.null(),
225+ "flyness": z.null(),
226+ "fouler": z.null(),
227+ "laudanosine": z.null(),
228+ "Lingulidae": z.null(),
229+ "minutary": z.null(),
230+ "mitra": z.null(),
231+ "opisthorchiasis": z.null(),
232+ "pensively": z.null(),
233+ "pubigerous": z.null(),
234+ "rebellious": z.null(),
235+ "recodify": z.null(),
236+ "unpaced": z.null(),
237+});
238+
239+export const PiaculumClassSchema = z.object({
240+ "alada": z.number().int().optional(),
241+ "amphistomous": z.number().int().optional(),
242+ "boysenberry": z.number().int().optional(),
243+ "catharticalness": z.number().optional(),
244+ "Chirotherium": z.number().int().optional(),
245+ "decardinalize": z.number().int().optional(),
246+ "discouragement": z.number().int().optional(),
247+ "disdiapason": z.string().optional(),
248+ "doitrified": z.number().int().optional(),
249+ "hexaspermous": z.number().int().optional(),
250+ "homocerc": z.boolean().optional(),
251+ "insinking": z.number().int().optional(),
252+ "loathfulness": z.number().int().optional(),
253+ "miasmatical": z.number().int().optional(),
254+ "neurofibril": z.number().int().optional(),
255+ "nonbookish": z.null().optional(),
256+ "phonendoscope": z.number().int().optional(),
257+ "pilferment": z.number().int().optional(),
258+ "predismissory": z.number().int().optional(),
259+ "preinscription": z.number().int().optional(),
260+ "quotative": z.number().int().optional(),
261+ "sienna": z.number().int().optional(),
262+ "thorax": z.number().int().optional(),
263+ "yachting": z.number().int().optional(),
264+ "Zipper": z.number().int().optional(),
265+});
266+
267+export const PneumoceleSchema = z.object({
268+ "Carbonarism": z.null().optional(),
269+ "catharticalness": z.number().optional(),
270+ "Chirotherium": z.number().int().optional(),
271+ "cineolic": z.null().optional(),
272+ "cobbly": z.null().optional(),
273+ "conchyliferous": z.null().optional(),
274+ "congregation": z.null().optional(),
275+ "disdiapason": z.string().optional(),
276+ "enterotomy": z.null().optional(),
277+ "entophytal": z.null().optional(),
278+ "fewtrils": z.null().optional(),
279+ "herem": z.null().optional(),
280+ "homocerc": z.boolean().optional(),
281+ "Koniga": z.null().optional(),
282+ "meticulosity": z.null().optional(),
283+ "Micky": z.null().optional(),
284+ "mismarriage": z.null().optional(),
285+ "neurotrophic": z.null().optional(),
286+ "nonbookish": z.null().optional(),
287+ "persuasively": z.null().optional(),
288+ "replaceable": z.null().optional(),
289+ "silex": z.null().optional(),
290+ "taillight": z.null().optional(),
291+ "unjealous": z.null().optional(),
292+ "visitorial": z.null().optional(),
293+});
294+
295+export const PotwhiskyClassSchema = z.object({
296+ "arciform": z.null(),
297+ "cresolin": z.null(),
298+ "disheartener": z.null(),
299+ "disproportionable": z.null(),
300+ "Euchorda": z.null(),
301+ "ferryway": z.null(),
302+ "filamentiferous": z.null(),
303+ "flemish": z.null(),
304+ "forgainst": z.null(),
305+ "grainering": z.null(),
306+ "irrevoluble": z.null(),
307+ "kindredship": z.null(),
308+ "pinguitudinous": z.null(),
309+ "simpletonic": z.null(),
310+ "singsong": z.null(),
311+ "submergement": z.null(),
312+ "supraoesophagal": z.null(),
313+ "thrashel": z.null(),
314+ "tyremesis": z.null(),
315+ "Yoruba": z.null(),
316+});
317+
318+export const PrefreshmanClassSchema = z.object({
319+ "azorubine": z.null(),
320+ "choroiditis": z.null(),
321+ "coagulatory": z.null(),
322+ "cyclorama": z.null(),
323+ "Dolphus": z.null(),
324+ "duckhearted": z.null(),
325+ "Ficus": z.null(),
326+ "Gemaric": z.null(),
327+ "jugation": z.null(),
328+ "myoliposis": z.null(),
329+ "nonnomination": z.null(),
330+ "palay": z.null(),
331+ "pentactinal": z.null(),
332+ "Phaet": z.null(),
333+ "piquant": z.null(),
334+ "registration": z.null(),
335+ "remancipation": z.null(),
336+ "scutatiform": z.null(),
337+ "theodolite": z.null(),
338+ "underward": z.null(),
339+});
340+
341+export const TopLevelSchema = z.object({
342+ "juror": z.array(z.union([z.boolean(), JurorClassSchema])),
343+ "kongoni": z.array(z.union([z.array(z.number().int()), z.record(z.string(), z.number().int())])),
344+ "ladronism": z.array(z.union([LadronismClassSchema, z.number(), z.string()])),
345+ "landlubberly": z.array(z.union([z.boolean(), LandlubberlyClassSchema, z.number().int()])),
346+ "listener": z.array(z.union([z.array(z.null()), z.number().int()])),
347+ "lupus": z.array(z.union([LupusClassSchema, z.number().int()])),
348+ "maslin": z.array(MaslinSchema),
349+ "monazite": z.array(z.union([MonaziteClassSchema, z.number()])),
350+ "monoliteral": z.array(z.union([z.array(z.null()), z.boolean()])),
351+ "monotheistically": z.array(z.union([z.array(z.null()), MonotheisticallyClassSchema])),
352+ "montage": z.array(z.union([z.array(z.null()), z.number(), z.string()])),
353+ "moralness": z.array(z.union([z.null(), z.array(z.null()), z.number()])),
354+ "mowra": z.array(z.union([z.null(), MonaziteClassSchema])),
355+ "mulishly": z.array(z.union([z.null(), z.array(z.number().int()), z.number()])),
356+ "myoscope": z.array(z.union([z.array(z.null()), z.boolean(), z.number().int()])),
357+ "nach": z.array(z.union([z.null(), z.array(z.union([z.null(), z.number().int()]))])),
358+ "neuromastic": z.array(z.union([z.array(z.null()), z.number()])),
359+ "noncontributing": z.array(NoncontributingSchema),
360+ "nonnervous": z.array(z.union([z.boolean(), z.number().int()])),
361+ "nonvaluation": z.array(z.union([z.array(z.null()), z.boolean(), z.number()])),
362+ "occupationalist": z.array(z.union([z.null(), z.array(z.null()), OccupationalistClassSchema])),
363+ "outrival": z.array(z.union([z.null(), OutrivalClassSchema, z.number()])),
364+ "paleographically": z.array(z.union([z.number(), z.record(z.string(), z.union([z.null(), z.number().int()]))])),
365+ "pamphletwise": z.array(z.union([z.number().int(), z.record(z.string(), z.number().int()), z.string()])),
366+ "pediatrics": z.array(z.union([z.null(), z.boolean(), z.number()])),
367+ "perceptive": z.array(z.boolean()),
368+ "piaculum": z.array(z.union([PiaculumClassSchema, z.number()])),
369+ "piccadilly": z.array(z.union([z.null(), z.number(), z.string()])),
370+ "piffler": z.array(z.union([z.array(z.null()), MonaziteClassSchema])),
371+ "pithful": z.array(z.union([z.null(), z.boolean(), z.number().int()])),
372+ "placuntitis": z.array(z.union([z.number().int(), z.record(z.string(), z.number().int())])),
373+ "plectopterous": z.array(z.union([z.number(), z.record(z.string(), z.number().int())])),
374+ "pneumocele": z.array(z.union([z.null(), PneumoceleSchema])),
375+ "poliorcetic": z.array(z.union([z.boolean(), MonaziteClassSchema])),
376+ "poormaster": z.array(z.union([z.null(), z.array(z.number().int()), z.record(z.string(), z.number().int())])),
377+ "potwhisky": z.array(z.union([z.null(), PotwhiskyClassSchema, z.number().int()])),
378+ "practicalizer": z.array(z.union([z.array(z.null()), MonaziteClassSchema, z.string()])),
379+ "prefreshman": z.array(z.union([z.array(z.null()), PrefreshmanClassSchema, z.string()])),
380+ "prehensility": z.array(z.union([z.array(z.null()), z.boolean(), MonaziteClassSchema])),
381+ "prevoidance": z.array(z.union([z.array(z.number().int()), MonaziteClassSchema, z.number().int()])),
382+ "probant": z.array(z.record(z.string(), z.union([z.null(), z.number().int()]))),
383+ "protext": z.array(z.union([z.array(z.number().int()), z.boolean(), MonaziteClassSchema])),
384+});
Test case

test/inputs/json/priority/combinations4.json

4 generated files · +4,016 −72
Adartcopy-with-true--bb7e994c05fe / TopLevel.dart+2,620 −0
@@ -0,0 +1,2620 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final List<dynamic> protrusive;
13+ final List<dynamic> pulpitism;
14+ final List<dynamic> pyodermia;
15+ final List<dynamic> quebrachine;
16+ final List<dynamic> querier;
17+ final List<dynamic> rebarbative;
18+ final List<Reimagine> reimagine;
19+ final Ressaut ressaut;
20+ final List<dynamic> retrocervical;
21+ final List<dynamic> revert;
22+ final List<dynamic> rewrite;
23+ final List<dynamic> saccoderm;
24+ final List<dynamic> santir;
25+ final List<dynamic> saprophilous;
26+ final List<dynamic> saxten;
27+ final List<Scatty?> scatty;
28+ final List<dynamic> scoffer;
29+ final List<dynamic> scrampum;
30+ final double semantic;
31+ final List<dynamic> serpentinic;
32+ final List<dynamic> shadowable;
33+ final List<dynamic> sistering;
34+ final List<Staghunting> staghunting;
35+ final List<dynamic> stagmometer;
36+ final List<dynamic> stimulability;
37+ final List<dynamic> strangleable;
38+ final List<dynamic> strenuosity;
39+ final List<dynamic> tabaxir;
40+ final List<dynamic> talpiform;
41+ final List<dynamic> thwack;
42+ final List<double?> to;
43+ final List<dynamic> tortricine;
44+ final List<dynamic> truantcy;
45+ final List<String> turgesce;
46+ final List<dynamic> unbeginning;
47+ final List<double> underdunged;
48+ final List<dynamic> undesirability;
49+ final List<dynamic> unerasing;
50+ final List<dynamic> unguentarium;
51+ final List<dynamic> unimpeachably;
52+ final List<dynamic> unmortgaged;
53+ final List<dynamic> unobstructed;
54+ final List<dynamic> unreceptivity;
55+ final List<dynamic> unsatisfactoriness;
56+ final List<int> unsecurity;
57+ final List<dynamic> unstressed;
58+ final List<dynamic> untasked;
59+ final List<dynamic> unvarying;
60+ final List<dynamic> vehemently;
61+ final Map<String, bool> warriorship;
62+ final List<dynamic> whitepot;
63+ final List<dynamic> wrothy;
64+
65+ TopLevel({
66+ required this.protrusive,
67+ required this.pulpitism,
68+ required this.pyodermia,
69+ required this.quebrachine,
70+ required this.querier,
71+ required this.rebarbative,
72+ required this.reimagine,
73+ required this.ressaut,
74+ required this.retrocervical,
75+ required this.revert,
76+ required this.rewrite,
77+ required this.saccoderm,
78+ required this.santir,
79+ required this.saprophilous,
80+ required this.saxten,
81+ required this.scatty,
82+ required this.scoffer,
83+ required this.scrampum,
84+ required this.semantic,
85+ required this.serpentinic,
86+ required this.shadowable,
87+ required this.sistering,
88+ required this.staghunting,
89+ required this.stagmometer,
90+ required this.stimulability,
91+ required this.strangleable,
92+ required this.strenuosity,
93+ required this.tabaxir,
94+ required this.talpiform,
95+ required this.thwack,
96+ required this.to,
97+ required this.tortricine,
98+ required this.truantcy,
99+ required this.turgesce,
100+ required this.unbeginning,
101+ required this.underdunged,
102+ required this.undesirability,
103+ required this.unerasing,
104+ required this.unguentarium,
105+ required this.unimpeachably,
106+ required this.unmortgaged,
107+ required this.unobstructed,
108+ required this.unreceptivity,
109+ required this.unsatisfactoriness,
110+ required this.unsecurity,
111+ required this.unstressed,
112+ required this.untasked,
113+ required this.unvarying,
114+ required this.vehemently,
115+ required this.warriorship,
116+ required this.whitepot,
117+ required this.wrothy,
118+ });
119+
120+ TopLevel copyWith({
121+ List<dynamic>? protrusive,
122+ List<dynamic>? pulpitism,
123+ List<dynamic>? pyodermia,
124+ List<dynamic>? quebrachine,
125+ List<dynamic>? querier,
126+ List<dynamic>? rebarbative,
127+ List<Reimagine>? reimagine,
128+ Ressaut? ressaut,
129+ List<dynamic>? retrocervical,
130+ List<dynamic>? revert,
131+ List<dynamic>? rewrite,
132+ List<dynamic>? saccoderm,
133+ List<dynamic>? santir,
134+ List<dynamic>? saprophilous,
135+ List<dynamic>? saxten,
136+ List<Scatty?>? scatty,
137+ List<dynamic>? scoffer,
138+ List<dynamic>? scrampum,
139+ double? semantic,
140+ List<dynamic>? serpentinic,
141+ List<dynamic>? shadowable,
142+ List<dynamic>? sistering,
143+ List<Staghunting>? staghunting,
144+ List<dynamic>? stagmometer,
145+ List<dynamic>? stimulability,
146+ List<dynamic>? strangleable,
147+ List<dynamic>? strenuosity,
148+ List<dynamic>? tabaxir,
149+ List<dynamic>? talpiform,
150+ List<dynamic>? thwack,
151+ List<double?>? to,
152+ List<dynamic>? tortricine,
153+ List<dynamic>? truantcy,
154+ List<String>? turgesce,
155+ List<dynamic>? unbeginning,
156+ List<double>? underdunged,
157+ List<dynamic>? undesirability,
158+ List<dynamic>? unerasing,
159+ List<dynamic>? unguentarium,
160+ List<dynamic>? unimpeachably,
161+ List<dynamic>? unmortgaged,
162+ List<dynamic>? unobstructed,
163+ List<dynamic>? unreceptivity,
164+ List<dynamic>? unsatisfactoriness,
165+ List<int>? unsecurity,
166+ List<dynamic>? unstressed,
167+ List<dynamic>? untasked,
168+ List<dynamic>? unvarying,
169+ List<dynamic>? vehemently,
170+ Map<String, bool>? warriorship,
171+ List<dynamic>? whitepot,
172+ List<dynamic>? wrothy,
173+ }) =>
174+ TopLevel(
175+ protrusive: protrusive ?? this.protrusive,
176+ pulpitism: pulpitism ?? this.pulpitism,
177+ pyodermia: pyodermia ?? this.pyodermia,
178+ quebrachine: quebrachine ?? this.quebrachine,
179+ querier: querier ?? this.querier,
180+ rebarbative: rebarbative ?? this.rebarbative,
181+ reimagine: reimagine ?? this.reimagine,
182+ ressaut: ressaut ?? this.ressaut,
183+ retrocervical: retrocervical ?? this.retrocervical,
184+ revert: revert ?? this.revert,
185+ rewrite: rewrite ?? this.rewrite,
186+ saccoderm: saccoderm ?? this.saccoderm,
187+ santir: santir ?? this.santir,
188+ saprophilous: saprophilous ?? this.saprophilous,
189+ saxten: saxten ?? this.saxten,
190+ scatty: scatty ?? this.scatty,
191+ scoffer: scoffer ?? this.scoffer,
192+ scrampum: scrampum ?? this.scrampum,
193+ semantic: semantic ?? this.semantic,
194+ serpentinic: serpentinic ?? this.serpentinic,
195+ shadowable: shadowable ?? this.shadowable,
196+ sistering: sistering ?? this.sistering,
197+ staghunting: staghunting ?? this.staghunting,
198+ stagmometer: stagmometer ?? this.stagmometer,
199+ stimulability: stimulability ?? this.stimulability,
200+ strangleable: strangleable ?? this.strangleable,
201+ strenuosity: strenuosity ?? this.strenuosity,
202+ tabaxir: tabaxir ?? this.tabaxir,
203+ talpiform: talpiform ?? this.talpiform,
204+ thwack: thwack ?? this.thwack,
205+ to: to ?? this.to,
206+ tortricine: tortricine ?? this.tortricine,
207+ truantcy: truantcy ?? this.truantcy,
208+ turgesce: turgesce ?? this.turgesce,
209+ unbeginning: unbeginning ?? this.unbeginning,
210+ underdunged: underdunged ?? this.underdunged,
211+ undesirability: undesirability ?? this.undesirability,
212+ unerasing: unerasing ?? this.unerasing,
213+ unguentarium: unguentarium ?? this.unguentarium,
214+ unimpeachably: unimpeachably ?? this.unimpeachably,
215+ unmortgaged: unmortgaged ?? this.unmortgaged,
216+ unobstructed: unobstructed ?? this.unobstructed,
217+ unreceptivity: unreceptivity ?? this.unreceptivity,
218+ unsatisfactoriness: unsatisfactoriness ?? this.unsatisfactoriness,
219+ unsecurity: unsecurity ?? this.unsecurity,
220+ unstressed: unstressed ?? this.unstressed,
221+ untasked: untasked ?? this.untasked,
222+ unvarying: unvarying ?? this.unvarying,
223+ vehemently: vehemently ?? this.vehemently,
224+ warriorship: warriorship ?? this.warriorship,
225+ whitepot: whitepot ?? this.whitepot,
226+ wrothy: wrothy ?? this.wrothy,
227+ );
228+
229+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
230+ protrusive: List<dynamic>.from(json["protrusive"].map((x) => x)),
231+ pulpitism: List<dynamic>.from(json["pulpitism"].map((x) => x)),
232+ pyodermia: List<dynamic>.from(json["pyodermia"].map((x) => x)),
233+ quebrachine: List<dynamic>.from(json["quebrachine"].map((x) => x)),
234+ querier: List<dynamic>.from(json["querier"].map((x) => x)),
235+ rebarbative: List<dynamic>.from(json["rebarbative"].map((x) => x)),
236+ reimagine: List<Reimagine>.from(json["reimagine"].map((x) => Reimagine.fromJson(x))),
237+ ressaut: Ressaut.fromJson(json["ressaut"]),
238+ retrocervical: List<dynamic>.from(json["retrocervical"].map((x) => x)),
239+ revert: List<dynamic>.from(json["revert"].map((x) => x)),
240+ rewrite: List<dynamic>.from(json["rewrite"].map((x) => x)),
241+ saccoderm: List<dynamic>.from(json["saccoderm"].map((x) => x)),
242+ santir: List<dynamic>.from(json["santir"].map((x) => x)),
243+ saprophilous: List<dynamic>.from(json["saprophilous"].map((x) => x)),
244+ saxten: List<dynamic>.from(json["saxten"].map((x) => x)),
245+ scatty: List<Scatty?>.from(json["scatty"].map((x) => x == null ? null : Scatty.fromJson(x))),
246+ scoffer: List<dynamic>.from(json["scoffer"].map((x) => x)),
247+ scrampum: List<dynamic>.from(json["scrampum"].map((x) => x)),
248+ semantic: json["semantic"]?.toDouble(),
249+ serpentinic: List<dynamic>.from(json["serpentinic"].map((x) => x)),
250+ shadowable: List<dynamic>.from(json["shadowable"].map((x) => x)),
251+ sistering: List<dynamic>.from(json["sistering"].map((x) => x)),
252+ staghunting: List<Staghunting>.from(json["staghunting"].map((x) => Staghunting.fromJson(x))),
253+ stagmometer: List<dynamic>.from(json["stagmometer"].map((x) => x)),
254+ stimulability: List<dynamic>.from(json["stimulability"].map((x) => x)),
255+ strangleable: List<dynamic>.from(json["strangleable"].map((x) => x)),
256+ strenuosity: List<dynamic>.from(json["strenuosity"].map((x) => x)),
257+ tabaxir: List<dynamic>.from(json["tabaxir"].map((x) => x)),
258+ talpiform: List<dynamic>.from(json["talpiform"].map((x) => x)),
259+ thwack: List<dynamic>.from(json["thwack"].map((x) => x)),
260+ to: List<double?>.from(json["to"].map((x) => x?.toDouble())),
261+ tortricine: List<dynamic>.from(json["tortricine"].map((x) => x)),
262+ truantcy: List<dynamic>.from(json["truantcy"].map((x) => x)),
263+ turgesce: List<String>.from(json["turgesce"].map((x) => x)),
264+ unbeginning: List<dynamic>.from(json["unbeginning"].map((x) => x)),
265+ underdunged: List<double>.from(json["underdunged"].map((x) => x?.toDouble())),
266+ undesirability: List<dynamic>.from(json["undesirability"].map((x) => x)),
267+ unerasing: List<dynamic>.from(json["unerasing"].map((x) => x)),
268+ unguentarium: List<dynamic>.from(json["unguentarium"].map((x) => x)),
269+ unimpeachably: List<dynamic>.from(json["unimpeachably"].map((x) => x)),
270+ unmortgaged: List<dynamic>.from(json["unmortgaged"].map((x) => x)),
271+ unobstructed: List<dynamic>.from(json["unobstructed"].map((x) => x)),
272+ unreceptivity: List<dynamic>.from(json["unreceptivity"].map((x) => x)),
273+ unsatisfactoriness: List<dynamic>.from(json["unsatisfactoriness"].map((x) => x)),
274+ unsecurity: List<int>.from(json["unsecurity"].map((x) => x)),
275+ unstressed: List<dynamic>.from(json["unstressed"].map((x) => x)),
276+ untasked: List<dynamic>.from(json["untasked"].map((x) => x)),
277+ unvarying: List<dynamic>.from(json["unvarying"].map((x) => x)),
278+ vehemently: List<dynamic>.from(json["vehemently"].map((x) => x)),
279+ warriorship: Map.from(json["warriorship"]).map((k, v) => MapEntry<String, bool>(k, v)),
280+ whitepot: List<dynamic>.from(json["whitepot"].map((x) => x)),
281+ wrothy: List<dynamic>.from(json["wrothy"].map((x) => x)),
282+ );
283+
284+ Map<String, dynamic> toJson() => {
285+ "protrusive": List<dynamic>.from(protrusive.map((x) => x)),
286+ "pulpitism": List<dynamic>.from(pulpitism.map((x) => x)),
287+ "pyodermia": List<dynamic>.from(pyodermia.map((x) => x)),
288+ "quebrachine": List<dynamic>.from(quebrachine.map((x) => x)),
289+ "querier": List<dynamic>.from(querier.map((x) => x)),
290+ "rebarbative": List<dynamic>.from(rebarbative.map((x) => x)),
291+ "reimagine": List<dynamic>.from(reimagine.map((x) => x.toJson())),
292+ "ressaut": ressaut.toJson(),
293+ "retrocervical": List<dynamic>.from(retrocervical.map((x) => x)),
294+ "revert": List<dynamic>.from(revert.map((x) => x)),
295+ "rewrite": List<dynamic>.from(rewrite.map((x) => x)),
296+ "saccoderm": List<dynamic>.from(saccoderm.map((x) => x)),
297+ "santir": List<dynamic>.from(santir.map((x) => x)),
298+ "saprophilous": List<dynamic>.from(saprophilous.map((x) => x)),
299+ "saxten": List<dynamic>.from(saxten.map((x) => x)),
300+ "scatty": List<dynamic>.from(scatty.map((x) => x?.toJson())),
301+ "scoffer": List<dynamic>.from(scoffer.map((x) => x)),
302+ "scrampum": List<dynamic>.from(scrampum.map((x) => x)),
303+ "semantic": semantic,
304+ "serpentinic": List<dynamic>.from(serpentinic.map((x) => x)),
305+ "shadowable": List<dynamic>.from(shadowable.map((x) => x)),
306+ "sistering": List<dynamic>.from(sistering.map((x) => x)),
307+ "staghunting": List<dynamic>.from(staghunting.map((x) => x.toJson())),
308+ "stagmometer": List<dynamic>.from(stagmometer.map((x) => x)),
309+ "stimulability": List<dynamic>.from(stimulability.map((x) => x)),
310+ "strangleable": List<dynamic>.from(strangleable.map((x) => x)),
311+ "strenuosity": List<dynamic>.from(strenuosity.map((x) => x)),
312+ "tabaxir": List<dynamic>.from(tabaxir.map((x) => x)),
313+ "talpiform": List<dynamic>.from(talpiform.map((x) => x)),
314+ "thwack": List<dynamic>.from(thwack.map((x) => x)),
315+ "to": List<dynamic>.from(to.map((x) => x)),
316+ "tortricine": List<dynamic>.from(tortricine.map((x) => x)),
317+ "truantcy": List<dynamic>.from(truantcy.map((x) => x)),
318+ "turgesce": List<dynamic>.from(turgesce.map((x) => x)),
319+ "unbeginning": List<dynamic>.from(unbeginning.map((x) => x)),
320+ "underdunged": List<dynamic>.from(underdunged.map((x) => x)),
321+ "undesirability": List<dynamic>.from(undesirability.map((x) => x)),
322+ "unerasing": List<dynamic>.from(unerasing.map((x) => x)),
323+ "unguentarium": List<dynamic>.from(unguentarium.map((x) => x)),
324+ "unimpeachably": List<dynamic>.from(unimpeachably.map((x) => x)),
325+ "unmortgaged": List<dynamic>.from(unmortgaged.map((x) => x)),
326+ "unobstructed": List<dynamic>.from(unobstructed.map((x) => x)),
327+ "unreceptivity": List<dynamic>.from(unreceptivity.map((x) => x)),
328+ "unsatisfactoriness": List<dynamic>.from(unsatisfactoriness.map((x) => x)),
329+ "unsecurity": List<dynamic>.from(unsecurity.map((x) => x)),
330+ "unstressed": List<dynamic>.from(unstressed.map((x) => x)),
331+ "untasked": List<dynamic>.from(untasked.map((x) => x)),
332+ "unvarying": List<dynamic>.from(unvarying.map((x) => x)),
333+ "vehemently": List<dynamic>.from(vehemently.map((x) => x)),
334+ "warriorship": Map.from(warriorship).map((k, v) => MapEntry<String, dynamic>(k, v)),
335+ "whitepot": List<dynamic>.from(whitepot.map((x) => x)),
336+ "wrothy": List<dynamic>.from(wrothy.map((x) => x)),
337+ };
338+}
339+
340+class PulpitismClass {
341+ final dynamic abnet;
342+ final dynamic buckhorn;
343+ final dynamic calciform;
344+ final dynamic chelophore;
345+ final dynamic cogitation;
346+ final dynamic decreeable;
347+ final dynamic despicable;
348+ final dynamic isodiazo;
349+ final dynamic jadedly;
350+ final dynamic leptochlorite;
351+ final dynamic nursling;
352+ final dynamic palamedean;
353+ final dynamic photoheliograph;
354+ final dynamic pipewood;
355+ final dynamic roberd;
356+ final dynamic statable;
357+ final dynamic superassume;
358+ final dynamic syllabe;
359+ final dynamic toughhead;
360+ final dynamic underburn;
361+
362+ PulpitismClass({
363+ required this.abnet,
364+ required this.buckhorn,
365+ required this.calciform,
366+ required this.chelophore,
367+ required this.cogitation,
368+ required this.decreeable,
369+ required this.despicable,
370+ required this.isodiazo,
371+ required this.jadedly,
372+ required this.leptochlorite,
373+ required this.nursling,
374+ required this.palamedean,
375+ required this.photoheliograph,
376+ required this.pipewood,
377+ required this.roberd,
378+ required this.statable,
379+ required this.superassume,
380+ required this.syllabe,
381+ required this.toughhead,
382+ required this.underburn,
383+ });
384+
385+ PulpitismClass copyWith({
386+ dynamic abnet,
387+ dynamic buckhorn,
388+ dynamic calciform,
389+ dynamic chelophore,
390+ dynamic cogitation,
391+ dynamic decreeable,
392+ dynamic despicable,
393+ dynamic isodiazo,
394+ dynamic jadedly,
395+ dynamic leptochlorite,
396+ dynamic nursling,
397+ dynamic palamedean,
398+ dynamic photoheliograph,
399+ dynamic pipewood,
400+ dynamic roberd,
401+ dynamic statable,
402+ dynamic superassume,
403+ dynamic syllabe,
404+ dynamic toughhead,
405+ dynamic underburn,
406+ }) =>
407+ PulpitismClass(
408+ abnet: abnet ?? this.abnet,
409+ buckhorn: buckhorn ?? this.buckhorn,
410+ calciform: calciform ?? this.calciform,
411+ chelophore: chelophore ?? this.chelophore,
412+ cogitation: cogitation ?? this.cogitation,
413+ decreeable: decreeable ?? this.decreeable,
414+ despicable: despicable ?? this.despicable,
415+ isodiazo: isodiazo ?? this.isodiazo,
416+ jadedly: jadedly ?? this.jadedly,
417+ leptochlorite: leptochlorite ?? this.leptochlorite,
418+ nursling: nursling ?? this.nursling,
419+ palamedean: palamedean ?? this.palamedean,
420+ photoheliograph: photoheliograph ?? this.photoheliograph,
421+ pipewood: pipewood ?? this.pipewood,
422+ roberd: roberd ?? this.roberd,
423+ statable: statable ?? this.statable,
424+ superassume: superassume ?? this.superassume,
425+ syllabe: syllabe ?? this.syllabe,
426+ toughhead: toughhead ?? this.toughhead,
427+ underburn: underburn ?? this.underburn,
428+ );
429+
430+ factory PulpitismClass.fromJson(Map<String, dynamic> json) => PulpitismClass(
431+ abnet: (json.containsKey("abnet") ? json["abnet"] : throw FormatException('Missing required property')),
432+ buckhorn: (json.containsKey("buckhorn") ? json["buckhorn"] : throw FormatException('Missing required property')),
433+ calciform: (json.containsKey("calciform") ? json["calciform"] : throw FormatException('Missing required property')),
434+ chelophore: (json.containsKey("chelophore") ? json["chelophore"] : throw FormatException('Missing required property')),
435+ cogitation: (json.containsKey("cogitation") ? json["cogitation"] : throw FormatException('Missing required property')),
436+ decreeable: (json.containsKey("decreeable") ? json["decreeable"] : throw FormatException('Missing required property')),
437+ despicable: (json.containsKey("despicable") ? json["despicable"] : throw FormatException('Missing required property')),
438+ isodiazo: (json.containsKey("isodiazo") ? json["isodiazo"] : throw FormatException('Missing required property')),
439+ jadedly: (json.containsKey("jadedly") ? json["jadedly"] : throw FormatException('Missing required property')),
440+ leptochlorite: (json.containsKey("leptochlorite") ? json["leptochlorite"] : throw FormatException('Missing required property')),
441+ nursling: (json.containsKey("nursling") ? json["nursling"] : throw FormatException('Missing required property')),
442+ palamedean: (json.containsKey("palamedean") ? json["palamedean"] : throw FormatException('Missing required property')),
443+ photoheliograph: (json.containsKey("photoheliograph") ? json["photoheliograph"] : throw FormatException('Missing required property')),
444+ pipewood: (json.containsKey("pipewood") ? json["pipewood"] : throw FormatException('Missing required property')),
445+ roberd: (json.containsKey("roberd") ? json["roberd"] : throw FormatException('Missing required property')),
446+ statable: (json.containsKey("statable") ? json["statable"] : throw FormatException('Missing required property')),
447+ superassume: (json.containsKey("superassume") ? json["superassume"] : throw FormatException('Missing required property')),
448+ syllabe: (json.containsKey("syllabe") ? json["syllabe"] : throw FormatException('Missing required property')),
449+ toughhead: (json.containsKey("toughhead") ? json["toughhead"] : throw FormatException('Missing required property')),
450+ underburn: (json.containsKey("underburn") ? json["underburn"] : throw FormatException('Missing required property')),
451+ );
452+
453+ Map<String, dynamic> toJson() => {
454+ "abnet": abnet,
455+ "buckhorn": buckhorn,
456+ "calciform": calciform,
457+ "chelophore": chelophore,
458+ "cogitation": cogitation,
459+ "decreeable": decreeable,
460+ "despicable": despicable,
461+ "isodiazo": isodiazo,
462+ "jadedly": jadedly,
463+ "leptochlorite": leptochlorite,
464+ "nursling": nursling,
465+ "palamedean": palamedean,
466+ "photoheliograph": photoheliograph,
467+ "pipewood": pipewood,
468+ "roberd": roberd,
469+ "statable": statable,
470+ "superassume": superassume,
471+ "syllabe": syllabe,
472+ "toughhead": toughhead,
473+ "underburn": underburn,
474+ };
475+}
476+
477+class PyodermiaClass {
478+ final dynamic aphoristically;
479+ final dynamic apophyllous;
480+ final dynamic cognize;
481+ final dynamic dermonosology;
482+ final dynamic gyppo;
483+ final dynamic ither;
484+ final dynamic juglandaceous;
485+ final dynamic litho;
486+ final dynamic macropterous;
487+ final dynamic photographer;
488+ final dynamic romancing;
489+ final dynamic rumness;
490+ final dynamic somniloquist;
491+ final dynamic stressfully;
492+ final dynamic tactically;
493+ final dynamic tracheophony;
494+ final dynamic unappositely;
495+ final dynamic unclothedly;
496+ final dynamic unimplied;
497+ final dynamic unsyncopated;
498+
499+ PyodermiaClass({
500+ required this.aphoristically,
501+ required this.apophyllous,
502+ required this.cognize,
503+ required this.dermonosology,
504+ required this.gyppo,
505+ required this.ither,
506+ required this.juglandaceous,
507+ required this.litho,
508+ required this.macropterous,
509+ required this.photographer,
510+ required this.romancing,
511+ required this.rumness,
512+ required this.somniloquist,
513+ required this.stressfully,
514+ required this.tactically,
515+ required this.tracheophony,
516+ required this.unappositely,
517+ required this.unclothedly,
518+ required this.unimplied,
519+ required this.unsyncopated,
520+ });
521+
522+ PyodermiaClass copyWith({
523+ dynamic aphoristically,
524+ dynamic apophyllous,
525+ dynamic cognize,
526+ dynamic dermonosology,
527+ dynamic gyppo,
528+ dynamic ither,
529+ dynamic juglandaceous,
530+ dynamic litho,
531+ dynamic macropterous,
532+ dynamic photographer,
533+ dynamic romancing,
534+ dynamic rumness,
535+ dynamic somniloquist,
536+ dynamic stressfully,
537+ dynamic tactically,
538+ dynamic tracheophony,
539+ dynamic unappositely,
540+ dynamic unclothedly,
541+ dynamic unimplied,
542+ dynamic unsyncopated,
543+ }) =>
544+ PyodermiaClass(
545+ aphoristically: aphoristically ?? this.aphoristically,
546+ apophyllous: apophyllous ?? this.apophyllous,
547+ cognize: cognize ?? this.cognize,
548+ dermonosology: dermonosology ?? this.dermonosology,
549+ gyppo: gyppo ?? this.gyppo,
550+ ither: ither ?? this.ither,
551+ juglandaceous: juglandaceous ?? this.juglandaceous,
552+ litho: litho ?? this.litho,
553+ macropterous: macropterous ?? this.macropterous,
554+ photographer: photographer ?? this.photographer,
555+ romancing: romancing ?? this.romancing,
556+ rumness: rumness ?? this.rumness,
557+ somniloquist: somniloquist ?? this.somniloquist,
558+ stressfully: stressfully ?? this.stressfully,
559+ tactically: tactically ?? this.tactically,
560+ tracheophony: tracheophony ?? this.tracheophony,
561+ unappositely: unappositely ?? this.unappositely,
562+ unclothedly: unclothedly ?? this.unclothedly,
563+ unimplied: unimplied ?? this.unimplied,
564+ unsyncopated: unsyncopated ?? this.unsyncopated,
565+ );
566+
567+ factory PyodermiaClass.fromJson(Map<String, dynamic> json) => PyodermiaClass(
568+ aphoristically: (json.containsKey("aphoristically") ? json["aphoristically"] : throw FormatException('Missing required property')),
569+ apophyllous: (json.containsKey("apophyllous") ? json["apophyllous"] : throw FormatException('Missing required property')),
570+ cognize: (json.containsKey("cognize") ? json["cognize"] : throw FormatException('Missing required property')),
571+ dermonosology: (json.containsKey("dermonosology") ? json["dermonosology"] : throw FormatException('Missing required property')),
572+ gyppo: (json.containsKey("Gyppo") ? json["Gyppo"] : throw FormatException('Missing required property')),
573+ ither: (json.containsKey("ither") ? json["ither"] : throw FormatException('Missing required property')),
574+ juglandaceous: (json.containsKey("juglandaceous") ? json["juglandaceous"] : throw FormatException('Missing required property')),
575+ litho: (json.containsKey("litho") ? json["litho"] : throw FormatException('Missing required property')),
576+ macropterous: (json.containsKey("macropterous") ? json["macropterous"] : throw FormatException('Missing required property')),
577+ photographer: (json.containsKey("photographer") ? json["photographer"] : throw FormatException('Missing required property')),
578+ romancing: (json.containsKey("romancing") ? json["romancing"] : throw FormatException('Missing required property')),
579+ rumness: (json.containsKey("rumness") ? json["rumness"] : throw FormatException('Missing required property')),
580+ somniloquist: (json.containsKey("somniloquist") ? json["somniloquist"] : throw FormatException('Missing required property')),
581+ stressfully: (json.containsKey("stressfully") ? json["stressfully"] : throw FormatException('Missing required property')),
582+ tactically: (json.containsKey("tactically") ? json["tactically"] : throw FormatException('Missing required property')),
583+ tracheophony: (json.containsKey("tracheophony") ? json["tracheophony"] : throw FormatException('Missing required property')),
584+ unappositely: (json.containsKey("unappositely") ? json["unappositely"] : throw FormatException('Missing required property')),
585+ unclothedly: (json.containsKey("unclothedly") ? json["unclothedly"] : throw FormatException('Missing required property')),
586+ unimplied: (json.containsKey("unimplied") ? json["unimplied"] : throw FormatException('Missing required property')),
587+ unsyncopated: (json.containsKey("unsyncopated") ? json["unsyncopated"] : throw FormatException('Missing required property')),
588+ );
589+
590+ Map<String, dynamic> toJson() => {
591+ "aphoristically": aphoristically,
592+ "apophyllous": apophyllous,
593+ "cognize": cognize,
594+ "dermonosology": dermonosology,
595+ "Gyppo": gyppo,
596+ "ither": ither,
597+ "juglandaceous": juglandaceous,
598+ "litho": litho,
599+ "macropterous": macropterous,
600+ "photographer": photographer,
601+ "romancing": romancing,
602+ "rumness": rumness,
603+ "somniloquist": somniloquist,
604+ "stressfully": stressfully,
605+ "tactically": tactically,
606+ "tracheophony": tracheophony,
607+ "unappositely": unappositely,
608+ "unclothedly": unclothedly,
609+ "unimplied": unimplied,
610+ "unsyncopated": unsyncopated,
611+ };
612+}
613+
614+class QuebrachineClass {
615+ final double catharticalness;
616+ final int chirotherium;
617+ final String disdiapason;
618+ final bool homocerc;
619+ final dynamic nonbookish;
620+
621+ QuebrachineClass({
622+ required this.catharticalness,
623+ required this.chirotherium,
624+ required this.disdiapason,
625+ required this.homocerc,
626+ required this.nonbookish,
627+ });
628+
629+ QuebrachineClass copyWith({
630+ double? catharticalness,
631+ int? chirotherium,
632+ String? disdiapason,
633+ bool? homocerc,
634+ dynamic nonbookish,
635+ }) =>
636+ QuebrachineClass(
637+ catharticalness: catharticalness ?? this.catharticalness,
638+ chirotherium: chirotherium ?? this.chirotherium,
639+ disdiapason: disdiapason ?? this.disdiapason,
640+ homocerc: homocerc ?? this.homocerc,
641+ nonbookish: nonbookish ?? this.nonbookish,
642+ );
643+
644+ factory QuebrachineClass.fromJson(Map<String, dynamic> json) => QuebrachineClass(
645+ catharticalness: json["catharticalness"]?.toDouble(),
646+ chirotherium: json["Chirotherium"],
647+ disdiapason: json["disdiapason"],
648+ homocerc: json["homocerc"],
649+ nonbookish: (json.containsKey("nonbookish") ? json["nonbookish"] : throw FormatException('Missing required property')),
650+ );
651+
652+ Map<String, dynamic> toJson() => {
653+ "catharticalness": catharticalness,
654+ "Chirotherium": chirotherium,
655+ "disdiapason": disdiapason,
656+ "homocerc": homocerc,
657+ "nonbookish": nonbookish,
658+ };
659+}
660+
661+class Reimagine {
662+ final dynamic adducible;
663+ final dynamic anabolin;
664+ final dynamic brainy;
665+ final double? catharticalness;
666+ final int? chirotherium;
667+ final dynamic chrysamine;
668+ final String? disdiapason;
669+ final dynamic fluxweed;
670+ final dynamic glaucine;
671+ final dynamic grobianism;
672+ final dynamic hermo;
673+ final dynamic hieroglyphist;
674+ final bool? homocerc;
675+ final dynamic icteroid;
676+ final dynamic immortal;
677+ final dynamic impetulant;
678+ final dynamic irrigate;
679+ final dynamic myxedema;
680+ final dynamic nonbookish;
681+ final dynamic onyx;
682+ final dynamic repasser;
683+ final dynamic septomarginal;
684+ final dynamic subdie;
685+ final dynamic tibiometatarsal;
686+ final dynamic waltzlike;
687+
688+ Reimagine({
689+ this.adducible,
690+ this.anabolin,
691+ this.brainy,
692+ this.catharticalness,
693+ this.chirotherium,
694+ this.chrysamine,
695+ this.disdiapason,
696+ this.fluxweed,
697+ this.glaucine,
698+ this.grobianism,
699+ this.hermo,
700+ this.hieroglyphist,
701+ this.homocerc,
702+ this.icteroid,
703+ this.immortal,
704+ this.impetulant,
705+ this.irrigate,
706+ this.myxedema,
707+ this.nonbookish,
708+ this.onyx,
709+ this.repasser,
710+ this.septomarginal,
711+ this.subdie,
712+ this.tibiometatarsal,
713+ this.waltzlike,
714+ });
715+
716+ Reimagine copyWith({
717+ dynamic adducible,
718+ dynamic anabolin,
719+ dynamic brainy,
720+ double? catharticalness,
721+ int? chirotherium,
722+ dynamic chrysamine,
723+ String? disdiapason,
724+ dynamic fluxweed,
725+ dynamic glaucine,
726+ dynamic grobianism,
727+ dynamic hermo,
728+ dynamic hieroglyphist,
729+ bool? homocerc,
730+ dynamic icteroid,
731+ dynamic immortal,
732+ dynamic impetulant,
733+ dynamic irrigate,
734+ dynamic myxedema,
735+ dynamic nonbookish,
736+ dynamic onyx,
737+ dynamic repasser,
738+ dynamic septomarginal,
739+ dynamic subdie,
740+ dynamic tibiometatarsal,
741+ dynamic waltzlike,
742+ }) =>
743+ Reimagine(
744+ adducible: adducible ?? this.adducible,
745+ anabolin: anabolin ?? this.anabolin,
746+ brainy: brainy ?? this.brainy,
747+ catharticalness: catharticalness ?? this.catharticalness,
748+ chirotherium: chirotherium ?? this.chirotherium,
749+ chrysamine: chrysamine ?? this.chrysamine,
750+ disdiapason: disdiapason ?? this.disdiapason,
751+ fluxweed: fluxweed ?? this.fluxweed,
752+ glaucine: glaucine ?? this.glaucine,
753+ grobianism: grobianism ?? this.grobianism,
754+ hermo: hermo ?? this.hermo,
755+ hieroglyphist: hieroglyphist ?? this.hieroglyphist,
756+ homocerc: homocerc ?? this.homocerc,
757+ icteroid: icteroid ?? this.icteroid,
758+ immortal: immortal ?? this.immortal,
759+ impetulant: impetulant ?? this.impetulant,
760+ irrigate: irrigate ?? this.irrigate,
761+ myxedema: myxedema ?? this.myxedema,
762+ nonbookish: nonbookish ?? this.nonbookish,
763+ onyx: onyx ?? this.onyx,
764+ repasser: repasser ?? this.repasser,
765+ septomarginal: septomarginal ?? this.septomarginal,
766+ subdie: subdie ?? this.subdie,
767+ tibiometatarsal: tibiometatarsal ?? this.tibiometatarsal,
768+ waltzlike: waltzlike ?? this.waltzlike,
769+ );
770+
771+ factory Reimagine.fromJson(Map<String, dynamic> json) => Reimagine(
772+ adducible: json["adducible"],
773+ anabolin: json["anabolin"],
774+ brainy: json["brainy"],
775+ catharticalness: json["catharticalness"]?.toDouble(),
776+ chirotherium: json["Chirotherium"],
777+ chrysamine: json["chrysamine"],
778+ disdiapason: json["disdiapason"],
779+ fluxweed: json["fluxweed"],
780+ glaucine: json["glaucine"],
781+ grobianism: json["grobianism"],
782+ hermo: json["Hermo"],
783+ hieroglyphist: json["hieroglyphist"],
784+ homocerc: json["homocerc"],
785+ icteroid: json["icteroid"],
786+ immortal: json["immortal"],
787+ impetulant: json["impetulant"],
788+ irrigate: json["irrigate"],
789+ myxedema: json["myxedema"],
790+ nonbookish: json["nonbookish"],
791+ onyx: json["onyx"],
792+ repasser: json["repasser"],
793+ septomarginal: json["septomarginal"],
794+ subdie: json["subdie"],
795+ tibiometatarsal: json["tibiometatarsal"],
796+ waltzlike: json["waltzlike"],
797+ );
798+
799+ Map<String, dynamic> toJson() => {
800+ "adducible": adducible,
801+ "anabolin": anabolin,
802+ "brainy": brainy,
803+ "catharticalness": catharticalness,
804+ "Chirotherium": chirotherium,
805+ "chrysamine": chrysamine,
806+ "disdiapason": disdiapason,
807+ "fluxweed": fluxweed,
808+ "glaucine": glaucine,
809+ "grobianism": grobianism,
810+ "Hermo": hermo,
811+ "hieroglyphist": hieroglyphist,
812+ "homocerc": homocerc,
813+ "icteroid": icteroid,
814+ "immortal": immortal,
815+ "impetulant": impetulant,
816+ "irrigate": irrigate,
817+ "myxedema": myxedema,
818+ "nonbookish": nonbookish,
819+ "onyx": onyx,
820+ "repasser": repasser,
821+ "septomarginal": septomarginal,
822+ "subdie": subdie,
823+ "tibiometatarsal": tibiometatarsal,
824+ "waltzlike": waltzlike,
825+ };
826+}
827+
828+class Ressaut {
829+ final String apperceptive;
830+ final String cuttoo;
831+ final String douser;
832+ final String drinkproof;
833+ final String forementioned;
834+ final String freesia;
835+ final String genevieve;
836+ final String hyperdiabolical;
837+ final String hypocone;
838+ final String irreverentially;
839+ final String jumart;
840+ final String mimosaceae;
841+ final String mollicrush;
842+ final String nedder;
843+ final String retinasphalt;
844+ final String sough;
845+ final String steading;
846+ final String theopaschitism;
847+ final String undurableness;
848+ final String unmingleable;
849+
850+ Ressaut({
851+ required this.apperceptive,
852+ required this.cuttoo,
853+ required this.douser,
854+ required this.drinkproof,
855+ required this.forementioned,
856+ required this.freesia,
857+ required this.genevieve,
858+ required this.hyperdiabolical,
859+ required this.hypocone,
860+ required this.irreverentially,
861+ required this.jumart,
862+ required this.mimosaceae,
863+ required this.mollicrush,
864+ required this.nedder,
865+ required this.retinasphalt,
866+ required this.sough,
867+ required this.steading,
868+ required this.theopaschitism,
869+ required this.undurableness,
870+ required this.unmingleable,
871+ });
872+
873+ Ressaut copyWith({
874+ String? apperceptive,
875+ String? cuttoo,
876+ String? douser,
877+ String? drinkproof,
878+ String? forementioned,
879+ String? freesia,
880+ String? genevieve,
881+ String? hyperdiabolical,
882+ String? hypocone,
883+ String? irreverentially,
884+ String? jumart,
885+ String? mimosaceae,
886+ String? mollicrush,
887+ String? nedder,
888+ String? retinasphalt,
889+ String? sough,
890+ String? steading,
891+ String? theopaschitism,
892+ String? undurableness,
893+ String? unmingleable,
894+ }) =>
895+ Ressaut(
896+ apperceptive: apperceptive ?? this.apperceptive,
897+ cuttoo: cuttoo ?? this.cuttoo,
898+ douser: douser ?? this.douser,
899+ drinkproof: drinkproof ?? this.drinkproof,
900+ forementioned: forementioned ?? this.forementioned,
901+ freesia: freesia ?? this.freesia,
902+ genevieve: genevieve ?? this.genevieve,
903+ hyperdiabolical: hyperdiabolical ?? this.hyperdiabolical,
904+ hypocone: hypocone ?? this.hypocone,
905+ irreverentially: irreverentially ?? this.irreverentially,
906+ jumart: jumart ?? this.jumart,
907+ mimosaceae: mimosaceae ?? this.mimosaceae,
908+ mollicrush: mollicrush ?? this.mollicrush,
909+ nedder: nedder ?? this.nedder,
910+ retinasphalt: retinasphalt ?? this.retinasphalt,
911+ sough: sough ?? this.sough,
912+ steading: steading ?? this.steading,
913+ theopaschitism: theopaschitism ?? this.theopaschitism,
914+ undurableness: undurableness ?? this.undurableness,
915+ unmingleable: unmingleable ?? this.unmingleable,
916+ );
917+
918+ factory Ressaut.fromJson(Map<String, dynamic> json) => Ressaut(
919+ apperceptive: json["apperceptive"],
920+ cuttoo: json["cuttoo"],
921+ douser: json["douser"],
922+ drinkproof: json["drinkproof"],
923+ forementioned: json["forementioned"],
924+ freesia: json["Freesia"],
925+ genevieve: json["Genevieve"],
926+ hyperdiabolical: json["hyperdiabolical"],
927+ hypocone: json["hypocone"],
928+ irreverentially: json["irreverentially"],
929+ jumart: json["jumart"],
930+ mimosaceae: json["Mimosaceae"],
931+ mollicrush: json["mollicrush"],
932+ nedder: json["nedder"],
933+ retinasphalt: json["retinasphalt"],
934+ sough: json["sough"],
935+ steading: json["steading"],
936+ theopaschitism: json["Theopaschitism"],
937+ undurableness: json["undurableness"],
938+ unmingleable: json["unmingleable"],
939+ );
940+
941+ Map<String, dynamic> toJson() => {
942+ "apperceptive": apperceptive,
943+ "cuttoo": cuttoo,
944+ "douser": douser,
945+ "drinkproof": drinkproof,
946+ "forementioned": forementioned,
947+ "Freesia": freesia,
948+ "Genevieve": genevieve,
949+ "hyperdiabolical": hyperdiabolical,
950+ "hypocone": hypocone,
951+ "irreverentially": irreverentially,
952+ "jumart": jumart,
953+ "Mimosaceae": mimosaceae,
954+ "mollicrush": mollicrush,
955+ "nedder": nedder,
956+ "retinasphalt": retinasphalt,
957+ "sough": sough,
958+ "steading": steading,
959+ "Theopaschitism": theopaschitism,
960+ "undurableness": undurableness,
961+ "unmingleable": unmingleable,
962+ };
963+}
964+
965+class RewriteClass {
966+ final dynamic accountancy;
967+ final dynamic cacotrophic;
968+ final dynamic contest;
969+ final dynamic couthily;
970+ final dynamic falculate;
971+ final dynamic foreseize;
972+ final dynamic hyades;
973+ final dynamic lemnad;
974+ final dynamic monotheistically;
975+ final dynamic nonflying;
976+ final dynamic ptenoglossa;
977+ final dynamic repatch;
978+ final dynamic rodman;
979+ final dynamic strung;
980+ final dynamic titmal;
981+ final dynamic twalpennyworth;
982+ final dynamic unblamable;
983+ final dynamic vertical;
984+ final dynamic whiggification;
985+ final dynamic yardman;
986+
987+ RewriteClass({
988+ required this.accountancy,
989+ required this.cacotrophic,
990+ required this.contest,
991+ required this.couthily,
992+ required this.falculate,
993+ required this.foreseize,
994+ required this.hyades,
995+ required this.lemnad,
996+ required this.monotheistically,
997+ required this.nonflying,
998+ required this.ptenoglossa,
999+ required this.repatch,
1000+ required this.rodman,
1001+ required this.strung,
1002+ required this.titmal,
1003+ required this.twalpennyworth,
1004+ required this.unblamable,
1005+ required this.vertical,
1006+ required this.whiggification,
1007+ required this.yardman,
1008+ });
1009+
1010+ RewriteClass copyWith({
1011+ dynamic accountancy,
1012+ dynamic cacotrophic,
1013+ dynamic contest,
1014+ dynamic couthily,
1015+ dynamic falculate,
1016+ dynamic foreseize,
1017+ dynamic hyades,
1018+ dynamic lemnad,
1019+ dynamic monotheistically,
1020+ dynamic nonflying,
1021+ dynamic ptenoglossa,
1022+ dynamic repatch,
1023+ dynamic rodman,
1024+ dynamic strung,
1025+ dynamic titmal,
1026+ dynamic twalpennyworth,
1027+ dynamic unblamable,
1028+ dynamic vertical,
1029+ dynamic whiggification,
1030+ dynamic yardman,
1031+ }) =>
1032+ RewriteClass(
1033+ accountancy: accountancy ?? this.accountancy,
1034+ cacotrophic: cacotrophic ?? this.cacotrophic,
1035+ contest: contest ?? this.contest,
1036+ couthily: couthily ?? this.couthily,
1037+ falculate: falculate ?? this.falculate,
1038+ foreseize: foreseize ?? this.foreseize,
1039+ hyades: hyades ?? this.hyades,
1040+ lemnad: lemnad ?? this.lemnad,
1041+ monotheistically: monotheistically ?? this.monotheistically,
1042+ nonflying: nonflying ?? this.nonflying,
1043+ ptenoglossa: ptenoglossa ?? this.ptenoglossa,
1044+ repatch: repatch ?? this.repatch,
1045+ rodman: rodman ?? this.rodman,
1046+ strung: strung ?? this.strung,
1047+ titmal: titmal ?? this.titmal,
1048+ twalpennyworth: twalpennyworth ?? this.twalpennyworth,
1049+ unblamable: unblamable ?? this.unblamable,
1050+ vertical: vertical ?? this.vertical,
1051+ whiggification: whiggification ?? this.whiggification,
1052+ yardman: yardman ?? this.yardman,
1053+ );
1054+
1055+ factory RewriteClass.fromJson(Map<String, dynamic> json) => RewriteClass(
1056+ accountancy: (json.containsKey("accountancy") ? json["accountancy"] : throw FormatException('Missing required property')),
1057+ cacotrophic: (json.containsKey("cacotrophic") ? json["cacotrophic"] : throw FormatException('Missing required property')),
1058+ contest: (json.containsKey("contest") ? json["contest"] : throw FormatException('Missing required property')),
1059+ couthily: (json.containsKey("couthily") ? json["couthily"] : throw FormatException('Missing required property')),
1060+ falculate: (json.containsKey("falculate") ? json["falculate"] : throw FormatException('Missing required property')),
1061+ foreseize: (json.containsKey("foreseize") ? json["foreseize"] : throw FormatException('Missing required property')),
1062+ hyades: (json.containsKey("Hyades") ? json["Hyades"] : throw FormatException('Missing required property')),
1063+ lemnad: (json.containsKey("lemnad") ? json["lemnad"] : throw FormatException('Missing required property')),
1064+ monotheistically: (json.containsKey("monotheistically") ? json["monotheistically"] : throw FormatException('Missing required property')),
1065+ nonflying: (json.containsKey("nonflying") ? json["nonflying"] : throw FormatException('Missing required property')),
1066+ ptenoglossa: (json.containsKey("Ptenoglossa") ? json["Ptenoglossa"] : throw FormatException('Missing required property')),
1067+ repatch: (json.containsKey("repatch") ? json["repatch"] : throw FormatException('Missing required property')),
1068+ rodman: (json.containsKey("rodman") ? json["rodman"] : throw FormatException('Missing required property')),
1069+ strung: (json.containsKey("strung") ? json["strung"] : throw FormatException('Missing required property')),
1070+ titmal: (json.containsKey("titmal") ? json["titmal"] : throw FormatException('Missing required property')),
1071+ twalpennyworth: (json.containsKey("twalpennyworth") ? json["twalpennyworth"] : throw FormatException('Missing required property')),
1072+ unblamable: (json.containsKey("unblamable") ? json["unblamable"] : throw FormatException('Missing required property')),
1073+ vertical: (json.containsKey("vertical") ? json["vertical"] : throw FormatException('Missing required property')),
1074+ whiggification: (json.containsKey("Whiggification") ? json["Whiggification"] : throw FormatException('Missing required property')),
1075+ yardman: (json.containsKey("yardman") ? json["yardman"] : throw FormatException('Missing required property')),
1076+ );
1077+
1078+ Map<String, dynamic> toJson() => {
1079+ "accountancy": accountancy,
1080+ "cacotrophic": cacotrophic,
1081+ "contest": contest,
1082+ "couthily": couthily,
1083+ "falculate": falculate,
1084+ "foreseize": foreseize,
1085+ "Hyades": hyades,
1086+ "lemnad": lemnad,
1087+ "monotheistically": monotheistically,
1088+ "nonflying": nonflying,
1089+ "Ptenoglossa": ptenoglossa,
1090+ "repatch": repatch,
1091+ "rodman": rodman,
1092+ "strung": strung,
1093+ "titmal": titmal,
1094+ "twalpennyworth": twalpennyworth,
1095+ "unblamable": unblamable,
1096+ "vertical": vertical,
1097+ "Whiggification": whiggification,
1098+ "yardman": yardman,
1099+ };
1100+}
1101+
1102+class SantirClass {
1103+ final dynamic admiredly;
1104+ final dynamic demicaponier;
1105+ final dynamic epitympanic;
1106+ final dynamic investitor;
1107+ final dynamic lupiform;
1108+ final dynamic monoflagellate;
1109+ final dynamic paleoethnic;
1110+ final dynamic prediscountable;
1111+ final dynamic rhetoricals;
1112+ final dynamic roomth;
1113+ final dynamic saccharose;
1114+ final dynamic septonasal;
1115+ final dynamic serpenticide;
1116+ final dynamic setarious;
1117+ final dynamic spaework;
1118+ final dynamic stylite;
1119+ final dynamic suessiones;
1120+ final dynamic timelily;
1121+ final dynamic unprofaned;
1122+ final dynamic vorticular;
1123+
1124+ SantirClass({
1125+ required this.admiredly,
1126+ required this.demicaponier,
1127+ required this.epitympanic,
1128+ required this.investitor,
1129+ required this.lupiform,
1130+ required this.monoflagellate,
1131+ required this.paleoethnic,
1132+ required this.prediscountable,
1133+ required this.rhetoricals,
1134+ required this.roomth,
1135+ required this.saccharose,
1136+ required this.septonasal,
1137+ required this.serpenticide,
1138+ required this.setarious,
1139+ required this.spaework,
1140+ required this.stylite,
1141+ required this.suessiones,
1142+ required this.timelily,
1143+ required this.unprofaned,
1144+ required this.vorticular,
1145+ });
1146+
1147+ SantirClass copyWith({
1148+ dynamic admiredly,
1149+ dynamic demicaponier,
1150+ dynamic epitympanic,
1151+ dynamic investitor,
1152+ dynamic lupiform,
1153+ dynamic monoflagellate,
1154+ dynamic paleoethnic,
1155+ dynamic prediscountable,
1156+ dynamic rhetoricals,
1157+ dynamic roomth,
1158+ dynamic saccharose,
1159+ dynamic septonasal,
1160+ dynamic serpenticide,
1161+ dynamic setarious,
1162+ dynamic spaework,
1163+ dynamic stylite,
1164+ dynamic suessiones,
1165+ dynamic timelily,
1166+ dynamic unprofaned,
1167+ dynamic vorticular,
1168+ }) =>
1169+ SantirClass(
1170+ admiredly: admiredly ?? this.admiredly,
1171+ demicaponier: demicaponier ?? this.demicaponier,
1172+ epitympanic: epitympanic ?? this.epitympanic,
1173+ investitor: investitor ?? this.investitor,
1174+ lupiform: lupiform ?? this.lupiform,
1175+ monoflagellate: monoflagellate ?? this.monoflagellate,
1176+ paleoethnic: paleoethnic ?? this.paleoethnic,
1177+ prediscountable: prediscountable ?? this.prediscountable,
1178+ rhetoricals: rhetoricals ?? this.rhetoricals,
1179+ roomth: roomth ?? this.roomth,
1180+ saccharose: saccharose ?? this.saccharose,
1181+ septonasal: septonasal ?? this.septonasal,
1182+ serpenticide: serpenticide ?? this.serpenticide,
1183+ setarious: setarious ?? this.setarious,
1184+ spaework: spaework ?? this.spaework,
1185+ stylite: stylite ?? this.stylite,
1186+ suessiones: suessiones ?? this.suessiones,
1187+ timelily: timelily ?? this.timelily,
1188+ unprofaned: unprofaned ?? this.unprofaned,
1189+ vorticular: vorticular ?? this.vorticular,
1190+ );
1191+
1192+ factory SantirClass.fromJson(Map<String, dynamic> json) => SantirClass(
1193+ admiredly: (json.containsKey("admiredly") ? json["admiredly"] : throw FormatException('Missing required property')),
1194+ demicaponier: (json.containsKey("demicaponier") ? json["demicaponier"] : throw FormatException('Missing required property')),
1195+ epitympanic: (json.containsKey("epitympanic") ? json["epitympanic"] : throw FormatException('Missing required property')),
1196+ investitor: (json.containsKey("investitor") ? json["investitor"] : throw FormatException('Missing required property')),
1197+ lupiform: (json.containsKey("lupiform") ? json["lupiform"] : throw FormatException('Missing required property')),
1198+ monoflagellate: (json.containsKey("monoflagellate") ? json["monoflagellate"] : throw FormatException('Missing required property')),
1199+ paleoethnic: (json.containsKey("paleoethnic") ? json["paleoethnic"] : throw FormatException('Missing required property')),
1200+ prediscountable: (json.containsKey("prediscountable") ? json["prediscountable"] : throw FormatException('Missing required property')),
1201+ rhetoricals: (json.containsKey("rhetoricals") ? json["rhetoricals"] : throw FormatException('Missing required property')),
1202+ roomth: (json.containsKey("roomth") ? json["roomth"] : throw FormatException('Missing required property')),
1203+ saccharose: (json.containsKey("saccharose") ? json["saccharose"] : throw FormatException('Missing required property')),
1204+ septonasal: (json.containsKey("septonasal") ? json["septonasal"] : throw FormatException('Missing required property')),
1205+ serpenticide: (json.containsKey("serpenticide") ? json["serpenticide"] : throw FormatException('Missing required property')),
1206+ setarious: (json.containsKey("setarious") ? json["setarious"] : throw FormatException('Missing required property')),
1207+ spaework: (json.containsKey("spaework") ? json["spaework"] : throw FormatException('Missing required property')),
1208+ stylite: (json.containsKey("stylite") ? json["stylite"] : throw FormatException('Missing required property')),
1209+ suessiones: (json.containsKey("Suessiones") ? json["Suessiones"] : throw FormatException('Missing required property')),
1210+ timelily: (json.containsKey("timelily") ? json["timelily"] : throw FormatException('Missing required property')),
1211+ unprofaned: (json.containsKey("unprofaned") ? json["unprofaned"] : throw FormatException('Missing required property')),
1212+ vorticular: (json.containsKey("vorticular") ? json["vorticular"] : throw FormatException('Missing required property')),
1213+ );
1214+
1215+ Map<String, dynamic> toJson() => {
1216+ "admiredly": admiredly,
1217+ "demicaponier": demicaponier,
1218+ "epitympanic": epitympanic,
1219+ "investitor": investitor,
1220+ "lupiform": lupiform,
1221+ "monoflagellate": monoflagellate,
1222+ "paleoethnic": paleoethnic,
1223+ "prediscountable": prediscountable,
1224+ "rhetoricals": rhetoricals,
1225+ "roomth": roomth,
1226+ "saccharose": saccharose,
1227+ "septonasal": septonasal,
1228+ "serpenticide": serpenticide,
1229+ "setarious": setarious,
1230+ "spaework": spaework,
1231+ "stylite": stylite,
1232+ "Suessiones": suessiones,
1233+ "timelily": timelily,
1234+ "unprofaned": unprofaned,
1235+ "vorticular": vorticular,
1236+ };
1237+}
1238+
1239+class SaxtenClass {
1240+ final dynamic algarrobilla;
1241+ final dynamic bowgrace;
1242+ final double? catharticalness;
1243+ final dynamic centaurid;
1244+ final int? chirotherium;
1245+ final String? disdiapason;
1246+ final dynamic flix;
1247+ final dynamic germanely;
1248+ final bool? homocerc;
1249+ final dynamic inhume;
1250+ final dynamic lepidote;
1251+ final dynamic megalochirous;
1252+ final dynamic ninepenny;
1253+ final dynamic nonbookish;
1254+ final dynamic nondeist;
1255+ final dynamic nymphaeaceous;
1256+ final dynamic parietofrontal;
1257+ final dynamic sancyite;
1258+ final dynamic subjectivist;
1259+ final dynamic tibiad;
1260+ final dynamic transonic;
1261+ final dynamic tripetalous;
1262+ final dynamic trunchman;
1263+ final dynamic urger;
1264+ final dynamic withdrawnness;
1265+
1266+ SaxtenClass({
1267+ this.algarrobilla,
1268+ this.bowgrace,
1269+ this.catharticalness,
1270+ this.centaurid,
1271+ this.chirotherium,
1272+ this.disdiapason,
1273+ this.flix,
1274+ this.germanely,
1275+ this.homocerc,
1276+ this.inhume,
1277+ this.lepidote,
1278+ this.megalochirous,
1279+ this.ninepenny,
1280+ this.nonbookish,
1281+ this.nondeist,
1282+ this.nymphaeaceous,
1283+ this.parietofrontal,
1284+ this.sancyite,
1285+ this.subjectivist,
1286+ this.tibiad,
1287+ this.transonic,
1288+ this.tripetalous,
1289+ this.trunchman,
1290+ this.urger,
1291+ this.withdrawnness,
1292+ });
1293+
1294+ SaxtenClass copyWith({
1295+ dynamic algarrobilla,
1296+ dynamic bowgrace,
1297+ double? catharticalness,
1298+ dynamic centaurid,
1299+ int? chirotherium,
1300+ String? disdiapason,
1301+ dynamic flix,
1302+ dynamic germanely,
1303+ bool? homocerc,
1304+ dynamic inhume,
1305+ dynamic lepidote,
1306+ dynamic megalochirous,
1307+ dynamic ninepenny,
1308+ dynamic nonbookish,
1309+ dynamic nondeist,
1310+ dynamic nymphaeaceous,
1311+ dynamic parietofrontal,
1312+ dynamic sancyite,
1313+ dynamic subjectivist,
1314+ dynamic tibiad,
1315+ dynamic transonic,
1316+ dynamic tripetalous,
1317+ dynamic trunchman,
1318+ dynamic urger,
1319+ dynamic withdrawnness,
1320+ }) =>
1321+ SaxtenClass(
1322+ algarrobilla: algarrobilla ?? this.algarrobilla,
1323+ bowgrace: bowgrace ?? this.bowgrace,
1324+ catharticalness: catharticalness ?? this.catharticalness,
1325+ centaurid: centaurid ?? this.centaurid,
1326+ chirotherium: chirotherium ?? this.chirotherium,
1327+ disdiapason: disdiapason ?? this.disdiapason,
1328+ flix: flix ?? this.flix,
1329+ germanely: germanely ?? this.germanely,
1330+ homocerc: homocerc ?? this.homocerc,
1331+ inhume: inhume ?? this.inhume,
1332+ lepidote: lepidote ?? this.lepidote,
1333+ megalochirous: megalochirous ?? this.megalochirous,
1334+ ninepenny: ninepenny ?? this.ninepenny,
1335+ nonbookish: nonbookish ?? this.nonbookish,
1336+ nondeist: nondeist ?? this.nondeist,
1337+ nymphaeaceous: nymphaeaceous ?? this.nymphaeaceous,
1338+ parietofrontal: parietofrontal ?? this.parietofrontal,
1339+ sancyite: sancyite ?? this.sancyite,
1340+ subjectivist: subjectivist ?? this.subjectivist,
1341+ tibiad: tibiad ?? this.tibiad,
1342+ transonic: transonic ?? this.transonic,
1343+ tripetalous: tripetalous ?? this.tripetalous,
1344+ trunchman: trunchman ?? this.trunchman,
1345+ urger: urger ?? this.urger,
1346+ withdrawnness: withdrawnness ?? this.withdrawnness,
1347+ );
1348+
1349+ factory SaxtenClass.fromJson(Map<String, dynamic> json) => SaxtenClass(
1350+ algarrobilla: json["algarrobilla"],
1351+ bowgrace: json["bowgrace"],
1352+ catharticalness: json["catharticalness"]?.toDouble(),
1353+ centaurid: json["Centaurid"],
1354+ chirotherium: json["Chirotherium"],
1355+ disdiapason: json["disdiapason"],
1356+ flix: json["flix"],
1357+ germanely: json["germanely"],
1358+ homocerc: json["homocerc"],
1359+ inhume: json["inhume"],
1360+ lepidote: json["lepidote"],
1361+ megalochirous: json["megalochirous"],
1362+ ninepenny: json["ninepenny"],
1363+ nonbookish: json["nonbookish"],
1364+ nondeist: json["nondeist"],
1365+ nymphaeaceous: json["nymphaeaceous"],
1366+ parietofrontal: json["parietofrontal"],
1367+ sancyite: json["sancyite"],
1368+ subjectivist: json["subjectivist"],
1369+ tibiad: json["tibiad"],
1370+ transonic: json["transonic"],
1371+ tripetalous: json["tripetalous"],
1372+ trunchman: json["trunchman"],
1373+ urger: json["urger"],
1374+ withdrawnness: json["withdrawnness"],
1375+ );
1376+
1377+ Map<String, dynamic> toJson() => {
1378+ "algarrobilla": algarrobilla,
1379+ "bowgrace": bowgrace,
1380+ "catharticalness": catharticalness,
1381+ "Centaurid": centaurid,
1382+ "Chirotherium": chirotherium,
1383+ "disdiapason": disdiapason,
1384+ "flix": flix,
1385+ "germanely": germanely,
1386+ "homocerc": homocerc,
1387+ "inhume": inhume,
1388+ "lepidote": lepidote,
1389+ "megalochirous": megalochirous,
1390+ "ninepenny": ninepenny,
1391+ "nonbookish": nonbookish,
1392+ "nondeist": nondeist,
1393+ "nymphaeaceous": nymphaeaceous,
1394+ "parietofrontal": parietofrontal,
1395+ "sancyite": sancyite,
1396+ "subjectivist": subjectivist,
1397+ "tibiad": tibiad,
1398+ "transonic": transonic,
1399+ "tripetalous": tripetalous,
1400+ "trunchman": trunchman,
1401+ "urger": urger,
1402+ "withdrawnness": withdrawnness,
1403+ };
1404+}
1405+
1406+class Scatty {
1407+ final dynamic aeriferous;
1408+ final dynamic antical;
1409+ final dynamic antighostism;
1410+ final dynamic arcanum;
1411+ final dynamic autotrophy;
1412+ final dynamic baronial;
1413+ final dynamic caffeine;
1414+ final dynamic gorgoniacean;
1415+ final dynamic heroical;
1416+ final dynamic hydropical;
1417+ final dynamic mechanology;
1418+ final dynamic musicopoetic;
1419+ final dynamic officiality;
1420+ final dynamic oftentimes;
1421+ final dynamic ophthalmotonometer;
1422+ final dynamic reflectively;
1423+ final dynamic springer;
1424+ final dynamic tabasco;
1425+ final dynamic teleianthous;
1426+ final dynamic uncombated;
1427+
1428+ Scatty({
1429+ required this.aeriferous,
1430+ required this.antical,
1431+ required this.antighostism,
1432+ required this.arcanum,
1433+ required this.autotrophy,
1434+ required this.baronial,
1435+ required this.caffeine,
1436+ required this.gorgoniacean,
1437+ required this.heroical,
1438+ required this.hydropical,
1439+ required this.mechanology,
1440+ required this.musicopoetic,
1441+ required this.officiality,
1442+ required this.oftentimes,
1443+ required this.ophthalmotonometer,
1444+ required this.reflectively,
1445+ required this.springer,
1446+ required this.tabasco,
1447+ required this.teleianthous,
1448+ required this.uncombated,
1449+ });
1450+
1451+ Scatty copyWith({
1452+ dynamic aeriferous,
1453+ dynamic antical,
1454+ dynamic antighostism,
1455+ dynamic arcanum,
1456+ dynamic autotrophy,
1457+ dynamic baronial,
1458+ dynamic caffeine,
1459+ dynamic gorgoniacean,
1460+ dynamic heroical,
1461+ dynamic hydropical,
1462+ dynamic mechanology,
1463+ dynamic musicopoetic,
1464+ dynamic officiality,
1465+ dynamic oftentimes,
1466+ dynamic ophthalmotonometer,
1467+ dynamic reflectively,
1468+ dynamic springer,
1469+ dynamic tabasco,
1470+ dynamic teleianthous,
1471+ dynamic uncombated,
1472+ }) =>
1473+ Scatty(
1474+ aeriferous: aeriferous ?? this.aeriferous,
1475+ antical: antical ?? this.antical,
1476+ antighostism: antighostism ?? this.antighostism,
1477+ arcanum: arcanum ?? this.arcanum,
1478+ autotrophy: autotrophy ?? this.autotrophy,
1479+ baronial: baronial ?? this.baronial,
1480+ caffeine: caffeine ?? this.caffeine,
1481+ gorgoniacean: gorgoniacean ?? this.gorgoniacean,
1482+ heroical: heroical ?? this.heroical,
1483+ hydropical: hydropical ?? this.hydropical,
1484+ mechanology: mechanology ?? this.mechanology,
1485+ musicopoetic: musicopoetic ?? this.musicopoetic,
1486+ officiality: officiality ?? this.officiality,
1487+ oftentimes: oftentimes ?? this.oftentimes,
1488+ ophthalmotonometer: ophthalmotonometer ?? this.ophthalmotonometer,
1489+ reflectively: reflectively ?? this.reflectively,
1490+ springer: springer ?? this.springer,
1491+ tabasco: tabasco ?? this.tabasco,
1492+ teleianthous: teleianthous ?? this.teleianthous,
1493+ uncombated: uncombated ?? this.uncombated,
1494+ );
1495+
1496+ factory Scatty.fromJson(Map<String, dynamic> json) => Scatty(
1497+ aeriferous: (json.containsKey("aeriferous") ? json["aeriferous"] : throw FormatException('Missing required property')),
1498+ antical: (json.containsKey("antical") ? json["antical"] : throw FormatException('Missing required property')),
1499+ antighostism: (json.containsKey("antighostism") ? json["antighostism"] : throw FormatException('Missing required property')),
1500+ arcanum: (json.containsKey("arcanum") ? json["arcanum"] : throw FormatException('Missing required property')),
1501+ autotrophy: (json.containsKey("autotrophy") ? json["autotrophy"] : throw FormatException('Missing required property')),
1502+ baronial: (json.containsKey("baronial") ? json["baronial"] : throw FormatException('Missing required property')),
1503+ caffeine: (json.containsKey("caffeine") ? json["caffeine"] : throw FormatException('Missing required property')),
1504+ gorgoniacean: (json.containsKey("gorgoniacean") ? json["gorgoniacean"] : throw FormatException('Missing required property')),
1505+ heroical: (json.containsKey("heroical") ? json["heroical"] : throw FormatException('Missing required property')),
1506+ hydropical: (json.containsKey("hydropical") ? json["hydropical"] : throw FormatException('Missing required property')),
1507+ mechanology: (json.containsKey("mechanology") ? json["mechanology"] : throw FormatException('Missing required property')),
1508+ musicopoetic: (json.containsKey("musicopoetic") ? json["musicopoetic"] : throw FormatException('Missing required property')),
1509+ officiality: (json.containsKey("officiality") ? json["officiality"] : throw FormatException('Missing required property')),
1510+ oftentimes: (json.containsKey("oftentimes") ? json["oftentimes"] : throw FormatException('Missing required property')),
1511+ ophthalmotonometer: (json.containsKey("ophthalmotonometer") ? json["ophthalmotonometer"] : throw FormatException('Missing required property')),
1512+ reflectively: (json.containsKey("reflectively") ? json["reflectively"] : throw FormatException('Missing required property')),
1513+ springer: (json.containsKey("springer") ? json["springer"] : throw FormatException('Missing required property')),
1514+ tabasco: (json.containsKey("Tabasco") ? json["Tabasco"] : throw FormatException('Missing required property')),
1515+ teleianthous: (json.containsKey("teleianthous") ? json["teleianthous"] : throw FormatException('Missing required property')),
1516+ uncombated: (json.containsKey("uncombated") ? json["uncombated"] : throw FormatException('Missing required property')),
1517+ );
1518+
1519+ Map<String, dynamic> toJson() => {
1520+ "aeriferous": aeriferous,
1521+ "antical": antical,
1522+ "antighostism": antighostism,
1523+ "arcanum": arcanum,
1524+ "autotrophy": autotrophy,
1525+ "baronial": baronial,
1526+ "caffeine": caffeine,
1527+ "gorgoniacean": gorgoniacean,
1528+ "heroical": heroical,
1529+ "hydropical": hydropical,
1530+ "mechanology": mechanology,
1531+ "musicopoetic": musicopoetic,
1532+ "officiality": officiality,
1533+ "oftentimes": oftentimes,
1534+ "ophthalmotonometer": ophthalmotonometer,
1535+ "reflectively": reflectively,
1536+ "springer": springer,
1537+ "Tabasco": tabasco,
1538+ "teleianthous": teleianthous,
1539+ "uncombated": uncombated,
1540+ };
1541+}
1542+
1543+class SisteringClass {
1544+ final dynamic amphicarpic;
1545+ final dynamic chianti;
1546+ final dynamic frigorific;
1547+ final dynamic haplomi;
1548+ final dynamic hyperkinesis;
1549+ final dynamic laudable;
1550+ final dynamic madwoman;
1551+ final dynamic maimedly;
1552+ final dynamic micropterygidae;
1553+ final dynamic microrhabdus;
1554+ final dynamic nondense;
1555+ final dynamic phlebemphraxis;
1556+ final dynamic redsear;
1557+ final dynamic schismatical;
1558+ final dynamic tartryl;
1559+ final dynamic unabhorred;
1560+ final dynamic undeliberateness;
1561+ final dynamic unmixable;
1562+ final dynamic untruckling;
1563+ final dynamic vineal;
1564+
1565+ SisteringClass({
1566+ required this.amphicarpic,
1567+ required this.chianti,
1568+ required this.frigorific,
1569+ required this.haplomi,
1570+ required this.hyperkinesis,
1571+ required this.laudable,
1572+ required this.madwoman,
1573+ required this.maimedly,
1574+ required this.micropterygidae,
1575+ required this.microrhabdus,
1576+ required this.nondense,
1577+ required this.phlebemphraxis,
1578+ required this.redsear,
1579+ required this.schismatical,
1580+ required this.tartryl,
1581+ required this.unabhorred,
1582+ required this.undeliberateness,
1583+ required this.unmixable,
1584+ required this.untruckling,
1585+ required this.vineal,
1586+ });
1587+
1588+ SisteringClass copyWith({
1589+ dynamic amphicarpic,
1590+ dynamic chianti,
1591+ dynamic frigorific,
1592+ dynamic haplomi,
1593+ dynamic hyperkinesis,
1594+ dynamic laudable,
1595+ dynamic madwoman,
1596+ dynamic maimedly,
1597+ dynamic micropterygidae,
1598+ dynamic microrhabdus,
1599+ dynamic nondense,
1600+ dynamic phlebemphraxis,
1601+ dynamic redsear,
1602+ dynamic schismatical,
1603+ dynamic tartryl,
1604+ dynamic unabhorred,
1605+ dynamic undeliberateness,
1606+ dynamic unmixable,
1607+ dynamic untruckling,
1608+ dynamic vineal,
1609+ }) =>
1610+ SisteringClass(
1611+ amphicarpic: amphicarpic ?? this.amphicarpic,
1612+ chianti: chianti ?? this.chianti,
1613+ frigorific: frigorific ?? this.frigorific,
1614+ haplomi: haplomi ?? this.haplomi,
1615+ hyperkinesis: hyperkinesis ?? this.hyperkinesis,
1616+ laudable: laudable ?? this.laudable,
1617+ madwoman: madwoman ?? this.madwoman,
1618+ maimedly: maimedly ?? this.maimedly,
1619+ micropterygidae: micropterygidae ?? this.micropterygidae,
1620+ microrhabdus: microrhabdus ?? this.microrhabdus,
1621+ nondense: nondense ?? this.nondense,
1622+ phlebemphraxis: phlebemphraxis ?? this.phlebemphraxis,
1623+ redsear: redsear ?? this.redsear,
1624+ schismatical: schismatical ?? this.schismatical,
1625+ tartryl: tartryl ?? this.tartryl,
1626+ unabhorred: unabhorred ?? this.unabhorred,
1627+ undeliberateness: undeliberateness ?? this.undeliberateness,
1628+ unmixable: unmixable ?? this.unmixable,
1629+ untruckling: untruckling ?? this.untruckling,
1630+ vineal: vineal ?? this.vineal,
1631+ );
1632+
1633+ factory SisteringClass.fromJson(Map<String, dynamic> json) => SisteringClass(
1634+ amphicarpic: (json.containsKey("amphicarpic") ? json["amphicarpic"] : throw FormatException('Missing required property')),
1635+ chianti: (json.containsKey("Chianti") ? json["Chianti"] : throw FormatException('Missing required property')),
1636+ frigorific: (json.containsKey("frigorific") ? json["frigorific"] : throw FormatException('Missing required property')),
1637+ haplomi: (json.containsKey("Haplomi") ? json["Haplomi"] : throw FormatException('Missing required property')),
1638+ hyperkinesis: (json.containsKey("hyperkinesis") ? json["hyperkinesis"] : throw FormatException('Missing required property')),
1639+ laudable: (json.containsKey("laudable") ? json["laudable"] : throw FormatException('Missing required property')),
1640+ madwoman: (json.containsKey("madwoman") ? json["madwoman"] : throw FormatException('Missing required property')),
1641+ maimedly: (json.containsKey("maimedly") ? json["maimedly"] : throw FormatException('Missing required property')),
1642+ micropterygidae: (json.containsKey("Micropterygidae") ? json["Micropterygidae"] : throw FormatException('Missing required property')),
1643+ microrhabdus: (json.containsKey("microrhabdus") ? json["microrhabdus"] : throw FormatException('Missing required property')),
1644+ nondense: (json.containsKey("nondense") ? json["nondense"] : throw FormatException('Missing required property')),
1645+ phlebemphraxis: (json.containsKey("phlebemphraxis") ? json["phlebemphraxis"] : throw FormatException('Missing required property')),
1646+ redsear: (json.containsKey("redsear") ? json["redsear"] : throw FormatException('Missing required property')),
1647+ schismatical: (json.containsKey("schismatical") ? json["schismatical"] : throw FormatException('Missing required property')),
1648+ tartryl: (json.containsKey("tartryl") ? json["tartryl"] : throw FormatException('Missing required property')),
1649+ unabhorred: (json.containsKey("unabhorred") ? json["unabhorred"] : throw FormatException('Missing required property')),
1650+ undeliberateness: (json.containsKey("undeliberateness") ? json["undeliberateness"] : throw FormatException('Missing required property')),
1651+ unmixable: (json.containsKey("unmixable") ? json["unmixable"] : throw FormatException('Missing required property')),
1652+ untruckling: (json.containsKey("untruckling") ? json["untruckling"] : throw FormatException('Missing required property')),
1653+ vineal: (json.containsKey("vineal") ? json["vineal"] : throw FormatException('Missing required property')),
1654+ );
1655+
1656+ Map<String, dynamic> toJson() => {
1657+ "amphicarpic": amphicarpic,
1658+ "Chianti": chianti,
1659+ "frigorific": frigorific,
1660+ "Haplomi": haplomi,
1661+ "hyperkinesis": hyperkinesis,
1662+ "laudable": laudable,
1663+ "madwoman": madwoman,
1664+ "maimedly": maimedly,
1665+ "Micropterygidae": micropterygidae,
1666+ "microrhabdus": microrhabdus,
1667+ "nondense": nondense,
1668+ "phlebemphraxis": phlebemphraxis,
1669+ "redsear": redsear,
1670+ "schismatical": schismatical,
1671+ "tartryl": tartryl,
1672+ "unabhorred": unabhorred,
1673+ "undeliberateness": undeliberateness,
1674+ "unmixable": unmixable,
1675+ "untruckling": untruckling,
1676+ "vineal": vineal,
1677+ };
1678+}
1679+
1680+class Staghunting {
1681+ final int? calorimetric;
1682+ final int? canid;
1683+ final double? catharticalness;
1684+ final int? chirotherium;
1685+ final String? disdiapason;
1686+ final int? ditriglyphic;
1687+ final int? floriferousness;
1688+ final int? gamelike;
1689+ final int? grig;
1690+ final bool? homocerc;
1691+ final int? interloan;
1692+ final int? lithotomy;
1693+ final int? loric;
1694+ final int? membranocoriaceous;
1695+ final int? membranogenic;
1696+ final dynamic nonbookish;
1697+ final int? overtrump;
1698+ final int? scotino;
1699+ final int? seasonable;
1700+ final int? sephen;
1701+ final int? stigmarioid;
1702+ final int? tired;
1703+ final int? trifid;
1704+ final int? undefeatedly;
1705+ final int? ungirlish;
1706+
1707+ Staghunting({
1708+ this.calorimetric,
1709+ this.canid,
1710+ this.catharticalness,
1711+ this.chirotherium,
1712+ this.disdiapason,
1713+ this.ditriglyphic,
1714+ this.floriferousness,
1715+ this.gamelike,
1716+ this.grig,
1717+ this.homocerc,
1718+ this.interloan,
1719+ this.lithotomy,
1720+ this.loric,
1721+ this.membranocoriaceous,
1722+ this.membranogenic,
1723+ this.nonbookish,
1724+ this.overtrump,
1725+ this.scotino,
1726+ this.seasonable,
1727+ this.sephen,
1728+ this.stigmarioid,
1729+ this.tired,
1730+ this.trifid,
1731+ this.undefeatedly,
1732+ this.ungirlish,
1733+ });
1734+
1735+ Staghunting copyWith({
1736+ int? calorimetric,
1737+ int? canid,
1738+ double? catharticalness,
1739+ int? chirotherium,
1740+ String? disdiapason,
1741+ int? ditriglyphic,
1742+ int? floriferousness,
1743+ int? gamelike,
1744+ int? grig,
1745+ bool? homocerc,
1746+ int? interloan,
1747+ int? lithotomy,
1748+ int? loric,
1749+ int? membranocoriaceous,
1750+ int? membranogenic,
1751+ dynamic nonbookish,
1752+ int? overtrump,
1753+ int? scotino,
1754+ int? seasonable,
1755+ int? sephen,
1756+ int? stigmarioid,
1757+ int? tired,
1758+ int? trifid,
1759+ int? undefeatedly,
1760+ int? ungirlish,
1761+ }) =>
1762+ Staghunting(
1763+ calorimetric: calorimetric ?? this.calorimetric,
1764+ canid: canid ?? this.canid,
1765+ catharticalness: catharticalness ?? this.catharticalness,
1766+ chirotherium: chirotherium ?? this.chirotherium,
1767+ disdiapason: disdiapason ?? this.disdiapason,
1768+ ditriglyphic: ditriglyphic ?? this.ditriglyphic,
1769+ floriferousness: floriferousness ?? this.floriferousness,
1770+ gamelike: gamelike ?? this.gamelike,
1771+ grig: grig ?? this.grig,
1772+ homocerc: homocerc ?? this.homocerc,
1773+ interloan: interloan ?? this.interloan,
1774+ lithotomy: lithotomy ?? this.lithotomy,
1775+ loric: loric ?? this.loric,
1776+ membranocoriaceous: membranocoriaceous ?? this.membranocoriaceous,
1777+ membranogenic: membranogenic ?? this.membranogenic,
1778+ nonbookish: nonbookish ?? this.nonbookish,
1779+ overtrump: overtrump ?? this.overtrump,
1780+ scotino: scotino ?? this.scotino,
1781+ seasonable: seasonable ?? this.seasonable,
1782+ sephen: sephen ?? this.sephen,
1783+ stigmarioid: stigmarioid ?? this.stigmarioid,
1784+ tired: tired ?? this.tired,
1785+ trifid: trifid ?? this.trifid,
1786+ undefeatedly: undefeatedly ?? this.undefeatedly,
1787+ ungirlish: ungirlish ?? this.ungirlish,
1788+ );
1789+
1790+ factory Staghunting.fromJson(Map<String, dynamic> json) => Staghunting(
1791+ calorimetric: json["calorimetric"],
1792+ canid: json["canid"],
1793+ catharticalness: json["catharticalness"]?.toDouble(),
1794+ chirotherium: json["Chirotherium"],
1795+ disdiapason: json["disdiapason"],
1796+ ditriglyphic: json["ditriglyphic"],
1797+ floriferousness: json["floriferousness"],
1798+ gamelike: json["gamelike"],
1799+ grig: json["grig"],
1800+ homocerc: json["homocerc"],
1801+ interloan: json["interloan"],
1802+ lithotomy: json["lithotomy"],
1803+ loric: json["loric"],
1804+ membranocoriaceous: json["membranocoriaceous"],
1805+ membranogenic: json["membranogenic"],
1806+ nonbookish: json["nonbookish"],
1807+ overtrump: json["overtrump"],
1808+ scotino: json["scotino"],
1809+ seasonable: json["seasonable"],
1810+ sephen: json["sephen"],
1811+ stigmarioid: json["stigmarioid"],
1812+ tired: json["tired"],
1813+ trifid: json["trifid"],
1814+ undefeatedly: json["undefeatedly"],
1815+ ungirlish: json["ungirlish"],
1816+ );
1817+
1818+ Map<String, dynamic> toJson() => {
1819+ "calorimetric": calorimetric,
1820+ "canid": canid,
1821+ "catharticalness": catharticalness,
1822+ "Chirotherium": chirotherium,
1823+ "disdiapason": disdiapason,
1824+ "ditriglyphic": ditriglyphic,
1825+ "floriferousness": floriferousness,
1826+ "gamelike": gamelike,
1827+ "grig": grig,
1828+ "homocerc": homocerc,
1829+ "interloan": interloan,
1830+ "lithotomy": lithotomy,
1831+ "loric": loric,
1832+ "membranocoriaceous": membranocoriaceous,
1833+ "membranogenic": membranogenic,
1834+ "nonbookish": nonbookish,
1835+ "overtrump": overtrump,
1836+ "scotino": scotino,
1837+ "seasonable": seasonable,
1838+ "sephen": sephen,
1839+ "stigmarioid": stigmarioid,
1840+ "tired": tired,
1841+ "trifid": trifid,
1842+ "undefeatedly": undefeatedly,
1843+ "ungirlish": ungirlish,
1844+ };
1845+}
1846+
1847+class StrenuosityClass {
1848+ final int? bliss;
1849+ final int? buccate;
1850+ final int? bulletproof;
1851+ final double? catharticalness;
1852+ final int? chirotherium;
1853+ final int? crumblingness;
1854+ final String? disdiapason;
1855+ final int? engagedly;
1856+ final int? fightable;
1857+ final int? hoariness;
1858+ final bool? homocerc;
1859+ final int? hypopodium;
1860+ final int? luxurist;
1861+ final int? mechanician;
1862+ final dynamic nonbookish;
1863+ final int? onopordon;
1864+ final int? podgily;
1865+ final int? reformableness;
1866+ final int? scatterbrains;
1867+ final int? seminuria;
1868+ final int? sodomite;
1869+ final int? tramp;
1870+ final int? undueness;
1871+ final int? worthily;
1872+ final int? yankeeist;
1873+
1874+ StrenuosityClass({
1875+ this.bliss,
1876+ this.buccate,
1877+ this.bulletproof,
1878+ this.catharticalness,
1879+ this.chirotherium,
1880+ this.crumblingness,
1881+ this.disdiapason,
1882+ this.engagedly,
1883+ this.fightable,
1884+ this.hoariness,
1885+ this.homocerc,
1886+ this.hypopodium,
1887+ this.luxurist,
1888+ this.mechanician,
1889+ this.nonbookish,
1890+ this.onopordon,
1891+ this.podgily,
1892+ this.reformableness,
1893+ this.scatterbrains,
1894+ this.seminuria,
1895+ this.sodomite,
1896+ this.tramp,
1897+ this.undueness,
1898+ this.worthily,
1899+ this.yankeeist,
1900+ });
1901+
1902+ StrenuosityClass copyWith({
1903+ int? bliss,
1904+ int? buccate,
1905+ int? bulletproof,
1906+ double? catharticalness,
1907+ int? chirotherium,
1908+ int? crumblingness,
1909+ String? disdiapason,
1910+ int? engagedly,
1911+ int? fightable,
1912+ int? hoariness,
1913+ bool? homocerc,
1914+ int? hypopodium,
1915+ int? luxurist,
1916+ int? mechanician,
1917+ dynamic nonbookish,
1918+ int? onopordon,
1919+ int? podgily,
1920+ int? reformableness,
1921+ int? scatterbrains,
1922+ int? seminuria,
1923+ int? sodomite,
1924+ int? tramp,
1925+ int? undueness,
1926+ int? worthily,
1927+ int? yankeeist,
1928+ }) =>
1929+ StrenuosityClass(
1930+ bliss: bliss ?? this.bliss,
1931+ buccate: buccate ?? this.buccate,
1932+ bulletproof: bulletproof ?? this.bulletproof,
1933+ catharticalness: catharticalness ?? this.catharticalness,
1934+ chirotherium: chirotherium ?? this.chirotherium,
1935+ crumblingness: crumblingness ?? this.crumblingness,
1936+ disdiapason: disdiapason ?? this.disdiapason,
1937+ engagedly: engagedly ?? this.engagedly,
1938+ fightable: fightable ?? this.fightable,
1939+ hoariness: hoariness ?? this.hoariness,
1940+ homocerc: homocerc ?? this.homocerc,
1941+ hypopodium: hypopodium ?? this.hypopodium,
1942+ luxurist: luxurist ?? this.luxurist,
1943+ mechanician: mechanician ?? this.mechanician,
1944+ nonbookish: nonbookish ?? this.nonbookish,
1945+ onopordon: onopordon ?? this.onopordon,
1946+ podgily: podgily ?? this.podgily,
1947+ reformableness: reformableness ?? this.reformableness,
1948+ scatterbrains: scatterbrains ?? this.scatterbrains,
1949+ seminuria: seminuria ?? this.seminuria,
1950+ sodomite: sodomite ?? this.sodomite,
1951+ tramp: tramp ?? this.tramp,
1952+ undueness: undueness ?? this.undueness,
1953+ worthily: worthily ?? this.worthily,
1954+ yankeeist: yankeeist ?? this.yankeeist,
1955+ );
1956+
1957+ factory StrenuosityClass.fromJson(Map<String, dynamic> json) => StrenuosityClass(
1958+ bliss: json["bliss"],
1959+ buccate: json["buccate"],
1960+ bulletproof: json["bulletproof"],
1961+ catharticalness: json["catharticalness"]?.toDouble(),
1962+ chirotherium: json["Chirotherium"],
1963+ crumblingness: json["crumblingness"],
1964+ disdiapason: json["disdiapason"],
1965+ engagedly: json["engagedly"],
1966+ fightable: json["fightable"],
1967+ hoariness: json["hoariness"],
1968+ homocerc: json["homocerc"],
1969+ hypopodium: json["hypopodium"],
1970+ luxurist: json["luxurist"],
1971+ mechanician: json["mechanician"],
1972+ nonbookish: json["nonbookish"],
1973+ onopordon: json["Onopordon"],
1974+ podgily: json["podgily"],
1975+ reformableness: json["reformableness"],
1976+ scatterbrains: json["scatterbrains"],
1977+ seminuria: json["seminuria"],
1978+ sodomite: json["Sodomite"],
1979+ tramp: json["tramp"],
1980+ undueness: json["undueness"],
1981+ worthily: json["worthily"],
1982+ yankeeist: json["Yankeeist"],
1983+ );
1984+
1985+ Map<String, dynamic> toJson() => {
1986+ "bliss": bliss,
1987+ "buccate": buccate,
1988+ "bulletproof": bulletproof,
1989+ "catharticalness": catharticalness,
1990+ "Chirotherium": chirotherium,
1991+ "crumblingness": crumblingness,
1992+ "disdiapason": disdiapason,
1993+ "engagedly": engagedly,
1994+ "fightable": fightable,
1995+ "hoariness": hoariness,
1996+ "homocerc": homocerc,
1997+ "hypopodium": hypopodium,
1998+ "luxurist": luxurist,
1999+ "mechanician": mechanician,
2000+ "nonbookish": nonbookish,
2001+ "Onopordon": onopordon,
2002+ "podgily": podgily,
2003+ "reformableness": reformableness,
2004+ "scatterbrains": scatterbrains,
2005+ "seminuria": seminuria,
2006+ "Sodomite": sodomite,
2007+ "tramp": tramp,
2008+ "undueness": undueness,
2009+ "worthily": worthily,
2010+ "Yankeeist": yankeeist,
2011+ };
2012+}
2013+
2014+class TruantcyClass {
2015+ final dynamic alfiona;
2016+ final dynamic ascaridiasis;
2017+ final dynamic bungey;
2018+ final double? catharticalness;
2019+ final dynamic ceroxyle;
2020+ final int? chirotherium;
2021+ final dynamic chorology;
2022+ final String? disdiapason;
2023+ final dynamic enmarble;
2024+ final dynamic epeira;
2025+ final dynamic eurylaimi;
2026+ final dynamic germination;
2027+ final dynamic hallelujah;
2028+ final bool? homocerc;
2029+ final dynamic lev;
2030+ final dynamic mouthing;
2031+ final dynamic nonbookish;
2032+ final dynamic philliloo;
2033+ final dynamic planetal;
2034+ final dynamic poney;
2035+ final dynamic punctualist;
2036+ final dynamic returnlessly;
2037+ final dynamic skelder;
2038+ final dynamic windwaywardly;
2039+ final dynamic yuman;
2040+
2041+ TruantcyClass({
2042+ this.alfiona,
2043+ this.ascaridiasis,
2044+ this.bungey,
2045+ this.catharticalness,
2046+ this.ceroxyle,
2047+ this.chirotherium,
2048+ this.chorology,
2049+ this.disdiapason,
2050+ this.enmarble,
2051+ this.epeira,
2052+ this.eurylaimi,
2053+ this.germination,
2054+ this.hallelujah,
2055+ this.homocerc,
2056+ this.lev,
2057+ this.mouthing,
2058+ this.nonbookish,
2059+ this.philliloo,
2060+ this.planetal,
2061+ this.poney,
2062+ this.punctualist,
2063+ this.returnlessly,
2064+ this.skelder,
2065+ this.windwaywardly,
2066+ this.yuman,
2067+ });
2068+
2069+ TruantcyClass copyWith({
2070+ dynamic alfiona,
2071+ dynamic ascaridiasis,
2072+ dynamic bungey,
2073+ double? catharticalness,
2074+ dynamic ceroxyle,
2075+ int? chirotherium,
2076+ dynamic chorology,
2077+ String? disdiapason,
2078+ dynamic enmarble,
2079+ dynamic epeira,
2080+ dynamic eurylaimi,
2081+ dynamic germination,
2082+ dynamic hallelujah,
2083+ bool? homocerc,
2084+ dynamic lev,
2085+ dynamic mouthing,
2086+ dynamic nonbookish,
2087+ dynamic philliloo,
2088+ dynamic planetal,
2089+ dynamic poney,
2090+ dynamic punctualist,
2091+ dynamic returnlessly,
2092+ dynamic skelder,
2093+ dynamic windwaywardly,
2094+ dynamic yuman,
2095+ }) =>
2096+ TruantcyClass(
2097+ alfiona: alfiona ?? this.alfiona,
2098+ ascaridiasis: ascaridiasis ?? this.ascaridiasis,
2099+ bungey: bungey ?? this.bungey,
2100+ catharticalness: catharticalness ?? this.catharticalness,
2101+ ceroxyle: ceroxyle ?? this.ceroxyle,
2102+ chirotherium: chirotherium ?? this.chirotherium,
2103+ chorology: chorology ?? this.chorology,
2104+ disdiapason: disdiapason ?? this.disdiapason,
2105+ enmarble: enmarble ?? this.enmarble,
2106+ epeira: epeira ?? this.epeira,
2107+ eurylaimi: eurylaimi ?? this.eurylaimi,
2108+ germination: germination ?? this.germination,
2109+ hallelujah: hallelujah ?? this.hallelujah,
2110+ homocerc: homocerc ?? this.homocerc,
2111+ lev: lev ?? this.lev,
2112+ mouthing: mouthing ?? this.mouthing,
2113+ nonbookish: nonbookish ?? this.nonbookish,
2114+ philliloo: philliloo ?? this.philliloo,
2115+ planetal: planetal ?? this.planetal,
2116+ poney: poney ?? this.poney,
2117+ punctualist: punctualist ?? this.punctualist,
2118+ returnlessly: returnlessly ?? this.returnlessly,
2119+ skelder: skelder ?? this.skelder,
2120+ windwaywardly: windwaywardly ?? this.windwaywardly,
2121+ yuman: yuman ?? this.yuman,
2122+ );
2123+
2124+ factory TruantcyClass.fromJson(Map<String, dynamic> json) => TruantcyClass(
2125+ alfiona: json["alfiona"],
2126+ ascaridiasis: json["ascaridiasis"],
2127+ bungey: json["bungey"],
2128+ catharticalness: json["catharticalness"]?.toDouble(),
2129+ ceroxyle: json["ceroxyle"],
2130+ chirotherium: json["Chirotherium"],
2131+ chorology: json["chorology"],
2132+ disdiapason: json["disdiapason"],
2133+ enmarble: json["enmarble"],
2134+ epeira: json["Epeira"],
2135+ eurylaimi: json["Eurylaimi"],
2136+ germination: json["germination"],
2137+ hallelujah: json["hallelujah"],
2138+ homocerc: json["homocerc"],
2139+ lev: json["lev"],
2140+ mouthing: json["mouthing"],
2141+ nonbookish: json["nonbookish"],
2142+ philliloo: json["philliloo"],
2143+ planetal: json["planetal"],
2144+ poney: json["poney"],
2145+ punctualist: json["punctualist"],
2146+ returnlessly: json["returnlessly"],
2147+ skelder: json["skelder"],
2148+ windwaywardly: json["windwaywardly"],
2149+ yuman: json["Yuman"],
2150+ );
2151+
2152+ Map<String, dynamic> toJson() => {
2153+ "alfiona": alfiona,
2154+ "ascaridiasis": ascaridiasis,
2155+ "bungey": bungey,
2156+ "catharticalness": catharticalness,
2157+ "ceroxyle": ceroxyle,
2158+ "Chirotherium": chirotherium,
2159+ "chorology": chorology,
2160+ "disdiapason": disdiapason,
2161+ "enmarble": enmarble,
2162+ "Epeira": epeira,
2163+ "Eurylaimi": eurylaimi,
2164+ "germination": germination,
2165+ "hallelujah": hallelujah,
2166+ "homocerc": homocerc,
2167+ "lev": lev,
2168+ "mouthing": mouthing,
2169+ "nonbookish": nonbookish,
2170+ "philliloo": philliloo,
2171+ "planetal": planetal,
2172+ "poney": poney,
2173+ "punctualist": punctualist,
2174+ "returnlessly": returnlessly,
2175+ "skelder": skelder,
2176+ "windwaywardly": windwaywardly,
2177+ "Yuman": yuman,
2178+ };
2179+}
2180+
2181+class UnimpeachablyClass {
2182+ final int? acerin;
2183+ final int? bobadil;
2184+ final double? catharticalness;
2185+ final int? chirotherium;
2186+ final int? chlorophylligenous;
2187+ final int? conversational;
2188+ final int? demiowl;
2189+ final String? disdiapason;
2190+ final int? ectorhinal;
2191+ final int? gamblesomeness;
2192+ final bool? homocerc;
2193+ final int? irrorate;
2194+ final int? kindergartening;
2195+ final int? lateritic;
2196+ final int? mespil;
2197+ final int? misconfiguration;
2198+ final dynamic nonbookish;
2199+ final int? planometry;
2200+ final int? quiina;
2201+ final int? robert;
2202+ final int? rot;
2203+ final int? subcinctorium;
2204+ final int? tussocker;
2205+ final int? ultraproud;
2206+ final int? unsuggestedness;
2207+
2208+ UnimpeachablyClass({
2209+ this.acerin,
2210+ this.bobadil,
2211+ this.catharticalness,
2212+ this.chirotherium,
2213+ this.chlorophylligenous,
2214+ this.conversational,
2215+ this.demiowl,
2216+ this.disdiapason,
2217+ this.ectorhinal,
2218+ this.gamblesomeness,
2219+ this.homocerc,
2220+ this.irrorate,
2221+ this.kindergartening,
2222+ this.lateritic,
2223+ this.mespil,
2224+ this.misconfiguration,
2225+ this.nonbookish,
2226+ this.planometry,
2227+ this.quiina,
2228+ this.robert,
2229+ this.rot,
2230+ this.subcinctorium,
2231+ this.tussocker,
2232+ this.ultraproud,
2233+ this.unsuggestedness,
2234+ });
2235+
2236+ UnimpeachablyClass copyWith({
2237+ int? acerin,
2238+ int? bobadil,
2239+ double? catharticalness,
2240+ int? chirotherium,
2241+ int? chlorophylligenous,
2242+ int? conversational,
2243+ int? demiowl,
2244+ String? disdiapason,
2245+ int? ectorhinal,
2246+ int? gamblesomeness,
2247+ bool? homocerc,
2248+ int? irrorate,
2249+ int? kindergartening,
2250+ int? lateritic,
2251+ int? mespil,
2252+ int? misconfiguration,
2253+ dynamic nonbookish,
2254+ int? planometry,
2255+ int? quiina,
2256+ int? robert,
2257+ int? rot,
2258+ int? subcinctorium,
2259+ int? tussocker,
2260+ int? ultraproud,
2261+ int? unsuggestedness,
2262+ }) =>
2263+ UnimpeachablyClass(
2264+ acerin: acerin ?? this.acerin,
2265+ bobadil: bobadil ?? this.bobadil,
2266+ catharticalness: catharticalness ?? this.catharticalness,
2267+ chirotherium: chirotherium ?? this.chirotherium,
2268+ chlorophylligenous: chlorophylligenous ?? this.chlorophylligenous,
2269+ conversational: conversational ?? this.conversational,
2270+ demiowl: demiowl ?? this.demiowl,
2271+ disdiapason: disdiapason ?? this.disdiapason,
2272+ ectorhinal: ectorhinal ?? this.ectorhinal,
2273+ gamblesomeness: gamblesomeness ?? this.gamblesomeness,
2274+ homocerc: homocerc ?? this.homocerc,
2275+ irrorate: irrorate ?? this.irrorate,
2276+ kindergartening: kindergartening ?? this.kindergartening,
2277+ lateritic: lateritic ?? this.lateritic,
2278+ mespil: mespil ?? this.mespil,
2279+ misconfiguration: misconfiguration ?? this.misconfiguration,
2280+ nonbookish: nonbookish ?? this.nonbookish,
2281+ planometry: planometry ?? this.planometry,
2282+ quiina: quiina ?? this.quiina,
2283+ robert: robert ?? this.robert,
2284+ rot: rot ?? this.rot,
2285+ subcinctorium: subcinctorium ?? this.subcinctorium,
2286+ tussocker: tussocker ?? this.tussocker,
2287+ ultraproud: ultraproud ?? this.ultraproud,
2288+ unsuggestedness: unsuggestedness ?? this.unsuggestedness,
2289+ );
2290+
2291+ factory UnimpeachablyClass.fromJson(Map<String, dynamic> json) => UnimpeachablyClass(
2292+ acerin: json["acerin"],
2293+ bobadil: json["Bobadil"],
2294+ catharticalness: json["catharticalness"]?.toDouble(),
2295+ chirotherium: json["Chirotherium"],
2296+ chlorophylligenous: json["chlorophylligenous"],
2297+ conversational: json["conversational"],
2298+ demiowl: json["demiowl"],
2299+ disdiapason: json["disdiapason"],
2300+ ectorhinal: json["ectorhinal"],
2301+ gamblesomeness: json["gamblesomeness"],
2302+ homocerc: json["homocerc"],
2303+ irrorate: json["irrorate"],
2304+ kindergartening: json["kindergartening"],
2305+ lateritic: json["lateritic"],
2306+ mespil: json["mespil"],
2307+ misconfiguration: json["misconfiguration"],
2308+ nonbookish: json["nonbookish"],
2309+ planometry: json["planometry"],
2310+ quiina: json["Quiina"],
2311+ robert: json["Robert"],
2312+ rot: json["rot"],
2313+ subcinctorium: json["subcinctorium"],
2314+ tussocker: json["tussocker"],
2315+ ultraproud: json["ultraproud"],
2316+ unsuggestedness: json["unsuggestedness"],
2317+ );
2318+
2319+ Map<String, dynamic> toJson() => {
2320+ "acerin": acerin,
2321+ "Bobadil": bobadil,
2322+ "catharticalness": catharticalness,
2323+ "Chirotherium": chirotherium,
2324+ "chlorophylligenous": chlorophylligenous,
2325+ "conversational": conversational,
2326+ "demiowl": demiowl,
2327+ "disdiapason": disdiapason,
2328+ "ectorhinal": ectorhinal,
2329+ "gamblesomeness": gamblesomeness,
2330+ "homocerc": homocerc,
2331+ "irrorate": irrorate,
2332+ "kindergartening": kindergartening,
2333+ "lateritic": lateritic,
2334+ "mespil": mespil,
2335+ "misconfiguration": misconfiguration,
2336+ "nonbookish": nonbookish,
2337+ "planometry": planometry,
2338+ "Quiina": quiina,
2339+ "Robert": robert,
2340+ "rot": rot,
2341+ "subcinctorium": subcinctorium,
2342+ "tussocker": tussocker,
2343+ "ultraproud": ultraproud,
2344+ "unsuggestedness": unsuggestedness,
2345+ };
2346+}
2347+
2348+class UnstressedClass {
2349+ final dynamic alain;
2350+ final dynamic amphirhina;
2351+ final dynamic antimachinery;
2352+ final dynamic coldish;
2353+ final dynamic crantara;
2354+ final dynamic distinguishing;
2355+ final dynamic elytroposis;
2356+ final dynamic gentianwort;
2357+ final dynamic heliosis;
2358+ final dynamic instrumental;
2359+ final dynamic introinflection;
2360+ final dynamic kala;
2361+ final dynamic lincolnian;
2362+ final dynamic metad;
2363+ final dynamic sarcophilus;
2364+ final dynamic swingingly;
2365+ final dynamic unconformity;
2366+ final dynamic undecreed;
2367+ final dynamic venerable;
2368+ final dynamic vowellessness;
2369+
2370+ UnstressedClass({
2371+ required this.alain,
2372+ required this.amphirhina,
2373+ required this.antimachinery,
2374+ required this.coldish,
2375+ required this.crantara,
2376+ required this.distinguishing,
2377+ required this.elytroposis,
2378+ required this.gentianwort,
2379+ required this.heliosis,
2380+ required this.instrumental,
2381+ required this.introinflection,
2382+ required this.kala,
2383+ required this.lincolnian,
2384+ required this.metad,
2385+ required this.sarcophilus,
2386+ required this.swingingly,
2387+ required this.unconformity,
2388+ required this.undecreed,
2389+ required this.venerable,
2390+ required this.vowellessness,
2391+ });
2392+
2393+ UnstressedClass copyWith({
2394+ dynamic alain,
2395+ dynamic amphirhina,
2396+ dynamic antimachinery,
2397+ dynamic coldish,
2398+ dynamic crantara,
2399+ dynamic distinguishing,
2400+ dynamic elytroposis,
2401+ dynamic gentianwort,
2402+ dynamic heliosis,
2403+ dynamic instrumental,
2404+ dynamic introinflection,
2405+ dynamic kala,
2406+ dynamic lincolnian,
2407+ dynamic metad,
2408+ dynamic sarcophilus,
2409+ dynamic swingingly,
2410+ dynamic unconformity,
2411+ dynamic undecreed,
2412+ dynamic venerable,
2413+ dynamic vowellessness,
2414+ }) =>
2415+ UnstressedClass(
2416+ alain: alain ?? this.alain,
2417+ amphirhina: amphirhina ?? this.amphirhina,
2418+ antimachinery: antimachinery ?? this.antimachinery,
2419+ coldish: coldish ?? this.coldish,
2420+ crantara: crantara ?? this.crantara,
2421+ distinguishing: distinguishing ?? this.distinguishing,
2422+ elytroposis: elytroposis ?? this.elytroposis,
2423+ gentianwort: gentianwort ?? this.gentianwort,
2424+ heliosis: heliosis ?? this.heliosis,
2425+ instrumental: instrumental ?? this.instrumental,
2426+ introinflection: introinflection ?? this.introinflection,
2427+ kala: kala ?? this.kala,
2428+ lincolnian: lincolnian ?? this.lincolnian,
2429+ metad: metad ?? this.metad,
2430+ sarcophilus: sarcophilus ?? this.sarcophilus,
2431+ swingingly: swingingly ?? this.swingingly,
2432+ unconformity: unconformity ?? this.unconformity,
2433+ undecreed: undecreed ?? this.undecreed,
2434+ venerable: venerable ?? this.venerable,
2435+ vowellessness: vowellessness ?? this.vowellessness,
2436+ );
2437+
2438+ factory UnstressedClass.fromJson(Map<String, dynamic> json) => UnstressedClass(
2439+ alain: (json.containsKey("Alain") ? json["Alain"] : throw FormatException('Missing required property')),
2440+ amphirhina: (json.containsKey("Amphirhina") ? json["Amphirhina"] : throw FormatException('Missing required property')),
2441+ antimachinery: (json.containsKey("antimachinery") ? json["antimachinery"] : throw FormatException('Missing required property')),
2442+ coldish: (json.containsKey("coldish") ? json["coldish"] : throw FormatException('Missing required property')),
2443+ crantara: (json.containsKey("crantara") ? json["crantara"] : throw FormatException('Missing required property')),
2444+ distinguishing: (json.containsKey("distinguishing") ? json["distinguishing"] : throw FormatException('Missing required property')),
2445+ elytroposis: (json.containsKey("elytroposis") ? json["elytroposis"] : throw FormatException('Missing required property')),
2446+ gentianwort: (json.containsKey("gentianwort") ? json["gentianwort"] : throw FormatException('Missing required property')),
2447+ heliosis: (json.containsKey("heliosis") ? json["heliosis"] : throw FormatException('Missing required property')),
2448+ instrumental: (json.containsKey("instrumental") ? json["instrumental"] : throw FormatException('Missing required property')),
2449+ introinflection: (json.containsKey("introinflection") ? json["introinflection"] : throw FormatException('Missing required property')),
2450+ kala: (json.containsKey("kala") ? json["kala"] : throw FormatException('Missing required property')),
2451+ lincolnian: (json.containsKey("Lincolnian") ? json["Lincolnian"] : throw FormatException('Missing required property')),
2452+ metad: (json.containsKey("metad") ? json["metad"] : throw FormatException('Missing required property')),
2453+ sarcophilus: (json.containsKey("Sarcophilus") ? json["Sarcophilus"] : throw FormatException('Missing required property')),
2454+ swingingly: (json.containsKey("swingingly") ? json["swingingly"] : throw FormatException('Missing required property')),
2455+ unconformity: (json.containsKey("unconformity") ? json["unconformity"] : throw FormatException('Missing required property')),
2456+ undecreed: (json.containsKey("undecreed") ? json["undecreed"] : throw FormatException('Missing required property')),
2457+ venerable: (json.containsKey("venerable") ? json["venerable"] : throw FormatException('Missing required property')),
2458+ vowellessness: (json.containsKey("vowellessness") ? json["vowellessness"] : throw FormatException('Missing required property')),
2459+ );
2460+
2461+ Map<String, dynamic> toJson() => {
2462+ "Alain": alain,
2463+ "Amphirhina": amphirhina,
2464+ "antimachinery": antimachinery,
2465+ "coldish": coldish,
2466+ "crantara": crantara,
2467+ "distinguishing": distinguishing,
2468+ "elytroposis": elytroposis,
2469+ "gentianwort": gentianwort,
2470+ "heliosis": heliosis,
2471+ "instrumental": instrumental,
2472+ "introinflection": introinflection,
2473+ "kala": kala,
2474+ "Lincolnian": lincolnian,
2475+ "metad": metad,
2476+ "Sarcophilus": sarcophilus,
2477+ "swingingly": swingingly,
2478+ "unconformity": unconformity,
2479+ "undecreed": undecreed,
2480+ "venerable": venerable,
2481+ "vowellessness": vowellessness,
2482+ };
2483+}
2484+
2485+class WrothyClass {
2486+ final dynamic aeschynanthus;
2487+ final dynamic aquiferous;
2488+ final dynamic cheapener;
2489+ final dynamic enumeration;
2490+ final dynamic ephesine;
2491+ final dynamic escadrille;
2492+ final dynamic estrous;
2493+ final dynamic interestedly;
2494+ final dynamic katakinetomer;
2495+ final dynamic mortification;
2496+ final dynamic morula;
2497+ final dynamic orthosymmetrical;
2498+ final dynamic overbark;
2499+ final dynamic politist;
2500+ final dynamic qualified;
2501+ final dynamic sphenomalar;
2502+ final dynamic throatful;
2503+ final dynamic transhumance;
2504+ final dynamic triandrian;
2505+ final dynamic unbooked;
2506+
2507+ WrothyClass({
2508+ required this.aeschynanthus,
2509+ required this.aquiferous,
2510+ required this.cheapener,
2511+ required this.enumeration,
2512+ required this.ephesine,
2513+ required this.escadrille,
2514+ required this.estrous,
2515+ required this.interestedly,
2516+ required this.katakinetomer,
2517+ required this.mortification,
2518+ required this.morula,
2519+ required this.orthosymmetrical,
2520+ required this.overbark,
2521+ required this.politist,
2522+ required this.qualified,
2523+ required this.sphenomalar,
2524+ required this.throatful,
2525+ required this.transhumance,
2526+ required this.triandrian,
2527+ required this.unbooked,
2528+ });
2529+
2530+ WrothyClass copyWith({
2531+ dynamic aeschynanthus,
2532+ dynamic aquiferous,
2533+ dynamic cheapener,
2534+ dynamic enumeration,
2535+ dynamic ephesine,
2536+ dynamic escadrille,
2537+ dynamic estrous,
2538+ dynamic interestedly,
2539+ dynamic katakinetomer,
2540+ dynamic mortification,
2541+ dynamic morula,
2542+ dynamic orthosymmetrical,
2543+ dynamic overbark,
2544+ dynamic politist,
2545+ dynamic qualified,
2546+ dynamic sphenomalar,
2547+ dynamic throatful,
2548+ dynamic transhumance,
2549+ dynamic triandrian,
2550+ dynamic unbooked,
2551+ }) =>
2552+ WrothyClass(
2553+ aeschynanthus: aeschynanthus ?? this.aeschynanthus,
2554+ aquiferous: aquiferous ?? this.aquiferous,
2555+ cheapener: cheapener ?? this.cheapener,
2556+ enumeration: enumeration ?? this.enumeration,
2557+ ephesine: ephesine ?? this.ephesine,
2558+ escadrille: escadrille ?? this.escadrille,
2559+ estrous: estrous ?? this.estrous,
2560+ interestedly: interestedly ?? this.interestedly,
2561+ katakinetomer: katakinetomer ?? this.katakinetomer,
2562+ mortification: mortification ?? this.mortification,
2563+ morula: morula ?? this.morula,
2564+ orthosymmetrical: orthosymmetrical ?? this.orthosymmetrical,
2565+ overbark: overbark ?? this.overbark,
2566+ politist: politist ?? this.politist,
2567+ qualified: qualified ?? this.qualified,
2568+ sphenomalar: sphenomalar ?? this.sphenomalar,
2569+ throatful: throatful ?? this.throatful,
2570+ transhumance: transhumance ?? this.transhumance,
2571+ triandrian: triandrian ?? this.triandrian,
2572+ unbooked: unbooked ?? this.unbooked,
2573+ );
2574+
2575+ factory WrothyClass.fromJson(Map<String, dynamic> json) => WrothyClass(
2576+ aeschynanthus: (json.containsKey("Aeschynanthus") ? json["Aeschynanthus"] : throw FormatException('Missing required property')),
2577+ aquiferous: (json.containsKey("aquiferous") ? json["aquiferous"] : throw FormatException('Missing required property')),
2578+ cheapener: (json.containsKey("cheapener") ? json["cheapener"] : throw FormatException('Missing required property')),
2579+ enumeration: (json.containsKey("enumeration") ? json["enumeration"] : throw FormatException('Missing required property')),
2580+ ephesine: (json.containsKey("Ephesine") ? json["Ephesine"] : throw FormatException('Missing required property')),
2581+ escadrille: (json.containsKey("escadrille") ? json["escadrille"] : throw FormatException('Missing required property')),
2582+ estrous: (json.containsKey("estrous") ? json["estrous"] : throw FormatException('Missing required property')),
2583+ interestedly: (json.containsKey("interestedly") ? json["interestedly"] : throw FormatException('Missing required property')),
2584+ katakinetomer: (json.containsKey("katakinetomer") ? json["katakinetomer"] : throw FormatException('Missing required property')),
2585+ mortification: (json.containsKey("mortification") ? json["mortification"] : throw FormatException('Missing required property')),
2586+ morula: (json.containsKey("morula") ? json["morula"] : throw FormatException('Missing required property')),
2587+ orthosymmetrical: (json.containsKey("orthosymmetrical") ? json["orthosymmetrical"] : throw FormatException('Missing required property')),
2588+ overbark: (json.containsKey("overbark") ? json["overbark"] : throw FormatException('Missing required property')),
2589+ politist: (json.containsKey("politist") ? json["politist"] : throw FormatException('Missing required property')),
2590+ qualified: (json.containsKey("qualified") ? json["qualified"] : throw FormatException('Missing required property')),
2591+ sphenomalar: (json.containsKey("sphenomalar") ? json["sphenomalar"] : throw FormatException('Missing required property')),
2592+ throatful: (json.containsKey("throatful") ? json["throatful"] : throw FormatException('Missing required property')),
2593+ transhumance: (json.containsKey("transhumance") ? json["transhumance"] : throw FormatException('Missing required property')),
2594+ triandrian: (json.containsKey("triandrian") ? json["triandrian"] : throw FormatException('Missing required property')),
2595+ unbooked: (json.containsKey("unbooked") ? json["unbooked"] : throw FormatException('Missing required property')),
2596+ );
2597+
2598+ Map<String, dynamic> toJson() => {
2599+ "Aeschynanthus": aeschynanthus,
2600+ "aquiferous": aquiferous,
2601+ "cheapener": cheapener,
2602+ "enumeration": enumeration,
2603+ "Ephesine": ephesine,
2604+ "escadrille": escadrille,
2605+ "estrous": estrous,
2606+ "interestedly": interestedly,
2607+ "katakinetomer": katakinetomer,
2608+ "mortification": mortification,
2609+ "morula": morula,
2610+ "orthosymmetrical": orthosymmetrical,
2611+ "overbark": overbark,
2612+ "politist": politist,
2613+ "qualified": qualified,
2614+ "sphenomalar": sphenomalar,
2615+ "throatful": throatful,
2616+ "transhumance": transhumance,
2617+ "triandrian": triandrian,
2618+ "unbooked": unbooked,
2619+ };
2620+}
Melixirdefault / QuickType.ex+516 −72
@@ -533,6 +533,20 @@ defmodule Reimagine do
533533 waltzlike: nil | nil
534534 }
535535
536+ def decode_catharticalness(value) when is_float(value), do: value
537+ def decode_catharticalness(value) when is_integer(value), do: value
538+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding Reimagine.catharticalness"}
539+
540+ def encode_catharticalness(value) when is_float(value), do: value
541+ def encode_catharticalness(value) when is_integer(value), do: value
542+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding Reimagine.catharticalness"}
543+
544+ def decode_chirotherium(value) when is_integer(value), do: value
545+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding Reimagine.chirotherium"}
546+
547+ def encode_chirotherium(value) when is_integer(value), do: value
548+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding Reimagine.chirotherium"}
549+
536550 def decode_disdiapason(value) when is_binary(value), do: value
537551 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding Reimagine.disdiapason"}
538552
@@ -544,8 +558,8 @@ defmodule Reimagine do
544558 adducible: m["adducible"],
545559 anabolin: m["anabolin"],
546560 brainy: m["brainy"],
547- catharticalness: m["catharticalness"],
548- chirotherium: m["Chirotherium"],
561+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
562+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
549563 chrysamine: m["chrysamine"],
550564 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
551565 fluxweed: m["fluxweed"],
@@ -1273,6 +1287,20 @@ defmodule SaxtenClass do
12731287 withdrawnness: nil | nil
12741288 }
12751289
1290+ def decode_catharticalness(value) when is_float(value), do: value
1291+ def decode_catharticalness(value) when is_integer(value), do: value
1292+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding SaxtenClass.catharticalness"}
1293+
1294+ def encode_catharticalness(value) when is_float(value), do: value
1295+ def encode_catharticalness(value) when is_integer(value), do: value
1296+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding SaxtenClass.catharticalness"}
1297+
1298+ def decode_chirotherium(value) when is_integer(value), do: value
1299+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding SaxtenClass.chirotherium"}
1300+
1301+ def encode_chirotherium(value) when is_integer(value), do: value
1302+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding SaxtenClass.chirotherium"}
1303+
12761304 def decode_disdiapason(value) when is_binary(value), do: value
12771305 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding SaxtenClass.disdiapason"}
12781306
@@ -1283,9 +1311,9 @@ defmodule SaxtenClass do
12831311 %SaxtenClass{
12841312 algarrobilla: m["algarrobilla"],
12851313 bowgrace: m["bowgrace"],
1286- catharticalness: m["catharticalness"],
1314+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
12871315 centaurid: m["Centaurid"],
1288- chirotherium: m["Chirotherium"],
1316+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
12891317 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
12901318 flix: m["flix"],
12911319 germanely: m["germanely"],
@@ -1803,39 +1831,173 @@ defmodule Staghunting do
18031831 ungirlish: integer() | nil
18041832 }
18051833
1834+ def decode_calorimetric(value) when is_integer(value), do: value
1835+ def decode_calorimetric(_), do: {:error, "Unexpected type when decoding Staghunting.calorimetric"}
1836+
1837+ def encode_calorimetric(value) when is_integer(value), do: value
1838+ def encode_calorimetric(_), do: {:error, "Unexpected type when encoding Staghunting.calorimetric"}
1839+
1840+ def decode_canid(value) when is_integer(value), do: value
1841+ def decode_canid(_), do: {:error, "Unexpected type when decoding Staghunting.canid"}
1842+
1843+ def encode_canid(value) when is_integer(value), do: value
1844+ def encode_canid(_), do: {:error, "Unexpected type when encoding Staghunting.canid"}
1845+
1846+ def decode_catharticalness(value) when is_float(value), do: value
1847+ def decode_catharticalness(value) when is_integer(value), do: value
1848+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding Staghunting.catharticalness"}
1849+
1850+ def encode_catharticalness(value) when is_float(value), do: value
1851+ def encode_catharticalness(value) when is_integer(value), do: value
1852+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding Staghunting.catharticalness"}
1853+
1854+ def decode_chirotherium(value) when is_integer(value), do: value
1855+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding Staghunting.chirotherium"}
1856+
1857+ def encode_chirotherium(value) when is_integer(value), do: value
1858+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding Staghunting.chirotherium"}
1859+
18061860 def decode_disdiapason(value) when is_binary(value), do: value
18071861 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding Staghunting.disdiapason"}
18081862
18091863 def encode_disdiapason(value) when is_binary(value), do: value
18101864 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding Staghunting.disdiapason"}
18111865
1866+ def decode_ditriglyphic(value) when is_integer(value), do: value
1867+ def decode_ditriglyphic(_), do: {:error, "Unexpected type when decoding Staghunting.ditriglyphic"}
1868+
1869+ def encode_ditriglyphic(value) when is_integer(value), do: value
1870+ def encode_ditriglyphic(_), do: {:error, "Unexpected type when encoding Staghunting.ditriglyphic"}
1871+
1872+ def decode_floriferousness(value) when is_integer(value), do: value
1873+ def decode_floriferousness(_), do: {:error, "Unexpected type when decoding Staghunting.floriferousness"}
1874+
1875+ def encode_floriferousness(value) when is_integer(value), do: value
1876+ def encode_floriferousness(_), do: {:error, "Unexpected type when encoding Staghunting.floriferousness"}
1877+
1878+ def decode_gamelike(value) when is_integer(value), do: value
1879+ def decode_gamelike(_), do: {:error, "Unexpected type when decoding Staghunting.gamelike"}
1880+
1881+ def encode_gamelike(value) when is_integer(value), do: value
1882+ def encode_gamelike(_), do: {:error, "Unexpected type when encoding Staghunting.gamelike"}
1883+
1884+ def decode_grig(value) when is_integer(value), do: value
1885+ def decode_grig(_), do: {:error, "Unexpected type when decoding Staghunting.grig"}
1886+
1887+ def encode_grig(value) when is_integer(value), do: value
1888+ def encode_grig(_), do: {:error, "Unexpected type when encoding Staghunting.grig"}
1889+
1890+ def decode_interloan(value) when is_integer(value), do: value
1891+ def decode_interloan(_), do: {:error, "Unexpected type when decoding Staghunting.interloan"}
1892+
1893+ def encode_interloan(value) when is_integer(value), do: value
1894+ def encode_interloan(_), do: {:error, "Unexpected type when encoding Staghunting.interloan"}
1895+
1896+ def decode_lithotomy(value) when is_integer(value), do: value
1897+ def decode_lithotomy(_), do: {:error, "Unexpected type when decoding Staghunting.lithotomy"}
1898+
1899+ def encode_lithotomy(value) when is_integer(value), do: value
1900+ def encode_lithotomy(_), do: {:error, "Unexpected type when encoding Staghunting.lithotomy"}
1901+
1902+ def decode_loric(value) when is_integer(value), do: value
1903+ def decode_loric(_), do: {:error, "Unexpected type when decoding Staghunting.loric"}
1904+
1905+ def encode_loric(value) when is_integer(value), do: value
1906+ def encode_loric(_), do: {:error, "Unexpected type when encoding Staghunting.loric"}
1907+
1908+ def decode_membranocoriaceous(value) when is_integer(value), do: value
1909+ def decode_membranocoriaceous(_), do: {:error, "Unexpected type when decoding Staghunting.membranocoriaceous"}
1910+
1911+ def encode_membranocoriaceous(value) when is_integer(value), do: value
1912+ def encode_membranocoriaceous(_), do: {:error, "Unexpected type when encoding Staghunting.membranocoriaceous"}
1913+
1914+ def decode_membranogenic(value) when is_integer(value), do: value
1915+ def decode_membranogenic(_), do: {:error, "Unexpected type when decoding Staghunting.membranogenic"}
1916+
1917+ def encode_membranogenic(value) when is_integer(value), do: value
1918+ def encode_membranogenic(_), do: {:error, "Unexpected type when encoding Staghunting.membranogenic"}
1919+
1920+ def decode_overtrump(value) when is_integer(value), do: value
1921+ def decode_overtrump(_), do: {:error, "Unexpected type when decoding Staghunting.overtrump"}
1922+
1923+ def encode_overtrump(value) when is_integer(value), do: value
1924+ def encode_overtrump(_), do: {:error, "Unexpected type when encoding Staghunting.overtrump"}
1925+
1926+ def decode_scotino(value) when is_integer(value), do: value
1927+ def decode_scotino(_), do: {:error, "Unexpected type when decoding Staghunting.scotino"}
1928+
1929+ def encode_scotino(value) when is_integer(value), do: value
1930+ def encode_scotino(_), do: {:error, "Unexpected type when encoding Staghunting.scotino"}
1931+
1932+ def decode_seasonable(value) when is_integer(value), do: value
1933+ def decode_seasonable(_), do: {:error, "Unexpected type when decoding Staghunting.seasonable"}
1934+
1935+ def encode_seasonable(value) when is_integer(value), do: value
1936+ def encode_seasonable(_), do: {:error, "Unexpected type when encoding Staghunting.seasonable"}
1937+
1938+ def decode_sephen(value) when is_integer(value), do: value
1939+ def decode_sephen(_), do: {:error, "Unexpected type when decoding Staghunting.sephen"}
1940+
1941+ def encode_sephen(value) when is_integer(value), do: value
1942+ def encode_sephen(_), do: {:error, "Unexpected type when encoding Staghunting.sephen"}
1943+
1944+ def decode_stigmarioid(value) when is_integer(value), do: value
1945+ def decode_stigmarioid(_), do: {:error, "Unexpected type when decoding Staghunting.stigmarioid"}
1946+
1947+ def encode_stigmarioid(value) when is_integer(value), do: value
1948+ def encode_stigmarioid(_), do: {:error, "Unexpected type when encoding Staghunting.stigmarioid"}
1949+
1950+ def decode_tired(value) when is_integer(value), do: value
1951+ def decode_tired(_), do: {:error, "Unexpected type when decoding Staghunting.tired"}
1952+
1953+ def encode_tired(value) when is_integer(value), do: value
1954+ def encode_tired(_), do: {:error, "Unexpected type when encoding Staghunting.tired"}
1955+
1956+ def decode_trifid(value) when is_integer(value), do: value
1957+ def decode_trifid(_), do: {:error, "Unexpected type when decoding Staghunting.trifid"}
1958+
1959+ def encode_trifid(value) when is_integer(value), do: value
1960+ def encode_trifid(_), do: {:error, "Unexpected type when encoding Staghunting.trifid"}
1961+
1962+ def decode_undefeatedly(value) when is_integer(value), do: value
1963+ def decode_undefeatedly(_), do: {:error, "Unexpected type when decoding Staghunting.undefeatedly"}
1964+
1965+ def encode_undefeatedly(value) when is_integer(value), do: value
1966+ def encode_undefeatedly(_), do: {:error, "Unexpected type when encoding Staghunting.undefeatedly"}
1967+
1968+ def decode_ungirlish(value) when is_integer(value), do: value
1969+ def decode_ungirlish(_), do: {:error, "Unexpected type when decoding Staghunting.ungirlish"}
1970+
1971+ def encode_ungirlish(value) when is_integer(value), do: value
1972+ def encode_ungirlish(_), do: {:error, "Unexpected type when encoding Staghunting.ungirlish"}
1973+
18121974 def from_map(m) do
18131975 %Staghunting{
1814- calorimetric: m["calorimetric"],
1815- canid: m["canid"],
1816- catharticalness: m["catharticalness"],
1817- chirotherium: m["Chirotherium"],
1976+ calorimetric: m["calorimetric"] && decode_calorimetric(m["calorimetric"]),
1977+ canid: m["canid"] && decode_canid(m["canid"]),
1978+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
1979+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
18181980 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
1819- ditriglyphic: m["ditriglyphic"],
1820- floriferousness: m["floriferousness"],
1821- gamelike: m["gamelike"],
1822- grig: m["grig"],
1981+ ditriglyphic: m["ditriglyphic"] && decode_ditriglyphic(m["ditriglyphic"]),
1982+ floriferousness: m["floriferousness"] && decode_floriferousness(m["floriferousness"]),
1983+ gamelike: m["gamelike"] && decode_gamelike(m["gamelike"]),
1984+ grig: m["grig"] && decode_grig(m["grig"]),
18231985 homocerc: m["homocerc"],
1824- interloan: m["interloan"],
1825- lithotomy: m["lithotomy"],
1826- loric: m["loric"],
1827- membranocoriaceous: m["membranocoriaceous"],
1828- membranogenic: m["membranogenic"],
1986+ interloan: m["interloan"] && decode_interloan(m["interloan"]),
1987+ lithotomy: m["lithotomy"] && decode_lithotomy(m["lithotomy"]),
1988+ loric: m["loric"] && decode_loric(m["loric"]),
1989+ membranocoriaceous: m["membranocoriaceous"] && decode_membranocoriaceous(m["membranocoriaceous"]),
1990+ membranogenic: m["membranogenic"] && decode_membranogenic(m["membranogenic"]),
18291991 nonbookish: m["nonbookish"],
1830- overtrump: m["overtrump"],
1831- scotino: m["scotino"],
1832- seasonable: m["seasonable"],
1833- sephen: m["sephen"],
1834- stigmarioid: m["stigmarioid"],
1835- tired: m["tired"],
1836- trifid: m["trifid"],
1837- undefeatedly: m["undefeatedly"],
1838- ungirlish: m["ungirlish"],
1992+ overtrump: m["overtrump"] && decode_overtrump(m["overtrump"]),
1993+ scotino: m["scotino"] && decode_scotino(m["scotino"]),
1994+ seasonable: m["seasonable"] && decode_seasonable(m["seasonable"]),
1995+ sephen: m["sephen"] && decode_sephen(m["sephen"]),
1996+ stigmarioid: m["stigmarioid"] && decode_stigmarioid(m["stigmarioid"]),
1997+ tired: m["tired"] && decode_tired(m["tired"]),
1998+ trifid: m["trifid"] && decode_trifid(m["trifid"]),
1999+ undefeatedly: m["undefeatedly"] && decode_undefeatedly(m["undefeatedly"]),
2000+ ungirlish: m["ungirlish"] && decode_ungirlish(m["ungirlish"]),
18392001 }
18402002 end
18412003
@@ -1913,39 +2075,173 @@ defmodule StrenuosityClass do
19132075 yankeeist: integer() | nil
19142076 }
19152077
2078+ def decode_bliss(value) when is_integer(value), do: value
2079+ def decode_bliss(_), do: {:error, "Unexpected type when decoding StrenuosityClass.bliss"}
2080+
2081+ def encode_bliss(value) when is_integer(value), do: value
2082+ def encode_bliss(_), do: {:error, "Unexpected type when encoding StrenuosityClass.bliss"}
2083+
2084+ def decode_buccate(value) when is_integer(value), do: value
2085+ def decode_buccate(_), do: {:error, "Unexpected type when decoding StrenuosityClass.buccate"}
2086+
2087+ def encode_buccate(value) when is_integer(value), do: value
2088+ def encode_buccate(_), do: {:error, "Unexpected type when encoding StrenuosityClass.buccate"}
2089+
2090+ def decode_bulletproof(value) when is_integer(value), do: value
2091+ def decode_bulletproof(_), do: {:error, "Unexpected type when decoding StrenuosityClass.bulletproof"}
2092+
2093+ def encode_bulletproof(value) when is_integer(value), do: value
2094+ def encode_bulletproof(_), do: {:error, "Unexpected type when encoding StrenuosityClass.bulletproof"}
2095+
2096+ def decode_catharticalness(value) when is_float(value), do: value
2097+ def decode_catharticalness(value) when is_integer(value), do: value
2098+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding StrenuosityClass.catharticalness"}
2099+
2100+ def encode_catharticalness(value) when is_float(value), do: value
2101+ def encode_catharticalness(value) when is_integer(value), do: value
2102+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding StrenuosityClass.catharticalness"}
2103+
2104+ def decode_chirotherium(value) when is_integer(value), do: value
2105+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding StrenuosityClass.chirotherium"}
2106+
2107+ def encode_chirotherium(value) when is_integer(value), do: value
2108+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding StrenuosityClass.chirotherium"}
2109+
2110+ def decode_crumblingness(value) when is_integer(value), do: value
2111+ def decode_crumblingness(_), do: {:error, "Unexpected type when decoding StrenuosityClass.crumblingness"}
2112+
2113+ def encode_crumblingness(value) when is_integer(value), do: value
2114+ def encode_crumblingness(_), do: {:error, "Unexpected type when encoding StrenuosityClass.crumblingness"}
2115+
19162116 def decode_disdiapason(value) when is_binary(value), do: value
19172117 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding StrenuosityClass.disdiapason"}
19182118
19192119 def encode_disdiapason(value) when is_binary(value), do: value
19202120 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding StrenuosityClass.disdiapason"}
19212121
2122+ def decode_engagedly(value) when is_integer(value), do: value
2123+ def decode_engagedly(_), do: {:error, "Unexpected type when decoding StrenuosityClass.engagedly"}
2124+
2125+ def encode_engagedly(value) when is_integer(value), do: value
2126+ def encode_engagedly(_), do: {:error, "Unexpected type when encoding StrenuosityClass.engagedly"}
2127+
2128+ def decode_fightable(value) when is_integer(value), do: value
2129+ def decode_fightable(_), do: {:error, "Unexpected type when decoding StrenuosityClass.fightable"}
2130+
2131+ def encode_fightable(value) when is_integer(value), do: value
2132+ def encode_fightable(_), do: {:error, "Unexpected type when encoding StrenuosityClass.fightable"}
2133+
2134+ def decode_hoariness(value) when is_integer(value), do: value
2135+ def decode_hoariness(_), do: {:error, "Unexpected type when decoding StrenuosityClass.hoariness"}
2136+
2137+ def encode_hoariness(value) when is_integer(value), do: value
2138+ def encode_hoariness(_), do: {:error, "Unexpected type when encoding StrenuosityClass.hoariness"}
2139+
2140+ def decode_hypopodium(value) when is_integer(value), do: value
2141+ def decode_hypopodium(_), do: {:error, "Unexpected type when decoding StrenuosityClass.hypopodium"}
2142+
2143+ def encode_hypopodium(value) when is_integer(value), do: value
2144+ def encode_hypopodium(_), do: {:error, "Unexpected type when encoding StrenuosityClass.hypopodium"}
2145+
2146+ def decode_luxurist(value) when is_integer(value), do: value
2147+ def decode_luxurist(_), do: {:error, "Unexpected type when decoding StrenuosityClass.luxurist"}
2148+
2149+ def encode_luxurist(value) when is_integer(value), do: value
2150+ def encode_luxurist(_), do: {:error, "Unexpected type when encoding StrenuosityClass.luxurist"}
2151+
2152+ def decode_mechanician(value) when is_integer(value), do: value
2153+ def decode_mechanician(_), do: {:error, "Unexpected type when decoding StrenuosityClass.mechanician"}
2154+
2155+ def encode_mechanician(value) when is_integer(value), do: value
2156+ def encode_mechanician(_), do: {:error, "Unexpected type when encoding StrenuosityClass.mechanician"}
2157+
2158+ def decode_onopordon(value) when is_integer(value), do: value
2159+ def decode_onopordon(_), do: {:error, "Unexpected type when decoding StrenuosityClass.onopordon"}
2160+
2161+ def encode_onopordon(value) when is_integer(value), do: value
2162+ def encode_onopordon(_), do: {:error, "Unexpected type when encoding StrenuosityClass.onopordon"}
2163+
2164+ def decode_podgily(value) when is_integer(value), do: value
2165+ def decode_podgily(_), do: {:error, "Unexpected type when decoding StrenuosityClass.podgily"}
2166+
2167+ def encode_podgily(value) when is_integer(value), do: value
2168+ def encode_podgily(_), do: {:error, "Unexpected type when encoding StrenuosityClass.podgily"}
2169+
2170+ def decode_reformableness(value) when is_integer(value), do: value
2171+ def decode_reformableness(_), do: {:error, "Unexpected type when decoding StrenuosityClass.reformableness"}
2172+
2173+ def encode_reformableness(value) when is_integer(value), do: value
2174+ def encode_reformableness(_), do: {:error, "Unexpected type when encoding StrenuosityClass.reformableness"}
2175+
2176+ def decode_scatterbrains(value) when is_integer(value), do: value
2177+ def decode_scatterbrains(_), do: {:error, "Unexpected type when decoding StrenuosityClass.scatterbrains"}
2178+
2179+ def encode_scatterbrains(value) when is_integer(value), do: value
2180+ def encode_scatterbrains(_), do: {:error, "Unexpected type when encoding StrenuosityClass.scatterbrains"}
2181+
2182+ def decode_seminuria(value) when is_integer(value), do: value
2183+ def decode_seminuria(_), do: {:error, "Unexpected type when decoding StrenuosityClass.seminuria"}
2184+
2185+ def encode_seminuria(value) when is_integer(value), do: value
2186+ def encode_seminuria(_), do: {:error, "Unexpected type when encoding StrenuosityClass.seminuria"}
2187+
2188+ def decode_sodomite(value) when is_integer(value), do: value
2189+ def decode_sodomite(_), do: {:error, "Unexpected type when decoding StrenuosityClass.sodomite"}
2190+
2191+ def encode_sodomite(value) when is_integer(value), do: value
2192+ def encode_sodomite(_), do: {:error, "Unexpected type when encoding StrenuosityClass.sodomite"}
2193+
2194+ def decode_tramp(value) when is_integer(value), do: value
2195+ def decode_tramp(_), do: {:error, "Unexpected type when decoding StrenuosityClass.tramp"}
2196+
2197+ def encode_tramp(value) when is_integer(value), do: value
2198+ def encode_tramp(_), do: {:error, "Unexpected type when encoding StrenuosityClass.tramp"}
2199+
2200+ def decode_undueness(value) when is_integer(value), do: value
2201+ def decode_undueness(_), do: {:error, "Unexpected type when decoding StrenuosityClass.undueness"}
2202+
2203+ def encode_undueness(value) when is_integer(value), do: value
2204+ def encode_undueness(_), do: {:error, "Unexpected type when encoding StrenuosityClass.undueness"}
2205+
2206+ def decode_worthily(value) when is_integer(value), do: value
2207+ def decode_worthily(_), do: {:error, "Unexpected type when decoding StrenuosityClass.worthily"}
2208+
2209+ def encode_worthily(value) when is_integer(value), do: value
2210+ def encode_worthily(_), do: {:error, "Unexpected type when encoding StrenuosityClass.worthily"}
2211+
2212+ def decode_yankeeist(value) when is_integer(value), do: value
2213+ def decode_yankeeist(_), do: {:error, "Unexpected type when decoding StrenuosityClass.yankeeist"}
2214+
2215+ def encode_yankeeist(value) when is_integer(value), do: value
2216+ def encode_yankeeist(_), do: {:error, "Unexpected type when encoding StrenuosityClass.yankeeist"}
2217+
19222218 def from_map(m) do
19232219 %StrenuosityClass{
1924- bliss: m["bliss"],
1925- buccate: m["buccate"],
1926- bulletproof: m["bulletproof"],
1927- catharticalness: m["catharticalness"],
1928- chirotherium: m["Chirotherium"],
1929- crumblingness: m["crumblingness"],
2220+ bliss: m["bliss"] && decode_bliss(m["bliss"]),
2221+ buccate: m["buccate"] && decode_buccate(m["buccate"]),
2222+ bulletproof: m["bulletproof"] && decode_bulletproof(m["bulletproof"]),
2223+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
2224+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
2225+ crumblingness: m["crumblingness"] && decode_crumblingness(m["crumblingness"]),
19302226 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
1931- engagedly: m["engagedly"],
1932- fightable: m["fightable"],
1933- hoariness: m["hoariness"],
2227+ engagedly: m["engagedly"] && decode_engagedly(m["engagedly"]),
2228+ fightable: m["fightable"] && decode_fightable(m["fightable"]),
2229+ hoariness: m["hoariness"] && decode_hoariness(m["hoariness"]),
19342230 homocerc: m["homocerc"],
1935- hypopodium: m["hypopodium"],
1936- luxurist: m["luxurist"],
1937- mechanician: m["mechanician"],
2231+ hypopodium: m["hypopodium"] && decode_hypopodium(m["hypopodium"]),
2232+ luxurist: m["luxurist"] && decode_luxurist(m["luxurist"]),
2233+ mechanician: m["mechanician"] && decode_mechanician(m["mechanician"]),
19382234 nonbookish: m["nonbookish"],
1939- onopordon: m["Onopordon"],
1940- podgily: m["podgily"],
1941- reformableness: m["reformableness"],
1942- scatterbrains: m["scatterbrains"],
1943- seminuria: m["seminuria"],
1944- sodomite: m["Sodomite"],
1945- tramp: m["tramp"],
1946- undueness: m["undueness"],
1947- worthily: m["worthily"],
1948- yankeeist: m["Yankeeist"],
2235+ onopordon: m["Onopordon"] && decode_onopordon(m["Onopordon"]),
2236+ podgily: m["podgily"] && decode_podgily(m["podgily"]),
2237+ reformableness: m["reformableness"] && decode_reformableness(m["reformableness"]),
2238+ scatterbrains: m["scatterbrains"] && decode_scatterbrains(m["scatterbrains"]),
2239+ seminuria: m["seminuria"] && decode_seminuria(m["seminuria"]),
2240+ sodomite: m["Sodomite"] && decode_sodomite(m["Sodomite"]),
2241+ tramp: m["tramp"] && decode_tramp(m["tramp"]),
2242+ undueness: m["undueness"] && decode_undueness(m["undueness"]),
2243+ worthily: m["worthily"] && decode_worthily(m["worthily"]),
2244+ yankeeist: m["Yankeeist"] && decode_yankeeist(m["Yankeeist"]),
19492245 }
19502246 end
19512247
@@ -2023,6 +2319,20 @@ defmodule TruantcyClass do
20232319 yuman: nil | nil
20242320 }
20252321
2322+ def decode_catharticalness(value) when is_float(value), do: value
2323+ def decode_catharticalness(value) when is_integer(value), do: value
2324+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding TruantcyClass.catharticalness"}
2325+
2326+ def encode_catharticalness(value) when is_float(value), do: value
2327+ def encode_catharticalness(value) when is_integer(value), do: value
2328+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding TruantcyClass.catharticalness"}
2329+
2330+ def decode_chirotherium(value) when is_integer(value), do: value
2331+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding TruantcyClass.chirotherium"}
2332+
2333+ def encode_chirotherium(value) when is_integer(value), do: value
2334+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding TruantcyClass.chirotherium"}
2335+
20262336 def decode_disdiapason(value) when is_binary(value), do: value
20272337 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding TruantcyClass.disdiapason"}
20282338
@@ -2034,9 +2344,9 @@ defmodule TruantcyClass do
20342344 alfiona: m["alfiona"],
20352345 ascaridiasis: m["ascaridiasis"],
20362346 bungey: m["bungey"],
2037- catharticalness: m["catharticalness"],
2347+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
20382348 ceroxyle: m["ceroxyle"],
2039- chirotherium: m["Chirotherium"],
2349+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
20402350 chorology: m["chorology"],
20412351 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
20422352 enmarble: m["enmarble"],
@@ -2133,39 +2443,173 @@ defmodule UnimpeachablyClass do
21332443 unsuggestedness: integer() | nil
21342444 }
21352445
2446+ def decode_acerin(value) when is_integer(value), do: value
2447+ def decode_acerin(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.acerin"}
2448+
2449+ def encode_acerin(value) when is_integer(value), do: value
2450+ def encode_acerin(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.acerin"}
2451+
2452+ def decode_bobadil(value) when is_integer(value), do: value
2453+ def decode_bobadil(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.bobadil"}
2454+
2455+ def encode_bobadil(value) when is_integer(value), do: value
2456+ def encode_bobadil(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.bobadil"}
2457+
2458+ def decode_catharticalness(value) when is_float(value), do: value
2459+ def decode_catharticalness(value) when is_integer(value), do: value
2460+ def decode_catharticalness(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.catharticalness"}
2461+
2462+ def encode_catharticalness(value) when is_float(value), do: value
2463+ def encode_catharticalness(value) when is_integer(value), do: value
2464+ def encode_catharticalness(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.catharticalness"}
2465+
2466+ def decode_chirotherium(value) when is_integer(value), do: value
2467+ def decode_chirotherium(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.chirotherium"}
2468+
2469+ def encode_chirotherium(value) when is_integer(value), do: value
2470+ def encode_chirotherium(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.chirotherium"}
2471+
2472+ def decode_chlorophylligenous(value) when is_integer(value), do: value
2473+ def decode_chlorophylligenous(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.chlorophylligenous"}
2474+
2475+ def encode_chlorophylligenous(value) when is_integer(value), do: value
2476+ def encode_chlorophylligenous(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.chlorophylligenous"}
2477+
2478+ def decode_conversational(value) when is_integer(value), do: value
2479+ def decode_conversational(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.conversational"}
2480+
2481+ def encode_conversational(value) when is_integer(value), do: value
2482+ def encode_conversational(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.conversational"}
2483+
2484+ def decode_demiowl(value) when is_integer(value), do: value
2485+ def decode_demiowl(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.demiowl"}
2486+
2487+ def encode_demiowl(value) when is_integer(value), do: value
2488+ def encode_demiowl(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.demiowl"}
2489+
21362490 def decode_disdiapason(value) when is_binary(value), do: value
21372491 def decode_disdiapason(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.disdiapason"}
21382492
21392493 def encode_disdiapason(value) when is_binary(value), do: value
21402494 def encode_disdiapason(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.disdiapason"}
21412495
2496+ def decode_ectorhinal(value) when is_integer(value), do: value
2497+ def decode_ectorhinal(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.ectorhinal"}
2498+
2499+ def encode_ectorhinal(value) when is_integer(value), do: value
2500+ def encode_ectorhinal(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.ectorhinal"}
2501+
2502+ def decode_gamblesomeness(value) when is_integer(value), do: value
2503+ def decode_gamblesomeness(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.gamblesomeness"}
2504+
2505+ def encode_gamblesomeness(value) when is_integer(value), do: value
2506+ def encode_gamblesomeness(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.gamblesomeness"}
2507+
2508+ def decode_irrorate(value) when is_integer(value), do: value
2509+ def decode_irrorate(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.irrorate"}
2510+
2511+ def encode_irrorate(value) when is_integer(value), do: value
2512+ def encode_irrorate(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.irrorate"}
2513+
2514+ def decode_kindergartening(value) when is_integer(value), do: value
2515+ def decode_kindergartening(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.kindergartening"}
2516+
2517+ def encode_kindergartening(value) when is_integer(value), do: value
2518+ def encode_kindergartening(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.kindergartening"}
2519+
2520+ def decode_lateritic(value) when is_integer(value), do: value
2521+ def decode_lateritic(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.lateritic"}
2522+
2523+ def encode_lateritic(value) when is_integer(value), do: value
2524+ def encode_lateritic(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.lateritic"}
2525+
2526+ def decode_mespil(value) when is_integer(value), do: value
2527+ def decode_mespil(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.mespil"}
2528+
2529+ def encode_mespil(value) when is_integer(value), do: value
2530+ def encode_mespil(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.mespil"}
2531+
2532+ def decode_misconfiguration(value) when is_integer(value), do: value
2533+ def decode_misconfiguration(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.misconfiguration"}
2534+
2535+ def encode_misconfiguration(value) when is_integer(value), do: value
2536+ def encode_misconfiguration(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.misconfiguration"}
2537+
2538+ def decode_planometry(value) when is_integer(value), do: value
2539+ def decode_planometry(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.planometry"}
2540+
2541+ def encode_planometry(value) when is_integer(value), do: value
2542+ def encode_planometry(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.planometry"}
2543+
2544+ def decode_quiina(value) when is_integer(value), do: value
2545+ def decode_quiina(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.quiina"}
2546+
2547+ def encode_quiina(value) when is_integer(value), do: value
2548+ def encode_quiina(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.quiina"}
2549+
2550+ def decode_robert(value) when is_integer(value), do: value
2551+ def decode_robert(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.robert"}
2552+
2553+ def encode_robert(value) when is_integer(value), do: value
2554+ def encode_robert(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.robert"}
2555+
2556+ def decode_rot(value) when is_integer(value), do: value
2557+ def decode_rot(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.rot"}
2558+
2559+ def encode_rot(value) when is_integer(value), do: value
2560+ def encode_rot(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.rot"}
2561+
2562+ def decode_subcinctorium(value) when is_integer(value), do: value
2563+ def decode_subcinctorium(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.subcinctorium"}
2564+
2565+ def encode_subcinctorium(value) when is_integer(value), do: value
2566+ def encode_subcinctorium(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.subcinctorium"}
2567+
2568+ def decode_tussocker(value) when is_integer(value), do: value
2569+ def decode_tussocker(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.tussocker"}
2570+
2571+ def encode_tussocker(value) when is_integer(value), do: value
2572+ def encode_tussocker(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.tussocker"}
2573+
2574+ def decode_ultraproud(value) when is_integer(value), do: value
2575+ def decode_ultraproud(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.ultraproud"}
2576+
2577+ def encode_ultraproud(value) when is_integer(value), do: value
2578+ def encode_ultraproud(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.ultraproud"}
2579+
2580+ def decode_unsuggestedness(value) when is_integer(value), do: value
2581+ def decode_unsuggestedness(_), do: {:error, "Unexpected type when decoding UnimpeachablyClass.unsuggestedness"}
2582+
2583+ def encode_unsuggestedness(value) when is_integer(value), do: value
2584+ def encode_unsuggestedness(_), do: {:error, "Unexpected type when encoding UnimpeachablyClass.unsuggestedness"}
2585+
21422586 def from_map(m) do
21432587 %UnimpeachablyClass{
2144- acerin: m["acerin"],
2145- bobadil: m["Bobadil"],
2146- catharticalness: m["catharticalness"],
2147- chirotherium: m["Chirotherium"],
2148- chlorophylligenous: m["chlorophylligenous"],
2149- conversational: m["conversational"],
2150- demiowl: m["demiowl"],
2588+ acerin: m["acerin"] && decode_acerin(m["acerin"]),
2589+ bobadil: m["Bobadil"] && decode_bobadil(m["Bobadil"]),
2590+ catharticalness: m["catharticalness"] && decode_catharticalness(m["catharticalness"]),
2591+ chirotherium: m["Chirotherium"] && decode_chirotherium(m["Chirotherium"]),
2592+ chlorophylligenous: m["chlorophylligenous"] && decode_chlorophylligenous(m["chlorophylligenous"]),
2593+ conversational: m["conversational"] && decode_conversational(m["conversational"]),
2594+ demiowl: m["demiowl"] && decode_demiowl(m["demiowl"]),
21512595 disdiapason: m["disdiapason"] && decode_disdiapason(m["disdiapason"]),
2152- ectorhinal: m["ectorhinal"],
2153- gamblesomeness: m["gamblesomeness"],
2596+ ectorhinal: m["ectorhinal"] && decode_ectorhinal(m["ectorhinal"]),
2597+ gamblesomeness: m["gamblesomeness"] && decode_gamblesomeness(m["gamblesomeness"]),
21542598 homocerc: m["homocerc"],
2155- irrorate: m["irrorate"],
2156- kindergartening: m["kindergartening"],
2157- lateritic: m["lateritic"],
2158- mespil: m["mespil"],
2159- misconfiguration: m["misconfiguration"],
2599+ irrorate: m["irrorate"] && decode_irrorate(m["irrorate"]),
2600+ kindergartening: m["kindergartening"] && decode_kindergartening(m["kindergartening"]),
2601+ lateritic: m["lateritic"] && decode_lateritic(m["lateritic"]),
2602+ mespil: m["mespil"] && decode_mespil(m["mespil"]),
2603+ misconfiguration: m["misconfiguration"] && decode_misconfiguration(m["misconfiguration"]),
21602604 nonbookish: m["nonbookish"],
2161- planometry: m["planometry"],
2162- quiina: m["Quiina"],
2163- robert: m["Robert"],
2164- rot: m["rot"],
2165- subcinctorium: m["subcinctorium"],
2166- tussocker: m["tussocker"],
2167- ultraproud: m["ultraproud"],
2168- unsuggestedness: m["unsuggestedness"],
2605+ planometry: m["planometry"] && decode_planometry(m["planometry"]),
2606+ quiina: m["Quiina"] && decode_quiina(m["Quiina"]),
2607+ robert: m["Robert"] && decode_robert(m["Robert"]),
2608+ rot: m["rot"] && decode_rot(m["rot"]),
2609+ subcinctorium: m["subcinctorium"] && decode_subcinctorium(m["subcinctorium"]),
2610+ tussocker: m["tussocker"] && decode_tussocker(m["tussocker"]),
2611+ ultraproud: m["ultraproud"] && decode_ultraproud(m["ultraproud"]),
2612+ unsuggestedness: m["unsuggestedness"] && decode_unsuggestedness(m["unsuggestedness"]),
21692613 }
21702614 end
Atypescript-effect-schemajust-schema-true--8c4ca457bcba / TopLevel.ts+440 −0
@@ -0,0 +1,440 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class WrothyClass extends S.Class<WrothyClass>("WrothyClass")({
5+ "Aeschynanthus": S.Null,
6+ "aquiferous": S.Null,
7+ "cheapener": S.Null,
8+ "enumeration": S.Null,
9+ "Ephesine": S.Null,
10+ "escadrille": S.Null,
11+ "estrous": S.Null,
12+ "interestedly": S.Null,
13+ "katakinetomer": S.Null,
14+ "mortification": S.Null,
15+ "morula": S.Null,
16+ "orthosymmetrical": S.Null,
17+ "overbark": S.Null,
18+ "politist": S.Null,
19+ "qualified": S.Null,
20+ "sphenomalar": S.Null,
21+ "throatful": S.Null,
22+ "transhumance": S.Null,
23+ "triandrian": S.Null,
24+ "unbooked": S.Null,
25+}) {}
26+
27+export class UnstressedClass extends S.Class<UnstressedClass>("UnstressedClass")({
28+ "Alain": S.Null,
29+ "Amphirhina": S.Null,
30+ "antimachinery": S.Null,
31+ "coldish": S.Null,
32+ "crantara": S.Null,
33+ "distinguishing": S.Null,
34+ "elytroposis": S.Null,
35+ "gentianwort": S.Null,
36+ "heliosis": S.Null,
37+ "instrumental": S.Null,
38+ "introinflection": S.Null,
39+ "kala": S.Null,
40+ "Lincolnian": S.Null,
41+ "metad": S.Null,
42+ "Sarcophilus": S.Null,
43+ "swingingly": S.Null,
44+ "unconformity": S.Null,
45+ "undecreed": S.Null,
46+ "venerable": S.Null,
47+ "vowellessness": S.Null,
48+}) {}
49+
50+export class UnimpeachablyClass extends S.Class<UnimpeachablyClass>("UnimpeachablyClass")({
51+ "acerin": S.optional(S.NullOr(S.Int)),
52+ "Bobadil": S.optional(S.NullOr(S.Int)),
53+ "catharticalness": S.optional(S.NullOr(S.Number)),
54+ "Chirotherium": S.optional(S.NullOr(S.Int)),
55+ "chlorophylligenous": S.optional(S.NullOr(S.Int)),
56+ "conversational": S.optional(S.NullOr(S.Int)),
57+ "demiowl": S.optional(S.NullOr(S.Int)),
58+ "disdiapason": S.optional(S.NullOr(S.String)),
59+ "ectorhinal": S.optional(S.NullOr(S.Int)),
60+ "gamblesomeness": S.optional(S.NullOr(S.Int)),
61+ "homocerc": S.optional(S.NullOr(S.Boolean)),
62+ "irrorate": S.optional(S.NullOr(S.Int)),
63+ "kindergartening": S.optional(S.NullOr(S.Int)),
64+ "lateritic": S.optional(S.NullOr(S.Int)),
65+ "mespil": S.optional(S.NullOr(S.Int)),
66+ "misconfiguration": S.optional(S.NullOr(S.Int)),
67+ "nonbookish": S.optional(S.Null),
68+ "planometry": S.optional(S.NullOr(S.Int)),
69+ "Quiina": S.optional(S.NullOr(S.Int)),
70+ "Robert": S.optional(S.NullOr(S.Int)),
71+ "rot": S.optional(S.NullOr(S.Int)),
72+ "subcinctorium": S.optional(S.NullOr(S.Int)),
73+ "tussocker": S.optional(S.NullOr(S.Int)),
74+ "ultraproud": S.optional(S.NullOr(S.Int)),
75+ "unsuggestedness": S.optional(S.NullOr(S.Int)),
76+}) {}
77+
78+export class TruantcyClass extends S.Class<TruantcyClass>("TruantcyClass")({
79+ "alfiona": S.optional(S.Null),
80+ "ascaridiasis": S.optional(S.Null),
81+ "bungey": S.optional(S.Null),
82+ "catharticalness": S.optional(S.NullOr(S.Number)),
83+ "ceroxyle": S.optional(S.Null),
84+ "Chirotherium": S.optional(S.NullOr(S.Int)),
85+ "chorology": S.optional(S.Null),
86+ "disdiapason": S.optional(S.NullOr(S.String)),
87+ "enmarble": S.optional(S.Null),
88+ "Epeira": S.optional(S.Null),
89+ "Eurylaimi": S.optional(S.Null),
90+ "germination": S.optional(S.Null),
91+ "hallelujah": S.optional(S.Null),
92+ "homocerc": S.optional(S.NullOr(S.Boolean)),
93+ "lev": S.optional(S.Null),
94+ "mouthing": S.optional(S.Null),
95+ "nonbookish": S.optional(S.Null),
96+ "philliloo": S.optional(S.Null),
97+ "planetal": S.optional(S.Null),
98+ "poney": S.optional(S.Null),
99+ "punctualist": S.optional(S.Null),
100+ "returnlessly": S.optional(S.Null),
101+ "skelder": S.optional(S.Null),
102+ "windwaywardly": S.optional(S.Null),
103+ "Yuman": S.optional(S.Null),
104+}) {}
105+
106+export class StrenuosityClass extends S.Class<StrenuosityClass>("StrenuosityClass")({
107+ "bliss": S.optional(S.NullOr(S.Int)),
108+ "buccate": S.optional(S.NullOr(S.Int)),
109+ "bulletproof": S.optional(S.NullOr(S.Int)),
110+ "catharticalness": S.optional(S.NullOr(S.Number)),
111+ "Chirotherium": S.optional(S.NullOr(S.Int)),
112+ "crumblingness": S.optional(S.NullOr(S.Int)),
113+ "disdiapason": S.optional(S.NullOr(S.String)),
114+ "engagedly": S.optional(S.NullOr(S.Int)),
115+ "fightable": S.optional(S.NullOr(S.Int)),
116+ "hoariness": S.optional(S.NullOr(S.Int)),
117+ "homocerc": S.optional(S.NullOr(S.Boolean)),
118+ "hypopodium": S.optional(S.NullOr(S.Int)),
119+ "luxurist": S.optional(S.NullOr(S.Int)),
120+ "mechanician": S.optional(S.NullOr(S.Int)),
121+ "nonbookish": S.optional(S.Null),
122+ "Onopordon": S.optional(S.NullOr(S.Int)),
123+ "podgily": S.optional(S.NullOr(S.Int)),
124+ "reformableness": S.optional(S.NullOr(S.Int)),
125+ "scatterbrains": S.optional(S.NullOr(S.Int)),
126+ "seminuria": S.optional(S.NullOr(S.Int)),
127+ "Sodomite": S.optional(S.NullOr(S.Int)),
128+ "tramp": S.optional(S.NullOr(S.Int)),
129+ "undueness": S.optional(S.NullOr(S.Int)),
130+ "worthily": S.optional(S.NullOr(S.Int)),
131+ "Yankeeist": S.optional(S.NullOr(S.Int)),
132+}) {}
133+
134+export class Staghunting extends S.Class<Staghunting>("Staghunting")({
135+ "calorimetric": S.optional(S.NullOr(S.Int)),
136+ "canid": S.optional(S.NullOr(S.Int)),
137+ "catharticalness": S.optional(S.NullOr(S.Number)),
138+ "Chirotherium": S.optional(S.NullOr(S.Int)),
139+ "disdiapason": S.optional(S.NullOr(S.String)),
140+ "ditriglyphic": S.optional(S.NullOr(S.Int)),
141+ "floriferousness": S.optional(S.NullOr(S.Int)),
142+ "gamelike": S.optional(S.NullOr(S.Int)),
143+ "grig": S.optional(S.NullOr(S.Int)),
144+ "homocerc": S.optional(S.NullOr(S.Boolean)),
145+ "interloan": S.optional(S.NullOr(S.Int)),
146+ "lithotomy": S.optional(S.NullOr(S.Int)),
147+ "loric": S.optional(S.NullOr(S.Int)),
148+ "membranocoriaceous": S.optional(S.NullOr(S.Int)),
149+ "membranogenic": S.optional(S.NullOr(S.Int)),
150+ "nonbookish": S.optional(S.Null),
151+ "overtrump": S.optional(S.NullOr(S.Int)),
152+ "scotino": S.optional(S.NullOr(S.Int)),
153+ "seasonable": S.optional(S.NullOr(S.Int)),
154+ "sephen": S.optional(S.NullOr(S.Int)),
155+ "stigmarioid": S.optional(S.NullOr(S.Int)),
156+ "tired": S.optional(S.NullOr(S.Int)),
157+ "trifid": S.optional(S.NullOr(S.Int)),
158+ "undefeatedly": S.optional(S.NullOr(S.Int)),
159+ "ungirlish": S.optional(S.NullOr(S.Int)),
160+}) {}
161+
162+export class SisteringClass extends S.Class<SisteringClass>("SisteringClass")({
163+ "amphicarpic": S.Null,
164+ "Chianti": S.Null,
165+ "frigorific": S.Null,
166+ "Haplomi": S.Null,
167+ "hyperkinesis": S.Null,
168+ "laudable": S.Null,
169+ "madwoman": S.Null,
170+ "maimedly": S.Null,
171+ "Micropterygidae": S.Null,
172+ "microrhabdus": S.Null,
173+ "nondense": S.Null,
174+ "phlebemphraxis": S.Null,
175+ "redsear": S.Null,
176+ "schismatical": S.Null,
177+ "tartryl": S.Null,
178+ "unabhorred": S.Null,
179+ "undeliberateness": S.Null,
180+ "unmixable": S.Null,
181+ "untruckling": S.Null,
182+ "vineal": S.Null,
183+}) {}
184+
185+export class Scatty extends S.Class<Scatty>("Scatty")({
186+ "aeriferous": S.Null,
187+ "antical": S.Null,
188+ "antighostism": S.Null,
189+ "arcanum": S.Null,
190+ "autotrophy": S.Null,
191+ "baronial": S.Null,
192+ "caffeine": S.Null,
193+ "gorgoniacean": S.Null,
194+ "heroical": S.Null,
195+ "hydropical": S.Null,
196+ "mechanology": S.Null,
197+ "musicopoetic": S.Null,
198+ "officiality": S.Null,
199+ "oftentimes": S.Null,
200+ "ophthalmotonometer": S.Null,
201+ "reflectively": S.Null,
202+ "springer": S.Null,
203+ "Tabasco": S.Null,
204+ "teleianthous": S.Null,
205+ "uncombated": S.Null,
206+}) {}
207+
208+export class SaxtenClass extends S.Class<SaxtenClass>("SaxtenClass")({
209+ "algarrobilla": S.optional(S.Null),
210+ "bowgrace": S.optional(S.Null),
211+ "catharticalness": S.optional(S.NullOr(S.Number)),
212+ "Centaurid": S.optional(S.Null),
213+ "Chirotherium": S.optional(S.NullOr(S.Int)),
214+ "disdiapason": S.optional(S.NullOr(S.String)),
215+ "flix": S.optional(S.Null),
216+ "germanely": S.optional(S.Null),
217+ "homocerc": S.optional(S.NullOr(S.Boolean)),
218+ "inhume": S.optional(S.Null),
219+ "lepidote": S.optional(S.Null),
220+ "megalochirous": S.optional(S.Null),
221+ "ninepenny": S.optional(S.Null),
222+ "nonbookish": S.optional(S.Null),
223+ "nondeist": S.optional(S.Null),
224+ "nymphaeaceous": S.optional(S.Null),
225+ "parietofrontal": S.optional(S.Null),
226+ "sancyite": S.optional(S.Null),
227+ "subjectivist": S.optional(S.Null),
228+ "tibiad": S.optional(S.Null),
229+ "transonic": S.optional(S.Null),
230+ "tripetalous": S.optional(S.Null),
231+ "trunchman": S.optional(S.Null),
232+ "urger": S.optional(S.Null),
233+ "withdrawnness": S.optional(S.Null),
234+}) {}
235+
236+export class SantirClass extends S.Class<SantirClass>("SantirClass")({
237+ "admiredly": S.Null,
238+ "demicaponier": S.Null,
239+ "epitympanic": S.Null,
240+ "investitor": S.Null,
241+ "lupiform": S.Null,
242+ "monoflagellate": S.Null,
243+ "paleoethnic": S.Null,
244+ "prediscountable": S.Null,
245+ "rhetoricals": S.Null,
246+ "roomth": S.Null,
247+ "saccharose": S.Null,
248+ "septonasal": S.Null,
249+ "serpenticide": S.Null,
250+ "setarious": S.Null,
251+ "spaework": S.Null,
252+ "stylite": S.Null,
253+ "Suessiones": S.Null,
254+ "timelily": S.Null,
255+ "unprofaned": S.Null,
256+ "vorticular": S.Null,
257+}) {}
258+
259+export class RewriteClass extends S.Class<RewriteClass>("RewriteClass")({
260+ "accountancy": S.Null,
261+ "cacotrophic": S.Null,
262+ "contest": S.Null,
263+ "couthily": S.Null,
264+ "falculate": S.Null,
265+ "foreseize": S.Null,
266+ "Hyades": S.Null,
267+ "lemnad": S.Null,
268+ "monotheistically": S.Null,
269+ "nonflying": S.Null,
270+ "Ptenoglossa": S.Null,
271+ "repatch": S.Null,
272+ "rodman": S.Null,
273+ "strung": S.Null,
274+ "titmal": S.Null,
275+ "twalpennyworth": S.Null,
276+ "unblamable": S.Null,
277+ "vertical": S.Null,
278+ "Whiggification": S.Null,
279+ "yardman": S.Null,
280+}) {}
281+
282+export class Ressaut extends S.Class<Ressaut>("Ressaut")({
283+ "apperceptive": S.String,
284+ "cuttoo": S.String,
285+ "douser": S.String,
286+ "drinkproof": S.String,
287+ "forementioned": S.String,
288+ "Freesia": S.String,
289+ "Genevieve": S.String,
290+ "hyperdiabolical": S.String,
291+ "hypocone": S.String,
292+ "irreverentially": S.String,
293+ "jumart": S.String,
294+ "Mimosaceae": S.String,
295+ "mollicrush": S.String,
296+ "nedder": S.String,
297+ "retinasphalt": S.String,
298+ "sough": S.String,
299+ "steading": S.String,
300+ "Theopaschitism": S.String,
301+ "undurableness": S.String,
302+ "unmingleable": S.String,
303+}) {}
304+
305+export class Reimagine extends S.Class<Reimagine>("Reimagine")({
306+ "adducible": S.optional(S.Null),
307+ "anabolin": S.optional(S.Null),
308+ "brainy": S.optional(S.Null),
309+ "catharticalness": S.optional(S.NullOr(S.Number)),
310+ "Chirotherium": S.optional(S.NullOr(S.Int)),
311+ "chrysamine": S.optional(S.Null),
312+ "disdiapason": S.optional(S.NullOr(S.String)),
313+ "fluxweed": S.optional(S.Null),
314+ "glaucine": S.optional(S.Null),
315+ "grobianism": S.optional(S.Null),
316+ "Hermo": S.optional(S.Null),
317+ "hieroglyphist": S.optional(S.Null),
318+ "homocerc": S.optional(S.NullOr(S.Boolean)),
319+ "icteroid": S.optional(S.Null),
320+ "immortal": S.optional(S.Null),
321+ "impetulant": S.optional(S.Null),
322+ "irrigate": S.optional(S.Null),
323+ "myxedema": S.optional(S.Null),
324+ "nonbookish": S.optional(S.Null),
325+ "onyx": S.optional(S.Null),
326+ "repasser": S.optional(S.Null),
327+ "septomarginal": S.optional(S.Null),
328+ "subdie": S.optional(S.Null),
329+ "tibiometatarsal": S.optional(S.Null),
330+ "waltzlike": S.optional(S.Null),
331+}) {}
332+
333+export class QuebrachineClass extends S.Class<QuebrachineClass>("QuebrachineClass")({
334+ "catharticalness": S.Number,
335+ "Chirotherium": S.Int,
336+ "disdiapason": S.String,
337+ "homocerc": S.Boolean,
338+ "nonbookish": S.Null,
339+}) {}
340+
341+export class PyodermiaClass extends S.Class<PyodermiaClass>("PyodermiaClass")({
342+ "aphoristically": S.Null,
343+ "apophyllous": S.Null,
344+ "cognize": S.Null,
345+ "dermonosology": S.Null,
346+ "Gyppo": S.Null,
347+ "ither": S.Null,
348+ "juglandaceous": S.Null,
349+ "litho": S.Null,
350+ "macropterous": S.Null,
351+ "photographer": S.Null,
352+ "romancing": S.Null,
353+ "rumness": S.Null,
354+ "somniloquist": S.Null,
355+ "stressfully": S.Null,
356+ "tactically": S.Null,
357+ "tracheophony": S.Null,
358+ "unappositely": S.Null,
359+ "unclothedly": S.Null,
360+ "unimplied": S.Null,
361+ "unsyncopated": S.Null,
362+}) {}
363+
364+export class PulpitismClass extends S.Class<PulpitismClass>("PulpitismClass")({
365+ "abnet": S.Null,
366+ "buckhorn": S.Null,
367+ "calciform": S.Null,
368+ "chelophore": S.Null,
369+ "cogitation": S.Null,
370+ "decreeable": S.Null,
371+ "despicable": S.Null,
372+ "isodiazo": S.Null,
373+ "jadedly": S.Null,
374+ "leptochlorite": S.Null,
375+ "nursling": S.Null,
376+ "palamedean": S.Null,
377+ "photoheliograph": S.Null,
378+ "pipewood": S.Null,
379+ "roberd": S.Null,
380+ "statable": S.Null,
381+ "superassume": S.Null,
382+ "syllabe": S.Null,
383+ "toughhead": S.Null,
384+ "underburn": S.Null,
385+}) {}
386+
387+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
388+ "protrusive": S.Array(S.Union(S.Array(S.NullOr(S.Int)), S.Number)),
389+ "pulpitism": S.Array(S.Union(S.Array(S.Int), S.Number, PulpitismClass)),
390+ "pyodermia": S.Array(S.Union(S.Int, PyodermiaClass)),
391+ "quebrachine": S.Array(S.Union(S.Boolean, QuebrachineClass, S.Null)),
392+ "querier": S.Array(S.Union(S.Boolean, S.Record({ key: S.String, value: S.Int}))),
393+ "rebarbative": S.Array(S.Union(S.Array(S.Int), S.Boolean, S.Number)),
394+ "reimagine": S.Array(Reimagine),
395+ "ressaut": Ressaut,
396+ "retrocervical": S.Array(S.Union(S.Array(S.NullOr(S.Int)), S.Int)),
397+ "revert": S.Array(S.Union(S.Boolean, S.String)),
398+ "rewrite": S.Array(S.Union(S.Array(S.Null), S.Number, RewriteClass)),
399+ "saccoderm": S.Array(S.Union(S.Array(S.Int), S.String, S.Null)),
400+ "santir": S.Array(S.Union(S.Number, SantirClass)),
401+ "saprophilous": S.Array(S.Union(S.Record({ key: S.String, value: S.Int}), S.String, S.Null)),
402+ "saxten": S.Array(S.Union(S.String, SaxtenClass)),
403+ "scatty": S.Array(S.NullOr(Scatty)),
404+ "scoffer": S.Array(S.Union(S.Array(S.Null), S.Record({ key: S.String, value: S.Int}), S.Null)),
405+ "scrampum": S.Array(S.Union(S.Array(S.Int), S.Boolean, S.Null)),
406+ "semantic": S.Number,
407+ "serpentinic": S.Array(S.Union(S.Array(S.Int), S.Number)),
408+ "shadowable": S.Array(S.Union(S.Array(S.NullOr(S.Int)), S.Boolean)),
409+ "sistering": S.Array(S.Union(S.Array(S.Null), S.Int, SisteringClass)),
410+ "staghunting": S.Array(Staghunting),
411+ "stagmometer": S.Array(S.Union(S.Array(S.NullOr(S.Int)), S.String)),
412+ "stimulability": S.Array(S.Union(S.Boolean, S.Int, S.Record({ key: S.String, value: S.Int}))),
413+ "strangleable": S.Array(S.Union(S.Array(S.Null), S.Number)),
414+ "strenuosity": S.Array(S.Union(S.Array(S.Null), StrenuosityClass)),
415+ "tabaxir": S.Array(S.Union(S.Boolean, S.Number)),
416+ "talpiform": S.Array(S.Union(S.Number, QuebrachineClass, S.Null)),
417+ "thwack": S.Array(S.Union(S.Boolean, S.Number, QuebrachineClass)),
418+ "to": S.Array(S.NullOr(S.Number)),
419+ "tortricine": S.Array(S.Union(S.Array(S.NullOr(S.Int)), QuebrachineClass)),
420+ "truantcy": S.Array(S.Union(S.Boolean, TruantcyClass)),
421+ "turgesce": S.Array(S.String),
422+ "unbeginning": S.Array(S.Union(S.Array(S.Null), S.Record({ key: S.String, value: S.Int}), S.String)),
423+ "underdunged": S.Array(S.Number),
424+ "undesirability": S.Array(S.Union(S.Array(S.Int), S.Record({ key: S.String, value: S.Int}), S.String)),
425+ "unerasing": S.Array(S.Union(S.Array(S.Null), S.Int, S.Record({ key: S.String, value: S.Int}))),
426+ "unguentarium": S.Array(S.Union(S.Array(S.Null), S.Int, S.Null)),
427+ "unimpeachably": S.Array(S.Union(S.Boolean, UnimpeachablyClass)),
428+ "unmortgaged": S.Array(S.Union(S.Number, S.Record({ key: S.String, value: S.Int}), S.Null)),
429+ "unobstructed": S.Array(S.Union(S.Int, QuebrachineClass, S.Null)),
430+ "unreceptivity": S.Array(S.Union(S.Array(S.Null), S.Int, S.String)),
431+ "unsatisfactoriness": S.Array(S.Union(S.Array(S.Int), S.Boolean, S.Int)),
432+ "unsecurity": S.Array(S.Int),
433+ "unstressed": S.Array(S.Union(S.Boolean, S.String, UnstressedClass)),
434+ "untasked": S.Array(S.Union(S.Array(S.Null), S.Number, S.Record({ key: S.String, value: S.Int}))),
435+ "unvarying": S.Array(S.Union(S.Boolean, S.Number, S.Record({ key: S.String, value: S.Int}))),
436+ "vehemently": S.Array(S.Union(S.Array(S.Null), S.Boolean, S.Null)),
437+ "warriorship": S.Record({ key: S.String, value: S.Boolean}),
438+ "whitepot": S.Array(S.Union(S.Number, QuebrachineClass)),
439+ "wrothy": S.Array(S.Union(S.Array(S.Null), WrothyClass)),
440+}) {}
Atypescript-zodjust-schema-true--8c4ca457bcba / TopLevel.ts+440 −0
@@ -0,0 +1,440 @@
1+import * as z from "zod";
2+
3+
4+export const PulpitismClassSchema = z.object({
5+ "abnet": z.null(),
6+ "buckhorn": z.null(),
7+ "calciform": z.null(),
8+ "chelophore": z.null(),
9+ "cogitation": z.null(),
10+ "decreeable": z.null(),
11+ "despicable": z.null(),
12+ "isodiazo": z.null(),
13+ "jadedly": z.null(),
14+ "leptochlorite": z.null(),
15+ "nursling": z.null(),
16+ "palamedean": z.null(),
17+ "photoheliograph": z.null(),
18+ "pipewood": z.null(),
19+ "roberd": z.null(),
20+ "statable": z.null(),
21+ "superassume": z.null(),
22+ "syllabe": z.null(),
23+ "toughhead": z.null(),
24+ "underburn": z.null(),
25+});
26+
27+export const PyodermiaClassSchema = z.object({
28+ "aphoristically": z.null(),
29+ "apophyllous": z.null(),
30+ "cognize": z.null(),
31+ "dermonosology": z.null(),
32+ "Gyppo": z.null(),
33+ "ither": z.null(),
34+ "juglandaceous": z.null(),
35+ "litho": z.null(),
36+ "macropterous": z.null(),
37+ "photographer": z.null(),
38+ "romancing": z.null(),
39+ "rumness": z.null(),
40+ "somniloquist": z.null(),
41+ "stressfully": z.null(),
42+ "tactically": z.null(),
43+ "tracheophony": z.null(),
44+ "unappositely": z.null(),
45+ "unclothedly": z.null(),
46+ "unimplied": z.null(),
47+ "unsyncopated": z.null(),
48+});
49+
50+export const QuebrachineClassSchema = z.object({
51+ "catharticalness": z.number(),
52+ "Chirotherium": z.number().int(),
53+ "disdiapason": z.string(),
54+ "homocerc": z.boolean(),
55+ "nonbookish": z.null(),
56+});
57+
58+export const ReimagineSchema = z.object({
59+ "adducible": z.null().optional(),
60+ "anabolin": z.null().optional(),
61+ "brainy": z.null().optional(),
62+ "catharticalness": z.number().optional(),
63+ "Chirotherium": z.number().int().optional(),
64+ "chrysamine": z.null().optional(),
65+ "disdiapason": z.string().optional(),
66+ "fluxweed": z.null().optional(),
67+ "glaucine": z.null().optional(),
68+ "grobianism": z.null().optional(),
69+ "Hermo": z.null().optional(),
70+ "hieroglyphist": z.null().optional(),
71+ "homocerc": z.boolean().optional(),
72+ "icteroid": z.null().optional(),
73+ "immortal": z.null().optional(),
74+ "impetulant": z.null().optional(),
75+ "irrigate": z.null().optional(),
76+ "myxedema": z.null().optional(),
77+ "nonbookish": z.null().optional(),
78+ "onyx": z.null().optional(),
79+ "repasser": z.null().optional(),
80+ "septomarginal": z.null().optional(),
81+ "subdie": z.null().optional(),
82+ "tibiometatarsal": z.null().optional(),
83+ "waltzlike": z.null().optional(),
84+});
85+
86+export const RessautSchema = z.object({
87+ "apperceptive": z.string(),
88+ "cuttoo": z.string(),
89+ "douser": z.string(),
90+ "drinkproof": z.string(),
91+ "forementioned": z.string(),
92+ "Freesia": z.string(),
93+ "Genevieve": z.string(),
94+ "hyperdiabolical": z.string(),
95+ "hypocone": z.string(),
96+ "irreverentially": z.string(),
97+ "jumart": z.string(),
98+ "Mimosaceae": z.string(),
99+ "mollicrush": z.string(),
100+ "nedder": z.string(),
101+ "retinasphalt": z.string(),
102+ "sough": z.string(),
103+ "steading": z.string(),
104+ "Theopaschitism": z.string(),
105+ "undurableness": z.string(),
106+ "unmingleable": z.string(),
107+});
108+
109+export const RewriteClassSchema = z.object({
110+ "accountancy": z.null(),
111+ "cacotrophic": z.null(),
112+ "contest": z.null(),
113+ "couthily": z.null(),
114+ "falculate": z.null(),
115+ "foreseize": z.null(),
116+ "Hyades": z.null(),
117+ "lemnad": z.null(),
118+ "monotheistically": z.null(),
119+ "nonflying": z.null(),
120+ "Ptenoglossa": z.null(),
121+ "repatch": z.null(),
122+ "rodman": z.null(),
123+ "strung": z.null(),
124+ "titmal": z.null(),
125+ "twalpennyworth": z.null(),
126+ "unblamable": z.null(),
127+ "vertical": z.null(),
128+ "Whiggification": z.null(),
129+ "yardman": z.null(),
130+});
131+
132+export const SantirClassSchema = z.object({
133+ "admiredly": z.null(),
134+ "demicaponier": z.null(),
135+ "epitympanic": z.null(),
136+ "investitor": z.null(),
137+ "lupiform": z.null(),
138+ "monoflagellate": z.null(),
139+ "paleoethnic": z.null(),
140+ "prediscountable": z.null(),
141+ "rhetoricals": z.null(),
142+ "roomth": z.null(),
143+ "saccharose": z.null(),
144+ "septonasal": z.null(),
145+ "serpenticide": z.null(),
146+ "setarious": z.null(),
147+ "spaework": z.null(),
148+ "stylite": z.null(),
149+ "Suessiones": z.null(),
150+ "timelily": z.null(),
151+ "unprofaned": z.null(),
152+ "vorticular": z.null(),
153+});
154+
155+export const SaxtenClassSchema = z.object({
156+ "algarrobilla": z.null().optional(),
157+ "bowgrace": z.null().optional(),
158+ "catharticalness": z.number().optional(),
159+ "Centaurid": z.null().optional(),
160+ "Chirotherium": z.number().int().optional(),
161+ "disdiapason": z.string().optional(),
162+ "flix": z.null().optional(),
163+ "germanely": z.null().optional(),
164+ "homocerc": z.boolean().optional(),
165+ "inhume": z.null().optional(),
166+ "lepidote": z.null().optional(),
167+ "megalochirous": z.null().optional(),
168+ "ninepenny": z.null().optional(),
169+ "nonbookish": z.null().optional(),
170+ "nondeist": z.null().optional(),
171+ "nymphaeaceous": z.null().optional(),
172+ "parietofrontal": z.null().optional(),
173+ "sancyite": z.null().optional(),
174+ "subjectivist": z.null().optional(),
175+ "tibiad": z.null().optional(),
176+ "transonic": z.null().optional(),
177+ "tripetalous": z.null().optional(),
178+ "trunchman": z.null().optional(),
179+ "urger": z.null().optional(),
180+ "withdrawnness": z.null().optional(),
181+});
182+
183+export const ScattySchema = z.object({
184+ "aeriferous": z.null(),
185+ "antical": z.null(),
186+ "antighostism": z.null(),
187+ "arcanum": z.null(),
188+ "autotrophy": z.null(),
189+ "baronial": z.null(),
190+ "caffeine": z.null(),
191+ "gorgoniacean": z.null(),
192+ "heroical": z.null(),
193+ "hydropical": z.null(),
194+ "mechanology": z.null(),
195+ "musicopoetic": z.null(),
196+ "officiality": z.null(),
197+ "oftentimes": z.null(),
198+ "ophthalmotonometer": z.null(),
199+ "reflectively": z.null(),
200+ "springer": z.null(),
201+ "Tabasco": z.null(),
202+ "teleianthous": z.null(),
203+ "uncombated": z.null(),
204+});
205+
206+export const SisteringClassSchema = z.object({
207+ "amphicarpic": z.null(),
208+ "Chianti": z.null(),
209+ "frigorific": z.null(),
210+ "Haplomi": z.null(),
211+ "hyperkinesis": z.null(),
212+ "laudable": z.null(),
213+ "madwoman": z.null(),
214+ "maimedly": z.null(),
215+ "Micropterygidae": z.null(),
216+ "microrhabdus": z.null(),
217+ "nondense": z.null(),
218+ "phlebemphraxis": z.null(),
219+ "redsear": z.null(),
220+ "schismatical": z.null(),
221+ "tartryl": z.null(),
222+ "unabhorred": z.null(),
223+ "undeliberateness": z.null(),
224+ "unmixable": z.null(),
225+ "untruckling": z.null(),
226+ "vineal": z.null(),
227+});
228+
229+export const StaghuntingSchema = z.object({
230+ "calorimetric": z.number().int().optional(),
231+ "canid": z.number().int().optional(),
232+ "catharticalness": z.number().optional(),
233+ "Chirotherium": z.number().int().optional(),
234+ "disdiapason": z.string().optional(),
235+ "ditriglyphic": z.number().int().optional(),
236+ "floriferousness": z.number().int().optional(),
237+ "gamelike": z.number().int().optional(),
238+ "grig": z.number().int().optional(),
239+ "homocerc": z.boolean().optional(),
240+ "interloan": z.number().int().optional(),
241+ "lithotomy": z.number().int().optional(),
242+ "loric": z.number().int().optional(),
243+ "membranocoriaceous": z.number().int().optional(),
244+ "membranogenic": z.number().int().optional(),
245+ "nonbookish": z.null().optional(),
246+ "overtrump": z.number().int().optional(),
247+ "scotino": z.number().int().optional(),
248+ "seasonable": z.number().int().optional(),
249+ "sephen": z.number().int().optional(),
250+ "stigmarioid": z.number().int().optional(),
251+ "tired": z.number().int().optional(),
252+ "trifid": z.number().int().optional(),
253+ "undefeatedly": z.number().int().optional(),
254+ "ungirlish": z.number().int().optional(),
255+});
256+
257+export const StrenuosityClassSchema = z.object({
258+ "bliss": z.number().int().optional(),
259+ "buccate": z.number().int().optional(),
260+ "bulletproof": z.number().int().optional(),
261+ "catharticalness": z.number().optional(),
262+ "Chirotherium": z.number().int().optional(),
263+ "crumblingness": z.number().int().optional(),
264+ "disdiapason": z.string().optional(),
265+ "engagedly": z.number().int().optional(),
266+ "fightable": z.number().int().optional(),
267+ "hoariness": z.number().int().optional(),
268+ "homocerc": z.boolean().optional(),
269+ "hypopodium": z.number().int().optional(),
270+ "luxurist": z.number().int().optional(),
271+ "mechanician": z.number().int().optional(),
272+ "nonbookish": z.null().optional(),
273+ "Onopordon": z.number().int().optional(),
274+ "podgily": z.number().int().optional(),
275+ "reformableness": z.number().int().optional(),
276+ "scatterbrains": z.number().int().optional(),
277+ "seminuria": z.number().int().optional(),
278+ "Sodomite": z.number().int().optional(),
279+ "tramp": z.number().int().optional(),
280+ "undueness": z.number().int().optional(),
281+ "worthily": z.number().int().optional(),
282+ "Yankeeist": z.number().int().optional(),
283+});
284+
285+export const TruantcyClassSchema = z.object({
286+ "alfiona": z.null().optional(),
287+ "ascaridiasis": z.null().optional(),
288+ "bungey": z.null().optional(),
289+ "catharticalness": z.number().optional(),
290+ "ceroxyle": z.null().optional(),
291+ "Chirotherium": z.number().int().optional(),
292+ "chorology": z.null().optional(),
293+ "disdiapason": z.string().optional(),
294+ "enmarble": z.null().optional(),
295+ "Epeira": z.null().optional(),
296+ "Eurylaimi": z.null().optional(),
297+ "germination": z.null().optional(),
298+ "hallelujah": z.null().optional(),
299+ "homocerc": z.boolean().optional(),
300+ "lev": z.null().optional(),
301+ "mouthing": z.null().optional(),
302+ "nonbookish": z.null().optional(),
303+ "philliloo": z.null().optional(),
304+ "planetal": z.null().optional(),
305+ "poney": z.null().optional(),
306+ "punctualist": z.null().optional(),
307+ "returnlessly": z.null().optional(),
308+ "skelder": z.null().optional(),
309+ "windwaywardly": z.null().optional(),
310+ "Yuman": z.null().optional(),
311+});
312+
313+export const UnimpeachablyClassSchema = z.object({
314+ "acerin": z.number().int().optional(),
315+ "Bobadil": z.number().int().optional(),
316+ "catharticalness": z.number().optional(),
317+ "Chirotherium": z.number().int().optional(),
318+ "chlorophylligenous": z.number().int().optional(),
319+ "conversational": z.number().int().optional(),
320+ "demiowl": z.number().int().optional(),
321+ "disdiapason": z.string().optional(),
322+ "ectorhinal": z.number().int().optional(),
323+ "gamblesomeness": z.number().int().optional(),
324+ "homocerc": z.boolean().optional(),
325+ "irrorate": z.number().int().optional(),
326+ "kindergartening": z.number().int().optional(),
327+ "lateritic": z.number().int().optional(),
328+ "mespil": z.number().int().optional(),
329+ "misconfiguration": z.number().int().optional(),
330+ "nonbookish": z.null().optional(),
331+ "planometry": z.number().int().optional(),
332+ "Quiina": z.number().int().optional(),
333+ "Robert": z.number().int().optional(),
334+ "rot": z.number().int().optional(),
335+ "subcinctorium": z.number().int().optional(),
336+ "tussocker": z.number().int().optional(),
337+ "ultraproud": z.number().int().optional(),
338+ "unsuggestedness": z.number().int().optional(),
339+});
340+
341+export const UnstressedClassSchema = z.object({
342+ "Alain": z.null(),
343+ "Amphirhina": z.null(),
344+ "antimachinery": z.null(),
345+ "coldish": z.null(),
346+ "crantara": z.null(),
347+ "distinguishing": z.null(),
348+ "elytroposis": z.null(),
349+ "gentianwort": z.null(),
350+ "heliosis": z.null(),
351+ "instrumental": z.null(),
352+ "introinflection": z.null(),
353+ "kala": z.null(),
354+ "Lincolnian": z.null(),
355+ "metad": z.null(),
356+ "Sarcophilus": z.null(),
357+ "swingingly": z.null(),
358+ "unconformity": z.null(),
359+ "undecreed": z.null(),
360+ "venerable": z.null(),
361+ "vowellessness": z.null(),
362+});
363+
364+export const WrothyClassSchema = z.object({
365+ "Aeschynanthus": z.null(),
366+ "aquiferous": z.null(),
367+ "cheapener": z.null(),
368+ "enumeration": z.null(),
369+ "Ephesine": z.null(),
370+ "escadrille": z.null(),
371+ "estrous": z.null(),
372+ "interestedly": z.null(),
373+ "katakinetomer": z.null(),
374+ "mortification": z.null(),
375+ "morula": z.null(),
376+ "orthosymmetrical": z.null(),
377+ "overbark": z.null(),
378+ "politist": z.null(),
379+ "qualified": z.null(),
380+ "sphenomalar": z.null(),
381+ "throatful": z.null(),
382+ "transhumance": z.null(),
383+ "triandrian": z.null(),
384+ "unbooked": z.null(),
385+});
386+
387+export const TopLevelSchema = z.object({
388+ "protrusive": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), z.number()])),
389+ "pulpitism": z.array(z.union([z.array(z.number().int()), PulpitismClassSchema, z.number()])),
390+ "pyodermia": z.array(z.union([PyodermiaClassSchema, z.number().int()])),
391+ "quebrachine": z.array(z.union([z.null(), z.boolean(), QuebrachineClassSchema])),
392+ "querier": z.array(z.union([z.boolean(), z.record(z.string(), z.number().int())])),
393+ "rebarbative": z.array(z.union([z.array(z.number().int()), z.boolean(), z.number()])),
394+ "reimagine": z.array(ReimagineSchema),
395+ "ressaut": RessautSchema,
396+ "retrocervical": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), z.number().int()])),
397+ "revert": z.array(z.union([z.boolean(), z.string()])),
398+ "rewrite": z.array(z.union([z.array(z.null()), RewriteClassSchema, z.number()])),
399+ "saccoderm": z.array(z.union([z.null(), z.array(z.number().int()), z.string()])),
400+ "santir": z.array(z.union([SantirClassSchema, z.number()])),
401+ "saprophilous": z.array(z.union([z.null(), z.record(z.string(), z.number().int()), z.string()])),
402+ "saxten": z.array(z.union([SaxtenClassSchema, z.string()])),
403+ "scatty": z.array(z.union([z.null(), ScattySchema])),
404+ "scoffer": z.array(z.union([z.null(), z.array(z.null()), z.record(z.string(), z.number().int())])),
405+ "scrampum": z.array(z.union([z.null(), z.array(z.number().int()), z.boolean()])),
406+ "semantic": z.number(),
407+ "serpentinic": z.array(z.union([z.array(z.number().int()), z.number()])),
408+ "shadowable": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), z.boolean()])),
409+ "sistering": z.array(z.union([z.array(z.null()), SisteringClassSchema, z.number().int()])),
410+ "staghunting": z.array(StaghuntingSchema),
411+ "stagmometer": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), z.string()])),
412+ "stimulability": z.array(z.union([z.boolean(), z.number().int(), z.record(z.string(), z.number().int())])),
413+ "strangleable": z.array(z.union([z.array(z.null()), z.number()])),
414+ "strenuosity": z.array(z.union([z.array(z.null()), StrenuosityClassSchema])),
415+ "tabaxir": z.array(z.union([z.boolean(), z.number()])),
416+ "talpiform": z.array(z.union([z.null(), QuebrachineClassSchema, z.number()])),
417+ "thwack": z.array(z.union([z.boolean(), QuebrachineClassSchema, z.number()])),
418+ "to": z.array(z.union([z.null(), z.number()])),
419+ "tortricine": z.array(z.union([z.array(z.union([z.null(), z.number().int()])), QuebrachineClassSchema])),
420+ "truantcy": z.array(z.union([z.boolean(), TruantcyClassSchema])),
421+ "turgesce": z.array(z.string()),
422+ "unbeginning": z.array(z.union([z.array(z.null()), z.record(z.string(), z.number().int()), z.string()])),
423+ "underdunged": z.array(z.number()),
424+ "undesirability": z.array(z.union([z.array(z.number().int()), z.record(z.string(), z.number().int()), z.string()])),
425+ "unerasing": z.array(z.union([z.array(z.null()), z.number().int(), z.record(z.string(), z.number().int())])),
426+ "unguentarium": z.array(z.union([z.null(), z.array(z.null()), z.number().int()])),
427+ "unimpeachably": z.array(z.union([z.boolean(), UnimpeachablyClassSchema])),
428+ "unmortgaged": z.array(z.union([z.null(), z.number(), z.record(z.string(), z.number().int())])),
429+ "unobstructed": z.array(z.union([z.null(), QuebrachineClassSchema, z.number().int()])),
430+ "unreceptivity": z.array(z.union([z.array(z.null()), z.number().int(), z.string()])),
431+ "unsatisfactoriness": z.array(z.union([z.array(z.number().int()), z.boolean(), z.number().int()])),
432+ "unsecurity": z.array(z.number().int()),
433+ "unstressed": z.array(z.union([z.boolean(), UnstressedClassSchema, z.string()])),
434+ "untasked": z.array(z.union([z.array(z.null()), z.number(), z.record(z.string(), z.number().int())])),
435+ "unvarying": z.array(z.union([z.boolean(), z.number(), z.record(z.string(), z.number().int())])),
436+ "vehemently": z.array(z.union([z.null(), z.array(z.null()), z.boolean()])),
437+ "warriorship": z.record(z.string(), z.boolean()),
438+ "whitepot": z.array(z.union([QuebrachineClassSchema, z.number()])),
439+ "wrothy": z.array(z.union([z.array(z.null()), WrothyClassSchema])),
440+});
Test case

test/inputs/json/priority/keywords.json

38 generated files · +3,537 −52
Mcjsondefault / TopLevel.c+65 −0
@@ -14990,6 +14990,61 @@ void cJSON_DeleteRight(struct Right * x) {
1499014990 }
1499114991 }
1499214992
14993+struct S * cJSON_ParseS(const char * s) {
14994+ struct S * x = NULL;
14995+ if (NULL != s) {
14996+ cJSON * j = cJSON_Parse(s);
14997+ if (NULL != j) {
14998+ x = cJSON_GetSValue(j);
14999+ cJSON_Delete(j);
15000+ }
15001+ }
15002+ return x;
15003+}
15004+
15005+struct S * cJSON_GetSValue(const cJSON * j) {
15006+ struct S * x = NULL;
15007+ if (NULL != j) {
15008+ if (NULL != (x = cJSON_malloc(sizeof(struct S)))) {
15009+ memset(x, 0, sizeof(struct S));
15010+ if (!cJSON_HasObjectItem(j, "s")) { cJSON_DeleteS(x); return NULL; }
15011+ if (cJSON_HasObjectItem(j, "s")) {
15012+ if (!quicktype_cJSON_IsInteger(cJSON_GetObjectItemCaseSensitive(j, "s"))) { cJSON_DeleteS(x); return NULL; }
15013+ x->s = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "s"));
15014+ }
15015+ }
15016+ }
15017+ return x;
15018+}
15019+
15020+cJSON * cJSON_CreateS(const struct S * x) {
15021+ cJSON * j = NULL;
15022+ if (NULL != x) {
15023+ if (NULL != (j = cJSON_CreateObject())) {
15024+ cJSON_AddNumberToObject(j, "s", x->s);
15025+ }
15026+ }
15027+ return j;
15028+}
15029+
15030+char * cJSON_PrintS(const struct S * x) {
15031+ char * s = NULL;
15032+ if (NULL != x) {
15033+ cJSON * j = cJSON_CreateS(x);
15034+ if (NULL != j) {
15035+ s = cJSON_Print(j);
15036+ cJSON_Delete(j);
15037+ }
15038+ }
15039+ return s;
15040+}
15041+
15042+void cJSON_DeleteS(struct S * x) {
15043+ if (NULL != x) {
15044+ cJSON_free(x);
15045+ }
15046+}
15047+
1499315048 struct Sbyte * cJSON_ParseSbyte(const char * s) {
1499415049 struct Sbyte * x = NULL;
1499515050 if (NULL != s) {
@@ -16621,6 +16676,12 @@ struct Obj4 * cJSON_GetObj4Value(const cJSON * j) {
1662116676 x->right = cJSON_GetRightValue(cJSON_GetObjectItemCaseSensitive(j, "right"));
1662216677 if (NULL == x->right) { cJSON_DeleteObj4(x); return NULL; }
1662316678 }
16679+ if (!cJSON_HasObjectItem(j, "s")) { cJSON_DeleteObj4(x); return NULL; }
16680+ if (cJSON_HasObjectItem(j, "s")) {
16681+ if (!cJSON_IsObject(cJSON_GetObjectItemCaseSensitive(j, "s"))) { cJSON_DeleteObj4(x); return NULL; }
16682+ x->s = cJSON_GetSValue(cJSON_GetObjectItemCaseSensitive(j, "s"));
16683+ if (NULL == x->s) { cJSON_DeleteObj4(x); return NULL; }
16684+ }
1662416685 if (!cJSON_HasObjectItem(j, "sbyte")) { cJSON_DeleteObj4(x); return NULL; }
1662516686 if (cJSON_HasObjectItem(j, "sbyte")) {
1662616687 if (!cJSON_IsObject(cJSON_GetObjectItemCaseSensitive(j, "sbyte"))) { cJSON_DeleteObj4(x); return NULL; }
@@ -16820,6 +16881,7 @@ cJSON * cJSON_CreateObj4(const struct Obj4 * x) {
1682016881 cJSON_AddItemToObject(j, "retain", cJSON_CreateRetain(x->retain));
1682116882 cJSON_AddItemToObject(j, "rethrows", cJSON_CreateRethrows(x->rethrows));
1682216883 cJSON_AddItemToObject(j, "right", cJSON_CreateRight(x->right));
16884+ cJSON_AddItemToObject(j, "s", cJSON_CreateS(x->s));
1682316885 cJSON_AddItemToObject(j, "sbyte", cJSON_CreateSbyte(x->sbyte));
1682416886 cJSON_AddItemToObject(j, "sealed", cJSON_CreateSealed(x->sealed));
1682516887 cJSON_AddItemToObject(j, "SEL", cJSON_CreateSel(x->sel));
@@ -16981,6 +17043,9 @@ void cJSON_DeleteObj4(struct Obj4 * x) {
1698117043 if (NULL != x->right) {
1698217044 cJSON_DeleteRight(x->right);
1698317045 }
17046+ if (NULL != x->s) {
17047+ cJSON_DeleteS(x->s);
17048+ }
1698417049 if (NULL != x->sbyte) {
1698517050 cJSON_DeleteSbyte(x->sbyte);
1698617051 }
Mcjsondefault / TopLevel.h+11 −0
@@ -1181,6 +1181,10 @@ struct Right {
11811181 int64_t right;
11821182 };
11831183
1184+struct S {
1185+ int64_t s;
1186+};
1187+
11841188 struct Sbyte {
11851189 int64_t sbyte;
11861190 };
@@ -1322,6 +1326,7 @@ struct Obj4 {
13221326 struct Retain * retain;
13231327 struct Rethrows * rethrows;
13241328 struct Right * right;
1329+ struct S * s;
13251330 struct Sbyte * sbyte;
13261331 struct Sealed * sealed;
13271332 struct Sel * sel;
@@ -2884,6 +2889,12 @@ cJSON * cJSON_CreateRight(const struct Right * x);
28842889 char * cJSON_PrintRight(const struct Right * x);
28852890 void cJSON_DeleteRight(struct Right * x);
28862891
2892+struct S * cJSON_ParseS(const char * s);
2893+struct S * cJSON_GetSValue(const cJSON * j);
2894+cJSON * cJSON_CreateS(const struct S * x);
2895+char * cJSON_PrintS(const struct S * x);
2896+void cJSON_DeleteS(struct S * x);
2897+
28872898 struct Sbyte * cJSON_ParseSbyte(const char * s);
28882899 struct Sbyte * cJSON_GetSbyteValue(const cJSON * j);
28892900 cJSON * cJSON_CreateSbyte(const struct Sbyte * x);
Mcplusplusdefault / quicktype.hpp+35 −0
@@ -4310,6 +4310,20 @@ namespace quicktype {
43104310 void set_right(const int64_t & value) { this->right = value; }
43114311 };
43124312
4313+ class S {
4314+ public:
4315+ S() = default;
4316+ virtual ~S() = default;
4317+
4318+ private:
4319+ int64_t s;
4320+
4321+ public:
4322+ const int64_t & get_s() const { return s; }
4323+ int64_t & get_mutable_s() { return s; }
4324+ void set_s(const int64_t & value) { this->s = value; }
4325+ };
4326+
43134327 class Sbyte {
43144328 public:
43154329 Sbyte() = default;
@@ -4719,6 +4733,7 @@ namespace quicktype {
47194733 Retain retain;
47204734 Rethrows rethrows;
47214735 Right right;
4736+ S s;
47224737 Sbyte sbyte;
47234738 Sealed sealed;
47244739 Sel sel;
@@ -4903,6 +4918,10 @@ namespace quicktype {
49034918 Right & get_mutable_right() { return right; }
49044919 void set_right(const Right & value) { this->right = value; }
49054920
4921+ const S & get_s() const { return s; }
4922+ S & get_mutable_s() { return s; }
4923+ void set_s(const S & value) { this->s = value; }
4924+
49064925 const Sbyte & get_sbyte() const { return sbyte; }
49074926 Sbyte & get_mutable_sbyte() { return sbyte; }
49084927 void set_sbyte(const Sbyte & value) { this->sbyte = value; }
@@ -6151,6 +6170,9 @@ namespace quicktype {
61516170 void from_json(const json & j, Right & x);
61526171 void to_json(json & j, const Right & x);
61536172
6173+ void from_json(const json & j, S & x);
6174+ void to_json(json & j, const S & x);
6175+
61546176 void from_json(const json & j, Sbyte & x);
61556177 void to_json(json & j, const Sbyte & x);
61566178
@@ -9284,6 +9306,17 @@ namespace quicktype {
92849306 j["right"] = x.get_right();
92859307 }
92869308
9309+ inline void from_json(const json & j, S& x) {
9310+ if (!j.is_object()) throw std::runtime_error("Expected object");
9311+ if (j.find("s") != j.end() && !j.at("s").is_number_integer()) throw std::runtime_error("Expected integer");
9312+ x.set_s(j.at("s").get<int64_t>());
9313+ }
9314+
9315+ inline void to_json(json & j, const S & x) {
9316+ j = json::object();
9317+ j["s"] = x.get_s();
9318+ }
9319+
92879320 inline void from_json(const json & j, Sbyte& x) {
92889321 if (!j.is_object()) throw std::runtime_error("Expected object");
92899322 if (j.find("sbyte") != j.end() && !j.at("sbyte").is_number_integer()) throw std::runtime_error("Expected integer");
@@ -9612,6 +9645,7 @@ namespace quicktype {
96129645 x.set_retain(j.at("retain").get<Retain>());
96139646 x.set_rethrows(j.at("rethrows").get<Rethrows>());
96149647 x.set_right(j.at("right").get<Right>());
9648+ x.set_s(j.at("s").get<S>());
96159649 x.set_sbyte(j.at("sbyte").get<Sbyte>());
96169650 x.set_sealed(j.at("sealed").get<Sealed>());
96179651 x.set_sel(j.at("SEL").get<Sel>());
@@ -9681,6 +9715,7 @@ namespace quicktype {
96819715 j["retain"] = x.get_retain();
96829716 j["rethrows"] = x.get_rethrows();
96839717 j["right"] = x.get_right();
9718+ j["s"] = x.get_s();
96849719 j["sbyte"] = x.get_sbyte();
96859720 j["sealed"] = x.get_sealed();
96869721 j["SEL"] = x.get_sel();
Mcrystaldefault / TopLevel.cr+8 −0
@@ -1755,6 +1755,8 @@ class Obj4
17551755
17561756 property right : Right
17571757
1758+ property s : S
1759+
17581760 property sbyte : Sbyte
17591761
17601762 property sealed : Sealed
@@ -2020,6 +2022,12 @@ class Right
20202022 property right : Int64
20212023 end
20222024
2025+class S
2026+ include JSON::Serializable
2027+
2028+ property s : Int64
2029+end
2030+
20232031 class Sbyte
20242032 include JSON::Serializable
Mcsharp-recordsdefault / QuickType.cs+9 −0
@@ -1885,6 +1885,9 @@ namespace QuickType
18851885 [JsonProperty("right", Required = Required.Always)]
18861886 public Right Right { get; set; }
18871887
1888+ [JsonProperty("s", Required = Required.Always)]
1889+ public S S { get; set; }
1890+
18881891 [JsonProperty("sbyte", Required = Required.Always)]
18891892 public Sbyte Sbyte { get; set; }
18901893
@@ -2141,6 +2144,12 @@ namespace QuickType
21412144 public long RightRight { get; set; }
21422145 }
21432146
2147+ public partial record S
2148+ {
2149+ [JsonProperty("s", Required = Required.Always)]
2150+ public long SS { get; set; }
2151+ }
2152+
21442153 public partial record Sbyte
21452154 {
21462155 [JsonProperty("sbyte", Required = Required.Always)]
Mcsharp-SystemTextJsondefault / QuickType.cs+11 −0
@@ -2303,6 +2303,10 @@ namespace QuickType
23032303 [JsonPropertyName("right")]
23042304 public Right Right { get; set; }
23052305
2306+ [JsonRequired]
2307+ [JsonPropertyName("s")]
2308+ public S S { get; set; }
2309+
23062310 [JsonRequired]
23072311 [JsonPropertyName("sbyte")]
23082312 public Sbyte Sbyte { get; set; }
@@ -2623,6 +2627,13 @@ namespace QuickType
26232627 public long RightRight { get; set; }
26242628 }
26252629
2630+ public partial class S
2631+ {
2632+ [JsonRequired]
2633+ [JsonPropertyName("s")]
2634+ public long SS { get; set; }
2635+ }
2636+
26262637 public partial class Sbyte
26272638 {
26282639 [JsonRequired]
Mcsharpdefault / QuickType.cs+9 −0
@@ -1885,6 +1885,9 @@ namespace QuickType
18851885 [JsonProperty("right", Required = Required.Always)]
18861886 public Right Right { get; set; }
18871887
1888+ [JsonProperty("s", Required = Required.Always)]
1889+ public S S { get; set; }
1890+
18881891 [JsonProperty("sbyte", Required = Required.Always)]
18891892 public Sbyte Sbyte { get; set; }
18901893
@@ -2141,6 +2144,12 @@ namespace QuickType
21412144 public long RightRight { get; set; }
21422145 }
21432146
2147+ public partial class S
2148+ {
2149+ [JsonProperty("s", Required = Required.Always)]
2150+ public long SS { get; set; }
2151+ }
2152+
21442153 public partial class Sbyte
21452154 {
21462155 [JsonProperty("sbyte", Required = Required.Always)]
Mdartdefault / TopLevel.dart+20 −0
@@ -4024,6 +4024,7 @@ class Obj4 {
40244024 final Retain retain;
40254025 final Rethrows rethrows;
40264026 final Right right;
4027+ final S s;
40274028 final Sbyte sbyte;
40284029 final Sealed sealed;
40294030 final Sel sel;
@@ -4091,6 +4092,7 @@ class Obj4 {
40914092 required this.retain,
40924093 required this.rethrows,
40934094 required this.right,
4095+ required this.s,
40944096 required this.sbyte,
40954097 required this.sealed,
40964098 required this.sel,
@@ -4159,6 +4161,7 @@ class Obj4 {
41594161 retain: Retain.fromJson(json["retain"]),
41604162 rethrows: Rethrows.fromJson(json["rethrows"]),
41614163 right: Right.fromJson(json["right"]),
4164+ s: S.fromJson(json["s"]),
41624165 sbyte: Sbyte.fromJson(json["sbyte"]),
41634166 sealed: Sealed.fromJson(json["sealed"]),
41644167 sel: Sel.fromJson(json["SEL"]),
@@ -4227,6 +4230,7 @@ class Obj4 {
42274230 "retain": retain.toJson(),
42284231 "rethrows": rethrows.toJson(),
42294232 "right": right.toJson(),
4233+ "s": s.toJson(),
42304234 "sbyte": sbyte.toJson(),
42314235 "sealed": sealed.toJson(),
42324236 "SEL": sel.toJson(),
@@ -4744,6 +4748,22 @@ class Right {
47444748 };
47454749 }
47464750
4751+class S {
4752+ final int s;
4753+
4754+ S({
4755+ required this.s,
4756+ });
4757+
4758+ factory S.fromJson(Map<String, dynamic> json) => S(
4759+ s: json["s"],
4760+ );
4761+
4762+ Map<String, dynamic> toJson() => {
4763+ "s": s,
4764+ };
4765+}
4766+
47474767 class Sbyte {
47484768 final int sbyte;
Melixirdefault / QuickType.ex+44 −2
@@ -9092,6 +9092,45 @@ defmodule Right do
90929092 end
90939093 end
90949094
9095+defmodule S do
9096+ @enforce_keys [:s]
9097+ defstruct [:s]
9098+
9099+ @type t :: %__MODULE__{
9100+ s: integer()
9101+ }
9102+
9103+ def decode_s(value) when is_integer(value), do: value
9104+ def decode_s(_), do: {:error, "Unexpected type when decoding S.s"}
9105+
9106+ def encode_s(value) when is_integer(value), do: value
9107+ def encode_s(_), do: {:error, "Unexpected type when encoding S.s"}
9108+
9109+ def from_map(m) do
9110+ %S{
9111+ s: decode_s(m["s"]),
9112+ }
9113+ end
9114+
9115+ def from_json(json) do
9116+ json
9117+ |> Jason.decode!()
9118+ |> from_map()
9119+ end
9120+
9121+ def to_map(struct) do
9122+ %{
9123+ "s" => struct.s,
9124+ }
9125+ end
9126+
9127+ def to_json(struct) do
9128+ struct
9129+ |> to_map()
9130+ |> Jason.encode!()
9131+ end
9132+end
9133+
90959134 defmodule Sbyte do
90969135 @enforce_keys [:sbyte]
90979136 defstruct [:sbyte]
@@ -10809,8 +10848,8 @@ defmodule Undefined do
1080910848 end
1081010849
1081110850 defmodule Obj4 do
10812- @enforce_keys [:dummy, :obj4_self, :obj4_true, :obj4_type, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :sbyte, :sealed, :sel, :select, :self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :true_1, :try, :type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined]
10813- defstruct [:dummy, :obj4_self, :obj4_true, :obj4_type, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :sbyte, :sealed, :sel, :select, :self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :true_1, :try, :type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined]
10851+ @enforce_keys [:dummy, :obj4_self, :obj4_true, :obj4_type, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :s, :sbyte, :sealed, :sel, :select, :self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :true_1, :try, :type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined]
10852+ defstruct [:dummy, :obj4_self, :obj4_true, :obj4_type, :public, :quicktype, :raise, :range, :readonly, :ref, :register, :reinterpret_cast, :repeat, :require, :required, :requires, :restrict, :retain, :rethrows, :return, :right, :s, :sbyte, :sealed, :sel, :select, :self, :serialize, :set, :short, :signed, :sizeof, :stackalloc, :static, :static_assert, :static_cast, :strictfp, :string, :struct, :subscript, :super, :switch, :symbol, :synchronized, :system, :template, :then, :this, :thread_local, :throw, :throws, :to_json, :top_level, :transient, :true_1, :try, :type, :typealias, :typedef, :typeid, :typename, :typeof, :uint, :ulong, :unchecked, :undefined]
1081410853
1081510854 @type t :: %__MODULE__{
1081610855 dummy: integer(),
@@ -10834,6 +10873,7 @@ defmodule Obj4 do
1083410873 rethrows: Rethrows.t(),
1083510874 return: Return.t(),
1083610875 right: Right.t(),
10876+ s: S.t(),
1083710877 sbyte: Sbyte.t(),
1083810878 sealed: Sealed.t(),
1083910879 sel: Sel.t(),
@@ -10909,6 +10949,7 @@ defmodule Obj4 do
1090910949 rethrows: Rethrows.from_map(m["rethrows"]),
1091010950 return: Return.from_map(m["return"]),
1091110951 right: Right.from_map(m["right"]),
10952+ s: S.from_map(m["s"]),
1091210953 sbyte: Sbyte.from_map(m["sbyte"]),
1091310954 sealed: Sealed.from_map(m["sealed"]),
1091410955 sel: Sel.from_map(m["SEL"]),
@@ -10985,6 +11026,7 @@ defmodule Obj4 do
1098511026 "rethrows" => Rethrows.to_map(struct.rethrows),
1098611027 "return" => Return.to_map(struct.return),
1098711028 "right" => Right.to_map(struct.right),
11029+ "s" => S.to_map(struct.s),
1098811030 "sbyte" => Sbyte.to_map(struct.sbyte),
1098911031 "sealed" => Sealed.to_map(struct.sealed),
1099011032 "SEL" => Sel.to_map(struct.sel),
Melmdefault / QuickType.elm+19 −0
@@ -237,6 +237,7 @@ module QuickType exposing
237237 , Rethrows
238238 , Return
239239 , Right
240+ , S
240241 , Sbyte
241242 , Sealed
242243 , Sel
@@ -1327,6 +1328,7 @@ type alias Obj4 =
13271328 , rethrows : Rethrows
13281329 , return : Return
13291330 , right : Right
1331+ , s : S
13301332 , sbyte : Sbyte
13311333 , sealed : Sealed
13321334 , sel : Sel
@@ -1462,6 +1464,10 @@ type alias Right =
14621464 { right : Int
14631465 }
14641466
1467+type alias S =
1468+ { s : Int
1469+ }
1470+
14651471 type alias Sbyte =
14661472 { sbyte : Int
14671473 }
@@ -4357,6 +4363,7 @@ obj4 =
43574363 |> Jpipe.required "rethrows" rethrows
43584364 |> Jpipe.required "return" return
43594365 |> Jpipe.required "right" right
4366+ |> Jpipe.required "s" s
43604367 |> Jpipe.required "sbyte" sbyte
43614368 |> Jpipe.required "sealed" sealed
43624369 |> Jpipe.required "SEL" sel
@@ -4426,6 +4433,7 @@ encodeObj4 x =
44264433 , ("rethrows", encodeRethrows x.rethrows)
44274434 , ("return", encodeReturn x.return)
44284435 , ("right", encodeRight x.right)
4436+ , ("s", encodeS x.s)
44294437 , ("sbyte", encodeSbyte x.sbyte)
44304438 , ("sealed", encodeSealed x.sealed)
44314439 , ("SEL", encodeSel x.sel)
@@ -4722,6 +4730,17 @@ encodeRight x =
47224730 [ ("right", Jenc.int x.right)
47234731 ]
47244732
4733+s : Jdec.Decoder S
4734+s =
4735+ Jdec.succeed S
4736+ |> Jpipe.required "s" Jdec.int
4737+
4738+encodeS : S -> Jenc.Value
4739+encodeS x =
4740+ Jenc.object
4741+ [ ("s", Jenc.int x.s)
4742+ ]
4743+
47254744 sbyte : Jdec.Decoder Sbyte
47264745 sbyte =
47274746 Jdec.succeed Sbyte
Mflowdefault / TopLevel.js+9 −0
@@ -1028,6 +1028,7 @@ export type Obj4 = {
10281028 rethrows: Rethrows;
10291029 return: Return;
10301030 right: Right;
1031+ s: S;
10311032 sbyte: Sbyte;
10321033 sealed: Sealed;
10331034 select: Select;
@@ -1157,6 +1158,10 @@ export type Right = {
11571158 right: number;
11581159 };
11591160
1161+export type S = {
1162+ s: number;
1163+};
1164+
11601165 export type Sbyte = {
11611166 sbyte: number;
11621167 };
@@ -2438,6 +2443,7 @@ const typeMap: any = {
24382443 { json: "rethrows", js: "rethrows", typ: r("Rethrows") },
24392444 { json: "return", js: "return", typ: r("Return") },
24402445 { json: "right", js: "right", typ: r("Right") },
2446+ { json: "s", js: "s", typ: r("S") },
24412447 { json: "sbyte", js: "sbyte", typ: r("Sbyte") },
24422448 { json: "sealed", js: "sealed", typ: r("Sealed") },
24432449 { json: "select", js: "select", typ: r("Select") },
@@ -2545,6 +2551,9 @@ const typeMap: any = {
25452551 "Right": o([
25462552 { json: "right", js: "right", typ: i(0) },
25472553 ], false),
2554+ "S": o([
2555+ { json: "s", js: "s", typ: i(0) },
2556+ ], false),
25482557 "Sbyte": o([
25492558 { json: "sbyte", js: "sbyte", typ: i(0) },
25502559 ], false),
Mgolangdefault / quicktype.go+5 −0
@@ -1036,6 +1036,7 @@ type Obj4 struct {
10361036 Rethrows Rethrows `json:"rethrows"`
10371037 Return Return `json:"return"`
10381038 Right Right `json:"right"`
1039+ S S `json:"s"`
10391040 Sbyte Sbyte `json:"sbyte"`
10401041 Sealed Sealed `json:"sealed"`
10411042 Sel Sel `json:"SEL"`
@@ -1162,6 +1163,10 @@ type Right struct {
11621163 Right int64 `json:"right"`
11631164 }
11641165
1166+type S struct {
1167+ S int64 `json:"s"`
1168+}
1169+
11651170 type Sbyte struct {
11661171 Sbyte int64 `json:"sbyte"`
11671172 }
Mhaskelldefault / QuickType.hs+19 −1
@@ -224,6 +224,7 @@ module QuickType
224224 , Rethrows (..)
225225 , Return (..)
226226 , RightClass (..)
227+ , S (..)
227228 , Sbyte (..)
228229 , Sealed (..)
229230 , Sel (..)
@@ -1316,6 +1317,7 @@ data Obj4 = Obj4
13161317 , rethrowsObj4 :: Rethrows
13171318 , returnObj4 :: Return
13181319 , rightObj4 :: RightClass
1320+ , sObj4 :: S
13191321 , sbyteObj4 :: Sbyte
13201322 , sealedObj4 :: Sealed
13211323 , selObj4 :: Sel
@@ -1448,6 +1450,10 @@ data RightClass = RightClass
14481450 { rightRightClass :: Int
14491451 } deriving (Show)
14501452
1453+data S = S
1454+ { sS :: Int
1455+ } deriving (Show)
1456+
14511457 data Sbyte = Sbyte
14521458 { sbyteSbyte :: Int
14531459 } deriving (Show)
@@ -4114,7 +4120,7 @@ instance FromJSON Protocol where
41144120 <$> v .: "Protocol"
41154121
41164122 instance ToJSON Obj4 where
4117- toJSON (Obj4 dummyObj4 obj4SelfObj4 obj4ThenObj4 obj4TrueObj4 obj4TypeObj4 publicObj4 purpleTypeObj4 quicktypeObj4 raiseObj4 rangeObj4 readonlyObj4 refObj4 registerObj4 reinterpretCastObj4 repeatObj4 requireObj4 requiredObj4 requiresObj4 restrictObj4 retainObj4 rethrowsObj4 returnObj4 rightObj4 sbyteObj4 sealedObj4 selObj4 selectObj4 selfObj4 serializeObj4 setObj4 shortObj4 signedObj4 sizeofObj4 stackallocObj4 staticObj4 staticAssertObj4 staticCastObj4 strictfpObj4 stringObj4 structObj4 subscriptObj4 superObj4 switchObj4 symbolObj4 synchronizedObj4 systemObj4 templateObj4 thisObj4 threadLocalObj4 throwObj4 throwsObj4 toJSONObj4 topLevelObj4 transientObj4 trueObj4 tryObj4 typealiasObj4 typedefObj4 typeidObj4 typenameObj4 typeofObj4 uintObj4 ulongObj4 uncheckedObj4 undefinedObj4) =
4123+ toJSON (Obj4 dummyObj4 obj4SelfObj4 obj4ThenObj4 obj4TrueObj4 obj4TypeObj4 publicObj4 purpleTypeObj4 quicktypeObj4 raiseObj4 rangeObj4 readonlyObj4 refObj4 registerObj4 reinterpretCastObj4 repeatObj4 requireObj4 requiredObj4 requiresObj4 restrictObj4 retainObj4 rethrowsObj4 returnObj4 rightObj4 sObj4 sbyteObj4 sealedObj4 selObj4 selectObj4 selfObj4 serializeObj4 setObj4 shortObj4 signedObj4 sizeofObj4 stackallocObj4 staticObj4 staticAssertObj4 staticCastObj4 strictfpObj4 stringObj4 structObj4 subscriptObj4 superObj4 switchObj4 symbolObj4 synchronizedObj4 systemObj4 templateObj4 thisObj4 threadLocalObj4 throwObj4 throwsObj4 toJSONObj4 topLevelObj4 transientObj4 trueObj4 tryObj4 typealiasObj4 typedefObj4 typeidObj4 typenameObj4 typeofObj4 uintObj4 ulongObj4 uncheckedObj4 undefinedObj4) =
41184124 object
41194125 [ "dummy" .= dummyObj4
41204126 , "self" .= obj4SelfObj4
@@ -4139,6 +4145,7 @@ instance ToJSON Obj4 where
41394145 , "rethrows" .= rethrowsObj4
41404146 , "return" .= returnObj4
41414147 , "right" .= rightObj4
4148+ , "s" .= sObj4
41424149 , "sbyte" .= sbyteObj4
41434150 , "sealed" .= sealedObj4
41444151 , "SEL" .= selObj4
@@ -4208,6 +4215,7 @@ instance FromJSON Obj4 where
42084215 <*> v .: "rethrows"
42094216 <*> v .: "return"
42104217 <*> v .: "right"
4218+ <*> v .: "s"
42114219 <*> v .: "sbyte"
42124220 <*> v .: "sealed"
42134221 <*> v .: "SEL"
@@ -4471,6 +4479,16 @@ instance FromJSON RightClass where
44714479 parseJSON (Object v) = RightClass
44724480 <$> v .: "right"
44734481
4482+instance ToJSON S where
4483+ toJSON (S sS) =
4484+ object
4485+ [ "s" .= sS
4486+ ]
4487+
4488+instance FromJSON S where
4489+ parseJSON (Object v) = S
4490+ <$> v .: "s"
4491+
44744492 instance ToJSON Sbyte where
44754493 toJSON (Sbyte sbyteSbyte) =
44764494 object
Mjava-datetime-legacydefault / src / main / java / io / quicktype / Obj4.java+6 −0
@@ -36,6 +36,7 @@ public class Obj4 {
3636 private Retain retain;
3737 private Rethrows rethrows;
3838 private Right right;
39+ private S s;
3940 private Sbyte sbyte;
4041 private Sealed sealed;
4142 private Sel sel;
@@ -234,6 +235,11 @@ public class Obj4 {
234235 @JsonProperty("right")
235236 public void setRight(Right value) { this.right = value; }
236237
238+ @JsonProperty("s")
239+ public S getS() { return s; }
240+ @JsonProperty("s")
241+ public void setS(S value) { this.s = value; }
242+
237243 @JsonProperty("sbyte")
238244 public Sbyte getSbyte() { return sbyte; }
239245 @JsonProperty("sbyte")
Ajava-datetime-legacydefault / src / main / java / io / quicktype / S.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class S {
6+ private long s;
7+
8+ @JsonProperty("s")
9+ public long getS() { return s; }
10+ @JsonProperty("s")
11+ public void setS(long value) { this.s = value; }
12+}
Mjava-lombokdefault / src / main / java / io / quicktype / Obj4.java+6 −0
@@ -36,6 +36,7 @@ public class Obj4 {
3636 private Retain retain;
3737 private Rethrows rethrows;
3838 private Right right;
39+ private S s;
3940 private Sbyte sbyte;
4041 private Sealed sealed;
4142 private Sel sel;
@@ -234,6 +235,11 @@ public class Obj4 {
234235 @JsonProperty("right")
235236 public void setRight(Right value) { this.right = value; }
236237
238+ @JsonProperty("s")
239+ public S getS() { return s; }
240+ @JsonProperty("s")
241+ public void setS(S value) { this.s = value; }
242+
237243 @JsonProperty("sbyte")
238244 public Sbyte getSbyte() { return sbyte; }
239245 @JsonProperty("sbyte")
Ajava-lombokdefault / src / main / java / io / quicktype / S.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class S {
6+ private long s;
7+
8+ @JsonProperty("s")
9+ public long getS() { return s; }
10+ @JsonProperty("s")
11+ public void setS(long value) { this.s = value; }
12+}
Mjavadefault / src / main / java / io / quicktype / Obj4.java+6 −0
@@ -36,6 +36,7 @@ public class Obj4 {
3636 private Retain retain;
3737 private Rethrows rethrows;
3838 private Right right;
39+ private S s;
3940 private Sbyte sbyte;
4041 private Sealed sealed;
4142 private Sel sel;
@@ -234,6 +235,11 @@ public class Obj4 {
234235 @JsonProperty("right")
235236 public void setRight(Right value) { this.right = value; }
236237
238+ @JsonProperty("s")
239+ public S getS() { return s; }
240+ @JsonProperty("s")
241+ public void setS(S value) { this.s = value; }
242+
237243 @JsonProperty("sbyte")
238244 public Sbyte getSbyte() { return sbyte; }
239245 @JsonProperty("sbyte")
Ajavadefault / src / main / java / io / quicktype / S.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class S {
6+ private long s;
7+
8+ @JsonProperty("s")
9+ public long getS() { return s; }
10+ @JsonProperty("s")
11+ public void setS(long value) { this.s = value; }
12+}
Mjavascript-prop-typesdefault / toplevel.js+5 −0
@@ -234,6 +234,7 @@ let _Retain;
234234 let _Rethrows;
235235 let _Return;
236236 let _Right;
237+let _S;
237238 let _Sbyte;
238239 let _Sealed;
239240 let _Select;
@@ -1150,6 +1151,9 @@ _Return = PropTypes.shape({
11501151 _Right = PropTypes.shape({
11511152 "right": PropTypes.oneOfType([Integer]).isRequired,
11521153 });
1154+_S = PropTypes.shape({
1155+ "s": PropTypes.oneOfType([Integer]).isRequired,
1156+});
11531157 _Sbyte = PropTypes.shape({
11541158 "sbyte": PropTypes.oneOfType([Integer]).isRequired,
11551159 });
@@ -1302,6 +1306,7 @@ _Obj4 = PropTypes.shape({
13021306 "rethrows": _Rethrows,
13031307 "return": _Return,
13041308 "right": _Right,
1309+ "s": _S,
13051310 "sbyte": _Sbyte,
13061311 "sealed": _Sealed,
13071312 "select": _Select,
Mjavascriptdefault / TopLevel.js+4 −0
@@ -1012,6 +1012,7 @@ const typeMap = {
10121012 { json: "rethrows", js: "rethrows", typ: r("Rethrows") },
10131013 { json: "return", js: "return", typ: r("Return") },
10141014 { json: "right", js: "right", typ: r("Right") },
1015+ { json: "s", js: "s", typ: r("S") },
10151016 { json: "sbyte", js: "sbyte", typ: r("Sbyte") },
10161017 { json: "sealed", js: "sealed", typ: r("Sealed") },
10171018 { json: "select", js: "select", typ: r("Select") },
@@ -1119,6 +1120,9 @@ const typeMap = {
11191120 "Right": o([
11201121 { json: "right", js: "right", typ: i(0) },
11211122 ], false),
1123+ "S": o([
1124+ { json: "s", js: "s", typ: i(0) },
1125+ ], false),
11221126 "Sbyte": o([
11231127 { json: "sbyte", js: "sbyte", typ: i(0) },
11241128 ], false),
Mkotlin-jacksondefault / TopLevel.kt+8 −0
@@ -1705,6 +1705,9 @@ data class Obj4 (
17051705 @get:JsonProperty(required=true)@field:JsonProperty(required=true)
17061706 val right: Right,
17071707
1708+ @get:JsonProperty(required=true)@field:JsonProperty(required=true)
1709+ val s: S,
1710+
17081711 @get:JsonProperty(required=true)@field:JsonProperty(required=true)
17091712 val sbyte: Sbyte,
17101713
@@ -1952,6 +1955,11 @@ data class Right (
19521955 val right: Long
19531956 )
19541957
1958+data class S (
1959+ @get:JsonProperty(required=true)@field:JsonProperty(required=true)
1960+ val s: Long
1961+)
1962+
19551963 data class Sbyte (
19561964 @get:JsonProperty(required=true)@field:JsonProperty(required=true)
19571965 val sbyte: Long
Mkotlindefault / TopLevel.kt+5 −0
@@ -1247,6 +1247,7 @@ data class Obj4 (
12471247 val retain: Retain,
12481248 val rethrows: Rethrows,
12491249 val right: Right,
1250+ val s: S,
12501251 val sbyte: Sbyte,
12511252 val sealed: Sealed,
12521253
@@ -1426,6 +1427,10 @@ data class Right (
14261427 val right: Long
14271428 )
14281429
1430+data class S (
1431+ val s: Long
1432+)
1433+
14291434 data class Sbyte (
14301435 val sbyte: Long
14311436 )
Mkotlinxdefault / TopLevel.kt+6 −0
@@ -1443,6 +1443,7 @@ data class Obj4 (
14431443 val retain: Retain,
14441444 val rethrows: Rethrows,
14451445 val right: Right,
1446+ val s: S,
14461447 val sbyte: Sbyte,
14471448 val sealed: Sealed,
14481449
@@ -1649,6 +1650,11 @@ data class Right (
16491650 val right: Long
16501651 )
16511652
1653+@Serializable
1654+data class S (
1655+ val s: Long
1656+)
1657+
16521658 @Serializable
16531659 data class Sbyte (
16541660 val sbyte: Long
Mobjective-cdefault / QTTopLevel.h+6 −0
@@ -233,6 +233,7 @@
233233 @class QTRequires;
234234 @class QTRethrows;
235235 @class QTRight;
236+@class QTS;
236237 @class QTSbyte;
237238 @class QTSealed;
238239 @class QTSel;
@@ -1333,6 +1334,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding en
13331334 @property (nonatomic, strong) QTRequires *requires;
13341335 @property (nonatomic, strong) QTRethrows *rethrows;
13351336 @property (nonatomic, strong) QTRight *right;
1337+@property (nonatomic, strong) QTS *s;
13361338 @property (nonatomic, strong) QTSbyte *sbyte;
13371339 @property (nonatomic, strong) QTSealed *sealed;
13381340 @property (nonatomic, strong) QTSel *sel;
@@ -1483,6 +1485,10 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding en
14831485 @property (nonatomic, assign) NSInteger right;
14841486 @end
14851487
1488+@interface QTS : NSObject
1489+@property (nonatomic, assign) NSInteger s;
1490+@end
1491+
14861492 @interface QTSbyte : NSObject
14871493 @property (nonatomic, assign) NSInteger sbyte;
14881494 @end
Mobjective-cdefault / QTTopLevel.m+52 −0
@@ -1148,6 +1148,11 @@ NS_ASSUME_NONNULL_BEGIN
11481148 - (NSDictionary *)JSONDictionary;
11491149 @end
11501150
1151+@interface QTS (JSONConversion)
1152++ (instancetype)fromJSONDictionary:(NSDictionary *)dict;
1153+- (NSDictionary *)JSONDictionary;
1154+@end
1155+
11511156 @interface QTSbyte (JSONConversion)
11521157 + (instancetype)fromJSONDictionary:(NSDictionary *)dict;
11531158 - (NSDictionary *)JSONDictionary;
@@ -11565,6 +11570,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
1156511570 @"requires": @"requires",
1156611571 @"rethrows": @"rethrows",
1156711572 @"right": @"right",
11573+ @"s": @"s",
1156811574 @"sbyte": @"sbyte",
1156911575 @"sealed": @"sealed",
1157011576 @"SEL": @"sel",
@@ -11642,6 +11648,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
1164211648 if (![dict[@"requires"] isKindOfClass:NSDictionary.class]) return nil;
1164311649 if (![dict[@"rethrows"] isKindOfClass:NSDictionary.class]) return nil;
1164411650 if (![dict[@"right"] isKindOfClass:NSDictionary.class]) return nil;
11651+ if (![dict[@"s"] isKindOfClass:NSDictionary.class]) return nil;
1164511652 if (![dict[@"sbyte"] isKindOfClass:NSDictionary.class]) return nil;
1164611653 if (![dict[@"sealed"] isKindOfClass:NSDictionary.class]) return nil;
1164711654 if (![dict[@"SEL"] isKindOfClass:NSDictionary.class]) return nil;
@@ -11735,6 +11742,8 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
1173511742 if (!_rethrows && dict[@"rethrows"] && ![dict[@"rethrows"] isKindOfClass:NSNull.class]) return nil;
1173611743 _right = [QTRight fromJSONDictionary:(id)_right];
1173711744 if (!_right && dict[@"right"] && ![dict[@"right"] isKindOfClass:NSNull.class]) return nil;
11745+ _s = [QTS fromJSONDictionary:(id)_s];
11746+ if (!_s && dict[@"s"] && ![dict[@"s"] isKindOfClass:NSNull.class]) return nil;
1173811747 _sbyte = [QTSbyte fromJSONDictionary:(id)_sbyte];
1173911748 if (!_sbyte && dict[@"sbyte"] && ![dict[@"sbyte"] isKindOfClass:NSNull.class]) return nil;
1174011749 _sealed = [QTSealed fromJSONDictionary:(id)_sealed];
@@ -11864,6 +11873,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
1186411873 @"requires": [_requires JSONDictionary],
1186511874 @"rethrows": [_rethrows JSONDictionary],
1186611875 @"right": [_right JSONDictionary],
11876+ @"s": [_s JSONDictionary],
1186711877 @"sbyte": [_sbyte JSONDictionary],
1186811878 @"sealed": [_sealed JSONDictionary],
1186911879 @"SEL": [_sel JSONDictionary],
@@ -13222,6 +13232,48 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
1322213232 }
1322313233 @end
1322413234
13235+@implementation QTS
13236++ (NSDictionary<NSString *, NSString *> *)properties
13237+{
13238+ static NSDictionary<NSString *, NSString *> *properties;
13239+ return properties = properties ? properties : @{
13240+ @"s": @"s",
13241+ };
13242+}
13243+
13244++ (instancetype)fromJSONDictionary:(NSDictionary *)dict
13245+{
13246+ return [dict isKindOfClass:NSDictionary.class] ? [[QTS alloc] initWithJSONDictionary:dict] : nil;
13247+}
13248+
13249+- (instancetype)initWithJSONDictionary:(NSDictionary *)dict
13250+{
13251+ if (self = [super init]) {
13252+ if (![dict[@"s"] isKindOfClass:NSNumber.class]) return nil;
13253+ if ([dict[@"s"] doubleValue] != [dict[@"s"] longLongValue]) return nil;
13254+ [self setValuesForKeysWithDictionary:dict];
13255+ }
13256+ return self;
13257+}
13258+
13259+- (void)setValue:(nullable id)value forKey:(NSString *)key
13260+{
13261+ id resolved = QTS.properties[key];
13262+ if (resolved) [super setValue:value forKey:resolved];
13263+}
13264+
13265+- (void)setNilValueForKey:(NSString *)key
13266+{
13267+ id resolved = QTS.properties[key];
13268+ if (resolved) [super setValue:@(0) forKey:resolved];
13269+}
13270+
13271+- (NSDictionary *)JSONDictionary
13272+{
13273+ return [self dictionaryWithValuesForKeys:QTS.properties.allValues];
13274+}
13275+@end
13276+
1322513277 @implementation QTSbyte
1322613278 + (NSDictionary<NSString *, NSString *> *)properties
1322713279 {
Mphpdefault / TopLevel.php+203 −44
@@ -31725,6 +31725,7 @@ class Obj4 {
3172531725 private Rethrows $rethrows; // json:rethrows Required
3172631726 private ReturnClass $return; // json:return Required
3172731727 private Right $right; // json:right Required
31728+ private S $s; // json:s Required
3172831729 private Sbyte $sbyte; // json:sbyte Required
3172931730 private Sealed $sealed; // json:sealed Required
3173031731 private Sel $sel; // json:SEL Required
@@ -31792,6 +31793,7 @@ class Obj4 {
3179231793 * @param Rethrows $rethrows
3179331794 * @param ReturnClass $return
3179431795 * @param Right $right
31796+ * @param S $s
3179531797 * @param Sbyte $sbyte
3179631798 * @param Sealed $sealed
3179731799 * @param Sel $sel
@@ -31836,7 +31838,7 @@ class Obj4 {
3183631838 * @param Unchecked $unchecked
3183731839 * @param Undefined $undefined
3183831840 */
31839- public function __construct(int $dummy, Obj4Self $obj4Self, This $obj4This, Obj4True $obj4True, TypeClass $obj4Type, PublicClass $public, Quicktype $quicktype, Raise $raise, Range $range, ReadonlyClass $readonly, Ref $ref, Register $register, ReinterpretCast $reinterpretCast, Repeat $repeat, RequireClass $require, Required $required, Requires $requires, Restrict $restrict, Retain $retain, Rethrows $rethrows, ReturnClass $return, Right $right, Sbyte $sbyte, Sealed $sealed, Sel $sel, Select $select, SelfClass $self, Serialize $serialize, Set $set, Short $short, Signed $signed, Sizeof $sizeof, Stackalloc $stackalloc, StaticClass $static, StaticAssert $staticAssert, StaticCast $staticCast, Strictfp $strictfp, StringClass $string, Struct $struct, Subscript $subscript, Super $super, SwitchClass $switch, Symbol $symbol, Synchronized $synchronized, System $system, Template $template, Then $then, ThreadLocal $threadLocal, ThrowClass $throw, Throws $throws, ToJSON $toJSON, TopLevelClass $topLevel, Transient $transient, TrueClass $true, TryClass $try, Type $type, Typealias $typealias, Typedef $typedef, Typeid $typeid, Typename $typename, Typeof $typeof, Uint $uint, Ulong $ulong, Unchecked $unchecked, Undefined $undefined) {
31841+ public function __construct(int $dummy, Obj4Self $obj4Self, This $obj4This, Obj4True $obj4True, TypeClass $obj4Type, PublicClass $public, Quicktype $quicktype, Raise $raise, Range $range, ReadonlyClass $readonly, Ref $ref, Register $register, ReinterpretCast $reinterpretCast, Repeat $repeat, RequireClass $require, Required $required, Requires $requires, Restrict $restrict, Retain $retain, Rethrows $rethrows, ReturnClass $return, Right $right, S $s, Sbyte $sbyte, Sealed $sealed, Sel $sel, Select $select, SelfClass $self, Serialize $serialize, Set $set, Short $short, Signed $signed, Sizeof $sizeof, Stackalloc $stackalloc, StaticClass $static, StaticAssert $staticAssert, StaticCast $staticCast, Strictfp $strictfp, StringClass $string, Struct $struct, Subscript $subscript, Super $super, SwitchClass $switch, Symbol $symbol, Synchronized $synchronized, System $system, Template $template, Then $then, ThreadLocal $threadLocal, ThrowClass $throw, Throws $throws, ToJSON $toJSON, TopLevelClass $topLevel, Transient $transient, TrueClass $true, TryClass $try, Type $type, Typealias $typealias, Typedef $typedef, Typeid $typeid, Typename $typename, Typeof $typeof, Uint $uint, Ulong $ulong, Unchecked $unchecked, Undefined $undefined) {
3184031842 $this->dummy = $dummy;
3184131843 $this->obj4Self = $obj4Self;
3184231844 $this->obj4This = $obj4This;
@@ -31859,6 +31861,7 @@ class Obj4 {
3185931861 $this->rethrows = $rethrows;
3186031862 $this->return = $return;
3186131863 $this->right = $right;
31864+ $this->s = $s;
3186231865 $this->sbyte = $sbyte;
3186331866 $this->sealed = $sealed;
3186431867 $this->sel = $sel;
@@ -32959,6 +32962,54 @@ class Obj4 {
3295932962 return Right::sample(); /*52:right*/
3296032963 }
3296132964
32965+ /**
32966+ * @param stdClass $value
32967+ * @throws Exception
32968+ * @return S
32969+ */
32970+ public static function fromS(stdClass $value): S {
32971+ return S::from($value); /*class*/
32972+ }
32973+
32974+ /**
32975+ * @throws Exception
32976+ * @return stdClass
32977+ */
32978+ public function toS(): stdClass {
32979+ if (Obj4::validateS($this->s)) {
32980+ return $this->s->to(); /*class*/
32981+ }
32982+ throw new Exception('never get to this Obj4::s');
32983+ }
32984+
32985+ /**
32986+ * @param S
32987+ * @return bool
32988+ * @throws Exception
32989+ */
32990+ public static function validateS(S $value): bool {
32991+ $value->validate();
32992+ return true;
32993+ }
32994+
32995+ /**
32996+ * @throws Exception
32997+ * @return S
32998+ */
32999+ public function getS(): S {
33000+ if (Obj4::validateS($this->s)) {
33001+ return $this->s;
33002+ }
33003+ throw new Exception('never get to getS Obj4::s');
33004+ }
33005+
33006+ /**
33007+ * @return S
33008+ */
33009+ public static function sampleS(): S {
33010+ return S::sample(); /*53:s*/
33011+ }
33012+
3296233013 /**
3296333014 * @param stdClass $value
3296433015 * @throws Exception
@@ -33004,7 +33055,7 @@ class Obj4 {
3300433055 * @return Sbyte
3300533056 */
3300633057 public static function sampleSbyte(): Sbyte {
33007- return Sbyte::sample(); /*53:sbyte*/
33058+ return Sbyte::sample(); /*54:sbyte*/
3300833059 }
3300933060
3301033061 /**
@@ -33052,7 +33103,7 @@ class Obj4 {
3305233103 * @return Sealed
3305333104 */
3305433105 public static function sampleSealed(): Sealed {
33055- return Sealed::sample(); /*54:sealed*/
33106+ return Sealed::sample(); /*55:sealed*/
3305633107 }
3305733108
3305833109 /**
@@ -33100,7 +33151,7 @@ class Obj4 {
3310033151 * @return Sel
3310133152 */
3310233153 public static function sampleSel(): Sel {
33103- return Sel::sample(); /*55:sel*/
33154+ return Sel::sample(); /*56:sel*/
3310433155 }
3310533156
3310633157 /**
@@ -33148,7 +33199,7 @@ class Obj4 {
3314833199 * @return Select
3314933200 */
3315033201 public static function sampleSelect(): Select {
33151- return Select::sample(); /*56:select*/
33202+ return Select::sample(); /*57:select*/
3315233203 }
3315333204
3315433205 /**
@@ -33196,7 +33247,7 @@ class Obj4 {
3319633247 * @return SelfClass
3319733248 */
3319833249 public static function sampleSelf(): SelfClass {
33199- return SelfClass::sample(); /*57:self*/
33250+ return SelfClass::sample(); /*58:self*/
3320033251 }
3320133252
3320233253 /**
@@ -33244,7 +33295,7 @@ class Obj4 {
3324433295 * @return Serialize
3324533296 */
3324633297 public static function sampleSerialize(): Serialize {
33247- return Serialize::sample(); /*58:serialize*/
33298+ return Serialize::sample(); /*59:serialize*/
3324833299 }
3324933300
3325033301 /**
@@ -33292,7 +33343,7 @@ class Obj4 {
3329233343 * @return Set
3329333344 */
3329433345 public static function sampleSet(): Set {
33295- return Set::sample(); /*59:set*/
33346+ return Set::sample(); /*60:set*/
3329633347 }
3329733348
3329833349 /**
@@ -33340,7 +33391,7 @@ class Obj4 {
3334033391 * @return Short
3334133392 */
3334233393 public static function sampleShort(): Short {
33343- return Short::sample(); /*60:short*/
33394+ return Short::sample(); /*61:short*/
3334433395 }
3334533396
3334633397 /**
@@ -33388,7 +33439,7 @@ class Obj4 {
3338833439 * @return Signed
3338933440 */
3339033441 public static function sampleSigned(): Signed {
33391- return Signed::sample(); /*61:signed*/
33442+ return Signed::sample(); /*62:signed*/
3339233443 }
3339333444
3339433445 /**
@@ -33436,7 +33487,7 @@ class Obj4 {
3343633487 * @return Sizeof
3343733488 */
3343833489 public static function sampleSizeof(): Sizeof {
33439- return Sizeof::sample(); /*62:sizeof*/
33490+ return Sizeof::sample(); /*63:sizeof*/
3344033491 }
3344133492
3344233493 /**
@@ -33484,7 +33535,7 @@ class Obj4 {
3348433535 * @return Stackalloc
3348533536 */
3348633537 public static function sampleStackalloc(): Stackalloc {
33487- return Stackalloc::sample(); /*63:stackalloc*/
33538+ return Stackalloc::sample(); /*64:stackalloc*/
3348833539 }
3348933540
3349033541 /**
@@ -33532,7 +33583,7 @@ class Obj4 {
3353233583 * @return StaticClass
3353333584 */
3353433585 public static function sampleStatic(): StaticClass {
33535- return StaticClass::sample(); /*64:static*/
33586+ return StaticClass::sample(); /*65:static*/
3353633587 }
3353733588
3353833589 /**
@@ -33580,7 +33631,7 @@ class Obj4 {
3358033631 * @return StaticAssert
3358133632 */
3358233633 public static function sampleStaticAssert(): StaticAssert {
33583- return StaticAssert::sample(); /*65:staticAssert*/
33634+ return StaticAssert::sample(); /*66:staticAssert*/
3358433635 }
3358533636
3358633637 /**
@@ -33628,7 +33679,7 @@ class Obj4 {
3362833679 * @return StaticCast
3362933680 */
3363033681 public static function sampleStaticCast(): StaticCast {
33631- return StaticCast::sample(); /*66:staticCast*/
33682+ return StaticCast::sample(); /*67:staticCast*/
3363233683 }
3363333684
3363433685 /**
@@ -33676,7 +33727,7 @@ class Obj4 {
3367633727 * @return Strictfp
3367733728 */
3367833729 public static function sampleStrictfp(): Strictfp {
33679- return Strictfp::sample(); /*67:strictfp*/
33730+ return Strictfp::sample(); /*68:strictfp*/
3368033731 }
3368133732
3368233733 /**
@@ -33724,7 +33775,7 @@ class Obj4 {
3372433775 * @return StringClass
3372533776 */
3372633777 public static function sampleString(): StringClass {
33727- return StringClass::sample(); /*68:string*/
33778+ return StringClass::sample(); /*69:string*/
3372833779 }
3372933780
3373033781 /**
@@ -33772,7 +33823,7 @@ class Obj4 {
3377233823 * @return Struct
3377333824 */
3377433825 public static function sampleStruct(): Struct {
33775- return Struct::sample(); /*69:struct*/
33826+ return Struct::sample(); /*70:struct*/
3377633827 }
3377733828
3377833829 /**
@@ -33820,7 +33871,7 @@ class Obj4 {
3382033871 * @return Subscript
3382133872 */
3382233873 public static function sampleSubscript(): Subscript {
33823- return Subscript::sample(); /*70:subscript*/
33874+ return Subscript::sample(); /*71:subscript*/
3382433875 }
3382533876
3382633877 /**
@@ -33868,7 +33919,7 @@ class Obj4 {
3386833919 * @return Super
3386933920 */
3387033921 public static function sampleSuper(): Super {
33871- return Super::sample(); /*71:super*/
33922+ return Super::sample(); /*72:super*/
3387233923 }
3387333924
3387433925 /**
@@ -33916,7 +33967,7 @@ class Obj4 {
3391633967 * @return SwitchClass
3391733968 */
3391833969 public static function sampleSwitch(): SwitchClass {
33919- return SwitchClass::sample(); /*72:switch*/
33970+ return SwitchClass::sample(); /*73:switch*/
3392033971 }
3392133972
3392233973 /**
@@ -33964,7 +34015,7 @@ class Obj4 {
3396434015 * @return Symbol
3396534016 */
3396634017 public static function sampleSymbol(): Symbol {
33967- return Symbol::sample(); /*73:symbol*/
34018+ return Symbol::sample(); /*74:symbol*/
3396834019 }
3396934020
3397034021 /**
@@ -34012,7 +34063,7 @@ class Obj4 {
3401234063 * @return Synchronized
3401334064 */
3401434065 public static function sampleSynchronized(): Synchronized {
34015- return Synchronized::sample(); /*74:synchronized*/
34066+ return Synchronized::sample(); /*75:synchronized*/
3401634067 }
3401734068
3401834069 /**
@@ -34060,7 +34111,7 @@ class Obj4 {
3406034111 * @return System
3406134112 */
3406234113 public static function sampleSystem(): System {
34063- return System::sample(); /*75:system*/
34114+ return System::sample(); /*76:system*/
3406434115 }
3406534116
3406634117 /**
@@ -34108,7 +34159,7 @@ class Obj4 {
3410834159 * @return Template
3410934160 */
3411034161 public static function sampleTemplate(): Template {
34111- return Template::sample(); /*76:template*/
34162+ return Template::sample(); /*77:template*/
3411234163 }
3411334164
3411434165 /**
@@ -34156,7 +34207,7 @@ class Obj4 {
3415634207 * @return Then
3415734208 */
3415834209 public static function sampleThen(): Then {
34159- return Then::sample(); /*77:then*/
34210+ return Then::sample(); /*78:then*/
3416034211 }
3416134212
3416234213 /**
@@ -34204,7 +34255,7 @@ class Obj4 {
3420434255 * @return ThreadLocal
3420534256 */
3420634257 public static function sampleThreadLocal(): ThreadLocal {
34207- return ThreadLocal::sample(); /*78:threadLocal*/
34258+ return ThreadLocal::sample(); /*79:threadLocal*/
3420834259 }
3420934260
3421034261 /**
@@ -34252,7 +34303,7 @@ class Obj4 {
3425234303 * @return ThrowClass
3425334304 */
3425434305 public static function sampleThrow(): ThrowClass {
34255- return ThrowClass::sample(); /*79:throw*/
34306+ return ThrowClass::sample(); /*80:throw*/
3425634307 }
3425734308
3425834309 /**
@@ -34300,7 +34351,7 @@ class Obj4 {
3430034351 * @return Throws
3430134352 */
3430234353 public static function sampleThrows(): Throws {
34303- return Throws::sample(); /*80:throws*/
34354+ return Throws::sample(); /*81:throws*/
3430434355 }
3430534356
3430634357 /**
@@ -34348,7 +34399,7 @@ class Obj4 {
3434834399 * @return ToJSON
3434934400 */
3435034401 public static function sampleToJSON(): ToJSON {
34351- return ToJSON::sample(); /*81:toJSON*/
34402+ return ToJSON::sample(); /*82:toJSON*/
3435234403 }
3435334404
3435434405 /**
@@ -34396,7 +34447,7 @@ class Obj4 {
3439634447 * @return TopLevelClass
3439734448 */
3439834449 public static function sampleTopLevel(): TopLevelClass {
34399- return TopLevelClass::sample(); /*82:topLevel*/
34450+ return TopLevelClass::sample(); /*83:topLevel*/
3440034451 }
3440134452
3440234453 /**
@@ -34444,7 +34495,7 @@ class Obj4 {
3444434495 * @return Transient
3444534496 */
3444634497 public static function sampleTransient(): Transient {
34447- return Transient::sample(); /*83:transient*/
34498+ return Transient::sample(); /*84:transient*/
3444834499 }
3444934500
3445034501 /**
@@ -34492,7 +34543,7 @@ class Obj4 {
3449234543 * @return TrueClass
3449334544 */
3449434545 public static function sampleTrue(): TrueClass {
34495- return TrueClass::sample(); /*84:true*/
34546+ return TrueClass::sample(); /*85:true*/
3449634547 }
3449734548
3449834549 /**
@@ -34540,7 +34591,7 @@ class Obj4 {
3454034591 * @return TryClass
3454134592 */
3454234593 public static function sampleTry(): TryClass {
34543- return TryClass::sample(); /*85:try*/
34594+ return TryClass::sample(); /*86:try*/
3454434595 }
3454534596
3454634597 /**
@@ -34588,7 +34639,7 @@ class Obj4 {
3458834639 * @return Type
3458934640 */
3459034641 public static function sampleType(): Type {
34591- return Type::sample(); /*86:type*/
34642+ return Type::sample(); /*87:type*/
3459234643 }
3459334644
3459434645 /**
@@ -34636,7 +34687,7 @@ class Obj4 {
3463634687 * @return Typealias
3463734688 */
3463834689 public static function sampleTypealias(): Typealias {
34639- return Typealias::sample(); /*87:typealias*/
34690+ return Typealias::sample(); /*88:typealias*/
3464034691 }
3464134692
3464234693 /**
@@ -34684,7 +34735,7 @@ class Obj4 {
3468434735 * @return Typedef
3468534736 */
3468634737 public static function sampleTypedef(): Typedef {
34687- return Typedef::sample(); /*88:typedef*/
34738+ return Typedef::sample(); /*89:typedef*/
3468834739 }
3468934740
3469034741 /**
@@ -34732,7 +34783,7 @@ class Obj4 {
3473234783 * @return Typeid
3473334784 */
3473434785 public static function sampleTypeid(): Typeid {
34735- return Typeid::sample(); /*89:typeid*/
34786+ return Typeid::sample(); /*90:typeid*/
3473634787 }
3473734788
3473834789 /**
@@ -34780,7 +34831,7 @@ class Obj4 {
3478034831 * @return Typename
3478134832 */
3478234833 public static function sampleTypename(): Typename {
34783- return Typename::sample(); /*90:typename*/
34834+ return Typename::sample(); /*91:typename*/
3478434835 }
3478534836
3478634837 /**
@@ -34828,7 +34879,7 @@ class Obj4 {
3482834879 * @return Typeof
3482934880 */
3483034881 public static function sampleTypeof(): Typeof {
34831- return Typeof::sample(); /*91:typeof*/
34882+ return Typeof::sample(); /*92:typeof*/
3483234883 }
3483334884
3483434885 /**
@@ -34876,7 +34927,7 @@ class Obj4 {
3487634927 * @return Uint
3487734928 */
3487834929 public static function sampleUint(): Uint {
34879- return Uint::sample(); /*92:uint*/
34930+ return Uint::sample(); /*93:uint*/
3488034931 }
3488134932
3488234933 /**
@@ -34924,7 +34975,7 @@ class Obj4 {
3492434975 * @return Ulong
3492534976 */
3492634977 public static function sampleUlong(): Ulong {
34927- return Ulong::sample(); /*93:ulong*/
34978+ return Ulong::sample(); /*94:ulong*/
3492834979 }
3492934980
3493034981 /**
@@ -34972,7 +35023,7 @@ class Obj4 {
3497235023 * @return Unchecked
3497335024 */
3497435025 public static function sampleUnchecked(): Unchecked {
34975- return Unchecked::sample(); /*94:unchecked*/
35026+ return Unchecked::sample(); /*95:unchecked*/
3497635027 }
3497735028
3497835029 /**
@@ -35020,7 +35071,7 @@ class Obj4 {
3502035071 * @return Undefined
3502135072 */
3502235073 public static function sampleUndefined(): Undefined {
35023- return Undefined::sample(); /*95:undefined*/
35074+ return Undefined::sample(); /*96:undefined*/
3502435075 }
3502535076
3502635077 /**
@@ -35050,6 +35101,7 @@ class Obj4 {
3505035101 || Obj4::validateRethrows($this->rethrows)
3505135102 || Obj4::validateReturn($this->return)
3505235103 || Obj4::validateRight($this->right)
35104+ || Obj4::validateS($this->s)
3505335105 || Obj4::validateSbyte($this->sbyte)
3505435106 || Obj4::validateSealed($this->sealed)
3505535107 || Obj4::validateSel($this->sel)
@@ -35123,6 +35175,7 @@ class Obj4 {
3512335175 $out->{'rethrows'} = $this->toRethrows();
3512435176 $out->{'return'} = $this->toReturn();
3512535177 $out->{'right'} = $this->toRight();
35178+ $out->{'s'} = $this->toS();
3512635179 $out->{'sbyte'} = $this->toSbyte();
3512735180 $out->{'sealed'} = $this->toSealed();
3512835181 $out->{'SEL'} = $this->toSel();
@@ -35241,6 +35294,9 @@ class Obj4 {
3524135294 if (!property_exists($obj, 'right')) {
3524235295 throw new Exception("Missing required property");
3524335296 }
35297+ if (!property_exists($obj, 's')) {
35298+ throw new Exception("Missing required property");
35299+ }
3524435300 if (!property_exists($obj, 'sbyte')) {
3524535301 throw new Exception("Missing required property");
3524635302 }
@@ -35393,6 +35449,7 @@ class Obj4 {
3539335449 ,Obj4::fromRethrows($obj->{'rethrows'})
3539435450 ,Obj4::fromReturn($obj->{'return'})
3539535451 ,Obj4::fromRight($obj->{'right'})
35452+ ,Obj4::fromS($obj->{'s'})
3539635453 ,Obj4::fromSbyte($obj->{'sbyte'})
3539735454 ,Obj4::fromSealed($obj->{'sealed'})
3539835455 ,Obj4::fromSel($obj->{'SEL'})
@@ -35466,6 +35523,7 @@ class Obj4 {
3546635523 ,Obj4::sampleRethrows()
3546735524 ,Obj4::sampleReturn()
3546835525 ,Obj4::sampleRight()
35526+ ,Obj4::sampleS()
3546935527 ,Obj4::sampleSbyte()
3547035528 ,Obj4::sampleSealed()
3547135529 ,Obj4::sampleSel()
@@ -37634,6 +37692,107 @@ class Right {
3763437692 }
3763537693 }
3763637694
37695+// This is an autogenerated file:S
37696+
37697+class S {
37698+ private int $s; // json:s Required
37699+
37700+ /**
37701+ * @param int $s
37702+ */
37703+ public function __construct(int $s) {
37704+ $this->s = $s;
37705+ }
37706+
37707+ /**
37708+ * @param int $value
37709+ * @throws Exception
37710+ * @return int
37711+ */
37712+ public static function fromS(int $value): int {
37713+ return $value; /*int*/
37714+ }
37715+
37716+ /**
37717+ * @throws Exception
37718+ * @return int
37719+ */
37720+ public function toS(): int {
37721+ if (S::validateS($this->s)) {
37722+ return $this->s; /*int*/
37723+ }
37724+ throw new Exception('never get to this S::s');
37725+ }
37726+
37727+ /**
37728+ * @param int
37729+ * @return bool
37730+ * @throws Exception
37731+ */
37732+ public static function validateS(int $value): bool {
37733+ return true;
37734+ }
37735+
37736+ /**
37737+ * @throws Exception
37738+ * @return int
37739+ */
37740+ public function getS(): int {
37741+ if (S::validateS($this->s)) {
37742+ return $this->s;
37743+ }
37744+ throw new Exception('never get to getS S::s');
37745+ }
37746+
37747+ /**
37748+ * @return int
37749+ */
37750+ public static function sampleS(): int {
37751+ return 31; /*31:s*/
37752+ }
37753+
37754+ /**
37755+ * @throws Exception
37756+ * @return bool
37757+ */
37758+ public function validate(): bool {
37759+ return S::validateS($this->s);
37760+ }
37761+
37762+ /**
37763+ * @return stdClass
37764+ * @throws Exception
37765+ */
37766+ public function to(): stdClass {
37767+ $out = new stdClass();
37768+ $out->{'s'} = $this->toS();
37769+ return $out;
37770+ }
37771+
37772+ /**
37773+ * @param stdClass $obj
37774+ * @return S
37775+ * @throws Exception
37776+ */
37777+ public static function from(stdClass $obj): S {
37778+ if (!property_exists($obj, 's')) {
37779+ throw new Exception("Missing required property");
37780+ }
37781+ return new S(
37782+ S::fromS($obj->{'s'})
37783+ );
37784+ }
37785+
37786+ /**
37787+ * @return S
37788+ */
37789+ public static function sample(): S {
37790+ return new S(
37791+ S::sampleS()
37792+ );
37793+ }
37794+}
37795+
3763737796 // This is an autogenerated file:Sbyte
3763837797
3763937798 class Sbyte {
Mpikedefault / TopLevel.pmod+24 −0
@@ -4818,6 +4818,7 @@ class Obj4 {
48184818 Retain retain; // json: "retain"
48194819 Rethrows rethrows; // json: "rethrows"
48204820 Right right; // json: "right"
4821+ S s; // json: "s"
48214822 Sbyte sbyte; // json: "sbyte"
48224823 Sealed sealed; // json: "sealed"
48234824 Sel sel; // json: "SEL"
@@ -4886,6 +4887,7 @@ class Obj4 {
48864887 "retain" : retain,
48874888 "rethrows" : rethrows,
48884889 "right" : right,
4890+ "s" : s,
48894891 "sbyte" : sbyte,
48904892 "sealed" : sealed,
48914893 "SEL" : sel,
@@ -4961,6 +4963,7 @@ Obj4 Obj4_from_JSON(mixed json) {
49614963 retval.retain = json["retain"];
49624964 retval.rethrows = json["rethrows"];
49634965 retval.right = json["right"];
4966+ retval.s = json["s"];
49644967 retval.sbyte = json["sbyte"];
49654968 retval.sealed = json["sealed"];
49664969 retval.sel = json["SEL"];
@@ -5529,6 +5532,27 @@ Right Right_from_JSON(mixed json) {
55295532 return retval;
55305533 }
55315534
5535+class S {
5536+ int s; // json: "s"
5537+
5538+ string encode_json() {
5539+ mapping(string:mixed) json = ([
5540+ "s" : s,
5541+ ]);
5542+
5543+ return Standards.JSON.encode(json);
5544+ }
5545+}
5546+
5547+S S_from_JSON(mixed json) {
5548+ S retval = S();
5549+
5550+ if (!intp(json["s"])) error("Expected integer");
5551+ retval.s = json["s"];
5552+
5553+ return retval;
5554+}
5555+
55325556 class Sbyte {
55335557 int sbyte; // json: "sbyte"
Mpythondefault / quicktype.py+20 −1
@@ -4120,6 +4120,22 @@ class Right:
41204120 return result
41214121
41224122
4123+@dataclass
4124+class S:
4125+ s: int
4126+
4127+ @staticmethod
4128+ def from_dict(obj: Any) -> 'S':
4129+ assert isinstance(obj, dict)
4130+ s = from_int(obj.get("s"))
4131+ return S(s)
4132+
4133+ def to_dict(self) -> dict:
4134+ result: dict = {}
4135+ result["s"] = from_int(self.s)
4136+ return result
4137+
4138+
41234139 @dataclass
41244140 class Sbyte:
41254141 sbyte: int
@@ -4816,6 +4832,7 @@ class Obj4:
48164832 rethrows: Rethrows
48174833 obj4_return: Return
48184834 right: Right
4835+ s: S
48194836 sbyte: Sbyte
48204837 sealed: Sealed
48214838 select: Select
@@ -4885,6 +4902,7 @@ class Obj4:
48854902 rethrows = Rethrows.from_dict(obj.get("rethrows"))
48864903 obj4_return = Return.from_dict(obj.get("return"))
48874904 right = Right.from_dict(obj.get("right"))
4905+ s = S.from_dict(obj.get("s"))
48884906 sbyte = Sbyte.from_dict(obj.get("sbyte"))
48894907 sealed = Sealed.from_dict(obj.get("sealed"))
48904908 select = Select.from_dict(obj.get("select"))
@@ -4928,7 +4946,7 @@ class Obj4:
49284946 ulong = Ulong.from_dict(obj.get("ulong"))
49294947 unchecked = Unchecked.from_dict(obj.get("unchecked"))
49304948 undefined = Undefined.from_dict(obj.get("undefined"))
4931- return Obj4(sel, obj4_self, true, type, dummy, public, quicktype, obj4_raise, range, readonly, ref, register, reinterpret_cast, repeat, require, required, requires, restrict, retain, rethrows, obj4_return, right, sbyte, sealed, select, purple_self, serialize, set, short, signed, sizeof, stackalloc, static, static_assert, static_cast, strictfp, string, struct, subscript, super, switch, symbol, synchronized, system, template, then, this, thread_local, throw, throws, to_json, top_level, transient, obj4_true, obj4_try, obj4_type, typealias, typedef, typeid, typename, typeof, uint, ulong, unchecked, undefined)
4949+ return Obj4(sel, obj4_self, true, type, dummy, public, quicktype, obj4_raise, range, readonly, ref, register, reinterpret_cast, repeat, require, required, requires, restrict, retain, rethrows, obj4_return, right, s, sbyte, sealed, select, purple_self, serialize, set, short, signed, sizeof, stackalloc, static, static_assert, static_cast, strictfp, string, struct, subscript, super, switch, symbol, synchronized, system, template, then, this, thread_local, throw, throws, to_json, top_level, transient, obj4_true, obj4_try, obj4_type, typealias, typedef, typeid, typename, typeof, uint, ulong, unchecked, undefined)
49324950
49334951 def to_dict(self) -> dict:
49344952 result: dict = {}
@@ -4954,6 +4972,7 @@ class Obj4:
49544972 result["rethrows"] = to_class(Rethrows, self.rethrows)
49554973 result["return"] = to_class(Return, self.obj4_return)
49564974 result["right"] = to_class(Right, self.right)
4975+ result["s"] = to_class(S, self.s)
49574976 result["sbyte"] = to_class(Sbyte, self.sbyte)
49584977 result["sealed"] = to_class(Sealed, self.sealed)
49594978 result["select"] = to_class(Select, self.select)
Mrubydefault / TopLevel.rb+28 −0
@@ -6229,6 +6229,31 @@ class Right < Dry::Struct
62296229 end
62306230 end
62316231
6232+class S < Dry::Struct
6233+ attribute :s, Types::Integer
6234+
6235+ def self.from_dynamic!(d)
6236+ d = Types::Hash[d]
6237+ new(
6238+ s: d.fetch("s"),
6239+ )
6240+ end
6241+
6242+ def self.from_json!(json)
6243+ from_dynamic!(JSON.parse(json))
6244+ end
6245+
6246+ def to_dynamic
6247+ {
6248+ "s" => s,
6249+ }
6250+ end
6251+
6252+ def to_json(options = nil)
6253+ JSON.generate(to_dynamic, options)
6254+ end
6255+end
6256+
62326257 class Sbyte < Dry::Struct
62336258 attribute :sbyte, Types::Integer
62346259
@@ -7183,6 +7208,7 @@ class Obj4 < Dry::Struct
71837208 attribute :retain, Retain
71847209 attribute :rethrows, Rethrows
71857210 attribute :right, Right
7211+ attribute :s, S
71867212 attribute :sbyte, Sbyte
71877213 attribute :sealed, Sealed
71887214 attribute :sel, Sel
@@ -7252,6 +7278,7 @@ class Obj4 < Dry::Struct
72527278 retain: Retain.from_dynamic!(d.fetch("retain")),
72537279 rethrows: Rethrows.from_dynamic!(d.fetch("rethrows")),
72547280 right: Right.from_dynamic!(d.fetch("right")),
7281+ s: S.from_dynamic!(d.fetch("s")),
72557282 sbyte: Sbyte.from_dynamic!(d.fetch("sbyte")),
72567283 sealed: Sealed.from_dynamic!(d.fetch("sealed")),
72577284 sel: Sel.from_dynamic!(d.fetch("SEL")),
@@ -7326,6 +7353,7 @@ class Obj4 < Dry::Struct
73267353 "retain" => retain.to_dynamic,
73277354 "rethrows" => rethrows.to_dynamic,
73287355 "right" => right.to_dynamic,
7356+ "s" => s.to_dynamic,
73297357 "sbyte" => sbyte.to_dynamic,
73307358 "sealed" => sealed.to_dynamic,
73317359 "SEL" => sel.to_dynamic,
Mrustdefault / module_under_test.rs+7 −0
@@ -1565,6 +1565,8 @@ pub struct Obj4 {
15651565
15661566 pub right: Right,
15671567
1568+ pub s: S,
1569+
15681570 pub sbyte: Sbyte,
15691571
15701572 pub sealed: Sealed,
@@ -1795,6 +1797,11 @@ pub struct Right {
17951797 pub right: i64,
17961798 }
17971799
1800+#[derive(Debug, Clone, Serialize, Deserialize)]
1801+pub struct S {
1802+ pub s: i64,
1803+}
1804+
17981805 #[derive(Debug, Clone, Serialize, Deserialize)]
17991806 pub struct Sbyte {
18001807 pub sbyte: i64,
Mscala3-upickledefault / TopLevel.scala+5 −0
@@ -1097,6 +1097,7 @@ case class Obj4 (
10971097 val retain : Retain,
10981098 val rethrows : Rethrows,
10991099 val right : Right,
1100+ val s : S,
11001101 val sbyte : Sbyte,
11011102 val SEL : Sel,
11021103 val select : Select,
@@ -1248,6 +1249,10 @@ case class Right (
12481249 val right : Long
12491250 ) derives OptionPickler.ReadWriter
12501251
1252+case class S (
1253+ val s : Long
1254+) derives OptionPickler.ReadWriter
1255+
12511256 case class Sbyte (
12521257 val sbyte : Long
12531258 ) derives OptionPickler.ReadWriter
Mscala3default / TopLevel.scala+5 −0
@@ -1061,6 +1061,7 @@ case class Obj4 (
10611061 val retain : Retain,
10621062 val rethrows : Rethrows,
10631063 val right : Right,
1064+ val s : S,
10641065 val sbyte : Sbyte,
10651066 val SEL : Sel,
10661067 val select : Select,
@@ -1220,6 +1221,10 @@ case class Right (
12201221 val right : Long
12211222 ) derives Encoder.AsObject, Decoder
12221223
1224+case class S (
1225+ val s : Long
1226+) derives Encoder.AsObject, Decoder
1227+
12231228 case class Sbyte (
12241229 val sbyte : Long
12251230 ) derives Encoder.AsObject, Decoder
Mswiftdefault / quicktype.swift+48 −0
@@ -9596,6 +9596,7 @@ struct Obj4: Codable {
95969596 let requires: Requires
95979597 let restrict: Restrict
95989598 let retain: Retain
9599+ let s: S
95999600 let sbyte: Sbyte
96009601 let sealed: Sealed
96019602 let sel: Sel
@@ -9663,6 +9664,7 @@ struct Obj4: Codable {
96639664 case requires = "requires"
96649665 case restrict = "restrict"
96659666 case retain = "retain"
9667+ case s = "s"
96669668 case sbyte = "sbyte"
96679669 case sealed = "sealed"
96689670 case sel = "SEL"
@@ -9750,6 +9752,7 @@ extension Obj4 {
97509752 requires: Requires? = nil,
97519753 restrict: Restrict? = nil,
97529754 retain: Retain? = nil,
9755+ s: S? = nil,
97539756 sbyte: Sbyte? = nil,
97549757 sealed: Sealed? = nil,
97559758 sel: Sel? = nil,
@@ -9817,6 +9820,7 @@ extension Obj4 {
98179820 requires: requires ?? self.requires,
98189821 restrict: restrict ?? self.restrict,
98199822 retain: retain ?? self.retain,
9823+ s: s ?? self.s,
98209824 sbyte: sbyte ?? self.sbyte,
98219825 sealed: sealed ?? self.sealed,
98229826 sel: sel ?? self.sel,
@@ -11269,6 +11273,50 @@ extension Retain {
1126911273 }
1127011274 }
1127111275
11276+// MARK: - S
11277+struct S: Codable {
11278+ let s: Int
11279+
11280+ enum CodingKeys: String, CodingKey {
11281+ case s = "s"
11282+ }
11283+}
11284+
11285+// MARK: S convenience initializers and mutators
11286+
11287+extension S {
11288+ init(data: Data) throws {
11289+ self = try newJSONDecoder().decode(S.self, from: data)
11290+ }
11291+
11292+ init(_ json: String, using encoding: String.Encoding = .utf8) throws {
11293+ guard let data = json.data(using: encoding) else {
11294+ throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
11295+ }
11296+ try self.init(data: data)
11297+ }
11298+
11299+ init(fromURL url: URL) throws {
11300+ try self.init(data: try Data(contentsOf: url))
11301+ }
11302+
11303+ func with(
11304+ s: Int? = nil
11305+ ) -> S {
11306+ return S(
11307+ s: s ?? self.s
11308+ )
11309+ }
11310+
11311+ func jsonData() throws -> Data {
11312+ return try newJSONEncoder().encode(self)
11313+ }
11314+
11315+ func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
11316+ return String(data: try self.jsonData(), encoding: encoding)
11317+ }
11318+}
11319+
1127211320 // MARK: - Sbyte
1127311321 struct Sbyte: Codable {
1127411322 let sbyte: Int
Mtypescript-effect-schemadefault / TopLevel.ts+5 −0
@@ -281,6 +281,10 @@ export class Sbyte extends S.Class<Sbyte>("Sbyte")({
281281 "sbyte": S.Int,
282282 }) {}
283283
284+export class SClass extends S.Class<SClass>("SClass")({
285+ "s": S.Int,
286+}) {}
287+
284288 export class Right extends S.Class<Right>("Right")({
285289 "right": S.Int,
286290 }) {}
@@ -383,6 +387,7 @@ export class Obj4 extends S.Class<Obj4>("Obj4")({
383387 "rethrows": Rethrows,
384388 "return": Return,
385389 "right": Right,
390+ "s": SClass,
386391 "sbyte": Sbyte,
387392 "sealed": Sealed,
388393 "SEL": Sel,
Mtypescript-zoddefault / TopLevel.ts+6 −0
@@ -1076,6 +1076,11 @@ export const RightSchema = z.object({
10761076 });
10771077 export type Right = z.infer<typeof RightSchema>;
10781078
1079+export const SSchema = z.object({
1080+ "s": z.number().int(),
1081+});
1082+export type S = z.infer<typeof SSchema>;
1083+
10791084 export const SbyteSchema = z.object({
10801085 "sbyte": z.number().int(),
10811086 });
@@ -1628,6 +1633,7 @@ export const Obj4Schema = z.object({
16281633 "rethrows": RethrowsSchema,
16291634 "return": ReturnSchema,
16301635 "right": RightSchema,
1636+ "s": SSchema,
16311637 "sbyte": SbyteSchema,
16321638 "sealed": SealedSchema,
16331639 "SEL": SelSchema,
Mtypescriptdefault / TopLevel.ts+13 −4
@@ -73,7 +73,7 @@ export interface Obj1 {
7373 constructor: Constructor;
7474 continue: Continue;
7575 convenience: Convenience;
76- convert: Convert;
76+ convert: ConvertClass;
7777 converter: Converter;
7878 date: DateClass;
7979 date_parse_handling: DateParseHandling;
@@ -309,7 +309,7 @@ export interface Convenience {
309309 convenience: number;
310310 }
311311
312-export interface Convert {
312+export interface ConvertClass {
313313 convert: number;
314314 }
315315
@@ -1026,6 +1026,7 @@ export interface Obj4 {
10261026 rethrows: Rethrows;
10271027 return: Return;
10281028 right: Right;
1029+ s: S;
10291030 sbyte: Sbyte;
10301031 sealed: Sealed;
10311032 select: Select;
@@ -1155,6 +1156,10 @@ export interface Right {
11551156 right: number;
11561157 }
11571158
1159+export interface S {
1160+ s: number;
1161+}
1162+
11581163 export interface Sbyte {
11591164 sbyte: number;
11601165 }
@@ -1683,7 +1688,7 @@ const typeMap: any = {
16831688 { json: "constructor", js: "constructor", typ: r("Constructor") },
16841689 { json: "continue", js: "continue", typ: r("Continue") },
16851690 { json: "convenience", js: "convenience", typ: r("Convenience") },
1686- { json: "convert", js: "convert", typ: r("Convert") },
1691+ { json: "convert", js: "convert", typ: r("ConvertClass") },
16871692 { json: "converter", js: "converter", typ: r("Converter") },
16881693 { json: "date", js: "date", typ: r("DateClass") },
16891694 { json: "date_parse_handling", js: "date_parse_handling", typ: r("DateParseHandling") },
@@ -1862,7 +1867,7 @@ const typeMap: any = {
18621867 "Convenience": o([
18631868 { json: "convenience", js: "convenience", typ: i(0) },
18641869 ], false),
1865- "Convert": o([
1870+ "ConvertClass": o([
18661871 { json: "convert", js: "convert", typ: i(0) },
18671872 ], false),
18681873 "Converter": o([
@@ -2438,6 +2443,7 @@ const typeMap: any = {
24382443 { json: "rethrows", js: "rethrows", typ: r("Rethrows") },
24392444 { json: "return", js: "return", typ: r("Return") },
24402445 { json: "right", js: "right", typ: r("Right") },
2446+ { json: "s", js: "s", typ: r("S") },
24412447 { json: "sbyte", js: "sbyte", typ: r("Sbyte") },
24422448 { json: "sealed", js: "sealed", typ: r("Sealed") },
24432449 { json: "select", js: "select", typ: r("Select") },
@@ -2545,6 +2551,9 @@ const typeMap: any = {
25452551 "Right": o([
25462552 { json: "right", js: "right", typ: i(0) },
25472553 ], false),
2554+ "S": o([
2555+ { json: "s", js: "s", typ: i(0) },
2556+ ], false),
25482557 "Sbyte": o([
25492558 { json: "sbyte", js: "sbyte", typ: i(0) },
25502559 ], false),
Atypescriptprefer-types-true--df33e18681f9 / TopLevel.ts+2,769 −0
@@ -0,0 +1,2769 @@
1+// To parse this data:
2+//
3+// import { Convert, TopLevel } from "./TopLevel";
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+export type TopLevel = {
11+ dummy: number;
12+ obj1: Obj1;
13+ obj2: Obj2;
14+ obj3: Obj3;
15+ obj4: Obj4;
16+ obj5: Obj5;
17+}
18+
19+export type Obj1 = {
20+ Any: Any;
21+ BOOL: Bool;
22+ Class: Class;
23+ _: Empty;
24+ _Bool: BoolClass;
25+ _Complex: Complex;
26+ _Imaginery: Imaginery;
27+ abstract: Abstract;
28+ alignas: Alignas;
29+ alignof: Alignof;
30+ and: And;
31+ and_eq: AndEq;
32+ any: AnyClass;
33+ array: ArrayClass;
34+ as: As;
35+ asm: ASM;
36+ assert: Assert;
37+ associatedtype: Associatedtype;
38+ associativity: Associativity;
39+ async: Async;
40+ atomic: Atomic;
41+ atomic_cancel: AtomicCancel;
42+ atomic_commit: AtomicCommit;
43+ atomic_noexcept: AtomicNoexcept;
44+ auto: Auto;
45+ await: Await;
46+ base: Base;
47+ bitand: Bitand;
48+ bitor: Bitor;
49+ bool: Obj1Bool;
50+ boolean: Boolean;
51+ break: Break;
52+ bycopy: Bycopy;
53+ byref: Byref;
54+ byte: Byte;
55+ case: Case;
56+ catch: Catch;
57+ chan: Chan;
58+ char: Char;
59+ char16_t: Char16T;
60+ char32_t: Char32T;
61+ checked: Checked;
62+ class: ClassClass;
63+ clone: Clone;
64+ co_await: CoAwait;
65+ co_return: CoReturn;
66+ co_yield: CoYield;
67+ compl: Compl;
68+ concept: Concept;
69+ console: Console;
70+ const: Const;
71+ const_cast: ConstCast;
72+ constexpr: Constexpr;
73+ constructor: Constructor;
74+ continue: Continue;
75+ convenience: Convenience;
76+ convert: ConvertClass;
77+ converter: Converter;
78+ date: DateClass;
79+ date_parse_handling: DateParseHandling;
80+ debugger: Debugger;
81+ decimal: Decimal;
82+ declare: Declare;
83+ decltype: Decltype;
84+ decode_string: DecodeString;
85+ dummy: number;
86+}
87+
88+export type Any = {
89+ Any: number;
90+}
91+
92+export type Bool = {
93+ BOOL: number;
94+}
95+
96+export type Class = {
97+ Class: number;
98+}
99+
100+export type Empty = {
101+ _: number;
102+}
103+
104+export type BoolClass = {
105+ _Bool: number;
106+}
107+
108+export type Complex = {
109+ _Complex: number;
110+}
111+
112+export type Imaginery = {
113+ _Imaginery: number;
114+}
115+
116+export type Abstract = {
117+ abstract: number;
118+}
119+
120+export type Alignas = {
121+ alignas: number;
122+}
123+
124+export type Alignof = {
125+ alignof: number;
126+}
127+
128+export type And = {
129+ and: number;
130+}
131+
132+export type AndEq = {
133+ and_eq: number;
134+}
135+
136+export type AnyClass = {
137+ any: number;
138+}
139+
140+export type ArrayClass = {
141+ array: number;
142+}
143+
144+export type As = {
145+ as: number;
146+}
147+
148+export type ASM = {
149+ asm: number;
150+}
151+
152+export type Assert = {
153+ assert: number;
154+}
155+
156+export type Associatedtype = {
157+ associatedtype: number;
158+}
159+
160+export type Associativity = {
161+ associativity: number;
162+}
163+
164+export type Async = {
165+ async: number;
166+}
167+
168+export type Atomic = {
169+ atomic: number;
170+}
171+
172+export type AtomicCancel = {
173+ atomic_cancel: number;
174+}
175+
176+export type AtomicCommit = {
177+ atomic_commit: number;
178+}
179+
180+export type AtomicNoexcept = {
181+ atomic_noexcept: number;
182+}
183+
184+export type Auto = {
185+ auto: number;
186+}
187+
188+export type Await = {
189+ await: number;
190+}
191+
192+export type Base = {
193+ base: number;
194+}
195+
196+export type Bitand = {
197+ bitand: number;
198+}
199+
200+export type Bitor = {
201+ bitor: number;
202+}
203+
204+export type Obj1Bool = {
205+ bool: number;
206+}
207+
208+export type Boolean = {
209+ boolean: number;
210+}
211+
212+export type Break = {
213+ break: number;
214+}
215+
216+export type Bycopy = {
217+ bycopy: number;
218+}
219+
220+export type Byref = {
221+ byref: number;
222+}
223+
224+export type Byte = {
225+ byte: number;
226+}
227+
228+export type Case = {
229+ case: number;
230+}
231+
232+export type Catch = {
233+ catch: number;
234+}
235+
236+export type Chan = {
237+ chan: number;
238+}
239+
240+export type Char = {
241+ char: number;
242+}
243+
244+export type Char16T = {
245+ char16_t: number;
246+}
247+
248+export type Char32T = {
249+ char32_t: number;
250+}
251+
252+export type Checked = {
253+ checked: number;
254+}
255+
256+export type ClassClass = {
257+ class: number;
258+}
259+
260+export type Clone = {
261+ clone: number;
262+}
263+
264+export type CoAwait = {
265+ co_await: number;
266+}
267+
268+export type CoReturn = {
269+ co_return: number;
270+}
271+
272+export type CoYield = {
273+ co_yield: number;
274+}
275+
276+export type Compl = {
277+ compl: number;
278+}
279+
280+export type Concept = {
281+ concept: number;
282+}
283+
284+export type Console = {
285+ console: number;
286+}
287+
288+export type Const = {
289+ const: number;
290+}
291+
292+export type ConstCast = {
293+ const_cast: number;
294+}
295+
296+export type Constexpr = {
297+ constexpr: number;
298+}
299+
300+export type Constructor = {
301+ constructor: number;
302+}
303+
304+export type Continue = {
305+ continue: number;
306+}
307+
308+export type Convenience = {
309+ convenience: number;
310+}
311+
312+export type ConvertClass = {
313+ convert: number;
314+}
315+
316+export type Converter = {
317+ converter: number;
318+}
319+
320+export type DateClass = {
321+ date: number;
322+}
323+
324+export type DateParseHandling = {
325+ date_parse_handling: number;
326+}
327+
328+export type Debugger = {
329+ debugger: number;
330+}
331+
332+export type Decimal = {
333+ decimal: number;
334+}
335+
336+export type Declare = {
337+ declare: number;
338+}
339+
340+export type Decltype = {
341+ decltype: number;
342+}
343+
344+export type DecodeString = {
345+ decode_string: number;
346+}
347+
348+export type Obj2 = {
349+ False: False;
350+ IMP: Imp;
351+ def: Def;
352+ default: Default;
353+ defer: Defer;
354+ deinit: Deinit;
355+ del: Del;
356+ delegate: Delegate;
357+ delete: Delete;
358+ dict: Dict;
359+ dictionary: Dictionary;
360+ didSet: DidSet;
361+ do: Do;
362+ double: Double;
363+ dummy: number;
364+ dynamic: Dynamic;
365+ dynamic_cast: DynamicCast;
366+ elif: Elif;
367+ else: Else;
368+ encode_quick_type: EncodeQuickType;
369+ enum: Enum;
370+ equalityContract: EqualityContract;
371+ event: Event;
372+ except: Except;
373+ exception: Exception;
374+ explicit: Explicit;
375+ export: Export;
376+ exposing: Exposing;
377+ extends: Extends;
378+ extension: Extension;
379+ extern: Extern;
380+ fallthrough: Fallthrough;
381+ false: FalseClass;
382+ fileprivate: Fileprivate;
383+ final: Final;
384+ finally: Finally;
385+ fixed: Fixed;
386+ float: Float;
387+ for: For;
388+ foreach: Foreach;
389+ friend: Friend;
390+ from: From;
391+ from_json: FromJSON;
392+ func: Func;
393+ function: Function;
394+ get: Get;
395+ global: Global;
396+ go: Go;
397+ goto: Goto;
398+ guard: Guard;
399+ hasOwnProperty: HasOwnProperty;
400+ id: ID;
401+ if: If;
402+ implements: Implements;
403+ implicit: Implicit;
404+ import: Import;
405+ in: In;
406+ indirect: Indirect;
407+ infix: Infix;
408+ init: Init;
409+ inline: Inline;
410+ inout: Inout;
411+ instanceof: Instanceof;
412+ int: Int;
413+ interface: Interface;
414+ internal: Internal;
415+}
416+
417+export type False = {
418+ False: number;
419+}
420+
421+export type Imp = {
422+ IMP: number;
423+}
424+
425+export type Def = {
426+ def: number;
427+}
428+
429+export type Default = {
430+ default: number;
431+}
432+
433+export type Defer = {
434+ defer: number;
435+}
436+
437+export type Deinit = {
438+ deinit: number;
439+}
440+
441+export type Del = {
442+ del: number;
443+}
444+
445+export type Delegate = {
446+ delegate: number;
447+}
448+
449+export type Delete = {
450+ delete: number;
451+}
452+
453+export type Dict = {
454+ dict: number;
455+}
456+
457+export type Dictionary = {
458+ dictionary: number;
459+}
460+
461+export type DidSet = {
462+ didSet: number;
463+}
464+
465+export type Do = {
466+ do: number;
467+}
468+
469+export type Double = {
470+ double: number;
471+}
472+
473+export type Dynamic = {
474+ dynamic: number;
475+}
476+
477+export type DynamicCast = {
478+ dynamic_cast: number;
479+}
480+
481+export type Elif = {
482+ elif: number;
483+}
484+
485+export type Else = {
486+ else: number;
487+}
488+
489+export type EncodeQuickType = {
490+ encode_quick_type: number;
491+}
492+
493+export type Enum = {
494+ enum: number;
495+}
496+
497+export type EqualityContract = {
498+ equalityContract: number;
499+}
500+
501+export type Event = {
502+ event: number;
503+}
504+
505+export type Except = {
506+ except: number;
507+}
508+
509+export type Exception = {
510+ exception: number;
511+}
512+
513+export type Explicit = {
514+ explicit: number;
515+}
516+
517+export type Export = {
518+ export: number;
519+}
520+
521+export type Exposing = {
522+ exposing: number;
523+}
524+
525+export type Extends = {
526+ extends: number;
527+}
528+
529+export type Extension = {
530+ extension: number;
531+}
532+
533+export type Extern = {
534+ extern: number;
535+}
536+
537+export type Fallthrough = {
538+ fallthrough: number;
539+}
540+
541+export type FalseClass = {
542+ false: number;
543+}
544+
545+export type Fileprivate = {
546+ fileprivate: number;
547+}
548+
549+export type Final = {
550+ final: number;
551+}
552+
553+export type Finally = {
554+ finally: number;
555+}
556+
557+export type Fixed = {
558+ fixed: number;
559+}
560+
561+export type Float = {
562+ float: number;
563+}
564+
565+export type For = {
566+ for: number;
567+}
568+
569+export type Foreach = {
570+ foreach: number;
571+}
572+
573+export type Friend = {
574+ friend: number;
575+}
576+
577+export type From = {
578+ from: number;
579+}
580+
581+export type FromJSON = {
582+ from_json: number;
583+}
584+
585+export type Func = {
586+ func: number;
587+}
588+
589+export type Function = {
590+ function: number;
591+}
592+
593+export type Get = {
594+ get: number;
595+}
596+
597+export type Global = {
598+ global: number;
599+}
600+
601+export type Go = {
602+ go: number;
603+}
604+
605+export type Goto = {
606+ goto: number;
607+}
608+
609+export type Guard = {
610+ guard: number;
611+}
612+
613+export type HasOwnProperty = {
614+ hasOwnProperty: number;
615+}
616+
617+export type ID = {
618+ id: number;
619+}
620+
621+export type If = {
622+ if: number;
623+}
624+
625+export type Implements = {
626+ implements: number;
627+}
628+
629+export type Implicit = {
630+ implicit: number;
631+}
632+
633+export type Import = {
634+ import: number;
635+}
636+
637+export type In = {
638+ in: number;
639+}
640+
641+export type Indirect = {
642+ indirect: number;
643+}
644+
645+export type Infix = {
646+ infix: number;
647+}
648+
649+export type Init = {
650+ init: number;
651+}
652+
653+export type Inline = {
654+ inline: number;
655+}
656+
657+export type Inout = {
658+ inout: number;
659+}
660+
661+export type Instanceof = {
662+ instanceof: number;
663+}
664+
665+export type Int = {
666+ int: number;
667+}
668+
669+export type Interface = {
670+ interface: number;
671+}
672+
673+export type Internal = {
674+ internal: number;
675+}
676+
677+export type Obj3 = {
678+ NO: No;
679+ NSString: NSString;
680+ NULL: Null;
681+ None: None;
682+ Protocol: Protocol;
683+ dummy: number;
684+ is: Is;
685+ iterable: Iterable;
686+ jdec: Jdec;
687+ jenc: Jenc;
688+ jpipe: Jpipe;
689+ json: JSON;
690+ json_converter: JSONConverter;
691+ json_serializer: JSONSerializer;
692+ json_token: JSONToken;
693+ json_writer: JSONWriter;
694+ lambda: Lambda;
695+ lazy: Lazy;
696+ left: Left;
697+ let: Let;
698+ list: List;
699+ lock: Lock;
700+ long: Long;
701+ map: Map;
702+ metadata_property_handling: MetadataPropertyHandling;
703+ module: Module;
704+ mutable: Mutable;
705+ mutating: Mutating;
706+ namespace: Namespace;
707+ native: Native;
708+ new: New;
709+ newtonsoft: Newtonsoft;
710+ nil: Nil;
711+ noexcept: Noexcept;
712+ nonatomic: Nonatomic;
713+ none: NoneClass;
714+ nonlocal: Nonlocal;
715+ nonmutating: Nonmutating;
716+ not: Not;
717+ not_eq: NotEq;
718+ null: NullClass;
719+ nullptr: Nullptr;
720+ number: Number;
721+ object: Object;
722+ of: Of;
723+ oneway: Oneway;
724+ open: Open;
725+ operator: Operator;
726+ optional: Optional;
727+ or: Or;
728+ or_eq: OrEq;
729+ out: Out;
730+ override: Override;
731+ package: Package;
732+ params: Params;
733+ pass: Pass;
734+ port: Port;
735+ postfix: Postfix;
736+ precedence: Precedence;
737+ prefix: Prefix;
738+ print: Print;
739+ printMembers: PrintMembers;
740+ printf: Printf;
741+ private: Private;
742+ protected: Protected;
743+ protocol: ProtocolClass;
744+}
745+
746+export type No = {
747+ NO: number;
748+}
749+
750+export type NSString = {
751+ NSString: number;
752+}
753+
754+export type Null = {
755+ NULL: number;
756+}
757+
758+export type None = {
759+ None: number;
760+}
761+
762+export type Protocol = {
763+ Protocol: number;
764+}
765+
766+export type Is = {
767+ is: number;
768+}
769+
770+export type Iterable = {
771+ iterable: number;
772+}
773+
774+export type Jdec = {
775+ jdec: number;
776+}
777+
778+export type Jenc = {
779+ jenc: number;
780+}
781+
782+export type Jpipe = {
783+ jpipe: number;
784+}
785+
786+export type JSON = {
787+ json: number;
788+}
789+
790+export type JSONConverter = {
791+ json_converter: number;
792+}
793+
794+export type JSONSerializer = {
795+ json_serializer: number;
796+}
797+
798+export type JSONToken = {
799+ json_token: number;
800+}
801+
802+export type JSONWriter = {
803+ json_writer: number;
804+}
805+
806+export type Lambda = {
807+ lambda: number;
808+}
809+
810+export type Lazy = {
811+ lazy: number;
812+}
813+
814+export type Left = {
815+ left: number;
816+}
817+
818+export type Let = {
819+ let: number;
820+}
821+
822+export type List = {
823+ list: number;
824+}
825+
826+export type Lock = {
827+ lock: number;
828+}
829+
830+export type Long = {
831+ long: number;
832+}
833+
834+export type Map = {
835+ map: number;
836+}
837+
838+export type MetadataPropertyHandling = {
839+ metadata_property_handling: number;
840+}
841+
842+export type Module = {
843+ module: number;
844+}
845+
846+export type Mutable = {
847+ mutable: number;
848+}
849+
850+export type Mutating = {
851+ mutating: number;
852+}
853+
854+export type Namespace = {
855+ namespace: number;
856+}
857+
858+export type Native = {
859+ native: number;
860+}
861+
862+export type New = {
863+ new: number;
864+}
865+
866+export type Newtonsoft = {
867+ newtonsoft: number;
868+}
869+
870+export type Nil = {
871+ nil: number;
872+}
873+
874+export type Noexcept = {
875+ noexcept: number;
876+}
877+
878+export type Nonatomic = {
879+ nonatomic: number;
880+}
881+
882+export type NoneClass = {
883+ none: number;
884+}
885+
886+export type Nonlocal = {
887+ nonlocal: number;
888+}
889+
890+export type Nonmutating = {
891+ nonmutating: number;
892+}
893+
894+export type Not = {
895+ not: number;
896+}
897+
898+export type NotEq = {
899+ not_eq: number;
900+}
901+
902+export type NullClass = {
903+ null: number;
904+}
905+
906+export type Nullptr = {
907+ nullptr: number;
908+}
909+
910+export type Number = {
911+ number: number;
912+}
913+
914+export type Object = {
915+ object: number;
916+}
917+
918+export type Of = {
919+ of: number;
920+}
921+
922+export type Oneway = {
923+ oneway: number;
924+}
925+
926+export type Open = {
927+ open: number;
928+}
929+
930+export type Operator = {
931+ operator: number;
932+}
933+
934+export type Optional = {
935+ optional: number;
936+}
937+
938+export type Or = {
939+ or: number;
940+}
941+
942+export type OrEq = {
943+ or_eq: number;
944+}
945+
946+export type Out = {
947+ out: number;
948+}
949+
950+export type Override = {
951+ override: number;
952+}
953+
954+export type Package = {
955+ package: number;
956+}
957+
958+export type Params = {
959+ params: number;
960+}
961+
962+export type Pass = {
963+ pass: number;
964+}
965+
966+export type Port = {
967+ port: number;
968+}
969+
970+export type Postfix = {
971+ postfix: number;
972+}
973+
974+export type Precedence = {
975+ precedence: number;
976+}
977+
978+export type Prefix = {
979+ prefix: number;
980+}
981+
982+export type Print = {
983+ print: number;
984+}
985+
986+export type PrintMembers = {
987+ printMembers: number;
988+}
989+
990+export type Printf = {
991+ printf: number;
992+}
993+
994+export type Private = {
995+ private: number;
996+}
997+
998+export type Protected = {
999+ protected: number;
1000+}
1001+
1002+export type ProtocolClass = {
1003+ protocol: number;
1004+}
1005+
1006+export type Obj4 = {
1007+ SEL: Sel;
1008+ Self: Self;
1009+ True: True;
1010+ Type: Type;
1011+ dummy: number;
1012+ public: Public;
1013+ quicktype: Quicktype;
1014+ raise: Raise;
1015+ range: Range;
1016+ readonly: Readonly;
1017+ ref: Ref;
1018+ register: Register;
1019+ reinterpret_cast: ReinterpretCast;
1020+ repeat: Repeat;
1021+ require: Require;
1022+ required: Required;
1023+ requires: Requires;
1024+ restrict: Restrict;
1025+ retain: Retain;
1026+ rethrows: Rethrows;
1027+ return: Return;
1028+ right: Right;
1029+ s: S;
1030+ sbyte: Sbyte;
1031+ sealed: Sealed;
1032+ select: Select;
1033+ self: SelfClass;
1034+ serialize: Serialize;
1035+ set: Set;
1036+ short: Short;
1037+ signed: Signed;
1038+ sizeof: Sizeof;
1039+ stackalloc: Stackalloc;
1040+ static: Static;
1041+ static_assert: StaticAssert;
1042+ static_cast: StaticCast;
1043+ strictfp: Strictfp;
1044+ string: String;
1045+ struct: Struct;
1046+ subscript: Subscript;
1047+ super: Super;
1048+ switch: Switch;
1049+ symbol: Symbol;
1050+ synchronized: Synchronized;
1051+ system: System;
1052+ template: Template;
1053+ then: Then;
1054+ this: This;
1055+ thread_local: ThreadLocal;
1056+ throw: Throw;
1057+ throws: Throws;
1058+ to_json: ToJSON;
1059+ top_level: TopLevelClass;
1060+ transient: Transient;
1061+ true: TrueClass;
1062+ try: Try;
1063+ type: TypeClass;
1064+ typealias: Typealias;
1065+ typedef: Typedef;
1066+ typeid: Typeid;
1067+ typename: Typename;
1068+ typeof: Typeof;
1069+ uint: Uint;
1070+ ulong: Ulong;
1071+ unchecked: Unchecked;
1072+ undefined: Undefined;
1073+}
1074+
1075+export type Sel = {
1076+ SEL: number;
1077+}
1078+
1079+export type Self = {
1080+ Self: number;
1081+}
1082+
1083+export type True = {
1084+ True: number;
1085+}
1086+
1087+export type Type = {
1088+ Type: number;
1089+}
1090+
1091+export type Public = {
1092+ public: number;
1093+}
1094+
1095+export type Quicktype = {
1096+ quicktype: number;
1097+}
1098+
1099+export type Raise = {
1100+ raise: number;
1101+}
1102+
1103+export type Range = {
1104+ range: number;
1105+}
1106+
1107+export type Readonly = {
1108+ readonly: number;
1109+}
1110+
1111+export type Ref = {
1112+ ref: number;
1113+}
1114+
1115+export type Register = {
1116+ register: number;
1117+}
1118+
1119+export type ReinterpretCast = {
1120+ reinterpret_cast: number;
1121+}
1122+
1123+export type Repeat = {
1124+ repeat: number;
1125+}
1126+
1127+export type Require = {
1128+ require: number;
1129+}
1130+
1131+export type Required = {
1132+ required: number;
1133+}
1134+
1135+export type Requires = {
1136+ requires: number;
1137+}
1138+
1139+export type Restrict = {
1140+ restrict: number;
1141+}
1142+
1143+export type Retain = {
1144+ retain: number;
1145+}
1146+
1147+export type Rethrows = {
1148+ rethrows: number;
1149+}
1150+
1151+export type Return = {
1152+ return: number;
1153+}
1154+
1155+export type Right = {
1156+ right: number;
1157+}
1158+
1159+export type S = {
1160+ s: number;
1161+}
1162+
1163+export type Sbyte = {
1164+ sbyte: number;
1165+}
1166+
1167+export type Sealed = {
1168+ sealed: number;
1169+}
1170+
1171+export type Select = {
1172+ select: number;
1173+}
1174+
1175+export type SelfClass = {
1176+ self: number;
1177+}
1178+
1179+export type Serialize = {
1180+ serialize: number;
1181+}
1182+
1183+export type Set = {
1184+ set: number;
1185+}
1186+
1187+export type Short = {
1188+ short: number;
1189+}
1190+
1191+export type Signed = {
1192+ signed: number;
1193+}
1194+
1195+export type Sizeof = {
1196+ sizeof: number;
1197+}
1198+
1199+export type Stackalloc = {
1200+ stackalloc: number;
1201+}
1202+
1203+export type Static = {
1204+ static: number;
1205+}
1206+
1207+export type StaticAssert = {
1208+ static_assert: number;
1209+}
1210+
1211+export type StaticCast = {
1212+ static_cast: number;
1213+}
1214+
1215+export type Strictfp = {
1216+ strictfp: number;
1217+}
1218+
1219+export type String = {
1220+ string: number;
1221+}
1222+
1223+export type Struct = {
1224+ struct: number;
1225+}
1226+
1227+export type Subscript = {
1228+ subscript: number;
1229+}
1230+
1231+export type Super = {
1232+ super: number;
1233+}
1234+
1235+export type Switch = {
1236+ switch: number;
1237+}
1238+
1239+export type Symbol = {
1240+ symbol: number;
1241+}
1242+
1243+export type Synchronized = {
1244+ synchronized: number;
1245+}
1246+
1247+export type System = {
1248+ system: number;
1249+}
1250+
1251+export type Template = {
1252+ template: number;
1253+}
1254+
1255+export type Then = {
1256+ then: number;
1257+}
1258+
1259+export type This = {
1260+ this: number;
1261+}
1262+
1263+export type ThreadLocal = {
1264+ thread_local: number;
1265+}
1266+
1267+export type Throw = {
1268+ throw: number;
1269+}
1270+
1271+export type Throws = {
1272+ throws: number;
1273+}
1274+
1275+export type ToJSON = {
1276+ to_json: number;
1277+}
1278+
1279+export type TopLevelClass = {
1280+ top_level: number;
1281+}
1282+
1283+export type Transient = {
1284+ transient: number;
1285+}
1286+
1287+export type TrueClass = {
1288+ true: number;
1289+}
1290+
1291+export type Try = {
1292+ try: number;
1293+}
1294+
1295+export type TypeClass = {
1296+ type: number;
1297+}
1298+
1299+export type Typealias = {
1300+ typealias: number;
1301+}
1302+
1303+export type Typedef = {
1304+ typedef: number;
1305+}
1306+
1307+export type Typeid = {
1308+ typeid: number;
1309+}
1310+
1311+export type Typename = {
1312+ typename: number;
1313+}
1314+
1315+export type Typeof = {
1316+ typeof: number;
1317+}
1318+
1319+export type Uint = {
1320+ uint: number;
1321+}
1322+
1323+export type Ulong = {
1324+ ulong: number;
1325+}
1326+
1327+export type Unchecked = {
1328+ unchecked: number;
1329+}
1330+
1331+export type Undefined = {
1332+ undefined: number;
1333+}
1334+
1335+export type Obj5 = {
1336+ YES: Yes;
1337+ dummy: number;
1338+ union: Union;
1339+ unowned: Unowned;
1340+ unsafe: Unsafe;
1341+ unsigned: Unsigned;
1342+ ushort: Ushort;
1343+ using: Using;
1344+ var: Var;
1345+ virtual: Virtual;
1346+ void: Void;
1347+ volatile: Volatile;
1348+ wchar_t: WcharT;
1349+ weak: Weak;
1350+ where: Where;
1351+ while: While;
1352+ willSet: WillSet;
1353+ with: With;
1354+ xor: Xor;
1355+ xor_eq: XorEq;
1356+ yield: Yield;
1357+}
1358+
1359+export type Yes = {
1360+ YES: number;
1361+}
1362+
1363+export type Union = {
1364+ union: number;
1365+}
1366+
1367+export type Unowned = {
1368+ unowned: number;
1369+}
1370+
1371+export type Unsafe = {
1372+ unsafe: number;
1373+}
1374+
1375+export type Unsigned = {
1376+ unsigned: number;
1377+}
1378+
1379+export type Ushort = {
1380+ ushort: number;
1381+}
1382+
1383+export type Using = {
1384+ using: number;
1385+}
1386+
1387+export type Var = {
1388+ var: number;
1389+}
1390+
1391+export type Virtual = {
1392+ virtual: number;
1393+}
1394+
1395+export type Void = {
1396+ void: number;
1397+}
1398+
1399+export type Volatile = {
1400+ volatile: number;
1401+}
1402+
1403+export type WcharT = {
1404+ wchar_t: number;
1405+}
1406+
1407+export type Weak = {
1408+ weak: number;
1409+}
1410+
1411+export type Where = {
1412+ where: number;
1413+}
1414+
1415+export type While = {
1416+ while: number;
1417+}
1418+
1419+export type WillSet = {
1420+ willSet: number;
1421+}
1422+
1423+export type With = {
1424+ with: number;
1425+}
1426+
1427+export type Xor = {
1428+ xor: number;
1429+}
1430+
1431+export type XorEq = {
1432+ xor_eq: number;
1433+}
1434+
1435+export type Yield = {
1436+ yield: number;
1437+}
1438+
1439+// Converts JSON strings to/from your types
1440+// and asserts the results of JSON.parse at runtime
1441+export class Convert {
1442+ public static toTopLevel(json: string): TopLevel {
1443+ return cast(JSON.parse(json), r("TopLevel"));
1444+ }
1445+
1446+ public static topLevelToJson(value: TopLevel): string {
1447+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
1448+ }
1449+}
1450+
1451+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
1452+ const prettyTyp = prettyTypeName(typ);
1453+ const parentText = parent ? ` on ${parent}` : '';
1454+ const keyText = key ? ` for key "${key}"` : '';
1455+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
1456+}
1457+
1458+function prettyTypeName(typ: any): string {
1459+ if (Array.isArray(typ)) {
1460+ if (typ.length === 2 && typ[0] === undefined) {
1461+ return `an optional ${prettyTypeName(typ[1])}`;
1462+ } else {
1463+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
1464+ }
1465+ } else if (typeof typ === "object" && typ.literal !== undefined) {
1466+ return typ.literal;
1467+ } else {
1468+ return typeof typ;
1469+ }
1470+}
1471+
1472+function jsonToJSProps(typ: any): any {
1473+ if (typ.jsonToJS === undefined) {
1474+ const map: any = {};
1475+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
1476+ typ.jsonToJS = map;
1477+ }
1478+ return typ.jsonToJS;
1479+}
1480+
1481+function jsToJSONProps(typ: any): any {
1482+ if (typ.jsToJSON === undefined) {
1483+ const map: any = {};
1484+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
1485+ typ.jsToJSON = map;
1486+ }
1487+ return typ.jsToJSON;
1488+}
1489+
1490+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
1491+ function transformPrimitive(typ: string, val: any): any {
1492+ if (typeof typ === typeof val) return val;
1493+ return invalidValue(typ, val, key, parent);
1494+ }
1495+
1496+ function transformUnion(typs: any[], val: any): any {
1497+ // val must validate against one typ in typs
1498+ const l = typs.length;
1499+ for (let i = 0; i < l; i++) {
1500+ const typ = typs[i];
1501+ try {
1502+ return transform(val, typ, getProps);
1503+ } catch (_) {}
1504+ }
1505+ return invalidValue(typs, val, key, parent);
1506+ }
1507+
1508+ function transformEnum(cases: string[], val: any): any {
1509+ if (cases.indexOf(val) !== -1) return val;
1510+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
1511+ }
1512+
1513+ function transformArray(typ: any, val: any): any {
1514+ // val must be an array with no invalid elements
1515+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
1516+
1517+ return val.map(el => transform(el, typ, getProps));
1518+ }
1519+
1520+ function transformDate(val: any): any {
1521+ if (val === null) {
1522+ return null;
1523+ }
1524+ const d = new Date(val);
1525+ if (isNaN(d.valueOf())) {
1526+ return invalidValue(l("Date"), val, key, parent);
1527+ }
1528+ return d;
1529+ }
1530+
1531+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
1532+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
1533+ return invalidValue(l(ref || "object"), val, key, parent);
1534+ }
1535+ const result: any = {};
1536+ Object.getOwnPropertyNames(props).forEach(key => {
1537+ const prop = props[key];
1538+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
1539+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
1540+ });
1541+ Object.getOwnPropertyNames(val).forEach(key => {
1542+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
1543+ result[key] = transform(val[key], additional, getProps, key, ref);
1544+ }
1545+ });
1546+ return result;
1547+ }
1548+
1549+ if (typ === "any") return val;
1550+ if (typ === null) {
1551+ if (val === null) return val;
1552+ return invalidValue(typ, val, key, parent);
1553+ }
1554+ if (typ === false) return invalidValue(typ, val, key, parent);
1555+ let ref: any = undefined;
1556+ while (typeof typ === "object" && typ.ref !== undefined) {
1557+ ref = typ.ref;
1558+ typ = typeMap[typ.ref];
1559+ }
1560+ if (Array.isArray(typ)) return transformEnum(typ, val);
1561+ if (typeof typ === "object") {
1562+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
1563+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
1564+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
1565+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
1566+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
1567+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
1568+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
1569+ : invalidValue(typ, val, key, parent);
1570+ }
1571+ // Numbers can be parsed by Date but shouldn't be.
1572+ if (typ === Date && typeof val !== "number") return transformDate(val);
1573+ return transformPrimitive(typ, val);
1574+}
1575+
1576+function cast<T>(val: any, typ: any): T {
1577+ return transform(val, typ, jsonToJSProps);
1578+}
1579+
1580+function uncast<T>(val: T, typ: any): any {
1581+ return transform(val, typ, jsToJSONProps);
1582+}
1583+
1584+function l(typ: any) {
1585+ return { literal: typ };
1586+}
1587+
1588+function a(typ: any) {
1589+ return { arrayItems: typ };
1590+}
1591+
1592+function i(typ: any) {
1593+ return { integer: typ };
1594+}
1595+
1596+function p(pattern: any) {
1597+ return { pattern };
1598+}
1599+
1600+function s(typ: any, min: any, max: any) {
1601+ return { string: typ, min, max };
1602+}
1603+
1604+function n(typ: any, min: any, max: any) {
1605+ return { number: typ, min, max };
1606+}
1607+
1608+function u(...typs: any[]) {
1609+ return { unionMembers: typs };
1610+}
1611+
1612+function o(props: any[], additional: any) {
1613+ return { props, additional };
1614+}
1615+
1616+function m(additional: any) {
1617+ const props: any[] = [];
1618+ return { props, additional };
1619+}
1620+
1621+function r(name: string) {
1622+ return { ref: name };
1623+}
1624+
1625+const typeMap: any = {
1626+ "TopLevel": o([
1627+ { json: "dummy", js: "dummy", typ: i(0) },
1628+ { json: "obj1", js: "obj1", typ: r("Obj1") },
1629+ { json: "obj2", js: "obj2", typ: r("Obj2") },
1630+ { json: "obj3", js: "obj3", typ: r("Obj3") },
1631+ { json: "obj4", js: "obj4", typ: r("Obj4") },
1632+ { json: "obj5", js: "obj5", typ: r("Obj5") },
1633+ ], false),
1634+ "Obj1": o([
1635+ { json: "Any", js: "Any", typ: r("Any") },
1636+ { json: "BOOL", js: "BOOL", typ: r("Bool") },
1637+ { json: "Class", js: "Class", typ: r("Class") },
1638+ { json: "_", js: "_", typ: r("Empty") },
1639+ { json: "_Bool", js: "_Bool", typ: r("BoolClass") },
1640+ { json: "_Complex", js: "_Complex", typ: r("Complex") },
1641+ { json: "_Imaginery", js: "_Imaginery", typ: r("Imaginery") },
1642+ { json: "abstract", js: "abstract", typ: r("Abstract") },
1643+ { json: "alignas", js: "alignas", typ: r("Alignas") },
1644+ { json: "alignof", js: "alignof", typ: r("Alignof") },
1645+ { json: "and", js: "and", typ: r("And") },
1646+ { json: "and_eq", js: "and_eq", typ: r("AndEq") },
1647+ { json: "any", js: "any", typ: r("AnyClass") },
1648+ { json: "array", js: "array", typ: r("ArrayClass") },
1649+ { json: "as", js: "as", typ: r("As") },
1650+ { json: "asm", js: "asm", typ: r("ASM") },
1651+ { json: "assert", js: "assert", typ: r("Assert") },
1652+ { json: "associatedtype", js: "associatedtype", typ: r("Associatedtype") },
1653+ { json: "associativity", js: "associativity", typ: r("Associativity") },
1654+ { json: "async", js: "async", typ: r("Async") },
1655+ { json: "atomic", js: "atomic", typ: r("Atomic") },
1656+ { json: "atomic_cancel", js: "atomic_cancel", typ: r("AtomicCancel") },
1657+ { json: "atomic_commit", js: "atomic_commit", typ: r("AtomicCommit") },
1658+ { json: "atomic_noexcept", js: "atomic_noexcept", typ: r("AtomicNoexcept") },
1659+ { json: "auto", js: "auto", typ: r("Auto") },
1660+ { json: "await", js: "await", typ: r("Await") },
1661+ { json: "base", js: "base", typ: r("Base") },
1662+ { json: "bitand", js: "bitand", typ: r("Bitand") },
1663+ { json: "bitor", js: "bitor", typ: r("Bitor") },
1664+ { json: "bool", js: "bool", typ: r("Obj1Bool") },
1665+ { json: "boolean", js: "boolean", typ: r("Boolean") },
1666+ { json: "break", js: "break", typ: r("Break") },
1667+ { json: "bycopy", js: "bycopy", typ: r("Bycopy") },
1668+ { json: "byref", js: "byref", typ: r("Byref") },
1669+ { json: "byte", js: "byte", typ: r("Byte") },
1670+ { json: "case", js: "case", typ: r("Case") },
1671+ { json: "catch", js: "catch", typ: r("Catch") },
1672+ { json: "chan", js: "chan", typ: r("Chan") },
1673+ { json: "char", js: "char", typ: r("Char") },
1674+ { json: "char16_t", js: "char16_t", typ: r("Char16T") },
1675+ { json: "char32_t", js: "char32_t", typ: r("Char32T") },
1676+ { json: "checked", js: "checked", typ: r("Checked") },
1677+ { json: "class", js: "class", typ: r("ClassClass") },
1678+ { json: "clone", js: "clone", typ: r("Clone") },
1679+ { json: "co_await", js: "co_await", typ: r("CoAwait") },
1680+ { json: "co_return", js: "co_return", typ: r("CoReturn") },
1681+ { json: "co_yield", js: "co_yield", typ: r("CoYield") },
1682+ { json: "compl", js: "compl", typ: r("Compl") },
1683+ { json: "concept", js: "concept", typ: r("Concept") },
1684+ { json: "console", js: "console", typ: r("Console") },
1685+ { json: "const", js: "const", typ: r("Const") },
1686+ { json: "const_cast", js: "const_cast", typ: r("ConstCast") },
1687+ { json: "constexpr", js: "constexpr", typ: r("Constexpr") },
1688+ { json: "constructor", js: "constructor", typ: r("Constructor") },
1689+ { json: "continue", js: "continue", typ: r("Continue") },
1690+ { json: "convenience", js: "convenience", typ: r("Convenience") },
1691+ { json: "convert", js: "convert", typ: r("ConvertClass") },
1692+ { json: "converter", js: "converter", typ: r("Converter") },
1693+ { json: "date", js: "date", typ: r("DateClass") },
1694+ { json: "date_parse_handling", js: "date_parse_handling", typ: r("DateParseHandling") },
1695+ { json: "debugger", js: "debugger", typ: r("Debugger") },
1696+ { json: "decimal", js: "decimal", typ: r("Decimal") },
1697+ { json: "declare", js: "declare", typ: r("Declare") },
1698+ { json: "decltype", js: "decltype", typ: r("Decltype") },
1699+ { json: "decode_string", js: "decode_string", typ: r("DecodeString") },
1700+ { json: "dummy", js: "dummy", typ: i(0) },
1701+ ], false),
1702+ "Any": o([
1703+ { json: "Any", js: "Any", typ: i(0) },
1704+ ], false),
1705+ "Bool": o([
1706+ { json: "BOOL", js: "BOOL", typ: i(0) },
1707+ ], false),
1708+ "Class": o([
1709+ { json: "Class", js: "Class", typ: i(0) },
1710+ ], false),
1711+ "Empty": o([
1712+ { json: "_", js: "_", typ: i(0) },
1713+ ], false),
1714+ "BoolClass": o([
1715+ { json: "_Bool", js: "_Bool", typ: i(0) },
1716+ ], false),
1717+ "Complex": o([
1718+ { json: "_Complex", js: "_Complex", typ: i(0) },
1719+ ], false),
1720+ "Imaginery": o([
1721+ { json: "_Imaginery", js: "_Imaginery", typ: i(0) },
1722+ ], false),
1723+ "Abstract": o([
1724+ { json: "abstract", js: "abstract", typ: i(0) },
1725+ ], false),
1726+ "Alignas": o([
1727+ { json: "alignas", js: "alignas", typ: i(0) },
1728+ ], false),
1729+ "Alignof": o([
1730+ { json: "alignof", js: "alignof", typ: i(0) },
1731+ ], false),
1732+ "And": o([
1733+ { json: "and", js: "and", typ: i(0) },
1734+ ], false),
1735+ "AndEq": o([
1736+ { json: "and_eq", js: "and_eq", typ: i(0) },
1737+ ], false),
1738+ "AnyClass": o([
1739+ { json: "any", js: "any", typ: i(0) },
1740+ ], false),
1741+ "ArrayClass": o([
1742+ { json: "array", js: "array", typ: i(0) },
1743+ ], false),
1744+ "As": o([
1745+ { json: "as", js: "as", typ: i(0) },
1746+ ], false),
1747+ "ASM": o([
1748+ { json: "asm", js: "asm", typ: i(0) },
1749+ ], false),
1750+ "Assert": o([
1751+ { json: "assert", js: "assert", typ: i(0) },
1752+ ], false),
1753+ "Associatedtype": o([
1754+ { json: "associatedtype", js: "associatedtype", typ: i(0) },
1755+ ], false),
1756+ "Associativity": o([
1757+ { json: "associativity", js: "associativity", typ: i(0) },
1758+ ], false),
1759+ "Async": o([
1760+ { json: "async", js: "async", typ: i(0) },
1761+ ], false),
1762+ "Atomic": o([
1763+ { json: "atomic", js: "atomic", typ: i(0) },
1764+ ], false),
1765+ "AtomicCancel": o([
1766+ { json: "atomic_cancel", js: "atomic_cancel", typ: i(0) },
1767+ ], false),
1768+ "AtomicCommit": o([
1769+ { json: "atomic_commit", js: "atomic_commit", typ: i(0) },
1770+ ], false),
1771+ "AtomicNoexcept": o([
1772+ { json: "atomic_noexcept", js: "atomic_noexcept", typ: i(0) },
1773+ ], false),
1774+ "Auto": o([
1775+ { json: "auto", js: "auto", typ: i(0) },
1776+ ], false),
1777+ "Await": o([
1778+ { json: "await", js: "await", typ: i(0) },
1779+ ], false),
1780+ "Base": o([
1781+ { json: "base", js: "base", typ: i(0) },
1782+ ], false),
1783+ "Bitand": o([
1784+ { json: "bitand", js: "bitand", typ: i(0) },
1785+ ], false),
1786+ "Bitor": o([
1787+ { json: "bitor", js: "bitor", typ: i(0) },
1788+ ], false),
1789+ "Obj1Bool": o([
1790+ { json: "bool", js: "bool", typ: i(0) },
1791+ ], false),
1792+ "Boolean": o([
1793+ { json: "boolean", js: "boolean", typ: i(0) },
1794+ ], false),
1795+ "Break": o([
1796+ { json: "break", js: "break", typ: i(0) },
1797+ ], false),
1798+ "Bycopy": o([
1799+ { json: "bycopy", js: "bycopy", typ: i(0) },
1800+ ], false),
1801+ "Byref": o([
1802+ { json: "byref", js: "byref", typ: i(0) },
1803+ ], false),
1804+ "Byte": o([
1805+ { json: "byte", js: "byte", typ: i(0) },
1806+ ], false),
1807+ "Case": o([
1808+ { json: "case", js: "case", typ: i(0) },
1809+ ], false),
1810+ "Catch": o([
1811+ { json: "catch", js: "catch", typ: i(0) },
1812+ ], false),
1813+ "Chan": o([
1814+ { json: "chan", js: "chan", typ: i(0) },
1815+ ], false),
1816+ "Char": o([
1817+ { json: "char", js: "char", typ: i(0) },
1818+ ], false),
1819+ "Char16T": o([
1820+ { json: "char16_t", js: "char16_t", typ: i(0) },
1821+ ], false),
1822+ "Char32T": o([
1823+ { json: "char32_t", js: "char32_t", typ: i(0) },
1824+ ], false),
1825+ "Checked": o([
1826+ { json: "checked", js: "checked", typ: i(0) },
1827+ ], false),
1828+ "ClassClass": o([
1829+ { json: "class", js: "class", typ: i(0) },
1830+ ], false),
1831+ "Clone": o([
1832+ { json: "clone", js: "clone", typ: i(0) },
1833+ ], false),
1834+ "CoAwait": o([
1835+ { json: "co_await", js: "co_await", typ: i(0) },
1836+ ], false),
1837+ "CoReturn": o([
1838+ { json: "co_return", js: "co_return", typ: i(0) },
1839+ ], false),
1840+ "CoYield": o([
1841+ { json: "co_yield", js: "co_yield", typ: i(0) },
1842+ ], false),
1843+ "Compl": o([
1844+ { json: "compl", js: "compl", typ: i(0) },
1845+ ], false),
1846+ "Concept": o([
1847+ { json: "concept", js: "concept", typ: i(0) },
1848+ ], false),
1849+ "Console": o([
1850+ { json: "console", js: "console", typ: i(0) },
1851+ ], false),
1852+ "Const": o([
1853+ { json: "const", js: "const", typ: i(0) },
1854+ ], false),
1855+ "ConstCast": o([
1856+ { json: "const_cast", js: "const_cast", typ: i(0) },
1857+ ], false),
1858+ "Constexpr": o([
1859+ { json: "constexpr", js: "constexpr", typ: i(0) },
1860+ ], false),
1861+ "Constructor": o([
1862+ { json: "constructor", js: "constructor", typ: i(0) },
1863+ ], false),
1864+ "Continue": o([
1865+ { json: "continue", js: "continue", typ: i(0) },
1866+ ], false),
1867+ "Convenience": o([
1868+ { json: "convenience", js: "convenience", typ: i(0) },
1869+ ], false),
1870+ "ConvertClass": o([
1871+ { json: "convert", js: "convert", typ: i(0) },
1872+ ], false),
1873+ "Converter": o([
1874+ { json: "converter", js: "converter", typ: i(0) },
1875+ ], false),
1876+ "DateClass": o([
1877+ { json: "date", js: "date", typ: i(0) },
1878+ ], false),
1879+ "DateParseHandling": o([
1880+ { json: "date_parse_handling", js: "date_parse_handling", typ: i(0) },
1881+ ], false),
1882+ "Debugger": o([
1883+ { json: "debugger", js: "debugger", typ: i(0) },
1884+ ], false),
1885+ "Decimal": o([
1886+ { json: "decimal", js: "decimal", typ: i(0) },
1887+ ], false),
1888+ "Declare": o([
1889+ { json: "declare", js: "declare", typ: i(0) },
1890+ ], false),
1891+ "Decltype": o([
1892+ { json: "decltype", js: "decltype", typ: i(0) },
1893+ ], false),
1894+ "DecodeString": o([
1895+ { json: "decode_string", js: "decode_string", typ: i(0) },
1896+ ], false),
1897+ "Obj2": o([
1898+ { json: "False", js: "False", typ: r("False") },
1899+ { json: "IMP", js: "IMP", typ: r("Imp") },
1900+ { json: "def", js: "def", typ: r("Def") },
1901+ { json: "default", js: "default", typ: r("Default") },
1902+ { json: "defer", js: "defer", typ: r("Defer") },
1903+ { json: "deinit", js: "deinit", typ: r("Deinit") },
1904+ { json: "del", js: "del", typ: r("Del") },
1905+ { json: "delegate", js: "delegate", typ: r("Delegate") },
1906+ { json: "delete", js: "delete", typ: r("Delete") },
1907+ { json: "dict", js: "dict", typ: r("Dict") },
1908+ { json: "dictionary", js: "dictionary", typ: r("Dictionary") },
1909+ { json: "didSet", js: "didSet", typ: r("DidSet") },
1910+ { json: "do", js: "do", typ: r("Do") },
1911+ { json: "double", js: "double", typ: r("Double") },
1912+ { json: "dummy", js: "dummy", typ: i(0) },
1913+ { json: "dynamic", js: "dynamic", typ: r("Dynamic") },
1914+ { json: "dynamic_cast", js: "dynamic_cast", typ: r("DynamicCast") },
1915+ { json: "elif", js: "elif", typ: r("Elif") },
1916+ { json: "else", js: "else", typ: r("Else") },
1917+ { json: "encode_quick_type", js: "encode_quick_type", typ: r("EncodeQuickType") },
1918+ { json: "enum", js: "enum", typ: r("Enum") },
1919+ { json: "equalityContract", js: "equalityContract", typ: r("EqualityContract") },
1920+ { json: "event", js: "event", typ: r("Event") },
1921+ { json: "except", js: "except", typ: r("Except") },
1922+ { json: "exception", js: "exception", typ: r("Exception") },
1923+ { json: "explicit", js: "explicit", typ: r("Explicit") },
1924+ { json: "export", js: "export", typ: r("Export") },
1925+ { json: "exposing", js: "exposing", typ: r("Exposing") },
1926+ { json: "extends", js: "extends", typ: r("Extends") },
1927+ { json: "extension", js: "extension", typ: r("Extension") },
1928+ { json: "extern", js: "extern", typ: r("Extern") },
1929+ { json: "fallthrough", js: "fallthrough", typ: r("Fallthrough") },
1930+ { json: "false", js: "false", typ: r("FalseClass") },
1931+ { json: "fileprivate", js: "fileprivate", typ: r("Fileprivate") },
1932+ { json: "final", js: "final", typ: r("Final") },
1933+ { json: "finally", js: "finally", typ: r("Finally") },
1934+ { json: "fixed", js: "fixed", typ: r("Fixed") },
1935+ { json: "float", js: "float", typ: r("Float") },
1936+ { json: "for", js: "for", typ: r("For") },
1937+ { json: "foreach", js: "foreach", typ: r("Foreach") },
1938+ { json: "friend", js: "friend", typ: r("Friend") },
1939+ { json: "from", js: "from", typ: r("From") },
1940+ { json: "from_json", js: "from_json", typ: r("FromJSON") },
1941+ { json: "func", js: "func", typ: r("Func") },
1942+ { json: "function", js: "function", typ: r("Function") },
1943+ { json: "get", js: "get", typ: r("Get") },
1944+ { json: "global", js: "global", typ: r("Global") },
1945+ { json: "go", js: "go", typ: r("Go") },
1946+ { json: "goto", js: "goto", typ: r("Goto") },
1947+ { json: "guard", js: "guard", typ: r("Guard") },
1948+ { json: "hasOwnProperty", js: "hasOwnProperty", typ: r("HasOwnProperty") },
1949+ { json: "id", js: "id", typ: r("ID") },
1950+ { json: "if", js: "if", typ: r("If") },
1951+ { json: "implements", js: "implements", typ: r("Implements") },
1952+ { json: "implicit", js: "implicit", typ: r("Implicit") },
1953+ { json: "import", js: "import", typ: r("Import") },
1954+ { json: "in", js: "in", typ: r("In") },
1955+ { json: "indirect", js: "indirect", typ: r("Indirect") },
1956+ { json: "infix", js: "infix", typ: r("Infix") },
1957+ { json: "init", js: "init", typ: r("Init") },
1958+ { json: "inline", js: "inline", typ: r("Inline") },
1959+ { json: "inout", js: "inout", typ: r("Inout") },
1960+ { json: "instanceof", js: "instanceof", typ: r("Instanceof") },
1961+ { json: "int", js: "int", typ: r("Int") },
1962+ { json: "interface", js: "interface", typ: r("Interface") },
1963+ { json: "internal", js: "internal", typ: r("Internal") },
1964+ ], false),
1965+ "False": o([
1966+ { json: "False", js: "False", typ: i(0) },
1967+ ], false),
1968+ "Imp": o([
1969+ { json: "IMP", js: "IMP", typ: i(0) },
1970+ ], false),
1971+ "Def": o([
1972+ { json: "def", js: "def", typ: i(0) },
1973+ ], false),
1974+ "Default": o([
1975+ { json: "default", js: "default", typ: i(0) },
1976+ ], false),
1977+ "Defer": o([
1978+ { json: "defer", js: "defer", typ: i(0) },
1979+ ], false),
1980+ "Deinit": o([
1981+ { json: "deinit", js: "deinit", typ: i(0) },
1982+ ], false),
1983+ "Del": o([
1984+ { json: "del", js: "del", typ: i(0) },
1985+ ], false),
1986+ "Delegate": o([
1987+ { json: "delegate", js: "delegate", typ: i(0) },
1988+ ], false),
1989+ "Delete": o([
1990+ { json: "delete", js: "delete", typ: i(0) },
1991+ ], false),
1992+ "Dict": o([
1993+ { json: "dict", js: "dict", typ: i(0) },
1994+ ], false),
1995+ "Dictionary": o([
1996+ { json: "dictionary", js: "dictionary", typ: i(0) },
1997+ ], false),
1998+ "DidSet": o([
1999+ { json: "didSet", js: "didSet", typ: i(0) },
2000+ ], false),
2001+ "Do": o([
2002+ { json: "do", js: "do", typ: i(0) },
2003+ ], false),
2004+ "Double": o([
2005+ { json: "double", js: "double", typ: i(0) },
2006+ ], false),
2007+ "Dynamic": o([
2008+ { json: "dynamic", js: "dynamic", typ: i(0) },
2009+ ], false),
2010+ "DynamicCast": o([
2011+ { json: "dynamic_cast", js: "dynamic_cast", typ: i(0) },
2012+ ], false),
2013+ "Elif": o([
2014+ { json: "elif", js: "elif", typ: i(0) },
2015+ ], false),
2016+ "Else": o([
2017+ { json: "else", js: "else", typ: i(0) },
2018+ ], false),
2019+ "EncodeQuickType": o([
2020+ { json: "encode_quick_type", js: "encode_quick_type", typ: i(0) },
2021+ ], false),
2022+ "Enum": o([
2023+ { json: "enum", js: "enum", typ: i(0) },
2024+ ], false),
2025+ "EqualityContract": o([
2026+ { json: "equalityContract", js: "equalityContract", typ: i(0) },
2027+ ], false),
2028+ "Event": o([
2029+ { json: "event", js: "event", typ: i(0) },
2030+ ], false),
2031+ "Except": o([
2032+ { json: "except", js: "except", typ: i(0) },
2033+ ], false),
2034+ "Exception": o([
2035+ { json: "exception", js: "exception", typ: i(0) },
2036+ ], false),
2037+ "Explicit": o([
2038+ { json: "explicit", js: "explicit", typ: i(0) },
2039+ ], false),
2040+ "Export": o([
2041+ { json: "export", js: "export", typ: i(0) },
2042+ ], false),
2043+ "Exposing": o([
2044+ { json: "exposing", js: "exposing", typ: i(0) },
2045+ ], false),
2046+ "Extends": o([
2047+ { json: "extends", js: "extends", typ: i(0) },
2048+ ], false),
2049+ "Extension": o([
2050+ { json: "extension", js: "extension", typ: i(0) },
2051+ ], false),
2052+ "Extern": o([
2053+ { json: "extern", js: "extern", typ: i(0) },
2054+ ], false),
2055+ "Fallthrough": o([
2056+ { json: "fallthrough", js: "fallthrough", typ: i(0) },
2057+ ], false),
2058+ "FalseClass": o([
2059+ { json: "false", js: "false", typ: i(0) },
2060+ ], false),
2061+ "Fileprivate": o([
2062+ { json: "fileprivate", js: "fileprivate", typ: i(0) },
2063+ ], false),
2064+ "Final": o([
2065+ { json: "final", js: "final", typ: i(0) },
2066+ ], false),
2067+ "Finally": o([
2068+ { json: "finally", js: "finally", typ: i(0) },
2069+ ], false),
2070+ "Fixed": o([
2071+ { json: "fixed", js: "fixed", typ: i(0) },
2072+ ], false),
2073+ "Float": o([
2074+ { json: "float", js: "float", typ: i(0) },
2075+ ], false),
2076+ "For": o([
2077+ { json: "for", js: "for", typ: i(0) },
2078+ ], false),
2079+ "Foreach": o([
2080+ { json: "foreach", js: "foreach", typ: i(0) },
2081+ ], false),
2082+ "Friend": o([
2083+ { json: "friend", js: "friend", typ: i(0) },
2084+ ], false),
2085+ "From": o([
2086+ { json: "from", js: "from", typ: i(0) },
2087+ ], false),
2088+ "FromJSON": o([
2089+ { json: "from_json", js: "from_json", typ: i(0) },
2090+ ], false),
2091+ "Func": o([
2092+ { json: "func", js: "func", typ: i(0) },
2093+ ], false),
2094+ "Function": o([
2095+ { json: "function", js: "function", typ: i(0) },
2096+ ], false),
2097+ "Get": o([
2098+ { json: "get", js: "get", typ: i(0) },
2099+ ], false),
2100+ "Global": o([
2101+ { json: "global", js: "global", typ: i(0) },
2102+ ], false),
2103+ "Go": o([
2104+ { json: "go", js: "go", typ: i(0) },
2105+ ], false),
2106+ "Goto": o([
2107+ { json: "goto", js: "goto", typ: i(0) },
2108+ ], false),
2109+ "Guard": o([
2110+ { json: "guard", js: "guard", typ: i(0) },
2111+ ], false),
2112+ "HasOwnProperty": o([
2113+ { json: "hasOwnProperty", js: "hasOwnProperty", typ: i(0) },
2114+ ], false),
2115+ "ID": o([
2116+ { json: "id", js: "id", typ: i(0) },
2117+ ], false),
2118+ "If": o([
2119+ { json: "if", js: "if", typ: i(0) },
2120+ ], false),
2121+ "Implements": o([
2122+ { json: "implements", js: "implements", typ: i(0) },
2123+ ], false),
2124+ "Implicit": o([
2125+ { json: "implicit", js: "implicit", typ: i(0) },
2126+ ], false),
2127+ "Import": o([
2128+ { json: "import", js: "import", typ: i(0) },
2129+ ], false),
2130+ "In": o([
2131+ { json: "in", js: "in", typ: i(0) },
2132+ ], false),
2133+ "Indirect": o([
2134+ { json: "indirect", js: "indirect", typ: i(0) },
2135+ ], false),
2136+ "Infix": o([
2137+ { json: "infix", js: "infix", typ: i(0) },
2138+ ], false),
2139+ "Init": o([
2140+ { json: "init", js: "init", typ: i(0) },
2141+ ], false),
2142+ "Inline": o([
2143+ { json: "inline", js: "inline", typ: i(0) },
2144+ ], false),
2145+ "Inout": o([
2146+ { json: "inout", js: "inout", typ: i(0) },
2147+ ], false),
2148+ "Instanceof": o([
2149+ { json: "instanceof", js: "instanceof", typ: i(0) },
2150+ ], false),
2151+ "Int": o([
2152+ { json: "int", js: "int", typ: i(0) },
2153+ ], false),
2154+ "Interface": o([
2155+ { json: "interface", js: "interface", typ: i(0) },
2156+ ], false),
2157+ "Internal": o([
2158+ { json: "internal", js: "internal", typ: i(0) },
2159+ ], false),
2160+ "Obj3": o([
2161+ { json: "NO", js: "NO", typ: r("No") },
2162+ { json: "NSString", js: "NSString", typ: r("NSString") },
2163+ { json: "NULL", js: "NULL", typ: r("Null") },
2164+ { json: "None", js: "None", typ: r("None") },
2165+ { json: "Protocol", js: "Protocol", typ: r("Protocol") },
2166+ { json: "dummy", js: "dummy", typ: i(0) },
2167+ { json: "is", js: "is", typ: r("Is") },
2168+ { json: "iterable", js: "iterable", typ: r("Iterable") },
2169+ { json: "jdec", js: "jdec", typ: r("Jdec") },
2170+ { json: "jenc", js: "jenc", typ: r("Jenc") },
2171+ { json: "jpipe", js: "jpipe", typ: r("Jpipe") },
2172+ { json: "json", js: "json", typ: r("JSON") },
2173+ { json: "json_converter", js: "json_converter", typ: r("JSONConverter") },
2174+ { json: "json_serializer", js: "json_serializer", typ: r("JSONSerializer") },
2175+ { json: "json_token", js: "json_token", typ: r("JSONToken") },
2176+ { json: "json_writer", js: "json_writer", typ: r("JSONWriter") },
2177+ { json: "lambda", js: "lambda", typ: r("Lambda") },
2178+ { json: "lazy", js: "lazy", typ: r("Lazy") },
2179+ { json: "left", js: "left", typ: r("Left") },
2180+ { json: "let", js: "let", typ: r("Let") },
2181+ { json: "list", js: "list", typ: r("List") },
2182+ { json: "lock", js: "lock", typ: r("Lock") },
2183+ { json: "long", js: "long", typ: r("Long") },
2184+ { json: "map", js: "map", typ: r("Map") },
2185+ { json: "metadata_property_handling", js: "metadata_property_handling", typ: r("MetadataPropertyHandling") },
2186+ { json: "module", js: "module", typ: r("Module") },
2187+ { json: "mutable", js: "mutable", typ: r("Mutable") },
2188+ { json: "mutating", js: "mutating", typ: r("Mutating") },
2189+ { json: "namespace", js: "namespace", typ: r("Namespace") },
2190+ { json: "native", js: "native", typ: r("Native") },
2191+ { json: "new", js: "new", typ: r("New") },
2192+ { json: "newtonsoft", js: "newtonsoft", typ: r("Newtonsoft") },
2193+ { json: "nil", js: "nil", typ: r("Nil") },
2194+ { json: "noexcept", js: "noexcept", typ: r("Noexcept") },
2195+ { json: "nonatomic", js: "nonatomic", typ: r("Nonatomic") },
2196+ { json: "none", js: "none", typ: r("NoneClass") },
2197+ { json: "nonlocal", js: "nonlocal", typ: r("Nonlocal") },
2198+ { json: "nonmutating", js: "nonmutating", typ: r("Nonmutating") },
2199+ { json: "not", js: "not", typ: r("Not") },
2200+ { json: "not_eq", js: "not_eq", typ: r("NotEq") },
2201+ { json: "null", js: "null", typ: r("NullClass") },
2202+ { json: "nullptr", js: "nullptr", typ: r("Nullptr") },
2203+ { json: "number", js: "number", typ: r("Number") },
2204+ { json: "object", js: "object", typ: r("Object") },
2205+ { json: "of", js: "of", typ: r("Of") },
2206+ { json: "oneway", js: "oneway", typ: r("Oneway") },
2207+ { json: "open", js: "open", typ: r("Open") },
2208+ { json: "operator", js: "operator", typ: r("Operator") },
2209+ { json: "optional", js: "optional", typ: r("Optional") },
2210+ { json: "or", js: "or", typ: r("Or") },
2211+ { json: "or_eq", js: "or_eq", typ: r("OrEq") },
2212+ { json: "out", js: "out", typ: r("Out") },
2213+ { json: "override", js: "override", typ: r("Override") },
2214+ { json: "package", js: "package", typ: r("Package") },
2215+ { json: "params", js: "params", typ: r("Params") },
2216+ { json: "pass", js: "pass", typ: r("Pass") },
2217+ { json: "port", js: "port", typ: r("Port") },
2218+ { json: "postfix", js: "postfix", typ: r("Postfix") },
2219+ { json: "precedence", js: "precedence", typ: r("Precedence") },
2220+ { json: "prefix", js: "prefix", typ: r("Prefix") },
2221+ { json: "print", js: "print", typ: r("Print") },
2222+ { json: "printMembers", js: "printMembers", typ: r("PrintMembers") },
2223+ { json: "printf", js: "printf", typ: r("Printf") },
2224+ { json: "private", js: "private", typ: r("Private") },
2225+ { json: "protected", js: "protected", typ: r("Protected") },
2226+ { json: "protocol", js: "protocol", typ: r("ProtocolClass") },
2227+ ], false),
2228+ "No": o([
2229+ { json: "NO", js: "NO", typ: i(0) },
2230+ ], false),
2231+ "NSString": o([
2232+ { json: "NSString", js: "NSString", typ: i(0) },
2233+ ], false),
2234+ "Null": o([
2235+ { json: "NULL", js: "NULL", typ: i(0) },
2236+ ], false),
2237+ "None": o([
2238+ { json: "None", js: "None", typ: i(0) },
2239+ ], false),
2240+ "Protocol": o([
2241+ { json: "Protocol", js: "Protocol", typ: i(0) },
2242+ ], false),
2243+ "Is": o([
2244+ { json: "is", js: "is", typ: i(0) },
2245+ ], false),
2246+ "Iterable": o([
2247+ { json: "iterable", js: "iterable", typ: i(0) },
2248+ ], false),
2249+ "Jdec": o([
2250+ { json: "jdec", js: "jdec", typ: i(0) },
2251+ ], false),
2252+ "Jenc": o([
2253+ { json: "jenc", js: "jenc", typ: i(0) },
2254+ ], false),
2255+ "Jpipe": o([
2256+ { json: "jpipe", js: "jpipe", typ: i(0) },
2257+ ], false),
2258+ "JSON": o([
2259+ { json: "json", js: "json", typ: i(0) },
2260+ ], false),
2261+ "JSONConverter": o([
2262+ { json: "json_converter", js: "json_converter", typ: i(0) },
2263+ ], false),
2264+ "JSONSerializer": o([
2265+ { json: "json_serializer", js: "json_serializer", typ: i(0) },
2266+ ], false),
2267+ "JSONToken": o([
2268+ { json: "json_token", js: "json_token", typ: i(0) },
2269+ ], false),
2270+ "JSONWriter": o([
2271+ { json: "json_writer", js: "json_writer", typ: i(0) },
2272+ ], false),
2273+ "Lambda": o([
2274+ { json: "lambda", js: "lambda", typ: i(0) },
2275+ ], false),
2276+ "Lazy": o([
2277+ { json: "lazy", js: "lazy", typ: i(0) },
2278+ ], false),
2279+ "Left": o([
2280+ { json: "left", js: "left", typ: i(0) },
2281+ ], false),
2282+ "Let": o([
2283+ { json: "let", js: "let", typ: i(0) },
2284+ ], false),
2285+ "List": o([
2286+ { json: "list", js: "list", typ: i(0) },
2287+ ], false),
2288+ "Lock": o([
2289+ { json: "lock", js: "lock", typ: i(0) },
2290+ ], false),
2291+ "Long": o([
2292+ { json: "long", js: "long", typ: i(0) },
2293+ ], false),
2294+ "Map": o([
2295+ { json: "map", js: "map", typ: i(0) },
2296+ ], false),
2297+ "MetadataPropertyHandling": o([
2298+ { json: "metadata_property_handling", js: "metadata_property_handling", typ: i(0) },
2299+ ], false),
2300+ "Module": o([
2301+ { json: "module", js: "module", typ: i(0) },
2302+ ], false),
2303+ "Mutable": o([
2304+ { json: "mutable", js: "mutable", typ: i(0) },
2305+ ], false),
2306+ "Mutating": o([
2307+ { json: "mutating", js: "mutating", typ: i(0) },
2308+ ], false),
2309+ "Namespace": o([
2310+ { json: "namespace", js: "namespace", typ: i(0) },
2311+ ], false),
2312+ "Native": o([
2313+ { json: "native", js: "native", typ: i(0) },
2314+ ], false),
2315+ "New": o([
2316+ { json: "new", js: "new", typ: i(0) },
2317+ ], false),
2318+ "Newtonsoft": o([
2319+ { json: "newtonsoft", js: "newtonsoft", typ: i(0) },
2320+ ], false),
2321+ "Nil": o([
2322+ { json: "nil", js: "nil", typ: i(0) },
2323+ ], false),
2324+ "Noexcept": o([
2325+ { json: "noexcept", js: "noexcept", typ: i(0) },
2326+ ], false),
2327+ "Nonatomic": o([
2328+ { json: "nonatomic", js: "nonatomic", typ: i(0) },
2329+ ], false),
2330+ "NoneClass": o([
2331+ { json: "none", js: "none", typ: i(0) },
2332+ ], false),
2333+ "Nonlocal": o([
2334+ { json: "nonlocal", js: "nonlocal", typ: i(0) },
2335+ ], false),
2336+ "Nonmutating": o([
2337+ { json: "nonmutating", js: "nonmutating", typ: i(0) },
2338+ ], false),
2339+ "Not": o([
2340+ { json: "not", js: "not", typ: i(0) },
2341+ ], false),
2342+ "NotEq": o([
2343+ { json: "not_eq", js: "not_eq", typ: i(0) },
2344+ ], false),
2345+ "NullClass": o([
2346+ { json: "null", js: "null", typ: i(0) },
2347+ ], false),
2348+ "Nullptr": o([
2349+ { json: "nullptr", js: "nullptr", typ: i(0) },
2350+ ], false),
2351+ "Number": o([
2352+ { json: "number", js: "number", typ: i(0) },
2353+ ], false),
2354+ "Object": o([
2355+ { json: "object", js: "object", typ: i(0) },
2356+ ], false),
2357+ "Of": o([
2358+ { json: "of", js: "of", typ: i(0) },
2359+ ], false),
2360+ "Oneway": o([
2361+ { json: "oneway", js: "oneway", typ: i(0) },
2362+ ], false),
2363+ "Open": o([
2364+ { json: "open", js: "open", typ: i(0) },
2365+ ], false),
2366+ "Operator": o([
2367+ { json: "operator", js: "operator", typ: i(0) },
2368+ ], false),
2369+ "Optional": o([
2370+ { json: "optional", js: "optional", typ: i(0) },
2371+ ], false),
2372+ "Or": o([
2373+ { json: "or", js: "or", typ: i(0) },
2374+ ], false),
2375+ "OrEq": o([
2376+ { json: "or_eq", js: "or_eq", typ: i(0) },
2377+ ], false),
2378+ "Out": o([
2379+ { json: "out", js: "out", typ: i(0) },
2380+ ], false),
2381+ "Override": o([
2382+ { json: "override", js: "override", typ: i(0) },
2383+ ], false),
2384+ "Package": o([
2385+ { json: "package", js: "package", typ: i(0) },
2386+ ], false),
2387+ "Params": o([
2388+ { json: "params", js: "params", typ: i(0) },
2389+ ], false),
2390+ "Pass": o([
2391+ { json: "pass", js: "pass", typ: i(0) },
2392+ ], false),
2393+ "Port": o([
2394+ { json: "port", js: "port", typ: i(0) },
2395+ ], false),
2396+ "Postfix": o([
2397+ { json: "postfix", js: "postfix", typ: i(0) },
2398+ ], false),
2399+ "Precedence": o([
2400+ { json: "precedence", js: "precedence", typ: i(0) },
2401+ ], false),
2402+ "Prefix": o([
2403+ { json: "prefix", js: "prefix", typ: i(0) },
2404+ ], false),
2405+ "Print": o([
2406+ { json: "print", js: "print", typ: i(0) },
2407+ ], false),
2408+ "PrintMembers": o([
2409+ { json: "printMembers", js: "printMembers", typ: i(0) },
2410+ ], false),
2411+ "Printf": o([
2412+ { json: "printf", js: "printf", typ: i(0) },
2413+ ], false),
2414+ "Private": o([
2415+ { json: "private", js: "private", typ: i(0) },
2416+ ], false),
2417+ "Protected": o([
2418+ { json: "protected", js: "protected", typ: i(0) },
2419+ ], false),
2420+ "ProtocolClass": o([
2421+ { json: "protocol", js: "protocol", typ: i(0) },
2422+ ], false),
2423+ "Obj4": o([
2424+ { json: "SEL", js: "SEL", typ: r("Sel") },
2425+ { json: "Self", js: "Self", typ: r("Self") },
2426+ { json: "True", js: "True", typ: r("True") },
2427+ { json: "Type", js: "Type", typ: r("Type") },
2428+ { json: "dummy", js: "dummy", typ: i(0) },
2429+ { json: "public", js: "public", typ: r("Public") },
2430+ { json: "quicktype", js: "quicktype", typ: r("Quicktype") },
2431+ { json: "raise", js: "raise", typ: r("Raise") },
2432+ { json: "range", js: "range", typ: r("Range") },
2433+ { json: "readonly", js: "readonly", typ: r("Readonly") },
2434+ { json: "ref", js: "ref", typ: r("Ref") },
2435+ { json: "register", js: "register", typ: r("Register") },
2436+ { json: "reinterpret_cast", js: "reinterpret_cast", typ: r("ReinterpretCast") },
2437+ { json: "repeat", js: "repeat", typ: r("Repeat") },
2438+ { json: "require", js: "require", typ: r("Require") },
2439+ { json: "required", js: "required", typ: r("Required") },
2440+ { json: "requires", js: "requires", typ: r("Requires") },
2441+ { json: "restrict", js: "restrict", typ: r("Restrict") },
2442+ { json: "retain", js: "retain", typ: r("Retain") },
2443+ { json: "rethrows", js: "rethrows", typ: r("Rethrows") },
2444+ { json: "return", js: "return", typ: r("Return") },
2445+ { json: "right", js: "right", typ: r("Right") },
2446+ { json: "s", js: "s", typ: r("S") },
2447+ { json: "sbyte", js: "sbyte", typ: r("Sbyte") },
2448+ { json: "sealed", js: "sealed", typ: r("Sealed") },
2449+ { json: "select", js: "select", typ: r("Select") },
2450+ { json: "self", js: "self", typ: r("SelfClass") },
2451+ { json: "serialize", js: "serialize", typ: r("Serialize") },
2452+ { json: "set", js: "set", typ: r("Set") },
2453+ { json: "short", js: "short", typ: r("Short") },
2454+ { json: "signed", js: "signed", typ: r("Signed") },
2455+ { json: "sizeof", js: "sizeof", typ: r("Sizeof") },
2456+ { json: "stackalloc", js: "stackalloc", typ: r("Stackalloc") },
2457+ { json: "static", js: "static", typ: r("Static") },
2458+ { json: "static_assert", js: "static_assert", typ: r("StaticAssert") },
2459+ { json: "static_cast", js: "static_cast", typ: r("StaticCast") },
2460+ { json: "strictfp", js: "strictfp", typ: r("Strictfp") },
2461+ { json: "string", js: "string", typ: r("String") },
2462+ { json: "struct", js: "struct", typ: r("Struct") },
2463+ { json: "subscript", js: "subscript", typ: r("Subscript") },
2464+ { json: "super", js: "super", typ: r("Super") },
2465+ { json: "switch", js: "switch", typ: r("Switch") },
2466+ { json: "symbol", js: "symbol", typ: r("Symbol") },
2467+ { json: "synchronized", js: "synchronized", typ: r("Synchronized") },
2468+ { json: "system", js: "system", typ: r("System") },
2469+ { json: "template", js: "template", typ: r("Template") },
2470+ { json: "then", js: "then", typ: r("Then") },
2471+ { json: "this", js: "this", typ: r("This") },
2472+ { json: "thread_local", js: "thread_local", typ: r("ThreadLocal") },
2473+ { json: "throw", js: "throw", typ: r("Throw") },
2474+ { json: "throws", js: "throws", typ: r("Throws") },
2475+ { json: "to_json", js: "to_json", typ: r("ToJSON") },
2476+ { json: "top_level", js: "top_level", typ: r("TopLevelClass") },
2477+ { json: "transient", js: "transient", typ: r("Transient") },
2478+ { json: "true", js: "true", typ: r("TrueClass") },
2479+ { json: "try", js: "try", typ: r("Try") },
2480+ { json: "type", js: "type", typ: r("TypeClass") },
2481+ { json: "typealias", js: "typealias", typ: r("Typealias") },
2482+ { json: "typedef", js: "typedef", typ: r("Typedef") },
2483+ { json: "typeid", js: "typeid", typ: r("Typeid") },
2484+ { json: "typename", js: "typename", typ: r("Typename") },
2485+ { json: "typeof", js: "typeof", typ: r("Typeof") },
2486+ { json: "uint", js: "uint", typ: r("Uint") },
2487+ { json: "ulong", js: "ulong", typ: r("Ulong") },
2488+ { json: "unchecked", js: "unchecked", typ: r("Unchecked") },
2489+ { json: "undefined", js: "undefined", typ: r("Undefined") },
2490+ ], false),
2491+ "Sel": o([
2492+ { json: "SEL", js: "SEL", typ: i(0) },
2493+ ], false),
2494+ "Self": o([
2495+ { json: "Self", js: "Self", typ: i(0) },
2496+ ], false),
2497+ "True": o([
2498+ { json: "True", js: "True", typ: i(0) },
2499+ ], false),
2500+ "Type": o([
2501+ { json: "Type", js: "Type", typ: i(0) },
2502+ ], false),
2503+ "Public": o([
2504+ { json: "public", js: "public", typ: i(0) },
2505+ ], false),
2506+ "Quicktype": o([
2507+ { json: "quicktype", js: "quicktype", typ: i(0) },
2508+ ], false),
2509+ "Raise": o([
2510+ { json: "raise", js: "raise", typ: i(0) },
2511+ ], false),
2512+ "Range": o([
2513+ { json: "range", js: "range", typ: i(0) },
2514+ ], false),
2515+ "Readonly": o([
2516+ { json: "readonly", js: "readonly", typ: i(0) },
2517+ ], false),
2518+ "Ref": o([
2519+ { json: "ref", js: "ref", typ: i(0) },
2520+ ], false),
2521+ "Register": o([
2522+ { json: "register", js: "register", typ: i(0) },
2523+ ], false),
2524+ "ReinterpretCast": o([
2525+ { json: "reinterpret_cast", js: "reinterpret_cast", typ: i(0) },
2526+ ], false),
2527+ "Repeat": o([
2528+ { json: "repeat", js: "repeat", typ: i(0) },
2529+ ], false),
2530+ "Require": o([
2531+ { json: "require", js: "require", typ: i(0) },
2532+ ], false),
2533+ "Required": o([
2534+ { json: "required", js: "required", typ: i(0) },
2535+ ], false),
2536+ "Requires": o([
2537+ { json: "requires", js: "requires", typ: i(0) },
2538+ ], false),
2539+ "Restrict": o([
2540+ { json: "restrict", js: "restrict", typ: i(0) },
2541+ ], false),
2542+ "Retain": o([
2543+ { json: "retain", js: "retain", typ: i(0) },
2544+ ], false),
2545+ "Rethrows": o([
2546+ { json: "rethrows", js: "rethrows", typ: i(0) },
2547+ ], false),
2548+ "Return": o([
2549+ { json: "return", js: "return", typ: i(0) },
2550+ ], false),
2551+ "Right": o([
2552+ { json: "right", js: "right", typ: i(0) },
2553+ ], false),
2554+ "S": o([
2555+ { json: "s", js: "s", typ: i(0) },
2556+ ], false),
2557+ "Sbyte": o([
2558+ { json: "sbyte", js: "sbyte", typ: i(0) },
2559+ ], false),
2560+ "Sealed": o([
2561+ { json: "sealed", js: "sealed", typ: i(0) },
2562+ ], false),
2563+ "Select": o([
2564+ { json: "select", js: "select", typ: i(0) },
2565+ ], false),
2566+ "SelfClass": o([
2567+ { json: "self", js: "self", typ: i(0) },
2568+ ], false),
2569+ "Serialize": o([
2570+ { json: "serialize", js: "serialize", typ: i(0) },
2571+ ], false),
2572+ "Set": o([
2573+ { json: "set", js: "set", typ: i(0) },
2574+ ], false),
2575+ "Short": o([
2576+ { json: "short", js: "short", typ: i(0) },
2577+ ], false),
2578+ "Signed": o([
2579+ { json: "signed", js: "signed", typ: i(0) },
2580+ ], false),
2581+ "Sizeof": o([
2582+ { json: "sizeof", js: "sizeof", typ: i(0) },
2583+ ], false),
2584+ "Stackalloc": o([
2585+ { json: "stackalloc", js: "stackalloc", typ: i(0) },
2586+ ], false),
2587+ "Static": o([
2588+ { json: "static", js: "static", typ: i(0) },
2589+ ], false),
2590+ "StaticAssert": o([
2591+ { json: "static_assert", js: "static_assert", typ: i(0) },
2592+ ], false),
2593+ "StaticCast": o([
2594+ { json: "static_cast", js: "static_cast", typ: i(0) },
2595+ ], false),
2596+ "Strictfp": o([
2597+ { json: "strictfp", js: "strictfp", typ: i(0) },
2598+ ], false),
2599+ "String": o([
2600+ { json: "string", js: "string", typ: i(0) },
2601+ ], false),
2602+ "Struct": o([
2603+ { json: "struct", js: "struct", typ: i(0) },
2604+ ], false),
2605+ "Subscript": o([
2606+ { json: "subscript", js: "subscript", typ: i(0) },
2607+ ], false),
2608+ "Super": o([
2609+ { json: "super", js: "super", typ: i(0) },
2610+ ], false),
2611+ "Switch": o([
2612+ { json: "switch", js: "switch", typ: i(0) },
2613+ ], false),
2614+ "Symbol": o([
2615+ { json: "symbol", js: "symbol", typ: i(0) },
2616+ ], false),
2617+ "Synchronized": o([
2618+ { json: "synchronized", js: "synchronized", typ: i(0) },
2619+ ], false),
2620+ "System": o([
2621+ { json: "system", js: "system", typ: i(0) },
2622+ ], false),
2623+ "Template": o([
2624+ { json: "template", js: "template", typ: i(0) },
2625+ ], false),
2626+ "Then": o([
2627+ { json: "then", js: "then", typ: i(0) },
2628+ ], false),
2629+ "This": o([
2630+ { json: "this", js: "this", typ: i(0) },
2631+ ], false),
2632+ "ThreadLocal": o([
2633+ { json: "thread_local", js: "thread_local", typ: i(0) },
2634+ ], false),
2635+ "Throw": o([
2636+ { json: "throw", js: "throw", typ: i(0) },
2637+ ], false),
2638+ "Throws": o([
2639+ { json: "throws", js: "throws", typ: i(0) },
2640+ ], false),
2641+ "ToJSON": o([
2642+ { json: "to_json", js: "to_json", typ: i(0) },
2643+ ], false),
2644+ "TopLevelClass": o([
2645+ { json: "top_level", js: "top_level", typ: i(0) },
2646+ ], false),
2647+ "Transient": o([
2648+ { json: "transient", js: "transient", typ: i(0) },
2649+ ], false),
2650+ "TrueClass": o([
2651+ { json: "true", js: "true", typ: i(0) },
2652+ ], false),
2653+ "Try": o([
2654+ { json: "try", js: "try", typ: i(0) },
2655+ ], false),
2656+ "TypeClass": o([
2657+ { json: "type", js: "type", typ: i(0) },
2658+ ], false),
2659+ "Typealias": o([
2660+ { json: "typealias", js: "typealias", typ: i(0) },
2661+ ], false),
2662+ "Typedef": o([
2663+ { json: "typedef", js: "typedef", typ: i(0) },
2664+ ], false),
2665+ "Typeid": o([
2666+ { json: "typeid", js: "typeid", typ: i(0) },
2667+ ], false),
2668+ "Typename": o([
2669+ { json: "typename", js: "typename", typ: i(0) },
2670+ ], false),
2671+ "Typeof": o([
2672+ { json: "typeof", js: "typeof", typ: i(0) },
2673+ ], false),
2674+ "Uint": o([
2675+ { json: "uint", js: "uint", typ: i(0) },
2676+ ], false),
2677+ "Ulong": o([
2678+ { json: "ulong", js: "ulong", typ: i(0) },
2679+ ], false),
2680+ "Unchecked": o([
2681+ { json: "unchecked", js: "unchecked", typ: i(0) },
2682+ ], false),
2683+ "Undefined": o([
2684+ { json: "undefined", js: "undefined", typ: i(0) },
2685+ ], false),
2686+ "Obj5": o([
2687+ { json: "YES", js: "YES", typ: r("Yes") },
2688+ { json: "dummy", js: "dummy", typ: i(0) },
2689+ { json: "union", js: "union", typ: r("Union") },
2690+ { json: "unowned", js: "unowned", typ: r("Unowned") },
2691+ { json: "unsafe", js: "unsafe", typ: r("Unsafe") },
2692+ { json: "unsigned", js: "unsigned", typ: r("Unsigned") },
2693+ { json: "ushort", js: "ushort", typ: r("Ushort") },
2694+ { json: "using", js: "using", typ: r("Using") },
2695+ { json: "var", js: "var", typ: r("Var") },
2696+ { json: "virtual", js: "virtual", typ: r("Virtual") },
2697+ { json: "void", js: "void", typ: r("Void") },
2698+ { json: "volatile", js: "volatile", typ: r("Volatile") },
2699+ { json: "wchar_t", js: "wchar_t", typ: r("WcharT") },
2700+ { json: "weak", js: "weak", typ: r("Weak") },
2701+ { json: "where", js: "where", typ: r("Where") },
2702+ { json: "while", js: "while", typ: r("While") },
2703+ { json: "willSet", js: "willSet", typ: r("WillSet") },
2704+ { json: "with", js: "with", typ: r("With") },
2705+ { json: "xor", js: "xor", typ: r("Xor") },
2706+ { json: "xor_eq", js: "xor_eq", typ: r("XorEq") },
2707+ { json: "yield", js: "yield", typ: r("Yield") },
2708+ ], false),
2709+ "Yes": o([
2710+ { json: "YES", js: "YES", typ: i(0) },
2711+ ], false),
2712+ "Union": o([
2713+ { json: "union", js: "union", typ: i(0) },
2714+ ], false),
2715+ "Unowned": o([
2716+ { json: "unowned", js: "unowned", typ: i(0) },
2717+ ], false),
2718+ "Unsafe": o([
2719+ { json: "unsafe", js: "unsafe", typ: i(0) },
2720+ ], false),
2721+ "Unsigned": o([
2722+ { json: "unsigned", js: "unsigned", typ: i(0) },
2723+ ], false),
2724+ "Ushort": o([
2725+ { json: "ushort", js: "ushort", typ: i(0) },
2726+ ], false),
2727+ "Using": o([
2728+ { json: "using", js: "using", typ: i(0) },
2729+ ], false),
2730+ "Var": o([
2731+ { json: "var", js: "var", typ: i(0) },
2732+ ], false),
2733+ "Virtual": o([
2734+ { json: "virtual", js: "virtual", typ: i(0) },
2735+ ], false),
2736+ "Void": o([
2737+ { json: "void", js: "void", typ: i(0) },
2738+ ], false),
2739+ "Volatile": o([
2740+ { json: "volatile", js: "volatile", typ: i(0) },
2741+ ], false),
2742+ "WcharT": o([
2743+ { json: "wchar_t", js: "wchar_t", typ: i(0) },
2744+ ], false),
2745+ "Weak": o([
2746+ { json: "weak", js: "weak", typ: i(0) },
2747+ ], false),
2748+ "Where": o([
2749+ { json: "where", js: "where", typ: i(0) },
2750+ ], false),
2751+ "While": o([
2752+ { json: "while", js: "while", typ: i(0) },
2753+ ], false),
2754+ "WillSet": o([
2755+ { json: "willSet", js: "willSet", typ: i(0) },
2756+ ], false),
2757+ "With": o([
2758+ { json: "with", js: "with", typ: i(0) },
2759+ ], false),
2760+ "Xor": o([
2761+ { json: "xor", js: "xor", typ: i(0) },
2762+ ], false),
2763+ "XorEq": o([
2764+ { json: "xor_eq", js: "xor_eq", typ: i(0) },
2765+ ], false),
2766+ "Yield": o([
2767+ { json: "yield", js: "yield", typ: i(0) },
2768+ ], false),
2769+};
Test case

test/inputs/json/priority/nbl-stats.json

1 generated file · +21 −3
Melixirdefault / QuickType.ex+21 −3
@@ -816,6 +816,12 @@ defmodule Scorer do
816816 def encode_name(value) when is_binary(value), do: value
817817 def encode_name(_), do: {:error, "Unexpected type when encoding Scorer.name"}
818818
819+ def decode_per(value) when is_integer(value), do: value
820+ def decode_per(_), do: {:error, "Unexpected type when decoding Scorer.per"}
821+
822+ def encode_per(value) when is_integer(value), do: value
823+ def encode_per(_), do: {:error, "Unexpected type when encoding Scorer.per"}
824+
819825 def decode_player(value) when is_binary(value), do: value
820826 def decode_player(_), do: {:error, "Unexpected type when decoding Scorer.player"}
821827
@@ -846,6 +852,12 @@ defmodule Scorer do
846852 def encode_tno(value) when is_integer(value), do: value
847853 def encode_tno(_), do: {:error, "Unexpected type when encoding Scorer.tno"}
848854
855+ def decode_tot(value) when is_integer(value), do: value
856+ def decode_tot(_), do: {:error, "Unexpected type when decoding Scorer.tot"}
857+
858+ def encode_tot(value) when is_integer(value), do: value
859+ def encode_tot(_), do: {:error, "Unexpected type when encoding Scorer.tot"}
860+
849861 def from_map(m) do
850862 %Scorer{
851863 family_name: m["familyName"] && decode_family_name(m["familyName"]),
@@ -858,7 +870,7 @@ defmodule Scorer do
858870 international_first_name: m["internationalFirstName"] && decode_international_first_name(m["internationalFirstName"]),
859871 international_first_name_initial: m["internationalFirstNameInitial"] && FirstNameInitial.decode(m["internationalFirstNameInitial"]),
860872 name: m["name"] && decode_name(m["name"]),
861- per: m["per"],
873+ per: m["per"] && decode_per(m["per"]),
862874 per_type: m["perType"] && PerType.decode(m["perType"]),
863875 player: m["player"] && decode_player(m["player"]),
864876 pno: decode_pno(m["pno"]),
@@ -867,7 +879,7 @@ defmodule Scorer do
867879 summary: m["summary"] && decode_summary(m["summary"]),
868880 times: m["times"] && Enum.map(m["times"], &TimeElement.from_map/1),
869881 tno: decode_tno(m["tno"]),
870- tot: m["tot"],
882+ tot: m["tot"] && decode_tot(m["tot"]),
871883 }
872884 end
873885
@@ -1130,6 +1142,12 @@ defmodule Pl do
11301142 def encode_active(value) when is_integer(value), do: value
11311143 def encode_active(_), do: {:error, "Unexpected type when encoding Pl.active"}
11321144
1145+ def decode_captain(value) when is_integer(value), do: value
1146+ def decode_captain(_), do: {:error, "Unexpected type when decoding Pl.captain"}
1147+
1148+ def encode_captain(value) when is_integer(value), do: value
1149+ def encode_captain(_), do: {:error, "Unexpected type when encoding Pl.captain"}
1150+
11331151 def decode_eff_1(value) when is_integer(value), do: value
11341152 def decode_eff_1(_), do: {:error, "Unexpected type when decoding Pl.eff_1"}
11351153
@@ -1389,7 +1407,7 @@ defmodule Pl do
13891407 def from_map(m) do
13901408 %Pl{
13911409 active: decode_active(m["active"]),
1392- captain: m["captain"],
1410+ captain: m["captain"] && decode_captain(m["captain"]),
13931411 comp: m["comp"] && Comp.from_map(m["comp"]),
13941412 eff_1: decode_eff_1(m["eff_1"]),
13951413 eff_2: decode_eff_2(m["eff_2"]),
Test case

test/inputs/json/priority/uuids.json

1 generated file · +2 −2
Mdartdefault / TopLevel.dart+2 −2
@@ -30,8 +30,8 @@ class TopLevel {
3030 doubleValue: json["doubleValue"]?.toDouble(),
3131 intValue: json["intValue"],
3232 stringValue: json["stringValue"],
33- uuidValue: json["uuidValue"],
34- uuidValues: List<String>.from(json["uuidValues"].map((x) => x)),
33+ uuidValue: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["uuidValue"]),
34+ uuidValues: List<String>.from(json["uuidValues"].map((x) => ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(x))),
3535 );
3636
3737 Map<String, dynamic> toJson() => {
Test case

test/inputs/json/samples/copy-with-property.json

38 generated files · +2,513 −0
Acjsondefault / TopLevel.c+80 −0
@@ -0,0 +1,80 @@
1+/**
2+ * TopLevel.c
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ */
5+
6+#include "TopLevel.h"
7+
8+struct TopLevel * cJSON_ParseTopLevel(const char * s) {
9+ struct TopLevel * x = NULL;
10+ if (NULL != s) {
11+ cJSON * j = cJSON_Parse(s);
12+ if (NULL != j) {
13+ x = cJSON_GetTopLevelValue(j);
14+ cJSON_Delete(j);
15+ }
16+ }
17+ return x;
18+}
19+
20+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
21+ struct TopLevel * x = NULL;
22+ if (NULL != j) {
23+ if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
24+ memset(x, 0, sizeof(struct TopLevel));
25+ if (!cJSON_HasObjectItem(j, "copyWith")) { cJSON_DeleteTopLevel(x); return NULL; }
26+ if (cJSON_HasObjectItem(j, "copyWith")) {
27+ if (!quicktype_cJSON_IsInteger(cJSON_GetObjectItemCaseSensitive(j, "copyWith"))) { cJSON_DeleteTopLevel(x); return NULL; }
28+ x->copy_with = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "copyWith"));
29+ }
30+ if (!cJSON_HasObjectItem(j, "name")) { cJSON_DeleteTopLevel(x); return NULL; }
31+ if (cJSON_HasObjectItem(j, "name")) {
32+ if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "name"))) { cJSON_DeleteTopLevel(x); return NULL; }
33+ x->name = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "name")));
34+ }
35+ else {
36+ if (NULL != (x->name = cJSON_malloc(sizeof(char)))) {
37+ x->name[0] = '\0';
38+ }
39+ }
40+ }
41+ }
42+ return x;
43+}
44+
45+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
46+ cJSON * j = NULL;
47+ if (NULL != x) {
48+ if (NULL != (j = cJSON_CreateObject())) {
49+ cJSON_AddNumberToObject(j, "copyWith", x->copy_with);
50+ if (NULL != x->name) {
51+ cJSON_AddStringToObject(j, "name", x->name);
52+ }
53+ else {
54+ cJSON_AddStringToObject(j, "name", "");
55+ }
56+ }
57+ }
58+ return j;
59+}
60+
61+char * cJSON_PrintTopLevel(const struct TopLevel * x) {
62+ char * s = NULL;
63+ if (NULL != x) {
64+ cJSON * j = cJSON_CreateTopLevel(x);
65+ if (NULL != j) {
66+ s = cJSON_Print(j);
67+ cJSON_Delete(j);
68+ }
69+ }
70+ return s;
71+}
72+
73+void cJSON_DeleteTopLevel(struct TopLevel * x) {
74+ if (NULL != x) {
75+ if (NULL != x->name) {
76+ cJSON_free(x->name);
77+ }
78+ cJSON_free(x);
79+ }
80+}
Acjsondefault / TopLevel.h+56 −0
@@ -0,0 +1,56 @@
1+/**
2+ * TopLevel.h
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ * This file depends of https://github.com/DaveGamble/cJSON, https://github.com/joelguittet/c-list and https://github.com/joelguittet/c-hashtable
5+ * To parse json data from json string use the following: struct <type> * data = cJSON_Parse<type>(<string>);
6+ * To get json data from cJSON object use the following: struct <type> * data = cJSON_Get<type>Value(<cjson>);
7+ * To get cJSON object from json data use the following: cJSON * cjson = cJSON_Create<type>(<data>);
8+ * To print json string from json data use the following: char * string = cJSON_Print<type>(<data>);
9+ * To delete json data use the following: cJSON_Delete<type>(<data>);
10+ */
11+
12+#ifndef __TOPLEVEL_H__
13+#define __TOPLEVEL_H__
14+
15+#ifdef __cplusplus
16+extern "C" {
17+#endif
18+
19+#include <stdint.h>
20+#include <stdbool.h>
21+#include <stdlib.h>
22+#include <string.h>
23+#include <regex.h>
24+#include <cJSON.h>
25+#include <hashtable.h>
26+#include <list.h>
27+
28+#define quicktype_cJSON_Duplicate(j) cJSON_Duplicate(j, true)
29+#define cJSON_Integer (1 << 18)
30+#define quicktype_cJSON_IsInteger(j) (cJSON_IsNumber(j) && (j)->valuedouble == (int64_t)(j)->valuedouble)
31+#ifndef cJSON_Bool
32+#define cJSON_Bool (cJSON_True | cJSON_False)
33+#endif
34+#ifndef cJSON_Map
35+#define cJSON_Map (1 << 16)
36+#endif
37+#ifndef cJSON_Enum
38+#define cJSON_Enum (1 << 17)
39+#endif
40+
41+struct TopLevel {
42+ int64_t copy_with;
43+ char * name;
44+};
45+
46+struct TopLevel * cJSON_ParseTopLevel(const char * s);
47+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j);
48+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x);
49+char * cJSON_PrintTopLevel(const struct TopLevel * x);
50+void cJSON_DeleteTopLevel(struct TopLevel * x);
51+
52+#ifdef __cplusplus
53+}
54+#endif
55+
56+#endif /* __TOPLEVEL_H__ */
Acplusplusdefault / quicktype.hpp+70 −0
@@ -0,0 +1,70 @@
1+// To parse this JSON data, first install
2+//
3+// json.hpp https://github.com/nlohmann/json
4+//
5+// Then include this file, and then do
6+//
7+// TopLevel data = nlohmann::json::parse(jsonString);
8+
9+#pragma once
10+
11+#include "json.hpp"
12+
13+#include <optional>
14+#include <stdexcept>
15+#include <regex>
16+
17+namespace quicktype {
18+ using nlohmann::json;
19+
20+ #ifndef NLOHMANN_UNTYPED_quicktype_HELPER
21+ #define NLOHMANN_UNTYPED_quicktype_HELPER
22+ inline json get_untyped(const json & j, const char * property) {
23+ if (j.find(property) != j.end()) {
24+ return j.at(property).get<json>();
25+ }
26+ return json();
27+ }
28+
29+ inline json get_untyped(const json & j, std::string property) {
30+ return get_untyped(j, property.data());
31+ }
32+ #endif
33+
34+ class TopLevel {
35+ public:
36+ TopLevel() = default;
37+ virtual ~TopLevel() = default;
38+
39+ private:
40+ int64_t copy_with;
41+ std::string name;
42+
43+ public:
44+ const int64_t & get_copy_with() const { return copy_with; }
45+ int64_t & get_mutable_copy_with() { return copy_with; }
46+ void set_copy_with(const int64_t & value) { this->copy_with = value; }
47+
48+ const std::string & get_name() const { return name; }
49+ std::string & get_mutable_name() { return name; }
50+ void set_name(const std::string & value) { this->name = value; }
51+ };
52+}
53+
54+namespace quicktype {
55+ void from_json(const json & j, TopLevel & x);
56+ void to_json(json & j, const TopLevel & x);
57+
58+ inline void from_json(const json & j, TopLevel& x) {
59+ if (!j.is_object()) throw std::runtime_error("Expected object");
60+ if (j.find("copyWith") != j.end() && !j.at("copyWith").is_number_integer()) throw std::runtime_error("Expected integer");
61+ x.set_copy_with(j.at("copyWith").get<int64_t>());
62+ x.set_name(j.at("name").get<std::string>());
63+ }
64+
65+ inline void to_json(json & j, const TopLevel & x) {
66+ j = json::object();
67+ j["copyWith"] = x.get_copy_with();
68+ j["name"] = x.get_name();
69+ }
70+}
Acrystaldefault / TopLevel.cr+10 −0
@@ -0,0 +1,10 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "copyWith")]
7+ property copy_with : Int64
8+
9+ property name : String
10+end
Acsharp-recordsdefault / QuickType.cs+64 −0
@@ -0,0 +1,64 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial record TopLevel
27+ {
28+ [JsonProperty("copyWith", Required = Required.Always)]
29+ public long CopyWith { get; set; }
30+
31+ [JsonProperty("name", Required = Required.Always)]
32+ public string Name { get; set; }
33+ }
34+
35+ public partial record TopLevel
36+ {
37+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
38+ }
39+
40+ public static partial class Serialize
41+ {
42+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
43+ }
44+
45+ internal static partial class Converter
46+ {
47+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
48+ {
49+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
50+ DateParseHandling = DateParseHandling.None,
51+ Converters =
52+ {
53+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
54+ },
55+ };
56+ }
57+}
58+#pragma warning restore CS8618
59+#pragma warning restore CS8601
60+#pragma warning restore CS8602
61+#pragma warning restore CS8603
62+#pragma warning restore CS8604
63+#pragma warning restore CS8625
64+#pragma warning restore CS8765
Acsharp-SystemTextJsondefault / QuickType.cs+170 −0
@@ -0,0 +1,170 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'System.Text.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+
14+namespace QuickType
15+{
16+ using System;
17+ using System.Collections.Generic;
18+
19+ using System.Text.Json;
20+ using System.Text.Json.Serialization;
21+ using System.Globalization;
22+
23+ public partial class TopLevel
24+ {
25+ [JsonRequired]
26+ [JsonPropertyName("copyWith")]
27+ public long CopyWith { get; set; }
28+
29+ [JsonRequired]
30+ [JsonPropertyName("name")]
31+ public string Name { get; set; }
32+ }
33+
34+ public partial class TopLevel
35+ {
36+ public static TopLevel FromJson(string json) => global::System.Text.Json.JsonSerializer.Deserialize<TopLevel>(json, QuickType.Converter.Settings);
37+ }
38+
39+ public static partial class Serialize
40+ {
41+ public static string ToJson(this TopLevel self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings);
42+ }
43+
44+ internal static partial class Converter
45+ {
46+ public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
47+ {
48+ Converters =
49+ {
50+ new DateOnlyConverter(),
51+ new TimeOnlyConverter(),
52+ IsoDateTimeOffsetConverter.Singleton
53+ },
54+ };
55+ }
56+
57+ public class DateOnlyConverter : JsonConverter<DateOnly>
58+ {
59+ private readonly string serializationFormat;
60+ public DateOnlyConverter() : this(null) { }
61+
62+ public DateOnlyConverter(string? serializationFormat)
63+ {
64+ this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
65+ }
66+
67+ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
68+ {
69+ var value = reader.GetString();
70+ return DateOnly.Parse(value!);
71+ }
72+
73+ public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
74+ => writer.WriteStringValue(value.ToString(serializationFormat));
75+ }
76+
77+ public class TimeOnlyConverter : JsonConverter<TimeOnly>
78+ {
79+ private readonly string serializationFormat;
80+
81+ public TimeOnlyConverter() : this(null) { }
82+
83+ public TimeOnlyConverter(string? serializationFormat)
84+ {
85+ this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
86+ }
87+
88+ public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
89+ {
90+ var value = reader.GetString();
91+ return TimeOnly.Parse(value!);
92+ }
93+
94+ public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
95+ => writer.WriteStringValue(value.ToString(serializationFormat));
96+ }
97+
98+ internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
99+ {
100+ public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
101+
102+ private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
103+
104+ private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
105+ private string? _dateTimeFormat;
106+ private CultureInfo? _culture;
107+
108+ public DateTimeStyles DateTimeStyles
109+ {
110+ get => _dateTimeStyles;
111+ set => _dateTimeStyles = value;
112+ }
113+
114+ public string? DateTimeFormat
115+ {
116+ get => _dateTimeFormat ?? string.Empty;
117+ set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
118+ }
119+
120+ public CultureInfo Culture
121+ {
122+ get => _culture ?? CultureInfo.CurrentCulture;
123+ set => _culture = value;
124+ }
125+
126+ public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
127+ {
128+ string text;
129+
130+
131+ if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
132+ || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
133+ {
134+ value = value.ToUniversalTime();
135+ }
136+
137+ text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
138+
139+ writer.WriteStringValue(text);
140+ }
141+
142+ public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
143+ {
144+ string? dateText = reader.GetString();
145+
146+ if (string.IsNullOrEmpty(dateText) == false)
147+ {
148+ if (!string.IsNullOrEmpty(_dateTimeFormat))
149+ {
150+ return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
151+ }
152+ else
153+ {
154+ return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
155+ }
156+ }
157+ else
158+ {
159+ return default(DateTimeOffset);
160+ }
161+ }
162+
163+
164+ public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
165+ }
166+}
167+#pragma warning restore CS8618
168+#pragma warning restore CS8601
169+#pragma warning restore CS8602
170+#pragma warning restore CS8603
Acsharpdefault / QuickType.cs+64 −0
@@ -0,0 +1,64 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial class TopLevel
27+ {
28+ [JsonProperty("copyWith", Required = Required.Always)]
29+ public long CopyWith { get; set; }
30+
31+ [JsonProperty("name", Required = Required.Always)]
32+ public string Name { get; set; }
33+ }
34+
35+ public partial class TopLevel
36+ {
37+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
38+ }
39+
40+ public static partial class Serialize
41+ {
42+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
43+ }
44+
45+ internal static partial class Converter
46+ {
47+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
48+ {
49+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
50+ DateParseHandling = DateParseHandling.None,
51+ Converters =
52+ {
53+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
54+ },
55+ };
56+ }
57+}
58+#pragma warning restore CS8618
59+#pragma warning restore CS8601
60+#pragma warning restore CS8602
61+#pragma warning restore CS8603
62+#pragma warning restore CS8604
63+#pragma warning restore CS8625
64+#pragma warning restore CS8765
Adartcopy-with-true--bb7e994c05fe / TopLevel.dart+38 −0
@@ -0,0 +1,38 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final String name;
13+ final int topLevelCopyWith;
14+
15+ TopLevel({
16+ required this.name,
17+ required this.topLevelCopyWith,
18+ });
19+
20+ TopLevel copyWith({
21+ String? name,
22+ int? topLevelCopyWith,
23+ }) =>
24+ TopLevel(
25+ name: name ?? this.name,
26+ topLevelCopyWith: topLevelCopyWith ?? this.topLevelCopyWith,
27+ );
28+
29+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
30+ name: json["name"],
31+ topLevelCopyWith: json["copyWith"],
32+ );
33+
34+ Map<String, dynamic> toJson() => {
35+ "name": name,
36+ "copyWith": topLevelCopyWith,
37+ };
38+}
Adartdefault / TopLevel.dart+29 −0
@@ -0,0 +1,29 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final int copyWith;
13+ final String name;
14+
15+ TopLevel({
16+ required this.copyWith,
17+ required this.name,
18+ });
19+
20+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
21+ copyWith: json["copyWith"],
22+ name: json["name"],
23+ );
24+
25+ Map<String, dynamic> toJson() => {
26+ "copyWith": copyWith,
27+ "name": name,
28+ };
29+}
Aelixirdefault / QuickType.ex+54 −0
@@ -0,0 +1,54 @@
1+# This file was autogenerated using quicktype https://github.com/quicktype/quicktype
2+#
3+# Add Jason to your mix.exs
4+#
5+# Decode a JSON string: TopLevel.from_json(data)
6+# Encode into a JSON string: TopLevel.to_json(struct)
7+
8+defmodule TopLevel do
9+ @enforce_keys [:copy_with, :name]
10+ defstruct [:copy_with, :name]
11+
12+ @type t :: %__MODULE__{
13+ copy_with: integer(),
14+ name: String.t()
15+ }
16+
17+ def decode_copy_with(value) when is_integer(value), do: value
18+ def decode_copy_with(_), do: {:error, "Unexpected type when decoding TopLevel.copy_with"}
19+
20+ def encode_copy_with(value) when is_integer(value), do: value
21+ def encode_copy_with(_), do: {:error, "Unexpected type when encoding TopLevel.copy_with"}
22+
23+ def decode_name(value) when is_binary(value), do: value
24+ def decode_name(_), do: {:error, "Unexpected type when decoding TopLevel.name"}
25+
26+ def encode_name(value) when is_binary(value), do: value
27+ def encode_name(_), do: {:error, "Unexpected type when encoding TopLevel.name"}
28+
29+ def from_map(m) do
30+ %TopLevel{
31+ copy_with: decode_copy_with(m["copyWith"]),
32+ name: decode_name(m["name"]),
33+ }
34+ end
35+
36+ def from_json(json) do
37+ json
38+ |> Jason.decode!()
39+ |> from_map()
40+ end
41+
42+ def to_map(struct) do
43+ %{
44+ "copyWith" => struct.copy_with,
45+ "name" => struct.name,
46+ }
47+ end
48+
49+ def to_json(struct) do
50+ struct
51+ |> to_map()
52+ |> Jason.encode!()
53+ end
54+end
Aelmdefault / QuickType.elm+60 −0
@@ -0,0 +1,60 @@
1+-- To decode the JSON data, add this file to your project, run
2+--
3+-- elm install NoRedInk/elm-json-decode-pipeline
4+--
5+-- add these imports
6+--
7+-- import Json.Decode exposing (decodeString)
8+-- import QuickType exposing (quickType)
9+--
10+-- and you're off to the races with
11+--
12+-- decodeString quickType myJsonString
13+
14+module QuickType exposing
15+ ( QuickType
16+ , quickTypeToString
17+ , quickType
18+ )
19+
20+import Json.Decode as Jdec
21+import Json.Decode.Pipeline as Jpipe
22+import Json.Encode as Jenc
23+import Dict exposing (Dict)
24+
25+type alias QuickType =
26+ { copyWith : Int
27+ , name : String
28+ }
29+
30+-- decoders and encoders
31+optionalField key decoder fallback =
32+ Jdec.dict Jdec.value
33+ |> Jdec.andThen (\m ->
34+ case Dict.get key m of
35+ Nothing -> Jdec.succeed fallback
36+ Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
37+
38+quickTypeToString : QuickType -> String
39+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
40+
41+quickType : Jdec.Decoder QuickType
42+quickType =
43+ Jdec.succeed QuickType
44+ |> Jpipe.required "copyWith" Jdec.int
45+ |> Jpipe.required "name" Jdec.string
46+
47+encodeQuickType : QuickType -> Jenc.Value
48+encodeQuickType x =
49+ Jenc.object
50+ [ ("copyWith", Jenc.int x.copyWith)
51+ , ("name", Jenc.string x.name)
52+ ]
53+
54+--- encoder helpers
55+
56+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
57+makeNullableEncoder f m =
58+ case m of
59+ Just x -> f x
60+ Nothing -> Jenc.null
Aflowdefault / TopLevel.js+211 −0
@@ -0,0 +1,211 @@
1+// @flow
2+
3+// To parse this data:
4+//
5+// const Convert = require("./TopLevel");
6+//
7+// const topLevel = Convert.toTopLevel(json);
8+//
9+// These functions will throw an error if the JSON doesn't
10+// match the expected interface, even if the JSON is valid.
11+
12+export type TopLevel = {
13+ copyWith: number;
14+ name: string;
15+};
16+
17+// Converts JSON strings to/from your types
18+// and asserts the results of JSON.parse at runtime
19+function toTopLevel(json: string): TopLevel {
20+ return cast(JSON.parse(json), r("TopLevel"));
21+}
22+
23+function topLevelToJson(value: TopLevel): string {
24+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
25+}
26+
27+function invalidValue(typ: any, val: any, key: any, parent: any = '') {
28+ const prettyTyp = prettyTypeName(typ);
29+ const parentText = parent ? ` on ${parent}` : '';
30+ const keyText = key ? ` for key "${key}"` : '';
31+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
32+}
33+
34+function prettyTypeName(typ: any): string {
35+ if (Array.isArray(typ)) {
36+ if (typ.length === 2 && typ[0] === undefined) {
37+ return `an optional ${prettyTypeName(typ[1])}`;
38+ } else {
39+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
40+ }
41+ } else if (typeof typ === "object" && typ.literal !== undefined) {
42+ return typ.literal;
43+ } else {
44+ return typeof typ;
45+ }
46+}
47+
48+function jsonToJSProps(typ: any): any {
49+ if (typ.jsonToJS === undefined) {
50+ const map: any = {};
51+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
52+ typ.jsonToJS = map;
53+ }
54+ return typ.jsonToJS;
55+}
56+
57+function jsToJSONProps(typ: any): any {
58+ if (typ.jsToJSON === undefined) {
59+ const map: any = {};
60+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
61+ typ.jsToJSON = map;
62+ }
63+ return typ.jsToJSON;
64+}
65+
66+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
67+ function transformPrimitive(typ: string, val: any): any {
68+ if (typeof typ === typeof val) return val;
69+ return invalidValue(typ, val, key, parent);
70+ }
71+
72+ function transformUnion(typs: any[], val: any): any {
73+ // val must validate against one typ in typs
74+ const l = typs.length;
75+ for (let i = 0; i < l; i++) {
76+ const typ = typs[i];
77+ try {
78+ return transform(val, typ, getProps);
79+ } catch (_) {}
80+ }
81+ return invalidValue(typs, val, key, parent);
82+ }
83+
84+ function transformEnum(cases: string[], val: any): any {
85+ if (cases.indexOf(val) !== -1) return val;
86+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
87+ }
88+
89+ function transformArray(typ: any, val: any): any {
90+ // val must be an array with no invalid elements
91+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
92+
93+ return val.map(el => transform(el, typ, getProps));
94+ }
95+
96+ function transformDate(val: any): any {
97+ if (val === null) {
98+ return null;
99+ }
100+ const d = new Date(val);
101+ if (isNaN(d.valueOf())) {
102+ return invalidValue(l("Date"), val, key, parent);
103+ }
104+ return d;
105+ }
106+
107+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
108+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
109+ return invalidValue(l(ref || "object"), val, key, parent);
110+ }
111+ const result: any = {};
112+ Object.getOwnPropertyNames(props).forEach(key => {
113+ const prop = props[key];
114+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
115+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
116+ });
117+ Object.getOwnPropertyNames(val).forEach(key => {
118+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
119+ result[key] = transform(val[key], additional, getProps, key, ref);
120+ }
121+ });
122+ return result;
123+ }
124+
125+ if (typ === "any") return val;
126+ if (typ === null) {
127+ if (val === null) return val;
128+ return invalidValue(typ, val, key, parent);
129+ }
130+ if (typ === false) return invalidValue(typ, val, key, parent);
131+ let ref: any = undefined;
132+ while (typeof typ === "object" && typ.ref !== undefined) {
133+ ref = typ.ref;
134+ typ = typeMap[typ.ref];
135+ }
136+ if (Array.isArray(typ)) return transformEnum(typ, val);
137+ if (typeof typ === "object") {
138+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
143+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
144+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
145+ : invalidValue(typ, val, key, parent);
146+ }
147+ // Numbers can be parsed by Date but shouldn't be.
148+ if (typ === Date && typeof val !== "number") return transformDate(val);
149+ return transformPrimitive(typ, val);
150+}
151+
152+function cast<T>(val: any, typ: any): T {
153+ return transform(val, typ, jsonToJSProps);
154+}
155+
156+function uncast<T>(val: T, typ: any): any {
157+ return transform(val, typ, jsToJSONProps);
158+}
159+
160+function l(typ: any) {
161+ return { literal: typ };
162+}
163+
164+function a(typ: any) {
165+ return { arrayItems: typ };
166+}
167+
168+function i(typ: any) {
169+ return { integer: typ };
170+}
171+
172+function p(pattern: any) {
173+ return { pattern };
174+}
175+
176+function s(typ: any, min: any, max: any) {
177+ return { string: typ, min, max };
178+}
179+
180+function n(typ: any, min: any, max: any) {
181+ return { number: typ, min, max };
182+}
183+
184+function u(...typs: any[]) {
185+ return { unionMembers: typs };
186+}
187+
188+function o(props: any[], additional: any) {
189+ return { props, additional };
190+}
191+
192+function m(additional: any) {
193+ const props: any[] = [];
194+ return { props, additional };
195+}
196+
197+function r(name: string) {
198+ return { ref: name };
199+}
200+
201+const typeMap: any = {
202+ "TopLevel": o([
203+ { json: "copyWith", js: "copyWith", typ: i(0) },
204+ { json: "name", js: "name", typ: "" },
205+ ], false),
206+};
207+
208+module.exports = {
209+ "topLevelToJson": topLevelToJson,
210+ "toTopLevel": toTopLevel,
211+};
Agolangdefault / quicktype.go+24 −0
@@ -0,0 +1,24 @@
1+// Code generated from JSON Schema using quicktype. DO NOT EDIT.
2+// To parse and unparse this JSON data, add this code to your project and do:
3+//
4+// topLevel, err := UnmarshalTopLevel(bytes)
5+// bytes, err = topLevel.Marshal()
6+
7+package main
8+
9+import "encoding/json"
10+
11+func UnmarshalTopLevel(data []byte) (TopLevel, error) {
12+ var r TopLevel
13+ err := json.Unmarshal(data, &r)
14+ return r, err
15+}
16+
17+func (r *TopLevel) Marshal() ([]byte, error) {
18+ return json.Marshal(r)
19+}
20+
21+type TopLevel struct {
22+ CopyWith int64 `json:"copyWith"`
23+ Name string `json:"name"`
24+}
Ahaskelldefault / QuickType.hs+33 −0
@@ -0,0 +1,33 @@
1+{-# LANGUAGE StrictData #-}
2+{-# LANGUAGE OverloadedStrings #-}
3+
4+module QuickType
5+ ( QuickType (..)
6+ , decodeTopLevel
7+ ) where
8+
9+import Data.Aeson
10+import Data.Aeson.Types (emptyObject)
11+import Data.ByteString.Lazy (ByteString)
12+import Data.HashMap.Strict (HashMap)
13+import Data.Text (Text)
14+
15+data QuickType = QuickType
16+ { copyWithQuickType :: Int
17+ , nameQuickType :: Text
18+ } deriving (Show)
19+
20+decodeTopLevel :: ByteString -> Maybe QuickType
21+decodeTopLevel = decode
22+
23+instance ToJSON QuickType where
24+ toJSON (QuickType copyWithQuickType nameQuickType) =
25+ object
26+ [ "copyWith" .= copyWithQuickType
27+ , "name" .= nameQuickType
28+ ]
29+
30+instance FromJSON QuickType where
31+ parseJSON (Object v) = QuickType
32+ <$> v .: "copyWith"
33+ <*> v .: "name"
Ajava-datetime-legacydefault / src / main / java / io / quicktype / Converter.java+124 −0
@@ -0,0 +1,124 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+//
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.util.Date;
25+import java.text.SimpleDateFormat;
26+
27+public class Converter {
28+ // Date-time helpers
29+
30+ private static final String[] DATE_TIME_FORMATS = {
31+ "yyyy-MM-dd'T'HH:mm:ss.SX",
32+ "yyyy-MM-dd'T'HH:mm:ss.S",
33+ "yyyy-MM-dd'T'HH:mm:ssX",
34+ "yyyy-MM-dd'T'HH:mm:ss",
35+ "yyyy-MM-dd HH:mm:ss.SX",
36+ "yyyy-MM-dd HH:mm:ss.S",
37+ "yyyy-MM-dd HH:mm:ssX",
38+ "yyyy-MM-dd HH:mm:ss",
39+ "HH:mm:ss.SZ",
40+ "HH:mm:ss.S",
41+ "HH:mm:ssZ",
42+ "HH:mm:ss",
43+ "yyyy-MM-dd",
44+ };
45+
46+ public static Date parseAllDateTimeString(String str) {
47+ str = str.replaceFirst("(\\.\\d{3})\\d+", "$1");
48+ for (String format : DATE_TIME_FORMATS) {
49+ try {
50+ return new SimpleDateFormat(format).parse(str);
51+ } catch (Exception ex) {
52+ // Ignored
53+ }
54+ }
55+ return null;
56+ }
57+
58+ public static String serializeDateTime(Date datetime) {
59+ return new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ").format(datetime);
60+ }
61+
62+ public static String serializeDate(Date datetime) {
63+ return new SimpleDateFormat("yyyy-MM-dd").format(datetime);
64+ }
65+
66+ public static String serializeTime(Date datetime) {
67+ return new SimpleDateFormat("hh:mm:ssZ").format(datetime);
68+ }
69+ // Serialize/deserialize helpers
70+
71+ public static TopLevel fromJsonString(String json) throws IOException {
72+ return getObjectReader().readValue(json);
73+ }
74+
75+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
76+ return getObjectWriter().writeValueAsString(obj);
77+ }
78+
79+ private static ObjectReader reader;
80+ private static ObjectWriter writer;
81+
82+ private static void instantiateMapper() {
83+ ObjectMapper mapper = new ObjectMapper();
84+ mapper.findAndRegisterModules();
85+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
86+ mapper.configure(DeserializationFeature.ACCEPT_FLOAT_AS_INT, false);
87+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
88+ SimpleModule module = new SimpleModule();
89+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
90+ @Override
91+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
92+ String value = jsonParser.getText();
93+ return Converter.parseAllDateTimeString(value);
94+ }
95+ });
96+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
97+ @Override
98+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
99+ String value = jsonParser.getText();
100+ return Converter.parseAllDateTimeString(value);
101+ }
102+ });
103+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
104+ @Override
105+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
106+ String value = jsonParser.getText();
107+ return Converter.parseAllDateTimeString(value);
108+ }
109+ });
110+ mapper.registerModule(module);
111+ reader = mapper.readerFor(TopLevel.class);
112+ writer = mapper.writerFor(TopLevel.class);
113+ }
114+
115+ private static ObjectReader getObjectReader() {
116+ if (reader == null) instantiateMapper();
117+ return reader;
118+ }
119+
120+ private static ObjectWriter getObjectWriter() {
121+ if (writer == null) instantiateMapper();
122+ return writer;
123+ }
124+}
Ajava-datetime-legacydefault / src / main / java / io / quicktype / TopLevel.java+18 −0
@@ -0,0 +1,18 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private long copyWith;
7+ private String name;
8+
9+ @JsonProperty("copyWith")
10+ public long getCopyWith() { return copyWith; }
11+ @JsonProperty("copyWith")
12+ public void setCopyWith(long value) { this.copyWith = value; }
13+
14+ @JsonProperty("name")
15+ public String getName() { return name; }
16+ @JsonProperty("name")
17+ public void setName(String value) { this.name = value; }
18+}
Ajava-lombokdefault / src / main / java / io / quicktype / Converter.java+103 −0
@@ -0,0 +1,103 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(DeserializationFeature.ACCEPT_FLOAT_AS_INT, false);
80+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
81+ SimpleModule module = new SimpleModule();
82+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
83+ @Override
84+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
85+ String value = jsonParser.getText();
86+ return Converter.parseDateTimeString(value);
87+ }
88+ });
89+ mapper.registerModule(module);
90+ reader = mapper.readerFor(TopLevel.class);
91+ writer = mapper.writerFor(TopLevel.class);
92+ }
93+
94+ private static ObjectReader getObjectReader() {
95+ if (reader == null) instantiateMapper();
96+ return reader;
97+ }
98+
99+ private static ObjectWriter getObjectWriter() {
100+ if (writer == null) instantiateMapper();
101+ return writer;
102+ }
103+}
Ajava-lombokdefault / src / main / java / io / quicktype / TopLevel.java+18 −0
@@ -0,0 +1,18 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private long copyWith;
7+ private String name;
8+
9+ @JsonProperty("copyWith")
10+ public long getCopyWith() { return copyWith; }
11+ @JsonProperty("copyWith")
12+ public void setCopyWith(long value) { this.copyWith = value; }
13+
14+ @JsonProperty("name")
15+ public String getName() { return name; }
16+ @JsonProperty("name")
17+ public void setName(String value) { this.name = value; }
18+}
Ajavadefault / src / main / java / io / quicktype / Converter.java+103 −0
@@ -0,0 +1,103 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(DeserializationFeature.ACCEPT_FLOAT_AS_INT, false);
80+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
81+ SimpleModule module = new SimpleModule();
82+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
83+ @Override
84+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
85+ String value = jsonParser.getText();
86+ return Converter.parseDateTimeString(value);
87+ }
88+ });
89+ mapper.registerModule(module);
90+ reader = mapper.readerFor(TopLevel.class);
91+ writer = mapper.writerFor(TopLevel.class);
92+ }
93+
94+ private static ObjectReader getObjectReader() {
95+ if (reader == null) instantiateMapper();
96+ return reader;
97+ }
98+
99+ private static ObjectWriter getObjectWriter() {
100+ if (writer == null) instantiateMapper();
101+ return writer;
102+ }
103+}
Ajavadefault / src / main / java / io / quicktype / TopLevel.java+18 −0
@@ -0,0 +1,18 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private long copyWith;
7+ private String name;
8+
9+ @JsonProperty("copyWith")
10+ public long getCopyWith() { return copyWith; }
11+ @JsonProperty("copyWith")
12+ public void setCopyWith(long value) { this.copyWith = value; }
13+
14+ @JsonProperty("name")
15+ public String getName() { return name; }
16+ @JsonProperty("name")
17+ public void setName(String value) { this.name = value; }
18+}
Ajavascript-prop-typesdefault / toplevel.js+22 −0
@@ -0,0 +1,22 @@
1+// Example usage:
2+//
3+// import { MyShape } from ./myShape.js;
4+//
5+// class MyComponent extends React.Component {
6+// //
7+// }
8+//
9+// MyComponent.propTypes = {
10+// input: MyShape
11+// };
12+
13+import PropTypes from "prop-types";
14+const Integer = (props, name) => props[name] == null || Number.isInteger(props[name]) ? null : new Error("Expected integer");
15+
16+let _TopLevel;
17+_TopLevel = PropTypes.shape({
18+ "copyWith": PropTypes.oneOfType([Integer]).isRequired,
19+ "name": PropTypes.oneOfType([PropTypes.string]).isRequired,
20+});
21+
22+export const TopLevel = _TopLevel;
Ajavascriptdefault / TopLevel.js+204 −0
@@ -0,0 +1,204 @@
1+// To parse this data:
2+//
3+// const Convert = require("./TopLevel");
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+// Converts JSON strings to/from your types
11+// and asserts the results of JSON.parse at runtime
12+function toTopLevel(json) {
13+ return cast(JSON.parse(json), r("TopLevel"));
14+}
15+
16+function topLevelToJson(value) {
17+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
18+}
19+
20+function invalidValue(typ, val, key, parent = '') {
21+ const prettyTyp = prettyTypeName(typ);
22+ const parentText = parent ? ` on ${parent}` : '';
23+ const keyText = key ? ` for key "${key}"` : '';
24+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
25+}
26+
27+function prettyTypeName(typ) {
28+ if (Array.isArray(typ)) {
29+ if (typ.length === 2 && typ[0] === undefined) {
30+ return `an optional ${prettyTypeName(typ[1])}`;
31+ } else {
32+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
33+ }
34+ } else if (typeof typ === "object" && typ.literal !== undefined) {
35+ return typ.literal;
36+ } else {
37+ return typeof typ;
38+ }
39+}
40+
41+function jsonToJSProps(typ) {
42+ if (typ.jsonToJS === undefined) {
43+ const map = {};
44+ typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
45+ typ.jsonToJS = map;
46+ }
47+ return typ.jsonToJS;
48+}
49+
50+function jsToJSONProps(typ) {
51+ if (typ.jsToJSON === undefined) {
52+ const map = {};
53+ typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
54+ typ.jsToJSON = map;
55+ }
56+ return typ.jsToJSON;
57+}
58+
59+function transform(val, typ, getProps, key = '', parent = '') {
60+ function transformPrimitive(typ, val) {
61+ if (typeof typ === typeof val) return val;
62+ return invalidValue(typ, val, key, parent);
63+ }
64+
65+ function transformUnion(typs, val) {
66+ // val must validate against one typ in typs
67+ const l = typs.length;
68+ for (let i = 0; i < l; i++) {
69+ const typ = typs[i];
70+ try {
71+ return transform(val, typ, getProps);
72+ } catch (_) {}
73+ }
74+ return invalidValue(typs, val, key, parent);
75+ }
76+
77+ function transformEnum(cases, val) {
78+ if (cases.indexOf(val) !== -1) return val;
79+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
80+ }
81+
82+ function transformArray(typ, val) {
83+ // val must be an array with no invalid elements
84+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
85+
86+ return val.map(el => transform(el, typ, getProps));
87+ }
88+
89+ function transformDate(val) {
90+ if (val === null) {
91+ return null;
92+ }
93+ const d = new Date(val);
94+ if (isNaN(d.valueOf())) {
95+ return invalidValue(l("Date"), val, key, parent);
96+ }
97+ return d;
98+ }
99+
100+ function transformObject(props, additional, val) {
101+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
102+ return invalidValue(l(ref || "object"), val, key, parent);
103+ }
104+ const result = {};
105+ Object.getOwnPropertyNames(props).forEach(key => {
106+ const prop = props[key];
107+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
108+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
109+ });
110+ Object.getOwnPropertyNames(val).forEach(key => {
111+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
112+ result[key] = transform(val[key], additional, getProps, key, ref);
113+ }
114+ });
115+ return result;
116+ }
117+
118+ if (typ === "any") return val;
119+ if (typ === null) {
120+ if (val === null) return val;
121+ return invalidValue(typ, val, key, parent);
122+ }
123+ if (typ === false) return invalidValue(typ, val, key, parent);
124+ let ref = undefined;
125+ while (typeof typ === "object" && typ.ref !== undefined) {
126+ ref = typ.ref;
127+ typ = typeMap[typ.ref];
128+ }
129+ if (Array.isArray(typ)) return transformEnum(typ, val);
130+ if (typeof typ === "object") {
131+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
136+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
137+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
138+ : invalidValue(typ, val, key, parent);
139+ }
140+ // Numbers can be parsed by Date but shouldn't be.
141+ if (typ === Date && typeof val !== "number") return transformDate(val);
142+ return transformPrimitive(typ, val);
143+}
144+
145+function cast(val, typ) {
146+ return transform(val, typ, jsonToJSProps);
147+}
148+
149+function uncast(val, typ) {
150+ return transform(val, typ, jsToJSONProps);
151+}
152+
153+function l(typ) {
154+ return { literal: typ };
155+}
156+
157+function a(typ) {
158+ return { arrayItems: typ };
159+}
160+
161+function i(typ) {
162+ return { integer: typ };
163+}
164+
165+function p(pattern) {
166+ return { pattern };
167+}
168+
169+function s(typ, min, max) {
170+ return { string: typ, min, max };
171+}
172+
173+function n(typ, min, max) {
174+ return { number: typ, min, max };
175+}
176+
177+function u(...typs) {
178+ return { unionMembers: typs };
179+}
180+
181+function o(props, additional) {
182+ return { props, additional };
183+}
184+
185+function m(additional) {
186+ const props = [];
187+ return { props, additional };
188+}
189+
190+function r(name) {
191+ return { ref: name };
192+}
193+
194+const typeMap = {
195+ "TopLevel": o([
196+ { json: "copyWith", js: "copyWith", typ: i(0) },
197+ { json: "name", js: "name", typ: "" },
198+ ], false),
199+};
200+
201+module.exports = {
202+ "topLevelToJson": topLevelToJson,
203+ "toTopLevel": toTopLevel,
204+};
Akotlin-jacksondefault / TopLevel.kt+34 −0
@@ -0,0 +1,34 @@
1+// To parse the JSON, install jackson-module-kotlin and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.fasterxml.jackson.annotation.*
8+import com.fasterxml.jackson.core.*
9+import com.fasterxml.jackson.databind.*
10+import com.fasterxml.jackson.databind.deser.std.StdDeserializer
11+import com.fasterxml.jackson.databind.module.SimpleModule
12+import com.fasterxml.jackson.databind.node.*
13+import com.fasterxml.jackson.databind.ser.std.StdSerializer
14+import com.fasterxml.jackson.module.kotlin.*
15+
16+val mapper = jacksonObjectMapper().apply {
17+ propertyNamingStrategy = object : PropertyNamingStrategy.PropertyNamingStrategyBase() { override fun translate(name: String) = if (name == "empty") "" else name }
18+ setSerializationInclusion(JsonInclude.Include.NON_NULL)
19+ disable(DeserializationFeature.ACCEPT_FLOAT_AS_INT)
20+}
21+
22+data class TopLevel (
23+ @get:JsonProperty(required=true)@field:JsonProperty(required=true)
24+ val copyWith: Long,
25+
26+ @get:JsonProperty(required=true)@field:JsonProperty(required=true)
27+ val name: String
28+) {
29+ fun toJson() = mapper.writeValueAsString(this)
30+
31+ companion object {
32+ fun fromJson(json: String) = mapper.readValue<TopLevel>(json)
33+ }
34+}
Akotlindefault / TopLevel.kt+20 −0
@@ -0,0 +1,20 @@
1+// To parse the JSON, install Klaxon and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.beust.klaxon.*
8+
9+private val klaxon = Klaxon()
10+
11+data class TopLevel (
12+ val copyWith: Long,
13+ val name: String
14+) {
15+ public fun toJson() = klaxon.toJsonString(this)
16+
17+ companion object {
18+ public fun fromJson(json: String) = klaxon.parse<TopLevel>(json)
19+ }
20+}
Akotlinxdefault / TopLevel.kt+17 −0
@@ -0,0 +1,17 @@
1+// To parse the JSON, install kotlin's serialization plugin and do:
2+//
3+// val json = Json { allowStructuredMapKeys = true }
4+// val topLevel = json.parse(TopLevel.serializer(), jsonString)
5+
6+package quicktype
7+
8+import kotlinx.serialization.*
9+import kotlinx.serialization.json.*
10+import kotlinx.serialization.descriptors.*
11+import kotlinx.serialization.encoding.*
12+
13+@Serializable
14+data class TopLevel (
15+ val copyWith: Long,
16+ val name: String
17+)
Aobjective-cdefault / QTTopLevel.h+31 −0
@@ -0,0 +1,31 @@
1+// To parse this JSON:
2+//
3+// NSError *error;
4+// QTTopLevel *topLevel = [QTTopLevel fromJSON:json encoding:NSUTF8Encoding error:&error];
5+
6+#import <Foundation/Foundation.h>
7+
8+@class QTTopLevel;
9+
10+NS_ASSUME_NONNULL_BEGIN
11+
12+#pragma mark - Top-level marshaling functions
13+
14+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error);
15+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error);
16+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error);
17+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error);
18+
19+#pragma mark - Object interfaces
20+
21+@interface QTTopLevel : NSObject
22+@property (nonatomic, copy) NSString *name;
23+@property (nonatomic, assign) NSInteger theCopyWith;
24+
25++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
26++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error;
27+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
28+- (NSData *_Nullable)toData:(NSError *_Nullable *)error;
29+@end
30+
31+NS_ASSUME_NONNULL_END
Aobjective-cdefault / QTTopLevel.m+126 −0
@@ -0,0 +1,126 @@
1+#import "QTTopLevel.h"
2+
3+#define λ(decl, expr) (^(decl) { return (expr); })
4+
5+static id NSNullify(id _Nullable x) {
6+ return (x == nil || x == NSNull.null) ? NSNull.null : x;
7+}
8+
9+NS_ASSUME_NONNULL_BEGIN
10+
11+@interface QTTopLevel (JSONConversion)
12++ (instancetype)fromJSONDictionary:(NSDictionary *)dict;
13+- (NSDictionary *)JSONDictionary;
14+@end
15+
16+#pragma mark - JSON serialization
17+
18+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error)
19+{
20+ @try {
21+ id json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error];
22+ return *error ? nil : [QTTopLevel fromJSONDictionary:json];
23+ } @catch (NSException *exception) {
24+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
25+ return nil;
26+ }
27+}
28+
29+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error)
30+{
31+ return QTTopLevelFromData([json dataUsingEncoding:encoding], error);
32+}
33+
34+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error)
35+{
36+ @try {
37+ id json = [topLevel JSONDictionary];
38+ NSData *data = [NSJSONSerialization dataWithJSONObject:json options:NSJSONWritingFragmentsAllowed error:error];
39+ return *error ? nil : data;
40+ } @catch (NSException *exception) {
41+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
42+ return nil;
43+ }
44+}
45+
46+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error)
47+{
48+ NSData *data = QTTopLevelToData(topLevel, error);
49+ return data ? [[NSString alloc] initWithData:data encoding:encoding] : nil;
50+}
51+
52+@implementation QTTopLevel
53++ (NSDictionary<NSString *, NSString *> *)properties
54+{
55+ static NSDictionary<NSString *, NSString *> *properties;
56+ return properties = properties ? properties : @{
57+ @"name": @"name",
58+ @"copyWith": @"theCopyWith",
59+ };
60+}
61+
62++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error
63+{
64+ return QTTopLevelFromData(data, error);
65+}
66+
67++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
68+{
69+ return QTTopLevelFromJSON(json, encoding, error);
70+}
71+
72++ (instancetype)fromJSONDictionary:(NSDictionary *)dict
73+{
74+ return [dict isKindOfClass:NSDictionary.class] ? [[QTTopLevel alloc] initWithJSONDictionary:dict] : nil;
75+}
76+
77+- (instancetype)initWithJSONDictionary:(NSDictionary *)dict
78+{
79+ if (self = [super init]) {
80+ if (![dict[@"name"] isKindOfClass:NSString.class]) return nil;
81+ if (![dict[@"copyWith"] isKindOfClass:NSNumber.class]) return nil;
82+ if ([dict[@"copyWith"] doubleValue] != [dict[@"copyWith"] longLongValue]) return nil;
83+ [self setValuesForKeysWithDictionary:dict];
84+ }
85+ return self;
86+}
87+
88+- (void)setValue:(nullable id)value forKey:(NSString *)key
89+{
90+ id resolved = QTTopLevel.properties[key];
91+ if (resolved) [super setValue:value forKey:resolved];
92+}
93+
94+- (void)setNilValueForKey:(NSString *)key
95+{
96+ id resolved = QTTopLevel.properties[key];
97+ if (resolved) [super setValue:@(0) forKey:resolved];
98+}
99+
100+- (NSDictionary *)JSONDictionary
101+{
102+ id dict = [[self dictionaryWithValuesForKeys:QTTopLevel.properties.allValues] mutableCopy];
103+
104+ for (id jsonName in QTTopLevel.properties) {
105+ id propertyName = QTTopLevel.properties[jsonName];
106+ if (![jsonName isEqualToString:propertyName]) {
107+ dict[jsonName] = dict[propertyName];
108+ [dict removeObjectForKey:propertyName];
109+ }
110+ }
111+
112+ return dict;
113+}
114+
115+- (NSData *_Nullable)toData:(NSError *_Nullable *)error
116+{
117+ return QTTopLevelToData(self, error);
118+}
119+
120+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
121+{
122+ return QTTopLevelToJSON(self, encoding, error);
123+}
124+@end
125+
126+NS_ASSUME_NONNULL_END
Aphpdefault / TopLevel.php+160 −0
@@ -0,0 +1,160 @@
1+<?php
2+declare(strict_types=1);
3+
4+// This is an autogenerated file:TopLevel
5+
6+class TopLevel {
7+ private int $copyWith; // json:copyWith Required
8+ private string $name; // json:name Required
9+
10+ /**
11+ * @param int $copyWith
12+ * @param string $name
13+ */
14+ public function __construct(int $copyWith, string $name) {
15+ $this->copyWith = $copyWith;
16+ $this->name = $name;
17+ }
18+
19+ /**
20+ * @param int $value
21+ * @throws Exception
22+ * @return int
23+ */
24+ public static function fromCopyWith(int $value): int {
25+ return $value; /*int*/
26+ }
27+
28+ /**
29+ * @throws Exception
30+ * @return int
31+ */
32+ public function toCopyWith(): int {
33+ if (TopLevel::validateCopyWith($this->copyWith)) {
34+ return $this->copyWith; /*int*/
35+ }
36+ throw new Exception('never get to this TopLevel::copyWith');
37+ }
38+
39+ /**
40+ * @param int
41+ * @return bool
42+ * @throws Exception
43+ */
44+ public static function validateCopyWith(int $value): bool {
45+ return true;
46+ }
47+
48+ /**
49+ * @throws Exception
50+ * @return int
51+ */
52+ public function getCopyWith(): int {
53+ if (TopLevel::validateCopyWith($this->copyWith)) {
54+ return $this->copyWith;
55+ }
56+ throw new Exception('never get to getCopyWith TopLevel::copyWith');
57+ }
58+
59+ /**
60+ * @return int
61+ */
62+ public static function sampleCopyWith(): int {
63+ return 31; /*31:copyWith*/
64+ }
65+
66+ /**
67+ * @param string $value
68+ * @throws Exception
69+ * @return string
70+ */
71+ public static function fromName(string $value): string {
72+ return $value; /*string*/
73+ }
74+
75+ /**
76+ * @throws Exception
77+ * @return string
78+ */
79+ public function toName(): string {
80+ if (TopLevel::validateName($this->name)) {
81+ return $this->name; /*string*/
82+ }
83+ throw new Exception('never get to this TopLevel::name');
84+ }
85+
86+ /**
87+ * @param string
88+ * @return bool
89+ * @throws Exception
90+ */
91+ public static function validateName(string $value): bool {
92+ return true;
93+ }
94+
95+ /**
96+ * @throws Exception
97+ * @return string
98+ */
99+ public function getName(): string {
100+ if (TopLevel::validateName($this->name)) {
101+ return $this->name;
102+ }
103+ throw new Exception('never get to getName TopLevel::name');
104+ }
105+
106+ /**
107+ * @return string
108+ */
109+ public static function sampleName(): string {
110+ return 'TopLevel::name::32'; /*32:name*/
111+ }
112+
113+ /**
114+ * @throws Exception
115+ * @return bool
116+ */
117+ public function validate(): bool {
118+ return TopLevel::validateCopyWith($this->copyWith)
119+ || TopLevel::validateName($this->name);
120+ }
121+
122+ /**
123+ * @return stdClass
124+ * @throws Exception
125+ */
126+ public function to(): stdClass {
127+ $out = new stdClass();
128+ $out->{'copyWith'} = $this->toCopyWith();
129+ $out->{'name'} = $this->toName();
130+ return $out;
131+ }
132+
133+ /**
134+ * @param stdClass $obj
135+ * @return TopLevel
136+ * @throws Exception
137+ */
138+ public static function from(stdClass $obj): TopLevel {
139+ if (!property_exists($obj, 'copyWith')) {
140+ throw new Exception("Missing required property");
141+ }
142+ if (!property_exists($obj, 'name')) {
143+ throw new Exception("Missing required property");
144+ }
145+ return new TopLevel(
146+ TopLevel::fromCopyWith($obj->{'copyWith'})
147+ ,TopLevel::fromName($obj->{'name'})
148+ );
149+ }
150+
151+ /**
152+ * @return TopLevel
153+ */
154+ public static function sample(): TopLevel {
155+ return new TopLevel(
156+ TopLevel::sampleCopyWith()
157+ ,TopLevel::sampleName()
158+ );
159+ }
160+}
Apikedefault / TopLevel.pmod+37 −0
@@ -0,0 +1,37 @@
1+// This source has been automatically generated by quicktype.
2+// ( https://github.com/quicktype/quicktype )
3+//
4+// To use this code, simply import it into your project as a Pike module.
5+// To JSON-encode your object, you can pass it to `Standards.JSON.encode`
6+// or call `encode_json` on it.
7+//
8+// To decode a JSON string, first pass it to `Standards.JSON.decode`,
9+// and then pass the result to `<YourClass>_from_JSON`.
10+// It will return an instance of <YourClass>.
11+// Bear in mind that these functions have unexpected behavior,
12+// and will likely throw an error, if the JSON string does not
13+// match the expected interface, even if the JSON itself is valid.
14+
15+class TopLevel {
16+ int copy_with; // json: "copyWith"
17+ string name; // json: "name"
18+
19+ string encode_json() {
20+ mapping(string:mixed) json = ([
21+ "copyWith" : copy_with,
22+ "name" : name,
23+ ]);
24+
25+ return Standards.JSON.encode(json);
26+ }
27+}
28+
29+TopLevel TopLevel_from_JSON(mixed json) {
30+ TopLevel retval = TopLevel();
31+
32+ if (!intp(json["copyWith"])) error("Expected integer");
33+ retval.copy_with = json["copyWith"];
34+ retval.name = json["name"];
35+
36+ return retval;
37+}
Apythondefault / quicktype.py+47 −0
@@ -0,0 +1,47 @@
1+from dataclasses import dataclass
2+from typing import Any, TypeVar, Type, cast
3+
4+
5+T = TypeVar("T")
6+
7+
8+def from_int(x: Any) -> int:
9+ assert isinstance(x, int) and not isinstance(x, bool)
10+ return x
11+
12+
13+def from_str(x: Any) -> str:
14+ assert isinstance(x, str)
15+ return x
16+
17+
18+def to_class(c: Type[T], x: Any) -> dict:
19+ assert isinstance(x, c)
20+ return cast(Any, x).to_dict()
21+
22+
23+@dataclass
24+class TopLevel:
25+ copy_with: int
26+ name: str
27+
28+ @staticmethod
29+ def from_dict(obj: Any) -> 'TopLevel':
30+ assert isinstance(obj, dict)
31+ copy_with = from_int(obj.get("copyWith"))
32+ name = from_str(obj.get("name"))
33+ return TopLevel(copy_with, name)
34+
35+ def to_dict(self) -> dict:
36+ result: dict = {}
37+ result["copyWith"] = from_int(self.copy_with)
38+ result["name"] = from_str(self.name)
39+ return result
40+
41+
42+def top_level_from_dict(s: Any) -> TopLevel:
43+ return TopLevel.from_dict(s)
44+
45+
46+def top_level_to_dict(x: TopLevel) -> Any:
47+ return to_class(TopLevel, x)
Arubydefault / TopLevel.rb+49 −0
@@ -0,0 +1,49 @@
1+# This code may look unusually verbose for Ruby (and it is), but
2+# it performs some subtle and complex validation of JSON data.
3+#
4+# To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
5+#
6+# top_level = TopLevel.from_json! "{…}"
7+# puts top_level.copy_with.even?
8+#
9+# If from_json! succeeds, the value returned matches the schema.
10+
11+require 'json'
12+require 'dry-types'
13+require 'dry-struct'
14+
15+module Types
16+ include Dry.Types(default: :nominal)
17+
18+ Integer = Strict::Integer
19+ Hash = Strict::Hash
20+ String = Strict::String
21+end
22+
23+class TopLevel < Dry::Struct
24+ attribute :copy_with, Types::Integer
25+ attribute :top_level_name, Types::String
26+
27+ def self.from_dynamic!(d)
28+ d = Types::Hash[d]
29+ new(
30+ copy_with: d.fetch("copyWith"),
31+ top_level_name: d.fetch("name"),
32+ )
33+ end
34+
35+ def self.from_json!(json)
36+ from_dynamic!(JSON.parse(json))
37+ end
38+
39+ def to_dynamic
40+ {
41+ "copyWith" => copy_with,
42+ "name" => top_level_name,
43+ }
44+ end
45+
46+ def to_json(options = nil)
47+ JSON.generate(to_dynamic, options)
48+ end
49+end
Arustdefault / module_under_test.rs+22 −0
@@ -0,0 +1,22 @@
1+// Example code that deserializes and serializes the model.
2+// extern crate serde;
3+// #[macro_use]
4+// extern crate serde_derive;
5+// extern crate serde_json;
6+//
7+// use generated_module::TopLevel;
8+//
9+// fn main() {
10+// let json = r#"{"answer": 42}"#;
11+// let model: TopLevel = serde_json::from_str(&json).unwrap();
12+// }
13+
14+use serde::{Serialize, Deserialize};
15+
16+#[derive(Debug, Clone, Serialize, Deserialize)]
17+#[serde(rename_all = "camelCase")]
18+pub struct TopLevel {
19+ pub copy_with: i64,
20+
21+ pub name: String,
22+}
Ascala3-upickledefault / TopLevel.scala+73 −0
@@ -0,0 +1,73 @@
1+package quicktype
2+
3+// Custom pickler so that missing keys and JSON nulls both read as None,
4+// and None is left out when writing (upickle's default for Option is a
5+// JSON array).
6+object OptionPickler extends upickle.AttributeTagged:
7+ import upickle.default.Writer
8+ import upickle.default.Reader
9+ override implicit def OptionWriter[T: Writer]: Writer[Option[T]] =
10+ implicitly[Writer[T]].comap[Option[T]] {
11+ case None => null.asInstanceOf[T]
12+ case Some(x) => x
13+ }
14+
15+ override implicit def OptionReader[T: Reader]: Reader[Option[T]] = {
16+ new Reader.Delegate[Any, Option[T]](implicitly[Reader[T]].map(Some(_))){
17+ override def visitNull(index: Int) = None
18+ }
19+ }
20+end OptionPickler
21+
22+// If a union has a null in, then we'll need this too...
23+type NullValue = None.type
24+given OptionPickler.ReadWriter[NullValue] = OptionPickler.readwriter[ujson.Value].bimap[NullValue](
25+ _ => ujson.Null,
26+ json => if json.isNull then None else throw new upickle.core.Abort("not null")
27+)
28+given OptionPickler.ReadWriter[java.time.Instant] = OptionPickler.readwriter[String].bimap(_.toString, java.time.Instant.parse)
29+
30+object JsonExt:
31+ val valueReader = OptionPickler.readwriter[ujson.Value]
32+
33+ // upickle's built-in primitive readers are lenient -- the numeric and
34+ // boolean readers accept strings, and the string reader accepts
35+ // numbers and booleans -- so untagged unions need strict readers to
36+ // pick the right member.
37+ val strictString: OptionPickler.Reader[String] = valueReader.map {
38+ case ujson.Str(s) => s
39+ case json => throw new upickle.core.Abort("expected string, got " + json)
40+ }
41+ val strictLong: OptionPickler.Reader[Long] = valueReader.map {
42+ case ujson.Num(n) if n.isWhole => n.toLong
43+ case json => throw new upickle.core.Abort("expected integer, got " + json)
44+ }
45+ val strictDouble: OptionPickler.Reader[Double] = valueReader.map {
46+ case ujson.Num(n) => n
47+ case json => throw new upickle.core.Abort("expected number, got " + json)
48+ }
49+ val strictBoolean: OptionPickler.Reader[Boolean] = valueReader.map {
50+ case ujson.Bool(b) => b
51+ case json => throw new upickle.core.Abort("expected boolean, got " + json)
52+ }
53+
54+ def badMerge[T](r1: => OptionPickler.Reader[?], rest: OptionPickler.Reader[?]*): OptionPickler.Reader[T] = valueReader.map { json =>
55+ var t: T | Null = null
56+ val stack = Vector.newBuilder[Throwable]
57+ (r1 +: rest).foreach { reader =>
58+ if t == null then
59+ try
60+ t = OptionPickler.read[T](json, trace = true)(using reader.asInstanceOf[OptionPickler.Reader[T]])
61+ catch
62+ case exc => stack += exc
63+ }
64+ if t != null then t.nn else throw new Exception(json.toString(), stack.result().headOption.getOrElse(null))
65+ }
66+end JsonExt
67+given OptionPickler.Reader[Long] = JsonExt.strictLong
68+
69+
70+case class TopLevel (
71+ val copyWith : Long,
72+ val name : String
73+) derives OptionPickler.ReadWriter
Ascala3default / TopLevel.scala+13 −0
@@ -0,0 +1,13 @@
1+package quicktype
2+
3+import io.circe.syntax._
4+import io.circe._
5+import cats.syntax.functor._
6+
7+// If a union has a null in, then we'll need this too...
8+type NullValue = None.type
9+
10+case class TopLevel (
11+ val copyWith : Long,
12+ val name : String
13+) derives Encoder.AsObject, Decoder
Aswiftdefault / quicktype.swift+90 −0
@@ -0,0 +1,90 @@
1+// This file was generated from JSON Schema using quicktype, do not modify it directly.
2+// To parse the JSON, add this file to your project and do:
3+//
4+// let topLevel = try TopLevel(json)
5+
6+import Foundation
7+
8+// MARK: - TopLevel
9+struct TopLevel: Codable {
10+ let copyWith: Int
11+ let name: String
12+
13+ enum CodingKeys: String, CodingKey {
14+ case copyWith = "copyWith"
15+ case name = "name"
16+ }
17+}
18+
19+// MARK: TopLevel convenience initializers and mutators
20+
21+extension TopLevel {
22+ init(data: Data) throws {
23+ self = try newJSONDecoder().decode(TopLevel.self, from: data)
24+ }
25+
26+ init(_ json: String, using encoding: String.Encoding = .utf8) throws {
27+ guard let data = json.data(using: encoding) else {
28+ throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
29+ }
30+ try self.init(data: data)
31+ }
32+
33+ init(fromURL url: URL) throws {
34+ try self.init(data: try Data(contentsOf: url))
35+ }
36+
37+ func with(
38+ copyWith: Int? = nil,
39+ name: String? = nil
40+ ) -> TopLevel {
41+ return TopLevel(
42+ copyWith: copyWith ?? self.copyWith,
43+ name: name ?? self.name
44+ )
45+ }
46+
47+ func jsonData() throws -> Data {
48+ return try newJSONEncoder().encode(self)
49+ }
50+
51+ func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
52+ return String(data: try self.jsonData(), encoding: encoding)
53+ }
54+}
55+
56+// MARK: - Helper functions for creating encoders and decoders
57+
58+func newJSONDecoder() -> JSONDecoder {
59+ let decoder = JSONDecoder()
60+ decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
61+ let container = try decoder.singleValueContainer()
62+ let dateStr = try container.decode(String.self)
63+
64+ let formatter = DateFormatter()
65+ formatter.calendar = Calendar(identifier: .iso8601)
66+ formatter.locale = Locale(identifier: "en_US_POSIX")
67+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
68+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
69+ if let date = formatter.date(from: dateStr) {
70+ return date
71+ }
72+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
73+ if let date = formatter.date(from: dateStr) {
74+ return date
75+ }
76+ throw DecodingError.typeMismatch(Date.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Could not decode date"))
77+ })
78+ return decoder
79+}
80+
81+func newJSONEncoder() -> JSONEncoder {
82+ let encoder = JSONEncoder()
83+ let formatter = DateFormatter()
84+ formatter.calendar = Calendar(identifier: .iso8601)
85+ formatter.locale = Locale(identifier: "en_US_POSIX")
86+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
87+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXXXX"
88+ encoder.dateEncodingStrategy = .formatted(formatter)
89+ return encoder
90+}
Atypescript-effect-schemadefault / TopLevel.ts+7 −0
@@ -0,0 +1,7 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5+ "copyWith": S.Int,
6+ "name": S.String,
7+}) {}
Atypescript-zoddefault / TopLevel.ts+8 −0
@@ -0,0 +1,8 @@
1+import * as z from "zod";
2+
3+
4+export const TopLevelSchema = z.object({
5+ "copyWith": z.number().int(),
6+ "name": z.string(),
7+});
8+export type TopLevel = z.infer<typeof TopLevelSchema>;
Atypescriptdefault / TopLevel.ts+206 −0
@@ -0,0 +1,206 @@
1+// To parse this data:
2+//
3+// import { Convert, TopLevel } from "./TopLevel";
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+export interface TopLevel {
11+ copyWith: number;
12+ name: string;
13+}
14+
15+// Converts JSON strings to/from your types
16+// and asserts the results of JSON.parse at runtime
17+export class Convert {
18+ public static toTopLevel(json: string): TopLevel {
19+ return cast(JSON.parse(json), r("TopLevel"));
20+ }
21+
22+ public static topLevelToJson(value: TopLevel): string {
23+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
24+ }
25+}
26+
27+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
28+ const prettyTyp = prettyTypeName(typ);
29+ const parentText = parent ? ` on ${parent}` : '';
30+ const keyText = key ? ` for key "${key}"` : '';
31+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
32+}
33+
34+function prettyTypeName(typ: any): string {
35+ if (Array.isArray(typ)) {
36+ if (typ.length === 2 && typ[0] === undefined) {
37+ return `an optional ${prettyTypeName(typ[1])}`;
38+ } else {
39+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
40+ }
41+ } else if (typeof typ === "object" && typ.literal !== undefined) {
42+ return typ.literal;
43+ } else {
44+ return typeof typ;
45+ }
46+}
47+
48+function jsonToJSProps(typ: any): any {
49+ if (typ.jsonToJS === undefined) {
50+ const map: any = {};
51+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
52+ typ.jsonToJS = map;
53+ }
54+ return typ.jsonToJS;
55+}
56+
57+function jsToJSONProps(typ: any): any {
58+ if (typ.jsToJSON === undefined) {
59+ const map: any = {};
60+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
61+ typ.jsToJSON = map;
62+ }
63+ return typ.jsToJSON;
64+}
65+
66+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
67+ function transformPrimitive(typ: string, val: any): any {
68+ if (typeof typ === typeof val) return val;
69+ return invalidValue(typ, val, key, parent);
70+ }
71+
72+ function transformUnion(typs: any[], val: any): any {
73+ // val must validate against one typ in typs
74+ const l = typs.length;
75+ for (let i = 0; i < l; i++) {
76+ const typ = typs[i];
77+ try {
78+ return transform(val, typ, getProps);
79+ } catch (_) {}
80+ }
81+ return invalidValue(typs, val, key, parent);
82+ }
83+
84+ function transformEnum(cases: string[], val: any): any {
85+ if (cases.indexOf(val) !== -1) return val;
86+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
87+ }
88+
89+ function transformArray(typ: any, val: any): any {
90+ // val must be an array with no invalid elements
91+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
92+
93+ return val.map(el => transform(el, typ, getProps));
94+ }
95+
96+ function transformDate(val: any): any {
97+ if (val === null) {
98+ return null;
99+ }
100+ const d = new Date(val);
101+ if (isNaN(d.valueOf())) {
102+ return invalidValue(l("Date"), val, key, parent);
103+ }
104+ return d;
105+ }
106+
107+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
108+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
109+ return invalidValue(l(ref || "object"), val, key, parent);
110+ }
111+ const result: any = {};
112+ Object.getOwnPropertyNames(props).forEach(key => {
113+ const prop = props[key];
114+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
115+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
116+ });
117+ Object.getOwnPropertyNames(val).forEach(key => {
118+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
119+ result[key] = transform(val[key], additional, getProps, key, ref);
120+ }
121+ });
122+ return result;
123+ }
124+
125+ if (typ === "any") return val;
126+ if (typ === null) {
127+ if (val === null) return val;
128+ return invalidValue(typ, val, key, parent);
129+ }
130+ if (typ === false) return invalidValue(typ, val, key, parent);
131+ let ref: any = undefined;
132+ while (typeof typ === "object" && typ.ref !== undefined) {
133+ ref = typ.ref;
134+ typ = typeMap[typ.ref];
135+ }
136+ if (Array.isArray(typ)) return transformEnum(typ, val);
137+ if (typeof typ === "object") {
138+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
143+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
144+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
145+ : invalidValue(typ, val, key, parent);
146+ }
147+ // Numbers can be parsed by Date but shouldn't be.
148+ if (typ === Date && typeof val !== "number") return transformDate(val);
149+ return transformPrimitive(typ, val);
150+}
151+
152+function cast<T>(val: any, typ: any): T {
153+ return transform(val, typ, jsonToJSProps);
154+}
155+
156+function uncast<T>(val: T, typ: any): any {
157+ return transform(val, typ, jsToJSONProps);
158+}
159+
160+function l(typ: any) {
161+ return { literal: typ };
162+}
163+
164+function a(typ: any) {
165+ return { arrayItems: typ };
166+}
167+
168+function i(typ: any) {
169+ return { integer: typ };
170+}
171+
172+function p(pattern: any) {
173+ return { pattern };
174+}
175+
176+function s(typ: any, min: any, max: any) {
177+ return { string: typ, min, max };
178+}
179+
180+function n(typ: any, min: any, max: any) {
181+ return { number: typ, min, max };
182+}
183+
184+function u(...typs: any[]) {
185+ return { unionMembers: typs };
186+}
187+
188+function o(props: any[], additional: any) {
189+ return { props, additional };
190+}
191+
192+function m(additional: any) {
193+ const props: any[] = [];
194+ return { props, additional };
195+}
196+
197+function r(name: string) {
198+ return { ref: name };
199+}
200+
201+const typeMap: any = {
202+ "TopLevel": o([
203+ { json: "copyWith", js: "copyWith", typ: i(0) },
204+ { json: "name", js: "name", typ: "" },
205+ ], false),
206+};
Test case

test/inputs/json/samples/github-events.json

1 generated file · +28 −4
Melixirdefault / QuickType.ex+28 −4
@@ -2233,6 +2233,12 @@ defmodule Payload do
22332233 def encode_description(value) when is_binary(value), do: value
22342234 def encode_description(_), do: {:error, "Unexpected type when encoding Payload.description"}
22352235
2236+ def decode_distinct_size(value) when is_integer(value), do: value
2237+ def decode_distinct_size(_), do: {:error, "Unexpected type when decoding Payload.distinct_size"}
2238+
2239+ def encode_distinct_size(value) when is_integer(value), do: value
2240+ def encode_distinct_size(_), do: {:error, "Unexpected type when encoding Payload.distinct_size"}
2241+
22362242 def decode_head(value) when is_binary(value), do: value
22372243 def decode_head(_), do: {:error, "Unexpected type when decoding Payload.head"}
22382244
@@ -2245,6 +2251,18 @@ defmodule Payload do
22452251 def encode_master_branch(value) when is_binary(value), do: value
22462252 def encode_master_branch(_), do: {:error, "Unexpected type when encoding Payload.master_branch"}
22472253
2254+ def decode_number(value) when is_integer(value), do: value
2255+ def decode_number(_), do: {:error, "Unexpected type when decoding Payload.number"}
2256+
2257+ def encode_number(value) when is_integer(value), do: value
2258+ def encode_number(_), do: {:error, "Unexpected type when encoding Payload.number"}
2259+
2260+ def decode_push_id(value) when is_integer(value), do: value
2261+ def decode_push_id(_), do: {:error, "Unexpected type when decoding Payload.push_id"}
2262+
2263+ def encode_push_id(value) when is_integer(value), do: value
2264+ def encode_push_id(_), do: {:error, "Unexpected type when encoding Payload.push_id"}
2265+
22482266 def decode_pusher_type(value) when is_binary(value), do: value
22492267 def decode_pusher_type(_), do: {:error, "Unexpected type when decoding Payload.pusher_type"}
22502268
@@ -2263,6 +2281,12 @@ defmodule Payload do
22632281 def encode_ref_type(value) when is_binary(value), do: value
22642282 def encode_ref_type(_), do: {:error, "Unexpected type when encoding Payload.ref_type"}
22652283
2284+ def decode_size(value) when is_integer(value), do: value
2285+ def decode_size(_), do: {:error, "Unexpected type when decoding Payload.size"}
2286+
2287+ def encode_size(value) when is_integer(value), do: value
2288+ def encode_size(_), do: {:error, "Unexpected type when encoding Payload.size"}
2289+
22662290 def from_map(m) do
22672291 %Payload{
22682292 action: m["action"] && decode_action(m["action"]),
@@ -2270,17 +2294,17 @@ defmodule Payload do
22702294 comment: m["comment"] && Comment.from_map(m["comment"]),
22712295 commits: m["commits"] && Enum.map(m["commits"], &Commit.from_map/1),
22722296 description: m["description"] && decode_description(m["description"]),
2273- distinct_size: m["distinct_size"],
2297+ distinct_size: m["distinct_size"] && decode_distinct_size(m["distinct_size"]),
22742298 head: m["head"] && decode_head(m["head"]),
22752299 issue: m["issue"] && Issue.from_map(m["issue"]),
22762300 master_branch: m["master_branch"] && decode_master_branch(m["master_branch"]),
2277- number: m["number"],
2301+ number: m["number"] && decode_number(m["number"]),
22782302 pull_request: m["pull_request"] && PayloadPullRequest.from_map(m["pull_request"]),
2279- push_id: m["push_id"],
2303+ push_id: m["push_id"] && decode_push_id(m["push_id"]),
22802304 pusher_type: m["pusher_type"] && decode_pusher_type(m["pusher_type"]),
22812305 ref: m["ref"] && decode_ref(m["ref"]),
22822306 ref_type: m["ref_type"] && decode_ref_type(m["ref_type"]),
2283- size: m["size"],
2307+ size: m["size"] && decode_size(m["size"]),
22842308 }
22852309 end
Test case

test/inputs/json/samples/objc-control-characters.json

37 generated files · +2,844 −0
Acjsondefault / TopLevel.c+131 −0
@@ -0,0 +1,131 @@
1+/**
2+ * TopLevel.c
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ */
5+
6+#include "TopLevel.h"
7+
8+struct TopLevel * cJSON_ParseTopLevel(const char * s) {
9+ struct TopLevel * x = NULL;
10+ if (NULL != s) {
11+ cJSON * j = cJSON_Parse(s);
12+ if (NULL != j) {
13+ x = cJSON_GetTopLevelValue(j);
14+ cJSON_Delete(j);
15+ }
16+ }
17+ return x;
18+}
19+
20+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
21+ struct TopLevel * x = NULL;
22+ if (NULL != j) {
23+ if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
24+ memset(x, 0, sizeof(struct TopLevel));
25+ if (!cJSON_HasObjectItem(j, "c0\000\001\033\037")) { cJSON_DeleteTopLevel(x); return NULL; }
26+ if (cJSON_HasObjectItem(j, "c0\000\001\033\037")) {
27+ if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "c0\000\001\033\037"))) { cJSON_DeleteTopLevel(x); return NULL; }
28+ x->c0 = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "c0\000\001\033\037")));
29+ }
30+ else {
31+ if (NULL != (x->c0 = cJSON_malloc(sizeof(char)))) {
32+ x->c0[0] = '\0';
33+ }
34+ }
35+ if (!cJSON_HasObjectItem(j, "\177\302\200\302\205\302\237")) { cJSON_DeleteTopLevel(x); return NULL; }
36+ if (cJSON_HasObjectItem(j, "\177\302\200\302\205\302\237")) {
37+ if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "\177\302\200\302\205\302\237"))) { cJSON_DeleteTopLevel(x); return NULL; }
38+ x->empty = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "\177\302\200\302\205\302\237")));
39+ }
40+ else {
41+ if (NULL != (x->empty = cJSON_malloc(sizeof(char)))) {
42+ x->empty[0] = '\0';
43+ }
44+ }
45+ if (!cJSON_HasObjectItem(j, "\U0001f600")) { cJSON_DeleteTopLevel(x); return NULL; }
46+ if (cJSON_HasObjectItem(j, "\U0001f600")) {
47+ if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "\U0001f600"))) { cJSON_DeleteTopLevel(x); return NULL; }
48+ x->top_level = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "\U0001f600")));
49+ }
50+ else {
51+ if (NULL != (x->top_level = cJSON_malloc(sizeof(char)))) {
52+ x->top_level[0] = '\0';
53+ }
54+ }
55+ if (!cJSON_HasObjectItem(j, "\\033")) { cJSON_DeleteTopLevel(x); return NULL; }
56+ if (cJSON_HasObjectItem(j, "\\033")) {
57+ if (!cJSON_IsString(cJSON_GetObjectItemCaseSensitive(j, "\\033"))) { cJSON_DeleteTopLevel(x); return NULL; }
58+ x->u001_b = strdup(cJSON_GetStringValue(cJSON_GetObjectItemCaseSensitive(j, "\\033")));
59+ }
60+ else {
61+ if (NULL != (x->u001_b = cJSON_malloc(sizeof(char)))) {
62+ x->u001_b[0] = '\0';
63+ }
64+ }
65+ }
66+ }
67+ return x;
68+}
69+
70+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
71+ cJSON * j = NULL;
72+ if (NULL != x) {
73+ if (NULL != (j = cJSON_CreateObject())) {
74+ if (NULL != x->c0) {
75+ cJSON_AddStringToObject(j, "c0\000\001\033\037", x->c0);
76+ }
77+ else {
78+ cJSON_AddStringToObject(j, "c0\000\001\033\037", "");
79+ }
80+ if (NULL != x->empty) {
81+ cJSON_AddStringToObject(j, "\177\302\200\302\205\302\237", x->empty);
82+ }
83+ else {
84+ cJSON_AddStringToObject(j, "\177\302\200\302\205\302\237", "");
85+ }
86+ if (NULL != x->top_level) {
87+ cJSON_AddStringToObject(j, "\U0001f600", x->top_level);
88+ }
89+ else {
90+ cJSON_AddStringToObject(j, "\U0001f600", "");
91+ }
92+ if (NULL != x->u001_b) {
93+ cJSON_AddStringToObject(j, "\\033", x->u001_b);
94+ }
95+ else {
96+ cJSON_AddStringToObject(j, "\\033", "");
97+ }
98+ }
99+ }
100+ return j;
101+}
102+
103+char * cJSON_PrintTopLevel(const struct TopLevel * x) {
104+ char * s = NULL;
105+ if (NULL != x) {
106+ cJSON * j = cJSON_CreateTopLevel(x);
107+ if (NULL != j) {
108+ s = cJSON_Print(j);
109+ cJSON_Delete(j);
110+ }
111+ }
112+ return s;
113+}
114+
115+void cJSON_DeleteTopLevel(struct TopLevel * x) {
116+ if (NULL != x) {
117+ if (NULL != x->c0) {
118+ cJSON_free(x->c0);
119+ }
120+ if (NULL != x->empty) {
121+ cJSON_free(x->empty);
122+ }
123+ if (NULL != x->top_level) {
124+ cJSON_free(x->top_level);
125+ }
126+ if (NULL != x->u001_b) {
127+ cJSON_free(x->u001_b);
128+ }
129+ cJSON_free(x);
130+ }
131+}
Acjsondefault / TopLevel.h+58 −0
@@ -0,0 +1,58 @@
1+/**
2+ * TopLevel.h
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ * This file depends of https://github.com/DaveGamble/cJSON, https://github.com/joelguittet/c-list and https://github.com/joelguittet/c-hashtable
5+ * To parse json data from json string use the following: struct <type> * data = cJSON_Parse<type>(<string>);
6+ * To get json data from cJSON object use the following: struct <type> * data = cJSON_Get<type>Value(<cjson>);
7+ * To get cJSON object from json data use the following: cJSON * cjson = cJSON_Create<type>(<data>);
8+ * To print json string from json data use the following: char * string = cJSON_Print<type>(<data>);
9+ * To delete json data use the following: cJSON_Delete<type>(<data>);
10+ */
11+
12+#ifndef __TOPLEVEL_H__
13+#define __TOPLEVEL_H__
14+
15+#ifdef __cplusplus
16+extern "C" {
17+#endif
18+
19+#include <stdint.h>
20+#include <stdbool.h>
21+#include <stdlib.h>
22+#include <string.h>
23+#include <regex.h>
24+#include <cJSON.h>
25+#include <hashtable.h>
26+#include <list.h>
27+
28+#define quicktype_cJSON_Duplicate(j) cJSON_Duplicate(j, true)
29+#define cJSON_Integer (1 << 18)
30+#define quicktype_cJSON_IsInteger(j) (cJSON_IsNumber(j) && (j)->valuedouble == (int64_t)(j)->valuedouble)
31+#ifndef cJSON_Bool
32+#define cJSON_Bool (cJSON_True | cJSON_False)
33+#endif
34+#ifndef cJSON_Map
35+#define cJSON_Map (1 << 16)
36+#endif
37+#ifndef cJSON_Enum
38+#define cJSON_Enum (1 << 17)
39+#endif
40+
41+struct TopLevel {
42+ char * c0;
43+ char * empty;
44+ char * top_level;
45+ char * u001_b;
46+};
47+
48+struct TopLevel * cJSON_ParseTopLevel(const char * s);
49+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j);
50+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x);
51+char * cJSON_PrintTopLevel(const struct TopLevel * x);
52+void cJSON_DeleteTopLevel(struct TopLevel * x);
53+
54+#ifdef __cplusplus
55+}
56+#endif
57+
58+#endif /* __TOPLEVEL_H__ */
Acplusplusdefault / quicktype.hpp+83 −0
@@ -0,0 +1,83 @@
1+// To parse this JSON data, first install
2+//
3+// json.hpp https://github.com/nlohmann/json
4+//
5+// Then include this file, and then do
6+//
7+// TopLevel data = nlohmann::json::parse(jsonString);
8+
9+#pragma once
10+
11+#include "json.hpp"
12+
13+#include <optional>
14+#include <stdexcept>
15+#include <regex>
16+
17+namespace quicktype {
18+ using nlohmann::json;
19+
20+ #ifndef NLOHMANN_UNTYPED_quicktype_HELPER
21+ #define NLOHMANN_UNTYPED_quicktype_HELPER
22+ inline json get_untyped(const json & j, const char * property) {
23+ if (j.find(property) != j.end()) {
24+ return j.at(property).get<json>();
25+ }
26+ return json();
27+ }
28+
29+ inline json get_untyped(const json & j, std::string property) {
30+ return get_untyped(j, property.data());
31+ }
32+ #endif
33+
34+ class TopLevel {
35+ public:
36+ TopLevel() = default;
37+ virtual ~TopLevel() = default;
38+
39+ private:
40+ std::string c0;
41+ std::string empty;
42+ std::string top_level;
43+ std::string u001_b;
44+
45+ public:
46+ const std::string & get_c0() const { return c0; }
47+ std::string & get_mutable_c0() { return c0; }
48+ void set_c0(const std::string & value) { this->c0 = value; }
49+
50+ const std::string & get_empty() const { return empty; }
51+ std::string & get_mutable_empty() { return empty; }
52+ void set_empty(const std::string & value) { this->empty = value; }
53+
54+ const std::string & get_top_level() const { return top_level; }
55+ std::string & get_mutable_top_level() { return top_level; }
56+ void set_top_level(const std::string & value) { this->top_level = value; }
57+
58+ const std::string & get_u001_b() const { return u001_b; }
59+ std::string & get_mutable_u001_b() { return u001_b; }
60+ void set_u001_b(const std::string & value) { this->u001_b = value; }
61+ };
62+}
63+
64+namespace quicktype {
65+ void from_json(const json & j, TopLevel & x);
66+ void to_json(json & j, const TopLevel & x);
67+
68+ inline void from_json(const json & j, TopLevel& x) {
69+ if (!j.is_object()) throw std::runtime_error("Expected object");
70+ x.set_c0(j.at(([] { constexpr auto &s = "c0\u0000\u0001\u001b\u001f"; return std::string(s, sizeof(s) / sizeof(s[0]) - 1); }())).get<std::string>());
71+ x.set_empty(j.at("\u007f\u0080\u0085\u009f").get<std::string>());
72+ x.set_top_level(j.at("\U0001f600").get<std::string>());
73+ x.set_u001_b(j.at("\\u001b").get<std::string>());
74+ }
75+
76+ inline void to_json(json & j, const TopLevel & x) {
77+ j = json::object();
78+ j[([] { constexpr auto &s = "c0\u0000\u0001\u001b\u001f"; return std::string(s, sizeof(s) / sizeof(s[0]) - 1); }())] = x.get_c0();
79+ j["\u007f\u0080\u0085\u009f"] = x.get_empty();
80+ j["\U0001f600"] = x.get_top_level();
81+ j["\\u001b"] = x.get_u001_b();
82+ }
83+}
Acrystaldefault / TopLevel.cr+17 −0
@@ -0,0 +1,17 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ @[JSON::Field(key: "c0\u{0000}\u{0001}\u{001b}\u{001f}")]
7+ property c0 : String
8+
9+ @[JSON::Field(key: "\u{007f}\u{0080}\u{0085}\u{009f}")]
10+ property empty : String
11+
12+ @[JSON::Field(key: "\u{01f600}")]
13+ property top_level : String
14+
15+ @[JSON::Field(key: "\\u001b")]
16+ property u001_b : String
17+end
Acsharp-recordsdefault / QuickType.cs+70 −0
@@ -0,0 +1,70 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial record TopLevel
27+ {
28+ [JsonProperty("c0\u0000\u0001\u001b\u001f", Required = Required.Always)]
29+ public string C0 { get; set; }
30+
31+ [JsonProperty("\u007f\u0080\u0085\u009f", Required = Required.Always)]
32+ public string Empty { get; set; }
33+
34+ [JsonProperty("\ud83d\ude00", Required = Required.Always)]
35+ public string Purple { get; set; }
36+
37+ [JsonProperty("\\u001b", Required = Required.Always)]
38+ public string U001B { get; set; }
39+ }
40+
41+ public partial record TopLevel
42+ {
43+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
44+ }
45+
46+ public static partial class Serialize
47+ {
48+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
49+ }
50+
51+ internal static partial class Converter
52+ {
53+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
54+ {
55+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
56+ DateParseHandling = DateParseHandling.None,
57+ Converters =
58+ {
59+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
60+ },
61+ };
62+ }
63+}
64+#pragma warning restore CS8618
65+#pragma warning restore CS8601
66+#pragma warning restore CS8602
67+#pragma warning restore CS8603
68+#pragma warning restore CS8604
69+#pragma warning restore CS8625
70+#pragma warning restore CS8765
Acsharp-SystemTextJsondefault / QuickType.cs+178 −0
@@ -0,0 +1,178 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'System.Text.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+
14+namespace QuickType
15+{
16+ using System;
17+ using System.Collections.Generic;
18+
19+ using System.Text.Json;
20+ using System.Text.Json.Serialization;
21+ using System.Globalization;
22+
23+ public partial class TopLevel
24+ {
25+ [JsonRequired]
26+ [JsonPropertyName("c0\u0000\u0001\u001b\u001f")]
27+ public string C0 { get; set; }
28+
29+ [JsonRequired]
30+ [JsonPropertyName("\u007f\u0080\u0085\u009f")]
31+ public string Empty { get; set; }
32+
33+ [JsonRequired]
34+ [JsonPropertyName("\ud83d\ude00")]
35+ public string Purple { get; set; }
36+
37+ [JsonRequired]
38+ [JsonPropertyName("\\u001b")]
39+ public string U001B { get; set; }
40+ }
41+
42+ public partial class TopLevel
43+ {
44+ public static TopLevel FromJson(string json) => global::System.Text.Json.JsonSerializer.Deserialize<TopLevel>(json, QuickType.Converter.Settings);
45+ }
46+
47+ public static partial class Serialize
48+ {
49+ public static string ToJson(this TopLevel self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings);
50+ }
51+
52+ internal static partial class Converter
53+ {
54+ public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
55+ {
56+ Converters =
57+ {
58+ new DateOnlyConverter(),
59+ new TimeOnlyConverter(),
60+ IsoDateTimeOffsetConverter.Singleton
61+ },
62+ };
63+ }
64+
65+ public class DateOnlyConverter : JsonConverter<DateOnly>
66+ {
67+ private readonly string serializationFormat;
68+ public DateOnlyConverter() : this(null) { }
69+
70+ public DateOnlyConverter(string? serializationFormat)
71+ {
72+ this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
73+ }
74+
75+ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
76+ {
77+ var value = reader.GetString();
78+ return DateOnly.Parse(value!);
79+ }
80+
81+ public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
82+ => writer.WriteStringValue(value.ToString(serializationFormat));
83+ }
84+
85+ public class TimeOnlyConverter : JsonConverter<TimeOnly>
86+ {
87+ private readonly string serializationFormat;
88+
89+ public TimeOnlyConverter() : this(null) { }
90+
91+ public TimeOnlyConverter(string? serializationFormat)
92+ {
93+ this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
94+ }
95+
96+ public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
97+ {
98+ var value = reader.GetString();
99+ return TimeOnly.Parse(value!);
100+ }
101+
102+ public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
103+ => writer.WriteStringValue(value.ToString(serializationFormat));
104+ }
105+
106+ internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
107+ {
108+ public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
109+
110+ private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
111+
112+ private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
113+ private string? _dateTimeFormat;
114+ private CultureInfo? _culture;
115+
116+ public DateTimeStyles DateTimeStyles
117+ {
118+ get => _dateTimeStyles;
119+ set => _dateTimeStyles = value;
120+ }
121+
122+ public string? DateTimeFormat
123+ {
124+ get => _dateTimeFormat ?? string.Empty;
125+ set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
126+ }
127+
128+ public CultureInfo Culture
129+ {
130+ get => _culture ?? CultureInfo.CurrentCulture;
131+ set => _culture = value;
132+ }
133+
134+ public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
135+ {
136+ string text;
137+
138+
139+ if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
140+ || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
141+ {
142+ value = value.ToUniversalTime();
143+ }
144+
145+ text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
146+
147+ writer.WriteStringValue(text);
148+ }
149+
150+ public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
151+ {
152+ string? dateText = reader.GetString();
153+
154+ if (string.IsNullOrEmpty(dateText) == false)
155+ {
156+ if (!string.IsNullOrEmpty(_dateTimeFormat))
157+ {
158+ return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
159+ }
160+ else
161+ {
162+ return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
163+ }
164+ }
165+ else
166+ {
167+ return default(DateTimeOffset);
168+ }
169+ }
170+
171+
172+ public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
173+ }
174+}
175+#pragma warning restore CS8618
176+#pragma warning restore CS8601
177+#pragma warning restore CS8602
178+#pragma warning restore CS8603
Acsharpdefault / QuickType.cs+70 −0
@@ -0,0 +1,70 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial class TopLevel
27+ {
28+ [JsonProperty("c0\u0000\u0001\u001b\u001f", Required = Required.Always)]
29+ public string C0 { get; set; }
30+
31+ [JsonProperty("\u007f\u0080\u0085\u009f", Required = Required.Always)]
32+ public string Empty { get; set; }
33+
34+ [JsonProperty("\ud83d\ude00", Required = Required.Always)]
35+ public string Purple { get; set; }
36+
37+ [JsonProperty("\\u001b", Required = Required.Always)]
38+ public string U001B { get; set; }
39+ }
40+
41+ public partial class TopLevel
42+ {
43+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
44+ }
45+
46+ public static partial class Serialize
47+ {
48+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
49+ }
50+
51+ internal static partial class Converter
52+ {
53+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
54+ {
55+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
56+ DateParseHandling = DateParseHandling.None,
57+ Converters =
58+ {
59+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
60+ },
61+ };
62+ }
63+}
64+#pragma warning restore CS8618
65+#pragma warning restore CS8601
66+#pragma warning restore CS8602
67+#pragma warning restore CS8603
68+#pragma warning restore CS8604
69+#pragma warning restore CS8625
70+#pragma warning restore CS8765
Adartdefault / TopLevel.dart+37 −0
@@ -0,0 +1,37 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final String c0;
13+ final String empty;
14+ final String topLevel;
15+ final String u001B;
16+
17+ TopLevel({
18+ required this.c0,
19+ required this.empty,
20+ required this.topLevel,
21+ required this.u001B,
22+ });
23+
24+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
25+ c0: json["c0\u0000\u0001\u001b\u001f"],
26+ empty: json["\u007f\u0080\u0085\u009f"],
27+ topLevel: json["\ud83d\ude00"],
28+ u001B: json["\\u001b"],
29+ );
30+
31+ Map<String, dynamic> toJson() => {
32+ "c0\u0000\u0001\u001b\u001f": c0,
33+ "\u007f\u0080\u0085\u009f": empty,
34+ "\ud83d\ude00": topLevel,
35+ "\\u001b": u001B,
36+ };
37+}
Aelixirdefault / QuickType.ex+72 −0
@@ -0,0 +1,72 @@
1+# This file was autogenerated using quicktype https://github.com/quicktype/quicktype
2+#
3+# Add Jason to your mix.exs
4+#
5+# Decode a JSON string: TopLevel.from_json(data)
6+# Encode into a JSON string: TopLevel.to_json(struct)
7+
8+defmodule TopLevel do
9+ @enforce_keys [:c0, :empty, :top_level, :u001_b]
10+ defstruct [:c0, :empty, :top_level, :u001_b]
11+
12+ @type t :: %__MODULE__{
13+ c0: String.t(),
14+ empty: String.t(),
15+ top_level: String.t(),
16+ u001_b: String.t()
17+ }
18+
19+ def decode_c0(value) when is_binary(value), do: value
20+ def decode_c0(_), do: {:error, "Unexpected type when decoding TopLevel.c0"}
21+
22+ def encode_c0(value) when is_binary(value), do: value
23+ def encode_c0(_), do: {:error, "Unexpected type when encoding TopLevel.c0"}
24+
25+ def decode_empty(value) when is_binary(value), do: value
26+ def decode_empty(_), do: {:error, "Unexpected type when decoding TopLevel.empty"}
27+
28+ def encode_empty(value) when is_binary(value), do: value
29+ def encode_empty(_), do: {:error, "Unexpected type when encoding TopLevel.empty"}
30+
31+ def decode_top_level(value) when is_binary(value), do: value
32+ def decode_top_level(_), do: {:error, "Unexpected type when decoding TopLevel.top_level"}
33+
34+ def encode_top_level(value) when is_binary(value), do: value
35+ def encode_top_level(_), do: {:error, "Unexpected type when encoding TopLevel.top_level"}
36+
37+ def decode_u001_b(value) when is_binary(value), do: value
38+ def decode_u001_b(_), do: {:error, "Unexpected type when decoding TopLevel.u001_b"}
39+
40+ def encode_u001_b(value) when is_binary(value), do: value
41+ def encode_u001_b(_), do: {:error, "Unexpected type when encoding TopLevel.u001_b"}
42+
43+ def from_map(m) do
44+ %TopLevel{
45+ c0: decode_c0(m["c0"]),
46+ empty: decode_empty(m["€…Ÿ"]),
47+ top_level: decode_top_level(m["😀"]),
48+ u001_b: decode_u001_b(m["\u001b"]),
49+ }
50+ end
51+
52+ def from_json(json) do
53+ json
54+ |> Jason.decode!()
55+ |> from_map()
56+ end
57+
58+ def to_map(struct) do
59+ %{
60+ "c0\u{0}\u{1}\u{1b}\u{1f}" => struct.c0,
61+ "\u{7f}\u{80}\u{85}\u{9f}" => struct.empty,
62+ "\u{1f600}" => struct.top_level,
63+ "\\u001b" => struct.u001_b,
64+ }
65+ end
66+
67+ def to_json(struct) do
68+ struct
69+ |> to_map()
70+ |> Jason.encode!()
71+ end
72+end
Aelmdefault / QuickType.elm+66 −0
@@ -0,0 +1,66 @@
1+-- To decode the JSON data, add this file to your project, run
2+--
3+-- elm install NoRedInk/elm-json-decode-pipeline
4+--
5+-- add these imports
6+--
7+-- import Json.Decode exposing (decodeString)
8+-- import QuickType exposing (quickType)
9+--
10+-- and you're off to the races with
11+--
12+-- decodeString quickType myJsonString
13+
14+module QuickType exposing
15+ ( QuickType
16+ , quickTypeToString
17+ , quickType
18+ )
19+
20+import Json.Decode as Jdec
21+import Json.Decode.Pipeline as Jpipe
22+import Json.Encode as Jenc
23+import Dict exposing (Dict)
24+
25+type alias QuickType =
26+ { c0 : String
27+ , empty : String
28+ , quickType : String
29+ , u001B : String
30+ }
31+
32+-- decoders and encoders
33+optionalField key decoder fallback =
34+ Jdec.dict Jdec.value
35+ |> Jdec.andThen (\m ->
36+ case Dict.get key m of
37+ Nothing -> Jdec.succeed fallback
38+ Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
39+
40+quickTypeToString : QuickType -> String
41+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
42+
43+quickType : Jdec.Decoder QuickType
44+quickType =
45+ Jdec.succeed QuickType
46+ |> Jpipe.required "c0\u{0000}\u{0001}\u{001B}\u{001F}" Jdec.string
47+ |> Jpipe.required "\u{007F}\u{0080}\u{0085}\u{009F}" Jdec.string
48+ |> Jpipe.required "\u{1F600}" Jdec.string
49+ |> Jpipe.required "\\u001b" Jdec.string
50+
51+encodeQuickType : QuickType -> Jenc.Value
52+encodeQuickType x =
53+ Jenc.object
54+ [ ("c0\u{0000}\u{0001}\u{001B}\u{001F}", Jenc.string x.c0)
55+ , ("\u{007F}\u{0080}\u{0085}\u{009F}", Jenc.string x.empty)
56+ , ("\u{1F600}", Jenc.string x.quickType)
57+ , ("\\u001b", Jenc.string x.u001B)
58+ ]
59+
60+--- encoder helpers
61+
62+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
63+makeNullableEncoder f m =
64+ case m of
65+ Just x -> f x
66+ Nothing -> Jenc.null
Aflowdefault / TopLevel.js+215 −0
@@ -0,0 +1,215 @@
1+// @flow
2+
3+// To parse this data:
4+//
5+// const Convert = require("./TopLevel");
6+//
7+// const topLevel = Convert.toTopLevel(json);
8+//
9+// These functions will throw an error if the JSON doesn't
10+// match the expected interface, even if the JSON is valid.
11+
12+export type TopLevel = {
13+ "\\u001b": string;
14+ "c0\u0000\u0001\u001b\u001f": string;
15+ "\u007f\u0080\u0085\u009f": string;
16+ "\ud83d\ude00": string;
17+};
18+
19+// Converts JSON strings to/from your types
20+// and asserts the results of JSON.parse at runtime
21+function toTopLevel(json: string): TopLevel {
22+ return cast(JSON.parse(json), r("TopLevel"));
23+}
24+
25+function topLevelToJson(value: TopLevel): string {
26+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
27+}
28+
29+function invalidValue(typ: any, val: any, key: any, parent: any = '') {
30+ const prettyTyp = prettyTypeName(typ);
31+ const parentText = parent ? ` on ${parent}` : '';
32+ const keyText = key ? ` for key "${key}"` : '';
33+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
34+}
35+
36+function prettyTypeName(typ: any): string {
37+ if (Array.isArray(typ)) {
38+ if (typ.length === 2 && typ[0] === undefined) {
39+ return `an optional ${prettyTypeName(typ[1])}`;
40+ } else {
41+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
42+ }
43+ } else if (typeof typ === "object" && typ.literal !== undefined) {
44+ return typ.literal;
45+ } else {
46+ return typeof typ;
47+ }
48+}
49+
50+function jsonToJSProps(typ: any): any {
51+ if (typ.jsonToJS === undefined) {
52+ const map: any = {};
53+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
54+ typ.jsonToJS = map;
55+ }
56+ return typ.jsonToJS;
57+}
58+
59+function jsToJSONProps(typ: any): any {
60+ if (typ.jsToJSON === undefined) {
61+ const map: any = {};
62+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
63+ typ.jsToJSON = map;
64+ }
65+ return typ.jsToJSON;
66+}
67+
68+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
69+ function transformPrimitive(typ: string, val: any): any {
70+ if (typeof typ === typeof val) return val;
71+ return invalidValue(typ, val, key, parent);
72+ }
73+
74+ function transformUnion(typs: any[], val: any): any {
75+ // val must validate against one typ in typs
76+ const l = typs.length;
77+ for (let i = 0; i < l; i++) {
78+ const typ = typs[i];
79+ try {
80+ return transform(val, typ, getProps);
81+ } catch (_) {}
82+ }
83+ return invalidValue(typs, val, key, parent);
84+ }
85+
86+ function transformEnum(cases: string[], val: any): any {
87+ if (cases.indexOf(val) !== -1) return val;
88+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
89+ }
90+
91+ function transformArray(typ: any, val: any): any {
92+ // val must be an array with no invalid elements
93+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
94+
95+ return val.map(el => transform(el, typ, getProps));
96+ }
97+
98+ function transformDate(val: any): any {
99+ if (val === null) {
100+ return null;
101+ }
102+ const d = new Date(val);
103+ if (isNaN(d.valueOf())) {
104+ return invalidValue(l("Date"), val, key, parent);
105+ }
106+ return d;
107+ }
108+
109+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
110+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
111+ return invalidValue(l(ref || "object"), val, key, parent);
112+ }
113+ const result: any = {};
114+ Object.getOwnPropertyNames(props).forEach(key => {
115+ const prop = props[key];
116+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
117+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
118+ });
119+ Object.getOwnPropertyNames(val).forEach(key => {
120+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
121+ result[key] = transform(val[key], additional, getProps, key, ref);
122+ }
123+ });
124+ return result;
125+ }
126+
127+ if (typ === "any") return val;
128+ if (typ === null) {
129+ if (val === null) return val;
130+ return invalidValue(typ, val, key, parent);
131+ }
132+ if (typ === false) return invalidValue(typ, val, key, parent);
133+ let ref: any = undefined;
134+ while (typeof typ === "object" && typ.ref !== undefined) {
135+ ref = typ.ref;
136+ typ = typeMap[typ.ref];
137+ }
138+ if (Array.isArray(typ)) return transformEnum(typ, val);
139+ if (typeof typ === "object") {
140+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
145+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
146+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
147+ : invalidValue(typ, val, key, parent);
148+ }
149+ // Numbers can be parsed by Date but shouldn't be.
150+ if (typ === Date && typeof val !== "number") return transformDate(val);
151+ return transformPrimitive(typ, val);
152+}
153+
154+function cast<T>(val: any, typ: any): T {
155+ return transform(val, typ, jsonToJSProps);
156+}
157+
158+function uncast<T>(val: T, typ: any): any {
159+ return transform(val, typ, jsToJSONProps);
160+}
161+
162+function l(typ: any) {
163+ return { literal: typ };
164+}
165+
166+function a(typ: any) {
167+ return { arrayItems: typ };
168+}
169+
170+function i(typ: any) {
171+ return { integer: typ };
172+}
173+
174+function p(pattern: any) {
175+ return { pattern };
176+}
177+
178+function s(typ: any, min: any, max: any) {
179+ return { string: typ, min, max };
180+}
181+
182+function n(typ: any, min: any, max: any) {
183+ return { number: typ, min, max };
184+}
185+
186+function u(...typs: any[]) {
187+ return { unionMembers: typs };
188+}
189+
190+function o(props: any[], additional: any) {
191+ return { props, additional };
192+}
193+
194+function m(additional: any) {
195+ const props: any[] = [];
196+ return { props, additional };
197+}
198+
199+function r(name: string) {
200+ return { ref: name };
201+}
202+
203+const typeMap: any = {
204+ "TopLevel": o([
205+ { json: "\\u001b", js: "\\u001b", typ: "" },
206+ { json: "c0\u0000\u0001\u001b\u001f", js: "c0\u0000\u0001\u001b\u001f", typ: "" },
207+ { json: "\u007f\u0080\u0085\u009f", js: "\u007f\u0080\u0085\u009f", typ: "" },
208+ { json: "\ud83d\ude00", js: "\ud83d\ude00", typ: "" },
209+ ], false),
210+};
211+
212+module.exports = {
213+ "topLevelToJson": topLevelToJson,
214+ "toTopLevel": toTopLevel,
215+};
Agolangdefault / quicktype.go+26 −0
@@ -0,0 +1,26 @@
1+// Code generated from JSON Schema using quicktype. DO NOT EDIT.
2+// To parse and unparse this JSON data, add this code to your project and do:
3+//
4+// topLevel, err := UnmarshalTopLevel(bytes)
5+// bytes, err = topLevel.Marshal()
6+
7+package main
8+
9+import "encoding/json"
10+
11+func UnmarshalTopLevel(data []byte) (TopLevel, error) {
12+ var r TopLevel
13+ err := json.Unmarshal(data, &r)
14+ return r, err
15+}
16+
17+func (r *TopLevel) Marshal() ([]byte, error) {
18+ return json.Marshal(r)
19+}
20+
21+type TopLevel struct {
22+ C0 string `json:"c0\u0000\u0001\u001b\u001f"`
23+ Empty string `json:"\u007f\u0080\u0085\u009f"`
24+ TopLevel string `json:"\U0001f600"`
25+ U001B string `json:"\\u001b"`
26+}
Ahaskelldefault / QuickType.hs+39 −0
@@ -0,0 +1,39 @@
1+{-# LANGUAGE StrictData #-}
2+{-# LANGUAGE OverloadedStrings #-}
3+
4+module QuickType
5+ ( QuickType (..)
6+ , decodeTopLevel
7+ ) where
8+
9+import Data.Aeson
10+import Data.Aeson.Types (emptyObject)
11+import Data.ByteString.Lazy (ByteString)
12+import Data.HashMap.Strict (HashMap)
13+import Data.Text (Text)
14+
15+data QuickType = QuickType
16+ { c0QuickType :: Text
17+ , emptyQuickType :: Text
18+ , quickTypeQuickType :: Text
19+ , u001BQuickType :: Text
20+ } deriving (Show)
21+
22+decodeTopLevel :: ByteString -> Maybe QuickType
23+decodeTopLevel = decode
24+
25+instance ToJSON QuickType where
26+ toJSON (QuickType c0QuickType emptyQuickType quickTypeQuickType u001BQuickType) =
27+ object
28+ [ "c0\x0000\&\x0001\&\x001b\&\x001f\&" .= c0QuickType
29+ , "\x007f\&\x0080\&\x0085\&\x009f\&" .= emptyQuickType
30+ , "\x0001f600\&" .= quickTypeQuickType
31+ , "\\x001b\&" .= u001BQuickType
32+ ]
33+
34+instance FromJSON QuickType where
35+ parseJSON (Object v) = QuickType
36+ <$> v .: "c0\x0000\&\x0001\&\x001b\&\x001f\&"
37+ <*> v .: "\x007f\&\x0080\&\x0085\&\x009f\&"
38+ <*> v .: "\x0001f600\&"
39+ <*> v .: "\\x001b\&"
Ajava-datetime-legacydefault / src / main / java / io / quicktype / Converter.java+123 −0
@@ -0,0 +1,123 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+//
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.util.Date;
25+import java.text.SimpleDateFormat;
26+
27+public class Converter {
28+ // Date-time helpers
29+
30+ private static final String[] DATE_TIME_FORMATS = {
31+ "yyyy-MM-dd'T'HH:mm:ss.SX",
32+ "yyyy-MM-dd'T'HH:mm:ss.S",
33+ "yyyy-MM-dd'T'HH:mm:ssX",
34+ "yyyy-MM-dd'T'HH:mm:ss",
35+ "yyyy-MM-dd HH:mm:ss.SX",
36+ "yyyy-MM-dd HH:mm:ss.S",
37+ "yyyy-MM-dd HH:mm:ssX",
38+ "yyyy-MM-dd HH:mm:ss",
39+ "HH:mm:ss.SZ",
40+ "HH:mm:ss.S",
41+ "HH:mm:ssZ",
42+ "HH:mm:ss",
43+ "yyyy-MM-dd",
44+ };
45+
46+ public static Date parseAllDateTimeString(String str) {
47+ str = str.replaceFirst("(\\.\\d{3})\\d+", "$1");
48+ for (String format : DATE_TIME_FORMATS) {
49+ try {
50+ return new SimpleDateFormat(format).parse(str);
51+ } catch (Exception ex) {
52+ // Ignored
53+ }
54+ }
55+ return null;
56+ }
57+
58+ public static String serializeDateTime(Date datetime) {
59+ return new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ").format(datetime);
60+ }
61+
62+ public static String serializeDate(Date datetime) {
63+ return new SimpleDateFormat("yyyy-MM-dd").format(datetime);
64+ }
65+
66+ public static String serializeTime(Date datetime) {
67+ return new SimpleDateFormat("hh:mm:ssZ").format(datetime);
68+ }
69+ // Serialize/deserialize helpers
70+
71+ public static TopLevel fromJsonString(String json) throws IOException {
72+ return getObjectReader().readValue(json);
73+ }
74+
75+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
76+ return getObjectWriter().writeValueAsString(obj);
77+ }
78+
79+ private static ObjectReader reader;
80+ private static ObjectWriter writer;
81+
82+ private static void instantiateMapper() {
83+ ObjectMapper mapper = new ObjectMapper();
84+ mapper.findAndRegisterModules();
85+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
86+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
87+ SimpleModule module = new SimpleModule();
88+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
89+ @Override
90+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
91+ String value = jsonParser.getText();
92+ return Converter.parseAllDateTimeString(value);
93+ }
94+ });
95+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
96+ @Override
97+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
98+ String value = jsonParser.getText();
99+ return Converter.parseAllDateTimeString(value);
100+ }
101+ });
102+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
103+ @Override
104+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
105+ String value = jsonParser.getText();
106+ return Converter.parseAllDateTimeString(value);
107+ }
108+ });
109+ mapper.registerModule(module);
110+ reader = mapper.readerFor(TopLevel.class);
111+ writer = mapper.writerFor(TopLevel.class);
112+ }
113+
114+ private static ObjectReader getObjectReader() {
115+ if (reader == null) instantiateMapper();
116+ return reader;
117+ }
118+
119+ private static ObjectWriter getObjectWriter() {
120+ if (writer == null) instantiateMapper();
121+ return writer;
122+ }
123+}
Ajava-datetime-legacydefault / src / main / java / io / quicktype / TopLevel.java+30 −0
@@ -0,0 +1,30 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private String c0;
7+ private String empty;
8+ private String topLevel;
9+ private String u001B;
10+
11+ @JsonProperty("c0")
12+ public String getC0() { return c0; }
13+ @JsonProperty("c0")
14+ public void setC0(String value) { this.c0 = value; }
15+
16+ @JsonProperty("\u0080\u0085\u009f")
17+ public String getEmpty() { return empty; }
18+ @JsonProperty("\u0080\u0085\u009f")
19+ public void setEmpty(String value) { this.empty = value; }
20+
21+ @JsonProperty("\ud83d\ude00")
22+ public String getTopLevel() { return topLevel; }
23+ @JsonProperty("\ud83d\ude00")
24+ public void setTopLevel(String value) { this.topLevel = value; }
25+
26+ @JsonProperty("\\u001b")
27+ public String getU001B() { return u001B; }
28+ @JsonProperty("\\u001b")
29+ public void setU001B(String value) { this.u001B = value; }
30+}
Ajava-lombokdefault / src / main / java / io / quicktype / Converter.java+102 −0
@@ -0,0 +1,102 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
80+ SimpleModule module = new SimpleModule();
81+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
82+ @Override
83+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
84+ String value = jsonParser.getText();
85+ return Converter.parseDateTimeString(value);
86+ }
87+ });
88+ mapper.registerModule(module);
89+ reader = mapper.readerFor(TopLevel.class);
90+ writer = mapper.writerFor(TopLevel.class);
91+ }
92+
93+ private static ObjectReader getObjectReader() {
94+ if (reader == null) instantiateMapper();
95+ return reader;
96+ }
97+
98+ private static ObjectWriter getObjectWriter() {
99+ if (writer == null) instantiateMapper();
100+ return writer;
101+ }
102+}
Ajava-lombokdefault / src / main / java / io / quicktype / TopLevel.java+30 −0
@@ -0,0 +1,30 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private String c0;
7+ private String empty;
8+ private String topLevel;
9+ private String u001B;
10+
11+ @JsonProperty("c0")
12+ public String getC0() { return c0; }
13+ @JsonProperty("c0")
14+ public void setC0(String value) { this.c0 = value; }
15+
16+ @JsonProperty("\u0080\u0085\u009f")
17+ public String getEmpty() { return empty; }
18+ @JsonProperty("\u0080\u0085\u009f")
19+ public void setEmpty(String value) { this.empty = value; }
20+
21+ @JsonProperty("\ud83d\ude00")
22+ public String getTopLevel() { return topLevel; }
23+ @JsonProperty("\ud83d\ude00")
24+ public void setTopLevel(String value) { this.topLevel = value; }
25+
26+ @JsonProperty("\\u001b")
27+ public String getU001B() { return u001B; }
28+ @JsonProperty("\\u001b")
29+ public void setU001B(String value) { this.u001B = value; }
30+}
Ajavadefault / src / main / java / io / quicktype / Converter.java+102 −0
@@ -0,0 +1,102 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
80+ SimpleModule module = new SimpleModule();
81+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
82+ @Override
83+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
84+ String value = jsonParser.getText();
85+ return Converter.parseDateTimeString(value);
86+ }
87+ });
88+ mapper.registerModule(module);
89+ reader = mapper.readerFor(TopLevel.class);
90+ writer = mapper.writerFor(TopLevel.class);
91+ }
92+
93+ private static ObjectReader getObjectReader() {
94+ if (reader == null) instantiateMapper();
95+ return reader;
96+ }
97+
98+ private static ObjectWriter getObjectWriter() {
99+ if (writer == null) instantiateMapper();
100+ return writer;
101+ }
102+}
Ajavadefault / src / main / java / io / quicktype / TopLevel.java+30 −0
@@ -0,0 +1,30 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private String c0;
7+ private String empty;
8+ private String topLevel;
9+ private String u001B;
10+
11+ @JsonProperty("c0")
12+ public String getC0() { return c0; }
13+ @JsonProperty("c0")
14+ public void setC0(String value) { this.c0 = value; }
15+
16+ @JsonProperty("\u0080\u0085\u009f")
17+ public String getEmpty() { return empty; }
18+ @JsonProperty("\u0080\u0085\u009f")
19+ public void setEmpty(String value) { this.empty = value; }
20+
21+ @JsonProperty("\ud83d\ude00")
22+ public String getTopLevel() { return topLevel; }
23+ @JsonProperty("\ud83d\ude00")
24+ public void setTopLevel(String value) { this.topLevel = value; }
25+
26+ @JsonProperty("\\u001b")
27+ public String getU001B() { return u001B; }
28+ @JsonProperty("\\u001b")
29+ public void setU001B(String value) { this.u001B = value; }
30+}
Ajavascript-prop-typesdefault / toplevel.js+23 −0
@@ -0,0 +1,23 @@
1+// Example usage:
2+//
3+// import { MyShape } from ./myShape.js;
4+//
5+// class MyComponent extends React.Component {
6+// //
7+// }
8+//
9+// MyComponent.propTypes = {
10+// input: MyShape
11+// };
12+
13+import PropTypes from "prop-types";
14+
15+let _TopLevel;
16+_TopLevel = PropTypes.shape({
17+ "\\u001b": PropTypes.oneOfType([PropTypes.string]).isRequired,
18+ "c0\u0000\u0001\u001b\u001f": PropTypes.oneOfType([PropTypes.string]).isRequired,
19+ "\u007f\u0080\u0085\u009f": PropTypes.oneOfType([PropTypes.string]).isRequired,
20+ "\ud83d\ude00": PropTypes.oneOfType([PropTypes.string]).isRequired,
21+});
22+
23+export const TopLevel = _TopLevel;
Ajavascriptdefault / TopLevel.js+206 −0
@@ -0,0 +1,206 @@
1+// To parse this data:
2+//
3+// const Convert = require("./TopLevel");
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+// Converts JSON strings to/from your types
11+// and asserts the results of JSON.parse at runtime
12+function toTopLevel(json) {
13+ return cast(JSON.parse(json), r("TopLevel"));
14+}
15+
16+function topLevelToJson(value) {
17+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
18+}
19+
20+function invalidValue(typ, val, key, parent = '') {
21+ const prettyTyp = prettyTypeName(typ);
22+ const parentText = parent ? ` on ${parent}` : '';
23+ const keyText = key ? ` for key "${key}"` : '';
24+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
25+}
26+
27+function prettyTypeName(typ) {
28+ if (Array.isArray(typ)) {
29+ if (typ.length === 2 && typ[0] === undefined) {
30+ return `an optional ${prettyTypeName(typ[1])}`;
31+ } else {
32+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
33+ }
34+ } else if (typeof typ === "object" && typ.literal !== undefined) {
35+ return typ.literal;
36+ } else {
37+ return typeof typ;
38+ }
39+}
40+
41+function jsonToJSProps(typ) {
42+ if (typ.jsonToJS === undefined) {
43+ const map = {};
44+ typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
45+ typ.jsonToJS = map;
46+ }
47+ return typ.jsonToJS;
48+}
49+
50+function jsToJSONProps(typ) {
51+ if (typ.jsToJSON === undefined) {
52+ const map = {};
53+ typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
54+ typ.jsToJSON = map;
55+ }
56+ return typ.jsToJSON;
57+}
58+
59+function transform(val, typ, getProps, key = '', parent = '') {
60+ function transformPrimitive(typ, val) {
61+ if (typeof typ === typeof val) return val;
62+ return invalidValue(typ, val, key, parent);
63+ }
64+
65+ function transformUnion(typs, val) {
66+ // val must validate against one typ in typs
67+ const l = typs.length;
68+ for (let i = 0; i < l; i++) {
69+ const typ = typs[i];
70+ try {
71+ return transform(val, typ, getProps);
72+ } catch (_) {}
73+ }
74+ return invalidValue(typs, val, key, parent);
75+ }
76+
77+ function transformEnum(cases, val) {
78+ if (cases.indexOf(val) !== -1) return val;
79+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
80+ }
81+
82+ function transformArray(typ, val) {
83+ // val must be an array with no invalid elements
84+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
85+
86+ return val.map(el => transform(el, typ, getProps));
87+ }
88+
89+ function transformDate(val) {
90+ if (val === null) {
91+ return null;
92+ }
93+ const d = new Date(val);
94+ if (isNaN(d.valueOf())) {
95+ return invalidValue(l("Date"), val, key, parent);
96+ }
97+ return d;
98+ }
99+
100+ function transformObject(props, additional, val) {
101+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
102+ return invalidValue(l(ref || "object"), val, key, parent);
103+ }
104+ const result = {};
105+ Object.getOwnPropertyNames(props).forEach(key => {
106+ const prop = props[key];
107+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
108+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
109+ });
110+ Object.getOwnPropertyNames(val).forEach(key => {
111+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
112+ result[key] = transform(val[key], additional, getProps, key, ref);
113+ }
114+ });
115+ return result;
116+ }
117+
118+ if (typ === "any") return val;
119+ if (typ === null) {
120+ if (val === null) return val;
121+ return invalidValue(typ, val, key, parent);
122+ }
123+ if (typ === false) return invalidValue(typ, val, key, parent);
124+ let ref = undefined;
125+ while (typeof typ === "object" && typ.ref !== undefined) {
126+ ref = typ.ref;
127+ typ = typeMap[typ.ref];
128+ }
129+ if (Array.isArray(typ)) return transformEnum(typ, val);
130+ if (typeof typ === "object") {
131+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
136+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
137+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
138+ : invalidValue(typ, val, key, parent);
139+ }
140+ // Numbers can be parsed by Date but shouldn't be.
141+ if (typ === Date && typeof val !== "number") return transformDate(val);
142+ return transformPrimitive(typ, val);
143+}
144+
145+function cast(val, typ) {
146+ return transform(val, typ, jsonToJSProps);
147+}
148+
149+function uncast(val, typ) {
150+ return transform(val, typ, jsToJSONProps);
151+}
152+
153+function l(typ) {
154+ return { literal: typ };
155+}
156+
157+function a(typ) {
158+ return { arrayItems: typ };
159+}
160+
161+function i(typ) {
162+ return { integer: typ };
163+}
164+
165+function p(pattern) {
166+ return { pattern };
167+}
168+
169+function s(typ, min, max) {
170+ return { string: typ, min, max };
171+}
172+
173+function n(typ, min, max) {
174+ return { number: typ, min, max };
175+}
176+
177+function u(...typs) {
178+ return { unionMembers: typs };
179+}
180+
181+function o(props, additional) {
182+ return { props, additional };
183+}
184+
185+function m(additional) {
186+ const props = [];
187+ return { props, additional };
188+}
189+
190+function r(name) {
191+ return { ref: name };
192+}
193+
194+const typeMap = {
195+ "TopLevel": o([
196+ { json: "\\u001b", js: "\\u001b", typ: "" },
197+ { json: "c0\u0000\u0001\u001b\u001f", js: "c0\u0000\u0001\u001b\u001f", typ: "" },
198+ { json: "\u007f\u0080\u0085\u009f", js: "\u007f\u0080\u0085\u009f", typ: "" },
199+ { json: "\ud83d\ude00", js: "\ud83d\ude00", typ: "" },
200+ ], false),
201+};
202+
203+module.exports = {
204+ "topLevelToJson": topLevelToJson,
205+ "toTopLevel": toTopLevel,
206+};
Akotlin-jacksondefault / TopLevel.kt+39 −0
@@ -0,0 +1,39 @@
1+// To parse the JSON, install jackson-module-kotlin and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.fasterxml.jackson.annotation.*
8+import com.fasterxml.jackson.core.*
9+import com.fasterxml.jackson.databind.*
10+import com.fasterxml.jackson.databind.deser.std.StdDeserializer
11+import com.fasterxml.jackson.databind.module.SimpleModule
12+import com.fasterxml.jackson.databind.node.*
13+import com.fasterxml.jackson.databind.ser.std.StdSerializer
14+import com.fasterxml.jackson.module.kotlin.*
15+
16+val mapper = jacksonObjectMapper().apply {
17+ propertyNamingStrategy = object : PropertyNamingStrategy.PropertyNamingStrategyBase() { override fun translate(name: String) = if (name == "empty") "" else name }
18+ setSerializationInclusion(JsonInclude.Include.NON_NULL)
19+}
20+
21+data class TopLevel (
22+ @get:JsonProperty("c0\u0000\u0001\u001b\u001f", required=true)@field:JsonProperty("c0\u0000\u0001\u001b\u001f", required=true)
23+ val c0: String,
24+
25+ @get:JsonProperty("\u007f\u0080\u0085\u009f", required=true)@field:JsonProperty("\u007f\u0080\u0085\u009f", required=true)
26+ val empty: String,
27+
28+ @get:JsonProperty("\ud83d\ude00", required=true)@field:JsonProperty("\ud83d\ude00", required=true)
29+ val topLevel: String,
30+
31+ @get:JsonProperty("\\u001b", required=true)@field:JsonProperty("\\u001b", required=true)
32+ val u001B: String
33+) {
34+ fun toJson() = mapper.writeValueAsString(this)
35+
36+ companion object {
37+ fun fromJson(json: String) = mapper.readValue<TopLevel>(json)
38+ }
39+}
Akotlindefault / TopLevel.kt+29 −0
@@ -0,0 +1,29 @@
1+// To parse the JSON, install Klaxon and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.beust.klaxon.*
8+
9+private val klaxon = Klaxon()
10+
11+data class TopLevel (
12+ @Json(name = "c0\u0000\u0001\u001b\u001f")
13+ val c0: String,
14+
15+ @Json(name = "\u007f\u0080\u0085\u009f")
16+ val empty: String,
17+
18+ @Json(name = "\ud83d\ude00")
19+ val topLevel: String,
20+
21+ @Json(name = "\\u001b")
22+ val u001B: String
23+) {
24+ public fun toJson() = klaxon.toJsonString(this)
25+
26+ companion object {
27+ public fun fromJson(json: String) = klaxon.parse<TopLevel>(json)
28+ }
29+}
Akotlinxdefault / TopLevel.kt+26 −0
@@ -0,0 +1,26 @@
1+// To parse the JSON, install kotlin's serialization plugin and do:
2+//
3+// val json = Json { allowStructuredMapKeys = true }
4+// val topLevel = json.parse(TopLevel.serializer(), jsonString)
5+
6+package quicktype
7+
8+import kotlinx.serialization.*
9+import kotlinx.serialization.json.*
10+import kotlinx.serialization.descriptors.*
11+import kotlinx.serialization.encoding.*
12+
13+@Serializable
14+data class TopLevel (
15+ @SerialName("c0\u0000\u0001\u001b\u001f")
16+ val c0: String,
17+
18+ @SerialName("\u007f\u0080\u0085\u009f")
19+ val empty: String,
20+
21+ @SerialName("\ud83d\ude00")
22+ val topLevel: String,
23+
24+ @SerialName("\\u001b")
25+ val u001B: String
26+)
Aobjective-cdefault / QTTopLevel.h+33 −0
@@ -0,0 +1,33 @@
1+// To parse this JSON:
2+//
3+// NSError *error;
4+// QTTopLevel *topLevel = [QTTopLevel fromJSON:json encoding:NSUTF8Encoding error:&error];
5+
6+#import <Foundation/Foundation.h>
7+
8+@class QTTopLevel;
9+
10+NS_ASSUME_NONNULL_BEGIN
11+
12+#pragma mark - Top-level marshaling functions
13+
14+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error);
15+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error);
16+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error);
17+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error);
18+
19+#pragma mark - Object interfaces
20+
21+@interface QTTopLevel : NSObject
22+@property (nonatomic, copy) NSString *c0;
23+@property (nonatomic, copy) NSString *empty;
24+@property (nonatomic, copy) NSString *qtTopLevel;
25+@property (nonatomic, copy) NSString *u001B;
26+
27++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
28++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error;
29+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
30+- (NSData *_Nullable)toData:(NSError *_Nullable *)error;
31+@end
32+
33+NS_ASSUME_NONNULL_END
Aobjective-cdefault / QTTopLevel.m+129 −0
@@ -0,0 +1,129 @@
1+#import "QTTopLevel.h"
2+
3+#define λ(decl, expr) (^(decl) { return (expr); })
4+
5+static id NSNullify(id _Nullable x) {
6+ return (x == nil || x == NSNull.null) ? NSNull.null : x;
7+}
8+
9+NS_ASSUME_NONNULL_BEGIN
10+
11+@interface QTTopLevel (JSONConversion)
12++ (instancetype)fromJSONDictionary:(NSDictionary *)dict;
13+- (NSDictionary *)JSONDictionary;
14+@end
15+
16+#pragma mark - JSON serialization
17+
18+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error)
19+{
20+ @try {
21+ id json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error];
22+ return *error ? nil : [QTTopLevel fromJSONDictionary:json];
23+ } @catch (NSException *exception) {
24+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
25+ return nil;
26+ }
27+}
28+
29+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error)
30+{
31+ return QTTopLevelFromData([json dataUsingEncoding:encoding], error);
32+}
33+
34+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error)
35+{
36+ @try {
37+ id json = [topLevel JSONDictionary];
38+ NSData *data = [NSJSONSerialization dataWithJSONObject:json options:NSJSONWritingFragmentsAllowed error:error];
39+ return *error ? nil : data;
40+ } @catch (NSException *exception) {
41+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
42+ return nil;
43+ }
44+}
45+
46+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error)
47+{
48+ NSData *data = QTTopLevelToData(topLevel, error);
49+ return data ? [[NSString alloc] initWithData:data encoding:encoding] : nil;
50+}
51+
52+@implementation QTTopLevel
53++ (NSDictionary<NSString *, NSString *> *)properties
54+{
55+ static NSDictionary<NSString *, NSString *> *properties;
56+ return properties = properties ? properties : @{
57+ @"c0\000\001\033\037": @"c0",
58+ @"\177\302\200\302\205\302\237": @"empty",
59+ @"\U0001f600": @"qtTopLevel",
60+ @"\\u001b": @"u001B",
61+ };
62+}
63+
64++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error
65+{
66+ return QTTopLevelFromData(data, error);
67+}
68+
69++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
70+{
71+ return QTTopLevelFromJSON(json, encoding, error);
72+}
73+
74++ (instancetype)fromJSONDictionary:(NSDictionary *)dict
75+{
76+ return [dict isKindOfClass:NSDictionary.class] ? [[QTTopLevel alloc] initWithJSONDictionary:dict] : nil;
77+}
78+
79+- (instancetype)initWithJSONDictionary:(NSDictionary *)dict
80+{
81+ if (self = [super init]) {
82+ if (![dict[@"c0\000\001\033\037"] isKindOfClass:NSString.class]) return nil;
83+ if (![dict[@"\177\302\200\302\205\302\237"] isKindOfClass:NSString.class]) return nil;
84+ if (![dict[@"\U0001f600"] isKindOfClass:NSString.class]) return nil;
85+ if (![dict[@"\\u001b"] isKindOfClass:NSString.class]) return nil;
86+ [self setValuesForKeysWithDictionary:dict];
87+ }
88+ return self;
89+}
90+
91+- (void)setValue:(nullable id)value forKey:(NSString *)key
92+{
93+ id resolved = QTTopLevel.properties[key];
94+ if (resolved) [super setValue:value forKey:resolved];
95+}
96+
97+- (void)setNilValueForKey:(NSString *)key
98+{
99+ id resolved = QTTopLevel.properties[key];
100+ if (resolved) [super setValue:@(0) forKey:resolved];
101+}
102+
103+- (NSDictionary *)JSONDictionary
104+{
105+ id dict = [[self dictionaryWithValuesForKeys:QTTopLevel.properties.allValues] mutableCopy];
106+
107+ for (id jsonName in QTTopLevel.properties) {
108+ id propertyName = QTTopLevel.properties[jsonName];
109+ if (![jsonName isEqualToString:propertyName]) {
110+ dict[jsonName] = dict[propertyName];
111+ [dict removeObjectForKey:propertyName];
112+ }
113+ }
114+
115+ return dict;
116+}
117+
118+- (NSData *_Nullable)toData:(NSError *_Nullable *)error
119+{
120+ return QTTopLevelToData(self, error);
121+}
122+
123+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
124+{
125+ return QTTopLevelToJSON(self, encoding, error);
126+}
127+@end
128+
129+NS_ASSUME_NONNULL_END
Aphpdefault / TopLevel.php+274 −0
@@ -0,0 +1,274 @@
1+<?php
2+declare(strict_types=1);
3+
4+// This is an autogenerated file:TopLevel
5+
6+class TopLevel {
7+ private string $c0; // json:c0 Required
8+ private string $empty; // json:€…Ÿ Required
9+ private string $topLevel; // json:😀 Required
10+ private string $u001B; // json:\u001b Required
11+
12+ /**
13+ * @param string $c0
14+ * @param string $empty
15+ * @param string $topLevel
16+ * @param string $u001B
17+ */
18+ public function __construct(string $c0, string $empty, string $topLevel, string $u001B) {
19+ $this->c0 = $c0;
20+ $this->empty = $empty;
21+ $this->topLevel = $topLevel;
22+ $this->u001B = $u001B;
23+ }
24+
25+ /**
26+ * @param string $value
27+ * @throws Exception
28+ * @return string
29+ */
30+ public static function fromC0(string $value): string {
31+ return $value; /*string*/
32+ }
33+
34+ /**
35+ * @throws Exception
36+ * @return string
37+ */
38+ public function toC0(): string {
39+ if (TopLevel::validateC0($this->c0)) {
40+ return $this->c0; /*string*/
41+ }
42+ throw new Exception('never get to this TopLevel::c0');
43+ }
44+
45+ /**
46+ * @param string
47+ * @return bool
48+ * @throws Exception
49+ */
50+ public static function validateC0(string $value): bool {
51+ return true;
52+ }
53+
54+ /**
55+ * @throws Exception
56+ * @return string
57+ */
58+ public function getC0(): string {
59+ if (TopLevel::validateC0($this->c0)) {
60+ return $this->c0;
61+ }
62+ throw new Exception('never get to getC0 TopLevel::c0');
63+ }
64+
65+ /**
66+ * @return string
67+ */
68+ public static function sampleC0(): string {
69+ return 'TopLevel::c0::31'; /*31:c0*/
70+ }
71+
72+ /**
73+ * @param string $value
74+ * @throws Exception
75+ * @return string
76+ */
77+ public static function fromEmpty(string $value): string {
78+ return $value; /*string*/
79+ }
80+
81+ /**
82+ * @throws Exception
83+ * @return string
84+ */
85+ public function toEmpty(): string {
86+ if (TopLevel::validateEmpty($this->empty)) {
87+ return $this->empty; /*string*/
88+ }
89+ throw new Exception('never get to this TopLevel::empty');
90+ }
91+
92+ /**
93+ * @param string
94+ * @return bool
95+ * @throws Exception
96+ */
97+ public static function validateEmpty(string $value): bool {
98+ return true;
99+ }
100+
101+ /**
102+ * @throws Exception
103+ * @return string
104+ */
105+ public function getEmpty(): string {
106+ if (TopLevel::validateEmpty($this->empty)) {
107+ return $this->empty;
108+ }
109+ throw new Exception('never get to getEmpty TopLevel::empty');
110+ }
111+
112+ /**
113+ * @return string
114+ */
115+ public static function sampleEmpty(): string {
116+ return 'TopLevel::empty::32'; /*32:empty*/
117+ }
118+
119+ /**
120+ * @param string $value
121+ * @throws Exception
122+ * @return string
123+ */
124+ public static function fromTopLevel(string $value): string {
125+ return $value; /*string*/
126+ }
127+
128+ /**
129+ * @throws Exception
130+ * @return string
131+ */
132+ public function toTopLevel(): string {
133+ if (TopLevel::validateTopLevel($this->topLevel)) {
134+ return $this->topLevel; /*string*/
135+ }
136+ throw new Exception('never get to this TopLevel::topLevel');
137+ }
138+
139+ /**
140+ * @param string
141+ * @return bool
142+ * @throws Exception
143+ */
144+ public static function validateTopLevel(string $value): bool {
145+ return true;
146+ }
147+
148+ /**
149+ * @throws Exception
150+ * @return string
151+ */
152+ public function getTopLevel(): string {
153+ if (TopLevel::validateTopLevel($this->topLevel)) {
154+ return $this->topLevel;
155+ }
156+ throw new Exception('never get to getTopLevel TopLevel::topLevel');
157+ }
158+
159+ /**
160+ * @return string
161+ */
162+ public static function sampleTopLevel(): string {
163+ return 'TopLevel::topLevel::33'; /*33:topLevel*/
164+ }
165+
166+ /**
167+ * @param string $value
168+ * @throws Exception
169+ * @return string
170+ */
171+ public static function fromU001B(string $value): string {
172+ return $value; /*string*/
173+ }
174+
175+ /**
176+ * @throws Exception
177+ * @return string
178+ */
179+ public function toU001B(): string {
180+ if (TopLevel::validateU001B($this->u001B)) {
181+ return $this->u001B; /*string*/
182+ }
183+ throw new Exception('never get to this TopLevel::u001B');
184+ }
185+
186+ /**
187+ * @param string
188+ * @return bool
189+ * @throws Exception
190+ */
191+ public static function validateU001B(string $value): bool {
192+ return true;
193+ }
194+
195+ /**
196+ * @throws Exception
197+ * @return string
198+ */
199+ public function getU001B(): string {
200+ if (TopLevel::validateU001B($this->u001B)) {
201+ return $this->u001B;
202+ }
203+ throw new Exception('never get to getU001B TopLevel::u001B');
204+ }
205+
206+ /**
207+ * @return string
208+ */
209+ public static function sampleU001B(): string {
210+ return 'TopLevel::u001B::34'; /*34:u001B*/
211+ }
212+
213+ /**
214+ * @throws Exception
215+ * @return bool
216+ */
217+ public function validate(): bool {
218+ return TopLevel::validateC0($this->c0)
219+ || TopLevel::validateEmpty($this->empty)
220+ || TopLevel::validateTopLevel($this->topLevel)
221+ || TopLevel::validateU001B($this->u001B);
222+ }
223+
224+ /**
225+ * @return stdClass
226+ * @throws Exception
227+ */
228+ public function to(): stdClass {
229+ $out = new stdClass();
230+ $out->{'c0'} = $this->toC0();
231+ $out->{'€…Ÿ'} = $this->toEmpty();
232+ $out->{'😀'} = $this->toTopLevel();
233+ $out->{'\\u001b'} = $this->toU001B();
234+ return $out;
235+ }
236+
237+ /**
238+ * @param stdClass $obj
239+ * @return TopLevel
240+ * @throws Exception
241+ */
242+ public static function from(stdClass $obj): TopLevel {
243+ if (!property_exists($obj, 'c0')) {
244+ throw new Exception("Missing required property");
245+ }
246+ if (!property_exists($obj, '€…Ÿ')) {
247+ throw new Exception("Missing required property");
248+ }
249+ if (!property_exists($obj, '😀')) {
250+ throw new Exception("Missing required property");
251+ }
252+ if (!property_exists($obj, '\\u001b')) {
253+ throw new Exception("Missing required property");
254+ }
255+ return new TopLevel(
256+ TopLevel::fromC0($obj->{'c0'})
257+ ,TopLevel::fromEmpty($obj->{'€…Ÿ'})
258+ ,TopLevel::fromTopLevel($obj->{'😀'})
259+ ,TopLevel::fromU001B($obj->{'\\u001b'})
260+ );
261+ }
262+
263+ /**
264+ * @return TopLevel
265+ */
266+ public static function sample(): TopLevel {
267+ return new TopLevel(
268+ TopLevel::sampleC0()
269+ ,TopLevel::sampleEmpty()
270+ ,TopLevel::sampleTopLevel()
271+ ,TopLevel::sampleU001B()
272+ );
273+ }
274+}
Apikedefault / TopLevel.pmod+42 −0
@@ -0,0 +1,42 @@
1+// This source has been automatically generated by quicktype.
2+// ( https://github.com/quicktype/quicktype )
3+//
4+// To use this code, simply import it into your project as a Pike module.
5+// To JSON-encode your object, you can pass it to `Standards.JSON.encode`
6+// or call `encode_json` on it.
7+//
8+// To decode a JSON string, first pass it to `Standards.JSON.decode`,
9+// and then pass the result to `<YourClass>_from_JSON`.
10+// It will return an instance of <YourClass>.
11+// Bear in mind that these functions have unexpected behavior,
12+// and will likely throw an error, if the JSON string does not
13+// match the expected interface, even if the JSON itself is valid.
14+
15+class TopLevel {
16+ string c0; // json: "c0\u0000\u0001\u001b\u001f"
17+ string empty; // json: "\u007f\u0080\u0085\u009f"
18+ string top_level; // json: "\U0001f600"
19+ string u001_b; // json: "\\u001b"
20+
21+ string encode_json() {
22+ mapping(string:mixed) json = ([
23+ "c0\u0000\u0001\u001b\u001f" : c0,
24+ "\u007f\u0080\u0085\u009f" : empty,
25+ "\U0001f600" : top_level,
26+ "\\u001b" : u001_b,
27+ ]);
28+
29+ return Standards.JSON.encode(json);
30+ }
31+}
32+
33+TopLevel TopLevel_from_JSON(mixed json) {
34+ TopLevel retval = TopLevel();
35+
36+ retval.c0 = json["c0\u0000\u0001\u001b\u001f"];
37+ retval.empty = json["\u007f\u0080\u0085\u009f"];
38+ retval.top_level = json["\U0001f600"];
39+ retval.u001_b = json["\\u001b"];
40+
41+ return retval;
42+}
Apythondefault / quicktype.py+48 −0
@@ -0,0 +1,48 @@
1+from dataclasses import dataclass
2+from typing import Any, TypeVar, Type, cast
3+
4+
5+T = TypeVar("T")
6+
7+
8+def from_str(x: Any) -> str:
9+ assert isinstance(x, str)
10+ return x
11+
12+
13+def to_class(c: Type[T], x: Any) -> dict:
14+ assert isinstance(x, c)
15+ return cast(Any, x).to_dict()
16+
17+
18+@dataclass
19+class TopLevel:
20+ u001_b: str
21+ c0: str
22+ empty: str
23+ top_level: str
24+
25+ @staticmethod
26+ def from_dict(obj: Any) -> 'TopLevel':
27+ assert isinstance(obj, dict)
28+ u001_b = from_str(obj.get("\\u001b"))
29+ c0 = from_str(obj.get("c0\u0000\u0001\u001b\u001f"))
30+ empty = from_str(obj.get("\u007f\u0080\u0085\u009f"))
31+ top_level = from_str(obj.get("\U0001f600"))
32+ return TopLevel(u001_b, c0, empty, top_level)
33+
34+ def to_dict(self) -> dict:
35+ result: dict = {}
36+ result["\\u001b"] = from_str(self.u001_b)
37+ result["c0\u0000\u0001\u001b\u001f"] = from_str(self.c0)
38+ result["\u007f\u0080\u0085\u009f"] = from_str(self.empty)
39+ result["\U0001f600"] = from_str(self.top_level)
40+ return result
41+
42+
43+def top_level_from_dict(s: Any) -> TopLevel:
44+ return TopLevel.from_dict(s)
45+
46+
47+def top_level_to_dict(x: TopLevel) -> Any:
48+ return to_class(TopLevel, x)
Arubydefault / TopLevel.rb+54 −0
@@ -0,0 +1,54 @@
1+# This code may look unusually verbose for Ruby (and it is), but
2+# it performs some subtle and complex validation of JSON data.
3+#
4+# To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
5+#
6+# top_level = TopLevel.from_json! "{…}"
7+# puts top_level.c0
8+#
9+# If from_json! succeeds, the value returned matches the schema.
10+
11+require 'json'
12+require 'dry-types'
13+require 'dry-struct'
14+
15+module Types
16+ include Dry.Types(default: :nominal)
17+
18+ Hash = Strict::Hash
19+ String = Strict::String
20+end
21+
22+class TopLevel < Dry::Struct
23+ attribute :c0, Types::String
24+ attribute :empty, Types::String
25+ attribute :top_level, Types::String
26+ attribute :u001_b, Types::String
27+
28+ def self.from_dynamic!(d)
29+ d = Types::Hash[d]
30+ new(
31+ c0: d.fetch("c0\u{0}\u{1}\u{1b}\u{1f}"),
32+ empty: d.fetch("\u{7f}\u{80}\u{85}\u{9f}"),
33+ top_level: d.fetch("\u{1f600}"),
34+ u001_b: d.fetch("\\u001b"),
35+ )
36+ end
37+
38+ def self.from_json!(json)
39+ from_dynamic!(JSON.parse(json))
40+ end
41+
42+ def to_dynamic
43+ {
44+ "c0\u{0}\u{1}\u{1b}\u{1f}" => c0,
45+ "\u{7f}\u{80}\u{85}\u{9f}" => empty,
46+ "\u{1f600}" => top_level,
47+ "\\u001b" => u001_b,
48+ }
49+ end
50+
51+ def to_json(options = nil)
52+ JSON.generate(to_dynamic, options)
53+ end
54+end
Arustdefault / module_under_test.rs+29 −0
@@ -0,0 +1,29 @@
1+// Example code that deserializes and serializes the model.
2+// extern crate serde;
3+// #[macro_use]
4+// extern crate serde_derive;
5+// extern crate serde_json;
6+//
7+// use generated_module::TopLevel;
8+//
9+// fn main() {
10+// let json = r#"{"answer": 42}"#;
11+// let model: TopLevel = serde_json::from_str(&json).unwrap();
12+// }
13+
14+use serde::{Serialize, Deserialize};
15+
16+#[derive(Debug, Clone, Serialize, Deserialize)]
17+pub struct TopLevel {
18+ #[serde(rename = "c0\u{0000}\u{0001}\u{001b}\u{001f}")]
19+ pub c0: String,
20+
21+ #[serde(rename = "\u{007f}\u{0080}\u{0085}\u{009f}")]
22+ pub empty: String,
23+
24+ #[serde(rename = "\u{01f600}")]
25+ pub top_level: String,
26+
27+ #[serde(rename = "\\u001b")]
28+ pub u001_b: String,
29+}
Ascala3-upickledefault / TopLevel.scala+79 −0
@@ -0,0 +1,79 @@
1+package quicktype
2+
3+// Custom pickler so that missing keys and JSON nulls both read as None,
4+// and None is left out when writing (upickle's default for Option is a
5+// JSON array).
6+object OptionPickler extends upickle.AttributeTagged:
7+ import upickle.default.Writer
8+ import upickle.default.Reader
9+ override implicit def OptionWriter[T: Writer]: Writer[Option[T]] =
10+ implicitly[Writer[T]].comap[Option[T]] {
11+ case None => null.asInstanceOf[T]
12+ case Some(x) => x
13+ }
14+
15+ override implicit def OptionReader[T: Reader]: Reader[Option[T]] = {
16+ new Reader.Delegate[Any, Option[T]](implicitly[Reader[T]].map(Some(_))){
17+ override def visitNull(index: Int) = None
18+ }
19+ }
20+end OptionPickler
21+
22+// If a union has a null in, then we'll need this too...
23+type NullValue = None.type
24+given OptionPickler.ReadWriter[NullValue] = OptionPickler.readwriter[ujson.Value].bimap[NullValue](
25+ _ => ujson.Null,
26+ json => if json.isNull then None else throw new upickle.core.Abort("not null")
27+)
28+given OptionPickler.ReadWriter[java.time.Instant] = OptionPickler.readwriter[String].bimap(_.toString, java.time.Instant.parse)
29+
30+object JsonExt:
31+ val valueReader = OptionPickler.readwriter[ujson.Value]
32+
33+ // upickle's built-in primitive readers are lenient -- the numeric and
34+ // boolean readers accept strings, and the string reader accepts
35+ // numbers and booleans -- so untagged unions need strict readers to
36+ // pick the right member.
37+ val strictString: OptionPickler.Reader[String] = valueReader.map {
38+ case ujson.Str(s) => s
39+ case json => throw new upickle.core.Abort("expected string, got " + json)
40+ }
41+ val strictLong: OptionPickler.Reader[Long] = valueReader.map {
42+ case ujson.Num(n) if n.isWhole => n.toLong
43+ case json => throw new upickle.core.Abort("expected integer, got " + json)
44+ }
45+ val strictDouble: OptionPickler.Reader[Double] = valueReader.map {
46+ case ujson.Num(n) => n
47+ case json => throw new upickle.core.Abort("expected number, got " + json)
48+ }
49+ val strictBoolean: OptionPickler.Reader[Boolean] = valueReader.map {
50+ case ujson.Bool(b) => b
51+ case json => throw new upickle.core.Abort("expected boolean, got " + json)
52+ }
53+
54+ def badMerge[T](r1: => OptionPickler.Reader[?], rest: OptionPickler.Reader[?]*): OptionPickler.Reader[T] = valueReader.map { json =>
55+ var t: T | Null = null
56+ val stack = Vector.newBuilder[Throwable]
57+ (r1 +: rest).foreach { reader =>
58+ if t == null then
59+ try
60+ t = OptionPickler.read[T](json, trace = true)(using reader.asInstanceOf[OptionPickler.Reader[T]])
61+ catch
62+ case exc => stack += exc
63+ }
64+ if t != null then t.nn else throw new Exception(json.toString(), stack.result().headOption.getOrElse(null))
65+ }
66+end JsonExt
67+given OptionPickler.Reader[Long] = JsonExt.strictLong
68+
69+
70+case class TopLevel (
71+ @upickle.implicits.key("c0\u0000\u0001\u001b\u001f")
72+ val c0 : String,
73+ @upickle.implicits.key("\u007f\u0080\u0085\u009f")
74+ val empty : String,
75+ @upickle.implicits.key("\ud83d\ude00")
76+ val topLevel : String,
77+ @upickle.implicits.key("\\u001b")
78+ val u001B : String
79+) derives OptionPickler.ReadWriter
Ascala3default / TopLevel.scala+27 −0
@@ -0,0 +1,27 @@
1+package quicktype
2+
3+import io.circe.syntax._
4+import io.circe._
5+import cats.syntax.functor._
6+
7+// If a union has a null in, then we'll need this too...
8+type NullValue = None.type
9+
10+case class TopLevel (
11+ val c0 : String,
12+ val empty : String,
13+ val topLevel : String,
14+ val u001B : String
15+)
16+
17+object TopLevel:
18+ given io.circe.derivation.Configuration =
19+ io.circe.derivation.Configuration.default.withTransformMemberNames(
20+ io.circe.derivation.renaming.replaceWith(
21+ "c0" -> "c0\u0000\u0001\u001b\u001f",
22+ "empty" -> "\u007f\u0080\u0085\u009f",
23+ "topLevel" -> "\ud83d\ude00",
24+ "u001B" -> "\\u001b"
25+ )
26+ )
27+ given io.circe.Codec.AsObject[TopLevel] = io.circe.derivation.ConfiguredCodec.derived
Aswiftdefault / quicktype.swift+98 −0
@@ -0,0 +1,98 @@
1+// This file was generated from JSON Schema using quicktype, do not modify it directly.
2+// To parse the JSON, add this file to your project and do:
3+//
4+// let topLevel = try TopLevel(json)
5+
6+import Foundation
7+
8+// MARK: - TopLevel
9+struct TopLevel: Codable {
10+ let c0: String
11+ let empty: String
12+ let topLevel: String
13+ let u001B: String
14+
15+ enum CodingKeys: String, CodingKey {
16+ case c0 = "c0\u{0}\u{1}\u{1b}\u{1f}"
17+ case empty = "\u{7f}\u{80}\u{85}\u{9f}"
18+ case topLevel = "\u{1f600}"
19+ case u001B = "\\u001b"
20+ }
21+}
22+
23+// MARK: TopLevel convenience initializers and mutators
24+
25+extension TopLevel {
26+ init(data: Data) throws {
27+ self = try newJSONDecoder().decode(TopLevel.self, from: data)
28+ }
29+
30+ init(_ json: String, using encoding: String.Encoding = .utf8) throws {
31+ guard let data = json.data(using: encoding) else {
32+ throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
33+ }
34+ try self.init(data: data)
35+ }
36+
37+ init(fromURL url: URL) throws {
38+ try self.init(data: try Data(contentsOf: url))
39+ }
40+
41+ func with(
42+ c0: String? = nil,
43+ empty: String? = nil,
44+ topLevel: String? = nil,
45+ u001B: String? = nil
46+ ) -> TopLevel {
47+ return TopLevel(
48+ c0: c0 ?? self.c0,
49+ empty: empty ?? self.empty,
50+ topLevel: topLevel ?? self.topLevel,
51+ u001B: u001B ?? self.u001B
52+ )
53+ }
54+
55+ func jsonData() throws -> Data {
56+ return try newJSONEncoder().encode(self)
57+ }
58+
59+ func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
60+ return String(data: try self.jsonData(), encoding: encoding)
61+ }
62+}
63+
64+// MARK: - Helper functions for creating encoders and decoders
65+
66+func newJSONDecoder() -> JSONDecoder {
67+ let decoder = JSONDecoder()
68+ decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
69+ let container = try decoder.singleValueContainer()
70+ let dateStr = try container.decode(String.self)
71+
72+ let formatter = DateFormatter()
73+ formatter.calendar = Calendar(identifier: .iso8601)
74+ formatter.locale = Locale(identifier: "en_US_POSIX")
75+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
76+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
77+ if let date = formatter.date(from: dateStr) {
78+ return date
79+ }
80+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
81+ if let date = formatter.date(from: dateStr) {
82+ return date
83+ }
84+ throw DecodingError.typeMismatch(Date.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Could not decode date"))
85+ })
86+ return decoder
87+}
88+
89+func newJSONEncoder() -> JSONEncoder {
90+ let encoder = JSONEncoder()
91+ let formatter = DateFormatter()
92+ formatter.calendar = Calendar(identifier: .iso8601)
93+ formatter.locale = Locale(identifier: "en_US_POSIX")
94+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
95+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXXXX"
96+ encoder.dateEncodingStrategy = .formatted(formatter)
97+ return encoder
98+}
Atypescript-effect-schemadefault / TopLevel.ts+9 −0
@@ -0,0 +1,9 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5+ "c0\u0000\u0001\u001b\u001f": S.String,
6+ "\u007f\u0080\u0085\u009f": S.String,
7+ "\ud83d\ude00": S.String,
8+ "\\u001b": S.String,
9+}) {}
Atypescript-zoddefault / TopLevel.ts+10 −0
@@ -0,0 +1,10 @@
1+import * as z from "zod";
2+
3+
4+export const TopLevelSchema = z.object({
5+ "c0\u0000\u0001\u001b\u001f": z.string(),
6+ "\u007f\u0080\u0085\u009f": z.string(),
7+ "\ud83d\ude00": z.string(),
8+ "\\u001b": z.string(),
9+});
10+export type TopLevel = z.infer<typeof TopLevelSchema>;
Atypescriptdefault / TopLevel.ts+210 −0
@@ -0,0 +1,210 @@
1+// To parse this data:
2+//
3+// import { Convert, TopLevel } from "./TopLevel";
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+export interface TopLevel {
11+ "\\u001b": string;
12+ "c0\u0000\u0001\u001b\u001f": string;
13+ "\u007f\u0080\u0085\u009f": string;
14+ "\ud83d\ude00": string;
15+}
16+
17+// Converts JSON strings to/from your types
18+// and asserts the results of JSON.parse at runtime
19+export class Convert {
20+ public static toTopLevel(json: string): TopLevel {
21+ return cast(JSON.parse(json), r("TopLevel"));
22+ }
23+
24+ public static topLevelToJson(value: TopLevel): string {
25+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
26+ }
27+}
28+
29+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
30+ const prettyTyp = prettyTypeName(typ);
31+ const parentText = parent ? ` on ${parent}` : '';
32+ const keyText = key ? ` for key "${key}"` : '';
33+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
34+}
35+
36+function prettyTypeName(typ: any): string {
37+ if (Array.isArray(typ)) {
38+ if (typ.length === 2 && typ[0] === undefined) {
39+ return `an optional ${prettyTypeName(typ[1])}`;
40+ } else {
41+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
42+ }
43+ } else if (typeof typ === "object" && typ.literal !== undefined) {
44+ return typ.literal;
45+ } else {
46+ return typeof typ;
47+ }
48+}
49+
50+function jsonToJSProps(typ: any): any {
51+ if (typ.jsonToJS === undefined) {
52+ const map: any = {};
53+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
54+ typ.jsonToJS = map;
55+ }
56+ return typ.jsonToJS;
57+}
58+
59+function jsToJSONProps(typ: any): any {
60+ if (typ.jsToJSON === undefined) {
61+ const map: any = {};
62+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
63+ typ.jsToJSON = map;
64+ }
65+ return typ.jsToJSON;
66+}
67+
68+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
69+ function transformPrimitive(typ: string, val: any): any {
70+ if (typeof typ === typeof val) return val;
71+ return invalidValue(typ, val, key, parent);
72+ }
73+
74+ function transformUnion(typs: any[], val: any): any {
75+ // val must validate against one typ in typs
76+ const l = typs.length;
77+ for (let i = 0; i < l; i++) {
78+ const typ = typs[i];
79+ try {
80+ return transform(val, typ, getProps);
81+ } catch (_) {}
82+ }
83+ return invalidValue(typs, val, key, parent);
84+ }
85+
86+ function transformEnum(cases: string[], val: any): any {
87+ if (cases.indexOf(val) !== -1) return val;
88+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
89+ }
90+
91+ function transformArray(typ: any, val: any): any {
92+ // val must be an array with no invalid elements
93+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
94+
95+ return val.map(el => transform(el, typ, getProps));
96+ }
97+
98+ function transformDate(val: any): any {
99+ if (val === null) {
100+ return null;
101+ }
102+ const d = new Date(val);
103+ if (isNaN(d.valueOf())) {
104+ return invalidValue(l("Date"), val, key, parent);
105+ }
106+ return d;
107+ }
108+
109+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
110+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
111+ return invalidValue(l(ref || "object"), val, key, parent);
112+ }
113+ const result: any = {};
114+ Object.getOwnPropertyNames(props).forEach(key => {
115+ const prop = props[key];
116+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
117+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
118+ });
119+ Object.getOwnPropertyNames(val).forEach(key => {
120+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
121+ result[key] = transform(val[key], additional, getProps, key, ref);
122+ }
123+ });
124+ return result;
125+ }
126+
127+ if (typ === "any") return val;
128+ if (typ === null) {
129+ if (val === null) return val;
130+ return invalidValue(typ, val, key, parent);
131+ }
132+ if (typ === false) return invalidValue(typ, val, key, parent);
133+ let ref: any = undefined;
134+ while (typeof typ === "object" && typ.ref !== undefined) {
135+ ref = typ.ref;
136+ typ = typeMap[typ.ref];
137+ }
138+ if (Array.isArray(typ)) return transformEnum(typ, val);
139+ if (typeof typ === "object") {
140+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
145+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
146+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
147+ : invalidValue(typ, val, key, parent);
148+ }
149+ // Numbers can be parsed by Date but shouldn't be.
150+ if (typ === Date && typeof val !== "number") return transformDate(val);
151+ return transformPrimitive(typ, val);
152+}
153+
154+function cast<T>(val: any, typ: any): T {
155+ return transform(val, typ, jsonToJSProps);
156+}
157+
158+function uncast<T>(val: T, typ: any): any {
159+ return transform(val, typ, jsToJSONProps);
160+}
161+
162+function l(typ: any) {
163+ return { literal: typ };
164+}
165+
166+function a(typ: any) {
167+ return { arrayItems: typ };
168+}
169+
170+function i(typ: any) {
171+ return { integer: typ };
172+}
173+
174+function p(pattern: any) {
175+ return { pattern };
176+}
177+
178+function s(typ: any, min: any, max: any) {
179+ return { string: typ, min, max };
180+}
181+
182+function n(typ: any, min: any, max: any) {
183+ return { number: typ, min, max };
184+}
185+
186+function u(...typs: any[]) {
187+ return { unionMembers: typs };
188+}
189+
190+function o(props: any[], additional: any) {
191+ return { props, additional };
192+}
193+
194+function m(additional: any) {
195+ const props: any[] = [];
196+ return { props, additional };
197+}
198+
199+function r(name: string) {
200+ return { ref: name };
201+}
202+
203+const typeMap: any = {
204+ "TopLevel": o([
205+ { json: "\\u001b", js: "\\u001b", typ: "" },
206+ { json: "c0\u0000\u0001\u001b\u001f", js: "c0\u0000\u0001\u001b\u001f", typ: "" },
207+ { json: "\u007f\u0080\u0085\u009f", js: "\u007f\u0080\u0085\u009f", typ: "" },
208+ { json: "\ud83d\ude00", js: "\ud83d\ude00", typ: "" },
209+ ], false),
210+};
Test case

test/inputs/json/samples/pokedex.json

1 generated file · +7 −1
Melixirdefault / QuickType.ex+7 −1
@@ -202,6 +202,12 @@ defmodule Pokemon do
202202 def encode_candy(value) when is_binary(value), do: value
203203 def encode_candy(_), do: {:error, "Unexpected type when encoding Pokemon.candy"}
204204
205+ def decode_candy_count(value) when is_integer(value), do: value
206+ def decode_candy_count(_), do: {:error, "Unexpected type when decoding Pokemon.candy_count"}
207+
208+ def encode_candy_count(value) when is_integer(value), do: value
209+ def encode_candy_count(_), do: {:error, "Unexpected type when encoding Pokemon.candy_count"}
210+
205211 def decode_height(value) when is_binary(value), do: value
206212 def decode_height(_), do: {:error, "Unexpected type when decoding Pokemon.height"}
207213
@@ -276,7 +282,7 @@ defmodule Pokemon do
276282 %Pokemon{
277283 avg_spawns: decode_avg_spawns(m["avg_spawns"]),
278284 candy: decode_candy(m["candy"]),
279- candy_count: m["candy_count"],
285+ candy_count: m["candy_count"] && decode_candy_count(m["candy_count"]),
280286 egg: Egg.decode(m["egg"]),
281287 height: decode_height(m["height"]),
282288 id: decode_id(m["id"]),
Test case

test/inputs/json/samples/simple-object.json

1 generated file · +33 −0
Adartrequired-props-true--48bfba14a57c / TopLevel.dart+33 −0
@@ -0,0 +1,33 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final int date;
13+ final String title;
14+ final bool validity;
15+
16+ TopLevel({
17+ required this.date,
18+ required this.title,
19+ required this.validity,
20+ });
21+
22+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
23+ date: json["date"],
24+ title: json["title"],
25+ validity: json["validity"],
26+ );
27+
28+ Map<String, dynamic> toJson() => {
29+ "date": date,
30+ "title": title,
31+ "validity": validity,
32+ };
33+}
Test case

test/inputs/schema/class-map-union.schema

1 generated file · +7 −1
Mschema-elixirdefault / QuickType.ex+7 −1
@@ -12,9 +12,15 @@ defmodule UnionClass do
1212 quux: integer() | nil
1313 }
1414
15+ def decode_quux(value) when is_integer(value), do: value
16+ def decode_quux(_), do: {:error, "Unexpected type when decoding UnionClass.quux"}
17+
18+ def encode_quux(value) when is_integer(value), do: value
19+ def encode_quux(_), do: {:error, "Unexpected type when encoding UnionClass.quux"}
20+
1521 def from_map(m) do
1622 %UnionClass{
17- quux: m["quux"],
23+ quux: m["quux"] && decode_quux(m["quux"]),
1824 }
1925 end
Test case

test/inputs/schema/description.schema

1 generated file · +9 −1
Mschema-elixirdefault / QuickType.ex+9 −1
@@ -119,6 +119,14 @@ defmodule TopLevel do
119119 union: float() | String.t()
120120 }
121121
122+ def decode_foo(value) when is_float(value), do: value
123+ def decode_foo(value) when is_integer(value), do: value
124+ def decode_foo(_), do: {:error, "Unexpected type when decoding TopLevel.foo"}
125+
126+ def encode_foo(value) when is_float(value), do: value
127+ def encode_foo(value) when is_integer(value), do: value
128+ def encode_foo(_), do: {:error, "Unexpected type when encoding TopLevel.foo"}
129+
122130 def decode_object_or_string(%{"prop" => _,} = value), do: ObjectOrStringClass.from_map(value)
123131 def decode_object_or_string(value) when is_binary(value), do: value
124132 def decode_object_or_string(_), do: {:error, "Unexpected type when decoding TopLevel.object_or_string"}
@@ -131,7 +139,7 @@ defmodule TopLevel do
131139 %TopLevel{
132140 bar: m["bar"],
133141 enum: EnumEnum.decode(m["enum"]),
134- foo: m["foo"],
142+ foo: m["foo"] && decode_foo(m["foo"]),
135143 object_or_string: decode_object_or_string(m["object-or-string"]),
136144 union: Map.fetch!(m, "union"),
137145 }
Test case

test/inputs/schema/fractional-bounds.schema

41 generated files · +2,948 −0
Aschema-cjsondefault / TopLevel.c+63 −0
@@ -0,0 +1,63 @@
1+/**
2+ * TopLevel.c
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ */
5+
6+#include "TopLevel.h"
7+
8+struct TopLevel * cJSON_ParseTopLevel(const char * s) {
9+ struct TopLevel * x = NULL;
10+ if (NULL != s) {
11+ cJSON * j = cJSON_Parse(s);
12+ if (NULL != j) {
13+ x = cJSON_GetTopLevelValue(j);
14+ cJSON_Delete(j);
15+ }
16+ }
17+ return x;
18+}
19+
20+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
21+ struct TopLevel * x = NULL;
22+ if (NULL != j) {
23+ if (NULL != (x = cJSON_malloc(sizeof(struct TopLevel)))) {
24+ memset(x, 0, sizeof(struct TopLevel));
25+ if (!cJSON_HasObjectItem(j, "value")) { cJSON_DeleteTopLevel(x); return NULL; }
26+ if (cJSON_HasObjectItem(j, "value")) {
27+ if (!cJSON_IsNumber(cJSON_GetObjectItemCaseSensitive(j, "value"))) { cJSON_DeleteTopLevel(x); return NULL; }
28+ if (cJSON_GetObjectItemCaseSensitive(j, "value")->valuedouble < 0.1) { cJSON_DeleteTopLevel(x); return NULL; }
29+ if (cJSON_GetObjectItemCaseSensitive(j, "value")->valuedouble > 0.9) { cJSON_DeleteTopLevel(x); return NULL; }
30+ x->value = cJSON_GetNumberValue(cJSON_GetObjectItemCaseSensitive(j, "value"));
31+ }
32+ }
33+ }
34+ return x;
35+}
36+
37+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x) {
38+ cJSON * j = NULL;
39+ if (NULL != x) {
40+ if (NULL != (j = cJSON_CreateObject())) {
41+ cJSON_AddNumberToObject(j, "value", x->value);
42+ }
43+ }
44+ return j;
45+}
46+
47+char * cJSON_PrintTopLevel(const struct TopLevel * x) {
48+ char * s = NULL;
49+ if (NULL != x) {
50+ cJSON * j = cJSON_CreateTopLevel(x);
51+ if (NULL != j) {
52+ s = cJSON_Print(j);
53+ cJSON_Delete(j);
54+ }
55+ }
56+ return s;
57+}
58+
59+void cJSON_DeleteTopLevel(struct TopLevel * x) {
60+ if (NULL != x) {
61+ cJSON_free(x);
62+ }
63+}
Aschema-cjsondefault / TopLevel.h+55 −0
@@ -0,0 +1,55 @@
1+/**
2+ * TopLevel.h
3+ * This file has been autogenerated using quicktype https://github.com/quicktype/quicktype - DO NOT EDIT
4+ * This file depends of https://github.com/DaveGamble/cJSON, https://github.com/joelguittet/c-list and https://github.com/joelguittet/c-hashtable
5+ * To parse json data from json string use the following: struct <type> * data = cJSON_Parse<type>(<string>);
6+ * To get json data from cJSON object use the following: struct <type> * data = cJSON_Get<type>Value(<cjson>);
7+ * To get cJSON object from json data use the following: cJSON * cjson = cJSON_Create<type>(<data>);
8+ * To print json string from json data use the following: char * string = cJSON_Print<type>(<data>);
9+ * To delete json data use the following: cJSON_Delete<type>(<data>);
10+ */
11+
12+#ifndef __TOPLEVEL_H__
13+#define __TOPLEVEL_H__
14+
15+#ifdef __cplusplus
16+extern "C" {
17+#endif
18+
19+#include <stdint.h>
20+#include <stdbool.h>
21+#include <stdlib.h>
22+#include <string.h>
23+#include <regex.h>
24+#include <cJSON.h>
25+#include <hashtable.h>
26+#include <list.h>
27+
28+#define quicktype_cJSON_Duplicate(j) cJSON_Duplicate(j, true)
29+#define cJSON_Integer (1 << 18)
30+#define quicktype_cJSON_IsInteger(j) (cJSON_IsNumber(j) && (j)->valuedouble == (int64_t)(j)->valuedouble)
31+#ifndef cJSON_Bool
32+#define cJSON_Bool (cJSON_True | cJSON_False)
33+#endif
34+#ifndef cJSON_Map
35+#define cJSON_Map (1 << 16)
36+#endif
37+#ifndef cJSON_Enum
38+#define cJSON_Enum (1 << 17)
39+#endif
40+
41+struct TopLevel {
42+ double value;
43+};
44+
45+struct TopLevel * cJSON_ParseTopLevel(const char * s);
46+struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j);
47+cJSON * cJSON_CreateTopLevel(const struct TopLevel * x);
48+char * cJSON_PrintTopLevel(const struct TopLevel * x);
49+void cJSON_DeleteTopLevel(struct TopLevel * x);
50+
51+#ifdef __cplusplus
52+}
53+#endif
54+
55+#endif /* __TOPLEVEL_H__ */
Aschema-cplusplusdefault / quicktype.hpp+196 −0
@@ -0,0 +1,196 @@
1+// To parse this JSON data, first install
2+//
3+// json.hpp https://github.com/nlohmann/json
4+//
5+// Then include this file, and then do
6+//
7+// TopLevel data = nlohmann::json::parse(jsonString);
8+
9+#pragma once
10+
11+#include "json.hpp"
12+
13+#include <optional>
14+#include <stdexcept>
15+#include <regex>
16+
17+namespace quicktype {
18+ using nlohmann::json;
19+
20+ class ClassMemberConstraints {
21+ private:
22+ std::optional<int64_t> min_int_value;
23+ std::optional<int64_t> max_int_value;
24+ std::optional<double> min_double_value;
25+ std::optional<double> max_double_value;
26+ std::optional<size_t> min_length;
27+ std::optional<size_t> max_length;
28+ std::optional<std::string> pattern;
29+
30+ public:
31+ ClassMemberConstraints(
32+ std::optional<int64_t> min_int_value,
33+ std::optional<int64_t> max_int_value,
34+ std::optional<double> min_double_value,
35+ std::optional<double> max_double_value,
36+ std::optional<size_t> min_length,
37+ std::optional<size_t> max_length,
38+ std::optional<std::string> pattern
39+ ) : min_int_value(min_int_value), max_int_value(max_int_value), min_double_value(min_double_value), max_double_value(max_double_value), min_length(min_length), max_length(max_length), pattern(pattern) {}
40+ ClassMemberConstraints() = default;
41+ virtual ~ClassMemberConstraints() = default;
42+
43+ void set_min_int_value(int64_t min_int_value) { this->min_int_value = min_int_value; }
44+ auto get_min_int_value() const { return min_int_value; }
45+
46+ void set_max_int_value(int64_t max_int_value) { this->max_int_value = max_int_value; }
47+ auto get_max_int_value() const { return max_int_value; }
48+
49+ void set_min_double_value(double min_double_value) { this->min_double_value = min_double_value; }
50+ auto get_min_double_value() const { return min_double_value; }
51+
52+ void set_max_double_value(double max_double_value) { this->max_double_value = max_double_value; }
53+ auto get_max_double_value() const { return max_double_value; }
54+
55+ void set_min_length(size_t min_length) { this->min_length = min_length; }
56+ auto get_min_length() const { return min_length; }
57+
58+ void set_max_length(size_t max_length) { this->max_length = max_length; }
59+ auto get_max_length() const { return max_length; }
60+
61+ void set_pattern(const std::string & pattern) { this->pattern = pattern; }
62+ auto get_pattern() const { return pattern; }
63+ };
64+
65+ class ClassMemberConstraintException : public std::runtime_error {
66+ public:
67+ ClassMemberConstraintException(const std::string & msg) : std::runtime_error(msg) {}
68+ };
69+
70+ class ValueTooLowException : public ClassMemberConstraintException {
71+ public:
72+ ValueTooLowException(const std::string & msg) : ClassMemberConstraintException(msg) {}
73+ };
74+
75+ class ValueTooHighException : public ClassMemberConstraintException {
76+ public:
77+ ValueTooHighException(const std::string & msg) : ClassMemberConstraintException(msg) {}
78+ };
79+
80+ class ValueTooShortException : public ClassMemberConstraintException {
81+ public:
82+ ValueTooShortException(const std::string & msg) : ClassMemberConstraintException(msg) {}
83+ };
84+
85+ class ValueTooLongException : public ClassMemberConstraintException {
86+ public:
87+ ValueTooLongException(const std::string & msg) : ClassMemberConstraintException(msg) {}
88+ };
89+
90+ class InvalidPatternException : public ClassMemberConstraintException {
91+ public:
92+ InvalidPatternException(const std::string & msg) : ClassMemberConstraintException(msg) {}
93+ };
94+
95+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, int64_t value) {
96+ if (c.get_min_int_value() != std::nullopt && value < *c.get_min_int_value()) {
97+ throw ValueTooLowException ("Value too low for " + name + " (" + std::to_string(value) + "<" + std::to_string(*c.get_min_int_value()) + ")");
98+ }
99+
100+ if (c.get_max_int_value() != std::nullopt && value > *c.get_max_int_value()) {
101+ throw ValueTooHighException ("Value too high for " + name + " (" + std::to_string(value) + ">" + std::to_string(*c.get_max_int_value()) + ")");
102+ }
103+ }
104+
105+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, const std::optional<int64_t> & value) {
106+ if (value) {
107+ CheckConstraint(name, c, *value);
108+ }
109+ }
110+
111+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, double value) {
112+ if (c.get_min_double_value() != std::nullopt && value < *c.get_min_double_value()) {
113+ throw ValueTooLowException ("Value too low for " + name + " (" + std::to_string(value) + "<" + std::to_string(*c.get_min_double_value()) + ")");
114+ }
115+
116+ if (c.get_max_double_value() != std::nullopt && value > *c.get_max_double_value()) {
117+ throw ValueTooHighException ("Value too high for " + name + " (" + std::to_string(value) + ">" + std::to_string(*c.get_max_double_value()) + ")");
118+ }
119+ }
120+
121+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, const std::optional<double> & value) {
122+ if (value) {
123+ CheckConstraint(name, c, *value);
124+ }
125+ }
126+
127+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, const std::string & value) {
128+ if (c.get_min_length() != std::nullopt && value.length() < *c.get_min_length()) {
129+ throw ValueTooShortException ("Value too short for " + name + " (" + std::to_string(value.length()) + "<" + std::to_string(*c.get_min_length()) + ")");
130+ }
131+
132+ if (c.get_max_length() != std::nullopt && value.length() > *c.get_max_length()) {
133+ throw ValueTooLongException ("Value too long for " + name + " (" + std::to_string(value.length()) + ">" + std::to_string(*c.get_max_length()) + ")");
134+ }
135+
136+ if (c.get_pattern() != std::nullopt) {
137+ std::smatch result;
138+ std::regex_search(value, result, std::regex( *c.get_pattern() ));
139+ if (result.empty()) {
140+ throw InvalidPatternException ("Value doesn't match pattern for " + name + " (" + value +" != " + *c.get_pattern() + ")");
141+ }
142+ }
143+ }
144+
145+ inline void CheckConstraint(const std::string & name, const ClassMemberConstraints & c, const std::optional<std::string> & value) {
146+ if (value) {
147+ CheckConstraint(name, c, *value);
148+ }
149+ }
150+
151+ #ifndef NLOHMANN_UNTYPED_quicktype_HELPER
152+ #define NLOHMANN_UNTYPED_quicktype_HELPER
153+ inline json get_untyped(const json & j, const char * property) {
154+ if (j.find(property) != j.end()) {
155+ return j.at(property).get<json>();
156+ }
157+ return json();
158+ }
159+
160+ inline json get_untyped(const json & j, std::string property) {
161+ return get_untyped(j, property.data());
162+ }
163+ #endif
164+
165+ class TopLevel {
166+ public:
167+ TopLevel() :
168+ value_constraint(std::nullopt, std::nullopt, 0.1, 0.9, std::nullopt, std::nullopt, std::nullopt)
169+ {}
170+ virtual ~TopLevel() = default;
171+
172+ private:
173+ double value;
174+ ClassMemberConstraints value_constraint;
175+
176+ public:
177+ const double & get_value() const { return value; }
178+ double & get_mutable_value() { return value; }
179+ void set_value(const double & value) { CheckConstraint("value", value_constraint, value); this->value = value; }
180+ };
181+}
182+
183+namespace quicktype {
184+ void from_json(const json & j, TopLevel & x);
185+ void to_json(json & j, const TopLevel & x);
186+
187+ inline void from_json(const json & j, TopLevel& x) {
188+ if (!j.is_object()) throw std::runtime_error("Expected object");
189+ x.set_value(j.at("value").get<double>());
190+ }
191+
192+ inline void to_json(json & j, const TopLevel & x) {
193+ j = json::object();
194+ j["value"] = x.get_value();
195+ }
196+}
Aschema-crystaldefault / TopLevel.cr+7 −0
@@ -0,0 +1,7 @@
1+require "json"
2+
3+class TopLevel
4+ include JSON::Serializable
5+
6+ property value : Float64
7+end
Aschema-csharp-recordsdefault / QuickType.cs+96 −0
@@ -0,0 +1,96 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial record TopLevel
27+ {
28+ [JsonProperty("value", Required = Required.Always)]
29+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
30+ public double Value { get; set; }
31+ }
32+
33+ public partial record TopLevel
34+ {
35+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
36+ }
37+
38+ public static partial class Serialize
39+ {
40+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
41+ }
42+
43+ internal static partial class Converter
44+ {
45+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
46+ {
47+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
48+ DateParseHandling = DateParseHandling.None,
49+ Converters =
50+ {
51+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
52+ },
53+ };
54+ }
55+
56+ internal class MinMaxValueCheckConverter : JsonConverter
57+ {
58+ public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
59+
60+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
61+ {
62+ if (reader.TokenType == JsonToken.Null) return null;
63+ var value = serializer.Deserialize<double>(reader);
64+ if (value >= 0.1 && value <= 0.9)
65+ {
66+ return value;
67+ }
68+ throw new Exception("Cannot unmarshal type double");
69+ }
70+
71+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
72+ {
73+ if (untypedValue == null)
74+ {
75+ serializer.Serialize(writer, null);
76+ return;
77+ }
78+ var value = (double)untypedValue;
79+ if (value >= 0.1 && value <= 0.9)
80+ {
81+ serializer.Serialize(writer, value);
82+ return;
83+ }
84+ throw new Exception("Cannot marshal type double");
85+ }
86+
87+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
88+ }
89+}
90+#pragma warning restore CS8618
91+#pragma warning restore CS8601
92+#pragma warning restore CS8602
93+#pragma warning restore CS8603
94+#pragma warning restore CS8604
95+#pragma warning restore CS8625
96+#pragma warning restore CS8765
Aschema-csharp-recordsnumber-type-decimal--20a123601b5a / QuickType.cs+96 −0
@@ -0,0 +1,96 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial record TopLevel
27+ {
28+ [JsonProperty("value", Required = Required.Always)]
29+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
30+ public decimal Value { get; set; }
31+ }
32+
33+ public partial record TopLevel
34+ {
35+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
36+ }
37+
38+ public static partial class Serialize
39+ {
40+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
41+ }
42+
43+ internal static partial class Converter
44+ {
45+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
46+ {
47+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
48+ DateParseHandling = DateParseHandling.None,
49+ Converters =
50+ {
51+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
52+ },
53+ };
54+ }
55+
56+ internal class MinMaxValueCheckConverter : JsonConverter
57+ {
58+ public override bool CanConvert(Type t) => t == typeof(decimal) || t == typeof(decimal?);
59+
60+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
61+ {
62+ if (reader.TokenType == JsonToken.Null) return null;
63+ var value = serializer.Deserialize<decimal>(reader);
64+ if (value >= 0.1m && value <= 0.9m)
65+ {
66+ return value;
67+ }
68+ throw new Exception("Cannot unmarshal type decimal");
69+ }
70+
71+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
72+ {
73+ if (untypedValue == null)
74+ {
75+ serializer.Serialize(writer, null);
76+ return;
77+ }
78+ var value = (decimal)untypedValue;
79+ if (value >= 0.1m && value <= 0.9m)
80+ {
81+ serializer.Serialize(writer, value);
82+ return;
83+ }
84+ throw new Exception("Cannot marshal type decimal");
85+ }
86+
87+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
88+ }
89+}
90+#pragma warning restore CS8618
91+#pragma warning restore CS8601
92+#pragma warning restore CS8602
93+#pragma warning restore CS8603
94+#pragma warning restore CS8604
95+#pragma warning restore CS8625
96+#pragma warning restore CS8765
Aschema-csharp-SystemTextJsondefault / QuickType.cs+194 −0
@@ -0,0 +1,194 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'System.Text.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+
14+namespace QuickType
15+{
16+ using System;
17+ using System.Collections.Generic;
18+
19+ using System.Text.Json;
20+ using System.Text.Json.Serialization;
21+ using System.Globalization;
22+
23+ public partial class TopLevel
24+ {
25+ [JsonRequired]
26+ [JsonPropertyName("value")]
27+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
28+ public double Value { get; set; }
29+ }
30+
31+ public partial class TopLevel
32+ {
33+ public static TopLevel FromJson(string json) => global::System.Text.Json.JsonSerializer.Deserialize<TopLevel>(json, QuickType.Converter.Settings);
34+ }
35+
36+ public static partial class Serialize
37+ {
38+ public static string ToJson(this TopLevel self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings);
39+ }
40+
41+ internal static partial class Converter
42+ {
43+ public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
44+ {
45+ Converters =
46+ {
47+ new DateOnlyConverter(),
48+ new TimeOnlyConverter(),
49+ IsoDateTimeOffsetConverter.Singleton
50+ },
51+ };
52+ }
53+
54+ internal class MinMaxValueCheckConverter : JsonConverter<double>
55+ {
56+ public override bool CanConvert(Type t) => t == typeof(double);
57+
58+ public override double Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
59+ {
60+ var value = reader.GetDouble();
61+ if (value >= 0.1 && value <= 0.9)
62+ {
63+ return value;
64+ }
65+ throw new JsonException("Cannot unmarshal type double");
66+ }
67+
68+ public override void Write(Utf8JsonWriter writer, double value, JsonSerializerOptions options)
69+ {
70+ if (value >= 0.1 && value <= 0.9)
71+ {
72+ JsonSerializer.Serialize(writer, value, options);
73+ return;
74+ }
75+ throw new NotSupportedException("Cannot marshal type double");
76+ }
77+
78+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
79+ }
80+
81+ public class DateOnlyConverter : JsonConverter<DateOnly>
82+ {
83+ private readonly string serializationFormat;
84+ public DateOnlyConverter() : this(null) { }
85+
86+ public DateOnlyConverter(string? serializationFormat)
87+ {
88+ this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
89+ }
90+
91+ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
92+ {
93+ var value = reader.GetString();
94+ return DateOnly.Parse(value!);
95+ }
96+
97+ public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
98+ => writer.WriteStringValue(value.ToString(serializationFormat));
99+ }
100+
101+ public class TimeOnlyConverter : JsonConverter<TimeOnly>
102+ {
103+ private readonly string serializationFormat;
104+
105+ public TimeOnlyConverter() : this(null) { }
106+
107+ public TimeOnlyConverter(string? serializationFormat)
108+ {
109+ this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
110+ }
111+
112+ public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
113+ {
114+ var value = reader.GetString();
115+ return TimeOnly.Parse(value!);
116+ }
117+
118+ public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
119+ => writer.WriteStringValue(value.ToString(serializationFormat));
120+ }
121+
122+ internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
123+ {
124+ public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
125+
126+ private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
127+
128+ private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
129+ private string? _dateTimeFormat;
130+ private CultureInfo? _culture;
131+
132+ public DateTimeStyles DateTimeStyles
133+ {
134+ get => _dateTimeStyles;
135+ set => _dateTimeStyles = value;
136+ }
137+
138+ public string? DateTimeFormat
139+ {
140+ get => _dateTimeFormat ?? string.Empty;
141+ set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
142+ }
143+
144+ public CultureInfo Culture
145+ {
146+ get => _culture ?? CultureInfo.CurrentCulture;
147+ set => _culture = value;
148+ }
149+
150+ public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
151+ {
152+ string text;
153+
154+
155+ if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
156+ || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
157+ {
158+ value = value.ToUniversalTime();
159+ }
160+
161+ text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
162+
163+ writer.WriteStringValue(text);
164+ }
165+
166+ public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
167+ {
168+ string? dateText = reader.GetString();
169+
170+ if (string.IsNullOrEmpty(dateText) == false)
171+ {
172+ if (!string.IsNullOrEmpty(_dateTimeFormat))
173+ {
174+ return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
175+ }
176+ else
177+ {
178+ return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
179+ }
180+ }
181+ else
182+ {
183+ return default(DateTimeOffset);
184+ }
185+ }
186+
187+
188+ public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
189+ }
190+}
191+#pragma warning restore CS8618
192+#pragma warning restore CS8601
193+#pragma warning restore CS8602
194+#pragma warning restore CS8603
Aschema-csharp-SystemTextJsonnumber-type-decimal--20a123601b5a / QuickType.cs+194 −0
@@ -0,0 +1,194 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'System.Text.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+
14+namespace QuickType
15+{
16+ using System;
17+ using System.Collections.Generic;
18+
19+ using System.Text.Json;
20+ using System.Text.Json.Serialization;
21+ using System.Globalization;
22+
23+ public partial class TopLevel
24+ {
25+ [JsonRequired]
26+ [JsonPropertyName("value")]
27+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
28+ public decimal Value { get; set; }
29+ }
30+
31+ public partial class TopLevel
32+ {
33+ public static TopLevel FromJson(string json) => global::System.Text.Json.JsonSerializer.Deserialize<TopLevel>(json, QuickType.Converter.Settings);
34+ }
35+
36+ public static partial class Serialize
37+ {
38+ public static string ToJson(this TopLevel self) => JsonSerializer.Serialize(self, QuickType.Converter.Settings);
39+ }
40+
41+ internal static partial class Converter
42+ {
43+ public static readonly JsonSerializerOptions Settings = new(JsonSerializerDefaults.General)
44+ {
45+ Converters =
46+ {
47+ new DateOnlyConverter(),
48+ new TimeOnlyConverter(),
49+ IsoDateTimeOffsetConverter.Singleton
50+ },
51+ };
52+ }
53+
54+ internal class MinMaxValueCheckConverter : JsonConverter<decimal>
55+ {
56+ public override bool CanConvert(Type t) => t == typeof(decimal);
57+
58+ public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
59+ {
60+ var value = reader.GetDecimal();
61+ if (value >= 0.1m && value <= 0.9m)
62+ {
63+ return value;
64+ }
65+ throw new JsonException("Cannot unmarshal type decimal");
66+ }
67+
68+ public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options)
69+ {
70+ if (value >= 0.1m && value <= 0.9m)
71+ {
72+ JsonSerializer.Serialize(writer, value, options);
73+ return;
74+ }
75+ throw new NotSupportedException("Cannot marshal type decimal");
76+ }
77+
78+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
79+ }
80+
81+ public class DateOnlyConverter : JsonConverter<DateOnly>
82+ {
83+ private readonly string serializationFormat;
84+ public DateOnlyConverter() : this(null) { }
85+
86+ public DateOnlyConverter(string? serializationFormat)
87+ {
88+ this.serializationFormat = serializationFormat ?? "yyyy-MM-dd";
89+ }
90+
91+ public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
92+ {
93+ var value = reader.GetString();
94+ return DateOnly.Parse(value!);
95+ }
96+
97+ public override void Write(Utf8JsonWriter writer, DateOnly value, JsonSerializerOptions options)
98+ => writer.WriteStringValue(value.ToString(serializationFormat));
99+ }
100+
101+ public class TimeOnlyConverter : JsonConverter<TimeOnly>
102+ {
103+ private readonly string serializationFormat;
104+
105+ public TimeOnlyConverter() : this(null) { }
106+
107+ public TimeOnlyConverter(string? serializationFormat)
108+ {
109+ this.serializationFormat = serializationFormat ?? "HH:mm:ss.fff";
110+ }
111+
112+ public override TimeOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
113+ {
114+ var value = reader.GetString();
115+ return TimeOnly.Parse(value!);
116+ }
117+
118+ public override void Write(Utf8JsonWriter writer, TimeOnly value, JsonSerializerOptions options)
119+ => writer.WriteStringValue(value.ToString(serializationFormat));
120+ }
121+
122+ internal class IsoDateTimeOffsetConverter : JsonConverter<DateTimeOffset>
123+ {
124+ public override bool CanConvert(Type t) => t == typeof(DateTimeOffset);
125+
126+ private const string DefaultDateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK";
127+
128+ private DateTimeStyles _dateTimeStyles = DateTimeStyles.RoundtripKind;
129+ private string? _dateTimeFormat;
130+ private CultureInfo? _culture;
131+
132+ public DateTimeStyles DateTimeStyles
133+ {
134+ get => _dateTimeStyles;
135+ set => _dateTimeStyles = value;
136+ }
137+
138+ public string? DateTimeFormat
139+ {
140+ get => _dateTimeFormat ?? string.Empty;
141+ set => _dateTimeFormat = (string.IsNullOrEmpty(value)) ? null : value;
142+ }
143+
144+ public CultureInfo Culture
145+ {
146+ get => _culture ?? CultureInfo.CurrentCulture;
147+ set => _culture = value;
148+ }
149+
150+ public override void Write(Utf8JsonWriter writer, DateTimeOffset value, JsonSerializerOptions options)
151+ {
152+ string text;
153+
154+
155+ if ((_dateTimeStyles & DateTimeStyles.AdjustToUniversal) == DateTimeStyles.AdjustToUniversal
156+ || (_dateTimeStyles & DateTimeStyles.AssumeUniversal) == DateTimeStyles.AssumeUniversal)
157+ {
158+ value = value.ToUniversalTime();
159+ }
160+
161+ text = value.ToString(_dateTimeFormat ?? DefaultDateTimeFormat, Culture);
162+
163+ writer.WriteStringValue(text);
164+ }
165+
166+ public override DateTimeOffset Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
167+ {
168+ string? dateText = reader.GetString();
169+
170+ if (string.IsNullOrEmpty(dateText) == false)
171+ {
172+ if (!string.IsNullOrEmpty(_dateTimeFormat))
173+ {
174+ return DateTimeOffset.ParseExact(dateText, _dateTimeFormat, Culture, _dateTimeStyles);
175+ }
176+ else
177+ {
178+ return DateTimeOffset.Parse(dateText, Culture, _dateTimeStyles);
179+ }
180+ }
181+ else
182+ {
183+ return default(DateTimeOffset);
184+ }
185+ }
186+
187+
188+ public static readonly IsoDateTimeOffsetConverter Singleton = new IsoDateTimeOffsetConverter();
189+ }
190+}
191+#pragma warning restore CS8618
192+#pragma warning restore CS8601
193+#pragma warning restore CS8602
194+#pragma warning restore CS8603
Aschema-csharpdefault / QuickType.cs+96 −0
@@ -0,0 +1,96 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial class TopLevel
27+ {
28+ [JsonProperty("value", Required = Required.Always)]
29+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
30+ public double Value { get; set; }
31+ }
32+
33+ public partial class TopLevel
34+ {
35+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
36+ }
37+
38+ public static partial class Serialize
39+ {
40+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
41+ }
42+
43+ internal static partial class Converter
44+ {
45+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
46+ {
47+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
48+ DateParseHandling = DateParseHandling.None,
49+ Converters =
50+ {
51+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
52+ },
53+ };
54+ }
55+
56+ internal class MinMaxValueCheckConverter : JsonConverter
57+ {
58+ public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
59+
60+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
61+ {
62+ if (reader.TokenType == JsonToken.Null) return null;
63+ var value = serializer.Deserialize<double>(reader);
64+ if (value >= 0.1 && value <= 0.9)
65+ {
66+ return value;
67+ }
68+ throw new Exception("Cannot unmarshal type double");
69+ }
70+
71+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
72+ {
73+ if (untypedValue == null)
74+ {
75+ serializer.Serialize(writer, null);
76+ return;
77+ }
78+ var value = (double)untypedValue;
79+ if (value >= 0.1 && value <= 0.9)
80+ {
81+ serializer.Serialize(writer, value);
82+ return;
83+ }
84+ throw new Exception("Cannot marshal type double");
85+ }
86+
87+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
88+ }
89+}
90+#pragma warning restore CS8618
91+#pragma warning restore CS8601
92+#pragma warning restore CS8602
93+#pragma warning restore CS8603
94+#pragma warning restore CS8604
95+#pragma warning restore CS8625
96+#pragma warning restore CS8765
Aschema-csharpnumber-type-decimal--20a123601b5a / QuickType.cs+96 −0
@@ -0,0 +1,96 @@
1+// <auto-generated />
2+//
3+// To parse this JSON data, add NuGet 'Newtonsoft.Json' then do:
4+//
5+// using QuickType;
6+//
7+// var topLevel = TopLevel.FromJson(jsonString);
8+#nullable enable
9+#pragma warning disable CS8618
10+#pragma warning disable CS8601
11+#pragma warning disable CS8602
12+#pragma warning disable CS8603
13+#pragma warning disable CS8604
14+#pragma warning disable CS8625
15+#pragma warning disable CS8765
16+
17+namespace QuickType
18+{
19+ using System;
20+ using System.Collections.Generic;
21+
22+ using System.Globalization;
23+ using Newtonsoft.Json;
24+ using Newtonsoft.Json.Converters;
25+
26+ public partial class TopLevel
27+ {
28+ [JsonProperty("value", Required = Required.Always)]
29+ [JsonConverter(typeof(MinMaxValueCheckConverter))]
30+ public decimal Value { get; set; }
31+ }
32+
33+ public partial class TopLevel
34+ {
35+ public static TopLevel FromJson(string json) => JsonConvert.DeserializeObject<TopLevel>(json, QuickType.Converter.Settings);
36+ }
37+
38+ public static partial class Serialize
39+ {
40+ public static string ToJson(this TopLevel self) => JsonConvert.SerializeObject(self, QuickType.Converter.Settings);
41+ }
42+
43+ internal static partial class Converter
44+ {
45+ public static readonly JsonSerializerSettings Settings = new JsonSerializerSettings
46+ {
47+ MetadataPropertyHandling = MetadataPropertyHandling.Ignore,
48+ DateParseHandling = DateParseHandling.None,
49+ Converters =
50+ {
51+ new IsoDateTimeConverter { DateTimeStyles = DateTimeStyles.AssumeUniversal }
52+ },
53+ };
54+ }
55+
56+ internal class MinMaxValueCheckConverter : JsonConverter
57+ {
58+ public override bool CanConvert(Type t) => t == typeof(decimal) || t == typeof(decimal?);
59+
60+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
61+ {
62+ if (reader.TokenType == JsonToken.Null) return null;
63+ var value = serializer.Deserialize<decimal>(reader);
64+ if (value >= 0.1m && value <= 0.9m)
65+ {
66+ return value;
67+ }
68+ throw new Exception("Cannot unmarshal type decimal");
69+ }
70+
71+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
72+ {
73+ if (untypedValue == null)
74+ {
75+ serializer.Serialize(writer, null);
76+ return;
77+ }
78+ var value = (decimal)untypedValue;
79+ if (value >= 0.1m && value <= 0.9m)
80+ {
81+ serializer.Serialize(writer, value);
82+ return;
83+ }
84+ throw new Exception("Cannot marshal type decimal");
85+ }
86+
87+ public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
88+ }
89+}
90+#pragma warning restore CS8618
91+#pragma warning restore CS8601
92+#pragma warning restore CS8602
93+#pragma warning restore CS8603
94+#pragma warning restore CS8604
95+#pragma warning restore CS8625
96+#pragma warning restore CS8765
Aschema-dartdefault / TopLevel.dart+25 −0
@@ -0,0 +1,25 @@
1+// To parse this JSON data, do
2+//
3+// final topLevel = topLevelFromJson(jsonString);
4+
5+import 'dart:convert';
6+
7+TopLevel topLevelFromJson(String str) => TopLevel.fromJson(json.decode(str));
8+
9+String topLevelToJson(TopLevel data) => json.encode(data.toJson());
10+
11+class TopLevel {
12+ final double value;
13+
14+ TopLevel({
15+ required this.value,
16+ });
17+
18+ factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
19+ value: ((x) => x >= 0.1 && x <= 0.9 ? x : throw FormatException("Expected bounded number"))(json["value"]?.toDouble()),
20+ );
21+
22+ Map<String, dynamic> toJson() => {
23+ "value": value,
24+ };
25+}
Aschema-elixirdefault / QuickType.ex+47 −0
@@ -0,0 +1,47 @@
1+# This file was autogenerated using quicktype https://github.com/quicktype/quicktype
2+#
3+# Add Jason to your mix.exs
4+#
5+# Decode a JSON string: TopLevel.from_json(data)
6+# Encode into a JSON string: TopLevel.to_json(struct)
7+
8+defmodule TopLevel do
9+ @enforce_keys [:value]
10+ defstruct [:value]
11+
12+ @type t :: %__MODULE__{
13+ value: float()
14+ }
15+
16+ def decode_value(value) when is_float(value) and value >= 0.1 and value <= 0.9, do: value
17+ def decode_value(value) when is_integer(value) and value >= 0.1 and value <= 0.9, do: value
18+ def decode_value(_), do: {:error, "Unexpected type when decoding TopLevel.value"}
19+
20+ def encode_value(value) when is_float(value), do: value
21+ def encode_value(value) when is_integer(value), do: value
22+ def encode_value(_), do: {:error, "Unexpected type when encoding TopLevel.value"}
23+
24+ def from_map(m) do
25+ %TopLevel{
26+ value: decode_value(m["value"]),
27+ }
28+ end
29+
30+ def from_json(json) do
31+ json
32+ |> Jason.decode!()
33+ |> from_map()
34+ end
35+
36+ def to_map(struct) do
37+ %{
38+ "value" => struct.value,
39+ }
40+ end
41+
42+ def to_json(struct) do
43+ struct
44+ |> to_map()
45+ |> Jason.encode!()
46+ end
47+end
Aschema-elmdefault / QuickType.elm+57 −0
@@ -0,0 +1,57 @@
1+-- To decode the JSON data, add this file to your project, run
2+--
3+-- elm install NoRedInk/elm-json-decode-pipeline
4+--
5+-- add these imports
6+--
7+-- import Json.Decode exposing (decodeString)
8+-- import QuickType exposing (quickType)
9+--
10+-- and you're off to the races with
11+--
12+-- decodeString quickType myJsonString
13+
14+module QuickType exposing
15+ ( QuickType
16+ , quickTypeToString
17+ , quickType
18+ )
19+
20+import Json.Decode as Jdec
21+import Json.Decode.Pipeline as Jpipe
22+import Json.Encode as Jenc
23+import Dict exposing (Dict)
24+
25+type alias QuickType =
26+ { value : Float
27+ }
28+
29+-- decoders and encoders
30+optionalField key decoder fallback =
31+ Jdec.dict Jdec.value
32+ |> Jdec.andThen (\m ->
33+ case Dict.get key m of
34+ Nothing -> Jdec.succeed fallback
35+ Just x -> Jdec.decodeValue decoder x |> Result.map Jdec.succeed |> Result.withDefault (Jdec.fail ("Invalid " ++ key)))
36+
37+quickTypeToString : QuickType -> String
38+quickTypeToString r = Jenc.encode 0 (encodeQuickType r)
39+
40+quickType : Jdec.Decoder QuickType
41+quickType =
42+ Jdec.succeed QuickType
43+ |> Jpipe.required "value" (Jdec.andThen (\x -> if x >= 0.1 && x <= 0.9 then Jdec.succeed x else Jdec.fail "Number out of range") Jdec.float)
44+
45+encodeQuickType : QuickType -> Jenc.Value
46+encodeQuickType x =
47+ Jenc.object
48+ [ ("value", Jenc.float x.value)
49+ ]
50+
51+--- encoder helpers
52+
53+makeNullableEncoder : (a -> Jenc.Value) -> Maybe a -> Jenc.Value
54+makeNullableEncoder f m =
55+ case m of
56+ Just x -> f x
57+ Nothing -> Jenc.null
Aschema-flowdefault / TopLevel.js+210 −0
@@ -0,0 +1,210 @@
1+// @flow
2+
3+// To parse this data:
4+//
5+// const Convert = require("./TopLevel");
6+//
7+// const topLevel = Convert.toTopLevel(json);
8+//
9+// These functions will throw an error if the JSON doesn't
10+// match the expected interface, even if the JSON is valid.
11+
12+export type TopLevel = {
13+ value: number;
14+ [property: string]: mixed | number;
15+};
16+
17+// Converts JSON strings to/from your types
18+// and asserts the results of JSON.parse at runtime
19+function toTopLevel(json: string): TopLevel {
20+ return cast(JSON.parse(json), r("TopLevel"));
21+}
22+
23+function topLevelToJson(value: TopLevel): string {
24+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
25+}
26+
27+function invalidValue(typ: any, val: any, key: any, parent: any = '') {
28+ const prettyTyp = prettyTypeName(typ);
29+ const parentText = parent ? ` on ${parent}` : '';
30+ const keyText = key ? ` for key "${key}"` : '';
31+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
32+}
33+
34+function prettyTypeName(typ: any): string {
35+ if (Array.isArray(typ)) {
36+ if (typ.length === 2 && typ[0] === undefined) {
37+ return `an optional ${prettyTypeName(typ[1])}`;
38+ } else {
39+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
40+ }
41+ } else if (typeof typ === "object" && typ.literal !== undefined) {
42+ return typ.literal;
43+ } else {
44+ return typeof typ;
45+ }
46+}
47+
48+function jsonToJSProps(typ: any): any {
49+ if (typ.jsonToJS === undefined) {
50+ const map: any = {};
51+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
52+ typ.jsonToJS = map;
53+ }
54+ return typ.jsonToJS;
55+}
56+
57+function jsToJSONProps(typ: any): any {
58+ if (typ.jsToJSON === undefined) {
59+ const map: any = {};
60+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
61+ typ.jsToJSON = map;
62+ }
63+ return typ.jsToJSON;
64+}
65+
66+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
67+ function transformPrimitive(typ: string, val: any): any {
68+ if (typeof typ === typeof val) return val;
69+ return invalidValue(typ, val, key, parent);
70+ }
71+
72+ function transformUnion(typs: any[], val: any): any {
73+ // val must validate against one typ in typs
74+ const l = typs.length;
75+ for (let i = 0; i < l; i++) {
76+ const typ = typs[i];
77+ try {
78+ return transform(val, typ, getProps);
79+ } catch (_) {}
80+ }
81+ return invalidValue(typs, val, key, parent);
82+ }
83+
84+ function transformEnum(cases: string[], val: any): any {
85+ if (cases.indexOf(val) !== -1) return val;
86+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
87+ }
88+
89+ function transformArray(typ: any, val: any): any {
90+ // val must be an array with no invalid elements
91+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
92+
93+ return val.map(el => transform(el, typ, getProps));
94+ }
95+
96+ function transformDate(val: any): any {
97+ if (val === null) {
98+ return null;
99+ }
100+ const d = new Date(val);
101+ if (isNaN(d.valueOf())) {
102+ return invalidValue(l("Date"), val, key, parent);
103+ }
104+ return d;
105+ }
106+
107+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
108+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
109+ return invalidValue(l(ref || "object"), val, key, parent);
110+ }
111+ const result: any = {};
112+ Object.getOwnPropertyNames(props).forEach(key => {
113+ const prop = props[key];
114+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
115+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
116+ });
117+ Object.getOwnPropertyNames(val).forEach(key => {
118+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
119+ result[key] = transform(val[key], additional, getProps, key, ref);
120+ }
121+ });
122+ return result;
123+ }
124+
125+ if (typ === "any") return val;
126+ if (typ === null) {
127+ if (val === null) return val;
128+ return invalidValue(typ, val, key, parent);
129+ }
130+ if (typ === false) return invalidValue(typ, val, key, parent);
131+ let ref: any = undefined;
132+ while (typeof typ === "object" && typ.ref !== undefined) {
133+ ref = typ.ref;
134+ typ = typeMap[typ.ref];
135+ }
136+ if (Array.isArray(typ)) return transformEnum(typ, val);
137+ if (typeof typ === "object") {
138+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
143+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
144+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
145+ : invalidValue(typ, val, key, parent);
146+ }
147+ // Numbers can be parsed by Date but shouldn't be.
148+ if (typ === Date && typeof val !== "number") return transformDate(val);
149+ return transformPrimitive(typ, val);
150+}
151+
152+function cast<T>(val: any, typ: any): T {
153+ return transform(val, typ, jsonToJSProps);
154+}
155+
156+function uncast<T>(val: T, typ: any): any {
157+ return transform(val, typ, jsToJSONProps);
158+}
159+
160+function l(typ: any) {
161+ return { literal: typ };
162+}
163+
164+function a(typ: any) {
165+ return { arrayItems: typ };
166+}
167+
168+function i(typ: any) {
169+ return { integer: typ };
170+}
171+
172+function p(pattern: any) {
173+ return { pattern };
174+}
175+
176+function s(typ: any, min: any, max: any) {
177+ return { string: typ, min, max };
178+}
179+
180+function n(typ: any, min: any, max: any) {
181+ return { number: typ, min, max };
182+}
183+
184+function u(...typs: any[]) {
185+ return { unionMembers: typs };
186+}
187+
188+function o(props: any[], additional: any) {
189+ return { props, additional };
190+}
191+
192+function m(additional: any) {
193+ const props: any[] = [];
194+ return { props, additional };
195+}
196+
197+function r(name: string) {
198+ return { ref: name };
199+}
200+
201+const typeMap: any = {
202+ "TopLevel": o([
203+ { json: "value", js: "value", typ: n(3.14, 0.1, 0.9) },
204+ ], "any"),
205+};
206+
207+module.exports = {
208+ "topLevelToJson": topLevelToJson,
209+ "toTopLevel": toTopLevel,
210+};
Aschema-golangdefault / quicktype.go+23 −0
@@ -0,0 +1,23 @@
1+// Code generated from JSON Schema using quicktype. DO NOT EDIT.
2+// To parse and unparse this JSON data, add this code to your project and do:
3+//
4+// topLevel, err := UnmarshalTopLevel(bytes)
5+// bytes, err = topLevel.Marshal()
6+
7+package main
8+
9+import "encoding/json"
10+
11+func UnmarshalTopLevel(data []byte) (TopLevel, error) {
12+ var r TopLevel
13+ err := json.Unmarshal(data, &r)
14+ return r, err
15+}
16+
17+func (r *TopLevel) Marshal() ([]byte, error) {
18+ return json.Marshal(r)
19+}
20+
21+type TopLevel struct {
22+ Value float64 `json:"value"`
23+}
Aschema-haskelldefault / QuickType.hs+30 −0
@@ -0,0 +1,30 @@
1+{-# LANGUAGE StrictData #-}
2+{-# LANGUAGE OverloadedStrings #-}
3+
4+module QuickType
5+ ( QuickType (..)
6+ , decodeTopLevel
7+ ) where
8+
9+import Data.Aeson
10+import Data.Aeson.Types (emptyObject)
11+import Data.ByteString.Lazy (ByteString)
12+import Data.HashMap.Strict (HashMap)
13+import Data.Text (Text)
14+
15+data QuickType = QuickType
16+ { valueQuickType :: Double
17+ } deriving (Show)
18+
19+decodeTopLevel :: ByteString -> Maybe QuickType
20+decodeTopLevel = decode
21+
22+instance ToJSON QuickType where
23+ toJSON (QuickType valueQuickType) =
24+ object
25+ [ "value" .= valueQuickType
26+ ]
27+
28+instance FromJSON QuickType where
29+ parseJSON (Object v) = QuickType
30+ <$> v .: "value"
Aschema-java-datetime-legacydefault / src / main / java / io / quicktype / Converter.java+123 −0
@@ -0,0 +1,123 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+//
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.util.Date;
25+import java.text.SimpleDateFormat;
26+
27+public class Converter {
28+ // Date-time helpers
29+
30+ private static final String[] DATE_TIME_FORMATS = {
31+ "yyyy-MM-dd'T'HH:mm:ss.SX",
32+ "yyyy-MM-dd'T'HH:mm:ss.S",
33+ "yyyy-MM-dd'T'HH:mm:ssX",
34+ "yyyy-MM-dd'T'HH:mm:ss",
35+ "yyyy-MM-dd HH:mm:ss.SX",
36+ "yyyy-MM-dd HH:mm:ss.S",
37+ "yyyy-MM-dd HH:mm:ssX",
38+ "yyyy-MM-dd HH:mm:ss",
39+ "HH:mm:ss.SZ",
40+ "HH:mm:ss.S",
41+ "HH:mm:ssZ",
42+ "HH:mm:ss",
43+ "yyyy-MM-dd",
44+ };
45+
46+ public static Date parseAllDateTimeString(String str) {
47+ str = str.replaceFirst("(\\.\\d{3})\\d+", "$1");
48+ for (String format : DATE_TIME_FORMATS) {
49+ try {
50+ return new SimpleDateFormat(format).parse(str);
51+ } catch (Exception ex) {
52+ // Ignored
53+ }
54+ }
55+ return null;
56+ }
57+
58+ public static String serializeDateTime(Date datetime) {
59+ return new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ssZ").format(datetime);
60+ }
61+
62+ public static String serializeDate(Date datetime) {
63+ return new SimpleDateFormat("yyyy-MM-dd").format(datetime);
64+ }
65+
66+ public static String serializeTime(Date datetime) {
67+ return new SimpleDateFormat("hh:mm:ssZ").format(datetime);
68+ }
69+ // Serialize/deserialize helpers
70+
71+ public static TopLevel fromJsonString(String json) throws IOException {
72+ return getObjectReader().readValue(json);
73+ }
74+
75+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
76+ return getObjectWriter().writeValueAsString(obj);
77+ }
78+
79+ private static ObjectReader reader;
80+ private static ObjectWriter writer;
81+
82+ private static void instantiateMapper() {
83+ ObjectMapper mapper = new ObjectMapper();
84+ mapper.findAndRegisterModules();
85+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
86+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
87+ SimpleModule module = new SimpleModule();
88+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
89+ @Override
90+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
91+ String value = jsonParser.getText();
92+ return Converter.parseAllDateTimeString(value);
93+ }
94+ });
95+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
96+ @Override
97+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
98+ String value = jsonParser.getText();
99+ return Converter.parseAllDateTimeString(value);
100+ }
101+ });
102+ module.addDeserializer(Date.class, new JsonDeserializer<Date>() {
103+ @Override
104+ public Date deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
105+ String value = jsonParser.getText();
106+ return Converter.parseAllDateTimeString(value);
107+ }
108+ });
109+ mapper.registerModule(module);
110+ reader = mapper.readerFor(TopLevel.class);
111+ writer = mapper.writerFor(TopLevel.class);
112+ }
113+
114+ private static ObjectReader getObjectReader() {
115+ if (reader == null) instantiateMapper();
116+ return reader;
117+ }
118+
119+ private static ObjectWriter getObjectWriter() {
120+ if (writer == null) instantiateMapper();
121+ return writer;
122+ }
123+}
Aschema-java-datetime-legacydefault / src / main / java / io / quicktype / TopLevel.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private double value;
7+
8+ @JsonProperty("value")
9+ public double getValue() { return value; }
10+ @JsonProperty("value")
11+ public void setValue(double value) { this.value = value; }
12+}
Aschema-java-lombokdefault / src / main / java / io / quicktype / Converter.java+102 −0
@@ -0,0 +1,102 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
80+ SimpleModule module = new SimpleModule();
81+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
82+ @Override
83+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
84+ String value = jsonParser.getText();
85+ return Converter.parseDateTimeString(value);
86+ }
87+ });
88+ mapper.registerModule(module);
89+ reader = mapper.readerFor(TopLevel.class);
90+ writer = mapper.writerFor(TopLevel.class);
91+ }
92+
93+ private static ObjectReader getObjectReader() {
94+ if (reader == null) instantiateMapper();
95+ return reader;
96+ }
97+
98+ private static ObjectWriter getObjectWriter() {
99+ if (writer == null) instantiateMapper();
100+ return writer;
101+ }
102+}
Aschema-java-lombokdefault / src / main / java / io / quicktype / TopLevel.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private double value;
7+
8+ @JsonProperty("value")
9+ public double getValue() { return value; }
10+ @JsonProperty("value")
11+ public void setValue(double value) { this.value = value; }
12+}
Aschema-javadefault / src / main / java / io / quicktype / Converter.java+102 −0
@@ -0,0 +1,102 @@
1+// To use this code, add the following Maven dependency to your project:
2+//
3+//
4+// com.fasterxml.jackson.core : jackson-databind : 2.9.0
5+// com.fasterxml.jackson.datatype : jackson-datatype-jsr310 : 2.9.0
6+//
7+// Import this package:
8+//
9+// import io.quicktype.Converter;
10+//
11+// Then you can deserialize a JSON string with
12+//
13+// TopLevel data = Converter.fromJsonString(jsonString);
14+
15+package io.quicktype;
16+
17+import java.io.IOException;
18+import com.fasterxml.jackson.databind.*;
19+import com.fasterxml.jackson.databind.module.SimpleModule;
20+import com.fasterxml.jackson.core.JsonParser;
21+import com.fasterxml.jackson.core.JsonProcessingException;
22+import com.fasterxml.jackson.core.type.TypeReference;
23+import java.util.*;
24+import java.time.LocalDate;
25+import java.time.OffsetDateTime;
26+import java.time.OffsetTime;
27+import java.time.ZoneOffset;
28+import java.time.ZonedDateTime;
29+import java.time.format.DateTimeFormatter;
30+import java.time.format.DateTimeFormatterBuilder;
31+import java.time.temporal.ChronoField;
32+
33+public class Converter {
34+ // Date-time helpers
35+
36+ private static final DateTimeFormatter DATE_TIME_FORMATTER = new DateTimeFormatterBuilder()
37+ .appendOptional(DateTimeFormatter.ISO_DATE_TIME)
38+ .appendOptional(DateTimeFormatter.ISO_OFFSET_DATE_TIME)
39+ .appendOptional(DateTimeFormatter.ISO_INSTANT)
40+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SX"))
41+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ssX"))
42+ .appendOptional(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
43+ .toFormatter()
44+ .withZone(ZoneOffset.UTC);
45+
46+ public static OffsetDateTime parseDateTimeString(String str) {
47+ return ZonedDateTime.from(Converter.DATE_TIME_FORMATTER.parse(str)).toOffsetDateTime();
48+ }
49+
50+ private static final DateTimeFormatter TIME_FORMATTER = new DateTimeFormatterBuilder()
51+ .appendOptional(DateTimeFormatter.ISO_TIME)
52+ .appendOptional(DateTimeFormatter.ISO_OFFSET_TIME)
53+ .parseDefaulting(ChronoField.YEAR, 2020)
54+ .parseDefaulting(ChronoField.MONTH_OF_YEAR, 1)
55+ .parseDefaulting(ChronoField.DAY_OF_MONTH, 1)
56+ .toFormatter()
57+ .withZone(ZoneOffset.UTC);
58+
59+ public static OffsetTime parseTimeString(String str) {
60+ return ZonedDateTime.from(Converter.TIME_FORMATTER.parse(str)).toOffsetDateTime().toOffsetTime();
61+ }
62+ // Serialize/deserialize helpers
63+
64+ public static TopLevel fromJsonString(String json) throws IOException {
65+ return getObjectReader().readValue(json);
66+ }
67+
68+ public static String toJsonString(TopLevel obj) throws JsonProcessingException {
69+ return getObjectWriter().writeValueAsString(obj);
70+ }
71+
72+ private static ObjectReader reader;
73+ private static ObjectWriter writer;
74+
75+ private static void instantiateMapper() {
76+ ObjectMapper mapper = new ObjectMapper();
77+ mapper.findAndRegisterModules();
78+ mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
79+ mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
80+ SimpleModule module = new SimpleModule();
81+ module.addDeserializer(OffsetDateTime.class, new JsonDeserializer<OffsetDateTime>() {
82+ @Override
83+ public OffsetDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
84+ String value = jsonParser.getText();
85+ return Converter.parseDateTimeString(value);
86+ }
87+ });
88+ mapper.registerModule(module);
89+ reader = mapper.readerFor(TopLevel.class);
90+ writer = mapper.writerFor(TopLevel.class);
91+ }
92+
93+ private static ObjectReader getObjectReader() {
94+ if (reader == null) instantiateMapper();
95+ return reader;
96+ }
97+
98+ private static ObjectWriter getObjectWriter() {
99+ if (writer == null) instantiateMapper();
100+ return writer;
101+ }
102+}
Aschema-javadefault / src / main / java / io / quicktype / TopLevel.java+12 −0
@@ -0,0 +1,12 @@
1+package io.quicktype;
2+
3+import com.fasterxml.jackson.annotation.*;
4+
5+public class TopLevel {
6+ private double value;
7+
8+ @JsonProperty("value")
9+ public double getValue() { return value; }
10+ @JsonProperty("value")
11+ public void setValue(double value) { this.value = value; }
12+}
Aschema-javascript-prop-typesdefault / toplevel.js+20 −0
@@ -0,0 +1,20 @@
1+// Example usage:
2+//
3+// import { MyShape } from ./myShape.js;
4+//
5+// class MyComponent extends React.Component {
6+// //
7+// }
8+//
9+// MyComponent.propTypes = {
10+// input: MyShape
11+// };
12+
13+import PropTypes from "prop-types";
14+
15+let _TopLevel;
16+_TopLevel = PropTypes.shape({
17+ "value": PropTypes.oneOfType([(props, name) => { const value = props[name]; return value == null || (typeof value === 'number' && value >= 0.1 && value <= 0.9) ? null : new Error("Expected bounded number"); }]).isRequired,
18+});
19+
20+export const TopLevel = _TopLevel;
Aschema-javascriptdefault / TopLevel.js+203 −0
@@ -0,0 +1,203 @@
1+// To parse this data:
2+//
3+// const Convert = require("./TopLevel");
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+// Converts JSON strings to/from your types
11+// and asserts the results of JSON.parse at runtime
12+function toTopLevel(json) {
13+ return cast(JSON.parse(json), r("TopLevel"));
14+}
15+
16+function topLevelToJson(value) {
17+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
18+}
19+
20+function invalidValue(typ, val, key, parent = '') {
21+ const prettyTyp = prettyTypeName(typ);
22+ const parentText = parent ? ` on ${parent}` : '';
23+ const keyText = key ? ` for key "${key}"` : '';
24+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
25+}
26+
27+function prettyTypeName(typ) {
28+ if (Array.isArray(typ)) {
29+ if (typ.length === 2 && typ[0] === undefined) {
30+ return `an optional ${prettyTypeName(typ[1])}`;
31+ } else {
32+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
33+ }
34+ } else if (typeof typ === "object" && typ.literal !== undefined) {
35+ return typ.literal;
36+ } else {
37+ return typeof typ;
38+ }
39+}
40+
41+function jsonToJSProps(typ) {
42+ if (typ.jsonToJS === undefined) {
43+ const map = {};
44+ typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
45+ typ.jsonToJS = map;
46+ }
47+ return typ.jsonToJS;
48+}
49+
50+function jsToJSONProps(typ) {
51+ if (typ.jsToJSON === undefined) {
52+ const map = {};
53+ typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
54+ typ.jsToJSON = map;
55+ }
56+ return typ.jsToJSON;
57+}
58+
59+function transform(val, typ, getProps, key = '', parent = '') {
60+ function transformPrimitive(typ, val) {
61+ if (typeof typ === typeof val) return val;
62+ return invalidValue(typ, val, key, parent);
63+ }
64+
65+ function transformUnion(typs, val) {
66+ // val must validate against one typ in typs
67+ const l = typs.length;
68+ for (let i = 0; i < l; i++) {
69+ const typ = typs[i];
70+ try {
71+ return transform(val, typ, getProps);
72+ } catch (_) {}
73+ }
74+ return invalidValue(typs, val, key, parent);
75+ }
76+
77+ function transformEnum(cases, val) {
78+ if (cases.indexOf(val) !== -1) return val;
79+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
80+ }
81+
82+ function transformArray(typ, val) {
83+ // val must be an array with no invalid elements
84+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
85+
86+ return val.map(el => transform(el, typ, getProps));
87+ }
88+
89+ function transformDate(val) {
90+ if (val === null) {
91+ return null;
92+ }
93+ const d = new Date(val);
94+ if (isNaN(d.valueOf())) {
95+ return invalidValue(l("Date"), val, key, parent);
96+ }
97+ return d;
98+ }
99+
100+ function transformObject(props, additional, val) {
101+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
102+ return invalidValue(l(ref || "object"), val, key, parent);
103+ }
104+ const result = {};
105+ Object.getOwnPropertyNames(props).forEach(key => {
106+ const prop = props[key];
107+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
108+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
109+ });
110+ Object.getOwnPropertyNames(val).forEach(key => {
111+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
112+ result[key] = transform(val[key], additional, getProps, key, ref);
113+ }
114+ });
115+ return result;
116+ }
117+
118+ if (typ === "any") return val;
119+ if (typ === null) {
120+ if (val === null) return val;
121+ return invalidValue(typ, val, key, parent);
122+ }
123+ if (typ === false) return invalidValue(typ, val, key, parent);
124+ let ref = undefined;
125+ while (typeof typ === "object" && typ.ref !== undefined) {
126+ ref = typ.ref;
127+ typ = typeMap[typ.ref];
128+ }
129+ if (Array.isArray(typ)) return transformEnum(typ, val);
130+ if (typeof typ === "object") {
131+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
136+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
137+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
138+ : invalidValue(typ, val, key, parent);
139+ }
140+ // Numbers can be parsed by Date but shouldn't be.
141+ if (typ === Date && typeof val !== "number") return transformDate(val);
142+ return transformPrimitive(typ, val);
143+}
144+
145+function cast(val, typ) {
146+ return transform(val, typ, jsonToJSProps);
147+}
148+
149+function uncast(val, typ) {
150+ return transform(val, typ, jsToJSONProps);
151+}
152+
153+function l(typ) {
154+ return { literal: typ };
155+}
156+
157+function a(typ) {
158+ return { arrayItems: typ };
159+}
160+
161+function i(typ) {
162+ return { integer: typ };
163+}
164+
165+function p(pattern) {
166+ return { pattern };
167+}
168+
169+function s(typ, min, max) {
170+ return { string: typ, min, max };
171+}
172+
173+function n(typ, min, max) {
174+ return { number: typ, min, max };
175+}
176+
177+function u(...typs) {
178+ return { unionMembers: typs };
179+}
180+
181+function o(props, additional) {
182+ return { props, additional };
183+}
184+
185+function m(additional) {
186+ const props = [];
187+ return { props, additional };
188+}
189+
190+function r(name) {
191+ return { ref: name };
192+}
193+
194+const typeMap = {
195+ "TopLevel": o([
196+ { json: "value", js: "value", typ: n(3.14, 0.1, 0.9) },
197+ ], "any"),
198+};
199+
200+module.exports = {
201+ "topLevelToJson": topLevelToJson,
202+ "toTopLevel": toTopLevel,
203+};
Aschema-kotlin-jacksondefault / TopLevel.kt+34 −0
@@ -0,0 +1,34 @@
1+// To parse the JSON, install jackson-module-kotlin and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.fasterxml.jackson.annotation.*
8+import com.fasterxml.jackson.core.*
9+import com.fasterxml.jackson.databind.*
10+import com.fasterxml.jackson.databind.deser.std.StdDeserializer
11+import com.fasterxml.jackson.databind.module.SimpleModule
12+import com.fasterxml.jackson.databind.node.*
13+import com.fasterxml.jackson.databind.ser.std.StdSerializer
14+import com.fasterxml.jackson.module.kotlin.*
15+
16+val mapper = jacksonObjectMapper().apply {
17+ propertyNamingStrategy = object : PropertyNamingStrategy.PropertyNamingStrategyBase() { override fun translate(name: String) = if (name == "empty") "" else name }
18+ setSerializationInclusion(JsonInclude.Include.NON_NULL)
19+}
20+
21+data class TopLevel (
22+ @get:JsonProperty(required=true)@field:JsonProperty(required=true)
23+ val value: Double
24+) {
25+ init {
26+ require(value >= 0.1)
27+ require(value <= 0.9)
28+ }
29+ fun toJson() = mapper.writeValueAsString(this)
30+
31+ companion object {
32+ fun fromJson(json: String) = mapper.readValue<TopLevel>(json)
33+ }
34+}
Aschema-kotlindefault / TopLevel.kt+25 −0
@@ -0,0 +1,25 @@
1+// To parse the JSON, install Klaxon and do:
2+//
3+// val topLevel = TopLevel.fromJson(jsonString)
4+
5+package quicktype
6+
7+import com.beust.klaxon.*
8+
9+private val klaxon = Klaxon()
10+
11+data class TopLevel (
12+ val value: Double
13+) {
14+ init {
15+ require(value >= 0.1)
16+ }
17+ init {
18+ require(value <= 0.9)
19+ }
20+ public fun toJson() = klaxon.toJsonString(this)
21+
22+ companion object {
23+ public fun fromJson(json: String) = klaxon.parse<TopLevel>(json)
24+ }
25+}
Aschema-kotlinxdefault / TopLevel.kt+16 −0
@@ -0,0 +1,16 @@
1+// To parse the JSON, install kotlin's serialization plugin and do:
2+//
3+// val json = Json { allowStructuredMapKeys = true }
4+// val topLevel = json.parse(TopLevel.serializer(), jsonString)
5+
6+package quicktype
7+
8+import kotlinx.serialization.*
9+import kotlinx.serialization.json.*
10+import kotlinx.serialization.descriptors.*
11+import kotlinx.serialization.encoding.*
12+
13+@Serializable
14+data class TopLevel (
15+ val value: Double
16+)
Aschema-objective-cdefault / QTTopLevel.h+30 −0
@@ -0,0 +1,30 @@
1+// To parse this JSON:
2+//
3+// NSError *error;
4+// QTTopLevel *topLevel = [QTTopLevel fromJSON:json encoding:NSUTF8Encoding error:&error];
5+
6+#import <Foundation/Foundation.h>
7+
8+@class QTTopLevel;
9+
10+NS_ASSUME_NONNULL_BEGIN
11+
12+#pragma mark - Top-level marshaling functions
13+
14+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error);
15+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error);
16+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error);
17+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error);
18+
19+#pragma mark - Object interfaces
20+
21+@interface QTTopLevel : NSObject
22+@property (nonatomic, assign) double value;
23+
24++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
25++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error;
26+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error;
27+- (NSData *_Nullable)toData:(NSError *_Nullable *)error;
28+@end
29+
30+NS_ASSUME_NONNULL_END
Aschema-objective-cdefault / QTTopLevel.m+115 −0
@@ -0,0 +1,115 @@
1+#import "QTTopLevel.h"
2+
3+#define λ(decl, expr) (^(decl) { return (expr); })
4+
5+static id NSNullify(id _Nullable x) {
6+ return (x == nil || x == NSNull.null) ? NSNull.null : x;
7+}
8+
9+NS_ASSUME_NONNULL_BEGIN
10+
11+@interface QTTopLevel (JSONConversion)
12++ (instancetype)fromJSONDictionary:(NSDictionary *)dict;
13+- (NSDictionary *)JSONDictionary;
14+@end
15+
16+#pragma mark - JSON serialization
17+
18+QTTopLevel *_Nullable QTTopLevelFromData(NSData *data, NSError **error)
19+{
20+ @try {
21+ id json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingAllowFragments error:error];
22+ return *error ? nil : [QTTopLevel fromJSONDictionary:json];
23+ } @catch (NSException *exception) {
24+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
25+ return nil;
26+ }
27+}
28+
29+QTTopLevel *_Nullable QTTopLevelFromJSON(NSString *json, NSStringEncoding encoding, NSError **error)
30+{
31+ return QTTopLevelFromData([json dataUsingEncoding:encoding], error);
32+}
33+
34+NSData *_Nullable QTTopLevelToData(QTTopLevel *topLevel, NSError **error)
35+{
36+ @try {
37+ id json = [topLevel JSONDictionary];
38+ NSData *data = [NSJSONSerialization dataWithJSONObject:json options:NSJSONWritingFragmentsAllowed error:error];
39+ return *error ? nil : data;
40+ } @catch (NSException *exception) {
41+ *error = [NSError errorWithDomain:@"JSONSerialization" code:-1 userInfo:@{ @"exception": exception }];
42+ return nil;
43+ }
44+}
45+
46+NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding encoding, NSError **error)
47+{
48+ NSData *data = QTTopLevelToData(topLevel, error);
49+ return data ? [[NSString alloc] initWithData:data encoding:encoding] : nil;
50+}
51+
52+@implementation QTTopLevel
53++ (NSDictionary<NSString *, NSString *> *)properties
54+{
55+ static NSDictionary<NSString *, NSString *> *properties;
56+ return properties = properties ? properties : @{
57+ @"value": @"value",
58+ };
59+}
60+
61++ (_Nullable instancetype)fromData:(NSData *)data error:(NSError *_Nullable *)error
62+{
63+ return QTTopLevelFromData(data, error);
64+}
65+
66++ (_Nullable instancetype)fromJSON:(NSString *)json encoding:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
67+{
68+ return QTTopLevelFromJSON(json, encoding, error);
69+}
70+
71++ (instancetype)fromJSONDictionary:(NSDictionary *)dict
72+{
73+ return [dict isKindOfClass:NSDictionary.class] ? [[QTTopLevel alloc] initWithJSONDictionary:dict] : nil;
74+}
75+
76+- (instancetype)initWithJSONDictionary:(NSDictionary *)dict
77+{
78+ if (self = [super init]) {
79+ if (dict[@"value"] && [dict[@"value"] doubleValue] < 0.1) return nil;
80+ if (dict[@"value"] && [dict[@"value"] doubleValue] > 0.9) return nil;
81+ if (![dict[@"value"] isKindOfClass:NSNumber.class]) return nil;
82+ [self setValuesForKeysWithDictionary:dict];
83+ }
84+ return self;
85+}
86+
87+- (void)setValue:(nullable id)value forKey:(NSString *)key
88+{
89+ id resolved = QTTopLevel.properties[key];
90+ if (resolved) [super setValue:value forKey:resolved];
91+}
92+
93+- (void)setNilValueForKey:(NSString *)key
94+{
95+ id resolved = QTTopLevel.properties[key];
96+ if (resolved) [super setValue:@(0) forKey:resolved];
97+}
98+
99+- (NSDictionary *)JSONDictionary
100+{
101+ return [self dictionaryWithValuesForKeys:QTTopLevel.properties.allValues];
102+}
103+
104+- (NSData *_Nullable)toData:(NSError *_Nullable *)error
105+{
106+ return QTTopLevelToData(self, error);
107+}
108+
109+- (NSString *_Nullable)toJSON:(NSStringEncoding)encoding error:(NSError *_Nullable *)error
110+{
111+ return QTTopLevelToJSON(self, encoding, error);
112+}
113+@end
114+
115+NS_ASSUME_NONNULL_END
Aschema-phpdefault / TopLevel.php+105 −0
@@ -0,0 +1,105 @@
1+<?php
2+declare(strict_types=1);
3+
4+// This is an autogenerated file:TopLevel
5+
6+class TopLevel {
7+ private float $value; // json:value Required
8+
9+ /**
10+ * @param float $value
11+ */
12+ public function __construct(float $value) {
13+ $this->value = $value;
14+ }
15+
16+ /**
17+ * @param float $value
18+ * @throws Exception
19+ * @return float
20+ */
21+ public static function fromValue(float $value): float {
22+ return $value; /*float*/
23+ }
24+
25+ /**
26+ * @throws Exception
27+ * @return float
28+ */
29+ public function toValue(): float {
30+ if (TopLevel::validateValue($this->value)) {
31+ return $this->value; /*float*/
32+ }
33+ throw new Exception('never get to this TopLevel::value');
34+ }
35+
36+ /**
37+ * @param float
38+ * @return bool
39+ * @throws Exception
40+ */
41+ public static function validateValue(float $value): bool {
42+ if ($value < 0.1) throw new Exception("Attribute Error");
43+ if ($value > 0.9) throw new Exception("Attribute Error");
44+ return true;
45+ }
46+
47+ /**
48+ * @throws Exception
49+ * @return float
50+ */
51+ public function getValue(): float {
52+ if (TopLevel::validateValue($this->value)) {
53+ return $this->value;
54+ }
55+ throw new Exception('never get to getValue TopLevel::value');
56+ }
57+
58+ /**
59+ * @return float
60+ */
61+ public static function sampleValue(): float {
62+ return 31.031; /*31:value*/
63+ }
64+
65+ /**
66+ * @throws Exception
67+ * @return bool
68+ */
69+ public function validate(): bool {
70+ return TopLevel::validateValue($this->value);
71+ }
72+
73+ /**
74+ * @return stdClass
75+ * @throws Exception
76+ */
77+ public function to(): stdClass {
78+ $out = new stdClass();
79+ $out->{'value'} = $this->toValue();
80+ return $out;
81+ }
82+
83+ /**
84+ * @param stdClass $obj
85+ * @return TopLevel
86+ * @throws Exception
87+ */
88+ public static function from(stdClass $obj): TopLevel {
89+ if (!property_exists($obj, 'value')) {
90+ throw new Exception("Missing required property");
91+ }
92+ return new TopLevel(
93+ TopLevel::fromValue($obj->{'value'})
94+ );
95+ }
96+
97+ /**
98+ * @return TopLevel
99+ */
100+ public static function sample(): TopLevel {
101+ return new TopLevel(
102+ TopLevel::sampleValue()
103+ );
104+ }
105+}
Aschema-pikedefault / TopLevel.pmod+35 −0
@@ -0,0 +1,35 @@
1+// This source has been automatically generated by quicktype.
2+// ( https://github.com/quicktype/quicktype )
3+//
4+// To use this code, simply import it into your project as a Pike module.
5+// To JSON-encode your object, you can pass it to `Standards.JSON.encode`
6+// or call `encode_json` on it.
7+//
8+// To decode a JSON string, first pass it to `Standards.JSON.decode`,
9+// and then pass the result to `<YourClass>_from_JSON`.
10+// It will return an instance of <YourClass>.
11+// Bear in mind that these functions have unexpected behavior,
12+// and will likely throw an error, if the JSON string does not
13+// match the expected interface, even if the JSON itself is valid.
14+
15+class TopLevel {
16+ float value; // json: "value"
17+
18+ string encode_json() {
19+ mapping(string:mixed) json = ([
20+ "value" : value,
21+ ]);
22+
23+ return Standards.JSON.encode(json);
24+ }
25+}
26+
27+TopLevel TopLevel_from_JSON(mixed json) {
28+ TopLevel retval = TopLevel();
29+
30+ if (json["value"] < 0.1) error("Value below minimum");
31+ if (json["value"] > 0.9) error("Value above maximum");
32+ retval.value = (float)json["value"];
33+
34+ return retval;
35+}
Aschema-pythondefault / quicktype.py+44 −0
@@ -0,0 +1,44 @@
1+from dataclasses import dataclass
2+from typing import Any, TypeVar, Type, cast
3+
4+
5+T = TypeVar("T")
6+
7+
8+def from_float(x: Any) -> float:
9+ assert isinstance(x, (float, int)) and not isinstance(x, bool)
10+ return float(x)
11+
12+
13+def to_float(x: Any) -> float:
14+ assert isinstance(x, (int, float))
15+ return x
16+
17+
18+def to_class(c: Type[T], x: Any) -> dict:
19+ assert isinstance(x, c)
20+ return cast(Any, x).to_dict()
21+
22+
23+@dataclass
24+class TopLevel:
25+ value: float
26+
27+ @staticmethod
28+ def from_dict(obj: Any) -> 'TopLevel':
29+ assert isinstance(obj, dict)
30+ value = from_float(obj.get("value"))
31+ return TopLevel(value)
32+
33+ def to_dict(self) -> dict:
34+ result: dict = {}
35+ result["value"] = to_float(self.value)
36+ return result
37+
38+
39+def top_level_from_dict(s: Any) -> TopLevel:
40+ return TopLevel.from_dict(s)
41+
42+
43+def top_level_to_dict(x: TopLevel) -> Any:
44+ return to_class(TopLevel, x)
Aschema-rubydefault / TopLevel.rb+45 −0
@@ -0,0 +1,45 @@
1+# This code may look unusually verbose for Ruby (and it is), but
2+# it performs some subtle and complex validation of JSON data.
3+#
4+# To parse this JSON, add 'dry-struct' and 'dry-types' gems, then do:
5+#
6+# top_level = TopLevel.from_json! "{…}"
7+# puts top_level.value
8+#
9+# If from_json! succeeds, the value returned matches the schema.
10+
11+require 'json'
12+require 'dry-types'
13+require 'dry-struct'
14+
15+module Types
16+ include Dry.Types(default: :nominal)
17+
18+ Hash = Strict::Hash
19+ Double = Strict::Float | Strict::Integer
20+end
21+
22+class TopLevel < Dry::Struct
23+ attribute :value, Types::Double.constrained(gteq: 0.1, lteq: 0.9)
24+
25+ def self.from_dynamic!(d)
26+ d = Types::Hash[d]
27+ new(
28+ value: d.fetch("value"),
29+ )
30+ end
31+
32+ def self.from_json!(json)
33+ from_dynamic!(JSON.parse(json))
34+ end
35+
36+ def to_dynamic
37+ {
38+ "value" => value,
39+ }
40+ end
41+
42+ def to_json(options = nil)
43+ JSON.generate(to_dynamic, options)
44+ end
45+end
Aschema-rustdefault / module_under_test.rs+19 −0
@@ -0,0 +1,19 @@
1+// Example code that deserializes and serializes the model.
2+// extern crate serde;
3+// #[macro_use]
4+// extern crate serde_derive;
5+// extern crate serde_json;
6+//
7+// use generated_module::TopLevel;
8+//
9+// fn main() {
10+// let json = r#"{"answer": 42}"#;
11+// let model: TopLevel = serde_json::from_str(&json).unwrap();
12+// }
13+
14+use serde::{Serialize, Deserialize};
15+
16+#[derive(Debug, Clone, Serialize, Deserialize)]
17+pub struct TopLevel {
18+ pub value: f64,
19+}
Aschema-scala3-upickledefault / TopLevel.scala+72 −0
@@ -0,0 +1,72 @@
1+package quicktype
2+
3+// Custom pickler so that missing keys and JSON nulls both read as None,
4+// and None is left out when writing (upickle's default for Option is a
5+// JSON array).
6+object OptionPickler extends upickle.AttributeTagged:
7+ import upickle.default.Writer
8+ import upickle.default.Reader
9+ override implicit def OptionWriter[T: Writer]: Writer[Option[T]] =
10+ implicitly[Writer[T]].comap[Option[T]] {
11+ case None => null.asInstanceOf[T]
12+ case Some(x) => x
13+ }
14+
15+ override implicit def OptionReader[T: Reader]: Reader[Option[T]] = {
16+ new Reader.Delegate[Any, Option[T]](implicitly[Reader[T]].map(Some(_))){
17+ override def visitNull(index: Int) = None
18+ }
19+ }
20+end OptionPickler
21+
22+// If a union has a null in, then we'll need this too...
23+type NullValue = None.type
24+given OptionPickler.ReadWriter[NullValue] = OptionPickler.readwriter[ujson.Value].bimap[NullValue](
25+ _ => ujson.Null,
26+ json => if json.isNull then None else throw new upickle.core.Abort("not null")
27+)
28+given OptionPickler.ReadWriter[java.time.Instant] = OptionPickler.readwriter[String].bimap(_.toString, java.time.Instant.parse)
29+
30+object JsonExt:
31+ val valueReader = OptionPickler.readwriter[ujson.Value]
32+
33+ // upickle's built-in primitive readers are lenient -- the numeric and
34+ // boolean readers accept strings, and the string reader accepts
35+ // numbers and booleans -- so untagged unions need strict readers to
36+ // pick the right member.
37+ val strictString: OptionPickler.Reader[String] = valueReader.map {
38+ case ujson.Str(s) => s
39+ case json => throw new upickle.core.Abort("expected string, got " + json)
40+ }
41+ val strictLong: OptionPickler.Reader[Long] = valueReader.map {
42+ case ujson.Num(n) if n.isWhole => n.toLong
43+ case json => throw new upickle.core.Abort("expected integer, got " + json)
44+ }
45+ val strictDouble: OptionPickler.Reader[Double] = valueReader.map {
46+ case ujson.Num(n) => n
47+ case json => throw new upickle.core.Abort("expected number, got " + json)
48+ }
49+ val strictBoolean: OptionPickler.Reader[Boolean] = valueReader.map {
50+ case ujson.Bool(b) => b
51+ case json => throw new upickle.core.Abort("expected boolean, got " + json)
52+ }
53+
54+ def badMerge[T](r1: => OptionPickler.Reader[?], rest: OptionPickler.Reader[?]*): OptionPickler.Reader[T] = valueReader.map { json =>
55+ var t: T | Null = null
56+ val stack = Vector.newBuilder[Throwable]
57+ (r1 +: rest).foreach { reader =>
58+ if t == null then
59+ try
60+ t = OptionPickler.read[T](json, trace = true)(using reader.asInstanceOf[OptionPickler.Reader[T]])
61+ catch
62+ case exc => stack += exc
63+ }
64+ if t != null then t.nn else throw new Exception(json.toString(), stack.result().headOption.getOrElse(null))
65+ }
66+end JsonExt
67+given OptionPickler.Reader[Long] = JsonExt.strictLong
68+
69+
70+case class TopLevel (
71+ val value : Double
72+) derives OptionPickler.ReadWriter
Aschema-scala3default / TopLevel.scala+12 −0
@@ -0,0 +1,12 @@
1+package quicktype
2+
3+import io.circe.syntax._
4+import io.circe._
5+import cats.syntax.functor._
6+
7+// If a union has a null in, then we'll need this too...
8+type NullValue = None.type
9+
10+case class TopLevel (
11+ val value : Double
12+) derives Encoder.AsObject, Decoder
Aschema-schemadefault / TopLevel.schema+21 −0
@@ -0,0 +1,21 @@
1+{
2+ "$schema": "http://json-schema.org/draft-06/schema#",
3+ "$ref": "#/definitions/TopLevel",
4+ "definitions": {
5+ "TopLevel": {
6+ "type": "object",
7+ "additionalProperties": {},
8+ "properties": {
9+ "value": {
10+ "type": "number",
11+ "minimum": 0.1,
12+ "maximum": 0.9
13+ }
14+ },
15+ "required": [
16+ "value"
17+ ],
18+ "title": "TopLevel"
19+ }
20+ }
21+}
Aschema-swiftdefault / quicktype.swift+86 −0
@@ -0,0 +1,86 @@
1+// This file was generated from JSON Schema using quicktype, do not modify it directly.
2+// To parse the JSON, add this file to your project and do:
3+//
4+// let topLevel = try TopLevel(json)
5+
6+import Foundation
7+
8+// MARK: - TopLevel
9+struct TopLevel: Codable {
10+ let value: Double
11+
12+ enum CodingKeys: String, CodingKey {
13+ case value = "value"
14+ }
15+}
16+
17+// MARK: TopLevel convenience initializers and mutators
18+
19+extension TopLevel {
20+ init(data: Data) throws {
21+ self = try newJSONDecoder().decode(TopLevel.self, from: data)
22+ }
23+
24+ init(_ json: String, using encoding: String.Encoding = .utf8) throws {
25+ guard let data = json.data(using: encoding) else {
26+ throw NSError(domain: "JSONDecoding", code: 0, userInfo: nil)
27+ }
28+ try self.init(data: data)
29+ }
30+
31+ init(fromURL url: URL) throws {
32+ try self.init(data: try Data(contentsOf: url))
33+ }
34+
35+ func with(
36+ value: Double? = nil
37+ ) -> TopLevel {
38+ return TopLevel(
39+ value: value ?? self.value
40+ )
41+ }
42+
43+ func jsonData() throws -> Data {
44+ return try newJSONEncoder().encode(self)
45+ }
46+
47+ func jsonString(encoding: String.Encoding = .utf8) throws -> String? {
48+ return String(data: try self.jsonData(), encoding: encoding)
49+ }
50+}
51+
52+// MARK: - Helper functions for creating encoders and decoders
53+
54+func newJSONDecoder() -> JSONDecoder {
55+ let decoder = JSONDecoder()
56+ decoder.dateDecodingStrategy = .custom({ (decoder) -> Date in
57+ let container = try decoder.singleValueContainer()
58+ let dateStr = try container.decode(String.self)
59+
60+ let formatter = DateFormatter()
61+ formatter.calendar = Calendar(identifier: .iso8601)
62+ formatter.locale = Locale(identifier: "en_US_POSIX")
63+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
64+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
65+ if let date = formatter.date(from: dateStr) {
66+ return date
67+ }
68+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssXXXXX"
69+ if let date = formatter.date(from: dateStr) {
70+ return date
71+ }
72+ throw DecodingError.typeMismatch(Date.self, DecodingError.Context(codingPath: decoder.codingPath, debugDescription: "Could not decode date"))
73+ })
74+ return decoder
75+}
76+
77+func newJSONEncoder() -> JSONEncoder {
78+ let encoder = JSONEncoder()
79+ let formatter = DateFormatter()
80+ formatter.calendar = Calendar(identifier: .iso8601)
81+ formatter.locale = Locale(identifier: "en_US_POSIX")
82+ formatter.timeZone = TimeZone(secondsFromGMT: 0)
83+ formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSSSSXXXXX"
84+ encoder.dateEncodingStrategy = .formatted(formatter)
85+ return encoder
86+}
Aschema-typescript-effect-schemadefault / TopLevel.ts+6 −0
@@ -0,0 +1,6 @@
1+import * as S from "effect/Schema";
2+
3+
4+export class TopLevel extends S.Class<TopLevel>("TopLevel")({
5+ "value": S.Number.pipe(S.greaterThanOrEqualTo(0.1)).pipe(S.lessThanOrEqualTo(0.9)),
6+}) {}
Aschema-typescript-zoddefault / TopLevel.ts+7 −0
@@ -0,0 +1,7 @@
1+import * as z from "zod";
2+
3+
4+export const TopLevelSchema = z.object({
5+ "value": z.number().min(0.1).max(0.9),
6+});
7+export type TopLevel = z.infer<typeof TopLevelSchema>;
Aschema-typescriptdefault / TopLevel.ts+205 −0
@@ -0,0 +1,205 @@
1+// To parse this data:
2+//
3+// import { Convert, TopLevel } from "./TopLevel";
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+export interface TopLevel {
11+ value: number;
12+ [property: string]: unknown | number;
13+}
14+
15+// Converts JSON strings to/from your types
16+// and asserts the results of JSON.parse at runtime
17+export class Convert {
18+ public static toTopLevel(json: string): TopLevel {
19+ return cast(JSON.parse(json), r("TopLevel"));
20+ }
21+
22+ public static topLevelToJson(value: TopLevel): string {
23+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
24+ }
25+}
26+
27+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
28+ const prettyTyp = prettyTypeName(typ);
29+ const parentText = parent ? ` on ${parent}` : '';
30+ const keyText = key ? ` for key "${key}"` : '';
31+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
32+}
33+
34+function prettyTypeName(typ: any): string {
35+ if (Array.isArray(typ)) {
36+ if (typ.length === 2 && typ[0] === undefined) {
37+ return `an optional ${prettyTypeName(typ[1])}`;
38+ } else {
39+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
40+ }
41+ } else if (typeof typ === "object" && typ.literal !== undefined) {
42+ return typ.literal;
43+ } else {
44+ return typeof typ;
45+ }
46+}
47+
48+function jsonToJSProps(typ: any): any {
49+ if (typ.jsonToJS === undefined) {
50+ const map: any = {};
51+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
52+ typ.jsonToJS = map;
53+ }
54+ return typ.jsonToJS;
55+}
56+
57+function jsToJSONProps(typ: any): any {
58+ if (typ.jsToJSON === undefined) {
59+ const map: any = {};
60+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
61+ typ.jsToJSON = map;
62+ }
63+ return typ.jsToJSON;
64+}
65+
66+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
67+ function transformPrimitive(typ: string, val: any): any {
68+ if (typeof typ === typeof val) return val;
69+ return invalidValue(typ, val, key, parent);
70+ }
71+
72+ function transformUnion(typs: any[], val: any): any {
73+ // val must validate against one typ in typs
74+ const l = typs.length;
75+ for (let i = 0; i < l; i++) {
76+ const typ = typs[i];
77+ try {
78+ return transform(val, typ, getProps);
79+ } catch (_) {}
80+ }
81+ return invalidValue(typs, val, key, parent);
82+ }
83+
84+ function transformEnum(cases: string[], val: any): any {
85+ if (cases.indexOf(val) !== -1) return val;
86+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
87+ }
88+
89+ function transformArray(typ: any, val: any): any {
90+ // val must be an array with no invalid elements
91+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
92+
93+ return val.map(el => transform(el, typ, getProps));
94+ }
95+
96+ function transformDate(val: any): any {
97+ if (val === null) {
98+ return null;
99+ }
100+ const d = new Date(val);
101+ if (isNaN(d.valueOf())) {
102+ return invalidValue(l("Date"), val, key, parent);
103+ }
104+ return d;
105+ }
106+
107+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
108+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
109+ return invalidValue(l(ref || "object"), val, key, parent);
110+ }
111+ const result: any = {};
112+ Object.getOwnPropertyNames(props).forEach(key => {
113+ const prop = props[key];
114+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
115+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
116+ });
117+ Object.getOwnPropertyNames(val).forEach(key => {
118+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
119+ result[key] = transform(val[key], additional, getProps, key, ref);
120+ }
121+ });
122+ return result;
123+ }
124+
125+ if (typ === "any") return val;
126+ if (typ === null) {
127+ if (val === null) return val;
128+ return invalidValue(typ, val, key, parent);
129+ }
130+ if (typ === false) return invalidValue(typ, val, key, parent);
131+ let ref: any = undefined;
132+ while (typeof typ === "object" && typ.ref !== undefined) {
133+ ref = typ.ref;
134+ typ = typeMap[typ.ref];
135+ }
136+ if (Array.isArray(typ)) return transformEnum(typ, val);
137+ if (typeof typ === "object") {
138+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
143+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
144+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
145+ : invalidValue(typ, val, key, parent);
146+ }
147+ // Numbers can be parsed by Date but shouldn't be.
148+ if (typ === Date && typeof val !== "number") return transformDate(val);
149+ return transformPrimitive(typ, val);
150+}
151+
152+function cast<T>(val: any, typ: any): T {
153+ return transform(val, typ, jsonToJSProps);
154+}
155+
156+function uncast<T>(val: T, typ: any): any {
157+ return transform(val, typ, jsToJSONProps);
158+}
159+
160+function l(typ: any) {
161+ return { literal: typ };
162+}
163+
164+function a(typ: any) {
165+ return { arrayItems: typ };
166+}
167+
168+function i(typ: any) {
169+ return { integer: typ };
170+}
171+
172+function p(pattern: any) {
173+ return { pattern };
174+}
175+
176+function s(typ: any, min: any, max: any) {
177+ return { string: typ, min, max };
178+}
179+
180+function n(typ: any, min: any, max: any) {
181+ return { number: typ, min, max };
182+}
183+
184+function u(...typs: any[]) {
185+ return { unionMembers: typs };
186+}
187+
188+function o(props: any[], additional: any) {
189+ return { props, additional };
190+}
191+
192+function m(additional: any) {
193+ const props: any[] = [];
194+ return { props, additional };
195+}
196+
197+function r(name: string) {
198+ return { ref: name };
199+}
200+
201+const typeMap: any = {
202+ "TopLevel": o([
203+ { json: "value", js: "value", typ: n(3.14, 0.1, 0.9) },
204+ ], "any"),
205+};
Test case

test/inputs/schema/integer-type.schema

4 generated files · +792 −8
Mschema-csharp-recordsdefault / QuickType.cs+280 −0
@@ -26,27 +26,35 @@ namespace QuickType
2626 public partial record TopLevel
2727 {
2828 [JsonProperty("above_i32_max", Required = Required.Always)]
29+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
2930 public long AboveI32Max { get; set; }
3031
3132 [JsonProperty("below_i32_min", Required = Required.Always)]
33+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3234 public long BelowI32Min { get; set; }
3335
3436 [JsonProperty("i32_range", Required = Required.Always)]
37+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3538 public long I32Range { get; set; }
3639
3740 [JsonProperty("large_bounds", Required = Required.Always)]
41+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
3842 public long LargeBounds { get; set; }
3943
4044 [JsonProperty("only_maximum", Required = Required.Always)]
45+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
4146 public long OnlyMaximum { get; set; }
4247
4348 [JsonProperty("only_minimum", Required = Required.Always)]
49+ [JsonConverter(typeof(IndecentMinMaxValueCheckConverter))]
4450 public long OnlyMinimum { get; set; }
4551
4652 [JsonProperty("small_negative", Required = Required.Always)]
53+ [JsonConverter(typeof(HilariousMinMaxValueCheckConverter))]
4754 public long SmallNegative { get; set; }
4855
4956 [JsonProperty("small_positive", Required = Required.Always)]
57+ [JsonConverter(typeof(AmbitiousMinMaxValueCheckConverter))]
5058 public long SmallPositive { get; set; }
5159
5260 [JsonProperty("unbounded", Required = Required.Always)]
@@ -75,6 +83,278 @@ namespace QuickType
7583 },
7684 };
7785 }
86+
87+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
88+ {
89+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
90+
91+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
92+ {
93+ if (reader.TokenType == JsonToken.Null) return null;
94+ var value = serializer.Deserialize<long>(reader);
95+ if (value >= 0 && value <= 2147483648)
96+ {
97+ return value;
98+ }
99+ throw new Exception("Cannot unmarshal type long");
100+ }
101+
102+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
103+ {
104+ if (untypedValue == null)
105+ {
106+ serializer.Serialize(writer, null);
107+ return;
108+ }
109+ var value = (long)untypedValue;
110+ if (value >= 0 && value <= 2147483648)
111+ {
112+ serializer.Serialize(writer, value);
113+ return;
114+ }
115+ throw new Exception("Cannot marshal type long");
116+ }
117+
118+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
119+ }
120+
121+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
122+ {
123+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
124+
125+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
126+ {
127+ if (reader.TokenType == JsonToken.Null) return null;
128+ var value = serializer.Deserialize<long>(reader);
129+ if (value >= -2147483649 && value <= 0)
130+ {
131+ return value;
132+ }
133+ throw new Exception("Cannot unmarshal type long");
134+ }
135+
136+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
137+ {
138+ if (untypedValue == null)
139+ {
140+ serializer.Serialize(writer, null);
141+ return;
142+ }
143+ var value = (long)untypedValue;
144+ if (value >= -2147483649 && value <= 0)
145+ {
146+ serializer.Serialize(writer, value);
147+ return;
148+ }
149+ throw new Exception("Cannot marshal type long");
150+ }
151+
152+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
153+ }
154+
155+ internal class TentacledMinMaxValueCheckConverter : JsonConverter
156+ {
157+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
158+
159+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
160+ {
161+ if (reader.TokenType == JsonToken.Null) return null;
162+ var value = serializer.Deserialize<long>(reader);
163+ if (value >= -2147483648 && value <= 2147483647)
164+ {
165+ return value;
166+ }
167+ throw new Exception("Cannot unmarshal type long");
168+ }
169+
170+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
171+ {
172+ if (untypedValue == null)
173+ {
174+ serializer.Serialize(writer, null);
175+ return;
176+ }
177+ var value = (long)untypedValue;
178+ if (value >= -2147483648 && value <= 2147483647)
179+ {
180+ serializer.Serialize(writer, value);
181+ return;
182+ }
183+ throw new Exception("Cannot marshal type long");
184+ }
185+
186+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
187+ }
188+
189+ internal class StickyMinMaxValueCheckConverter : JsonConverter
190+ {
191+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
192+
193+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
194+ {
195+ if (reader.TokenType == JsonToken.Null) return null;
196+ var value = serializer.Deserialize<long>(reader);
197+ if (value >= -9007199254740991 && value <= 9007199254740991)
198+ {
199+ return value;
200+ }
201+ throw new Exception("Cannot unmarshal type long");
202+ }
203+
204+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
205+ {
206+ if (untypedValue == null)
207+ {
208+ serializer.Serialize(writer, null);
209+ return;
210+ }
211+ var value = (long)untypedValue;
212+ if (value >= -9007199254740991 && value <= 9007199254740991)
213+ {
214+ serializer.Serialize(writer, value);
215+ return;
216+ }
217+ throw new Exception("Cannot marshal type long");
218+ }
219+
220+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
221+ }
222+
223+ internal class IndigoMinMaxValueCheckConverter : JsonConverter
224+ {
225+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
226+
227+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
228+ {
229+ if (reader.TokenType == JsonToken.Null) return null;
230+ var value = serializer.Deserialize<long>(reader);
231+ if (value <= 0)
232+ {
233+ return value;
234+ }
235+ throw new Exception("Cannot unmarshal type long");
236+ }
237+
238+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
239+ {
240+ if (untypedValue == null)
241+ {
242+ serializer.Serialize(writer, null);
243+ return;
244+ }
245+ var value = (long)untypedValue;
246+ if (value <= 0)
247+ {
248+ serializer.Serialize(writer, value);
249+ return;
250+ }
251+ throw new Exception("Cannot marshal type long");
252+ }
253+
254+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
255+ }
256+
257+ internal class IndecentMinMaxValueCheckConverter : JsonConverter
258+ {
259+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
260+
261+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
262+ {
263+ if (reader.TokenType == JsonToken.Null) return null;
264+ var value = serializer.Deserialize<long>(reader);
265+ if (value >= 0)
266+ {
267+ return value;
268+ }
269+ throw new Exception("Cannot unmarshal type long");
270+ }
271+
272+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
273+ {
274+ if (untypedValue == null)
275+ {
276+ serializer.Serialize(writer, null);
277+ return;
278+ }
279+ var value = (long)untypedValue;
280+ if (value >= 0)
281+ {
282+ serializer.Serialize(writer, value);
283+ return;
284+ }
285+ throw new Exception("Cannot marshal type long");
286+ }
287+
288+ public static readonly IndecentMinMaxValueCheckConverter Singleton = new IndecentMinMaxValueCheckConverter();
289+ }
290+
291+ internal class HilariousMinMaxValueCheckConverter : JsonConverter
292+ {
293+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
294+
295+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
296+ {
297+ if (reader.TokenType == JsonToken.Null) return null;
298+ var value = serializer.Deserialize<long>(reader);
299+ if (value >= -100 && value <= 0)
300+ {
301+ return value;
302+ }
303+ throw new Exception("Cannot unmarshal type long");
304+ }
305+
306+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
307+ {
308+ if (untypedValue == null)
309+ {
310+ serializer.Serialize(writer, null);
311+ return;
312+ }
313+ var value = (long)untypedValue;
314+ if (value >= -100 && value <= 0)
315+ {
316+ serializer.Serialize(writer, value);
317+ return;
318+ }
319+ throw new Exception("Cannot marshal type long");
320+ }
321+
322+ public static readonly HilariousMinMaxValueCheckConverter Singleton = new HilariousMinMaxValueCheckConverter();
323+ }
324+
325+ internal class AmbitiousMinMaxValueCheckConverter : JsonConverter
326+ {
327+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
328+
329+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
330+ {
331+ if (reader.TokenType == JsonToken.Null) return null;
332+ var value = serializer.Deserialize<long>(reader);
333+ if (value >= 0 && value <= 100)
334+ {
335+ return value;
336+ }
337+ throw new Exception("Cannot unmarshal type long");
338+ }
339+
340+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
341+ {
342+ if (untypedValue == null)
343+ {
344+ serializer.Serialize(writer, null);
345+ return;
346+ }
347+ var value = (long)untypedValue;
348+ if (value >= 0 && value <= 100)
349+ {
350+ serializer.Serialize(writer, value);
351+ return;
352+ }
353+ throw new Exception("Cannot marshal type long");
354+ }
355+
356+ public static readonly AmbitiousMinMaxValueCheckConverter Singleton = new AmbitiousMinMaxValueCheckConverter();
357+ }
78358 }
79359 #pragma warning restore CS8618
80360 #pragma warning restore CS8601
Mschema-csharp-SystemTextJsondefault / QuickType.cs+224 −0
@@ -24,34 +24,42 @@ namespace QuickType
2424 {
2525 [JsonRequired]
2626 [JsonPropertyName("above_i32_max")]
27+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
2728 public long AboveI32Max { get; set; }
2829
2930 [JsonRequired]
3031 [JsonPropertyName("below_i32_min")]
32+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3133 public long BelowI32Min { get; set; }
3234
3335 [JsonRequired]
3436 [JsonPropertyName("i32_range")]
37+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3538 public long I32Range { get; set; }
3639
3740 [JsonRequired]
3841 [JsonPropertyName("large_bounds")]
42+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
3943 public long LargeBounds { get; set; }
4044
4145 [JsonRequired]
4246 [JsonPropertyName("only_maximum")]
47+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
4348 public long OnlyMaximum { get; set; }
4449
4550 [JsonRequired]
4651 [JsonPropertyName("only_minimum")]
52+ [JsonConverter(typeof(IndecentMinMaxValueCheckConverter))]
4753 public long OnlyMinimum { get; set; }
4854
4955 [JsonRequired]
5056 [JsonPropertyName("small_negative")]
57+ [JsonConverter(typeof(HilariousMinMaxValueCheckConverter))]
5158 public long SmallNegative { get; set; }
5259
5360 [JsonRequired]
5461 [JsonPropertyName("small_positive")]
62+ [JsonConverter(typeof(AmbitiousMinMaxValueCheckConverter))]
5563 public long SmallPositive { get; set; }
5664
5765 [JsonRequired]
@@ -81,6 +89,222 @@ namespace QuickType
8189 },
8290 };
8391 }
92+
93+ internal class PurpleMinMaxValueCheckConverter : JsonConverter<long>
94+ {
95+ public override bool CanConvert(Type t) => t == typeof(long);
96+
97+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
98+ {
99+ var value = reader.GetInt64();
100+ if (value >= 0 && value <= 2147483648)
101+ {
102+ return value;
103+ }
104+ throw new JsonException("Cannot unmarshal type long");
105+ }
106+
107+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
108+ {
109+ if (value >= 0 && value <= 2147483648)
110+ {
111+ JsonSerializer.Serialize(writer, value, options);
112+ return;
113+ }
114+ throw new NotSupportedException("Cannot marshal type long");
115+ }
116+
117+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
118+ }
119+
120+ internal class FluffyMinMaxValueCheckConverter : JsonConverter<long>
121+ {
122+ public override bool CanConvert(Type t) => t == typeof(long);
123+
124+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
125+ {
126+ var value = reader.GetInt64();
127+ if (value >= -2147483649 && value <= 0)
128+ {
129+ return value;
130+ }
131+ throw new JsonException("Cannot unmarshal type long");
132+ }
133+
134+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
135+ {
136+ if (value >= -2147483649 && value <= 0)
137+ {
138+ JsonSerializer.Serialize(writer, value, options);
139+ return;
140+ }
141+ throw new NotSupportedException("Cannot marshal type long");
142+ }
143+
144+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
145+ }
146+
147+ internal class TentacledMinMaxValueCheckConverter : JsonConverter<long>
148+ {
149+ public override bool CanConvert(Type t) => t == typeof(long);
150+
151+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
152+ {
153+ var value = reader.GetInt64();
154+ if (value >= -2147483648 && value <= 2147483647)
155+ {
156+ return value;
157+ }
158+ throw new JsonException("Cannot unmarshal type long");
159+ }
160+
161+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
162+ {
163+ if (value >= -2147483648 && value <= 2147483647)
164+ {
165+ JsonSerializer.Serialize(writer, value, options);
166+ return;
167+ }
168+ throw new NotSupportedException("Cannot marshal type long");
169+ }
170+
171+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
172+ }
173+
174+ internal class StickyMinMaxValueCheckConverter : JsonConverter<long>
175+ {
176+ public override bool CanConvert(Type t) => t == typeof(long);
177+
178+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
179+ {
180+ var value = reader.GetInt64();
181+ if (value >= -9007199254740991 && value <= 9007199254740991)
182+ {
183+ return value;
184+ }
185+ throw new JsonException("Cannot unmarshal type long");
186+ }
187+
188+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
189+ {
190+ if (value >= -9007199254740991 && value <= 9007199254740991)
191+ {
192+ JsonSerializer.Serialize(writer, value, options);
193+ return;
194+ }
195+ throw new NotSupportedException("Cannot marshal type long");
196+ }
197+
198+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
199+ }
200+
201+ internal class IndigoMinMaxValueCheckConverter : JsonConverter<long>
202+ {
203+ public override bool CanConvert(Type t) => t == typeof(long);
204+
205+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
206+ {
207+ var value = reader.GetInt64();
208+ if (value <= 0)
209+ {
210+ return value;
211+ }
212+ throw new JsonException("Cannot unmarshal type long");
213+ }
214+
215+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
216+ {
217+ if (value <= 0)
218+ {
219+ JsonSerializer.Serialize(writer, value, options);
220+ return;
221+ }
222+ throw new NotSupportedException("Cannot marshal type long");
223+ }
224+
225+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
226+ }
227+
228+ internal class IndecentMinMaxValueCheckConverter : JsonConverter<long>
229+ {
230+ public override bool CanConvert(Type t) => t == typeof(long);
231+
232+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
233+ {
234+ var value = reader.GetInt64();
235+ if (value >= 0)
236+ {
237+ return value;
238+ }
239+ throw new JsonException("Cannot unmarshal type long");
240+ }
241+
242+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
243+ {
244+ if (value >= 0)
245+ {
246+ JsonSerializer.Serialize(writer, value, options);
247+ return;
248+ }
249+ throw new NotSupportedException("Cannot marshal type long");
250+ }
251+
252+ public static readonly IndecentMinMaxValueCheckConverter Singleton = new IndecentMinMaxValueCheckConverter();
253+ }
254+
255+ internal class HilariousMinMaxValueCheckConverter : JsonConverter<long>
256+ {
257+ public override bool CanConvert(Type t) => t == typeof(long);
258+
259+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
260+ {
261+ var value = reader.GetInt64();
262+ if (value >= -100 && value <= 0)
263+ {
264+ return value;
265+ }
266+ throw new JsonException("Cannot unmarshal type long");
267+ }
268+
269+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
270+ {
271+ if (value >= -100 && value <= 0)
272+ {
273+ JsonSerializer.Serialize(writer, value, options);
274+ return;
275+ }
276+ throw new NotSupportedException("Cannot marshal type long");
277+ }
278+
279+ public static readonly HilariousMinMaxValueCheckConverter Singleton = new HilariousMinMaxValueCheckConverter();
280+ }
281+
282+ internal class AmbitiousMinMaxValueCheckConverter : JsonConverter<long>
283+ {
284+ public override bool CanConvert(Type t) => t == typeof(long);
285+
286+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
287+ {
288+ var value = reader.GetInt64();
289+ if (value >= 0 && value <= 100)
290+ {
291+ return value;
292+ }
293+ throw new JsonException("Cannot unmarshal type long");
294+ }
295+
296+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
297+ {
298+ if (value >= 0 && value <= 100)
299+ {
300+ JsonSerializer.Serialize(writer, value, options);
301+ return;
302+ }
303+ throw new NotSupportedException("Cannot marshal type long");
304+ }
305+
306+ public static readonly AmbitiousMinMaxValueCheckConverter Singleton = new AmbitiousMinMaxValueCheckConverter();
307+ }
84308
85309 public class DateOnlyConverter : JsonConverter<DateOnly>
86310 {
Mschema-csharpdefault / QuickType.cs+280 −0
@@ -26,27 +26,35 @@ namespace QuickType
2626 public partial class TopLevel
2727 {
2828 [JsonProperty("above_i32_max", Required = Required.Always)]
29+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
2930 public long AboveI32Max { get; set; }
3031
3132 [JsonProperty("below_i32_min", Required = Required.Always)]
33+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3234 public long BelowI32Min { get; set; }
3335
3436 [JsonProperty("i32_range", Required = Required.Always)]
37+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3538 public long I32Range { get; set; }
3639
3740 [JsonProperty("large_bounds", Required = Required.Always)]
41+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
3842 public long LargeBounds { get; set; }
3943
4044 [JsonProperty("only_maximum", Required = Required.Always)]
45+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
4146 public long OnlyMaximum { get; set; }
4247
4348 [JsonProperty("only_minimum", Required = Required.Always)]
49+ [JsonConverter(typeof(IndecentMinMaxValueCheckConverter))]
4450 public long OnlyMinimum { get; set; }
4551
4652 [JsonProperty("small_negative", Required = Required.Always)]
53+ [JsonConverter(typeof(HilariousMinMaxValueCheckConverter))]
4754 public long SmallNegative { get; set; }
4855
4956 [JsonProperty("small_positive", Required = Required.Always)]
57+ [JsonConverter(typeof(AmbitiousMinMaxValueCheckConverter))]
5058 public long SmallPositive { get; set; }
5159
5260 [JsonProperty("unbounded", Required = Required.Always)]
@@ -75,6 +83,278 @@ namespace QuickType
7583 },
7684 };
7785 }
86+
87+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
88+ {
89+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
90+
91+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
92+ {
93+ if (reader.TokenType == JsonToken.Null) return null;
94+ var value = serializer.Deserialize<long>(reader);
95+ if (value >= 0 && value <= 2147483648)
96+ {
97+ return value;
98+ }
99+ throw new Exception("Cannot unmarshal type long");
100+ }
101+
102+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
103+ {
104+ if (untypedValue == null)
105+ {
106+ serializer.Serialize(writer, null);
107+ return;
108+ }
109+ var value = (long)untypedValue;
110+ if (value >= 0 && value <= 2147483648)
111+ {
112+ serializer.Serialize(writer, value);
113+ return;
114+ }
115+ throw new Exception("Cannot marshal type long");
116+ }
117+
118+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
119+ }
120+
121+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
122+ {
123+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
124+
125+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
126+ {
127+ if (reader.TokenType == JsonToken.Null) return null;
128+ var value = serializer.Deserialize<long>(reader);
129+ if (value >= -2147483649 && value <= 0)
130+ {
131+ return value;
132+ }
133+ throw new Exception("Cannot unmarshal type long");
134+ }
135+
136+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
137+ {
138+ if (untypedValue == null)
139+ {
140+ serializer.Serialize(writer, null);
141+ return;
142+ }
143+ var value = (long)untypedValue;
144+ if (value >= -2147483649 && value <= 0)
145+ {
146+ serializer.Serialize(writer, value);
147+ return;
148+ }
149+ throw new Exception("Cannot marshal type long");
150+ }
151+
152+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
153+ }
154+
155+ internal class TentacledMinMaxValueCheckConverter : JsonConverter
156+ {
157+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
158+
159+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
160+ {
161+ if (reader.TokenType == JsonToken.Null) return null;
162+ var value = serializer.Deserialize<long>(reader);
163+ if (value >= -2147483648 && value <= 2147483647)
164+ {
165+ return value;
166+ }
167+ throw new Exception("Cannot unmarshal type long");
168+ }
169+
170+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
171+ {
172+ if (untypedValue == null)
173+ {
174+ serializer.Serialize(writer, null);
175+ return;
176+ }
177+ var value = (long)untypedValue;
178+ if (value >= -2147483648 && value <= 2147483647)
179+ {
180+ serializer.Serialize(writer, value);
181+ return;
182+ }
183+ throw new Exception("Cannot marshal type long");
184+ }
185+
186+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
187+ }
188+
189+ internal class StickyMinMaxValueCheckConverter : JsonConverter
190+ {
191+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
192+
193+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
194+ {
195+ if (reader.TokenType == JsonToken.Null) return null;
196+ var value = serializer.Deserialize<long>(reader);
197+ if (value >= -9007199254740991 && value <= 9007199254740991)
198+ {
199+ return value;
200+ }
201+ throw new Exception("Cannot unmarshal type long");
202+ }
203+
204+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
205+ {
206+ if (untypedValue == null)
207+ {
208+ serializer.Serialize(writer, null);
209+ return;
210+ }
211+ var value = (long)untypedValue;
212+ if (value >= -9007199254740991 && value <= 9007199254740991)
213+ {
214+ serializer.Serialize(writer, value);
215+ return;
216+ }
217+ throw new Exception("Cannot marshal type long");
218+ }
219+
220+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
221+ }
222+
223+ internal class IndigoMinMaxValueCheckConverter : JsonConverter
224+ {
225+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
226+
227+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
228+ {
229+ if (reader.TokenType == JsonToken.Null) return null;
230+ var value = serializer.Deserialize<long>(reader);
231+ if (value <= 0)
232+ {
233+ return value;
234+ }
235+ throw new Exception("Cannot unmarshal type long");
236+ }
237+
238+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
239+ {
240+ if (untypedValue == null)
241+ {
242+ serializer.Serialize(writer, null);
243+ return;
244+ }
245+ var value = (long)untypedValue;
246+ if (value <= 0)
247+ {
248+ serializer.Serialize(writer, value);
249+ return;
250+ }
251+ throw new Exception("Cannot marshal type long");
252+ }
253+
254+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
255+ }
256+
257+ internal class IndecentMinMaxValueCheckConverter : JsonConverter
258+ {
259+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
260+
261+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
262+ {
263+ if (reader.TokenType == JsonToken.Null) return null;
264+ var value = serializer.Deserialize<long>(reader);
265+ if (value >= 0)
266+ {
267+ return value;
268+ }
269+ throw new Exception("Cannot unmarshal type long");
270+ }
271+
272+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
273+ {
274+ if (untypedValue == null)
275+ {
276+ serializer.Serialize(writer, null);
277+ return;
278+ }
279+ var value = (long)untypedValue;
280+ if (value >= 0)
281+ {
282+ serializer.Serialize(writer, value);
283+ return;
284+ }
285+ throw new Exception("Cannot marshal type long");
286+ }
287+
288+ public static readonly IndecentMinMaxValueCheckConverter Singleton = new IndecentMinMaxValueCheckConverter();
289+ }
290+
291+ internal class HilariousMinMaxValueCheckConverter : JsonConverter
292+ {
293+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
294+
295+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
296+ {
297+ if (reader.TokenType == JsonToken.Null) return null;
298+ var value = serializer.Deserialize<long>(reader);
299+ if (value >= -100 && value <= 0)
300+ {
301+ return value;
302+ }
303+ throw new Exception("Cannot unmarshal type long");
304+ }
305+
306+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
307+ {
308+ if (untypedValue == null)
309+ {
310+ serializer.Serialize(writer, null);
311+ return;
312+ }
313+ var value = (long)untypedValue;
314+ if (value >= -100 && value <= 0)
315+ {
316+ serializer.Serialize(writer, value);
317+ return;
318+ }
319+ throw new Exception("Cannot marshal type long");
320+ }
321+
322+ public static readonly HilariousMinMaxValueCheckConverter Singleton = new HilariousMinMaxValueCheckConverter();
323+ }
324+
325+ internal class AmbitiousMinMaxValueCheckConverter : JsonConverter
326+ {
327+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
328+
329+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
330+ {
331+ if (reader.TokenType == JsonToken.Null) return null;
332+ var value = serializer.Deserialize<long>(reader);
333+ if (value >= 0 && value <= 100)
334+ {
335+ return value;
336+ }
337+ throw new Exception("Cannot unmarshal type long");
338+ }
339+
340+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
341+ {
342+ if (untypedValue == null)
343+ {
344+ serializer.Serialize(writer, null);
345+ return;
346+ }
347+ var value = (long)untypedValue;
348+ if (value >= 0 && value <= 100)
349+ {
350+ serializer.Serialize(writer, value);
351+ return;
352+ }
353+ throw new Exception("Cannot marshal type long");
354+ }
355+
356+ public static readonly AmbitiousMinMaxValueCheckConverter Singleton = new AmbitiousMinMaxValueCheckConverter();
357+ }
78358 }
79359 #pragma warning restore CS8618
80360 #pragma warning restore CS8601
Mschema-elixirdefault / QuickType.ex+8 −8
@@ -21,49 +21,49 @@ defmodule TopLevel do
2121 unbounded: integer()
2222 }
2323
24- def decode_above_i32_max(value) when is_integer(value), do: value
24+ def decode_above_i32_max(value) when is_integer(value) and value >= 0 and value <= 2147483648, do: value
2525 def decode_above_i32_max(_), do: {:error, "Unexpected type when decoding TopLevel.above_i32_max"}
2626
2727 def encode_above_i32_max(value) when is_integer(value), do: value
2828 def encode_above_i32_max(_), do: {:error, "Unexpected type when encoding TopLevel.above_i32_max"}
2929
30- def decode_below_i32_min(value) when is_integer(value), do: value
30+ def decode_below_i32_min(value) when is_integer(value) and value >= -2147483649 and value <= 0, do: value
3131 def decode_below_i32_min(_), do: {:error, "Unexpected type when decoding TopLevel.below_i32_min"}
3232
3333 def encode_below_i32_min(value) when is_integer(value), do: value
3434 def encode_below_i32_min(_), do: {:error, "Unexpected type when encoding TopLevel.below_i32_min"}
3535
36- def decode_i32_range(value) when is_integer(value), do: value
36+ def decode_i32_range(value) when is_integer(value) and value >= -2147483648 and value <= 2147483647, do: value
3737 def decode_i32_range(_), do: {:error, "Unexpected type when decoding TopLevel.i32_range"}
3838
3939 def encode_i32_range(value) when is_integer(value), do: value
4040 def encode_i32_range(_), do: {:error, "Unexpected type when encoding TopLevel.i32_range"}
4141
42- def decode_large_bounds(value) when is_integer(value), do: value
42+ def decode_large_bounds(value) when is_integer(value) and value >= -9007199254740991 and value <= 9007199254740991, do: value
4343 def decode_large_bounds(_), do: {:error, "Unexpected type when decoding TopLevel.large_bounds"}
4444
4545 def encode_large_bounds(value) when is_integer(value), do: value
4646 def encode_large_bounds(_), do: {:error, "Unexpected type when encoding TopLevel.large_bounds"}
4747
48- def decode_only_maximum(value) when is_integer(value), do: value
48+ def decode_only_maximum(value) when is_integer(value) and value <= 0, do: value
4949 def decode_only_maximum(_), do: {:error, "Unexpected type when decoding TopLevel.only_maximum"}
5050
5151 def encode_only_maximum(value) when is_integer(value), do: value
5252 def encode_only_maximum(_), do: {:error, "Unexpected type when encoding TopLevel.only_maximum"}
5353
54- def decode_only_minimum(value) when is_integer(value), do: value
54+ def decode_only_minimum(value) when is_integer(value) and value >= 0, do: value
5555 def decode_only_minimum(_), do: {:error, "Unexpected type when decoding TopLevel.only_minimum"}
5656
5757 def encode_only_minimum(value) when is_integer(value), do: value
5858 def encode_only_minimum(_), do: {:error, "Unexpected type when encoding TopLevel.only_minimum"}
5959
60- def decode_small_negative(value) when is_integer(value), do: value
60+ def decode_small_negative(value) when is_integer(value) and value >= -100 and value <= 0, do: value
6161 def decode_small_negative(_), do: {:error, "Unexpected type when decoding TopLevel.small_negative"}
6262
6363 def encode_small_negative(value) when is_integer(value), do: value
6464 def encode_small_negative(_), do: {:error, "Unexpected type when encoding TopLevel.small_negative"}
6565
66- def decode_small_positive(value) when is_integer(value), do: value
66+ def decode_small_positive(value) when is_integer(value) and value >= 0 and value <= 100, do: value
6767 def decode_small_positive(_), do: {:error, "Unexpected type when decoding TopLevel.small_positive"}
6868
6969 def encode_small_positive(value) when is_integer(value), do: value
Test case

test/inputs/schema/intersection-nested.schema

1 generated file · +9 −1
Mschema-elixirdefault / QuickType.ex+9 −1
@@ -12,9 +12,17 @@ defmodule TopLevel do
1212 intersection: float() | nil
1313 }
1414
15+ def decode_intersection(value) when is_float(value), do: value
16+ def decode_intersection(value) when is_integer(value), do: value
17+ def decode_intersection(_), do: {:error, "Unexpected type when decoding TopLevel.intersection"}
18+
19+ def encode_intersection(value) when is_float(value), do: value
20+ def encode_intersection(value) when is_integer(value), do: value
21+ def encode_intersection(_), do: {:error, "Unexpected type when encoding TopLevel.intersection"}
22+
1523 def from_map(m) do
1624 %TopLevel{
17- intersection: m["intersection"],
25+ intersection: m["intersection"] && decode_intersection(m["intersection"]),
1826 }
1927 end
Test case

test/inputs/schema/keyword-unions.schema

1 generated file · +9 −1
Mschema-elixirdefault / QuickType.ex+9 −1
@@ -9204,6 +9204,14 @@ defmodule TopLevel do
92049204 def encode_double(value) when is_nil(value), do: value
92059205 def encode_double(_), do: {:error, "Unexpected type when encoding TopLevel.double"}
92069206
9207+ def decode_dummy(value) when is_float(value), do: value
9208+ def decode_dummy(value) when is_integer(value), do: value
9209+ def decode_dummy(_), do: {:error, "Unexpected type when decoding TopLevel.dummy"}
9210+
9211+ def encode_dummy(value) when is_float(value), do: value
9212+ def encode_dummy(value) when is_integer(value), do: value
9213+ def encode_dummy(_), do: {:error, "Unexpected type when encoding TopLevel.dummy"}
9214+
92079215 def decode_dynamic(%{} = value), do: Dynamic.from_map(value)
92089216 def decode_dynamic(value) when is_float(value), do: value
92099217 def decode_dynamic(value) when is_integer(value), do: value
@@ -11682,7 +11690,7 @@ defmodule TopLevel do
1168211690 did_set: decode_did_set(m["didSet"]),
1168311691 top_level_do: decode_top_level_do(m["do"]),
1168411692 double: decode_double(m["double"]),
11685- dummy: m["dummy"],
11693+ dummy: m["dummy"] && decode_dummy(m["dummy"]),
1168611694 dynamic: decode_dynamic(m["dynamic"]),
1168711695 dynamic_cast: decode_dynamic_cast(m["dynamic_cast"]),
1168811696 elif: decode_elif(m["elif"]),
Test case

test/inputs/schema/minmax-integer.schema

4 generated files · +499 −6
Mschema-csharp-recordsdefault / QuickType.cs+176 −0
@@ -29,24 +29,30 @@ namespace QuickType
2929 public long Free { get; set; }
3030
3131 [JsonProperty("intersection", Required = Required.Always)]
32+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3233 public long Intersection { get; set; }
3334
3435 [JsonProperty("max", Required = Required.Always)]
36+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3537 public long Max { get; set; }
3638
3739 [JsonProperty("min", Required = Required.Always)]
40+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3841 public long Min { get; set; }
3942
4043 [JsonProperty("minmax", Required = Required.Always)]
44+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4145 public long Minmax { get; set; }
4246
4347 [JsonProperty("minMaxIntersection", Required = Required.Always)]
48+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4449 public long MinMaxIntersection { get; set; }
4550
4651 [JsonProperty("minMaxUnion", Required = Required.Always)]
4752 public long MinMaxUnion { get; set; }
4853
4954 [JsonProperty("union", Required = Required.Always)]
55+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
5056 public long Union { get; set; }
5157 }
5258
@@ -72,6 +78,176 @@ namespace QuickType
7278 },
7379 };
7480 }
81+
82+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
83+ {
84+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
85+
86+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
87+ {
88+ if (reader.TokenType == JsonToken.Null) return null;
89+ var value = serializer.Deserialize<long>(reader);
90+ if (value >= 4 && value <= 5)
91+ {
92+ return value;
93+ }
94+ throw new Exception("Cannot unmarshal type long");
95+ }
96+
97+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
98+ {
99+ if (untypedValue == null)
100+ {
101+ serializer.Serialize(writer, null);
102+ return;
103+ }
104+ var value = (long)untypedValue;
105+ if (value >= 4 && value <= 5)
106+ {
107+ serializer.Serialize(writer, value);
108+ return;
109+ }
110+ throw new Exception("Cannot marshal type long");
111+ }
112+
113+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
114+ }
115+
116+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
117+ {
118+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
119+
120+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
121+ {
122+ if (reader.TokenType == JsonToken.Null) return null;
123+ var value = serializer.Deserialize<long>(reader);
124+ if (value <= 5)
125+ {
126+ return value;
127+ }
128+ throw new Exception("Cannot unmarshal type long");
129+ }
130+
131+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
132+ {
133+ if (untypedValue == null)
134+ {
135+ serializer.Serialize(writer, null);
136+ return;
137+ }
138+ var value = (long)untypedValue;
139+ if (value <= 5)
140+ {
141+ serializer.Serialize(writer, value);
142+ return;
143+ }
144+ throw new Exception("Cannot marshal type long");
145+ }
146+
147+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
148+ }
149+
150+ internal class TentacledMinMaxValueCheckConverter : JsonConverter
151+ {
152+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
153+
154+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
155+ {
156+ if (reader.TokenType == JsonToken.Null) return null;
157+ var value = serializer.Deserialize<long>(reader);
158+ if (value >= 3)
159+ {
160+ return value;
161+ }
162+ throw new Exception("Cannot unmarshal type long");
163+ }
164+
165+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
166+ {
167+ if (untypedValue == null)
168+ {
169+ serializer.Serialize(writer, null);
170+ return;
171+ }
172+ var value = (long)untypedValue;
173+ if (value >= 3)
174+ {
175+ serializer.Serialize(writer, value);
176+ return;
177+ }
178+ throw new Exception("Cannot marshal type long");
179+ }
180+
181+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
182+ }
183+
184+ internal class StickyMinMaxValueCheckConverter : JsonConverter
185+ {
186+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
187+
188+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
189+ {
190+ if (reader.TokenType == JsonToken.Null) return null;
191+ var value = serializer.Deserialize<long>(reader);
192+ if (value >= 3 && value <= 5)
193+ {
194+ return value;
195+ }
196+ throw new Exception("Cannot unmarshal type long");
197+ }
198+
199+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
200+ {
201+ if (untypedValue == null)
202+ {
203+ serializer.Serialize(writer, null);
204+ return;
205+ }
206+ var value = (long)untypedValue;
207+ if (value >= 3 && value <= 5)
208+ {
209+ serializer.Serialize(writer, value);
210+ return;
211+ }
212+ throw new Exception("Cannot marshal type long");
213+ }
214+
215+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
216+ }
217+
218+ internal class IndigoMinMaxValueCheckConverter : JsonConverter
219+ {
220+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
221+
222+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
223+ {
224+ if (reader.TokenType == JsonToken.Null) return null;
225+ var value = serializer.Deserialize<long>(reader);
226+ if (value >= 3 && value <= 6)
227+ {
228+ return value;
229+ }
230+ throw new Exception("Cannot unmarshal type long");
231+ }
232+
233+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
234+ {
235+ if (untypedValue == null)
236+ {
237+ serializer.Serialize(writer, null);
238+ return;
239+ }
240+ var value = (long)untypedValue;
241+ if (value >= 3 && value <= 6)
242+ {
243+ serializer.Serialize(writer, value);
244+ return;
245+ }
246+ throw new Exception("Cannot marshal type long");
247+ }
248+
249+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
250+ }
75251 }
76252 #pragma warning restore CS8618
77253 #pragma warning restore CS8601
Mschema-csharp-SystemTextJsondefault / QuickType.cs+141 −0
@@ -28,22 +28,27 @@ namespace QuickType
2828
2929 [JsonRequired]
3030 [JsonPropertyName("intersection")]
31+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3132 public long Intersection { get; set; }
3233
3334 [JsonRequired]
3435 [JsonPropertyName("max")]
36+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3537 public long Max { get; set; }
3638
3739 [JsonRequired]
3840 [JsonPropertyName("min")]
41+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3942 public long Min { get; set; }
4043
4144 [JsonRequired]
4245 [JsonPropertyName("minmax")]
46+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4347 public long Minmax { get; set; }
4448
4549 [JsonRequired]
4650 [JsonPropertyName("minMaxIntersection")]
51+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4752 public long MinMaxIntersection { get; set; }
4853
4954 [JsonRequired]
@@ -52,6 +57,7 @@ namespace QuickType
5257
5358 [JsonRequired]
5459 [JsonPropertyName("union")]
60+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
5561 public long Union { get; set; }
5662 }
5763
@@ -77,6 +83,141 @@ namespace QuickType
7783 },
7884 };
7985 }
86+
87+ internal class PurpleMinMaxValueCheckConverter : JsonConverter<long>
88+ {
89+ public override bool CanConvert(Type t) => t == typeof(long);
90+
91+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
92+ {
93+ var value = reader.GetInt64();
94+ if (value >= 4 && value <= 5)
95+ {
96+ return value;
97+ }
98+ throw new JsonException("Cannot unmarshal type long");
99+ }
100+
101+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
102+ {
103+ if (value >= 4 && value <= 5)
104+ {
105+ JsonSerializer.Serialize(writer, value, options);
106+ return;
107+ }
108+ throw new NotSupportedException("Cannot marshal type long");
109+ }
110+
111+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
112+ }
113+
114+ internal class FluffyMinMaxValueCheckConverter : JsonConverter<long>
115+ {
116+ public override bool CanConvert(Type t) => t == typeof(long);
117+
118+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
119+ {
120+ var value = reader.GetInt64();
121+ if (value <= 5)
122+ {
123+ return value;
124+ }
125+ throw new JsonException("Cannot unmarshal type long");
126+ }
127+
128+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
129+ {
130+ if (value <= 5)
131+ {
132+ JsonSerializer.Serialize(writer, value, options);
133+ return;
134+ }
135+ throw new NotSupportedException("Cannot marshal type long");
136+ }
137+
138+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
139+ }
140+
141+ internal class TentacledMinMaxValueCheckConverter : JsonConverter<long>
142+ {
143+ public override bool CanConvert(Type t) => t == typeof(long);
144+
145+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
146+ {
147+ var value = reader.GetInt64();
148+ if (value >= 3)
149+ {
150+ return value;
151+ }
152+ throw new JsonException("Cannot unmarshal type long");
153+ }
154+
155+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
156+ {
157+ if (value >= 3)
158+ {
159+ JsonSerializer.Serialize(writer, value, options);
160+ return;
161+ }
162+ throw new NotSupportedException("Cannot marshal type long");
163+ }
164+
165+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
166+ }
167+
168+ internal class StickyMinMaxValueCheckConverter : JsonConverter<long>
169+ {
170+ public override bool CanConvert(Type t) => t == typeof(long);
171+
172+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
173+ {
174+ var value = reader.GetInt64();
175+ if (value >= 3 && value <= 5)
176+ {
177+ return value;
178+ }
179+ throw new JsonException("Cannot unmarshal type long");
180+ }
181+
182+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
183+ {
184+ if (value >= 3 && value <= 5)
185+ {
186+ JsonSerializer.Serialize(writer, value, options);
187+ return;
188+ }
189+ throw new NotSupportedException("Cannot marshal type long");
190+ }
191+
192+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
193+ }
194+
195+ internal class IndigoMinMaxValueCheckConverter : JsonConverter<long>
196+ {
197+ public override bool CanConvert(Type t) => t == typeof(long);
198+
199+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
200+ {
201+ var value = reader.GetInt64();
202+ if (value >= 3 && value <= 6)
203+ {
204+ return value;
205+ }
206+ throw new JsonException("Cannot unmarshal type long");
207+ }
208+
209+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
210+ {
211+ if (value >= 3 && value <= 6)
212+ {
213+ JsonSerializer.Serialize(writer, value, options);
214+ return;
215+ }
216+ throw new NotSupportedException("Cannot marshal type long");
217+ }
218+
219+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
220+ }
80221
81222 public class DateOnlyConverter : JsonConverter<DateOnly>
82223 {
Mschema-csharpdefault / QuickType.cs+176 −0
@@ -29,24 +29,30 @@ namespace QuickType
2929 public long Free { get; set; }
3030
3131 [JsonProperty("intersection", Required = Required.Always)]
32+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3233 public long Intersection { get; set; }
3334
3435 [JsonProperty("max", Required = Required.Always)]
36+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3537 public long Max { get; set; }
3638
3739 [JsonProperty("min", Required = Required.Always)]
40+ [JsonConverter(typeof(TentacledMinMaxValueCheckConverter))]
3841 public long Min { get; set; }
3942
4043 [JsonProperty("minmax", Required = Required.Always)]
44+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4145 public long Minmax { get; set; }
4246
4347 [JsonProperty("minMaxIntersection", Required = Required.Always)]
48+ [JsonConverter(typeof(StickyMinMaxValueCheckConverter))]
4449 public long MinMaxIntersection { get; set; }
4550
4651 [JsonProperty("minMaxUnion", Required = Required.Always)]
4752 public long MinMaxUnion { get; set; }
4853
4954 [JsonProperty("union", Required = Required.Always)]
55+ [JsonConverter(typeof(IndigoMinMaxValueCheckConverter))]
5056 public long Union { get; set; }
5157 }
5258
@@ -72,6 +78,176 @@ namespace QuickType
7278 },
7379 };
7480 }
81+
82+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
83+ {
84+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
85+
86+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
87+ {
88+ if (reader.TokenType == JsonToken.Null) return null;
89+ var value = serializer.Deserialize<long>(reader);
90+ if (value >= 4 && value <= 5)
91+ {
92+ return value;
93+ }
94+ throw new Exception("Cannot unmarshal type long");
95+ }
96+
97+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
98+ {
99+ if (untypedValue == null)
100+ {
101+ serializer.Serialize(writer, null);
102+ return;
103+ }
104+ var value = (long)untypedValue;
105+ if (value >= 4 && value <= 5)
106+ {
107+ serializer.Serialize(writer, value);
108+ return;
109+ }
110+ throw new Exception("Cannot marshal type long");
111+ }
112+
113+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
114+ }
115+
116+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
117+ {
118+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
119+
120+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
121+ {
122+ if (reader.TokenType == JsonToken.Null) return null;
123+ var value = serializer.Deserialize<long>(reader);
124+ if (value <= 5)
125+ {
126+ return value;
127+ }
128+ throw new Exception("Cannot unmarshal type long");
129+ }
130+
131+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
132+ {
133+ if (untypedValue == null)
134+ {
135+ serializer.Serialize(writer, null);
136+ return;
137+ }
138+ var value = (long)untypedValue;
139+ if (value <= 5)
140+ {
141+ serializer.Serialize(writer, value);
142+ return;
143+ }
144+ throw new Exception("Cannot marshal type long");
145+ }
146+
147+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
148+ }
149+
150+ internal class TentacledMinMaxValueCheckConverter : JsonConverter
151+ {
152+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
153+
154+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
155+ {
156+ if (reader.TokenType == JsonToken.Null) return null;
157+ var value = serializer.Deserialize<long>(reader);
158+ if (value >= 3)
159+ {
160+ return value;
161+ }
162+ throw new Exception("Cannot unmarshal type long");
163+ }
164+
165+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
166+ {
167+ if (untypedValue == null)
168+ {
169+ serializer.Serialize(writer, null);
170+ return;
171+ }
172+ var value = (long)untypedValue;
173+ if (value >= 3)
174+ {
175+ serializer.Serialize(writer, value);
176+ return;
177+ }
178+ throw new Exception("Cannot marshal type long");
179+ }
180+
181+ public static readonly TentacledMinMaxValueCheckConverter Singleton = new TentacledMinMaxValueCheckConverter();
182+ }
183+
184+ internal class StickyMinMaxValueCheckConverter : JsonConverter
185+ {
186+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
187+
188+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
189+ {
190+ if (reader.TokenType == JsonToken.Null) return null;
191+ var value = serializer.Deserialize<long>(reader);
192+ if (value >= 3 && value <= 5)
193+ {
194+ return value;
195+ }
196+ throw new Exception("Cannot unmarshal type long");
197+ }
198+
199+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
200+ {
201+ if (untypedValue == null)
202+ {
203+ serializer.Serialize(writer, null);
204+ return;
205+ }
206+ var value = (long)untypedValue;
207+ if (value >= 3 && value <= 5)
208+ {
209+ serializer.Serialize(writer, value);
210+ return;
211+ }
212+ throw new Exception("Cannot marshal type long");
213+ }
214+
215+ public static readonly StickyMinMaxValueCheckConverter Singleton = new StickyMinMaxValueCheckConverter();
216+ }
217+
218+ internal class IndigoMinMaxValueCheckConverter : JsonConverter
219+ {
220+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
221+
222+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
223+ {
224+ if (reader.TokenType == JsonToken.Null) return null;
225+ var value = serializer.Deserialize<long>(reader);
226+ if (value >= 3 && value <= 6)
227+ {
228+ return value;
229+ }
230+ throw new Exception("Cannot unmarshal type long");
231+ }
232+
233+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
234+ {
235+ if (untypedValue == null)
236+ {
237+ serializer.Serialize(writer, null);
238+ return;
239+ }
240+ var value = (long)untypedValue;
241+ if (value >= 3 && value <= 6)
242+ {
243+ serializer.Serialize(writer, value);
244+ return;
245+ }
246+ throw new Exception("Cannot marshal type long");
247+ }
248+
249+ public static readonly IndigoMinMaxValueCheckConverter Singleton = new IndigoMinMaxValueCheckConverter();
250+ }
75251 }
76252 #pragma warning restore CS8618
77253 #pragma warning restore CS8601
Mschema-elixirdefault / QuickType.ex+6 −6
@@ -26,31 +26,31 @@ defmodule TopLevel do
2626 def encode_free(value) when is_integer(value), do: value
2727 def encode_free(_), do: {:error, "Unexpected type when encoding TopLevel.free"}
2828
29- def decode_intersection(value) when is_integer(value), do: value
29+ def decode_intersection(value) when is_integer(value) and value >= 4 and value <= 5, do: value
3030 def decode_intersection(_), do: {:error, "Unexpected type when decoding TopLevel.intersection"}
3131
3232 def encode_intersection(value) when is_integer(value), do: value
3333 def encode_intersection(_), do: {:error, "Unexpected type when encoding TopLevel.intersection"}
3434
35- def decode_max(value) when is_integer(value), do: value
35+ def decode_max(value) when is_integer(value) and value <= 5, do: value
3636 def decode_max(_), do: {:error, "Unexpected type when decoding TopLevel.max"}
3737
3838 def encode_max(value) when is_integer(value), do: value
3939 def encode_max(_), do: {:error, "Unexpected type when encoding TopLevel.max"}
4040
41- def decode_min(value) when is_integer(value), do: value
41+ def decode_min(value) when is_integer(value) and value >= 3, do: value
4242 def decode_min(_), do: {:error, "Unexpected type when decoding TopLevel.min"}
4343
4444 def encode_min(value) when is_integer(value), do: value
4545 def encode_min(_), do: {:error, "Unexpected type when encoding TopLevel.min"}
4646
47- def decode_minmax(value) when is_integer(value), do: value
47+ def decode_minmax(value) when is_integer(value) and value >= 3 and value <= 5, do: value
4848 def decode_minmax(_), do: {:error, "Unexpected type when decoding TopLevel.minmax"}
4949
5050 def encode_minmax(value) when is_integer(value), do: value
5151 def encode_minmax(_), do: {:error, "Unexpected type when encoding TopLevel.minmax"}
5252
53- def decode_min_max_intersection(value) when is_integer(value), do: value
53+ def decode_min_max_intersection(value) when is_integer(value) and value >= 3 and value <= 5, do: value
5454 def decode_min_max_intersection(_), do: {:error, "Unexpected type when decoding TopLevel.min_max_intersection"}
5555
5656 def encode_min_max_intersection(value) when is_integer(value), do: value
@@ -62,7 +62,7 @@ defmodule TopLevel do
6262 def encode_min_max_union(value) when is_integer(value), do: value
6363 def encode_min_max_union(_), do: {:error, "Unexpected type when encoding TopLevel.min_max_union"}
6464
65- def decode_union(value) when is_integer(value), do: value
65+ def decode_union(value) when is_integer(value) and value >= 3 and value <= 6, do: value
6666 def decode_union(_), do: {:error, "Unexpected type when decoding TopLevel.union"}
6767
6868 def encode_union(value) when is_integer(value), do: value
Test case

test/inputs/schema/minmax.schema

1 generated file · +12 −12
Mschema-elixirdefault / QuickType.ex+12 −12
@@ -28,40 +28,40 @@ defmodule TopLevel do
2828 def encode_free(value) when is_integer(value), do: value
2929 def encode_free(_), do: {:error, "Unexpected type when encoding TopLevel.free"}
3030
31- def decode_intersection(value) when is_float(value), do: value
32- def decode_intersection(value) when is_integer(value), do: value
31+ def decode_intersection(value) when is_float(value) and value >= 4 and value <= 5, do: value
32+ def decode_intersection(value) when is_integer(value) and value >= 4 and value <= 5, do: value
3333 def decode_intersection(_), do: {:error, "Unexpected type when decoding TopLevel.intersection"}
3434
3535 def encode_intersection(value) when is_float(value), do: value
3636 def encode_intersection(value) when is_integer(value), do: value
3737 def encode_intersection(_), do: {:error, "Unexpected type when encoding TopLevel.intersection"}
3838
39- def decode_max(value) when is_float(value), do: value
40- def decode_max(value) when is_integer(value), do: value
39+ def decode_max(value) when is_float(value) and value <= 5, do: value
40+ def decode_max(value) when is_integer(value) and value <= 5, do: value
4141 def decode_max(_), do: {:error, "Unexpected type when decoding TopLevel.max"}
4242
4343 def encode_max(value) when is_float(value), do: value
4444 def encode_max(value) when is_integer(value), do: value
4545 def encode_max(_), do: {:error, "Unexpected type when encoding TopLevel.max"}
4646
47- def decode_min(value) when is_float(value), do: value
48- def decode_min(value) when is_integer(value), do: value
47+ def decode_min(value) when is_float(value) and value >= 3, do: value
48+ def decode_min(value) when is_integer(value) and value >= 3, do: value
4949 def decode_min(_), do: {:error, "Unexpected type when decoding TopLevel.min"}
5050
5151 def encode_min(value) when is_float(value), do: value
5252 def encode_min(value) when is_integer(value), do: value
5353 def encode_min(_), do: {:error, "Unexpected type when encoding TopLevel.min"}
5454
55- def decode_minmax(value) when is_float(value), do: value
56- def decode_minmax(value) when is_integer(value), do: value
55+ def decode_minmax(value) when is_float(value) and value >= 3 and value <= 5, do: value
56+ def decode_minmax(value) when is_integer(value) and value >= 3 and value <= 5, do: value
5757 def decode_minmax(_), do: {:error, "Unexpected type when decoding TopLevel.minmax"}
5858
5959 def encode_minmax(value) when is_float(value), do: value
6060 def encode_minmax(value) when is_integer(value), do: value
6161 def encode_minmax(_), do: {:error, "Unexpected type when encoding TopLevel.minmax"}
6262
63- def decode_min_max_intersection(value) when is_float(value), do: value
64- def decode_min_max_intersection(value) when is_integer(value), do: value
63+ def decode_min_max_intersection(value) when is_float(value) and value >= 3 and value <= 5, do: value
64+ def decode_min_max_intersection(value) when is_integer(value) and value >= 3 and value <= 5, do: value
6565 def decode_min_max_intersection(_), do: {:error, "Unexpected type when decoding TopLevel.min_max_intersection"}
6666
6767 def encode_min_max_intersection(value) when is_float(value), do: value
@@ -76,8 +76,8 @@ defmodule TopLevel do
7676 def encode_min_max_union(value) when is_integer(value), do: value
7777 def encode_min_max_union(_), do: {:error, "Unexpected type when encoding TopLevel.min_max_union"}
7878
79- def decode_union(value) when is_float(value), do: value
80- def decode_union(value) when is_integer(value), do: value
79+ def decode_union(value) when is_float(value) and value >= 3 and value <= 6, do: value
80+ def decode_union(value) when is_integer(value) and value >= 3 and value <= 6, do: value
8181 def decode_union(_), do: {:error, "Unexpected type when decoding TopLevel.union"}
8282
8383 def encode_union(value) when is_float(value), do: value
Test case

test/inputs/schema/optional-const-ref.schema

4 generated files · +127 −12
Mschema-csharp-recordsdefault / QuickType.cs+39 −3
@@ -29,6 +29,7 @@ namespace QuickType
2929 public Coordinate[]? Coordinates { get; set; }
3030
3131 [JsonProperty("count", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
32+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3233 public long? Count { get; set; }
3334
3435 [JsonProperty("label", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
@@ -39,6 +40,7 @@ namespace QuickType
3940 public Coordinate[] RequiredCoordinates { get; set; }
4041
4142 [JsonProperty("requiredCount", Required = Required.Always)]
43+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
4244 public long RequiredCount { get; set; }
4345
4446 [JsonProperty("requiredLabel", Required = Required.Always)]
@@ -46,7 +48,7 @@ namespace QuickType
4648 public string RequiredLabel { get; set; }
4749
4850 [JsonProperty("weight", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
49- [JsonConverter(typeof(MinMaxValueCheckConverter))]
51+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
5052 public double? Weight { get; set; }
5153 }
5254
@@ -82,6 +84,40 @@ namespace QuickType
8284 };
8385 }
8486
87+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
88+ {
89+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
90+
91+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
92+ {
93+ if (reader.TokenType == JsonToken.Null) return null;
94+ var value = serializer.Deserialize<long>(reader);
95+ if (value >= 1 && value <= 100)
96+ {
97+ return value;
98+ }
99+ throw new Exception("Cannot unmarshal type long");
100+ }
101+
102+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
103+ {
104+ if (untypedValue == null)
105+ {
106+ serializer.Serialize(writer, null);
107+ return;
108+ }
109+ var value = (long)untypedValue;
110+ if (value >= 1 && value <= 100)
111+ {
112+ serializer.Serialize(writer, value);
113+ return;
114+ }
115+ throw new Exception("Cannot marshal type long");
116+ }
117+
118+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
119+ }
120+
85121 internal class MinMaxLengthCheckConverter : JsonConverter
86122 {
87123 public override bool CanConvert(Type t) => t == typeof(string);
@@ -110,7 +146,7 @@ namespace QuickType
110146 public static readonly MinMaxLengthCheckConverter Singleton = new MinMaxLengthCheckConverter();
111147 }
112148
113- internal class MinMaxValueCheckConverter : JsonConverter
149+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
114150 {
115151 public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
116152
@@ -141,7 +177,7 @@ namespace QuickType
141177 throw new Exception("Cannot marshal type double");
142178 }
143179
144- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
180+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
145181 }
146182 }
147183 #pragma warning restore CS8618
Mschema-csharp-SystemTextJsondefault / QuickType.cs+32 −3
@@ -28,6 +28,7 @@ namespace QuickType
2828
2929 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
3030 [JsonPropertyName("count")]
31+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3132 public long? Count { get; set; }
3233
3334 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -41,6 +42,7 @@ namespace QuickType
4142
4243 [JsonRequired]
4344 [JsonPropertyName("requiredCount")]
45+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
4446 public long RequiredCount { get; set; }
4547
4648 [JsonRequired]
@@ -50,7 +52,7 @@ namespace QuickType
5052
5153 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
5254 [JsonPropertyName("weight")]
53- [JsonConverter(typeof(MinMaxValueCheckConverter))]
55+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
5456 public double? Weight { get; set; }
5557 }
5658
@@ -88,6 +90,33 @@ namespace QuickType
8890 };
8991 }
9092
93+ internal class PurpleMinMaxValueCheckConverter : JsonConverter<long>
94+ {
95+ public override bool CanConvert(Type t) => t == typeof(long);
96+
97+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
98+ {
99+ var value = reader.GetInt64();
100+ if (value >= 1 && value <= 100)
101+ {
102+ return value;
103+ }
104+ throw new JsonException("Cannot unmarshal type long");
105+ }
106+
107+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
108+ {
109+ if (value >= 1 && value <= 100)
110+ {
111+ JsonSerializer.Serialize(writer, value, options);
112+ return;
113+ }
114+ throw new NotSupportedException("Cannot marshal type long");
115+ }
116+
117+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
118+ }
119+
91120 internal class MinMaxLengthCheckConverter : JsonConverter<string>
92121 {
93122 public override bool CanConvert(Type t) => t == typeof(string);
@@ -115,7 +144,7 @@ namespace QuickType
115144 public static readonly MinMaxLengthCheckConverter Singleton = new MinMaxLengthCheckConverter();
116145 }
117146
118- internal class MinMaxValueCheckConverter : JsonConverter<double>
147+ internal class FluffyMinMaxValueCheckConverter : JsonConverter<double>
119148 {
120149 public override bool CanConvert(Type t) => t == typeof(double);
121150
@@ -139,7 +168,7 @@ namespace QuickType
139168 throw new NotSupportedException("Cannot marshal type double");
140169 }
141170
142- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
171+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
143172 }
144173
145174 public class DateOnlyConverter : JsonConverter<DateOnly>
Mschema-csharpdefault / QuickType.cs+39 −3
@@ -29,6 +29,7 @@ namespace QuickType
2929 public Coordinate[]? Coordinates { get; set; }
3030
3131 [JsonProperty("count", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
32+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3233 public long? Count { get; set; }
3334
3435 [JsonProperty("label", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
@@ -39,6 +40,7 @@ namespace QuickType
3940 public Coordinate[] RequiredCoordinates { get; set; }
4041
4142 [JsonProperty("requiredCount", Required = Required.Always)]
43+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
4244 public long RequiredCount { get; set; }
4345
4446 [JsonProperty("requiredLabel", Required = Required.Always)]
@@ -46,7 +48,7 @@ namespace QuickType
4648 public string RequiredLabel { get; set; }
4749
4850 [JsonProperty("weight", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
49- [JsonConverter(typeof(MinMaxValueCheckConverter))]
51+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
5052 public double? Weight { get; set; }
5153 }
5254
@@ -82,6 +84,40 @@ namespace QuickType
8284 };
8385 }
8486
87+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
88+ {
89+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
90+
91+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
92+ {
93+ if (reader.TokenType == JsonToken.Null) return null;
94+ var value = serializer.Deserialize<long>(reader);
95+ if (value >= 1 && value <= 100)
96+ {
97+ return value;
98+ }
99+ throw new Exception("Cannot unmarshal type long");
100+ }
101+
102+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
103+ {
104+ if (untypedValue == null)
105+ {
106+ serializer.Serialize(writer, null);
107+ return;
108+ }
109+ var value = (long)untypedValue;
110+ if (value >= 1 && value <= 100)
111+ {
112+ serializer.Serialize(writer, value);
113+ return;
114+ }
115+ throw new Exception("Cannot marshal type long");
116+ }
117+
118+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
119+ }
120+
85121 internal class MinMaxLengthCheckConverter : JsonConverter
86122 {
87123 public override bool CanConvert(Type t) => t == typeof(string);
@@ -110,7 +146,7 @@ namespace QuickType
110146 public static readonly MinMaxLengthCheckConverter Singleton = new MinMaxLengthCheckConverter();
111147 }
112148
113- internal class MinMaxValueCheckConverter : JsonConverter
149+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
114150 {
115151 public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
116152
@@ -141,7 +177,7 @@ namespace QuickType
141177 throw new Exception("Cannot marshal type double");
142178 }
143179
144- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
180+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
145181 }
146182 }
147183 #pragma warning restore CS8618
Mschema-elixirdefault / QuickType.ex+17 −3
@@ -71,6 +71,12 @@ defmodule TopLevel do
7171 weight: float() | nil
7272 }
7373
74+ def decode_count(value) when is_integer(value) and value >= 1 and value <= 100, do: value
75+ def decode_count(_), do: {:error, "Unexpected type when decoding TopLevel.count"}
76+
77+ def encode_count(value) when is_integer(value), do: value
78+ def encode_count(_), do: {:error, "Unexpected type when encoding TopLevel.count"}
79+
7480 def decode_label(value) when is_binary(value) do
7581 if String.length(value) >= 2 and String.length(value) <= 16, do: value, else: raise(ArgumentError)
7682 end
@@ -85,7 +91,7 @@ defmodule TopLevel do
8591 def encode_required_coordinates(value) when is_list(value), do: value
8692 def encode_required_coordinates(_), do: {:error, "Unexpected type when encoding TopLevel.required_coordinates"}
8793
88- def decode_required_count(value) when is_integer(value), do: value
94+ def decode_required_count(value) when is_integer(value) and value >= 1 and value <= 100, do: value
8995 def decode_required_count(_), do: {:error, "Unexpected type when decoding TopLevel.required_count"}
9096
9197 def encode_required_count(value) when is_integer(value), do: value
@@ -99,15 +105,23 @@ defmodule TopLevel do
99105 def encode_required_label(value) when is_binary(value), do: value
100106 def encode_required_label(_), do: {:error, "Unexpected type when encoding TopLevel.required_label"}
101107
108+ def decode_weight(value) when is_float(value) and value >= 0.5 and value <= 99.5, do: value
109+ def decode_weight(value) when is_integer(value) and value >= 0.5 and value <= 99.5, do: value
110+ def decode_weight(_), do: {:error, "Unexpected type when decoding TopLevel.weight"}
111+
112+ def encode_weight(value) when is_float(value), do: value
113+ def encode_weight(value) when is_integer(value), do: value
114+ def encode_weight(_), do: {:error, "Unexpected type when encoding TopLevel.weight"}
115+
102116 def from_map(m) do
103117 %TopLevel{
104118 coordinates: m["coordinates"] && Enum.map(m["coordinates"], &Coordinate.from_map/1),
105- count: m["count"],
119+ count: m["count"] && decode_count(m["count"]),
106120 label: m["label"] && decode_label(m["label"]),
107121 required_coordinates: Enum.map(m["requiredCoordinates"], &Coordinate.from_map/1),
108122 required_count: decode_required_count(m["requiredCount"]),
109123 required_label: decode_required_label(m["requiredLabel"]),
110- weight: m["weight"],
124+ weight: m["weight"] && decode_weight(m["weight"]),
111125 }
112126 end
Test case

test/inputs/schema/optional-constraints.schema

4 generated files · +127 −12
Mschema-csharp-recordsdefault / QuickType.cs+39 −3
@@ -26,10 +26,11 @@ namespace QuickType
2626 public partial record TopLevel
2727 {
2828 [JsonProperty("optDouble", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
29- [JsonConverter(typeof(MinMaxValueCheckConverter))]
29+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3030 public double? OptDouble { get; set; }
3131
3232 [JsonProperty("optInt", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
33+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3334 public long? OptInt { get; set; }
3435
3536 [JsonProperty("optPattern", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
@@ -40,6 +41,7 @@ namespace QuickType
4041 public string? OptString { get; set; }
4142
4243 [JsonProperty("reqZeroMin", Required = Required.Always)]
44+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
4345 public long ReqZeroMin { get; set; }
4446 }
4547
@@ -66,7 +68,7 @@ namespace QuickType
6668 };
6769 }
6870
69- internal class MinMaxValueCheckConverter : JsonConverter
71+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
7072 {
7173 public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
7274
@@ -97,7 +99,41 @@ namespace QuickType
9799 throw new Exception("Cannot marshal type double");
98100 }
99101
100- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
102+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
103+ }
104+
105+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
106+ {
107+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
108+
109+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
110+ {
111+ if (reader.TokenType == JsonToken.Null) return null;
112+ var value = serializer.Deserialize<long>(reader);
113+ if (value >= 0 && value <= 100)
114+ {
115+ return value;
116+ }
117+ throw new Exception("Cannot unmarshal type long");
118+ }
119+
120+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
121+ {
122+ if (untypedValue == null)
123+ {
124+ serializer.Serialize(writer, null);
125+ return;
126+ }
127+ var value = (long)untypedValue;
128+ if (value >= 0 && value <= 100)
129+ {
130+ serializer.Serialize(writer, value);
131+ return;
132+ }
133+ throw new Exception("Cannot marshal type long");
134+ }
135+
136+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
101137 }
102138
103139 internal class MinMaxLengthCheckConverter : JsonConverter
Mschema-csharp-SystemTextJsondefault / QuickType.cs+32 −3
@@ -24,11 +24,12 @@ namespace QuickType
2424 {
2525 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
2626 [JsonPropertyName("optDouble")]
27- [JsonConverter(typeof(MinMaxValueCheckConverter))]
27+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
2828 public double? OptDouble { get; set; }
2929
3030 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
3131 [JsonPropertyName("optInt")]
32+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3233 public long? OptInt { get; set; }
3334
3435 [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
@@ -42,6 +43,7 @@ namespace QuickType
4243
4344 [JsonRequired]
4445 [JsonPropertyName("reqZeroMin")]
46+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
4547 public long ReqZeroMin { get; set; }
4648 }
4749
@@ -68,7 +70,7 @@ namespace QuickType
6870 };
6971 }
7072
71- internal class MinMaxValueCheckConverter : JsonConverter<double>
73+ internal class PurpleMinMaxValueCheckConverter : JsonConverter<double>
7274 {
7375 public override bool CanConvert(Type t) => t == typeof(double);
7476
@@ -92,7 +94,34 @@ namespace QuickType
9294 throw new NotSupportedException("Cannot marshal type double");
9395 }
9496
95- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
97+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
98+ }
99+
100+ internal class FluffyMinMaxValueCheckConverter : JsonConverter<long>
101+ {
102+ public override bool CanConvert(Type t) => t == typeof(long);
103+
104+ public override long Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
105+ {
106+ var value = reader.GetInt64();
107+ if (value >= 0 && value <= 100)
108+ {
109+ return value;
110+ }
111+ throw new JsonException("Cannot unmarshal type long");
112+ }
113+
114+ public override void Write(Utf8JsonWriter writer, long value, JsonSerializerOptions options)
115+ {
116+ if (value >= 0 && value <= 100)
117+ {
118+ JsonSerializer.Serialize(writer, value, options);
119+ return;
120+ }
121+ throw new NotSupportedException("Cannot marshal type long");
122+ }
123+
124+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
96125 }
97126
98127 internal class MinMaxLengthCheckConverter : JsonConverter<string>
Mschema-csharpdefault / QuickType.cs+39 −3
@@ -26,10 +26,11 @@ namespace QuickType
2626 public partial class TopLevel
2727 {
2828 [JsonProperty("optDouble", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
29- [JsonConverter(typeof(MinMaxValueCheckConverter))]
29+ [JsonConverter(typeof(PurpleMinMaxValueCheckConverter))]
3030 public double? OptDouble { get; set; }
3131
3232 [JsonProperty("optInt", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
33+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
3334 public long? OptInt { get; set; }
3435
3536 [JsonProperty("optPattern", Required = Required.DisallowNull, NullValueHandling = NullValueHandling.Ignore)]
@@ -40,6 +41,7 @@ namespace QuickType
4041 public string? OptString { get; set; }
4142
4243 [JsonProperty("reqZeroMin", Required = Required.Always)]
44+ [JsonConverter(typeof(FluffyMinMaxValueCheckConverter))]
4345 public long ReqZeroMin { get; set; }
4446 }
4547
@@ -66,7 +68,7 @@ namespace QuickType
6668 };
6769 }
6870
69- internal class MinMaxValueCheckConverter : JsonConverter
71+ internal class PurpleMinMaxValueCheckConverter : JsonConverter
7072 {
7173 public override bool CanConvert(Type t) => t == typeof(double) || t == typeof(double?);
7274
@@ -97,7 +99,41 @@ namespace QuickType
9799 throw new Exception("Cannot marshal type double");
98100 }
99101
100- public static readonly MinMaxValueCheckConverter Singleton = new MinMaxValueCheckConverter();
102+ public static readonly PurpleMinMaxValueCheckConverter Singleton = new PurpleMinMaxValueCheckConverter();
103+ }
104+
105+ internal class FluffyMinMaxValueCheckConverter : JsonConverter
106+ {
107+ public override bool CanConvert(Type t) => t == typeof(long) || t == typeof(long?);
108+
109+ public override object ReadJson(JsonReader reader, Type t, object existingValue, JsonSerializer serializer)
110+ {
111+ if (reader.TokenType == JsonToken.Null) return null;
112+ var value = serializer.Deserialize<long>(reader);
113+ if (value >= 0 && value <= 100)
114+ {
115+ return value;
116+ }
117+ throw new Exception("Cannot unmarshal type long");
118+ }
119+
120+ public override void WriteJson(JsonWriter writer, object untypedValue, JsonSerializer serializer)
121+ {
122+ if (untypedValue == null)
123+ {
124+ serializer.Serialize(writer, null);
125+ return;
126+ }
127+ var value = (long)untypedValue;
128+ if (value >= 0 && value <= 100)
129+ {
130+ serializer.Serialize(writer, value);
131+ return;
132+ }
133+ throw new Exception("Cannot marshal type long");
134+ }
135+
136+ public static readonly FluffyMinMaxValueCheckConverter Singleton = new FluffyMinMaxValueCheckConverter();
101137 }
102138
103139 internal class MinMaxLengthCheckConverter : JsonConverter
Mschema-elixirdefault / QuickType.ex+17 −3
@@ -17,6 +17,20 @@ defmodule TopLevel do
1717 req_zero_min: integer()
1818 }
1919
20+ def decode_opt_double(value) when is_float(value) and value >= 0.5 and value <= 99.5, do: value
21+ def decode_opt_double(value) when is_integer(value) and value >= 0.5 and value <= 99.5, do: value
22+ def decode_opt_double(_), do: {:error, "Unexpected type when decoding TopLevel.opt_double"}
23+
24+ def encode_opt_double(value) when is_float(value), do: value
25+ def encode_opt_double(value) when is_integer(value), do: value
26+ def encode_opt_double(_), do: {:error, "Unexpected type when encoding TopLevel.opt_double"}
27+
28+ def decode_opt_int(value) when is_integer(value) and value >= 0 and value <= 100, do: value
29+ def decode_opt_int(_), do: {:error, "Unexpected type when decoding TopLevel.opt_int"}
30+
31+ def encode_opt_int(value) when is_integer(value), do: value
32+ def encode_opt_int(_), do: {:error, "Unexpected type when encoding TopLevel.opt_int"}
33+
2034 def decode_opt_pattern(value) when is_binary(value) do
2135 if Regex.match?(Regex.compile!("^[a-z]+$"), value), do: value, else: raise(ArgumentError)
2236 end
@@ -33,7 +47,7 @@ defmodule TopLevel do
3347 def encode_opt_string(value) when is_binary(value), do: value
3448 def encode_opt_string(_), do: {:error, "Unexpected type when encoding TopLevel.opt_string"}
3549
36- def decode_req_zero_min(value) when is_integer(value), do: value
50+ def decode_req_zero_min(value) when is_integer(value) and value >= 0 and value <= 100, do: value
3751 def decode_req_zero_min(_), do: {:error, "Unexpected type when decoding TopLevel.req_zero_min"}
3852
3953 def encode_req_zero_min(value) when is_integer(value), do: value
@@ -41,8 +55,8 @@ defmodule TopLevel do
4155
4256 def from_map(m) do
4357 %TopLevel{
44- opt_double: m["optDouble"],
45- opt_int: m["optInt"],
58+ opt_double: m["optDouble"] && decode_opt_double(m["optDouble"]),
59+ opt_int: m["optInt"] && decode_opt_int(m["optInt"]),
4660 opt_pattern: m["optPattern"] && decode_opt_pattern(m["optPattern"]),
4761 opt_string: m["optString"] && decode_opt_string(m["optString"]),
4862 req_zero_min: decode_req_zero_min(m["reqZeroMin"]),
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +27 −3
Mschema-elixirdefault / QuickType.ex+27 −3
@@ -12,9 +12,17 @@ defmodule Color do
1212 rgb: float() | nil
1313 }
1414
15+ def decode_rgb(value) when is_float(value), do: value
16+ def decode_rgb(value) when is_integer(value), do: value
17+ def decode_rgb(_), do: {:error, "Unexpected type when decoding Color.rgb"}
18+
19+ def encode_rgb(value) when is_float(value), do: value
20+ def encode_rgb(value) when is_integer(value), do: value
21+ def encode_rgb(_), do: {:error, "Unexpected type when encoding Color.rgb"}
22+
1523 def from_map(m) do
1624 %Color{
17- rgb: m["rgb"],
25+ rgb: m["rgb"] && decode_rgb(m["rgb"]),
1826 }
1927 end
2028
@@ -363,10 +371,26 @@ defmodule Limit do
363371 minimum: float() | nil
364372 }
365373
374+ def decode_maximum(value) when is_float(value), do: value
375+ def decode_maximum(value) when is_integer(value), do: value
376+ def decode_maximum(_), do: {:error, "Unexpected type when decoding Limit.maximum"}
377+
378+ def encode_maximum(value) when is_float(value), do: value
379+ def encode_maximum(value) when is_integer(value), do: value
380+ def encode_maximum(_), do: {:error, "Unexpected type when encoding Limit.maximum"}
381+
382+ def decode_minimum(value) when is_float(value), do: value
383+ def decode_minimum(value) when is_integer(value), do: value
384+ def decode_minimum(_), do: {:error, "Unexpected type when decoding Limit.minimum"}
385+
386+ def encode_minimum(value) when is_float(value), do: value
387+ def encode_minimum(value) when is_integer(value), do: value
388+ def encode_minimum(_), do: {:error, "Unexpected type when encoding Limit.minimum"}
389+
366390 def from_map(m) do
367391 %Limit{
368- maximum: m["maximum"],
369- minimum: m["minimum"],
392+ maximum: m["maximum"] && decode_maximum(m["maximum"]),
393+ minimum: m["minimum"] && decode_minimum(m["minimum"]),
370394 }
371395 end
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +2 −2
Mschema-elixirdefault / QuickType.ex+2 −2
@@ -22,8 +22,8 @@ defmodule TopLevel do
2222 def encode_min_max_length(value) when is_binary(value), do: value
2323 def encode_min_max_length(_), do: {:error, "Unexpected type when encoding TopLevel.min_max_length"}
2424
25- def decode_percent(value) when is_float(value), do: value
26- def decode_percent(value) when is_integer(value), do: value
25+ def decode_percent(value) when is_float(value) and value >= 0 and value <= 1, do: value
26+ def decode_percent(value) when is_integer(value) and value >= 0 and value <= 1, do: value
2727 def decode_percent(_), do: {:error, "Unexpected type when decoding TopLevel.percent"}
2828
2929 def encode_percent(value) when is_float(value), do: value
Test case

test/inputs/schema/union.schema

1 generated file · +16 −2
Mschema-elixirdefault / QuickType.ex+16 −2
@@ -15,17 +15,31 @@ defmodule TopLevelElement do
1515 three: float() | nil
1616 }
1717
18+ def decode_one(value) when is_integer(value), do: value
19+ def decode_one(_), do: {:error, "Unexpected type when decoding TopLevelElement.one"}
20+
21+ def encode_one(value) when is_integer(value), do: value
22+ def encode_one(_), do: {:error, "Unexpected type when encoding TopLevelElement.one"}
23+
1824 def decode_two(value) when is_boolean(value), do: value
1925 def decode_two(_), do: {:error, "Unexpected type when decoding TopLevelElement.two"}
2026
2127 def encode_two(value) when is_boolean(value), do: value
2228 def encode_two(_), do: {:error, "Unexpected type when encoding TopLevelElement.two"}
2329
30+ def decode_three(value) when is_float(value), do: value
31+ def decode_three(value) when is_integer(value), do: value
32+ def decode_three(_), do: {:error, "Unexpected type when decoding TopLevelElement.three"}
33+
34+ def encode_three(value) when is_float(value), do: value
35+ def encode_three(value) when is_integer(value), do: value
36+ def encode_three(_), do: {:error, "Unexpected type when encoding TopLevelElement.three"}
37+
2438 def from_map(m) do
2539 %TopLevelElement{
26- one: m["one"],
40+ one: m["one"] && decode_one(m["one"]),
2741 two: decode_two(m["two"]),
28- three: m["three"],
42+ three: m["three"] && decode_three(m["three"]),
2943 }
3044 end
Test case

test/inputs/schema/uuid.schema

1 generated file · +26 −6
Mschema-dartdefault / TopLevel.dart+26 −6
@@ -14,7 +14,7 @@ class TopLevel {
1414 final String? nullable;
1515 final String one;
1616 final String? optional;
17- final String unionWithEnum;
17+ final dynamic unionWithEnum;
1818
1919 TopLevel({
2020 this.arrNullable,
@@ -26,11 +26,11 @@ class TopLevel {
2626 });
2727
2828 factory TopLevel.fromJson(Map<String, dynamic> json) => TopLevel(
29- arrNullable: json["arrNullable"] == null ? null : List<String?>.from(json["arrNullable"]!.map((x) => x)),
30- arrOne: json["arrOne"] == null ? null : List<String>.from(json["arrOne"]!.map((x) => x)),
31- nullable: (json.containsKey("nullable") ? json["nullable"] : throw FormatException('Missing required property')),
32- one: json["one"],
33- optional: json["optional"],
29+ arrNullable: json["arrNullable"] == null ? null : List<String?>.from(json["arrNullable"]!.map((x) => x == null ? null : ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(x))),
30+ arrOne: json["arrOne"] == null ? null : List<String>.from(json["arrOne"]!.map((x) => ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(x))),
31+ nullable: (json.containsKey("nullable") ? json["nullable"] : throw FormatException('Missing required property')) == null ? null : ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))((json.containsKey("nullable") ? json["nullable"] : throw FormatException('Missing required property'))),
32+ one: ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["one"]),
33+ optional: json["optional"] == null ? null : ((String x) => RegExp(r'^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$').hasMatch(x) ? x : throw FormatException('Invalid UUID'))(json["optional"]),
3434 unionWithEnum: json["unionWithEnum"],
3535 );
3636
@@ -43,3 +43,23 @@ class TopLevel {
4343 "unionWithEnum": unionWithEnum,
4444 };
4545 }
46+
47+enum UnionWithEnumEnum {
48+ FOO
49+}
50+
51+final unionWithEnumEnumValues = EnumValues({
52+ "foo": UnionWithEnumEnum.FOO
53+});
54+
55+class EnumValues<T> {
56+ Map<String, T> map;
57+ late Map<T, String> reverseMap;
58+
59+ EnumValues(this.map);
60+
61+ Map<T, String> get reverse {
62+ reverseMap = map.map((k, v) => MapEntry(v, k));
63+ return reverseMap;
64+ }
65+}
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +2,210 −258
Mschema-elixirdefault / QuickType.ex+2,210 −258
@@ -661,27 +661,67 @@ defmodule MarkConfig do
661661 theta: float() | nil
662662 }
663663
664+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
665+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
666+ def decode_angle(_), do: {:error, "Unexpected type when decoding MarkConfig.angle"}
667+
668+ def encode_angle(value) when is_float(value), do: value
669+ def encode_angle(value) when is_integer(value), do: value
670+ def encode_angle(_), do: {:error, "Unexpected type when encoding MarkConfig.angle"}
671+
664672 def decode_color(value) when is_binary(value), do: value
665673 def decode_color(_), do: {:error, "Unexpected type when decoding MarkConfig.color"}
666674
667675 def encode_color(value) when is_binary(value), do: value
668676 def encode_color(_), do: {:error, "Unexpected type when encoding MarkConfig.color"}
669677
678+ def decode_dx(value) when is_float(value), do: value
679+ def decode_dx(value) when is_integer(value), do: value
680+ def decode_dx(_), do: {:error, "Unexpected type when decoding MarkConfig.dx"}
681+
682+ def encode_dx(value) when is_float(value), do: value
683+ def encode_dx(value) when is_integer(value), do: value
684+ def encode_dx(_), do: {:error, "Unexpected type when encoding MarkConfig.dx"}
685+
686+ def decode_dy(value) when is_float(value), do: value
687+ def decode_dy(value) when is_integer(value), do: value
688+ def decode_dy(_), do: {:error, "Unexpected type when decoding MarkConfig.dy"}
689+
690+ def encode_dy(value) when is_float(value), do: value
691+ def encode_dy(value) when is_integer(value), do: value
692+ def encode_dy(_), do: {:error, "Unexpected type when encoding MarkConfig.dy"}
693+
670694 def decode_fill(value) when is_binary(value), do: value
671695 def decode_fill(_), do: {:error, "Unexpected type when decoding MarkConfig.fill"}
672696
673697 def encode_fill(value) when is_binary(value), do: value
674698 def encode_fill(_), do: {:error, "Unexpected type when encoding MarkConfig.fill"}
675699
700+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
701+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
702+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding MarkConfig.fill_opacity"}
703+
704+ def encode_fill_opacity(value) when is_float(value), do: value
705+ def encode_fill_opacity(value) when is_integer(value), do: value
706+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding MarkConfig.fill_opacity"}
707+
676708 def decode_font(value) when is_binary(value), do: value
677709 def decode_font(_), do: {:error, "Unexpected type when decoding MarkConfig.font"}
678710
679711 def encode_font(value) when is_binary(value), do: value
680712 def encode_font(_), do: {:error, "Unexpected type when encoding MarkConfig.font"}
681713
714+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
715+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
716+ def decode_font_size(_), do: {:error, "Unexpected type when decoding MarkConfig.font_size"}
717+
718+ def encode_font_size(value) when is_float(value), do: value
719+ def encode_font_size(value) when is_integer(value), do: value
720+ def encode_font_size(_), do: {:error, "Unexpected type when encoding MarkConfig.font_size"}
721+
682722 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
683- def decode_font_weight(value) when is_float(value), do: value
684- def decode_font_weight(value) when is_integer(value), do: value
723+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
724+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
685725 def decode_font_weight(value) when is_nil(value), do: value
686726 def decode_font_weight(_), do: {:error, "Unexpected type when decoding MarkConfig.font_weight"}
687727
@@ -697,56 +737,128 @@ defmodule MarkConfig do
697737 def encode_href(value) when is_binary(value), do: value
698738 def encode_href(_), do: {:error, "Unexpected type when encoding MarkConfig.href"}
699739
740+ def decode_limit(value) when is_float(value), do: value
741+ def decode_limit(value) when is_integer(value), do: value
742+ def decode_limit(_), do: {:error, "Unexpected type when decoding MarkConfig.limit"}
743+
744+ def encode_limit(value) when is_float(value), do: value
745+ def encode_limit(value) when is_integer(value), do: value
746+ def encode_limit(_), do: {:error, "Unexpected type when encoding MarkConfig.limit"}
747+
748+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
749+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
750+ def decode_opacity(_), do: {:error, "Unexpected type when decoding MarkConfig.opacity"}
751+
752+ def encode_opacity(value) when is_float(value), do: value
753+ def encode_opacity(value) when is_integer(value), do: value
754+ def encode_opacity(_), do: {:error, "Unexpected type when encoding MarkConfig.opacity"}
755+
756+ def decode_radius(value) when is_float(value) and value >= 0, do: value
757+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
758+ def decode_radius(_), do: {:error, "Unexpected type when decoding MarkConfig.radius"}
759+
760+ def encode_radius(value) when is_float(value), do: value
761+ def encode_radius(value) when is_integer(value), do: value
762+ def encode_radius(_), do: {:error, "Unexpected type when encoding MarkConfig.radius"}
763+
700764 def decode_shape(value) when is_binary(value), do: value
701765 def decode_shape(_), do: {:error, "Unexpected type when decoding MarkConfig.shape"}
702766
703767 def encode_shape(value) when is_binary(value), do: value
704768 def encode_shape(_), do: {:error, "Unexpected type when encoding MarkConfig.shape"}
705769
770+ def decode_size(value) when is_float(value) and value >= 0, do: value
771+ def decode_size(value) when is_integer(value) and value >= 0, do: value
772+ def decode_size(_), do: {:error, "Unexpected type when decoding MarkConfig.size"}
773+
774+ def encode_size(value) when is_float(value), do: value
775+ def encode_size(value) when is_integer(value), do: value
776+ def encode_size(_), do: {:error, "Unexpected type when encoding MarkConfig.size"}
777+
706778 def decode_stroke(value) when is_binary(value), do: value
707779 def decode_stroke(_), do: {:error, "Unexpected type when decoding MarkConfig.stroke"}
708780
709781 def encode_stroke(value) when is_binary(value), do: value
710782 def encode_stroke(_), do: {:error, "Unexpected type when encoding MarkConfig.stroke"}
711783
784+ def decode_stroke_dash_offset(value) when is_float(value), do: value
785+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
786+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding MarkConfig.stroke_dash_offset"}
787+
788+ def encode_stroke_dash_offset(value) when is_float(value), do: value
789+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
790+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding MarkConfig.stroke_dash_offset"}
791+
792+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
793+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
794+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding MarkConfig.stroke_opacity"}
795+
796+ def encode_stroke_opacity(value) when is_float(value), do: value
797+ def encode_stroke_opacity(value) when is_integer(value), do: value
798+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding MarkConfig.stroke_opacity"}
799+
800+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
801+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
802+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding MarkConfig.stroke_width"}
803+
804+ def encode_stroke_width(value) when is_float(value), do: value
805+ def encode_stroke_width(value) when is_integer(value), do: value
806+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding MarkConfig.stroke_width"}
807+
808+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
809+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
810+ def decode_tension(_), do: {:error, "Unexpected type when decoding MarkConfig.tension"}
811+
812+ def encode_tension(value) when is_float(value), do: value
813+ def encode_tension(value) when is_integer(value), do: value
814+ def encode_tension(_), do: {:error, "Unexpected type when encoding MarkConfig.tension"}
815+
712816 def decode_text(value) when is_binary(value), do: value
713817 def decode_text(_), do: {:error, "Unexpected type when decoding MarkConfig.text"}
714818
715819 def encode_text(value) when is_binary(value), do: value
716820 def encode_text(_), do: {:error, "Unexpected type when encoding MarkConfig.text"}
717821
822+ def decode_theta(value) when is_float(value), do: value
823+ def decode_theta(value) when is_integer(value), do: value
824+ def decode_theta(_), do: {:error, "Unexpected type when decoding MarkConfig.theta"}
825+
826+ def encode_theta(value) when is_float(value), do: value
827+ def encode_theta(value) when is_integer(value), do: value
828+ def encode_theta(_), do: {:error, "Unexpected type when encoding MarkConfig.theta"}
829+
718830 def from_map(m) do
719831 %MarkConfig{
720832 align: m["align"] && HorizontalAlign.decode(m["align"]),
721- angle: m["angle"],
833+ angle: m["angle"] && decode_angle(m["angle"]),
722834 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
723835 color: m["color"] && decode_color(m["color"]),
724836 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
725- dx: m["dx"],
726- dy: m["dy"],
837+ dx: m["dx"] && decode_dx(m["dx"]),
838+ dy: m["dy"] && decode_dy(m["dy"]),
727839 fill: m["fill"] && decode_fill(m["fill"]),
728840 filled: m["filled"],
729- fill_opacity: m["fillOpacity"],
841+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
730842 font: m["font"] && decode_font(m["font"]),
731- font_size: m["fontSize"],
843+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
732844 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
733845 font_weight: decode_font_weight(m["fontWeight"]),
734846 href: m["href"] && decode_href(m["href"]),
735847 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
736- limit: m["limit"],
737- opacity: m["opacity"],
848+ limit: m["limit"] && decode_limit(m["limit"]),
849+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
738850 orient: m["orient"] && Orient.decode(m["orient"]),
739- radius: m["radius"],
851+ radius: m["radius"] && decode_radius(m["radius"]),
740852 shape: m["shape"] && decode_shape(m["shape"]),
741- size: m["size"],
853+ size: m["size"] && decode_size(m["size"]),
742854 stroke: m["stroke"] && decode_stroke(m["stroke"]),
743855 stroke_dash: m["strokeDash"],
744- stroke_dash_offset: m["strokeDashOffset"],
745- stroke_opacity: m["strokeOpacity"],
746- stroke_width: m["strokeWidth"],
747- tension: m["tension"],
856+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
857+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
858+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
859+ tension: m["tension"] && decode_tension(m["tension"]),
748860 text: m["text"] && decode_text(m["text"]),
749- theta: m["theta"],
861+ theta: m["theta"] && decode_theta(m["theta"]),
750862 }
751863 end
752864
@@ -934,18 +1046,58 @@ defmodule AxisConfig do
9341046 title_y: float() | nil
9351047 }
9361048
1049+ def decode_band_position(value) when is_float(value), do: value
1050+ def decode_band_position(value) when is_integer(value), do: value
1051+ def decode_band_position(_), do: {:error, "Unexpected type when decoding AxisConfig.band_position"}
1052+
1053+ def encode_band_position(value) when is_float(value), do: value
1054+ def encode_band_position(value) when is_integer(value), do: value
1055+ def encode_band_position(_), do: {:error, "Unexpected type when encoding AxisConfig.band_position"}
1056+
9371057 def decode_domain_color(value) when is_binary(value), do: value
9381058 def decode_domain_color(_), do: {:error, "Unexpected type when decoding AxisConfig.domain_color"}
9391059
9401060 def encode_domain_color(value) when is_binary(value), do: value
9411061 def encode_domain_color(_), do: {:error, "Unexpected type when encoding AxisConfig.domain_color"}
9421062
1063+ def decode_domain_width(value) when is_float(value), do: value
1064+ def decode_domain_width(value) when is_integer(value), do: value
1065+ def decode_domain_width(_), do: {:error, "Unexpected type when decoding AxisConfig.domain_width"}
1066+
1067+ def encode_domain_width(value) when is_float(value), do: value
1068+ def encode_domain_width(value) when is_integer(value), do: value
1069+ def encode_domain_width(_), do: {:error, "Unexpected type when encoding AxisConfig.domain_width"}
1070+
9431071 def decode_grid_color(value) when is_binary(value), do: value
9441072 def decode_grid_color(_), do: {:error, "Unexpected type when decoding AxisConfig.grid_color"}
9451073
9461074 def encode_grid_color(value) when is_binary(value), do: value
9471075 def encode_grid_color(_), do: {:error, "Unexpected type when encoding AxisConfig.grid_color"}
9481076
1077+ def decode_grid_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
1078+ def decode_grid_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
1079+ def decode_grid_opacity(_), do: {:error, "Unexpected type when decoding AxisConfig.grid_opacity"}
1080+
1081+ def encode_grid_opacity(value) when is_float(value), do: value
1082+ def encode_grid_opacity(value) when is_integer(value), do: value
1083+ def encode_grid_opacity(_), do: {:error, "Unexpected type when encoding AxisConfig.grid_opacity"}
1084+
1085+ def decode_grid_width(value) when is_float(value) and value >= 0, do: value
1086+ def decode_grid_width(value) when is_integer(value) and value >= 0, do: value
1087+ def decode_grid_width(_), do: {:error, "Unexpected type when decoding AxisConfig.grid_width"}
1088+
1089+ def encode_grid_width(value) when is_float(value), do: value
1090+ def encode_grid_width(value) when is_integer(value), do: value
1091+ def encode_grid_width(_), do: {:error, "Unexpected type when encoding AxisConfig.grid_width"}
1092+
1093+ def decode_label_angle(value) when is_float(value) and value >= -360 and value <= 360, do: value
1094+ def decode_label_angle(value) when is_integer(value) and value >= -360 and value <= 360, do: value
1095+ def decode_label_angle(_), do: {:error, "Unexpected type when decoding AxisConfig.label_angle"}
1096+
1097+ def encode_label_angle(value) when is_float(value), do: value
1098+ def encode_label_angle(value) when is_integer(value), do: value
1099+ def encode_label_angle(_), do: {:error, "Unexpected type when encoding AxisConfig.label_angle"}
1100+
9491101 def decode_label_color(value) when is_binary(value), do: value
9501102 def decode_label_color(_), do: {:error, "Unexpected type when decoding AxisConfig.label_color"}
9511103
@@ -958,6 +1110,22 @@ defmodule AxisConfig do
9581110 def encode_label_font(value) when is_binary(value), do: value
9591111 def encode_label_font(_), do: {:error, "Unexpected type when encoding AxisConfig.label_font"}
9601112
1113+ def decode_label_font_size(value) when is_float(value) and value >= 0, do: value
1114+ def decode_label_font_size(value) when is_integer(value) and value >= 0, do: value
1115+ def decode_label_font_size(_), do: {:error, "Unexpected type when decoding AxisConfig.label_font_size"}
1116+
1117+ def encode_label_font_size(value) when is_float(value), do: value
1118+ def encode_label_font_size(value) when is_integer(value), do: value
1119+ def encode_label_font_size(_), do: {:error, "Unexpected type when encoding AxisConfig.label_font_size"}
1120+
1121+ def decode_label_limit(value) when is_float(value), do: value
1122+ def decode_label_limit(value) when is_integer(value), do: value
1123+ def decode_label_limit(_), do: {:error, "Unexpected type when decoding AxisConfig.label_limit"}
1124+
1125+ def encode_label_limit(value) when is_float(value), do: value
1126+ def encode_label_limit(value) when is_integer(value), do: value
1127+ def encode_label_limit(_), do: {:error, "Unexpected type when encoding AxisConfig.label_limit"}
1128+
9611129 def decode_label_overlap(value) when is_boolean(value), do: value
9621130 def decode_label_overlap(value) when is_binary(value), do: LabelOverlapEnum.decode(value)
9631131 def decode_label_overlap(value) when is_nil(value), do: value
@@ -968,18 +1136,66 @@ defmodule AxisConfig do
9681136 def encode_label_overlap(value) when is_nil(value), do: value
9691137 def encode_label_overlap(_), do: {:error, "Unexpected type when encoding AxisConfig.label_overlap"}
9701138
1139+ def decode_label_padding(value) when is_float(value), do: value
1140+ def decode_label_padding(value) when is_integer(value), do: value
1141+ def decode_label_padding(_), do: {:error, "Unexpected type when decoding AxisConfig.label_padding"}
1142+
1143+ def encode_label_padding(value) when is_float(value), do: value
1144+ def encode_label_padding(value) when is_integer(value), do: value
1145+ def encode_label_padding(_), do: {:error, "Unexpected type when encoding AxisConfig.label_padding"}
1146+
1147+ def decode_max_extent(value) when is_float(value), do: value
1148+ def decode_max_extent(value) when is_integer(value), do: value
1149+ def decode_max_extent(_), do: {:error, "Unexpected type when decoding AxisConfig.max_extent"}
1150+
1151+ def encode_max_extent(value) when is_float(value), do: value
1152+ def encode_max_extent(value) when is_integer(value), do: value
1153+ def encode_max_extent(_), do: {:error, "Unexpected type when encoding AxisConfig.max_extent"}
1154+
1155+ def decode_min_extent(value) when is_float(value), do: value
1156+ def decode_min_extent(value) when is_integer(value), do: value
1157+ def decode_min_extent(_), do: {:error, "Unexpected type when decoding AxisConfig.min_extent"}
1158+
1159+ def encode_min_extent(value) when is_float(value), do: value
1160+ def encode_min_extent(value) when is_integer(value), do: value
1161+ def encode_min_extent(_), do: {:error, "Unexpected type when encoding AxisConfig.min_extent"}
1162+
9711163 def decode_tick_color(value) when is_binary(value), do: value
9721164 def decode_tick_color(_), do: {:error, "Unexpected type when decoding AxisConfig.tick_color"}
9731165
9741166 def encode_tick_color(value) when is_binary(value), do: value
9751167 def encode_tick_color(_), do: {:error, "Unexpected type when encoding AxisConfig.tick_color"}
9761168
1169+ def decode_tick_size(value) when is_float(value) and value >= 0, do: value
1170+ def decode_tick_size(value) when is_integer(value) and value >= 0, do: value
1171+ def decode_tick_size(_), do: {:error, "Unexpected type when decoding AxisConfig.tick_size"}
1172+
1173+ def encode_tick_size(value) when is_float(value), do: value
1174+ def encode_tick_size(value) when is_integer(value), do: value
1175+ def encode_tick_size(_), do: {:error, "Unexpected type when encoding AxisConfig.tick_size"}
1176+
1177+ def decode_tick_width(value) when is_float(value) and value >= 0, do: value
1178+ def decode_tick_width(value) when is_integer(value) and value >= 0, do: value
1179+ def decode_tick_width(_), do: {:error, "Unexpected type when decoding AxisConfig.tick_width"}
1180+
1181+ def encode_tick_width(value) when is_float(value), do: value
1182+ def encode_tick_width(value) when is_integer(value), do: value
1183+ def encode_tick_width(_), do: {:error, "Unexpected type when encoding AxisConfig.tick_width"}
1184+
9771185 def decode_title_align(value) when is_binary(value), do: value
9781186 def decode_title_align(_), do: {:error, "Unexpected type when decoding AxisConfig.title_align"}
9791187
9801188 def encode_title_align(value) when is_binary(value), do: value
9811189 def encode_title_align(_), do: {:error, "Unexpected type when encoding AxisConfig.title_align"}
9821190
1191+ def decode_title_angle(value) when is_float(value), do: value
1192+ def decode_title_angle(value) when is_integer(value), do: value
1193+ def decode_title_angle(_), do: {:error, "Unexpected type when decoding AxisConfig.title_angle"}
1194+
1195+ def encode_title_angle(value) when is_float(value), do: value
1196+ def encode_title_angle(value) when is_integer(value), do: value
1197+ def encode_title_angle(_), do: {:error, "Unexpected type when encoding AxisConfig.title_angle"}
1198+
9831199 def decode_title_baseline(value) when is_binary(value), do: value
9841200 def decode_title_baseline(_), do: {:error, "Unexpected type when decoding AxisConfig.title_baseline"}
9851201
@@ -998,47 +1214,95 @@ defmodule AxisConfig do
9981214 def encode_title_font(value) when is_binary(value), do: value
9991215 def encode_title_font(_), do: {:error, "Unexpected type when encoding AxisConfig.title_font"}
10001216
1217+ def decode_title_font_size(value) when is_float(value) and value >= 0, do: value
1218+ def decode_title_font_size(value) when is_integer(value) and value >= 0, do: value
1219+ def decode_title_font_size(_), do: {:error, "Unexpected type when decoding AxisConfig.title_font_size"}
1220+
1221+ def encode_title_font_size(value) when is_float(value), do: value
1222+ def encode_title_font_size(value) when is_integer(value), do: value
1223+ def encode_title_font_size(_), do: {:error, "Unexpected type when encoding AxisConfig.title_font_size"}
1224+
1225+ def decode_title_limit(value) when is_float(value), do: value
1226+ def decode_title_limit(value) when is_integer(value), do: value
1227+ def decode_title_limit(_), do: {:error, "Unexpected type when decoding AxisConfig.title_limit"}
1228+
1229+ def encode_title_limit(value) when is_float(value), do: value
1230+ def encode_title_limit(value) when is_integer(value), do: value
1231+ def encode_title_limit(_), do: {:error, "Unexpected type when encoding AxisConfig.title_limit"}
1232+
1233+ def decode_title_max_length(value) when is_float(value), do: value
1234+ def decode_title_max_length(value) when is_integer(value), do: value
1235+ def decode_title_max_length(_), do: {:error, "Unexpected type when decoding AxisConfig.title_max_length"}
1236+
1237+ def encode_title_max_length(value) when is_float(value), do: value
1238+ def encode_title_max_length(value) when is_integer(value), do: value
1239+ def encode_title_max_length(_), do: {:error, "Unexpected type when encoding AxisConfig.title_max_length"}
1240+
1241+ def decode_title_padding(value) when is_float(value), do: value
1242+ def decode_title_padding(value) when is_integer(value), do: value
1243+ def decode_title_padding(_), do: {:error, "Unexpected type when decoding AxisConfig.title_padding"}
1244+
1245+ def encode_title_padding(value) when is_float(value), do: value
1246+ def encode_title_padding(value) when is_integer(value), do: value
1247+ def encode_title_padding(_), do: {:error, "Unexpected type when encoding AxisConfig.title_padding"}
1248+
1249+ def decode_title_x(value) when is_float(value), do: value
1250+ def decode_title_x(value) when is_integer(value), do: value
1251+ def decode_title_x(_), do: {:error, "Unexpected type when decoding AxisConfig.title_x"}
1252+
1253+ def encode_title_x(value) when is_float(value), do: value
1254+ def encode_title_x(value) when is_integer(value), do: value
1255+ def encode_title_x(_), do: {:error, "Unexpected type when encoding AxisConfig.title_x"}
1256+
1257+ def decode_title_y(value) when is_float(value), do: value
1258+ def decode_title_y(value) when is_integer(value), do: value
1259+ def decode_title_y(_), do: {:error, "Unexpected type when decoding AxisConfig.title_y"}
1260+
1261+ def encode_title_y(value) when is_float(value), do: value
1262+ def encode_title_y(value) when is_integer(value), do: value
1263+ def encode_title_y(_), do: {:error, "Unexpected type when encoding AxisConfig.title_y"}
1264+
10011265 def from_map(m) do
10021266 %AxisConfig{
1003- band_position: m["bandPosition"],
1267+ band_position: m["bandPosition"] && decode_band_position(m["bandPosition"]),
10041268 domain: m["domain"],
10051269 domain_color: m["domainColor"] && decode_domain_color(m["domainColor"]),
1006- domain_width: m["domainWidth"],
1270+ domain_width: m["domainWidth"] && decode_domain_width(m["domainWidth"]),
10071271 grid: m["grid"],
10081272 grid_color: m["gridColor"] && decode_grid_color(m["gridColor"]),
10091273 grid_dash: m["gridDash"],
1010- grid_opacity: m["gridOpacity"],
1011- grid_width: m["gridWidth"],
1012- label_angle: m["labelAngle"],
1274+ grid_opacity: m["gridOpacity"] && decode_grid_opacity(m["gridOpacity"]),
1275+ grid_width: m["gridWidth"] && decode_grid_width(m["gridWidth"]),
1276+ label_angle: m["labelAngle"] && decode_label_angle(m["labelAngle"]),
10131277 label_bound: m["labelBound"],
10141278 label_color: m["labelColor"] && decode_label_color(m["labelColor"]),
10151279 label_flush: m["labelFlush"],
10161280 label_font: m["labelFont"] && decode_label_font(m["labelFont"]),
1017- label_font_size: m["labelFontSize"],
1018- label_limit: m["labelLimit"],
1281+ label_font_size: m["labelFontSize"] && decode_label_font_size(m["labelFontSize"]),
1282+ label_limit: m["labelLimit"] && decode_label_limit(m["labelLimit"]),
10191283 label_overlap: decode_label_overlap(m["labelOverlap"]),
1020- label_padding: m["labelPadding"],
1284+ label_padding: m["labelPadding"] && decode_label_padding(m["labelPadding"]),
10211285 labels: m["labels"],
1022- max_extent: m["maxExtent"],
1023- min_extent: m["minExtent"],
1286+ max_extent: m["maxExtent"] && decode_max_extent(m["maxExtent"]),
1287+ min_extent: m["minExtent"] && decode_min_extent(m["minExtent"]),
10241288 short_time_labels: m["shortTimeLabels"],
10251289 tick_color: m["tickColor"] && decode_tick_color(m["tickColor"]),
10261290 tick_round: m["tickRound"],
10271291 ticks: m["ticks"],
1028- tick_size: m["tickSize"],
1029- tick_width: m["tickWidth"],
1292+ tick_size: m["tickSize"] && decode_tick_size(m["tickSize"]),
1293+ tick_width: m["tickWidth"] && decode_tick_width(m["tickWidth"]),
10301294 title_align: m["titleAlign"] && decode_title_align(m["titleAlign"]),
1031- title_angle: m["titleAngle"],
1295+ title_angle: m["titleAngle"] && decode_title_angle(m["titleAngle"]),
10321296 title_baseline: m["titleBaseline"] && decode_title_baseline(m["titleBaseline"]),
10331297 title_color: m["titleColor"] && decode_title_color(m["titleColor"]),
10341298 title_font: m["titleFont"] && decode_title_font(m["titleFont"]),
1035- title_font_size: m["titleFontSize"],
1299+ title_font_size: m["titleFontSize"] && decode_title_font_size(m["titleFontSize"]),
10361300 title_font_weight: m["titleFontWeight"],
1037- title_limit: m["titleLimit"],
1038- title_max_length: m["titleMaxLength"],
1039- title_padding: m["titlePadding"],
1040- title_x: m["titleX"],
1041- title_y: m["titleY"],
1301+ title_limit: m["titleLimit"] && decode_title_limit(m["titleLimit"]),
1302+ title_max_length: m["titleMaxLength"] && decode_title_max_length(m["titleMaxLength"]),
1303+ title_padding: m["titlePadding"] && decode_title_padding(m["titlePadding"]),
1304+ title_x: m["titleX"] && decode_title_x(m["titleX"]),
1305+ title_y: m["titleY"] && decode_title_y(m["titleY"]),
10421306 }
10431307 end
10441308
@@ -1197,18 +1461,58 @@ defmodule VGAxisConfig do
11971461 title_y: float() | nil
11981462 }
11991463
1464+ def decode_band_position(value) when is_float(value), do: value
1465+ def decode_band_position(value) when is_integer(value), do: value
1466+ def decode_band_position(_), do: {:error, "Unexpected type when decoding VGAxisConfig.band_position"}
1467+
1468+ def encode_band_position(value) when is_float(value), do: value
1469+ def encode_band_position(value) when is_integer(value), do: value
1470+ def encode_band_position(_), do: {:error, "Unexpected type when encoding VGAxisConfig.band_position"}
1471+
12001472 def decode_domain_color(value) when is_binary(value), do: value
12011473 def decode_domain_color(_), do: {:error, "Unexpected type when decoding VGAxisConfig.domain_color"}
12021474
12031475 def encode_domain_color(value) when is_binary(value), do: value
12041476 def encode_domain_color(_), do: {:error, "Unexpected type when encoding VGAxisConfig.domain_color"}
12051477
1478+ def decode_domain_width(value) when is_float(value), do: value
1479+ def decode_domain_width(value) when is_integer(value), do: value
1480+ def decode_domain_width(_), do: {:error, "Unexpected type when decoding VGAxisConfig.domain_width"}
1481+
1482+ def encode_domain_width(value) when is_float(value), do: value
1483+ def encode_domain_width(value) when is_integer(value), do: value
1484+ def encode_domain_width(_), do: {:error, "Unexpected type when encoding VGAxisConfig.domain_width"}
1485+
12061486 def decode_grid_color(value) when is_binary(value), do: value
12071487 def decode_grid_color(_), do: {:error, "Unexpected type when decoding VGAxisConfig.grid_color"}
12081488
12091489 def encode_grid_color(value) when is_binary(value), do: value
12101490 def encode_grid_color(_), do: {:error, "Unexpected type when encoding VGAxisConfig.grid_color"}
12111491
1492+ def decode_grid_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
1493+ def decode_grid_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
1494+ def decode_grid_opacity(_), do: {:error, "Unexpected type when decoding VGAxisConfig.grid_opacity"}
1495+
1496+ def encode_grid_opacity(value) when is_float(value), do: value
1497+ def encode_grid_opacity(value) when is_integer(value), do: value
1498+ def encode_grid_opacity(_), do: {:error, "Unexpected type when encoding VGAxisConfig.grid_opacity"}
1499+
1500+ def decode_grid_width(value) when is_float(value) and value >= 0, do: value
1501+ def decode_grid_width(value) when is_integer(value) and value >= 0, do: value
1502+ def decode_grid_width(_), do: {:error, "Unexpected type when decoding VGAxisConfig.grid_width"}
1503+
1504+ def encode_grid_width(value) when is_float(value), do: value
1505+ def encode_grid_width(value) when is_integer(value), do: value
1506+ def encode_grid_width(_), do: {:error, "Unexpected type when encoding VGAxisConfig.grid_width"}
1507+
1508+ def decode_label_angle(value) when is_float(value) and value >= -360 and value <= 360, do: value
1509+ def decode_label_angle(value) when is_integer(value) and value >= -360 and value <= 360, do: value
1510+ def decode_label_angle(_), do: {:error, "Unexpected type when decoding VGAxisConfig.label_angle"}
1511+
1512+ def encode_label_angle(value) when is_float(value), do: value
1513+ def encode_label_angle(value) when is_integer(value), do: value
1514+ def encode_label_angle(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_angle"}
1515+
12121516 def decode_label_color(value) when is_binary(value), do: value
12131517 def decode_label_color(_), do: {:error, "Unexpected type when decoding VGAxisConfig.label_color"}
12141518
@@ -1221,6 +1525,22 @@ defmodule VGAxisConfig do
12211525 def encode_label_font(value) when is_binary(value), do: value
12221526 def encode_label_font(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_font"}
12231527
1528+ def decode_label_font_size(value) when is_float(value) and value >= 0, do: value
1529+ def decode_label_font_size(value) when is_integer(value) and value >= 0, do: value
1530+ def decode_label_font_size(_), do: {:error, "Unexpected type when decoding VGAxisConfig.label_font_size"}
1531+
1532+ def encode_label_font_size(value) when is_float(value), do: value
1533+ def encode_label_font_size(value) when is_integer(value), do: value
1534+ def encode_label_font_size(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_font_size"}
1535+
1536+ def decode_label_limit(value) when is_float(value), do: value
1537+ def decode_label_limit(value) when is_integer(value), do: value
1538+ def decode_label_limit(_), do: {:error, "Unexpected type when decoding VGAxisConfig.label_limit"}
1539+
1540+ def encode_label_limit(value) when is_float(value), do: value
1541+ def encode_label_limit(value) when is_integer(value), do: value
1542+ def encode_label_limit(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_limit"}
1543+
12241544 def decode_label_overlap(value) when is_boolean(value), do: value
12251545 def decode_label_overlap(value) when is_binary(value), do: LabelOverlapEnum.decode(value)
12261546 def decode_label_overlap(value) when is_nil(value), do: value
@@ -1231,18 +1551,66 @@ defmodule VGAxisConfig do
12311551 def encode_label_overlap(value) when is_nil(value), do: value
12321552 def encode_label_overlap(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_overlap"}
12331553
1554+ def decode_label_padding(value) when is_float(value), do: value
1555+ def decode_label_padding(value) when is_integer(value), do: value
1556+ def decode_label_padding(_), do: {:error, "Unexpected type when decoding VGAxisConfig.label_padding"}
1557+
1558+ def encode_label_padding(value) when is_float(value), do: value
1559+ def encode_label_padding(value) when is_integer(value), do: value
1560+ def encode_label_padding(_), do: {:error, "Unexpected type when encoding VGAxisConfig.label_padding"}
1561+
1562+ def decode_max_extent(value) when is_float(value), do: value
1563+ def decode_max_extent(value) when is_integer(value), do: value
1564+ def decode_max_extent(_), do: {:error, "Unexpected type when decoding VGAxisConfig.max_extent"}
1565+
1566+ def encode_max_extent(value) when is_float(value), do: value
1567+ def encode_max_extent(value) when is_integer(value), do: value
1568+ def encode_max_extent(_), do: {:error, "Unexpected type when encoding VGAxisConfig.max_extent"}
1569+
1570+ def decode_min_extent(value) when is_float(value), do: value
1571+ def decode_min_extent(value) when is_integer(value), do: value
1572+ def decode_min_extent(_), do: {:error, "Unexpected type when decoding VGAxisConfig.min_extent"}
1573+
1574+ def encode_min_extent(value) when is_float(value), do: value
1575+ def encode_min_extent(value) when is_integer(value), do: value
1576+ def encode_min_extent(_), do: {:error, "Unexpected type when encoding VGAxisConfig.min_extent"}
1577+
12341578 def decode_tick_color(value) when is_binary(value), do: value
12351579 def decode_tick_color(_), do: {:error, "Unexpected type when decoding VGAxisConfig.tick_color"}
12361580
12371581 def encode_tick_color(value) when is_binary(value), do: value
12381582 def encode_tick_color(_), do: {:error, "Unexpected type when encoding VGAxisConfig.tick_color"}
12391583
1584+ def decode_tick_size(value) when is_float(value) and value >= 0, do: value
1585+ def decode_tick_size(value) when is_integer(value) and value >= 0, do: value
1586+ def decode_tick_size(_), do: {:error, "Unexpected type when decoding VGAxisConfig.tick_size"}
1587+
1588+ def encode_tick_size(value) when is_float(value), do: value
1589+ def encode_tick_size(value) when is_integer(value), do: value
1590+ def encode_tick_size(_), do: {:error, "Unexpected type when encoding VGAxisConfig.tick_size"}
1591+
1592+ def decode_tick_width(value) when is_float(value) and value >= 0, do: value
1593+ def decode_tick_width(value) when is_integer(value) and value >= 0, do: value
1594+ def decode_tick_width(_), do: {:error, "Unexpected type when decoding VGAxisConfig.tick_width"}
1595+
1596+ def encode_tick_width(value) when is_float(value), do: value
1597+ def encode_tick_width(value) when is_integer(value), do: value
1598+ def encode_tick_width(_), do: {:error, "Unexpected type when encoding VGAxisConfig.tick_width"}
1599+
12401600 def decode_title_align(value) when is_binary(value), do: value
12411601 def decode_title_align(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_align"}
12421602
12431603 def encode_title_align(value) when is_binary(value), do: value
12441604 def encode_title_align(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_align"}
12451605
1606+ def decode_title_angle(value) when is_float(value), do: value
1607+ def decode_title_angle(value) when is_integer(value), do: value
1608+ def decode_title_angle(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_angle"}
1609+
1610+ def encode_title_angle(value) when is_float(value), do: value
1611+ def encode_title_angle(value) when is_integer(value), do: value
1612+ def encode_title_angle(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_angle"}
1613+
12461614 def decode_title_baseline(value) when is_binary(value), do: value
12471615 def decode_title_baseline(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_baseline"}
12481616
@@ -1261,46 +1629,94 @@ defmodule VGAxisConfig do
12611629 def encode_title_font(value) when is_binary(value), do: value
12621630 def encode_title_font(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_font"}
12631631
1632+ def decode_title_font_size(value) when is_float(value) and value >= 0, do: value
1633+ def decode_title_font_size(value) when is_integer(value) and value >= 0, do: value
1634+ def decode_title_font_size(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_font_size"}
1635+
1636+ def encode_title_font_size(value) when is_float(value), do: value
1637+ def encode_title_font_size(value) when is_integer(value), do: value
1638+ def encode_title_font_size(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_font_size"}
1639+
1640+ def decode_title_limit(value) when is_float(value), do: value
1641+ def decode_title_limit(value) when is_integer(value), do: value
1642+ def decode_title_limit(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_limit"}
1643+
1644+ def encode_title_limit(value) when is_float(value), do: value
1645+ def encode_title_limit(value) when is_integer(value), do: value
1646+ def encode_title_limit(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_limit"}
1647+
1648+ def decode_title_max_length(value) when is_float(value), do: value
1649+ def decode_title_max_length(value) when is_integer(value), do: value
1650+ def decode_title_max_length(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_max_length"}
1651+
1652+ def encode_title_max_length(value) when is_float(value), do: value
1653+ def encode_title_max_length(value) when is_integer(value), do: value
1654+ def encode_title_max_length(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_max_length"}
1655+
1656+ def decode_title_padding(value) when is_float(value), do: value
1657+ def decode_title_padding(value) when is_integer(value), do: value
1658+ def decode_title_padding(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_padding"}
1659+
1660+ def encode_title_padding(value) when is_float(value), do: value
1661+ def encode_title_padding(value) when is_integer(value), do: value
1662+ def encode_title_padding(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_padding"}
1663+
1664+ def decode_title_x(value) when is_float(value), do: value
1665+ def decode_title_x(value) when is_integer(value), do: value
1666+ def decode_title_x(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_x"}
1667+
1668+ def encode_title_x(value) when is_float(value), do: value
1669+ def encode_title_x(value) when is_integer(value), do: value
1670+ def encode_title_x(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_x"}
1671+
1672+ def decode_title_y(value) when is_float(value), do: value
1673+ def decode_title_y(value) when is_integer(value), do: value
1674+ def decode_title_y(_), do: {:error, "Unexpected type when decoding VGAxisConfig.title_y"}
1675+
1676+ def encode_title_y(value) when is_float(value), do: value
1677+ def encode_title_y(value) when is_integer(value), do: value
1678+ def encode_title_y(_), do: {:error, "Unexpected type when encoding VGAxisConfig.title_y"}
1679+
12641680 def from_map(m) do
12651681 %VGAxisConfig{
1266- band_position: m["bandPosition"],
1682+ band_position: m["bandPosition"] && decode_band_position(m["bandPosition"]),
12671683 domain: m["domain"],
12681684 domain_color: m["domainColor"] && decode_domain_color(m["domainColor"]),
1269- domain_width: m["domainWidth"],
1685+ domain_width: m["domainWidth"] && decode_domain_width(m["domainWidth"]),
12701686 grid: m["grid"],
12711687 grid_color: m["gridColor"] && decode_grid_color(m["gridColor"]),
12721688 grid_dash: m["gridDash"],
1273- grid_opacity: m["gridOpacity"],
1274- grid_width: m["gridWidth"],
1275- label_angle: m["labelAngle"],
1689+ grid_opacity: m["gridOpacity"] && decode_grid_opacity(m["gridOpacity"]),
1690+ grid_width: m["gridWidth"] && decode_grid_width(m["gridWidth"]),
1691+ label_angle: m["labelAngle"] && decode_label_angle(m["labelAngle"]),
12761692 label_bound: m["labelBound"],
12771693 label_color: m["labelColor"] && decode_label_color(m["labelColor"]),
12781694 label_flush: m["labelFlush"],
12791695 label_font: m["labelFont"] && decode_label_font(m["labelFont"]),
1280- label_font_size: m["labelFontSize"],
1281- label_limit: m["labelLimit"],
1696+ label_font_size: m["labelFontSize"] && decode_label_font_size(m["labelFontSize"]),
1697+ label_limit: m["labelLimit"] && decode_label_limit(m["labelLimit"]),
12821698 label_overlap: decode_label_overlap(m["labelOverlap"]),
1283- label_padding: m["labelPadding"],
1699+ label_padding: m["labelPadding"] && decode_label_padding(m["labelPadding"]),
12841700 labels: m["labels"],
1285- max_extent: m["maxExtent"],
1286- min_extent: m["minExtent"],
1701+ max_extent: m["maxExtent"] && decode_max_extent(m["maxExtent"]),
1702+ min_extent: m["minExtent"] && decode_min_extent(m["minExtent"]),
12871703 tick_color: m["tickColor"] && decode_tick_color(m["tickColor"]),
12881704 tick_round: m["tickRound"],
12891705 ticks: m["ticks"],
1290- tick_size: m["tickSize"],
1291- tick_width: m["tickWidth"],
1706+ tick_size: m["tickSize"] && decode_tick_size(m["tickSize"]),
1707+ tick_width: m["tickWidth"] && decode_tick_width(m["tickWidth"]),
12921708 title_align: m["titleAlign"] && decode_title_align(m["titleAlign"]),
1293- title_angle: m["titleAngle"],
1709+ title_angle: m["titleAngle"] && decode_title_angle(m["titleAngle"]),
12941710 title_baseline: m["titleBaseline"] && decode_title_baseline(m["titleBaseline"]),
12951711 title_color: m["titleColor"] && decode_title_color(m["titleColor"]),
12961712 title_font: m["titleFont"] && decode_title_font(m["titleFont"]),
1297- title_font_size: m["titleFontSize"],
1713+ title_font_size: m["titleFontSize"] && decode_title_font_size(m["titleFontSize"]),
12981714 title_font_weight: m["titleFontWeight"],
1299- title_limit: m["titleLimit"],
1300- title_max_length: m["titleMaxLength"],
1301- title_padding: m["titlePadding"],
1302- title_x: m["titleX"],
1303- title_y: m["titleY"],
1715+ title_limit: m["titleLimit"] && decode_title_limit(m["titleLimit"]),
1716+ title_max_length: m["titleMaxLength"] && decode_title_max_length(m["titleMaxLength"]),
1717+ title_padding: m["titlePadding"] && decode_title_padding(m["titlePadding"]),
1718+ title_x: m["titleX"] && decode_title_x(m["titleX"]),
1719+ title_y: m["titleY"] && decode_title_y(m["titleY"]),
13041720 }
13051721 end
13061722
@@ -1436,27 +1852,91 @@ defmodule BarConfig do
14361852 theta: float() | nil
14371853 }
14381854
1855+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
1856+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
1857+ def decode_angle(_), do: {:error, "Unexpected type when decoding BarConfig.angle"}
1858+
1859+ def encode_angle(value) when is_float(value), do: value
1860+ def encode_angle(value) when is_integer(value), do: value
1861+ def encode_angle(_), do: {:error, "Unexpected type when encoding BarConfig.angle"}
1862+
1863+ def decode_bin_spacing(value) when is_float(value) and value >= 0, do: value
1864+ def decode_bin_spacing(value) when is_integer(value) and value >= 0, do: value
1865+ def decode_bin_spacing(_), do: {:error, "Unexpected type when decoding BarConfig.bin_spacing"}
1866+
1867+ def encode_bin_spacing(value) when is_float(value), do: value
1868+ def encode_bin_spacing(value) when is_integer(value), do: value
1869+ def encode_bin_spacing(_), do: {:error, "Unexpected type when encoding BarConfig.bin_spacing"}
1870+
14391871 def decode_color(value) when is_binary(value), do: value
14401872 def decode_color(_), do: {:error, "Unexpected type when decoding BarConfig.color"}
14411873
14421874 def encode_color(value) when is_binary(value), do: value
14431875 def encode_color(_), do: {:error, "Unexpected type when encoding BarConfig.color"}
14441876
1877+ def decode_continuous_band_size(value) when is_float(value) and value >= 0, do: value
1878+ def decode_continuous_band_size(value) when is_integer(value) and value >= 0, do: value
1879+ def decode_continuous_band_size(_), do: {:error, "Unexpected type when decoding BarConfig.continuous_band_size"}
1880+
1881+ def encode_continuous_band_size(value) when is_float(value), do: value
1882+ def encode_continuous_band_size(value) when is_integer(value), do: value
1883+ def encode_continuous_band_size(_), do: {:error, "Unexpected type when encoding BarConfig.continuous_band_size"}
1884+
1885+ def decode_discrete_band_size(value) when is_float(value) and value >= 0, do: value
1886+ def decode_discrete_band_size(value) when is_integer(value) and value >= 0, do: value
1887+ def decode_discrete_band_size(_), do: {:error, "Unexpected type when decoding BarConfig.discrete_band_size"}
1888+
1889+ def encode_discrete_band_size(value) when is_float(value), do: value
1890+ def encode_discrete_band_size(value) when is_integer(value), do: value
1891+ def encode_discrete_band_size(_), do: {:error, "Unexpected type when encoding BarConfig.discrete_band_size"}
1892+
1893+ def decode_dx(value) when is_float(value), do: value
1894+ def decode_dx(value) when is_integer(value), do: value
1895+ def decode_dx(_), do: {:error, "Unexpected type when decoding BarConfig.dx"}
1896+
1897+ def encode_dx(value) when is_float(value), do: value
1898+ def encode_dx(value) when is_integer(value), do: value
1899+ def encode_dx(_), do: {:error, "Unexpected type when encoding BarConfig.dx"}
1900+
1901+ def decode_dy(value) when is_float(value), do: value
1902+ def decode_dy(value) when is_integer(value), do: value
1903+ def decode_dy(_), do: {:error, "Unexpected type when decoding BarConfig.dy"}
1904+
1905+ def encode_dy(value) when is_float(value), do: value
1906+ def encode_dy(value) when is_integer(value), do: value
1907+ def encode_dy(_), do: {:error, "Unexpected type when encoding BarConfig.dy"}
1908+
14451909 def decode_fill(value) when is_binary(value), do: value
14461910 def decode_fill(_), do: {:error, "Unexpected type when decoding BarConfig.fill"}
14471911
14481912 def encode_fill(value) when is_binary(value), do: value
14491913 def encode_fill(_), do: {:error, "Unexpected type when encoding BarConfig.fill"}
14501914
1915+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
1916+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
1917+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding BarConfig.fill_opacity"}
1918+
1919+ def encode_fill_opacity(value) when is_float(value), do: value
1920+ def encode_fill_opacity(value) when is_integer(value), do: value
1921+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding BarConfig.fill_opacity"}
1922+
14511923 def decode_font(value) when is_binary(value), do: value
14521924 def decode_font(_), do: {:error, "Unexpected type when decoding BarConfig.font"}
14531925
14541926 def encode_font(value) when is_binary(value), do: value
14551927 def encode_font(_), do: {:error, "Unexpected type when encoding BarConfig.font"}
14561928
1929+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
1930+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
1931+ def decode_font_size(_), do: {:error, "Unexpected type when decoding BarConfig.font_size"}
1932+
1933+ def encode_font_size(value) when is_float(value), do: value
1934+ def encode_font_size(value) when is_integer(value), do: value
1935+ def encode_font_size(_), do: {:error, "Unexpected type when encoding BarConfig.font_size"}
1936+
14571937 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
1458- def decode_font_weight(value) when is_float(value), do: value
1459- def decode_font_weight(value) when is_integer(value), do: value
1938+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
1939+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
14601940 def decode_font_weight(value) when is_nil(value), do: value
14611941 def decode_font_weight(_), do: {:error, "Unexpected type when decoding BarConfig.font_weight"}
14621942
@@ -1472,59 +1952,131 @@ defmodule BarConfig do
14721952 def encode_href(value) when is_binary(value), do: value
14731953 def encode_href(_), do: {:error, "Unexpected type when encoding BarConfig.href"}
14741954
1955+ def decode_limit(value) when is_float(value), do: value
1956+ def decode_limit(value) when is_integer(value), do: value
1957+ def decode_limit(_), do: {:error, "Unexpected type when decoding BarConfig.limit"}
1958+
1959+ def encode_limit(value) when is_float(value), do: value
1960+ def encode_limit(value) when is_integer(value), do: value
1961+ def encode_limit(_), do: {:error, "Unexpected type when encoding BarConfig.limit"}
1962+
1963+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
1964+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
1965+ def decode_opacity(_), do: {:error, "Unexpected type when decoding BarConfig.opacity"}
1966+
1967+ def encode_opacity(value) when is_float(value), do: value
1968+ def encode_opacity(value) when is_integer(value), do: value
1969+ def encode_opacity(_), do: {:error, "Unexpected type when encoding BarConfig.opacity"}
1970+
1971+ def decode_radius(value) when is_float(value) and value >= 0, do: value
1972+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
1973+ def decode_radius(_), do: {:error, "Unexpected type when decoding BarConfig.radius"}
1974+
1975+ def encode_radius(value) when is_float(value), do: value
1976+ def encode_radius(value) when is_integer(value), do: value
1977+ def encode_radius(_), do: {:error, "Unexpected type when encoding BarConfig.radius"}
1978+
14751979 def decode_shape(value) when is_binary(value), do: value
14761980 def decode_shape(_), do: {:error, "Unexpected type when decoding BarConfig.shape"}
14771981
14781982 def encode_shape(value) when is_binary(value), do: value
14791983 def encode_shape(_), do: {:error, "Unexpected type when encoding BarConfig.shape"}
14801984
1985+ def decode_size(value) when is_float(value) and value >= 0, do: value
1986+ def decode_size(value) when is_integer(value) and value >= 0, do: value
1987+ def decode_size(_), do: {:error, "Unexpected type when decoding BarConfig.size"}
1988+
1989+ def encode_size(value) when is_float(value), do: value
1990+ def encode_size(value) when is_integer(value), do: value
1991+ def encode_size(_), do: {:error, "Unexpected type when encoding BarConfig.size"}
1992+
14811993 def decode_stroke(value) when is_binary(value), do: value
14821994 def decode_stroke(_), do: {:error, "Unexpected type when decoding BarConfig.stroke"}
14831995
14841996 def encode_stroke(value) when is_binary(value), do: value
14851997 def encode_stroke(_), do: {:error, "Unexpected type when encoding BarConfig.stroke"}
14861998
1999+ def decode_stroke_dash_offset(value) when is_float(value), do: value
2000+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
2001+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding BarConfig.stroke_dash_offset"}
2002+
2003+ def encode_stroke_dash_offset(value) when is_float(value), do: value
2004+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
2005+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding BarConfig.stroke_dash_offset"}
2006+
2007+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
2008+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
2009+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding BarConfig.stroke_opacity"}
2010+
2011+ def encode_stroke_opacity(value) when is_float(value), do: value
2012+ def encode_stroke_opacity(value) when is_integer(value), do: value
2013+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding BarConfig.stroke_opacity"}
2014+
2015+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
2016+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
2017+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding BarConfig.stroke_width"}
2018+
2019+ def encode_stroke_width(value) when is_float(value), do: value
2020+ def encode_stroke_width(value) when is_integer(value), do: value
2021+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding BarConfig.stroke_width"}
2022+
2023+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
2024+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
2025+ def decode_tension(_), do: {:error, "Unexpected type when decoding BarConfig.tension"}
2026+
2027+ def encode_tension(value) when is_float(value), do: value
2028+ def encode_tension(value) when is_integer(value), do: value
2029+ def encode_tension(_), do: {:error, "Unexpected type when encoding BarConfig.tension"}
2030+
14872031 def decode_text(value) when is_binary(value), do: value
14882032 def decode_text(_), do: {:error, "Unexpected type when decoding BarConfig.text"}
14892033
14902034 def encode_text(value) when is_binary(value), do: value
14912035 def encode_text(_), do: {:error, "Unexpected type when encoding BarConfig.text"}
14922036
2037+ def decode_theta(value) when is_float(value), do: value
2038+ def decode_theta(value) when is_integer(value), do: value
2039+ def decode_theta(_), do: {:error, "Unexpected type when decoding BarConfig.theta"}
2040+
2041+ def encode_theta(value) when is_float(value), do: value
2042+ def encode_theta(value) when is_integer(value), do: value
2043+ def encode_theta(_), do: {:error, "Unexpected type when encoding BarConfig.theta"}
2044+
14932045 def from_map(m) do
14942046 %BarConfig{
14952047 align: m["align"] && HorizontalAlign.decode(m["align"]),
1496- angle: m["angle"],
2048+ angle: m["angle"] && decode_angle(m["angle"]),
14972049 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
1498- bin_spacing: m["binSpacing"],
2050+ bin_spacing: m["binSpacing"] && decode_bin_spacing(m["binSpacing"]),
14992051 color: m["color"] && decode_color(m["color"]),
1500- continuous_band_size: m["continuousBandSize"],
2052+ continuous_band_size: m["continuousBandSize"] && decode_continuous_band_size(m["continuousBandSize"]),
15012053 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
1502- discrete_band_size: m["discreteBandSize"],
1503- dx: m["dx"],
1504- dy: m["dy"],
2054+ discrete_band_size: m["discreteBandSize"] && decode_discrete_band_size(m["discreteBandSize"]),
2055+ dx: m["dx"] && decode_dx(m["dx"]),
2056+ dy: m["dy"] && decode_dy(m["dy"]),
15052057 fill: m["fill"] && decode_fill(m["fill"]),
15062058 filled: m["filled"],
1507- fill_opacity: m["fillOpacity"],
2059+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
15082060 font: m["font"] && decode_font(m["font"]),
1509- font_size: m["fontSize"],
2061+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
15102062 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
15112063 font_weight: decode_font_weight(m["fontWeight"]),
15122064 href: m["href"] && decode_href(m["href"]),
15132065 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
1514- limit: m["limit"],
1515- opacity: m["opacity"],
2066+ limit: m["limit"] && decode_limit(m["limit"]),
2067+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
15162068 orient: m["orient"] && Orient.decode(m["orient"]),
1517- radius: m["radius"],
2069+ radius: m["radius"] && decode_radius(m["radius"]),
15182070 shape: m["shape"] && decode_shape(m["shape"]),
1519- size: m["size"],
2071+ size: m["size"] && decode_size(m["size"]),
15202072 stroke: m["stroke"] && decode_stroke(m["stroke"]),
15212073 stroke_dash: m["strokeDash"],
1522- stroke_dash_offset: m["strokeDashOffset"],
1523- stroke_opacity: m["strokeOpacity"],
1524- stroke_width: m["strokeWidth"],
1525- tension: m["tension"],
2074+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
2075+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
2076+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
2077+ tension: m["tension"] && decode_tension(m["tension"]),
15262078 text: m["text"] && decode_text(m["text"]),
1527- theta: m["theta"],
2079+ theta: m["theta"] && decode_theta(m["theta"]),
15282080 }
15292081 end
15302082
@@ -1829,24 +2381,80 @@ defmodule LegendConfig do
18292381 title_padding: float() | nil
18302382 }
18312383
2384+ def decode_corner_radius(value) when is_float(value), do: value
2385+ def decode_corner_radius(value) when is_integer(value), do: value
2386+ def decode_corner_radius(_), do: {:error, "Unexpected type when decoding LegendConfig.corner_radius"}
2387+
2388+ def encode_corner_radius(value) when is_float(value), do: value
2389+ def encode_corner_radius(value) when is_integer(value), do: value
2390+ def encode_corner_radius(_), do: {:error, "Unexpected type when encoding LegendConfig.corner_radius"}
2391+
2392+ def decode_entry_padding(value) when is_float(value), do: value
2393+ def decode_entry_padding(value) when is_integer(value), do: value
2394+ def decode_entry_padding(_), do: {:error, "Unexpected type when decoding LegendConfig.entry_padding"}
2395+
2396+ def encode_entry_padding(value) when is_float(value), do: value
2397+ def encode_entry_padding(value) when is_integer(value), do: value
2398+ def encode_entry_padding(_), do: {:error, "Unexpected type when encoding LegendConfig.entry_padding"}
2399+
18322400 def decode_fill_color(value) when is_binary(value), do: value
18332401 def decode_fill_color(_), do: {:error, "Unexpected type when decoding LegendConfig.fill_color"}
18342402
18352403 def encode_fill_color(value) when is_binary(value), do: value
18362404 def encode_fill_color(_), do: {:error, "Unexpected type when encoding LegendConfig.fill_color"}
18372405
2406+ def decode_gradient_height(value) when is_float(value) and value >= 0, do: value
2407+ def decode_gradient_height(value) when is_integer(value) and value >= 0, do: value
2408+ def decode_gradient_height(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_height"}
2409+
2410+ def encode_gradient_height(value) when is_float(value), do: value
2411+ def encode_gradient_height(value) when is_integer(value), do: value
2412+ def encode_gradient_height(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_height"}
2413+
18382414 def decode_gradient_label_baseline(value) when is_binary(value), do: value
18392415 def decode_gradient_label_baseline(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_label_baseline"}
18402416
18412417 def encode_gradient_label_baseline(value) when is_binary(value), do: value
18422418 def encode_gradient_label_baseline(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_label_baseline"}
18432419
2420+ def decode_gradient_label_limit(value) when is_float(value), do: value
2421+ def decode_gradient_label_limit(value) when is_integer(value), do: value
2422+ def decode_gradient_label_limit(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_label_limit"}
2423+
2424+ def encode_gradient_label_limit(value) when is_float(value), do: value
2425+ def encode_gradient_label_limit(value) when is_integer(value), do: value
2426+ def encode_gradient_label_limit(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_label_limit"}
2427+
2428+ def decode_gradient_label_offset(value) when is_float(value), do: value
2429+ def decode_gradient_label_offset(value) when is_integer(value), do: value
2430+ def decode_gradient_label_offset(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_label_offset"}
2431+
2432+ def encode_gradient_label_offset(value) when is_float(value), do: value
2433+ def encode_gradient_label_offset(value) when is_integer(value), do: value
2434+ def encode_gradient_label_offset(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_label_offset"}
2435+
18442436 def decode_gradient_stroke_color(value) when is_binary(value), do: value
18452437 def decode_gradient_stroke_color(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_stroke_color"}
18462438
18472439 def encode_gradient_stroke_color(value) when is_binary(value), do: value
18482440 def encode_gradient_stroke_color(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_stroke_color"}
18492441
2442+ def decode_gradient_stroke_width(value) when is_float(value) and value >= 0, do: value
2443+ def decode_gradient_stroke_width(value) when is_integer(value) and value >= 0, do: value
2444+ def decode_gradient_stroke_width(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_stroke_width"}
2445+
2446+ def encode_gradient_stroke_width(value) when is_float(value), do: value
2447+ def encode_gradient_stroke_width(value) when is_integer(value), do: value
2448+ def encode_gradient_stroke_width(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_stroke_width"}
2449+
2450+ def decode_gradient_width(value) when is_float(value) and value >= 0, do: value
2451+ def decode_gradient_width(value) when is_integer(value) and value >= 0, do: value
2452+ def decode_gradient_width(_), do: {:error, "Unexpected type when decoding LegendConfig.gradient_width"}
2453+
2454+ def encode_gradient_width(value) when is_float(value), do: value
2455+ def encode_gradient_width(value) when is_integer(value), do: value
2456+ def encode_gradient_width(_), do: {:error, "Unexpected type when encoding LegendConfig.gradient_width"}
2457+
18502458 def decode_label_align(value) when is_binary(value), do: value
18512459 def decode_label_align(_), do: {:error, "Unexpected type when decoding LegendConfig.label_align"}
18522460
@@ -1871,18 +2479,82 @@ defmodule LegendConfig do
18712479 def encode_label_font(value) when is_binary(value), do: value
18722480 def encode_label_font(_), do: {:error, "Unexpected type when encoding LegendConfig.label_font"}
18732481
2482+ def decode_label_font_size(value) when is_float(value) and value >= 0, do: value
2483+ def decode_label_font_size(value) when is_integer(value) and value >= 0, do: value
2484+ def decode_label_font_size(_), do: {:error, "Unexpected type when decoding LegendConfig.label_font_size"}
2485+
2486+ def encode_label_font_size(value) when is_float(value), do: value
2487+ def encode_label_font_size(value) when is_integer(value), do: value
2488+ def encode_label_font_size(_), do: {:error, "Unexpected type when encoding LegendConfig.label_font_size"}
2489+
2490+ def decode_label_limit(value) when is_float(value), do: value
2491+ def decode_label_limit(value) when is_integer(value), do: value
2492+ def decode_label_limit(_), do: {:error, "Unexpected type when decoding LegendConfig.label_limit"}
2493+
2494+ def encode_label_limit(value) when is_float(value), do: value
2495+ def encode_label_limit(value) when is_integer(value), do: value
2496+ def encode_label_limit(_), do: {:error, "Unexpected type when encoding LegendConfig.label_limit"}
2497+
2498+ def decode_label_offset(value) when is_float(value) and value >= 0, do: value
2499+ def decode_label_offset(value) when is_integer(value) and value >= 0, do: value
2500+ def decode_label_offset(_), do: {:error, "Unexpected type when decoding LegendConfig.label_offset"}
2501+
2502+ def encode_label_offset(value) when is_float(value), do: value
2503+ def encode_label_offset(value) when is_integer(value), do: value
2504+ def encode_label_offset(_), do: {:error, "Unexpected type when encoding LegendConfig.label_offset"}
2505+
2506+ def decode_offset(value) when is_float(value), do: value
2507+ def decode_offset(value) when is_integer(value), do: value
2508+ def decode_offset(_), do: {:error, "Unexpected type when decoding LegendConfig.offset"}
2509+
2510+ def encode_offset(value) when is_float(value), do: value
2511+ def encode_offset(value) when is_integer(value), do: value
2512+ def encode_offset(_), do: {:error, "Unexpected type when encoding LegendConfig.offset"}
2513+
2514+ def decode_padding(value) when is_float(value), do: value
2515+ def decode_padding(value) when is_integer(value), do: value
2516+ def decode_padding(_), do: {:error, "Unexpected type when decoding LegendConfig.padding"}
2517+
2518+ def encode_padding(value) when is_float(value), do: value
2519+ def encode_padding(value) when is_integer(value), do: value
2520+ def encode_padding(_), do: {:error, "Unexpected type when encoding LegendConfig.padding"}
2521+
18742522 def decode_stroke_color(value) when is_binary(value), do: value
18752523 def decode_stroke_color(_), do: {:error, "Unexpected type when decoding LegendConfig.stroke_color"}
18762524
18772525 def encode_stroke_color(value) when is_binary(value), do: value
18782526 def encode_stroke_color(_), do: {:error, "Unexpected type when encoding LegendConfig.stroke_color"}
18792527
2528+ def decode_stroke_width(value) when is_float(value), do: value
2529+ def decode_stroke_width(value) when is_integer(value), do: value
2530+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding LegendConfig.stroke_width"}
2531+
2532+ def encode_stroke_width(value) when is_float(value), do: value
2533+ def encode_stroke_width(value) when is_integer(value), do: value
2534+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding LegendConfig.stroke_width"}
2535+
18802536 def decode_symbol_color(value) when is_binary(value), do: value
18812537 def decode_symbol_color(_), do: {:error, "Unexpected type when decoding LegendConfig.symbol_color"}
18822538
18832539 def encode_symbol_color(value) when is_binary(value), do: value
18842540 def encode_symbol_color(_), do: {:error, "Unexpected type when encoding LegendConfig.symbol_color"}
18852541
2542+ def decode_symbol_size(value) when is_float(value) and value >= 0, do: value
2543+ def decode_symbol_size(value) when is_integer(value) and value >= 0, do: value
2544+ def decode_symbol_size(_), do: {:error, "Unexpected type when decoding LegendConfig.symbol_size"}
2545+
2546+ def encode_symbol_size(value) when is_float(value), do: value
2547+ def encode_symbol_size(value) when is_integer(value), do: value
2548+ def encode_symbol_size(_), do: {:error, "Unexpected type when encoding LegendConfig.symbol_size"}
2549+
2550+ def decode_symbol_stroke_width(value) when is_float(value) and value >= 0, do: value
2551+ def decode_symbol_stroke_width(value) when is_integer(value) and value >= 0, do: value
2552+ def decode_symbol_stroke_width(_), do: {:error, "Unexpected type when decoding LegendConfig.symbol_stroke_width"}
2553+
2554+ def encode_symbol_stroke_width(value) when is_float(value), do: value
2555+ def encode_symbol_stroke_width(value) when is_integer(value), do: value
2556+ def encode_symbol_stroke_width(_), do: {:error, "Unexpected type when encoding LegendConfig.symbol_stroke_width"}
2557+
18862558 def decode_symbol_type(value) when is_binary(value), do: value
18872559 def decode_symbol_type(_), do: {:error, "Unexpected type when decoding LegendConfig.symbol_type"}
18882560
@@ -1913,44 +2585,68 @@ defmodule LegendConfig do
19132585 def encode_title_font(value) when is_binary(value), do: value
19142586 def encode_title_font(_), do: {:error, "Unexpected type when encoding LegendConfig.title_font"}
19152587
2588+ def decode_title_font_size(value) when is_float(value), do: value
2589+ def decode_title_font_size(value) when is_integer(value), do: value
2590+ def decode_title_font_size(_), do: {:error, "Unexpected type when decoding LegendConfig.title_font_size"}
2591+
2592+ def encode_title_font_size(value) when is_float(value), do: value
2593+ def encode_title_font_size(value) when is_integer(value), do: value
2594+ def encode_title_font_size(_), do: {:error, "Unexpected type when encoding LegendConfig.title_font_size"}
2595+
2596+ def decode_title_limit(value) when is_float(value), do: value
2597+ def decode_title_limit(value) when is_integer(value), do: value
2598+ def decode_title_limit(_), do: {:error, "Unexpected type when decoding LegendConfig.title_limit"}
2599+
2600+ def encode_title_limit(value) when is_float(value), do: value
2601+ def encode_title_limit(value) when is_integer(value), do: value
2602+ def encode_title_limit(_), do: {:error, "Unexpected type when encoding LegendConfig.title_limit"}
2603+
2604+ def decode_title_padding(value) when is_float(value), do: value
2605+ def decode_title_padding(value) when is_integer(value), do: value
2606+ def decode_title_padding(_), do: {:error, "Unexpected type when decoding LegendConfig.title_padding"}
2607+
2608+ def encode_title_padding(value) when is_float(value), do: value
2609+ def encode_title_padding(value) when is_integer(value), do: value
2610+ def encode_title_padding(_), do: {:error, "Unexpected type when encoding LegendConfig.title_padding"}
2611+
19162612 def from_map(m) do
19172613 %LegendConfig{
1918- corner_radius: m["cornerRadius"],
1919- entry_padding: m["entryPadding"],
2614+ corner_radius: m["cornerRadius"] && decode_corner_radius(m["cornerRadius"]),
2615+ entry_padding: m["entryPadding"] && decode_entry_padding(m["entryPadding"]),
19202616 fill_color: m["fillColor"] && decode_fill_color(m["fillColor"]),
1921- gradient_height: m["gradientHeight"],
2617+ gradient_height: m["gradientHeight"] && decode_gradient_height(m["gradientHeight"]),
19222618 gradient_label_baseline: m["gradientLabelBaseline"] && decode_gradient_label_baseline(m["gradientLabelBaseline"]),
1923- gradient_label_limit: m["gradientLabelLimit"],
1924- gradient_label_offset: m["gradientLabelOffset"],
2619+ gradient_label_limit: m["gradientLabelLimit"] && decode_gradient_label_limit(m["gradientLabelLimit"]),
2620+ gradient_label_offset: m["gradientLabelOffset"] && decode_gradient_label_offset(m["gradientLabelOffset"]),
19252621 gradient_stroke_color: m["gradientStrokeColor"] && decode_gradient_stroke_color(m["gradientStrokeColor"]),
1926- gradient_stroke_width: m["gradientStrokeWidth"],
1927- gradient_width: m["gradientWidth"],
2622+ gradient_stroke_width: m["gradientStrokeWidth"] && decode_gradient_stroke_width(m["gradientStrokeWidth"]),
2623+ gradient_width: m["gradientWidth"] && decode_gradient_width(m["gradientWidth"]),
19282624 label_align: m["labelAlign"] && decode_label_align(m["labelAlign"]),
19292625 label_baseline: m["labelBaseline"] && decode_label_baseline(m["labelBaseline"]),
19302626 label_color: m["labelColor"] && decode_label_color(m["labelColor"]),
19312627 label_font: m["labelFont"] && decode_label_font(m["labelFont"]),
1932- label_font_size: m["labelFontSize"],
1933- label_limit: m["labelLimit"],
1934- label_offset: m["labelOffset"],
1935- offset: m["offset"],
2628+ label_font_size: m["labelFontSize"] && decode_label_font_size(m["labelFontSize"]),
2629+ label_limit: m["labelLimit"] && decode_label_limit(m["labelLimit"]),
2630+ label_offset: m["labelOffset"] && decode_label_offset(m["labelOffset"]),
2631+ offset: m["offset"] && decode_offset(m["offset"]),
19362632 orient: m["orient"] && LegendOrient.decode(m["orient"]),
1937- padding: m["padding"],
2633+ padding: m["padding"] && decode_padding(m["padding"]),
19382634 short_time_labels: m["shortTimeLabels"],
19392635 stroke_color: m["strokeColor"] && decode_stroke_color(m["strokeColor"]),
19402636 stroke_dash: m["strokeDash"],
1941- stroke_width: m["strokeWidth"],
2637+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
19422638 symbol_color: m["symbolColor"] && decode_symbol_color(m["symbolColor"]),
1943- symbol_size: m["symbolSize"],
1944- symbol_stroke_width: m["symbolStrokeWidth"],
2639+ symbol_size: m["symbolSize"] && decode_symbol_size(m["symbolSize"]),
2640+ symbol_stroke_width: m["symbolStrokeWidth"] && decode_symbol_stroke_width(m["symbolStrokeWidth"]),
19452641 symbol_type: m["symbolType"] && decode_symbol_type(m["symbolType"]),
19462642 title_align: m["titleAlign"] && decode_title_align(m["titleAlign"]),
19472643 title_baseline: m["titleBaseline"] && decode_title_baseline(m["titleBaseline"]),
19482644 title_color: m["titleColor"] && decode_title_color(m["titleColor"]),
19492645 title_font: m["titleFont"] && decode_title_font(m["titleFont"]),
1950- title_font_size: m["titleFontSize"],
2646+ title_font_size: m["titleFontSize"] && decode_title_font_size(m["titleFontSize"]),
19512647 title_font_weight: m["titleFontWeight"],
1952- title_limit: m["titleLimit"],
1953- title_padding: m["titlePadding"],
2648+ title_limit: m["titleLimit"] && decode_title_limit(m["titleLimit"]),
2649+ title_padding: m["titlePadding"] && decode_title_padding(m["titlePadding"]),
19542650 }
19552651 end
19562652
@@ -2018,12 +2714,44 @@ defmodule PaddingClass do
20182714 top: float() | nil
20192715 }
20202716
2717+ def decode_bottom(value) when is_float(value), do: value
2718+ def decode_bottom(value) when is_integer(value), do: value
2719+ def decode_bottom(_), do: {:error, "Unexpected type when decoding PaddingClass.bottom"}
2720+
2721+ def encode_bottom(value) when is_float(value), do: value
2722+ def encode_bottom(value) when is_integer(value), do: value
2723+ def encode_bottom(_), do: {:error, "Unexpected type when encoding PaddingClass.bottom"}
2724+
2725+ def decode_left(value) when is_float(value), do: value
2726+ def decode_left(value) when is_integer(value), do: value
2727+ def decode_left(_), do: {:error, "Unexpected type when decoding PaddingClass.left"}
2728+
2729+ def encode_left(value) when is_float(value), do: value
2730+ def encode_left(value) when is_integer(value), do: value
2731+ def encode_left(_), do: {:error, "Unexpected type when encoding PaddingClass.left"}
2732+
2733+ def decode_right(value) when is_float(value), do: value
2734+ def decode_right(value) when is_integer(value), do: value
2735+ def decode_right(_), do: {:error, "Unexpected type when decoding PaddingClass.right"}
2736+
2737+ def encode_right(value) when is_float(value), do: value
2738+ def encode_right(value) when is_integer(value), do: value
2739+ def encode_right(_), do: {:error, "Unexpected type when encoding PaddingClass.right"}
2740+
2741+ def decode_top(value) when is_float(value), do: value
2742+ def decode_top(value) when is_integer(value), do: value
2743+ def decode_top(_), do: {:error, "Unexpected type when decoding PaddingClass.top"}
2744+
2745+ def encode_top(value) when is_float(value), do: value
2746+ def encode_top(value) when is_integer(value), do: value
2747+ def encode_top(_), do: {:error, "Unexpected type when encoding PaddingClass.top"}
2748+
20212749 def from_map(m) do
20222750 %PaddingClass{
2023- bottom: m["bottom"],
2024- left: m["left"],
2025- right: m["right"],
2026- top: m["top"],
2751+ bottom: m["bottom"] && decode_bottom(m["bottom"]),
2752+ left: m["left"] && decode_left(m["left"]),
2753+ right: m["right"] && decode_right(m["right"]),
2754+ top: m["top"] && decode_top(m["top"]),
20272755 }
20282756 end
20292757
@@ -2150,6 +2878,54 @@ defmodule ProjectionConfig do
21502878 type: VGProjectionType.t() | nil
21512879 }
21522880
2881+ def decode_clip_angle(value) when is_float(value), do: value
2882+ def decode_clip_angle(value) when is_integer(value), do: value
2883+ def decode_clip_angle(_), do: {:error, "Unexpected type when decoding ProjectionConfig.clip_angle"}
2884+
2885+ def encode_clip_angle(value) when is_float(value), do: value
2886+ def encode_clip_angle(value) when is_integer(value), do: value
2887+ def encode_clip_angle(_), do: {:error, "Unexpected type when encoding ProjectionConfig.clip_angle"}
2888+
2889+ def decode_coefficient(value) when is_float(value), do: value
2890+ def decode_coefficient(value) when is_integer(value), do: value
2891+ def decode_coefficient(_), do: {:error, "Unexpected type when decoding ProjectionConfig.coefficient"}
2892+
2893+ def encode_coefficient(value) when is_float(value), do: value
2894+ def encode_coefficient(value) when is_integer(value), do: value
2895+ def encode_coefficient(_), do: {:error, "Unexpected type when encoding ProjectionConfig.coefficient"}
2896+
2897+ def decode_distance(value) when is_float(value), do: value
2898+ def decode_distance(value) when is_integer(value), do: value
2899+ def decode_distance(_), do: {:error, "Unexpected type when decoding ProjectionConfig.distance"}
2900+
2901+ def encode_distance(value) when is_float(value), do: value
2902+ def encode_distance(value) when is_integer(value), do: value
2903+ def encode_distance(_), do: {:error, "Unexpected type when encoding ProjectionConfig.distance"}
2904+
2905+ def decode_fraction(value) when is_float(value), do: value
2906+ def decode_fraction(value) when is_integer(value), do: value
2907+ def decode_fraction(_), do: {:error, "Unexpected type when decoding ProjectionConfig.fraction"}
2908+
2909+ def encode_fraction(value) when is_float(value), do: value
2910+ def encode_fraction(value) when is_integer(value), do: value
2911+ def encode_fraction(_), do: {:error, "Unexpected type when encoding ProjectionConfig.fraction"}
2912+
2913+ def decode_lobes(value) when is_float(value), do: value
2914+ def decode_lobes(value) when is_integer(value), do: value
2915+ def decode_lobes(_), do: {:error, "Unexpected type when decoding ProjectionConfig.lobes"}
2916+
2917+ def encode_lobes(value) when is_float(value), do: value
2918+ def encode_lobes(value) when is_integer(value), do: value
2919+ def encode_lobes(_), do: {:error, "Unexpected type when encoding ProjectionConfig.lobes"}
2920+
2921+ def decode_parallel(value) when is_float(value), do: value
2922+ def decode_parallel(value) when is_integer(value), do: value
2923+ def decode_parallel(_), do: {:error, "Unexpected type when decoding ProjectionConfig.parallel"}
2924+
2925+ def encode_parallel(value) when is_float(value), do: value
2926+ def encode_parallel(value) when is_integer(value), do: value
2927+ def encode_parallel(_), do: {:error, "Unexpected type when encoding ProjectionConfig.parallel"}
2928+
21532929 def decode_precision_value(value) when is_float(value), do: value
21542930 def decode_precision_value(value) when is_integer(value), do: value
21552931 def decode_precision_value(value) when is_binary(value), do: value
@@ -2160,23 +2936,55 @@ defmodule ProjectionConfig do
21602936 def encode_precision_value(value) when is_binary(value), do: value
21612937 def encode_precision_value(_), do: {:error, "Unexpected type when encoding ProjectionConfig.precision"}
21622938
2939+ def decode_radius(value) when is_float(value), do: value
2940+ def decode_radius(value) when is_integer(value), do: value
2941+ def decode_radius(_), do: {:error, "Unexpected type when decoding ProjectionConfig.radius"}
2942+
2943+ def encode_radius(value) when is_float(value), do: value
2944+ def encode_radius(value) when is_integer(value), do: value
2945+ def encode_radius(_), do: {:error, "Unexpected type when encoding ProjectionConfig.radius"}
2946+
2947+ def decode_ratio(value) when is_float(value), do: value
2948+ def decode_ratio(value) when is_integer(value), do: value
2949+ def decode_ratio(_), do: {:error, "Unexpected type when decoding ProjectionConfig.ratio"}
2950+
2951+ def encode_ratio(value) when is_float(value), do: value
2952+ def encode_ratio(value) when is_integer(value), do: value
2953+ def encode_ratio(_), do: {:error, "Unexpected type when encoding ProjectionConfig.ratio"}
2954+
2955+ def decode_spacing(value) when is_float(value), do: value
2956+ def decode_spacing(value) when is_integer(value), do: value
2957+ def decode_spacing(_), do: {:error, "Unexpected type when decoding ProjectionConfig.spacing"}
2958+
2959+ def encode_spacing(value) when is_float(value), do: value
2960+ def encode_spacing(value) when is_integer(value), do: value
2961+ def encode_spacing(_), do: {:error, "Unexpected type when encoding ProjectionConfig.spacing"}
2962+
2963+ def decode_tilt(value) when is_float(value), do: value
2964+ def decode_tilt(value) when is_integer(value), do: value
2965+ def decode_tilt(_), do: {:error, "Unexpected type when decoding ProjectionConfig.tilt"}
2966+
2967+ def encode_tilt(value) when is_float(value), do: value
2968+ def encode_tilt(value) when is_integer(value), do: value
2969+ def encode_tilt(_), do: {:error, "Unexpected type when encoding ProjectionConfig.tilt"}
2970+
21632971 def from_map(m) do
21642972 %ProjectionConfig{
21652973 center: m["center"],
2166- clip_angle: m["clipAngle"],
2974+ clip_angle: m["clipAngle"] && decode_clip_angle(m["clipAngle"]),
21672975 clip_extent: m["clipExtent"],
2168- coefficient: m["coefficient"],
2169- distance: m["distance"],
2170- fraction: m["fraction"],
2171- lobes: m["lobes"],
2172- parallel: m["parallel"],
2976+ coefficient: m["coefficient"] && decode_coefficient(m["coefficient"]),
2977+ distance: m["distance"] && decode_distance(m["distance"]),
2978+ fraction: m["fraction"] && decode_fraction(m["fraction"]),
2979+ lobes: m["lobes"] && decode_lobes(m["lobes"]),
2980+ parallel: m["parallel"] && decode_parallel(m["parallel"]),
21732981 precision: m["precision"]
21742982 |> Map.new(fn {key, value} -> {key, decode_precision_value(value)} end),
2175- radius: m["radius"],
2176- ratio: m["ratio"],
2983+ radius: m["radius"] && decode_radius(m["radius"]),
2984+ ratio: m["ratio"] && decode_ratio(m["ratio"]),
21772985 rotate: m["rotate"],
2178- spacing: m["spacing"],
2179- tilt: m["tilt"],
2986+ spacing: m["spacing"] && decode_spacing(m["spacing"]),
2987+ tilt: m["tilt"] && decode_tilt(m["tilt"]),
21802988 type: m["type"] && VGProjectionType.decode(m["type"]),
21812989 }
21822990 end
@@ -2225,18 +3033,34 @@ defmodule VGScheme do
22253033 step: float() | nil
22263034 }
22273035
3036+ def decode_count(value) when is_float(value), do: value
3037+ def decode_count(value) when is_integer(value), do: value
3038+ def decode_count(_), do: {:error, "Unexpected type when decoding VGScheme.count"}
3039+
3040+ def encode_count(value) when is_float(value), do: value
3041+ def encode_count(value) when is_integer(value), do: value
3042+ def encode_count(_), do: {:error, "Unexpected type when encoding VGScheme.count"}
3043+
22283044 def decode_scheme(value) when is_binary(value), do: value
22293045 def decode_scheme(_), do: {:error, "Unexpected type when decoding VGScheme.scheme"}
22303046
22313047 def encode_scheme(value) when is_binary(value), do: value
22323048 def encode_scheme(_), do: {:error, "Unexpected type when encoding VGScheme.scheme"}
22333049
3050+ def decode_step(value) when is_float(value), do: value
3051+ def decode_step(value) when is_integer(value), do: value
3052+ def decode_step(_), do: {:error, "Unexpected type when decoding VGScheme.step"}
3053+
3054+ def encode_step(value) when is_float(value), do: value
3055+ def encode_step(value) when is_integer(value), do: value
3056+ def encode_step(_), do: {:error, "Unexpected type when encoding VGScheme.step"}
3057+
22343058 def from_map(m) do
22353059 %VGScheme{
2236- count: m["count"],
3060+ count: m["count"] && decode_count(m["count"]),
22373061 extent: m["extent"],
22383062 scheme: m["scheme"] && decode_scheme(m["scheme"]),
2239- step: m["step"],
3063+ step: m["step"] && decode_step(m["step"]),
22403064 }
22413065 end
22423066
@@ -2312,26 +3136,146 @@ defmodule ScaleConfig do
23123136 use_unaggregated_domain: boolean() | nil
23133137 }
23143138
3139+ def decode_band_padding_inner(value) when is_float(value) and value >= 0 and value <= 1, do: value
3140+ def decode_band_padding_inner(value) when is_integer(value) and value >= 0 and value <= 1, do: value
3141+ def decode_band_padding_inner(_), do: {:error, "Unexpected type when decoding ScaleConfig.band_padding_inner"}
3142+
3143+ def encode_band_padding_inner(value) when is_float(value), do: value
3144+ def encode_band_padding_inner(value) when is_integer(value), do: value
3145+ def encode_band_padding_inner(_), do: {:error, "Unexpected type when encoding ScaleConfig.band_padding_inner"}
3146+
3147+ def decode_band_padding_outer(value) when is_float(value) and value >= 0 and value <= 1, do: value
3148+ def decode_band_padding_outer(value) when is_integer(value) and value >= 0 and value <= 1, do: value
3149+ def decode_band_padding_outer(_), do: {:error, "Unexpected type when decoding ScaleConfig.band_padding_outer"}
3150+
3151+ def encode_band_padding_outer(value) when is_float(value), do: value
3152+ def encode_band_padding_outer(value) when is_integer(value), do: value
3153+ def encode_band_padding_outer(_), do: {:error, "Unexpected type when encoding ScaleConfig.band_padding_outer"}
3154+
3155+ def decode_continuous_padding(value) when is_float(value) and value >= 0, do: value
3156+ def decode_continuous_padding(value) when is_integer(value) and value >= 0, do: value
3157+ def decode_continuous_padding(_), do: {:error, "Unexpected type when decoding ScaleConfig.continuous_padding"}
3158+
3159+ def encode_continuous_padding(value) when is_float(value), do: value
3160+ def encode_continuous_padding(value) when is_integer(value), do: value
3161+ def encode_continuous_padding(_), do: {:error, "Unexpected type when encoding ScaleConfig.continuous_padding"}
3162+
3163+ def decode_max_band_size(value) when is_float(value) and value >= 0, do: value
3164+ def decode_max_band_size(value) when is_integer(value) and value >= 0, do: value
3165+ def decode_max_band_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.max_band_size"}
3166+
3167+ def encode_max_band_size(value) when is_float(value), do: value
3168+ def encode_max_band_size(value) when is_integer(value), do: value
3169+ def encode_max_band_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.max_band_size"}
3170+
3171+ def decode_max_font_size(value) when is_float(value) and value >= 0, do: value
3172+ def decode_max_font_size(value) when is_integer(value) and value >= 0, do: value
3173+ def decode_max_font_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.max_font_size"}
3174+
3175+ def encode_max_font_size(value) when is_float(value), do: value
3176+ def encode_max_font_size(value) when is_integer(value), do: value
3177+ def encode_max_font_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.max_font_size"}
3178+
3179+ def decode_max_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
3180+ def decode_max_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
3181+ def decode_max_opacity(_), do: {:error, "Unexpected type when decoding ScaleConfig.max_opacity"}
3182+
3183+ def encode_max_opacity(value) when is_float(value), do: value
3184+ def encode_max_opacity(value) when is_integer(value), do: value
3185+ def encode_max_opacity(_), do: {:error, "Unexpected type when encoding ScaleConfig.max_opacity"}
3186+
3187+ def decode_max_size(value) when is_float(value) and value >= 0, do: value
3188+ def decode_max_size(value) when is_integer(value) and value >= 0, do: value
3189+ def decode_max_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.max_size"}
3190+
3191+ def encode_max_size(value) when is_float(value), do: value
3192+ def encode_max_size(value) when is_integer(value), do: value
3193+ def encode_max_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.max_size"}
3194+
3195+ def decode_max_stroke_width(value) when is_float(value) and value >= 0, do: value
3196+ def decode_max_stroke_width(value) when is_integer(value) and value >= 0, do: value
3197+ def decode_max_stroke_width(_), do: {:error, "Unexpected type when decoding ScaleConfig.max_stroke_width"}
3198+
3199+ def encode_max_stroke_width(value) when is_float(value), do: value
3200+ def encode_max_stroke_width(value) when is_integer(value), do: value
3201+ def encode_max_stroke_width(_), do: {:error, "Unexpected type when encoding ScaleConfig.max_stroke_width"}
3202+
3203+ def decode_min_band_size(value) when is_float(value) and value >= 0, do: value
3204+ def decode_min_band_size(value) when is_integer(value) and value >= 0, do: value
3205+ def decode_min_band_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.min_band_size"}
3206+
3207+ def encode_min_band_size(value) when is_float(value), do: value
3208+ def encode_min_band_size(value) when is_integer(value), do: value
3209+ def encode_min_band_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.min_band_size"}
3210+
3211+ def decode_min_font_size(value) when is_float(value) and value >= 0, do: value
3212+ def decode_min_font_size(value) when is_integer(value) and value >= 0, do: value
3213+ def decode_min_font_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.min_font_size"}
3214+
3215+ def encode_min_font_size(value) when is_float(value), do: value
3216+ def encode_min_font_size(value) when is_integer(value), do: value
3217+ def encode_min_font_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.min_font_size"}
3218+
3219+ def decode_min_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
3220+ def decode_min_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
3221+ def decode_min_opacity(_), do: {:error, "Unexpected type when decoding ScaleConfig.min_opacity"}
3222+
3223+ def encode_min_opacity(value) when is_float(value), do: value
3224+ def encode_min_opacity(value) when is_integer(value), do: value
3225+ def encode_min_opacity(_), do: {:error, "Unexpected type when encoding ScaleConfig.min_opacity"}
3226+
3227+ def decode_min_size(value) when is_float(value) and value >= 0, do: value
3228+ def decode_min_size(value) when is_integer(value) and value >= 0, do: value
3229+ def decode_min_size(_), do: {:error, "Unexpected type when decoding ScaleConfig.min_size"}
3230+
3231+ def encode_min_size(value) when is_float(value), do: value
3232+ def encode_min_size(value) when is_integer(value), do: value
3233+ def encode_min_size(_), do: {:error, "Unexpected type when encoding ScaleConfig.min_size"}
3234+
3235+ def decode_min_stroke_width(value) when is_float(value) and value >= 0, do: value
3236+ def decode_min_stroke_width(value) when is_integer(value) and value >= 0, do: value
3237+ def decode_min_stroke_width(_), do: {:error, "Unexpected type when decoding ScaleConfig.min_stroke_width"}
3238+
3239+ def encode_min_stroke_width(value) when is_float(value), do: value
3240+ def encode_min_stroke_width(value) when is_integer(value), do: value
3241+ def encode_min_stroke_width(_), do: {:error, "Unexpected type when encoding ScaleConfig.min_stroke_width"}
3242+
3243+ def decode_point_padding(value) when is_float(value) and value >= 0 and value <= 1, do: value
3244+ def decode_point_padding(value) when is_integer(value) and value >= 0 and value <= 1, do: value
3245+ def decode_point_padding(_), do: {:error, "Unexpected type when decoding ScaleConfig.point_padding"}
3246+
3247+ def encode_point_padding(value) when is_float(value), do: value
3248+ def encode_point_padding(value) when is_integer(value), do: value
3249+ def encode_point_padding(_), do: {:error, "Unexpected type when encoding ScaleConfig.point_padding"}
3250+
3251+ def decode_text_x_range_step(value) when is_float(value) and value >= 0, do: value
3252+ def decode_text_x_range_step(value) when is_integer(value) and value >= 0, do: value
3253+ def decode_text_x_range_step(_), do: {:error, "Unexpected type when decoding ScaleConfig.text_x_range_step"}
3254+
3255+ def encode_text_x_range_step(value) when is_float(value), do: value
3256+ def encode_text_x_range_step(value) when is_integer(value), do: value
3257+ def encode_text_x_range_step(_), do: {:error, "Unexpected type when encoding ScaleConfig.text_x_range_step"}
3258+
23153259 def from_map(m) do
23163260 %ScaleConfig{
2317- band_padding_inner: m["bandPaddingInner"],
2318- band_padding_outer: m["bandPaddingOuter"],
3261+ band_padding_inner: m["bandPaddingInner"] && decode_band_padding_inner(m["bandPaddingInner"]),
3262+ band_padding_outer: m["bandPaddingOuter"] && decode_band_padding_outer(m["bandPaddingOuter"]),
23193263 clamp: m["clamp"],
2320- continuous_padding: m["continuousPadding"],
2321- max_band_size: m["maxBandSize"],
2322- max_font_size: m["maxFontSize"],
2323- max_opacity: m["maxOpacity"],
2324- max_size: m["maxSize"],
2325- max_stroke_width: m["maxStrokeWidth"],
2326- min_band_size: m["minBandSize"],
2327- min_font_size: m["minFontSize"],
2328- min_opacity: m["minOpacity"],
2329- min_size: m["minSize"],
2330- min_stroke_width: m["minStrokeWidth"],
2331- point_padding: m["pointPadding"],
3264+ continuous_padding: m["continuousPadding"] && decode_continuous_padding(m["continuousPadding"]),
3265+ max_band_size: m["maxBandSize"] && decode_max_band_size(m["maxBandSize"]),
3266+ max_font_size: m["maxFontSize"] && decode_max_font_size(m["maxFontSize"]),
3267+ max_opacity: m["maxOpacity"] && decode_max_opacity(m["maxOpacity"]),
3268+ max_size: m["maxSize"] && decode_max_size(m["maxSize"]),
3269+ max_stroke_width: m["maxStrokeWidth"] && decode_max_stroke_width(m["maxStrokeWidth"]),
3270+ min_band_size: m["minBandSize"] && decode_min_band_size(m["minBandSize"]),
3271+ min_font_size: m["minFontSize"] && decode_min_font_size(m["minFontSize"]),
3272+ min_opacity: m["minOpacity"] && decode_min_opacity(m["minOpacity"]),
3273+ min_size: m["minSize"] && decode_min_size(m["minSize"]),
3274+ min_stroke_width: m["minStrokeWidth"] && decode_min_stroke_width(m["minStrokeWidth"]),
3275+ point_padding: m["pointPadding"] && decode_point_padding(m["pointPadding"]),
23323276 range_step: m["rangeStep"],
23333277 round: m["round"],
2334- text_x_range_step: m["textXRangeStep"],
3278+ text_x_range_step: m["textXRangeStep"] && decode_text_x_range_step(m["textXRangeStep"]),
23353279 use_unaggregated_domain: m["useUnaggregatedDomain"],
23363280 }
23373281 end
@@ -2562,21 +3506,53 @@ defmodule BrushConfig do
25623506 def encode_fill(value) when is_binary(value), do: value
25633507 def encode_fill(_), do: {:error, "Unexpected type when encoding BrushConfig.fill"}
25643508
3509+ def decode_fill_opacity(value) when is_float(value), do: value
3510+ def decode_fill_opacity(value) when is_integer(value), do: value
3511+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding BrushConfig.fill_opacity"}
3512+
3513+ def encode_fill_opacity(value) when is_float(value), do: value
3514+ def encode_fill_opacity(value) when is_integer(value), do: value
3515+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding BrushConfig.fill_opacity"}
3516+
25653517 def decode_stroke(value) when is_binary(value), do: value
25663518 def decode_stroke(_), do: {:error, "Unexpected type when decoding BrushConfig.stroke"}
25673519
25683520 def encode_stroke(value) when is_binary(value), do: value
25693521 def encode_stroke(_), do: {:error, "Unexpected type when encoding BrushConfig.stroke"}
25703522
3523+ def decode_stroke_dash_offset(value) when is_float(value), do: value
3524+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
3525+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding BrushConfig.stroke_dash_offset"}
3526+
3527+ def encode_stroke_dash_offset(value) when is_float(value), do: value
3528+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
3529+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding BrushConfig.stroke_dash_offset"}
3530+
3531+ def decode_stroke_opacity(value) when is_float(value), do: value
3532+ def decode_stroke_opacity(value) when is_integer(value), do: value
3533+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding BrushConfig.stroke_opacity"}
3534+
3535+ def encode_stroke_opacity(value) when is_float(value), do: value
3536+ def encode_stroke_opacity(value) when is_integer(value), do: value
3537+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding BrushConfig.stroke_opacity"}
3538+
3539+ def decode_stroke_width(value) when is_float(value), do: value
3540+ def decode_stroke_width(value) when is_integer(value), do: value
3541+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding BrushConfig.stroke_width"}
3542+
3543+ def encode_stroke_width(value) when is_float(value), do: value
3544+ def encode_stroke_width(value) when is_integer(value), do: value
3545+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding BrushConfig.stroke_width"}
3546+
25713547 def from_map(m) do
25723548 %BrushConfig{
25733549 fill: m["fill"] && decode_fill(m["fill"]),
2574- fill_opacity: m["fillOpacity"],
3550+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
25753551 stroke: m["stroke"] && decode_stroke(m["stroke"]),
25763552 stroke_dash: m["strokeDash"],
2577- stroke_dash_offset: m["strokeDashOffset"],
2578- stroke_opacity: m["strokeOpacity"],
2579- stroke_width: m["strokeWidth"],
3553+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
3554+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
3555+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
25803556 }
25813557 end
25823558
@@ -2822,14 +3798,38 @@ defmodule VGBinding do
28223798 def encode_input(value) when is_binary(value), do: value
28233799 def encode_input(_), do: {:error, "Unexpected type when encoding VGBinding.input"}
28243800
3801+ def decode_max(value) when is_float(value), do: value
3802+ def decode_max(value) when is_integer(value), do: value
3803+ def decode_max(_), do: {:error, "Unexpected type when decoding VGBinding.max"}
3804+
3805+ def encode_max(value) when is_float(value), do: value
3806+ def encode_max(value) when is_integer(value), do: value
3807+ def encode_max(_), do: {:error, "Unexpected type when encoding VGBinding.max"}
3808+
3809+ def decode_min(value) when is_float(value), do: value
3810+ def decode_min(value) when is_integer(value), do: value
3811+ def decode_min(_), do: {:error, "Unexpected type when decoding VGBinding.min"}
3812+
3813+ def encode_min(value) when is_float(value), do: value
3814+ def encode_min(value) when is_integer(value), do: value
3815+ def encode_min(_), do: {:error, "Unexpected type when encoding VGBinding.min"}
3816+
3817+ def decode_step(value) when is_float(value), do: value
3818+ def decode_step(value) when is_integer(value), do: value
3819+ def decode_step(_), do: {:error, "Unexpected type when decoding VGBinding.step"}
3820+
3821+ def encode_step(value) when is_float(value), do: value
3822+ def encode_step(value) when is_integer(value), do: value
3823+ def encode_step(_), do: {:error, "Unexpected type when encoding VGBinding.step"}
3824+
28253825 def from_map(m) do
28263826 %VGBinding{
28273827 element: m["element"] && decode_element(m["element"]),
28283828 input: decode_input(m["input"]),
28293829 options: m["options"],
2830- max: m["max"],
2831- min: m["min"],
2832- step: m["step"],
3830+ max: m["max"] && decode_max(m["max"]),
3831+ min: m["min"] && decode_min(m["min"]),
3832+ step: m["step"] && decode_step(m["step"]),
28333833 }
28343834 end
28353835
@@ -3085,21 +4085,61 @@ defmodule VGMarkConfig do
30854085 theta: float() | nil
30864086 }
30874087
4088+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
4089+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
4090+ def decode_angle(_), do: {:error, "Unexpected type when decoding VGMarkConfig.angle"}
4091+
4092+ def encode_angle(value) when is_float(value), do: value
4093+ def encode_angle(value) when is_integer(value), do: value
4094+ def encode_angle(_), do: {:error, "Unexpected type when encoding VGMarkConfig.angle"}
4095+
4096+ def decode_dx(value) when is_float(value), do: value
4097+ def decode_dx(value) when is_integer(value), do: value
4098+ def decode_dx(_), do: {:error, "Unexpected type when decoding VGMarkConfig.dx"}
4099+
4100+ def encode_dx(value) when is_float(value), do: value
4101+ def encode_dx(value) when is_integer(value), do: value
4102+ def encode_dx(_), do: {:error, "Unexpected type when encoding VGMarkConfig.dx"}
4103+
4104+ def decode_dy(value) when is_float(value), do: value
4105+ def decode_dy(value) when is_integer(value), do: value
4106+ def decode_dy(_), do: {:error, "Unexpected type when decoding VGMarkConfig.dy"}
4107+
4108+ def encode_dy(value) when is_float(value), do: value
4109+ def encode_dy(value) when is_integer(value), do: value
4110+ def encode_dy(_), do: {:error, "Unexpected type when encoding VGMarkConfig.dy"}
4111+
30884112 def decode_fill(value) when is_binary(value), do: value
30894113 def decode_fill(_), do: {:error, "Unexpected type when decoding VGMarkConfig.fill"}
30904114
30914115 def encode_fill(value) when is_binary(value), do: value
30924116 def encode_fill(_), do: {:error, "Unexpected type when encoding VGMarkConfig.fill"}
30934117
4118+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4119+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4120+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding VGMarkConfig.fill_opacity"}
4121+
4122+ def encode_fill_opacity(value) when is_float(value), do: value
4123+ def encode_fill_opacity(value) when is_integer(value), do: value
4124+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding VGMarkConfig.fill_opacity"}
4125+
30944126 def decode_font(value) when is_binary(value), do: value
30954127 def decode_font(_), do: {:error, "Unexpected type when decoding VGMarkConfig.font"}
30964128
30974129 def encode_font(value) when is_binary(value), do: value
30984130 def encode_font(_), do: {:error, "Unexpected type when encoding VGMarkConfig.font"}
30994131
4132+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
4133+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
4134+ def decode_font_size(_), do: {:error, "Unexpected type when decoding VGMarkConfig.font_size"}
4135+
4136+ def encode_font_size(value) when is_float(value), do: value
4137+ def encode_font_size(value) when is_integer(value), do: value
4138+ def encode_font_size(_), do: {:error, "Unexpected type when encoding VGMarkConfig.font_size"}
4139+
31004140 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
3101- def decode_font_weight(value) when is_float(value), do: value
3102- def decode_font_weight(value) when is_integer(value), do: value
4141+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
4142+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
31034143 def decode_font_weight(value) when is_nil(value), do: value
31044144 def decode_font_weight(_), do: {:error, "Unexpected type when decoding VGMarkConfig.font_weight"}
31054145
@@ -3115,54 +4155,126 @@ defmodule VGMarkConfig do
31154155 def encode_href(value) when is_binary(value), do: value
31164156 def encode_href(_), do: {:error, "Unexpected type when encoding VGMarkConfig.href"}
31174157
4158+ def decode_limit(value) when is_float(value), do: value
4159+ def decode_limit(value) when is_integer(value), do: value
4160+ def decode_limit(_), do: {:error, "Unexpected type when decoding VGMarkConfig.limit"}
4161+
4162+ def encode_limit(value) when is_float(value), do: value
4163+ def encode_limit(value) when is_integer(value), do: value
4164+ def encode_limit(_), do: {:error, "Unexpected type when encoding VGMarkConfig.limit"}
4165+
4166+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4167+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4168+ def decode_opacity(_), do: {:error, "Unexpected type when decoding VGMarkConfig.opacity"}
4169+
4170+ def encode_opacity(value) when is_float(value), do: value
4171+ def encode_opacity(value) when is_integer(value), do: value
4172+ def encode_opacity(_), do: {:error, "Unexpected type when encoding VGMarkConfig.opacity"}
4173+
4174+ def decode_radius(value) when is_float(value) and value >= 0, do: value
4175+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
4176+ def decode_radius(_), do: {:error, "Unexpected type when decoding VGMarkConfig.radius"}
4177+
4178+ def encode_radius(value) when is_float(value), do: value
4179+ def encode_radius(value) when is_integer(value), do: value
4180+ def encode_radius(_), do: {:error, "Unexpected type when encoding VGMarkConfig.radius"}
4181+
31184182 def decode_shape(value) when is_binary(value), do: value
31194183 def decode_shape(_), do: {:error, "Unexpected type when decoding VGMarkConfig.shape"}
31204184
31214185 def encode_shape(value) when is_binary(value), do: value
31224186 def encode_shape(_), do: {:error, "Unexpected type when encoding VGMarkConfig.shape"}
31234187
4188+ def decode_size(value) when is_float(value) and value >= 0, do: value
4189+ def decode_size(value) when is_integer(value) and value >= 0, do: value
4190+ def decode_size(_), do: {:error, "Unexpected type when decoding VGMarkConfig.size"}
4191+
4192+ def encode_size(value) when is_float(value), do: value
4193+ def encode_size(value) when is_integer(value), do: value
4194+ def encode_size(_), do: {:error, "Unexpected type when encoding VGMarkConfig.size"}
4195+
31244196 def decode_stroke(value) when is_binary(value), do: value
31254197 def decode_stroke(_), do: {:error, "Unexpected type when decoding VGMarkConfig.stroke"}
31264198
31274199 def encode_stroke(value) when is_binary(value), do: value
31284200 def encode_stroke(_), do: {:error, "Unexpected type when encoding VGMarkConfig.stroke"}
31294201
4202+ def decode_stroke_dash_offset(value) when is_float(value), do: value
4203+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
4204+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding VGMarkConfig.stroke_dash_offset"}
4205+
4206+ def encode_stroke_dash_offset(value) when is_float(value), do: value
4207+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
4208+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding VGMarkConfig.stroke_dash_offset"}
4209+
4210+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4211+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4212+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding VGMarkConfig.stroke_opacity"}
4213+
4214+ def encode_stroke_opacity(value) when is_float(value), do: value
4215+ def encode_stroke_opacity(value) when is_integer(value), do: value
4216+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding VGMarkConfig.stroke_opacity"}
4217+
4218+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
4219+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
4220+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding VGMarkConfig.stroke_width"}
4221+
4222+ def encode_stroke_width(value) when is_float(value), do: value
4223+ def encode_stroke_width(value) when is_integer(value), do: value
4224+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding VGMarkConfig.stroke_width"}
4225+
4226+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
4227+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4228+ def decode_tension(_), do: {:error, "Unexpected type when decoding VGMarkConfig.tension"}
4229+
4230+ def encode_tension(value) when is_float(value), do: value
4231+ def encode_tension(value) when is_integer(value), do: value
4232+ def encode_tension(_), do: {:error, "Unexpected type when encoding VGMarkConfig.tension"}
4233+
31304234 def decode_text(value) when is_binary(value), do: value
31314235 def decode_text(_), do: {:error, "Unexpected type when decoding VGMarkConfig.text"}
31324236
31334237 def encode_text(value) when is_binary(value), do: value
31344238 def encode_text(_), do: {:error, "Unexpected type when encoding VGMarkConfig.text"}
31354239
4240+ def decode_theta(value) when is_float(value), do: value
4241+ def decode_theta(value) when is_integer(value), do: value
4242+ def decode_theta(_), do: {:error, "Unexpected type when decoding VGMarkConfig.theta"}
4243+
4244+ def encode_theta(value) when is_float(value), do: value
4245+ def encode_theta(value) when is_integer(value), do: value
4246+ def encode_theta(_), do: {:error, "Unexpected type when encoding VGMarkConfig.theta"}
4247+
31364248 def from_map(m) do
31374249 %VGMarkConfig{
31384250 align: m["align"] && HorizontalAlign.decode(m["align"]),
3139- angle: m["angle"],
4251+ angle: m["angle"] && decode_angle(m["angle"]),
31404252 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
31414253 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
3142- dx: m["dx"],
3143- dy: m["dy"],
4254+ dx: m["dx"] && decode_dx(m["dx"]),
4255+ dy: m["dy"] && decode_dy(m["dy"]),
31444256 fill: m["fill"] && decode_fill(m["fill"]),
3145- fill_opacity: m["fillOpacity"],
4257+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
31464258 font: m["font"] && decode_font(m["font"]),
3147- font_size: m["fontSize"],
4259+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
31484260 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
31494261 font_weight: decode_font_weight(m["fontWeight"]),
31504262 href: m["href"] && decode_href(m["href"]),
31514263 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
3152- limit: m["limit"],
3153- opacity: m["opacity"],
4264+ limit: m["limit"] && decode_limit(m["limit"]),
4265+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
31544266 orient: m["orient"] && Orient.decode(m["orient"]),
3155- radius: m["radius"],
4267+ radius: m["radius"] && decode_radius(m["radius"]),
31564268 shape: m["shape"] && decode_shape(m["shape"]),
3157- size: m["size"],
4269+ size: m["size"] && decode_size(m["size"]),
31584270 stroke: m["stroke"] && decode_stroke(m["stroke"]),
31594271 stroke_dash: m["strokeDash"],
3160- stroke_dash_offset: m["strokeDashOffset"],
3161- stroke_opacity: m["strokeOpacity"],
3162- stroke_width: m["strokeWidth"],
3163- tension: m["tension"],
4272+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
4273+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
4274+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
4275+ tension: m["tension"] && decode_tension(m["tension"]),
31644276 text: m["text"] && decode_text(m["text"]),
3165- theta: m["theta"],
4277+ theta: m["theta"] && decode_theta(m["theta"]),
31664278 }
31674279 end
31684280
@@ -3284,27 +4396,67 @@ defmodule TextConfig do
32844396 theta: float() | nil
32854397 }
32864398
4399+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
4400+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
4401+ def decode_angle(_), do: {:error, "Unexpected type when decoding TextConfig.angle"}
4402+
4403+ def encode_angle(value) when is_float(value), do: value
4404+ def encode_angle(value) when is_integer(value), do: value
4405+ def encode_angle(_), do: {:error, "Unexpected type when encoding TextConfig.angle"}
4406+
32874407 def decode_color(value) when is_binary(value), do: value
32884408 def decode_color(_), do: {:error, "Unexpected type when decoding TextConfig.color"}
32894409
32904410 def encode_color(value) when is_binary(value), do: value
32914411 def encode_color(_), do: {:error, "Unexpected type when encoding TextConfig.color"}
32924412
4413+ def decode_dx(value) when is_float(value), do: value
4414+ def decode_dx(value) when is_integer(value), do: value
4415+ def decode_dx(_), do: {:error, "Unexpected type when decoding TextConfig.dx"}
4416+
4417+ def encode_dx(value) when is_float(value), do: value
4418+ def encode_dx(value) when is_integer(value), do: value
4419+ def encode_dx(_), do: {:error, "Unexpected type when encoding TextConfig.dx"}
4420+
4421+ def decode_dy(value) when is_float(value), do: value
4422+ def decode_dy(value) when is_integer(value), do: value
4423+ def decode_dy(_), do: {:error, "Unexpected type when decoding TextConfig.dy"}
4424+
4425+ def encode_dy(value) when is_float(value), do: value
4426+ def encode_dy(value) when is_integer(value), do: value
4427+ def encode_dy(_), do: {:error, "Unexpected type when encoding TextConfig.dy"}
4428+
32934429 def decode_fill(value) when is_binary(value), do: value
32944430 def decode_fill(_), do: {:error, "Unexpected type when decoding TextConfig.fill"}
32954431
32964432 def encode_fill(value) when is_binary(value), do: value
32974433 def encode_fill(_), do: {:error, "Unexpected type when encoding TextConfig.fill"}
32984434
4435+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4436+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4437+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding TextConfig.fill_opacity"}
4438+
4439+ def encode_fill_opacity(value) when is_float(value), do: value
4440+ def encode_fill_opacity(value) when is_integer(value), do: value
4441+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding TextConfig.fill_opacity"}
4442+
32994443 def decode_font(value) when is_binary(value), do: value
33004444 def decode_font(_), do: {:error, "Unexpected type when decoding TextConfig.font"}
33014445
33024446 def encode_font(value) when is_binary(value), do: value
33034447 def encode_font(_), do: {:error, "Unexpected type when encoding TextConfig.font"}
33044448
4449+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
4450+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
4451+ def decode_font_size(_), do: {:error, "Unexpected type when decoding TextConfig.font_size"}
4452+
4453+ def encode_font_size(value) when is_float(value), do: value
4454+ def encode_font_size(value) when is_integer(value), do: value
4455+ def encode_font_size(_), do: {:error, "Unexpected type when encoding TextConfig.font_size"}
4456+
33054457 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
3306- def decode_font_weight(value) when is_float(value), do: value
3307- def decode_font_weight(value) when is_integer(value), do: value
4458+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
4459+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
33084460 def decode_font_weight(value) when is_nil(value), do: value
33094461 def decode_font_weight(_), do: {:error, "Unexpected type when decoding TextConfig.font_weight"}
33104462
@@ -3320,57 +4472,129 @@ defmodule TextConfig do
33204472 def encode_href(value) when is_binary(value), do: value
33214473 def encode_href(_), do: {:error, "Unexpected type when encoding TextConfig.href"}
33224474
4475+ def decode_limit(value) when is_float(value), do: value
4476+ def decode_limit(value) when is_integer(value), do: value
4477+ def decode_limit(_), do: {:error, "Unexpected type when decoding TextConfig.limit"}
4478+
4479+ def encode_limit(value) when is_float(value), do: value
4480+ def encode_limit(value) when is_integer(value), do: value
4481+ def encode_limit(_), do: {:error, "Unexpected type when encoding TextConfig.limit"}
4482+
4483+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4484+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4485+ def decode_opacity(_), do: {:error, "Unexpected type when decoding TextConfig.opacity"}
4486+
4487+ def encode_opacity(value) when is_float(value), do: value
4488+ def encode_opacity(value) when is_integer(value), do: value
4489+ def encode_opacity(_), do: {:error, "Unexpected type when encoding TextConfig.opacity"}
4490+
4491+ def decode_radius(value) when is_float(value) and value >= 0, do: value
4492+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
4493+ def decode_radius(_), do: {:error, "Unexpected type when decoding TextConfig.radius"}
4494+
4495+ def encode_radius(value) when is_float(value), do: value
4496+ def encode_radius(value) when is_integer(value), do: value
4497+ def encode_radius(_), do: {:error, "Unexpected type when encoding TextConfig.radius"}
4498+
33234499 def decode_shape(value) when is_binary(value), do: value
33244500 def decode_shape(_), do: {:error, "Unexpected type when decoding TextConfig.shape"}
33254501
33264502 def encode_shape(value) when is_binary(value), do: value
33274503 def encode_shape(_), do: {:error, "Unexpected type when encoding TextConfig.shape"}
33284504
4505+ def decode_size(value) when is_float(value) and value >= 0, do: value
4506+ def decode_size(value) when is_integer(value) and value >= 0, do: value
4507+ def decode_size(_), do: {:error, "Unexpected type when decoding TextConfig.size"}
4508+
4509+ def encode_size(value) when is_float(value), do: value
4510+ def encode_size(value) when is_integer(value), do: value
4511+ def encode_size(_), do: {:error, "Unexpected type when encoding TextConfig.size"}
4512+
33294513 def decode_stroke(value) when is_binary(value), do: value
33304514 def decode_stroke(_), do: {:error, "Unexpected type when decoding TextConfig.stroke"}
33314515
33324516 def encode_stroke(value) when is_binary(value), do: value
33334517 def encode_stroke(_), do: {:error, "Unexpected type when encoding TextConfig.stroke"}
33344518
4519+ def decode_stroke_dash_offset(value) when is_float(value), do: value
4520+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
4521+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding TextConfig.stroke_dash_offset"}
4522+
4523+ def encode_stroke_dash_offset(value) when is_float(value), do: value
4524+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
4525+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding TextConfig.stroke_dash_offset"}
4526+
4527+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4528+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4529+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding TextConfig.stroke_opacity"}
4530+
4531+ def encode_stroke_opacity(value) when is_float(value), do: value
4532+ def encode_stroke_opacity(value) when is_integer(value), do: value
4533+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding TextConfig.stroke_opacity"}
4534+
4535+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
4536+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
4537+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding TextConfig.stroke_width"}
4538+
4539+ def encode_stroke_width(value) when is_float(value), do: value
4540+ def encode_stroke_width(value) when is_integer(value), do: value
4541+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding TextConfig.stroke_width"}
4542+
4543+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
4544+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4545+ def decode_tension(_), do: {:error, "Unexpected type when decoding TextConfig.tension"}
4546+
4547+ def encode_tension(value) when is_float(value), do: value
4548+ def encode_tension(value) when is_integer(value), do: value
4549+ def encode_tension(_), do: {:error, "Unexpected type when encoding TextConfig.tension"}
4550+
33354551 def decode_text(value) when is_binary(value), do: value
33364552 def decode_text(_), do: {:error, "Unexpected type when decoding TextConfig.text"}
33374553
33384554 def encode_text(value) when is_binary(value), do: value
33394555 def encode_text(_), do: {:error, "Unexpected type when encoding TextConfig.text"}
33404556
4557+ def decode_theta(value) when is_float(value), do: value
4558+ def decode_theta(value) when is_integer(value), do: value
4559+ def decode_theta(_), do: {:error, "Unexpected type when decoding TextConfig.theta"}
4560+
4561+ def encode_theta(value) when is_float(value), do: value
4562+ def encode_theta(value) when is_integer(value), do: value
4563+ def encode_theta(_), do: {:error, "Unexpected type when encoding TextConfig.theta"}
4564+
33414565 def from_map(m) do
33424566 %TextConfig{
33434567 align: m["align"] && HorizontalAlign.decode(m["align"]),
3344- angle: m["angle"],
4568+ angle: m["angle"] && decode_angle(m["angle"]),
33454569 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
33464570 color: m["color"] && decode_color(m["color"]),
33474571 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
3348- dx: m["dx"],
3349- dy: m["dy"],
4572+ dx: m["dx"] && decode_dx(m["dx"]),
4573+ dy: m["dy"] && decode_dy(m["dy"]),
33504574 fill: m["fill"] && decode_fill(m["fill"]),
33514575 filled: m["filled"],
3352- fill_opacity: m["fillOpacity"],
4576+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
33534577 font: m["font"] && decode_font(m["font"]),
3354- font_size: m["fontSize"],
4578+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
33554579 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
33564580 font_weight: decode_font_weight(m["fontWeight"]),
33574581 href: m["href"] && decode_href(m["href"]),
33584582 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
3359- limit: m["limit"],
3360- opacity: m["opacity"],
4583+ limit: m["limit"] && decode_limit(m["limit"]),
4584+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
33614585 orient: m["orient"] && Orient.decode(m["orient"]),
3362- radius: m["radius"],
4586+ radius: m["radius"] && decode_radius(m["radius"]),
33634587 shape: m["shape"] && decode_shape(m["shape"]),
33644588 short_time_labels: m["shortTimeLabels"],
3365- size: m["size"],
4589+ size: m["size"] && decode_size(m["size"]),
33664590 stroke: m["stroke"] && decode_stroke(m["stroke"]),
33674591 stroke_dash: m["strokeDash"],
3368- stroke_dash_offset: m["strokeDashOffset"],
3369- stroke_opacity: m["strokeOpacity"],
3370- stroke_width: m["strokeWidth"],
3371- tension: m["tension"],
4592+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
4593+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
4594+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
4595+ tension: m["tension"] && decode_tension(m["tension"]),
33724596 text: m["text"] && decode_text(m["text"]),
3373- theta: m["theta"],
4597+ theta: m["theta"] && decode_theta(m["theta"]),
33744598 }
33754599 end
33764600
@@ -3497,27 +4721,75 @@ defmodule TickConfig do
34974721 thickness: float() | nil
34984722 }
34994723
4724+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
4725+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
4726+ def decode_angle(_), do: {:error, "Unexpected type when decoding TickConfig.angle"}
4727+
4728+ def encode_angle(value) when is_float(value), do: value
4729+ def encode_angle(value) when is_integer(value), do: value
4730+ def encode_angle(_), do: {:error, "Unexpected type when encoding TickConfig.angle"}
4731+
4732+ def decode_band_size(value) when is_float(value) and value >= 0, do: value
4733+ def decode_band_size(value) when is_integer(value) and value >= 0, do: value
4734+ def decode_band_size(_), do: {:error, "Unexpected type when decoding TickConfig.band_size"}
4735+
4736+ def encode_band_size(value) when is_float(value), do: value
4737+ def encode_band_size(value) when is_integer(value), do: value
4738+ def encode_band_size(_), do: {:error, "Unexpected type when encoding TickConfig.band_size"}
4739+
35004740 def decode_color(value) when is_binary(value), do: value
35014741 def decode_color(_), do: {:error, "Unexpected type when decoding TickConfig.color"}
35024742
35034743 def encode_color(value) when is_binary(value), do: value
35044744 def encode_color(_), do: {:error, "Unexpected type when encoding TickConfig.color"}
35054745
4746+ def decode_dx(value) when is_float(value), do: value
4747+ def decode_dx(value) when is_integer(value), do: value
4748+ def decode_dx(_), do: {:error, "Unexpected type when decoding TickConfig.dx"}
4749+
4750+ def encode_dx(value) when is_float(value), do: value
4751+ def encode_dx(value) when is_integer(value), do: value
4752+ def encode_dx(_), do: {:error, "Unexpected type when encoding TickConfig.dx"}
4753+
4754+ def decode_dy(value) when is_float(value), do: value
4755+ def decode_dy(value) when is_integer(value), do: value
4756+ def decode_dy(_), do: {:error, "Unexpected type when decoding TickConfig.dy"}
4757+
4758+ def encode_dy(value) when is_float(value), do: value
4759+ def encode_dy(value) when is_integer(value), do: value
4760+ def encode_dy(_), do: {:error, "Unexpected type when encoding TickConfig.dy"}
4761+
35064762 def decode_fill(value) when is_binary(value), do: value
35074763 def decode_fill(_), do: {:error, "Unexpected type when decoding TickConfig.fill"}
35084764
35094765 def encode_fill(value) when is_binary(value), do: value
35104766 def encode_fill(_), do: {:error, "Unexpected type when encoding TickConfig.fill"}
35114767
4768+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4769+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4770+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding TickConfig.fill_opacity"}
4771+
4772+ def encode_fill_opacity(value) when is_float(value), do: value
4773+ def encode_fill_opacity(value) when is_integer(value), do: value
4774+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding TickConfig.fill_opacity"}
4775+
35124776 def decode_font(value) when is_binary(value), do: value
35134777 def decode_font(_), do: {:error, "Unexpected type when decoding TickConfig.font"}
35144778
35154779 def encode_font(value) when is_binary(value), do: value
35164780 def encode_font(_), do: {:error, "Unexpected type when encoding TickConfig.font"}
35174781
4782+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
4783+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
4784+ def decode_font_size(_), do: {:error, "Unexpected type when decoding TickConfig.font_size"}
4785+
4786+ def encode_font_size(value) when is_float(value), do: value
4787+ def encode_font_size(value) when is_integer(value), do: value
4788+ def encode_font_size(_), do: {:error, "Unexpected type when encoding TickConfig.font_size"}
4789+
35184790 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
3519- def decode_font_weight(value) when is_float(value), do: value
3520- def decode_font_weight(value) when is_integer(value), do: value
4791+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
4792+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
35214793 def decode_font_weight(value) when is_nil(value), do: value
35224794 def decode_font_weight(_), do: {:error, "Unexpected type when decoding TickConfig.font_weight"}
35234795
@@ -3533,58 +4805,138 @@ defmodule TickConfig do
35334805 def encode_href(value) when is_binary(value), do: value
35344806 def encode_href(_), do: {:error, "Unexpected type when encoding TickConfig.href"}
35354807
4808+ def decode_limit(value) when is_float(value), do: value
4809+ def decode_limit(value) when is_integer(value), do: value
4810+ def decode_limit(_), do: {:error, "Unexpected type when decoding TickConfig.limit"}
4811+
4812+ def encode_limit(value) when is_float(value), do: value
4813+ def encode_limit(value) when is_integer(value), do: value
4814+ def encode_limit(_), do: {:error, "Unexpected type when encoding TickConfig.limit"}
4815+
4816+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4817+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4818+ def decode_opacity(_), do: {:error, "Unexpected type when decoding TickConfig.opacity"}
4819+
4820+ def encode_opacity(value) when is_float(value), do: value
4821+ def encode_opacity(value) when is_integer(value), do: value
4822+ def encode_opacity(_), do: {:error, "Unexpected type when encoding TickConfig.opacity"}
4823+
4824+ def decode_radius(value) when is_float(value) and value >= 0, do: value
4825+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
4826+ def decode_radius(_), do: {:error, "Unexpected type when decoding TickConfig.radius"}
4827+
4828+ def encode_radius(value) when is_float(value), do: value
4829+ def encode_radius(value) when is_integer(value), do: value
4830+ def encode_radius(_), do: {:error, "Unexpected type when encoding TickConfig.radius"}
4831+
35364832 def decode_shape(value) when is_binary(value), do: value
35374833 def decode_shape(_), do: {:error, "Unexpected type when decoding TickConfig.shape"}
35384834
35394835 def encode_shape(value) when is_binary(value), do: value
35404836 def encode_shape(_), do: {:error, "Unexpected type when encoding TickConfig.shape"}
35414837
4838+ def decode_size(value) when is_float(value) and value >= 0, do: value
4839+ def decode_size(value) when is_integer(value) and value >= 0, do: value
4840+ def decode_size(_), do: {:error, "Unexpected type when decoding TickConfig.size"}
4841+
4842+ def encode_size(value) when is_float(value), do: value
4843+ def encode_size(value) when is_integer(value), do: value
4844+ def encode_size(_), do: {:error, "Unexpected type when encoding TickConfig.size"}
4845+
35424846 def decode_stroke(value) when is_binary(value), do: value
35434847 def decode_stroke(_), do: {:error, "Unexpected type when decoding TickConfig.stroke"}
35444848
35454849 def encode_stroke(value) when is_binary(value), do: value
35464850 def encode_stroke(_), do: {:error, "Unexpected type when encoding TickConfig.stroke"}
35474851
4852+ def decode_stroke_dash_offset(value) when is_float(value), do: value
4853+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
4854+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding TickConfig.stroke_dash_offset"}
4855+
4856+ def encode_stroke_dash_offset(value) when is_float(value), do: value
4857+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
4858+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding TickConfig.stroke_dash_offset"}
4859+
4860+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
4861+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4862+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding TickConfig.stroke_opacity"}
4863+
4864+ def encode_stroke_opacity(value) when is_float(value), do: value
4865+ def encode_stroke_opacity(value) when is_integer(value), do: value
4866+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding TickConfig.stroke_opacity"}
4867+
4868+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
4869+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
4870+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding TickConfig.stroke_width"}
4871+
4872+ def encode_stroke_width(value) when is_float(value), do: value
4873+ def encode_stroke_width(value) when is_integer(value), do: value
4874+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding TickConfig.stroke_width"}
4875+
4876+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
4877+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
4878+ def decode_tension(_), do: {:error, "Unexpected type when decoding TickConfig.tension"}
4879+
4880+ def encode_tension(value) when is_float(value), do: value
4881+ def encode_tension(value) when is_integer(value), do: value
4882+ def encode_tension(_), do: {:error, "Unexpected type when encoding TickConfig.tension"}
4883+
35484884 def decode_text(value) when is_binary(value), do: value
35494885 def decode_text(_), do: {:error, "Unexpected type when decoding TickConfig.text"}
35504886
35514887 def encode_text(value) when is_binary(value), do: value
35524888 def encode_text(_), do: {:error, "Unexpected type when encoding TickConfig.text"}
35534889
4890+ def decode_theta(value) when is_float(value), do: value
4891+ def decode_theta(value) when is_integer(value), do: value
4892+ def decode_theta(_), do: {:error, "Unexpected type when decoding TickConfig.theta"}
4893+
4894+ def encode_theta(value) when is_float(value), do: value
4895+ def encode_theta(value) when is_integer(value), do: value
4896+ def encode_theta(_), do: {:error, "Unexpected type when encoding TickConfig.theta"}
4897+
4898+ def decode_thickness(value) when is_float(value) and value >= 0, do: value
4899+ def decode_thickness(value) when is_integer(value) and value >= 0, do: value
4900+ def decode_thickness(_), do: {:error, "Unexpected type when decoding TickConfig.thickness"}
4901+
4902+ def encode_thickness(value) when is_float(value), do: value
4903+ def encode_thickness(value) when is_integer(value), do: value
4904+ def encode_thickness(_), do: {:error, "Unexpected type when encoding TickConfig.thickness"}
4905+
35544906 def from_map(m) do
35554907 %TickConfig{
35564908 align: m["align"] && HorizontalAlign.decode(m["align"]),
3557- angle: m["angle"],
3558- band_size: m["bandSize"],
4909+ angle: m["angle"] && decode_angle(m["angle"]),
4910+ band_size: m["bandSize"] && decode_band_size(m["bandSize"]),
35594911 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
35604912 color: m["color"] && decode_color(m["color"]),
35614913 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
3562- dx: m["dx"],
3563- dy: m["dy"],
4914+ dx: m["dx"] && decode_dx(m["dx"]),
4915+ dy: m["dy"] && decode_dy(m["dy"]),
35644916 fill: m["fill"] && decode_fill(m["fill"]),
35654917 filled: m["filled"],
3566- fill_opacity: m["fillOpacity"],
4918+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
35674919 font: m["font"] && decode_font(m["font"]),
3568- font_size: m["fontSize"],
4920+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
35694921 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
35704922 font_weight: decode_font_weight(m["fontWeight"]),
35714923 href: m["href"] && decode_href(m["href"]),
35724924 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
3573- limit: m["limit"],
3574- opacity: m["opacity"],
4925+ limit: m["limit"] && decode_limit(m["limit"]),
4926+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
35754927 orient: m["orient"] && Orient.decode(m["orient"]),
3576- radius: m["radius"],
4928+ radius: m["radius"] && decode_radius(m["radius"]),
35774929 shape: m["shape"] && decode_shape(m["shape"]),
3578- size: m["size"],
4930+ size: m["size"] && decode_size(m["size"]),
35794931 stroke: m["stroke"] && decode_stroke(m["stroke"]),
35804932 stroke_dash: m["strokeDash"],
3581- stroke_dash_offset: m["strokeDashOffset"],
3582- stroke_opacity: m["strokeOpacity"],
3583- stroke_width: m["strokeWidth"],
3584- tension: m["tension"],
4933+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
4934+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
4935+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
4936+ tension: m["tension"] && decode_tension(m["tension"]),
35854937 text: m["text"] && decode_text(m["text"]),
3586- theta: m["theta"],
3587- thickness: m["thickness"],
4938+ theta: m["theta"] && decode_theta(m["theta"]),
4939+ thickness: m["thickness"] && decode_thickness(m["thickness"]),
35884940 }
35894941 end
35904942
@@ -3789,6 +5141,14 @@ defmodule VGTitleConfig do
37895141 orient: TitleOrient.t() | nil
37905142 }
37915143
5144+ def decode_angle(value) when is_float(value), do: value
5145+ def decode_angle(value) when is_integer(value), do: value
5146+ def decode_angle(_), do: {:error, "Unexpected type when decoding VGTitleConfig.angle"}
5147+
5148+ def encode_angle(value) when is_float(value), do: value
5149+ def encode_angle(value) when is_integer(value), do: value
5150+ def encode_angle(_), do: {:error, "Unexpected type when encoding VGTitleConfig.angle"}
5151+
37925152 def decode_color(value) when is_binary(value), do: value
37935153 def decode_color(_), do: {:error, "Unexpected type when decoding VGTitleConfig.color"}
37945154
@@ -3801,9 +5161,17 @@ defmodule VGTitleConfig do
38015161 def encode_font(value) when is_binary(value), do: value
38025162 def encode_font(_), do: {:error, "Unexpected type when encoding VGTitleConfig.font"}
38035163
5164+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
5165+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
5166+ def decode_font_size(_), do: {:error, "Unexpected type when decoding VGTitleConfig.font_size"}
5167+
5168+ def encode_font_size(value) when is_float(value), do: value
5169+ def encode_font_size(value) when is_integer(value), do: value
5170+ def encode_font_size(_), do: {:error, "Unexpected type when encoding VGTitleConfig.font_size"}
5171+
38045172 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
3805- def decode_font_weight(value) when is_float(value), do: value
3806- def decode_font_weight(value) when is_integer(value), do: value
5173+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
5174+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
38075175 def decode_font_weight(value) when is_nil(value), do: value
38085176 def decode_font_weight(_), do: {:error, "Unexpected type when decoding VGTitleConfig.font_weight"}
38095177
@@ -3813,17 +5181,33 @@ defmodule VGTitleConfig do
38135181 def encode_font_weight(value) when is_nil(value), do: value
38145182 def encode_font_weight(_), do: {:error, "Unexpected type when encoding VGTitleConfig.font_weight"}
38155183
5184+ def decode_limit(value) when is_float(value) and value >= 0, do: value
5185+ def decode_limit(value) when is_integer(value) and value >= 0, do: value
5186+ def decode_limit(_), do: {:error, "Unexpected type when decoding VGTitleConfig.limit"}
5187+
5188+ def encode_limit(value) when is_float(value), do: value
5189+ def encode_limit(value) when is_integer(value), do: value
5190+ def encode_limit(_), do: {:error, "Unexpected type when encoding VGTitleConfig.limit"}
5191+
5192+ def decode_offset(value) when is_float(value), do: value
5193+ def decode_offset(value) when is_integer(value), do: value
5194+ def decode_offset(_), do: {:error, "Unexpected type when decoding VGTitleConfig.offset"}
5195+
5196+ def encode_offset(value) when is_float(value), do: value
5197+ def encode_offset(value) when is_integer(value), do: value
5198+ def encode_offset(_), do: {:error, "Unexpected type when encoding VGTitleConfig.offset"}
5199+
38165200 def from_map(m) do
38175201 %VGTitleConfig{
38185202 anchor: m["anchor"] && Anchor.decode(m["anchor"]),
3819- angle: m["angle"],
5203+ angle: m["angle"] && decode_angle(m["angle"]),
38205204 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
38215205 color: m["color"] && decode_color(m["color"]),
38225206 font: m["font"] && decode_font(m["font"]),
3823- font_size: m["fontSize"],
5207+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
38245208 font_weight: decode_font_weight(m["fontWeight"]),
3825- limit: m["limit"],
3826- offset: m["offset"],
5209+ limit: m["limit"] && decode_limit(m["limit"]),
5210+ offset: m["offset"] && decode_offset(m["offset"]),
38275211 orient: m["orient"] && TitleOrient.decode(m["orient"]),
38285212 }
38295213 end
@@ -3892,24 +5276,72 @@ defmodule ViewConfig do
38925276 def encode_fill(value) when is_binary(value), do: value
38935277 def encode_fill(_), do: {:error, "Unexpected type when encoding ViewConfig.fill"}
38945278
5279+ def decode_fill_opacity(value) when is_float(value), do: value
5280+ def decode_fill_opacity(value) when is_integer(value), do: value
5281+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding ViewConfig.fill_opacity"}
5282+
5283+ def encode_fill_opacity(value) when is_float(value), do: value
5284+ def encode_fill_opacity(value) when is_integer(value), do: value
5285+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding ViewConfig.fill_opacity"}
5286+
5287+ def decode_height(value) when is_float(value), do: value
5288+ def decode_height(value) when is_integer(value), do: value
5289+ def decode_height(_), do: {:error, "Unexpected type when decoding ViewConfig.height"}
5290+
5291+ def encode_height(value) when is_float(value), do: value
5292+ def encode_height(value) when is_integer(value), do: value
5293+ def encode_height(_), do: {:error, "Unexpected type when encoding ViewConfig.height"}
5294+
38955295 def decode_stroke(value) when is_binary(value), do: value
38965296 def decode_stroke(_), do: {:error, "Unexpected type when decoding ViewConfig.stroke"}
38975297
38985298 def encode_stroke(value) when is_binary(value), do: value
38995299 def encode_stroke(_), do: {:error, "Unexpected type when encoding ViewConfig.stroke"}
39005300
5301+ def decode_stroke_dash_offset(value) when is_float(value), do: value
5302+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
5303+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding ViewConfig.stroke_dash_offset"}
5304+
5305+ def encode_stroke_dash_offset(value) when is_float(value), do: value
5306+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
5307+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding ViewConfig.stroke_dash_offset"}
5308+
5309+ def decode_stroke_opacity(value) when is_float(value), do: value
5310+ def decode_stroke_opacity(value) when is_integer(value), do: value
5311+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding ViewConfig.stroke_opacity"}
5312+
5313+ def encode_stroke_opacity(value) when is_float(value), do: value
5314+ def encode_stroke_opacity(value) when is_integer(value), do: value
5315+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding ViewConfig.stroke_opacity"}
5316+
5317+ def decode_stroke_width(value) when is_float(value), do: value
5318+ def decode_stroke_width(value) when is_integer(value), do: value
5319+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding ViewConfig.stroke_width"}
5320+
5321+ def encode_stroke_width(value) when is_float(value), do: value
5322+ def encode_stroke_width(value) when is_integer(value), do: value
5323+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding ViewConfig.stroke_width"}
5324+
5325+ def decode_width(value) when is_float(value), do: value
5326+ def decode_width(value) when is_integer(value), do: value
5327+ def decode_width(_), do: {:error, "Unexpected type when decoding ViewConfig.width"}
5328+
5329+ def encode_width(value) when is_float(value), do: value
5330+ def encode_width(value) when is_integer(value), do: value
5331+ def encode_width(_), do: {:error, "Unexpected type when encoding ViewConfig.width"}
5332+
39015333 def from_map(m) do
39025334 %ViewConfig{
39035335 clip: m["clip"],
39045336 fill: m["fill"] && decode_fill(m["fill"]),
3905- fill_opacity: m["fillOpacity"],
3906- height: m["height"],
5337+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
5338+ height: m["height"] && decode_height(m["height"]),
39075339 stroke: m["stroke"] && decode_stroke(m["stroke"]),
39085340 stroke_dash: m["strokeDash"],
3909- stroke_dash_offset: m["strokeDashOffset"],
3910- stroke_opacity: m["strokeOpacity"],
3911- stroke_width: m["strokeWidth"],
3912- width: m["width"],
5341+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
5342+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
5343+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
5344+ width: m["width"] && decode_width(m["width"]),
39135345 }
39145346 end
39155347
@@ -4550,15 +5982,47 @@ defmodule BinParams do
45505982 steps: [float()] | nil
45515983 }
45525984
5985+ def decode_base(value) when is_float(value), do: value
5986+ def decode_base(value) when is_integer(value), do: value
5987+ def decode_base(_), do: {:error, "Unexpected type when decoding BinParams.base"}
5988+
5989+ def encode_base(value) when is_float(value), do: value
5990+ def encode_base(value) when is_integer(value), do: value
5991+ def encode_base(_), do: {:error, "Unexpected type when encoding BinParams.base"}
5992+
5993+ def decode_maxbins(value) when is_float(value) and value >= 2, do: value
5994+ def decode_maxbins(value) when is_integer(value) and value >= 2, do: value
5995+ def decode_maxbins(_), do: {:error, "Unexpected type when decoding BinParams.maxbins"}
5996+
5997+ def encode_maxbins(value) when is_float(value), do: value
5998+ def encode_maxbins(value) when is_integer(value), do: value
5999+ def encode_maxbins(_), do: {:error, "Unexpected type when encoding BinParams.maxbins"}
6000+
6001+ def decode_minstep(value) when is_float(value), do: value
6002+ def decode_minstep(value) when is_integer(value), do: value
6003+ def decode_minstep(_), do: {:error, "Unexpected type when decoding BinParams.minstep"}
6004+
6005+ def encode_minstep(value) when is_float(value), do: value
6006+ def encode_minstep(value) when is_integer(value), do: value
6007+ def encode_minstep(_), do: {:error, "Unexpected type when encoding BinParams.minstep"}
6008+
6009+ def decode_step(value) when is_float(value), do: value
6010+ def decode_step(value) when is_integer(value), do: value
6011+ def decode_step(_), do: {:error, "Unexpected type when decoding BinParams.step"}
6012+
6013+ def encode_step(value) when is_float(value), do: value
6014+ def encode_step(value) when is_integer(value), do: value
6015+ def encode_step(_), do: {:error, "Unexpected type when encoding BinParams.step"}
6016+
45536017 def from_map(m) do
45546018 %BinParams{
4555- base: m["base"],
6019+ base: m["base"] && decode_base(m["base"]),
45566020 divide: m["divide"],
45576021 extent: m["extent"],
4558- maxbins: m["maxbins"],
4559- minstep: m["minstep"],
6022+ maxbins: m["maxbins"] && decode_maxbins(m["maxbins"]),
6023+ minstep: m["minstep"] && decode_minstep(m["minstep"]),
45606024 nice: m["nice"],
4561- step: m["step"],
6025+ step: m["step"] && decode_step(m["step"]),
45626026 steps: m["steps"],
45636027 }
45646028 end
@@ -4686,18 +6150,74 @@ defmodule DateTimeClass do
46866150 year: float() | nil
46876151 }
46886152
6153+ def decode_date(value) when is_float(value) and value >= 1 and value <= 31, do: value
6154+ def decode_date(value) when is_integer(value) and value >= 1 and value <= 31, do: value
6155+ def decode_date(_), do: {:error, "Unexpected type when decoding DateTimeClass.date"}
6156+
6157+ def encode_date(value) when is_float(value), do: value
6158+ def encode_date(value) when is_integer(value), do: value
6159+ def encode_date(_), do: {:error, "Unexpected type when encoding DateTimeClass.date"}
6160+
6161+ def decode_hours(value) when is_float(value) and value >= 0 and value <= 23, do: value
6162+ def decode_hours(value) when is_integer(value) and value >= 0 and value <= 23, do: value
6163+ def decode_hours(_), do: {:error, "Unexpected type when decoding DateTimeClass.hours"}
6164+
6165+ def encode_hours(value) when is_float(value), do: value
6166+ def encode_hours(value) when is_integer(value), do: value
6167+ def encode_hours(_), do: {:error, "Unexpected type when encoding DateTimeClass.hours"}
6168+
6169+ def decode_milliseconds(value) when is_float(value) and value >= 0 and value <= 999, do: value
6170+ def decode_milliseconds(value) when is_integer(value) and value >= 0 and value <= 999, do: value
6171+ def decode_milliseconds(_), do: {:error, "Unexpected type when decoding DateTimeClass.milliseconds"}
6172+
6173+ def encode_milliseconds(value) when is_float(value), do: value
6174+ def encode_milliseconds(value) when is_integer(value), do: value
6175+ def encode_milliseconds(_), do: {:error, "Unexpected type when encoding DateTimeClass.milliseconds"}
6176+
6177+ def decode_minutes(value) when is_float(value) and value >= 0 and value <= 59, do: value
6178+ def decode_minutes(value) when is_integer(value) and value >= 0 and value <= 59, do: value
6179+ def decode_minutes(_), do: {:error, "Unexpected type when decoding DateTimeClass.minutes"}
6180+
6181+ def encode_minutes(value) when is_float(value), do: value
6182+ def encode_minutes(value) when is_integer(value), do: value
6183+ def encode_minutes(_), do: {:error, "Unexpected type when encoding DateTimeClass.minutes"}
6184+
6185+ def decode_quarter(value) when is_float(value) and value >= 1 and value <= 4, do: value
6186+ def decode_quarter(value) when is_integer(value) and value >= 1 and value <= 4, do: value
6187+ def decode_quarter(_), do: {:error, "Unexpected type when decoding DateTimeClass.quarter"}
6188+
6189+ def encode_quarter(value) when is_float(value), do: value
6190+ def encode_quarter(value) when is_integer(value), do: value
6191+ def encode_quarter(_), do: {:error, "Unexpected type when encoding DateTimeClass.quarter"}
6192+
6193+ def decode_seconds(value) when is_float(value) and value >= 0 and value <= 59, do: value
6194+ def decode_seconds(value) when is_integer(value) and value >= 0 and value <= 59, do: value
6195+ def decode_seconds(_), do: {:error, "Unexpected type when decoding DateTimeClass.seconds"}
6196+
6197+ def encode_seconds(value) when is_float(value), do: value
6198+ def encode_seconds(value) when is_integer(value), do: value
6199+ def encode_seconds(_), do: {:error, "Unexpected type when encoding DateTimeClass.seconds"}
6200+
6201+ def decode_year(value) when is_float(value), do: value
6202+ def decode_year(value) when is_integer(value), do: value
6203+ def decode_year(_), do: {:error, "Unexpected type when decoding DateTimeClass.year"}
6204+
6205+ def encode_year(value) when is_float(value), do: value
6206+ def encode_year(value) when is_integer(value), do: value
6207+ def encode_year(_), do: {:error, "Unexpected type when encoding DateTimeClass.year"}
6208+
46896209 def from_map(m) do
46906210 %DateTimeClass{
4691- date: m["date"],
6211+ date: m["date"] && decode_date(m["date"]),
46926212 day: m["day"],
4693- hours: m["hours"],
4694- milliseconds: m["milliseconds"],
4695- minutes: m["minutes"],
6213+ hours: m["hours"] && decode_hours(m["hours"]),
6214+ milliseconds: m["milliseconds"] && decode_milliseconds(m["milliseconds"]),
6215+ minutes: m["minutes"] && decode_minutes(m["minutes"]),
46966216 month: m["month"],
4697- quarter: m["quarter"],
4698- seconds: m["seconds"],
6217+ quarter: m["quarter"] && decode_quarter(m["quarter"]),
6218+ seconds: m["seconds"] && decode_seconds(m["seconds"]),
46996219 utc: m["utc"],
4700- year: m["year"],
6220+ year: m["year"] && decode_year(m["year"]),
47016221 }
47026222 end
47036223
@@ -5208,12 +6728,44 @@ defmodule Legend do
52086728 zindex: float() | nil
52096729 }
52106730
6731+ def decode_entry_padding(value) when is_float(value), do: value
6732+ def decode_entry_padding(value) when is_integer(value), do: value
6733+ def decode_entry_padding(_), do: {:error, "Unexpected type when decoding Legend.entry_padding"}
6734+
6735+ def encode_entry_padding(value) when is_float(value), do: value
6736+ def encode_entry_padding(value) when is_integer(value), do: value
6737+ def encode_entry_padding(_), do: {:error, "Unexpected type when encoding Legend.entry_padding"}
6738+
52116739 def decode_format(value) when is_binary(value), do: value
52126740 def decode_format(_), do: {:error, "Unexpected type when decoding Legend.format"}
52136741
52146742 def encode_format(value) when is_binary(value), do: value
52156743 def encode_format(_), do: {:error, "Unexpected type when encoding Legend.format"}
52166744
6745+ def decode_offset(value) when is_float(value), do: value
6746+ def decode_offset(value) when is_integer(value), do: value
6747+ def decode_offset(_), do: {:error, "Unexpected type when decoding Legend.offset"}
6748+
6749+ def encode_offset(value) when is_float(value), do: value
6750+ def encode_offset(value) when is_integer(value), do: value
6751+ def encode_offset(_), do: {:error, "Unexpected type when encoding Legend.offset"}
6752+
6753+ def decode_padding(value) when is_float(value), do: value
6754+ def decode_padding(value) when is_integer(value), do: value
6755+ def decode_padding(_), do: {:error, "Unexpected type when decoding Legend.padding"}
6756+
6757+ def encode_padding(value) when is_float(value), do: value
6758+ def encode_padding(value) when is_integer(value), do: value
6759+ def encode_padding(_), do: {:error, "Unexpected type when encoding Legend.padding"}
6760+
6761+ def decode_tick_count(value) when is_float(value), do: value
6762+ def decode_tick_count(value) when is_integer(value), do: value
6763+ def decode_tick_count(_), do: {:error, "Unexpected type when decoding Legend.tick_count"}
6764+
6765+ def encode_tick_count(value) when is_float(value), do: value
6766+ def encode_tick_count(value) when is_integer(value), do: value
6767+ def encode_tick_count(_), do: {:error, "Unexpected type when encoding Legend.tick_count"}
6768+
52176769 def decode_values_element(%{} = value), do: DateTimeClass.from_map(value)
52186770 def decode_values_element(value) when is_float(value), do: value
52196771 def decode_values_element(value) when is_integer(value), do: value
@@ -5226,18 +6778,26 @@ defmodule Legend do
52266778 def encode_values_element(value) when is_binary(value), do: value
52276779 def encode_values_element(_), do: {:error, "Unexpected type when encoding Legend.values"}
52286780
6781+ def decode_zindex(value) when is_float(value) and value >= 0, do: value
6782+ def decode_zindex(value) when is_integer(value) and value >= 0, do: value
6783+ def decode_zindex(_), do: {:error, "Unexpected type when decoding Legend.zindex"}
6784+
6785+ def encode_zindex(value) when is_float(value), do: value
6786+ def encode_zindex(value) when is_integer(value), do: value
6787+ def encode_zindex(_), do: {:error, "Unexpected type when encoding Legend.zindex"}
6788+
52296789 def from_map(m) do
52306790 %Legend{
5231- entry_padding: m["entryPadding"],
6791+ entry_padding: m["entryPadding"] && decode_entry_padding(m["entryPadding"]),
52326792 format: m["format"] && decode_format(m["format"]),
5233- offset: m["offset"],
6793+ offset: m["offset"] && decode_offset(m["offset"]),
52346794 orient: m["orient"] && LegendOrient.decode(m["orient"]),
5235- padding: m["padding"],
5236- tick_count: m["tickCount"],
6795+ padding: m["padding"] && decode_padding(m["padding"]),
6796+ tick_count: m["tickCount"] && decode_tick_count(m["tickCount"]),
52376797 title: m["title"],
52386798 type: m["type"] && LegendType.decode(m["type"]),
52396799 values: m["values"] && Enum.map(m["values"], &decode_values_element/1),
5240- zindex: m["zindex"],
6800+ zindex: m["zindex"] && decode_zindex(m["zindex"]),
52416801 }
52426802 end
52436803
@@ -5433,9 +6993,17 @@ defmodule InterpolateParams do
54336993 type: InterpolateParamsType.t()
54346994 }
54356995
6996+ def decode_gamma(value) when is_float(value), do: value
6997+ def decode_gamma(value) when is_integer(value), do: value
6998+ def decode_gamma(_), do: {:error, "Unexpected type when decoding InterpolateParams.gamma"}
6999+
7000+ def encode_gamma(value) when is_float(value), do: value
7001+ def encode_gamma(value) when is_integer(value), do: value
7002+ def encode_gamma(_), do: {:error, "Unexpected type when encoding InterpolateParams.gamma"}
7003+
54367004 def from_map(m) do
54377005 %InterpolateParams{
5438- gamma: m["gamma"],
7006+ gamma: m["gamma"] && decode_gamma(m["gamma"]),
54397007 type: InterpolateParamsType.decode(m["type"]),
54407008 }
54417009 end
@@ -5726,6 +7294,14 @@ defmodule Scale do
57267294 zero: boolean() | nil
57277295 }
57287296
7297+ def decode_base(value) when is_float(value), do: value
7298+ def decode_base(value) when is_integer(value), do: value
7299+ def decode_base(_), do: {:error, "Unexpected type when decoding Scale.base"}
7300+
7301+ def encode_base(value) when is_float(value), do: value
7302+ def encode_base(value) when is_integer(value), do: value
7303+ def encode_base(_), do: {:error, "Unexpected type when encoding Scale.base"}
7304+
57297305 def decode_domain(%{"selection" => _,} = value), do: DomainClass.from_map(value)
57307306 def decode_domain(value) when is_binary(value), do: Domain.decode(value)
57317307 def decode_domain(value) when is_list(value), do: value
@@ -5738,6 +7314,14 @@ defmodule Scale do
57387314 def encode_domain(value) when is_nil(value), do: value
57397315 def encode_domain(_), do: {:error, "Unexpected type when encoding Scale.domain"}
57407316
7317+ def decode_exponent(value) when is_float(value), do: value
7318+ def decode_exponent(value) when is_integer(value), do: value
7319+ def decode_exponent(_), do: {:error, "Unexpected type when decoding Scale.exponent"}
7320+
7321+ def encode_exponent(value) when is_float(value), do: value
7322+ def encode_exponent(value) when is_integer(value), do: value
7323+ def encode_exponent(_), do: {:error, "Unexpected type when encoding Scale.exponent"}
7324+
57417325 def decode_interpolate(%{"type" => _,} = value), do: InterpolateParams.from_map(value)
57427326 def decode_interpolate(value) when is_binary(value), do: Interpolate.decode(value)
57437327 def decode_interpolate(value) when is_nil(value), do: value
@@ -5764,6 +7348,30 @@ defmodule Scale do
57647348 def encode_nice(value) when is_nil(value), do: value
57657349 def encode_nice(_), do: {:error, "Unexpected type when encoding Scale.nice"}
57667350
7351+ def decode_padding(value) when is_float(value) and value >= 0, do: value
7352+ def decode_padding(value) when is_integer(value) and value >= 0, do: value
7353+ def decode_padding(_), do: {:error, "Unexpected type when decoding Scale.padding"}
7354+
7355+ def encode_padding(value) when is_float(value), do: value
7356+ def encode_padding(value) when is_integer(value), do: value
7357+ def encode_padding(_), do: {:error, "Unexpected type when encoding Scale.padding"}
7358+
7359+ def decode_padding_inner(value) when is_float(value) and value >= 0 and value <= 1, do: value
7360+ def decode_padding_inner(value) when is_integer(value) and value >= 0 and value <= 1, do: value
7361+ def decode_padding_inner(_), do: {:error, "Unexpected type when decoding Scale.padding_inner"}
7362+
7363+ def encode_padding_inner(value) when is_float(value), do: value
7364+ def encode_padding_inner(value) when is_integer(value), do: value
7365+ def encode_padding_inner(_), do: {:error, "Unexpected type when encoding Scale.padding_inner"}
7366+
7367+ def decode_padding_outer(value) when is_float(value) and value >= 0 and value <= 1, do: value
7368+ def decode_padding_outer(value) when is_integer(value) and value >= 0 and value <= 1, do: value
7369+ def decode_padding_outer(_), do: {:error, "Unexpected type when decoding Scale.padding_outer"}
7370+
7371+ def encode_padding_outer(value) when is_float(value), do: value
7372+ def encode_padding_outer(value) when is_integer(value), do: value
7373+ def encode_padding_outer(_), do: {:error, "Unexpected type when encoding Scale.padding_outer"}
7374+
57677375 def decode_range(value) when is_binary(value), do: value
57687376 def decode_range(value) when is_list(value), do: value
57697377 def decode_range(value) when is_nil(value), do: value
@@ -5786,15 +7394,15 @@ defmodule Scale do
57867394
57877395 def from_map(m) do
57887396 %Scale{
5789- base: m["base"],
7397+ base: m["base"] && decode_base(m["base"]),
57907398 clamp: m["clamp"],
57917399 domain: decode_domain(m["domain"]),
5792- exponent: m["exponent"],
7400+ exponent: m["exponent"] && decode_exponent(m["exponent"]),
57937401 interpolate: decode_interpolate(m["interpolate"]),
57947402 nice: decode_nice(m["nice"]),
5795- padding: m["padding"],
5796- padding_inner: m["paddingInner"],
5797- padding_outer: m["paddingOuter"],
7403+ padding: m["padding"] && decode_padding(m["padding"]),
7404+ padding_inner: m["paddingInner"] && decode_padding_inner(m["paddingInner"]),
7405+ padding_outer: m["paddingOuter"] && decode_padding_outer(m["paddingOuter"]),
57987406 range: decode_range(m["range"]),
57997407 range_step: m["rangeStep"],
58007408 round: m["round"],
@@ -6300,10 +7908,18 @@ defmodule Header do
63007908 def encode_format(value) when is_binary(value), do: value
63017909 def encode_format(_), do: {:error, "Unexpected type when encoding Header.format"}
63027910
7911+ def decode_label_angle(value) when is_float(value) and value >= -360 and value <= 360, do: value
7912+ def decode_label_angle(value) when is_integer(value) and value >= -360 and value <= 360, do: value
7913+ def decode_label_angle(_), do: {:error, "Unexpected type when decoding Header.label_angle"}
7914+
7915+ def encode_label_angle(value) when is_float(value), do: value
7916+ def encode_label_angle(value) when is_integer(value), do: value
7917+ def encode_label_angle(_), do: {:error, "Unexpected type when encoding Header.label_angle"}
7918+
63037919 def from_map(m) do
63047920 %Header{
63057921 format: m["format"] && decode_format(m["format"]),
6306- label_angle: m["labelAngle"],
7922+ label_angle: m["labelAngle"] && decode_label_angle(m["labelAngle"]),
63077923 title: m["title"],
63087924 }
63097925 end
@@ -7059,6 +8675,14 @@ defmodule Axis do
70598675 def encode_format(value) when is_binary(value), do: value
70608676 def encode_format(_), do: {:error, "Unexpected type when encoding Axis.format"}
70618677
8678+ def decode_label_angle(value) when is_float(value) and value >= -360 and value <= 360, do: value
8679+ def decode_label_angle(value) when is_integer(value) and value >= -360 and value <= 360, do: value
8680+ def decode_label_angle(_), do: {:error, "Unexpected type when decoding Axis.label_angle"}
8681+
8682+ def encode_label_angle(value) when is_float(value), do: value
8683+ def encode_label_angle(value) when is_integer(value), do: value
8684+ def encode_label_angle(_), do: {:error, "Unexpected type when encoding Axis.label_angle"}
8685+
70628686 def decode_label_overlap(value) when is_boolean(value), do: value
70638687 def decode_label_overlap(value) when is_binary(value), do: LabelOverlapEnum.decode(value)
70648688 def decode_label_overlap(value) when is_nil(value), do: value
@@ -7069,6 +8693,78 @@ defmodule Axis do
70698693 def encode_label_overlap(value) when is_nil(value), do: value
70708694 def encode_label_overlap(_), do: {:error, "Unexpected type when encoding Axis.label_overlap"}
70718695
8696+ def decode_label_padding(value) when is_float(value), do: value
8697+ def decode_label_padding(value) when is_integer(value), do: value
8698+ def decode_label_padding(_), do: {:error, "Unexpected type when decoding Axis.label_padding"}
8699+
8700+ def encode_label_padding(value) when is_float(value), do: value
8701+ def encode_label_padding(value) when is_integer(value), do: value
8702+ def encode_label_padding(_), do: {:error, "Unexpected type when encoding Axis.label_padding"}
8703+
8704+ def decode_max_extent(value) when is_float(value), do: value
8705+ def decode_max_extent(value) when is_integer(value), do: value
8706+ def decode_max_extent(_), do: {:error, "Unexpected type when decoding Axis.max_extent"}
8707+
8708+ def encode_max_extent(value) when is_float(value), do: value
8709+ def encode_max_extent(value) when is_integer(value), do: value
8710+ def encode_max_extent(_), do: {:error, "Unexpected type when encoding Axis.max_extent"}
8711+
8712+ def decode_min_extent(value) when is_float(value), do: value
8713+ def decode_min_extent(value) when is_integer(value), do: value
8714+ def decode_min_extent(_), do: {:error, "Unexpected type when decoding Axis.min_extent"}
8715+
8716+ def encode_min_extent(value) when is_float(value), do: value
8717+ def encode_min_extent(value) when is_integer(value), do: value
8718+ def encode_min_extent(_), do: {:error, "Unexpected type when encoding Axis.min_extent"}
8719+
8720+ def decode_offset(value) when is_float(value), do: value
8721+ def decode_offset(value) when is_integer(value), do: value
8722+ def decode_offset(_), do: {:error, "Unexpected type when decoding Axis.offset"}
8723+
8724+ def encode_offset(value) when is_float(value), do: value
8725+ def encode_offset(value) when is_integer(value), do: value
8726+ def encode_offset(_), do: {:error, "Unexpected type when encoding Axis.offset"}
8727+
8728+ def decode_position(value) when is_float(value), do: value
8729+ def decode_position(value) when is_integer(value), do: value
8730+ def decode_position(_), do: {:error, "Unexpected type when decoding Axis.position"}
8731+
8732+ def encode_position(value) when is_float(value), do: value
8733+ def encode_position(value) when is_integer(value), do: value
8734+ def encode_position(_), do: {:error, "Unexpected type when encoding Axis.position"}
8735+
8736+ def decode_tick_count(value) when is_float(value), do: value
8737+ def decode_tick_count(value) when is_integer(value), do: value
8738+ def decode_tick_count(_), do: {:error, "Unexpected type when decoding Axis.tick_count"}
8739+
8740+ def encode_tick_count(value) when is_float(value), do: value
8741+ def encode_tick_count(value) when is_integer(value), do: value
8742+ def encode_tick_count(_), do: {:error, "Unexpected type when encoding Axis.tick_count"}
8743+
8744+ def decode_tick_size(value) when is_float(value) and value >= 0, do: value
8745+ def decode_tick_size(value) when is_integer(value) and value >= 0, do: value
8746+ def decode_tick_size(_), do: {:error, "Unexpected type when decoding Axis.tick_size"}
8747+
8748+ def encode_tick_size(value) when is_float(value), do: value
8749+ def encode_tick_size(value) when is_integer(value), do: value
8750+ def encode_tick_size(_), do: {:error, "Unexpected type when encoding Axis.tick_size"}
8751+
8752+ def decode_title_max_length(value) when is_float(value), do: value
8753+ def decode_title_max_length(value) when is_integer(value), do: value
8754+ def decode_title_max_length(_), do: {:error, "Unexpected type when decoding Axis.title_max_length"}
8755+
8756+ def encode_title_max_length(value) when is_float(value), do: value
8757+ def encode_title_max_length(value) when is_integer(value), do: value
8758+ def encode_title_max_length(_), do: {:error, "Unexpected type when encoding Axis.title_max_length"}
8759+
8760+ def decode_title_padding(value) when is_float(value), do: value
8761+ def decode_title_padding(value) when is_integer(value), do: value
8762+ def decode_title_padding(_), do: {:error, "Unexpected type when decoding Axis.title_padding"}
8763+
8764+ def encode_title_padding(value) when is_float(value), do: value
8765+ def encode_title_padding(value) when is_integer(value), do: value
8766+ def encode_title_padding(_), do: {:error, "Unexpected type when encoding Axis.title_padding"}
8767+
70728768 def decode_values_element(%{} = value), do: DateTimeClass.from_map(value)
70738769 def decode_values_element(value) when is_float(value), do: value
70748770 def decode_values_element(value) when is_integer(value), do: value
@@ -7079,30 +8775,38 @@ defmodule Axis do
70798775 def encode_values_element(value) when is_integer(value), do: value
70808776 def encode_values_element(_), do: {:error, "Unexpected type when encoding Axis.values"}
70818777
8778+ def decode_zindex(value) when is_float(value) and value >= 0, do: value
8779+ def decode_zindex(value) when is_integer(value) and value >= 0, do: value
8780+ def decode_zindex(_), do: {:error, "Unexpected type when decoding Axis.zindex"}
8781+
8782+ def encode_zindex(value) when is_float(value), do: value
8783+ def encode_zindex(value) when is_integer(value), do: value
8784+ def encode_zindex(_), do: {:error, "Unexpected type when encoding Axis.zindex"}
8785+
70828786 def from_map(m) do
70838787 %Axis{
70848788 domain: m["domain"],
70858789 format: m["format"] && decode_format(m["format"]),
70868790 grid: m["grid"],
7087- label_angle: m["labelAngle"],
8791+ label_angle: m["labelAngle"] && decode_label_angle(m["labelAngle"]),
70888792 label_bound: m["labelBound"],
70898793 label_flush: m["labelFlush"],
70908794 label_overlap: decode_label_overlap(m["labelOverlap"]),
7091- label_padding: m["labelPadding"],
8795+ label_padding: m["labelPadding"] && decode_label_padding(m["labelPadding"]),
70928796 labels: m["labels"],
7093- max_extent: m["maxExtent"],
7094- min_extent: m["minExtent"],
7095- offset: m["offset"],
8797+ max_extent: m["maxExtent"] && decode_max_extent(m["maxExtent"]),
8798+ min_extent: m["minExtent"] && decode_min_extent(m["minExtent"]),
8799+ offset: m["offset"] && decode_offset(m["offset"]),
70968800 orient: m["orient"] && TitleOrient.decode(m["orient"]),
7097- position: m["position"],
7098- tick_count: m["tickCount"],
8801+ position: m["position"] && decode_position(m["position"]),
8802+ tick_count: m["tickCount"] && decode_tick_count(m["tickCount"]),
70998803 ticks: m["ticks"],
7100- tick_size: m["tickSize"],
8804+ tick_size: m["tickSize"] && decode_tick_size(m["tickSize"]),
71018805 title: m["title"],
7102- title_max_length: m["titleMaxLength"],
7103- title_padding: m["titlePadding"],
8806+ title_max_length: m["titleMaxLength"] && decode_title_max_length(m["titleMaxLength"]),
8807+ title_padding: m["titlePadding"] && decode_title_padding(m["titlePadding"]),
71048808 values: m["values"] && Enum.map(m["values"], &decode_values_element/1),
7105- zindex: m["zindex"],
8809+ zindex: m["zindex"] && decode_zindex(m["zindex"]),
71068810 }
71078811 end
71088812
@@ -7734,27 +9438,67 @@ defmodule MarkDef do
77349438 type: Mark.t()
77359439 }
77369440
9441+ def decode_angle(value) when is_float(value) and value >= 0 and value <= 360, do: value
9442+ def decode_angle(value) when is_integer(value) and value >= 0 and value <= 360, do: value
9443+ def decode_angle(_), do: {:error, "Unexpected type when decoding MarkDef.angle"}
9444+
9445+ def encode_angle(value) when is_float(value), do: value
9446+ def encode_angle(value) when is_integer(value), do: value
9447+ def encode_angle(_), do: {:error, "Unexpected type when encoding MarkDef.angle"}
9448+
77379449 def decode_color(value) when is_binary(value), do: value
77389450 def decode_color(_), do: {:error, "Unexpected type when decoding MarkDef.color"}
77399451
77409452 def encode_color(value) when is_binary(value), do: value
77419453 def encode_color(_), do: {:error, "Unexpected type when encoding MarkDef.color"}
77429454
9455+ def decode_dx(value) when is_float(value), do: value
9456+ def decode_dx(value) when is_integer(value), do: value
9457+ def decode_dx(_), do: {:error, "Unexpected type when decoding MarkDef.dx"}
9458+
9459+ def encode_dx(value) when is_float(value), do: value
9460+ def encode_dx(value) when is_integer(value), do: value
9461+ def encode_dx(_), do: {:error, "Unexpected type when encoding MarkDef.dx"}
9462+
9463+ def decode_dy(value) when is_float(value), do: value
9464+ def decode_dy(value) when is_integer(value), do: value
9465+ def decode_dy(_), do: {:error, "Unexpected type when decoding MarkDef.dy"}
9466+
9467+ def encode_dy(value) when is_float(value), do: value
9468+ def encode_dy(value) when is_integer(value), do: value
9469+ def encode_dy(_), do: {:error, "Unexpected type when encoding MarkDef.dy"}
9470+
77439471 def decode_fill(value) when is_binary(value), do: value
77449472 def decode_fill(_), do: {:error, "Unexpected type when decoding MarkDef.fill"}
77459473
77469474 def encode_fill(value) when is_binary(value), do: value
77479475 def encode_fill(_), do: {:error, "Unexpected type when encoding MarkDef.fill"}
77489476
9477+ def decode_fill_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
9478+ def decode_fill_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
9479+ def decode_fill_opacity(_), do: {:error, "Unexpected type when decoding MarkDef.fill_opacity"}
9480+
9481+ def encode_fill_opacity(value) when is_float(value), do: value
9482+ def encode_fill_opacity(value) when is_integer(value), do: value
9483+ def encode_fill_opacity(_), do: {:error, "Unexpected type when encoding MarkDef.fill_opacity"}
9484+
77499485 def decode_font(value) when is_binary(value), do: value
77509486 def decode_font(_), do: {:error, "Unexpected type when decoding MarkDef.font"}
77519487
77529488 def encode_font(value) when is_binary(value), do: value
77539489 def encode_font(_), do: {:error, "Unexpected type when encoding MarkDef.font"}
77549490
9491+ def decode_font_size(value) when is_float(value) and value >= 0, do: value
9492+ def decode_font_size(value) when is_integer(value) and value >= 0, do: value
9493+ def decode_font_size(_), do: {:error, "Unexpected type when decoding MarkDef.font_size"}
9494+
9495+ def encode_font_size(value) when is_float(value), do: value
9496+ def encode_font_size(value) when is_integer(value), do: value
9497+ def encode_font_size(_), do: {:error, "Unexpected type when encoding MarkDef.font_size"}
9498+
77559499 def decode_font_weight(value) when is_binary(value), do: FontWeight.decode(value)
7756- def decode_font_weight(value) when is_float(value), do: value
7757- def decode_font_weight(value) when is_integer(value), do: value
9500+ def decode_font_weight(value) when is_float(value) and value >= 100 and value <= 900, do: value
9501+ def decode_font_weight(value) when is_integer(value) and value >= 100 and value <= 900, do: value
77589502 def decode_font_weight(value) when is_nil(value), do: value
77599503 def decode_font_weight(_), do: {:error, "Unexpected type when decoding MarkDef.font_weight"}
77609504
@@ -7770,18 +9514,74 @@ defmodule MarkDef do
77709514 def encode_href(value) when is_binary(value), do: value
77719515 def encode_href(_), do: {:error, "Unexpected type when encoding MarkDef.href"}
77729516
9517+ def decode_limit(value) when is_float(value), do: value
9518+ def decode_limit(value) when is_integer(value), do: value
9519+ def decode_limit(_), do: {:error, "Unexpected type when decoding MarkDef.limit"}
9520+
9521+ def encode_limit(value) when is_float(value), do: value
9522+ def encode_limit(value) when is_integer(value), do: value
9523+ def encode_limit(_), do: {:error, "Unexpected type when encoding MarkDef.limit"}
9524+
9525+ def decode_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
9526+ def decode_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
9527+ def decode_opacity(_), do: {:error, "Unexpected type when decoding MarkDef.opacity"}
9528+
9529+ def encode_opacity(value) when is_float(value), do: value
9530+ def encode_opacity(value) when is_integer(value), do: value
9531+ def encode_opacity(_), do: {:error, "Unexpected type when encoding MarkDef.opacity"}
9532+
9533+ def decode_radius(value) when is_float(value) and value >= 0, do: value
9534+ def decode_radius(value) when is_integer(value) and value >= 0, do: value
9535+ def decode_radius(_), do: {:error, "Unexpected type when decoding MarkDef.radius"}
9536+
9537+ def encode_radius(value) when is_float(value), do: value
9538+ def encode_radius(value) when is_integer(value), do: value
9539+ def encode_radius(_), do: {:error, "Unexpected type when encoding MarkDef.radius"}
9540+
77739541 def decode_shape(value) when is_binary(value), do: value
77749542 def decode_shape(_), do: {:error, "Unexpected type when decoding MarkDef.shape"}
77759543
77769544 def encode_shape(value) when is_binary(value), do: value
77779545 def encode_shape(_), do: {:error, "Unexpected type when encoding MarkDef.shape"}
77789546
9547+ def decode_size(value) when is_float(value) and value >= 0, do: value
9548+ def decode_size(value) when is_integer(value) and value >= 0, do: value
9549+ def decode_size(_), do: {:error, "Unexpected type when decoding MarkDef.size"}
9550+
9551+ def encode_size(value) when is_float(value), do: value
9552+ def encode_size(value) when is_integer(value), do: value
9553+ def encode_size(_), do: {:error, "Unexpected type when encoding MarkDef.size"}
9554+
77799555 def decode_stroke(value) when is_binary(value), do: value
77809556 def decode_stroke(_), do: {:error, "Unexpected type when decoding MarkDef.stroke"}
77819557
77829558 def encode_stroke(value) when is_binary(value), do: value
77839559 def encode_stroke(_), do: {:error, "Unexpected type when encoding MarkDef.stroke"}
77849560
9561+ def decode_stroke_dash_offset(value) when is_float(value), do: value
9562+ def decode_stroke_dash_offset(value) when is_integer(value), do: value
9563+ def decode_stroke_dash_offset(_), do: {:error, "Unexpected type when decoding MarkDef.stroke_dash_offset"}
9564+
9565+ def encode_stroke_dash_offset(value) when is_float(value), do: value
9566+ def encode_stroke_dash_offset(value) when is_integer(value), do: value
9567+ def encode_stroke_dash_offset(_), do: {:error, "Unexpected type when encoding MarkDef.stroke_dash_offset"}
9568+
9569+ def decode_stroke_opacity(value) when is_float(value) and value >= 0 and value <= 1, do: value
9570+ def decode_stroke_opacity(value) when is_integer(value) and value >= 0 and value <= 1, do: value
9571+ def decode_stroke_opacity(_), do: {:error, "Unexpected type when decoding MarkDef.stroke_opacity"}
9572+
9573+ def encode_stroke_opacity(value) when is_float(value), do: value
9574+ def encode_stroke_opacity(value) when is_integer(value), do: value
9575+ def encode_stroke_opacity(_), do: {:error, "Unexpected type when encoding MarkDef.stroke_opacity"}
9576+
9577+ def decode_stroke_width(value) when is_float(value) and value >= 0, do: value
9578+ def decode_stroke_width(value) when is_integer(value) and value >= 0, do: value
9579+ def decode_stroke_width(_), do: {:error, "Unexpected type when decoding MarkDef.stroke_width"}
9580+
9581+ def encode_stroke_width(value) when is_float(value), do: value
9582+ def encode_stroke_width(value) when is_integer(value), do: value
9583+ def encode_stroke_width(_), do: {:error, "Unexpected type when encoding MarkDef.stroke_width"}
9584+
77859585 def decode_style(value) when is_binary(value), do: value
77869586 def decode_style(value) when is_list(value), do: value
77879587 def decode_style(value) when is_nil(value), do: value
@@ -7792,46 +9592,62 @@ defmodule MarkDef do
77929592 def encode_style(value) when is_nil(value), do: value
77939593 def encode_style(_), do: {:error, "Unexpected type when encoding MarkDef.style"}
77949594
9595+ def decode_tension(value) when is_float(value) and value >= 0 and value <= 1, do: value
9596+ def decode_tension(value) when is_integer(value) and value >= 0 and value <= 1, do: value
9597+ def decode_tension(_), do: {:error, "Unexpected type when decoding MarkDef.tension"}
9598+
9599+ def encode_tension(value) when is_float(value), do: value
9600+ def encode_tension(value) when is_integer(value), do: value
9601+ def encode_tension(_), do: {:error, "Unexpected type when encoding MarkDef.tension"}
9602+
77959603 def decode_text(value) when is_binary(value), do: value
77969604 def decode_text(_), do: {:error, "Unexpected type when decoding MarkDef.text"}
77979605
77989606 def encode_text(value) when is_binary(value), do: value
77999607 def encode_text(_), do: {:error, "Unexpected type when encoding MarkDef.text"}
78009608
9609+ def decode_theta(value) when is_float(value), do: value
9610+ def decode_theta(value) when is_integer(value), do: value
9611+ def decode_theta(_), do: {:error, "Unexpected type when decoding MarkDef.theta"}
9612+
9613+ def encode_theta(value) when is_float(value), do: value
9614+ def encode_theta(value) when is_integer(value), do: value
9615+ def encode_theta(_), do: {:error, "Unexpected type when encoding MarkDef.theta"}
9616+
78019617 def from_map(m) do
78029618 %MarkDef{
78039619 align: m["align"] && HorizontalAlign.decode(m["align"]),
7804- angle: m["angle"],
9620+ angle: m["angle"] && decode_angle(m["angle"]),
78059621 baseline: m["baseline"] && VerticalAlign.decode(m["baseline"]),
78069622 clip: m["clip"],
78079623 color: m["color"] && decode_color(m["color"]),
78089624 cursor: m["cursor"] && Cursor.decode(m["cursor"]),
7809- dx: m["dx"],
7810- dy: m["dy"],
9625+ dx: m["dx"] && decode_dx(m["dx"]),
9626+ dy: m["dy"] && decode_dy(m["dy"]),
78119627 fill: m["fill"] && decode_fill(m["fill"]),
78129628 filled: m["filled"],
7813- fill_opacity: m["fillOpacity"],
9629+ fill_opacity: m["fillOpacity"] && decode_fill_opacity(m["fillOpacity"]),
78149630 font: m["font"] && decode_font(m["font"]),
7815- font_size: m["fontSize"],
9631+ font_size: m["fontSize"] && decode_font_size(m["fontSize"]),
78169632 font_style: m["fontStyle"] && FontStyle.decode(m["fontStyle"]),
78179633 font_weight: decode_font_weight(m["fontWeight"]),
78189634 href: m["href"] && decode_href(m["href"]),
78199635 interpolate: m["interpolate"] && Interpolate.decode(m["interpolate"]),
7820- limit: m["limit"],
7821- opacity: m["opacity"],
9636+ limit: m["limit"] && decode_limit(m["limit"]),
9637+ opacity: m["opacity"] && decode_opacity(m["opacity"]),
78229638 orient: m["orient"] && Orient.decode(m["orient"]),
7823- radius: m["radius"],
9639+ radius: m["radius"] && decode_radius(m["radius"]),
78249640 shape: m["shape"] && decode_shape(m["shape"]),
7825- size: m["size"],
9641+ size: m["size"] && decode_size(m["size"]),
78269642 stroke: m["stroke"] && decode_stroke(m["stroke"]),
78279643 stroke_dash: m["strokeDash"],
7828- stroke_dash_offset: m["strokeDashOffset"],
7829- stroke_opacity: m["strokeOpacity"],
7830- stroke_width: m["strokeWidth"],
9644+ stroke_dash_offset: m["strokeDashOffset"] && decode_stroke_dash_offset(m["strokeDashOffset"]),
9645+ stroke_opacity: m["strokeOpacity"] && decode_stroke_opacity(m["strokeOpacity"]),
9646+ stroke_width: m["strokeWidth"] && decode_stroke_width(m["strokeWidth"]),
78319647 style: decode_style(m["style"]),
7832- tension: m["tension"],
9648+ tension: m["tension"] && decode_tension(m["tension"]),
78339649 text: m["text"] && decode_text(m["text"]),
7834- theta: m["theta"],
9650+ theta: m["theta"] && decode_theta(m["theta"]),
78359651 type: Mark.decode(m["type"]),
78369652 }
78379653 end
@@ -7921,6 +9737,54 @@ defmodule Projection do
79219737 type: VGProjectionType.t() | nil
79229738 }
79239739
9740+ def decode_clip_angle(value) when is_float(value), do: value
9741+ def decode_clip_angle(value) when is_integer(value), do: value
9742+ def decode_clip_angle(_), do: {:error, "Unexpected type when decoding Projection.clip_angle"}
9743+
9744+ def encode_clip_angle(value) when is_float(value), do: value
9745+ def encode_clip_angle(value) when is_integer(value), do: value
9746+ def encode_clip_angle(_), do: {:error, "Unexpected type when encoding Projection.clip_angle"}
9747+
9748+ def decode_coefficient(value) when is_float(value), do: value
9749+ def decode_coefficient(value) when is_integer(value), do: value
9750+ def decode_coefficient(_), do: {:error, "Unexpected type when decoding Projection.coefficient"}
9751+
9752+ def encode_coefficient(value) when is_float(value), do: value
9753+ def encode_coefficient(value) when is_integer(value), do: value
9754+ def encode_coefficient(_), do: {:error, "Unexpected type when encoding Projection.coefficient"}
9755+
9756+ def decode_distance(value) when is_float(value), do: value
9757+ def decode_distance(value) when is_integer(value), do: value
9758+ def decode_distance(_), do: {:error, "Unexpected type when decoding Projection.distance"}
9759+
9760+ def encode_distance(value) when is_float(value), do: value
9761+ def encode_distance(value) when is_integer(value), do: value
9762+ def encode_distance(_), do: {:error, "Unexpected type when encoding Projection.distance"}
9763+
9764+ def decode_fraction(value) when is_float(value), do: value
9765+ def decode_fraction(value) when is_integer(value), do: value
9766+ def decode_fraction(_), do: {:error, "Unexpected type when decoding Projection.fraction"}
9767+
9768+ def encode_fraction(value) when is_float(value), do: value
9769+ def encode_fraction(value) when is_integer(value), do: value
9770+ def encode_fraction(_), do: {:error, "Unexpected type when encoding Projection.fraction"}
9771+
9772+ def decode_lobes(value) when is_float(value), do: value
9773+ def decode_lobes(value) when is_integer(value), do: value
9774+ def decode_lobes(_), do: {:error, "Unexpected type when decoding Projection.lobes"}
9775+
9776+ def encode_lobes(value) when is_float(value), do: value
9777+ def encode_lobes(value) when is_integer(value), do: value
9778+ def encode_lobes(_), do: {:error, "Unexpected type when encoding Projection.lobes"}
9779+
9780+ def decode_parallel(value) when is_float(value), do: value
9781+ def decode_parallel(value) when is_integer(value), do: value
9782+ def decode_parallel(_), do: {:error, "Unexpected type when decoding Projection.parallel"}
9783+
9784+ def encode_parallel(value) when is_float(value), do: value
9785+ def encode_parallel(value) when is_integer(value), do: value
9786+ def encode_parallel(_), do: {:error, "Unexpected type when encoding Projection.parallel"}
9787+
79249788 def decode_precision_value(value) when is_float(value), do: value
79259789 def decode_precision_value(value) when is_integer(value), do: value
79269790 def decode_precision_value(value) when is_binary(value), do: value
@@ -7931,23 +9795,55 @@ defmodule Projection do
79319795 def encode_precision_value(value) when is_binary(value), do: value
79329796 def encode_precision_value(_), do: {:error, "Unexpected type when encoding Projection.precision"}
79339797
9798+ def decode_radius(value) when is_float(value), do: value
9799+ def decode_radius(value) when is_integer(value), do: value
9800+ def decode_radius(_), do: {:error, "Unexpected type when decoding Projection.radius"}
9801+
9802+ def encode_radius(value) when is_float(value), do: value
9803+ def encode_radius(value) when is_integer(value), do: value
9804+ def encode_radius(_), do: {:error, "Unexpected type when encoding Projection.radius"}
9805+
9806+ def decode_ratio(value) when is_float(value), do: value
9807+ def decode_ratio(value) when is_integer(value), do: value
9808+ def decode_ratio(_), do: {:error, "Unexpected type when decoding Projection.ratio"}
9809+
9810+ def encode_ratio(value) when is_float(value), do: value
9811+ def encode_ratio(value) when is_integer(value), do: value
9812+ def encode_ratio(_), do: {:error, "Unexpected type when encoding Projection.ratio"}
9813+
9814+ def decode_spacing(value) when is_float(value), do: value
9815+ def decode_spacing(value) when is_integer(value), do: value
9816+ def decode_spacing(_), do: {:error, "Unexpected type when decoding Projection.spacing"}
9817+
9818+ def encode_spacing(value) when is_float(value), do: value
9819+ def encode_spacing(value) when is_integer(value), do: value
9820+ def encode_spacing(_), do: {:error, "Unexpected type when encoding Projection.spacing"}
9821+
9822+ def decode_tilt(value) when is_float(value), do: value
9823+ def decode_tilt(value) when is_integer(value), do: value
9824+ def decode_tilt(_), do: {:error, "Unexpected type when decoding Projection.tilt"}
9825+
9826+ def encode_tilt(value) when is_float(value), do: value
9827+ def encode_tilt(value) when is_integer(value), do: value
9828+ def encode_tilt(_), do: {:error, "Unexpected type when encoding Projection.tilt"}
9829+
79349830 def from_map(m) do
79359831 %Projection{
79369832 center: m["center"],
7937- clip_angle: m["clipAngle"],
9833+ clip_angle: m["clipAngle"] && decode_clip_angle(m["clipAngle"]),
79389834 clip_extent: m["clipExtent"],
7939- coefficient: m["coefficient"],
7940- distance: m["distance"],
7941- fraction: m["fraction"],
7942- lobes: m["lobes"],
7943- parallel: m["parallel"],
9835+ coefficient: m["coefficient"] && decode_coefficient(m["coefficient"]),
9836+ distance: m["distance"] && decode_distance(m["distance"]),
9837+ fraction: m["fraction"] && decode_fraction(m["fraction"]),
9838+ lobes: m["lobes"] && decode_lobes(m["lobes"]),
9839+ parallel: m["parallel"] && decode_parallel(m["parallel"]),
79449840 precision: m["precision"]
79459841 |> Map.new(fn {key, value} -> {key, decode_precision_value(value)} end),
7946- radius: m["radius"],
7947- ratio: m["ratio"],
9842+ radius: m["radius"] && decode_radius(m["radius"]),
9843+ ratio: m["ratio"] && decode_ratio(m["ratio"]),
79489844 rotate: m["rotate"],
7949- spacing: m["spacing"],
7950- tilt: m["tilt"],
9845+ spacing: m["spacing"] && decode_spacing(m["spacing"]),
9846+ tilt: m["tilt"] && decode_tilt(m["tilt"]),
79519847 type: m["type"] && VGProjectionType.decode(m["type"]),
79529848 }
79539849 end
@@ -8365,6 +10261,14 @@ defmodule TitleParams do
836510261 text: String.t()
836610262 }
836710263
10264+ def decode_offset(value) when is_float(value), do: value
10265+ def decode_offset(value) when is_integer(value), do: value
10266+ def decode_offset(_), do: {:error, "Unexpected type when decoding TitleParams.offset"}
10267+
10268+ def encode_offset(value) when is_float(value), do: value
10269+ def encode_offset(value) when is_integer(value), do: value
10270+ def encode_offset(_), do: {:error, "Unexpected type when encoding TitleParams.offset"}
10271+
836810272 def decode_style(value) when is_binary(value), do: value
836910273 def decode_style(value) when is_list(value), do: value
837010274 def decode_style(value) when is_nil(value), do: value
@@ -8384,7 +10288,7 @@ defmodule TitleParams do
838410288 def from_map(m) do
838510289 %TitleParams{
838610290 anchor: m["anchor"] && Anchor.decode(m["anchor"]),
8387- offset: m["offset"],
10291+ offset: m["offset"] && decode_offset(m["offset"]),
838810292 orient: m["orient"] && TitleOrient.decode(m["orient"]),
838910293 style: decode_style(m["style"]),
839010294 text: decode_text(m["text"]),
@@ -8695,6 +10599,14 @@ defmodule LayerSpec do
869510599 def encode_description(value) when is_binary(value), do: value
869610600 def encode_description(_), do: {:error, "Unexpected type when encoding LayerSpec.description"}
869710601
10602+ def decode_height(value) when is_float(value), do: value
10603+ def decode_height(value) when is_integer(value), do: value
10604+ def decode_height(_), do: {:error, "Unexpected type when decoding LayerSpec.height"}
10605+
10606+ def encode_height(value) when is_float(value), do: value
10607+ def encode_height(value) when is_integer(value), do: value
10608+ def encode_height(_), do: {:error, "Unexpected type when encoding LayerSpec.height"}
10609+
869810610 def decode_name(value) when is_binary(value), do: value
869910611 def decode_name(_), do: {:error, "Unexpected type when decoding LayerSpec.name"}
870010612
@@ -8711,6 +10623,14 @@ defmodule LayerSpec do
871110623 def encode_title(value) when is_nil(value), do: value
871210624 def encode_title(_), do: {:error, "Unexpected type when encoding LayerSpec.title"}
871310625
10626+ def decode_width(value) when is_float(value), do: value
10627+ def decode_width(value) when is_integer(value), do: value
10628+ def decode_width(_), do: {:error, "Unexpected type when decoding LayerSpec.width"}
10629+
10630+ def encode_width(value) when is_float(value), do: value
10631+ def encode_width(value) when is_integer(value), do: value
10632+ def encode_width(_), do: {:error, "Unexpected type when encoding LayerSpec.width"}
10633+
871410634 def decode_mark(%{"type" => _,} = value), do: MarkDef.from_map(value)
871510635 def decode_mark(value) when is_binary(value), do: Mark.decode(value)
871610636 def decode_mark(value) when is_nil(value), do: value
@@ -8725,13 +10645,13 @@ defmodule LayerSpec do
872510645 %LayerSpec{
872610646 data: m["data"] && Data.from_map(m["data"]),
872710647 description: m["description"] && decode_description(m["description"]),
8728- height: m["height"],
10648+ height: m["height"] && decode_height(m["height"]),
872910649 layer: m["layer"] && Enum.map(m["layer"], &LayerSpec.from_map/1),
873010650 name: m["name"] && decode_name(m["name"]),
873110651 resolve: m["resolve"] && Resolve.from_map(m["resolve"]),
873210652 title: decode_title(m["title"]),
873310653 transform: m["transform"] && Enum.map(m["transform"], &Transform.from_map/1),
8734- width: m["width"],
10654+ width: m["width"] && decode_width(m["width"]),
873510655 encoding: m["encoding"] && Encoding.from_map(m["encoding"]),
873610656 mark: decode_mark(m["mark"]),
873710657 projection: m["projection"] && Projection.from_map(m["projection"]),
@@ -8866,6 +10786,14 @@ defmodule Spec do
886610786 def encode_description(value) when is_binary(value), do: value
886710787 def encode_description(_), do: {:error, "Unexpected type when encoding Spec.description"}
886810788
10789+ def decode_height(value) when is_float(value), do: value
10790+ def decode_height(value) when is_integer(value), do: value
10791+ def decode_height(_), do: {:error, "Unexpected type when decoding Spec.height"}
10792+
10793+ def encode_height(value) when is_float(value), do: value
10794+ def encode_height(value) when is_integer(value), do: value
10795+ def encode_height(_), do: {:error, "Unexpected type when encoding Spec.height"}
10796+
886910797 def decode_name(value) when is_binary(value), do: value
887010798 def decode_name(_), do: {:error, "Unexpected type when decoding Spec.name"}
887110799
@@ -8882,6 +10810,14 @@ defmodule Spec do
888210810 def encode_title(value) when is_nil(value), do: value
888310811 def encode_title(_), do: {:error, "Unexpected type when encoding Spec.title"}
888410812
10813+ def decode_width(value) when is_float(value), do: value
10814+ def decode_width(value) when is_integer(value), do: value
10815+ def decode_width(_), do: {:error, "Unexpected type when decoding Spec.width"}
10816+
10817+ def encode_width(value) when is_float(value), do: value
10818+ def encode_width(value) when is_integer(value), do: value
10819+ def encode_width(_), do: {:error, "Unexpected type when encoding Spec.width"}
10820+
888510821 def decode_mark(%{"type" => _,} = value), do: MarkDef.from_map(value)
888610822 def decode_mark(value) when is_binary(value), do: Mark.decode(value)
888710823 def decode_mark(value) when is_nil(value), do: value
@@ -8896,13 +10832,13 @@ defmodule Spec do
889610832 %Spec{
889710833 data: m["data"] && Data.from_map(m["data"]),
889810834 description: m["description"] && decode_description(m["description"]),
8899- height: m["height"],
10835+ height: m["height"] && decode_height(m["height"]),
890010836 layer: m["layer"] && Enum.map(m["layer"], &LayerSpec.from_map/1),
890110837 name: m["name"] && decode_name(m["name"]),
890210838 resolve: m["resolve"] && Resolve.from_map(m["resolve"]),
890310839 title: decode_title(m["title"]),
890410840 transform: m["transform"] && Enum.map(m["transform"], &Transform.from_map/1),
8905- width: m["width"],
10841+ width: m["width"] && decode_width(m["width"]),
890610842 encoding: m["encoding"] && Encoding.from_map(m["encoding"]),
890710843 mark: decode_mark(m["mark"]),
890810844 projection: m["projection"] && Projection.from_map(m["projection"]),
@@ -9036,6 +10972,14 @@ defmodule TopLevel do
903610972 def encode_description(value) when is_binary(value), do: value
903710973 def encode_description(_), do: {:error, "Unexpected type when encoding TopLevel.description"}
903810974
10975+ def decode_height(value) when is_float(value), do: value
10976+ def decode_height(value) when is_integer(value), do: value
10977+ def decode_height(_), do: {:error, "Unexpected type when decoding TopLevel.height"}
10978+
10979+ def encode_height(value) when is_float(value), do: value
10980+ def encode_height(value) when is_integer(value), do: value
10981+ def encode_height(_), do: {:error, "Unexpected type when encoding TopLevel.height"}
10982+
903910983 def decode_mark(%{"type" => _,} = value), do: MarkDef.from_map(value)
904010984 def decode_mark(value) when is_binary(value), do: Mark.decode(value)
904110985 def decode_mark(value) when is_nil(value), do: value
@@ -9074,6 +11018,14 @@ defmodule TopLevel do
907411018 def encode_title(value) when is_nil(value), do: value
907511019 def encode_title(_), do: {:error, "Unexpected type when encoding TopLevel.title"}
907611020
11021+ def decode_width(value) when is_float(value), do: value
11022+ def decode_width(value) when is_integer(value), do: value
11023+ def decode_width(_), do: {:error, "Unexpected type when decoding TopLevel.width"}
11024+
11025+ def encode_width(value) when is_float(value), do: value
11026+ def encode_width(value) when is_integer(value), do: value
11027+ def encode_width(_), do: {:error, "Unexpected type when encoding TopLevel.width"}
11028+
907711029 def from_map(m) do
907811030 %TopLevel{
907911031 schema: m["$schema"] && decode_schema(m["$schema"]),
@@ -9083,7 +11035,7 @@ defmodule TopLevel do
908311035 data: m["data"] && Data.from_map(m["data"]),
908411036 description: m["description"] && decode_description(m["description"]),
908511037 encoding: m["encoding"] && EncodingWithFacet.from_map(m["encoding"]),
9086- height: m["height"],
11038+ height: m["height"] && decode_height(m["height"]),
908711039 mark: decode_mark(m["mark"]),
908811040 name: m["name"] && decode_name(m["name"]),
908911041 padding: decode_padding(m["padding"]),
@@ -9092,7 +11044,7 @@ defmodule TopLevel do
909211044 |> Map.new(fn {key, value} -> {key, SelectionDef.from_map(value)} end),
909311045 title: decode_title(m["title"]),
909411046 transform: m["transform"] && Enum.map(m["transform"], &Transform.from_map/1),
9095- width: m["width"],
11047+ width: m["width"] && decode_width(m["width"]),
909611048 layer: m["layer"] && Enum.map(m["layer"], &LayerSpec.from_map/1),
909711049 resolve: m["resolve"] && Resolve.from_map(m["resolve"]),
909811050 facet: m["facet"] && FacetMapping.from_map(m["facet"]),
No generated files match these filters.