mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-05 03:58:40 +00:00
484 lines
19 KiB
Forth
484 lines
19 KiB
Forth
//------------------------------------------------------------------------------
|
|
// This code was generated by myriad.
|
|
// Changes to this file will be lost when the code is regenerated.
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
namespace ConsumePlugin
|
|
|
|
open System.Text.Json.Serialization
|
|
|
|
/// Module containing JSON serializing methods for the InternalTypeNotExtensionSerial type
|
|
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
|
|
module internal InternalTypeNotExtensionSerial =
|
|
/// Serialize to a JSON node
|
|
let toJsonNode (input : InternalTypeNotExtensionSerial) : System.Text.Json.Nodes.JsonNode =
|
|
let node = System.Text.Json.Nodes.JsonObject ()
|
|
|
|
do
|
|
node.Add (
|
|
(Literals.something),
|
|
(input.InternalThing2
|
|
|> (fun field ->
|
|
let field = System.Text.Json.Nodes.JsonValue.Create<string> field
|
|
|
|
(match field with
|
|
| null ->
|
|
raise (
|
|
System.ArgumentNullException
|
|
"Expected type string to be non-null, but received a null value when serialising"
|
|
)
|
|
| field -> field)
|
|
))
|
|
)
|
|
|
|
node :> _
|
|
namespace ConsumePlugin
|
|
|
|
open System.Text.Json.Serialization
|
|
|
|
/// Module containing JSON serializing extension members for the InternalTypeExtension type
|
|
[<AutoOpen>]
|
|
module internal InternalTypeExtensionJsonSerializeExtension =
|
|
/// Extension methods for JSON parsing
|
|
type InternalTypeExtension with
|
|
|
|
/// Serialize to a JSON node
|
|
static member toJsonNode (input : InternalTypeExtension) : System.Text.Json.Nodes.JsonNode =
|
|
let node = System.Text.Json.Nodes.JsonObject ()
|
|
|
|
do
|
|
node.Add (
|
|
(Literals.something),
|
|
(input.ExternalThing
|
|
|> (fun field ->
|
|
let field = System.Text.Json.Nodes.JsonValue.Create<string> field
|
|
|
|
(match field with
|
|
| null ->
|
|
raise (
|
|
System.ArgumentNullException
|
|
"Expected type string to be non-null, but received a null value when serialising"
|
|
)
|
|
| field -> field)
|
|
))
|
|
)
|
|
|
|
node :> _
|
|
|
|
namespace ConsumePlugin
|
|
|
|
/// Module containing JSON parsing methods for the InnerType type
|
|
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
|
|
module InnerType =
|
|
/// Parse from a JSON node.
|
|
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InnerType =
|
|
let arg_0 =
|
|
match node.[(Literals.something)] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ((Literals.something))
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.String> ()
|
|
|
|
{
|
|
Thing = arg_0
|
|
}
|
|
namespace ConsumePlugin
|
|
|
|
/// Module containing JSON parsing methods for the JsonRecordType type
|
|
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
|
|
module JsonRecordType =
|
|
/// Parse from a JSON node.
|
|
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JsonRecordType =
|
|
let arg_5 =
|
|
match node.["f"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("f")
|
|
)
|
|
)
|
|
| Some node ->
|
|
node.AsArray ()
|
|
|> Seq.map (fun elt ->
|
|
(match elt with
|
|
| null ->
|
|
raise (
|
|
System.ArgumentNullException
|
|
"Expected element of array (element type int32) to be non-null, but found a null element"
|
|
)
|
|
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
|
)
|
|
|> Array.ofSeq
|
|
|
|
let arg_4 =
|
|
match node.["e"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("e")
|
|
)
|
|
)
|
|
| Some node ->
|
|
node.AsArray ()
|
|
|> Seq.map (fun elt ->
|
|
(match elt with
|
|
| null ->
|
|
raise (
|
|
System.ArgumentNullException
|
|
"Expected element of array (element type string) to be non-null, but found a null element"
|
|
)
|
|
| elt -> elt.AsValue().GetValue<System.String> ())
|
|
)
|
|
|> Array.ofSeq
|
|
|
|
let arg_3 =
|
|
match node.["d"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("d")
|
|
)
|
|
)
|
|
| Some node -> InnerType.jsonParse node
|
|
|
|
let arg_2 =
|
|
match node.["hi"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("hi")
|
|
)
|
|
)
|
|
| Some node ->
|
|
node.AsArray ()
|
|
|> Seq.map (fun elt ->
|
|
(match elt with
|
|
| null ->
|
|
raise (
|
|
System.ArgumentNullException
|
|
"Expected element of array (element type int32) to be non-null, but found a null element"
|
|
)
|
|
| elt -> elt.AsValue().GetValue<System.Int32> ())
|
|
)
|
|
|> List.ofSeq
|
|
|
|
let arg_1 =
|
|
match node.["another-thing"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("another-thing")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.String> ()
|
|
|
|
let arg_0 =
|
|
match node.["a"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("a")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Int32> ()
|
|
|
|
{
|
|
A = arg_0
|
|
B = arg_1
|
|
C = arg_2
|
|
D = arg_3
|
|
E = arg_4
|
|
F = arg_5
|
|
}
|
|
namespace ConsumePlugin
|
|
|
|
/// Module containing JSON parsing methods for the InternalTypeNotExtension type
|
|
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
|
|
module internal InternalTypeNotExtension =
|
|
/// Parse from a JSON node.
|
|
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InternalTypeNotExtension =
|
|
let arg_0 =
|
|
match node.[(Literals.something)] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ((Literals.something))
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.String> ()
|
|
|
|
{
|
|
InternalThing = arg_0
|
|
}
|
|
namespace ConsumePlugin
|
|
|
|
/// Module containing JSON parsing extension members for the InternalTypeExtension type
|
|
[<AutoOpen>]
|
|
module internal InternalTypeExtensionJsonParseExtension =
|
|
/// Extension methods for JSON parsing
|
|
type InternalTypeExtension with
|
|
|
|
/// Parse from a JSON node.
|
|
static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : InternalTypeExtension =
|
|
let arg_0 =
|
|
match node.[(Literals.something)] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ((Literals.something))
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.String> ()
|
|
|
|
{
|
|
ExternalThing = arg_0
|
|
}
|
|
namespace ConsumePlugin
|
|
|
|
/// Module containing JSON parsing extension members for the ToGetExtensionMethod type
|
|
[<AutoOpen>]
|
|
module ToGetExtensionMethodJsonParseExtension =
|
|
/// Extension methods for JSON parsing
|
|
type ToGetExtensionMethod with
|
|
|
|
/// Parse from a JSON node.
|
|
static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ToGetExtensionMethod =
|
|
let arg_20 =
|
|
match node.["whiskey"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("whiskey")
|
|
)
|
|
)
|
|
| Some node -> System.Numerics.BigInteger.Parse (node.ToJsonString ())
|
|
|
|
let arg_19 =
|
|
match node.["victor"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("victor")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Char> ()
|
|
|
|
let arg_18 =
|
|
match node.["uniform"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("uniform")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Decimal> ()
|
|
|
|
let arg_17 =
|
|
match node.["tango"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("tango")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.SByte> ()
|
|
|
|
let arg_16 =
|
|
match node.["quebec"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("quebec")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Byte> ()
|
|
|
|
let arg_15 =
|
|
match node.["papa"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("papa")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Byte> ()
|
|
|
|
let arg_14 =
|
|
match node.["oscar"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("oscar")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.SByte> ()
|
|
|
|
let arg_13 =
|
|
match node.["november"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("november")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.UInt16> ()
|
|
|
|
let arg_12 =
|
|
match node.["mike"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("mike")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Int16> ()
|
|
|
|
let arg_11 =
|
|
match node.["lima"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("lima")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.UInt32> ()
|
|
|
|
let arg_10 =
|
|
match node.["kilo"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("kilo")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Int32> ()
|
|
|
|
let arg_9 =
|
|
match node.["juliette"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("juliette")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.UInt32> ()
|
|
|
|
let arg_8 =
|
|
match node.["india"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("india")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Int32> ()
|
|
|
|
let arg_7 =
|
|
match node.["hotel"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("hotel")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.UInt64> ()
|
|
|
|
let arg_6 =
|
|
match node.["golf"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("golf")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Int64> ()
|
|
|
|
let arg_5 =
|
|
match node.["foxtrot"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("foxtrot")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Double> ()
|
|
|
|
let arg_4 =
|
|
match node.["echo"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("echo")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Single> ()
|
|
|
|
let arg_3 =
|
|
match node.["delta"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("delta")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Single> ()
|
|
|
|
let arg_2 =
|
|
match node.["charlie"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("charlie")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.Double> ()
|
|
|
|
let arg_1 =
|
|
match node.["bravo"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("bravo")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<string> () |> System.Uri
|
|
|
|
let arg_0 =
|
|
match node.["alpha"] |> Option.ofObj with
|
|
| None ->
|
|
raise (
|
|
System.Collections.Generic.KeyNotFoundException (
|
|
sprintf "Required key '%s' not found on JSON object" ("alpha")
|
|
)
|
|
)
|
|
| Some node -> node.AsValue().GetValue<System.String> ()
|
|
|
|
{
|
|
Alpha = arg_0
|
|
Bravo = arg_1
|
|
Charlie = arg_2
|
|
Delta = arg_3
|
|
Echo = arg_4
|
|
Foxtrot = arg_5
|
|
Golf = arg_6
|
|
Hotel = arg_7
|
|
India = arg_8
|
|
Juliette = arg_9
|
|
Kilo = arg_10
|
|
Lima = arg_11
|
|
Mike = arg_12
|
|
November = arg_13
|
|
Oscar = arg_14
|
|
Papa = arg_15
|
|
Quebec = arg_16
|
|
Tango = arg_17
|
|
Uniform = arg_18
|
|
Victor = arg_19
|
|
Whiskey = arg_20
|
|
}
|